query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102 values |
|---|---|---|---|---|---|---|
TODO Autogenerated method stub | public static void main(String[] args) {
ResourceBundle configuracion = ResourceBundle.getBundle("configuracion.properties");
String usuario = configuracion.getString("login");
String password = configuracion.getString("clave");
System.out.println("valores obtenidos:"+usuario+"--"+password);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int sequence() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
ADICIONAR EMPRESA Combo de listagem dos estados que lista todos estados | public List<SelectItem> getEstados() throws ClassNotFoundException, SQLException{
List<SelectItem> retorno = new LinkedList<SelectItem>();
for(TB_UF estado : ufDAO.listarTodos()){
retorno.add(new SelectItem(estado, estado.getNOME_UF()));
}
return retorno;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void carregaEstadoSelecionado(String nome) throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUfEditar.addItem(list);\n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbUfEditar.setSelectedItem(nome);\n \n \n \n }",
"public void carrega_estado() throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUF.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n \n \n Conexao.desConectar();\n }",
"private void preencherComboEstados() {\n\t\tList<Estado> listEstado;\n\t\tObservableList<Estado> oListEstado;\n\t\tEstadosDAO estadosDao;\n\n\t\t//Instancia a DAO estados\n\t\testadosDao = new EstadosDAO();\n\n\t\t//Chama o metodo para listar todos os estados\n\t\tlistEstado = estadosDao.selecionar();\n\n\t\t//Verifica se a lista de estados está vazia\n\t\tif(listEstado.isEmpty()) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//Atribui a lista retornada ao observablearray\n\t\toListEstado = FXCollections.observableArrayList(listEstado);\n\n\t\t//Adiciona os itens no combobx\n\t\tcboEstado.setItems(oListEstado);\n\n\t\t//Seleciona o primeio item do combobox\n\t\tcboEstado.getSelectionModel().select(0);\n\t}",
"public List<SelectItem> getlistEstados() {\n\t\tList<SelectItem> lista = new ArrayList<SelectItem>();\n\t\tlista.add(new SelectItem(Funciones.estadoActivo, Funciones.estadoActivo\n\t\t\t\t+ \" : \" + Funciones.valorEstadoActivo));\n\t\tlista.add(new SelectItem(Funciones.estadoInactivo,\n\t\t\t\tFunciones.estadoInactivo + \" : \"\n\t\t\t\t\t\t+ Funciones.valorEstadoInactivo));\n\t\treturn lista;\n\t}",
"public void carrega_cidade() throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUF.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n \n ResultSet rs = preparador.executeQuery();\n cbCidade.removeAllItems();\n //passando valores do banco para o objeto result; \n try{ \n \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidade.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n Conexao.desConectar();\n \n }",
"public void carregaCidadeSelecionada(String nome) throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list);\n \n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbCidadeEditar.setSelectedItem(nome);\n \n \n \n \n }",
"private void carregaComboDentista() {\n CtrPessoa ctrD = new CtrPessoa();\n ArrayList<Pessoa> result = ctrD.getPessoa(\"\", new Dentista());\n\n ObservableList<Pessoa> dentistas = FXCollections.observableArrayList(result);\n\n if (!result.isEmpty()) {\n cbDentista.setItems(dentistas);\n cbDentista.setValue(cbDentista.getItems().get(0)); //inicializando comboBox\n }\n }",
"public void listarIgrejaComboBox() {\n\n IgrejasDAO dao = new IgrejasDAO();\n List<Igrejas> lista = dao.listarIgrejas();\n cbIgrejas.removeAllItems();\n\n for (Igrejas c : lista) {\n cbIgrejas.addItem(c);\n }\n }",
"public void carregaCidadeModificada() throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n \n ResultSet rs = preparador.executeQuery();\n cbCidadeEditar.removeAllItems();\n //passando valores do banco para o objeto result; \n try{ \n \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n \n }",
"private void combo() {\n cargaCombo(combo_habitacion, \"SELECT hh.descripcion\\n\" +\n \"FROM huespedes h\\n\" +\n \"LEFT JOIN estadia_huespedes eh ON eh.huespedes_id = h.id\\n\" +\n \"LEFT JOIN estadia_habitaciones ehh ON eh.id_estadia = ehh.id_estadia\\n\" +\n \"LEFT JOIN estadia e ON e.id = ehh.id_estadia \\n\" +\n \"LEFT JOIN habitaciones hh ON hh.id = ehh.id_habitacion\\n\" +\n \"WHERE eh.huespedes_id = \"+idd+\" AND e.estado ='A'\\n\" +\n \"ORDER BY descripcion\\n\" +\n \"\",\"hh.descripcion\");\n cargaCombo(combo_empleado, \"SELECT CONCAT(p.nombre, ' ',p.apellido) FROM persona p\\n\" +\n \"RIGHT JOIN empleado e ON e.persona_id = p.id\", \"empleado\");\n cargaCombo(combo_producto, \"SELECT producto FROM productos order by producto\", \"producto\");\n }",
"private void mostradados() {\r\n\t\tint in = 0;\r\n\r\n\t\tfor (Estado e : Estado.values()) {\r\n\t\t\tif (in == 0) {\r\n\t\t\t\tcmbx_estado.addItem(\"\");\r\n\t\t\t\tin = 1;\r\n\t\t\t}\r\n\t\t\tcmbx_estado.addItem(e.getNome());\r\n\t\t}\r\n\r\n\t\tfor (int x = 0; x < listacliente.size(); x++) {\r\n\t\t\tin = 0;\r\n\t\t\tif (x == 0) {\r\n\t\t\t\tcmbx_cidade.addItem(\"\");\r\n\t\t\t}\r\n\r\n\t\t\tfor (int y = 0; y < cmbx_cidade.getItemCount(); y++) {\r\n\t\t\t\tif (listacliente.get(x).getCidade().equals(cmbx_cidade.getItemAt(y).toString()))\r\n\t\t\t\t\tin++;\r\n\t\t\t\tif (in > 1)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (in < 1)\r\n\t\t\t\tcmbx_cidade.addItem(listacliente.get(x).getCidade());\r\n\t\t}\r\n\t}",
"public void datosCombobox() {\n listaColegios = new ColegioDaoImp().listar();\n for (Colegio colegio : listaColegios) {\n cbColegio.addItem(colegio.getNombre());\n }\n }",
"private void cargaComboBoxTipoLaboreo() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoLaboreoEntity p\");\n java.util.List<TipoLaboreoEntity> listaTipoLaboreoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoLaboreoEntity tipoLaboreo : listaTipoLaboreoEntity) {\n miVectorTipoLaboreo.add(tipoLaboreo.getTpoNombre());\n cboMomentos.addItem(tipoLaboreo);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }",
"private void llenarCombo() {\n cobOrdenar.removeAllItems();\n cobOrdenar.addItem(\"Fecha\");\n cobOrdenar.addItem(\"Nro Likes\");\n cobOrdenar.setSelectedIndex(-1); \n }",
"public void llenarComboSeccion() {\t\t\n\t\tString respuesta = negocio.llenarComboSeccion(\"\");\n\t\tSystem.out.println(respuesta);\t\t\n\t}",
"private void cargaComboBoxTipoGrano() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoGranoEntity p\");\n java.util.List<TipoGranoEntity> listaTipoGranoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoGranoEntity tipoGrano : listaTipoGranoEntity) {\n miVectorTipoLaboreo.add(tipoGrano.getTgrNombre());\n cbxSemillas.addItem(tipoGrano);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }",
"public void iniciar_combo() {\n try {\n Connection cn = DriverManager.getConnection(mdi_Principal.BD, mdi_Principal.Usuario, mdi_Principal.Contraseña);\n PreparedStatement psttt = cn.prepareStatement(\"select nombre from proveedor \");\n ResultSet rss = psttt.executeQuery();\n\n cbox_proveedor.addItem(\"Seleccione una opción\");\n while (rss.next()) {\n cbox_proveedor.addItem(rss.getString(\"nombre\"));\n }\n \n PreparedStatement pstt = cn.prepareStatement(\"select nombre from sucursal \");\n ResultSet rs = pstt.executeQuery();\n\n \n cbox_sucursal.addItem(\"Seleccione una opción\");\n while (rs.next()) {\n cbox_sucursal.addItem(rs.getString(\"nombre\"));\n }\n \n PreparedStatement pstttt = cn.prepareStatement(\"select id_compraE from compra_encabezado \");\n ResultSet rsss = pstttt.executeQuery();\n\n \n cbox_compra.addItem(\"Seleccione una opción\");\n while (rsss.next()) {\n cbox_compra.addItem(rsss.getString(\"id_compraE\"));\n }\n \n PreparedStatement ps = cn.prepareStatement(\"select nombre_moneda from moneda \");\n ResultSet r = ps.executeQuery();\n\n \n cbox_moneda.addItem(\"Seleccione una opción\");\n while (r.next()) {\n cbox_moneda.addItem(r.getString(\"nombre_moneda\"));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }",
"private void comboCarrega() {\n\n try {\n con = BancoDeDados.getConexao();\n //cria a string para inserir no banco\n String query = \"SELECT * FROM servico\";\n\n PreparedStatement cmd;\n cmd = con.prepareStatement(query);\n ResultSet rs;\n\n rs = cmd.executeQuery();\n\n while (rs.next()) {\n JCservico.addItem(rs.getString(\"id\") + \"-\" + rs.getString(\"modalidade\"));\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro de SQL \" + ex.getMessage());\n }\n }",
"public List<Joueur> List_Joueur_HommesForComboBox() \r\n {\r\n List<Joueur> j = new ArrayList<>();\r\n String req= \"SELECT * FROM personne WHERE datedestruction is NULL and role = 'Joueur' and sexe='Homme' \";\r\n try {\r\n ResultSet res = ste.executeQuery(req);\r\n while (res.next()) {\r\n \r\n Joueur Jou = new Joueur(\r\n res.getInt(\"idpersonne\"),\r\n \r\n res.getString(\"nom\"),\r\n res.getString(\"prenom\")\r\n );\r\n j.add(Jou);\r\n \r\n System.out.println(\"------- joueurs selectionné avec succés----\");\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"----------Erreur lors methode : List_Joueur_Hommes()------\");\r\n }\r\n return j;\r\n \r\n}",
"public TelaListaOS() {\n initComponents();\n ConfigTelas ct = new ConfigTelas(this);\n ct.carregarConfig(this);\n \n this.jComboBoxOS.setVisible(false);\n }",
"private void cargaLista() {\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Aclaracion\", \"Aclaracion\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revision\", \"Revision\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revocatoria\", \"Revocatoria\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Subsidiaria\", \"Subsidiaria\"));\n \n }",
"public Usuarios() {\n try {\n initComponents();\n String c_est, c_mun, c_ciu, id1;\n this.setLocationRelativeTo(null);\n String[] datos = new String[2];\n a = new Archivos();\n lineas = new String[9];\n lineas = a.Leer();\n m = new ManejadorSQL(lineas[2], lineas[1], lineas[3], lineas[4], lineas[5], lineas[7], lineas[6]);\n m.setLineas(lineas);\n ResultSet b_esta = m.Select(\"tblsit_estado order by nb_estado\", \"id_estado,nb_estado\");//Seleccionamos los estados para el combo box\n while (b_esta.next()) {\n datos[0] = b_esta.getString(1);\n datos[1] = b_esta.getString(2);\n u_c_estado.addItem(datos[1]); // agregamos los estados\n //System.out.println(datos[0]);\n }\n DefaultComboBoxModel modeloCombo = new DefaultComboBoxModel();// TODO add your handling code here:\n modeloCombo.addElement(\"Seleccionar\");\n u_ciudad.setModel(modeloCombo);\n u_c_municipio.setModel(modeloCombo);\n \n } catch (Exception ex) {\n Logger.getLogger(Usuarios.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void setComboBoxValues() {\n String sql = \"select iName from item where iActive=? order by iName asc\";\n \n cbo_iniName.removeAllItems();\n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,\"Yes\");\n rs = pst.executeQuery();\n \n while (rs.next()) {\n cbo_iniName.addItem(rs.getString(1));\n }\n \n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item list cannot be loaded\");\n }finally {\n try{\n rs.close();\n pst.close();\n \n }catch(Exception e) {}\n }\n }",
"@Transactional(readOnly = true)\n\tList<Acondicionador> getAcondicionadoresForCombobox();",
"void hienThi() {\n LoaiVT.Open();\n ArrayList<LoaiVT> DSSP = LoaiVT.DSLOAIVT;\n VatTu PX = VatTu.getPX();\n \n try {\n txtMaVT.setText(PX.getMaVT());\n txtTenVT.setText(PX.getTenVT());\n txtDonVi.setText(PX.getDVT());\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n for(LoaiVT SP: DSSP){ \n cb.addElement(SP.getMaLoai());\n if(SP.getMaLoai().equals(PX.getMaLoai())){\n cb.setSelectedItem(SP.getMaLoai());\n }\n }\n cbMaloai.setModel(cb);\n } catch (Exception ex) {\n txtMaVT.setText(\"\");\n txtTenVT.setText(\"\");\n txtDonVi.setText(\"\");\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n cb.setSelectedItem(\"\");\n cbMaloai.setModel(cb);\n }\n \n \n }",
"private void actualizarCombos(){\n Set<String> listaAños = serviciosCuenta.obtieneAños();\n for (String año : listaAños) {\n this.jcbSeleccionAñoIni.addItem(año);\n this.jcbSeleccionAñoFin.addItem(año);\n }\n \n String AñoIni = this.jcbSeleccionAñoIni.getSelectedItem().toString();\n String AñoFin = this.jcbSeleccionAñoFin.getSelectedItem().toString();\n \n this.jcbSeleccionMesIni.removeAllItems();\n this.jcbSeleccionInicio.removeAllItems();\n Set<String> listaMesesIni = serviciosCuenta.obtieneMeses(AñoIni);\n Set<String> listaMesesFin = serviciosCuenta.obtieneMeses(AñoFin);\n for (String mes : listaMesesIni) {\n this.jcbSeleccionMesIni.addItem(mes);\n }\n for (String mes : listaMesesFin) {\n this.jcbSeleccionMesFin.addItem(mes);\n }\n \n String MesIni = this.jcbSeleccionMesIni.getSelectedItem().toString();\n String MesFin = this.jcbSeleccionMesFin.getSelectedItem().toString();\n ArrayList<String> listaDiasIni = serviciosCuenta.obtieneDias(AñoIni, MesIni);\n ArrayList<String> listaDiasFin = serviciosCuenta.obtieneDias(AñoFin, MesFin);\n \n for (String dia : listaDiasIni) {\n this.jcbSeleccionInicio.addItem(dia);\n }\n for (String dia : listaDiasFin) {\n this.jcbSeleccionFin.addItem(dia);\n }\n this.jcbSeleccionFin.setSelectedIndex(this.jcbSeleccionFin.getItemCount() - 1);\n //System.out.println(\"Saliendo: private void actualizarCombos()\");\n }",
"private void popuniComboZaMesto() {\n try {\n jComboMesto.removeAllItems();\n List<MestoEntity> mesta = Controller.ucitajListuMesta();\n \n for (IDomainEntity mesto : mesta) {\n if(mesto instanceof MestoEntity)\n jComboMesto.addItem((MestoEntity) mesto);\n }\n } catch (Exception ex) {\n Logger.getLogger(FKupac.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n selectOrdem = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n nome = new javax.swing.JTextField();\n btnSalvar = new javax.swing.JButton();\n btnCancelar = new javax.swing.JButton();\n descErro = new javax.swing.JLabel();\n\n jLabel2.setText(\"Ordem na exibição\");\n\n selectOrdem.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\" }));\n\n jLabel1.setText(\"Nome da lista\");\n\n btnSalvar.setText(\"Salvar Lista\");\n\n btnCancelar.setText(\"Cancelar\");\n\n descErro.setForeground(new java.awt.Color(255, 51, 51));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnSalvar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnCancelar))\n .addComponent(nome, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)\n .addComponent(descErro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(selectOrdem, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(selectOrdem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(descErro, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(13, 13, 13)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSalvar)\n .addComponent(btnCancelar))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n }",
"public MantendorContrato() {\n initComponents();\n this.jTableContratos.setModel(this.showData());\n \n lblClienteid.setVisible(false);\n lblContratoId.setVisible(false);\n ClienteService cs = new ClienteService();\n \n String array = cs.getCliente(); \n JSONObject obj = new JSONObject(array); \n Usuario u = new Usuario();\n JSONArray data = obj.getJSONArray(\"data\"); \n for (int i = 0; i < data.length(); i++) {\n JSONObject row = data.getJSONObject(i);\n cmbClienteContrato.addItem(\n new ClienteCombobox(row.getInt(\"cliente_id\"), row.getString(\"cliente_nombre\"))\n );\n }\n \n this.jTableContratos.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\n public void valueChanged(ListSelectionEvent event) {\n // do some actions here, for example\n // print first column value from selected row\n String contratoId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 0).toString(); \n String clienteId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 6).toString(); \n String activo = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 8).toString(); \n \n \n if(activo.equalsIgnoreCase(\"1\")){\n radioActivoEdit.setSelected(true);\n }else if(activo.equalsIgnoreCase(\"0\")){\n radioInactivoEdit.setSelected(true);\n }\n \n lblClienteid.setText(clienteId);\n lblContratoId.setText(contratoId);\n \n }\n }); \n }",
"private void listadoRol(JComboBox cbb) throws SQLException {\n\t\tint selected = cbb.getSelectedIndex();\n\t\tDefaultComboBoxModel model = (DefaultComboBoxModel) cbb.getModel();\n\t\tif (!coordUsuario.listaRol().isEmpty()) {\n\t\tlistaRol = coordUsuario.listaRol();\n\t\t // Borrar Datos Viejos\n\t model.removeAllElements();\n\t for (int i=0;i<listaRol.size();i++) {\n\t model.addElement(listaRol.get(i).getNombre());\n\t }\n\t // setting model with new data\n\t cbb.setModel(model);\n\t cbb.setRenderer(new MyComboBox(\"Rol\")); \n \tcbb.setSelectedIndex(selected); \n\t}}",
"public void riempiProceduraComboBox(){\n Statement stmt;\n ResultSet rst;\n String query = \"SELECT P.schema, P.nomeProcedura FROM Procedura P\";\n \n proceduraComboBox.removeAllItems();\n try{\n stmt = Database.getDefaultConnection().createStatement();\n rst = stmt.executeQuery(query);\n \n while(rst.next()){\n //le Procedure nella comboBox saranno mostrate secondo il modello: nomeSchema.nomeProcedura\n //in quanto Procedure appartenenti a Schemi diversi possono avere lo stesso nome\n proceduraComboBox.addItem(rst.getString(1)+\".\"+rst.getString(2));\n }\n proceduraComboBox.setSelectedIndex(-1);\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n }",
"private void listadoEstados() {\r\n sessionProyecto.getEstados().clear();\r\n sessionProyecto.setEstados(itemService.buscarPorCatalogo(CatalogoEnum.ESTADOPROYECTO.getTipo()));\r\n }",
"private void comboMultivalores(HTMLSelectElement combo, String tabla, String defecto, boolean dejarBlanco) {\n/* 393 */ SisMultiValoresDAO ob = new SisMultiValoresDAO();\n/* 394 */ Collection<SisMultiValoresDTO> arr = ob.cargarTabla(tabla);\n/* 395 */ ob.close();\n/* 396 */ if (dejarBlanco) {\n/* 397 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 398 */ op.setValue(\"\");\n/* 399 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 400 */ combo.appendChild(op);\n/* */ } \n/* 402 */ Iterator<SisMultiValoresDTO> iterator = arr.iterator();\n/* 403 */ while (iterator.hasNext()) {\n/* 404 */ SisMultiValoresDTO reg = (SisMultiValoresDTO)iterator.next();\n/* 405 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 406 */ op.setValue(\"\" + reg.getCodigo());\n/* 407 */ op.appendChild(this.pagHTML.createTextNode(reg.getDescripcion()));\n/* 408 */ if (defecto.equals(reg.getCodigo())) {\n/* 409 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 410 */ escogida.setValue(\"on\");\n/* 411 */ op.setAttributeNode(escogida);\n/* */ } \n/* 413 */ combo.appendChild(op);\n/* */ } \n/* 415 */ arr.clear();\n/* */ }",
"private void initCombobox() {\n comboConstructeur = new ComboBox<>();\n comboConstructeur.setLayoutX(100);\n comboConstructeur.setLayoutY(250);\n\n\n BDDManager2 bddManager2 = new BDDManager2();\n bddManager2.start(\"jdbc:mysql://localhost:3306/concession?characterEncoding=utf8\", \"root\", \"\");\n listeConstructeur = bddManager2.select(\"SELECT * FROM constructeur;\");\n bddManager2.stop();\n for (int i = 0; i < listeConstructeur.size(); i++) {\n comboConstructeur.getItems().addAll(listeConstructeur.get(i).get(1));\n\n\n }\n\n\n\n\n\n\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n loadTable();\n ObservableList<String> opt = FXCollections.observableArrayList(\n \"A01\",\n \"A02\",\n \"A02\",\n \"A03\",\n \"A04\",\n \"B01\",\n \"B02\",\n \"B03\",\n \"B04\",\n \"C01\",\n \"C02\",\n \"C03\",\n \"C04\",\n \"D01\",\n \"D02\",\n \"D03\",\n \"D04\");\n \n cb1.setItems(opt);\n \n \n \n \n ObservableList<String> options = FXCollections.observableArrayList();\n Connection cnx = Myconn.getInstance().getConnection();\n String e=\"\\\"\"+\"Etudiant\"+\"\\\"\";\n ResultSet rs = cnx.createStatement().executeQuery(\"select full_name from user where role=\"+e+\"\");\n while(rs.next()){\n options.add(rs.getString(\"full_name\"));\n \n }\n// ObservableList<String> options = FXCollections.observableArrayList(\"Option 1\",\"Option 2\",\"Option 3\");\n comboE.setItems(options);\n } catch (SQLException ex) {\n Logger.getLogger(SoutenanceController.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }",
"private void CargarListaFincas() {\n listaFincas = controlgen.GetComboBox(\"SELECT '-1' AS ID, 'Seleccionar' AS DESCRIPCION\\n\" +\n \"UNION\\n\" +\n \"SELECT `id` AS ID, `descripcion` AS DESCRIPCION\\n\" +\n \"FROM `fincas`\\n\"+\n \"/*UNION \\n\"+\n \"SELECT 'ALL' AS ID, 'TODOS' AS DESCRIPCION*/\");\n \n Utilidades.LlenarComboBox(cbFinca, listaFincas, \"DESCRIPCION\");\n \n }",
"private JComboBox getJComboBoxEntidad()\r\n {\r\n \tif (jComboBoxEntidad == null)\r\n\t\t{\r\n\t\t\tjComboBoxEntidad = new JComboBox();\r\n//\t\t \tjComboBoxEntidad.setEditable(true);\r\n\t\t\tjComboBoxEntidad.setRenderer(new UbicacionListCellRenderer());\r\n\t\t\tjComboBoxEntidad.addActionListener(new ActionListener()\r\n\t\t\t{\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t\t{ \r\n\t\t\t\t\t\r\n\t\t\t\t\tif (jComboBoxEntidad.getSelectedIndex()==0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tjComboBoxNucleo.removeAllItems();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tEntidadesSingularesEIEL entidad = new EntidadesSingularesEIEL();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (jComboBoxProvincia.getSelectedItem() != null)\r\n\t\t\t\t\t\t\tentidad.setCodINEProvincia(((Provincia)jComboBoxProvincia.getSelectedItem()).getIdProvincia());\r\n\t\t\t\t\t\tif (jComboBoxMunicipio.getSelectedItem() != null && !jComboBoxMunicipio.getSelectedItem().equals(\"\"))\r\n\t\t\t\t\t\t\tentidad.setCodINEMunicipio(\r\n\t\t\t\t\t\t\t\t\t((Municipio)jComboBoxMunicipio.getSelectedItem()).getIdIne()\r\n\t\t \t\t\t\t\t\t);\r\n\t\t \tif (jComboBoxEntidad.getSelectedItem() != null && !jComboBoxEntidad.getSelectedItem().equals(\"\"))\r\n\t\t \t\tentidad.setCodINEEntidad(((EntidadesSingularesEIEL)jComboBoxEntidad.getSelectedItem()).getCodINEEntidad());\r\n\t\t\t\t\r\n\t\t \t\t\t\r\n\t\t \tif (entidad.getCodINEEntidad()!=null){\r\n\t\t \t\tEdicionOperations oper = new EdicionOperations();\r\n\t\t \t\tEdicionUtils.cargarLista(getJComboBoxNucleo(), \r\n\t\t \t\t\t\t\toper.obtenerNucleosConNombre(entidad));\r\n\t\t \t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jComboBoxEntidad;\r\n }",
"private void napuniCbPozoriste() {\n\t\t\r\n\t\tfor (Pozoriste p:Kontroler.getInstanca().vratiPozorista())\r\n\t\t\t\r\n\t\t\tcbPozoriste.addItem(p.getImePozorista());\r\n\t}",
"private void inicializarCombos() {\n\t\tlistaGrupoUsuario = GrupoUsuarioDAO.readTodos(this.mainApp.getConnection());\n\t\tfor (GrupoUsuario grupo : listaGrupoUsuario) {\n\t\t\tthis.observableListaGrupoUsuario.add(grupo.getNombre());\n\t\t}\n\t\tthis.comboGrupoUsuario.setItems(this.observableListaGrupoUsuario);\n\t\tnew AutoCompleteComboBoxListener(comboGrupoUsuario);\n\n\t\tObservableList<String> status = FXCollections.observableArrayList(\"Bloqueado\",\"Activo\",\"Baja\");\n\t\tthis.comboStatus.setItems(status);\n\t\tthis.comboEmpleados.setItems(FXCollections.observableArrayList(this.listaEmpleados));\n\t}",
"private void initComboBox() {\n jComboBox1.removeAllItems();\n listaDeInstrutores = instrutorDao.recuperarInstrutor();\n listaDeInstrutores.forEach((ex) -> {\n jComboBox1.addItem(ex.getNome());\n });\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n bindingGroup = new org.jdesktop.beansbinding.BindingGroup();\n\n SistotalPUEntityManager = ConnectionFactory.getEntityManager();\n ordemServicoQuery = java.beans.Beans.isDesignTime() ? null : SistotalPUEntityManager.createQuery(\"SELECT o FROM OrdemServico o\");\n ordemServicoList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(ordemServicoQuery.getResultList());\n situacaoOsListCellRenderer1 = new br.com.renderizadores.SituacaoOsListCellRenderer();\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jButtonVisualizar = new javax.swing.JButton();\n jComboBoxOS = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jButtonSair = new javax.swing.JButton();\n jButtonNovo = new javax.swing.JButton();\n jCheckBoxAbertas = new javax.swing.JCheckBox();\n jCheckBoxAndamento = new javax.swing.JCheckBox();\n jCheckBoxFechadas = new javax.swing.JCheckBox();\n jCheckBoxTodas = new javax.swing.JCheckBox();\n\n situacaoOsListCellRenderer1.setText(\"situacaoOsListCellRenderer1\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n jTable1.setAutoCreateRowSorter(true);\n jTable1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n\n org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, ordemServicoList, jTable1);\n org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${idordemServico}\"));\n columnBinding.setColumnName(\"Código\");\n columnBinding.setColumnClass(Integer.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${idcliente.nome}\"));\n columnBinding.setColumnName(\"Nome\");\n columnBinding.setColumnClass(String.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${dataAbertura}\"));\n columnBinding.setColumnName(\"Data Abertura\");\n columnBinding.setColumnClass(java.util.Date.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${idequipamento.descricao}\"));\n columnBinding.setColumnName(\"Equipamento\");\n columnBinding.setColumnClass(String.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${idsituacaoOs.descricao}\"));\n columnBinding.setColumnName(\"Situação\");\n columnBinding.setColumnClass(String.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${totalServicos}\"));\n columnBinding.setColumnName(\"Total Servicos\");\n columnBinding.setColumnClass(java.math.BigDecimal.class);\n columnBinding.setEditable(false);\n bindingGroup.addBinding(jTableBinding);\n jTableBinding.bind();\n jScrollPane1.setViewportView(jTable1);\n if (jTable1.getColumnModel().getColumnCount() > 0) {\n jTable1.getColumnModel().getColumn(0).setMinWidth(50);\n jTable1.getColumnModel().getColumn(0).setPreferredWidth(50);\n jTable1.getColumnModel().getColumn(0).setMaxWidth(50);\n jTable1.getColumnModel().getColumn(4).setMinWidth(100);\n jTable1.getColumnModel().getColumn(4).setPreferredWidth(100);\n jTable1.getColumnModel().getColumn(4).setMaxWidth(100);\n }\n\n jButtonVisualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/icones/visualizar_ordem_servico.png\"))); // NOI18N\n jButtonVisualizar.setText(\"Visualizar\");\n jButtonVisualizar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonVisualizar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n\n org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jTable1, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement!=null}\"), jButtonVisualizar, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\n bindingGroup.addBinding(binding);\n\n jButtonVisualizar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonVisualizarActionPerformed(evt);\n }\n });\n\n org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, ordemServicoList, jComboBoxOS);\n bindingGroup.addBinding(jComboBoxBinding);\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jTable1, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement}\"), jComboBoxOS, org.jdesktop.beansbinding.BeanProperty.create(\"selectedItem\"));\n bindingGroup.addBinding(binding);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"Lista de Ordens de Serviço\");\n\n jButtonSair.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/icones/exit_64.png\"))); // NOI18N\n jButtonSair.setText(\"Sair\");\n jButtonSair.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonSair.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonSair.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSairActionPerformed(evt);\n }\n });\n\n jButtonNovo.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/com/icones/add_servico_64.png\"))); // NOI18N\n jButtonNovo.setText(\"Nova\");\n jButtonNovo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButtonNovo.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButtonNovo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonNovoActionPerformed(evt);\n }\n });\n\n jCheckBoxAbertas.setText(\"Abertas\");\n jCheckBoxAbertas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxAbertasActionPerformed(evt);\n }\n });\n\n jCheckBoxAndamento.setText(\"Andamento\");\n jCheckBoxAndamento.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxAndamentoActionPerformed(evt);\n }\n });\n\n jCheckBoxFechadas.setText(\"Fechadas\");\n jCheckBoxFechadas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxFechadasActionPerformed(evt);\n }\n });\n\n jCheckBoxTodas.setText(\"Todas\");\n jCheckBoxTodas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBoxTodasActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addComponent(jComboBoxOS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButtonNovo, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(40, 40, 40)\n .addComponent(jButtonVisualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(61, 61, 61)\n .addComponent(jButtonSair, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(74, 74, 74))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 719, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jCheckBoxTodas)\n .addGap(67, 67, 67)\n .addComponent(jCheckBoxAbertas)\n .addGap(51, 51, 51)\n .addComponent(jCheckBoxAndamento)\n .addGap(41, 41, 41)\n .addComponent(jCheckBoxFechadas)\n .addGap(9, 9, 9))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(297, 297, 297)\n .addComponent(jLabel1)))\n .addContainerGap(62, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBoxAbertas)\n .addComponent(jCheckBoxAndamento)\n .addComponent(jCheckBoxFechadas)\n .addComponent(jCheckBoxTodas))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(52, 52, 52)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButtonSair, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButtonNovo, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButtonVisualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jComboBoxOS, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(87, 87, 87))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n bindingGroup.bind();\n\n setSize(new java.awt.Dimension(847, 638));\n setLocationRelativeTo(null);\n }",
"public List<Madeira> buscaCidadesEstado(String estado);",
"public FrmEjemploCombo() {\n initComponents();\n \n cargarAutos();\n }",
"private void cargaComboTipoDocumento() {\n\t\tcomboTipoDoc = new JComboBox();\n\t\tfor (TipoDocumentoDTO tipoDocumentoDTO : tip) {\n\t\t\tcomboTipoDoc.addItem(tipoDocumentoDTO.getAbreviacion());\n\t\t}\n\n\t}",
"public void tampil_siswa(){\n try {\n Connection con = conek.GetConnection();\n Statement stt = con.createStatement();\n String sql = \"select id from nilai order by id asc\"; // disini saya menampilkan NIM, anda dapat menampilkan\n ResultSet res = stt.executeQuery(sql); // yang anda ingin kan\n \n while(res.next()){\n Object[] ob = new Object[6];\n ob[0] = res.getString(1);\n \n comboId.addItem(ob[0]); // fungsi ini bertugas menampung isi dari database\n }\n res.close(); stt.close();\n \n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }",
"private void actualizarComboboxCursos() {\n\t\tint curso;\n\n\t\tDefaultComboBoxModel dcbm = new DefaultComboBoxModel();\n\t\tdcbm.removeAllElements();\n\n\t\tLinkedHashSet<Integer> resultado = modelo.obtenerCursos();\n\t\tIterator it = resultado.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tcurso = (int) it.next();\n\n\t\t\tdcbm.addElement(curso);\n\t\t}\n\t\tjfad.cBCursos.setModel(dcbm);\n\t\tjfad.cBCursosMod.setModel(dcbm);\n\t\tSystem.out.println(dcbm.getSelectedItem());\n\t}",
"public void setvalues(){\n Connection con= getConnection();\n Statement pst1;\n ResultSet rs1;\n \n try{\n \n String qry1=\"SELECT DISTINCT(`StudentGroup`) FROM `sessions`\";\n \n pst1=con.prepareStatement(qry1);\n rs1=pst1.executeQuery(qry1);\n\n combo_studentGroup.removeAllItems();\n \n while(rs1.next()){\n combo_studentGroup.addItem(rs1.getString(\"StudentGroup\"));\n }\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n \n }",
"private void carregarComboMarca(){\r\n\t\tMarcaEquipamentoDAO marcaDAO = new MarcaEquipamentoDAO(FormEquipamento.this);\r\n\t\tlistaCombo = marcaDAO.listar() ;\r\n\t\tif (!listaCombo.isEmpty()){\r\n\t\t\tArrayAdapter<MarcaEquipamento> adaptador = new ArrayAdapter<MarcaEquipamento>(FormEquipamento.this , \r\n\t\t\t\t\tandroid.R.layout.simple_spinner_item, \r\n\t\t\t\t\tlistaCombo );\r\n\t\t\tadaptador.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n\t\t\tcomboMarca.setAdapter(adaptador);\r\n\t\t}\r\n\t}",
"private void llenarCombo(HTMLSelectElement combo, String tabla, String codigo, String descripcion, String condicion, String defecto, boolean dejarBlanco) {\n/* 436 */ if (dejarBlanco) {\n/* 437 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 438 */ op.setValue(\"\");\n/* 439 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 440 */ combo.appendChild(op);\n/* */ } \n/* 442 */ TGeneralDAO rsTGen = new TGeneralDAO();\n/* 443 */ Collection<TGeneralDTO> arr = rsTGen.cargarTabla(tabla, codigo, descripcion, condicion);\n/* 444 */ rsTGen.close();\n/* 445 */ Iterator<TGeneralDTO> iterator = arr.iterator();\n/* 446 */ while (iterator.hasNext()) {\n/* 447 */ TGeneralDTO regGeneral = (TGeneralDTO)iterator.next();\n/* 448 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 449 */ op.setValue(\"\" + regGeneral.getCodigoS());\n/* 450 */ op.appendChild(this.pagHTML.createTextNode(regGeneral.getDescripcion()));\n/* 451 */ if (defecto != null && defecto.equals(regGeneral.getCodigoS())) {\n/* 452 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 453 */ escogida.setValue(\"on\");\n/* 454 */ op.setAttributeNode(escogida);\n/* */ } \n/* 456 */ combo.appendChild(op);\n/* */ } \n/* */ }",
"public DLQL_SuaMon() {\n initComponents();\n try {\n cbbLoai = con.GetAllLoaiMonAn();\n DefaultComboBoxModel md = new DefaultComboBoxModel();\n cbxLoaiMon.setModel(md);\n for (int i = 0; i < cbbLoai.size(); i++) {\n cbxLoaiMon.addItem(cbbLoai.get(i).getTenLoai());\n }\n cbxLoaiMon.setSelectedItem(con.GetLoaiByMa(StoreData.currentMonAn.getMaLoai()).getTenLoai());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Không LOAD được combo Loại\");\n }\n txtTenMon.setText(StoreData.currentMonAn.getTenMon());\n txtDonGia.setText(Integer.toString(StoreData.currentMonAn.getDonGia()));\n txtDVT.setText(StoreData.currentMonAn.getdVT());\n }",
"private JComboBox<Cliente> crearComboClientes() {\n\n JComboBox<Cliente> combo = new JComboBox<>(new Vector<>(almacen.getClientes()));\n combo.setMaximumSize(new Dimension(500, 40));\n\n combo.setRenderer(new DefaultListCellRenderer() {\n @Override\n public Component getListCellRendererComponent(JList<? extends Object> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n\n Component resultado = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\n Cliente cliente = (Cliente) value;\n this.setText(cliente != null ? cliente.getNombre() : \"No existen clientes\");\n\n return resultado;\n }\n });\n\n return combo;\n }",
"private void iniciaTela() {\n try {\n tfCod.setText(String.valueOf(reservaCliDAO.getLastId()));\n desabilitaCampos(false);\n DefaultComboBoxModel modeloComboCliente;\n modeloComboCliente = new DefaultComboBoxModel(funDAO.getAll().toArray());\n cbFunc.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(quartoDAO.getAll().toArray());\n cbQuarto.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(cliDAO.getAll().toArray());\n cbCliente.setModel(modeloComboCliente);\n btSelect.setEnabled(false);\n verificaCampos();\n carregaTableReserva(reservaDAO.getAll());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public ListEtudNiv() {\n initComponents();\n\n ResultSet res = null;\n try {\n res = DbaseUtils.getConnection().createStatement().executeQuery(\"select nomF from filiere\");\n } catch (Exception ex) {\n Logger.getLogger(ListeEtudFiliere.class.getName()).log(Level.SEVERE, null, ex);\n }\n String[] Filiere = new String[10];\n int i = 0;\n try {\n while (res.next()) {\n Filiere[i] = res.getString(\"nomF\");\n i++;\n }\n } catch (SQLException ex) {\n Logger.getLogger(GestionDesEtudiants.class.getName()).log(Level.SEVERE, null, ex);\n }\n ComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(Filiere));\n\n ComboBox1.addActionListener((ActionEvent e) -> {\n \n ComboBox2.addActionListener((ActionEvent f) -> {\n Table1.setModel(new EtudiantFilNivTableModel(ComboBox1.getSelectedItem().toString(), ComboBox2.getSelectedItem().toString()));\n });\n \n });\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n //Preenche o comboBox sexo\r\n cb_sexo.setItems(listSexo);\r\n cb_uf.setItems(listUf);\r\n cb_serie.setItems(listSerie);\r\n\r\n// // Preenche o comboBox UF\r\n// this.cb_uf.setConverter(new ConverterDados(ConverterDados.GET_UF));\r\n// this.cb_uf.setItems(AlunoDAO.executeQuery(null, AlunoDAO.QUERY_TODOS));\r\n//\r\n// //Preenche o comboBox Serie\r\n// this.cb_serie.setConverter(new ConverterDados(ConverterDados.GET_SERIE));\r\n// this.cb_serie.setItems(AlunoDAO.executeQuery(null, AlunoDAO.QUERY_TODOS));\r\n this.codAluno.setCellValueFactory(cellData -> cellData.getValue().getCodigoProperty().asObject());\r\n this.nomeAluno.setCellValueFactory(cellData -> cellData.getValue().getNomeProperty());\r\n this.sexoAluno.setCellValueFactory(cellData -> cellData.getValue().getSexoProperty());\r\n this.enderecoAluno.setCellValueFactory(cellData -> cellData.getValue().getEnderecoProperty());\r\n this.cepAluno.setCellValueFactory(cellData -> cellData.getValue().getCepProperty());\r\n this.nascimentoAluno.setCellValueFactory(cellData -> cellData.getValue().getNascimentoProperty());\r\n this.ufAluno.setCellValueFactory(cellData -> cellData.getValue().getUfProperty());\r\n this.maeAluno.setCellValueFactory(cellData -> cellData.getValue().getMaeProperty());\r\n this.paiAluno.setCellValueFactory(cellData -> cellData.getValue().getPaiProperty());\r\n this.telefoneAluno.setCellValueFactory(cellData -> cellData.getValue().getTelefoneProperty());\r\n this.serieAluno.setCellValueFactory(cellData -> cellData.getValue().getSerieProperty());\r\n this.ensinoAluno.setCellValueFactory(cellData -> cellData.getValue().getEnsinoProperty());\r\n\r\n //bt_excluir.disableProperty().bind(tabelaAluno.getSelectionModel().selectedItemProperty().isNull());\r\n //bt_editar.disableProperty().bind(tabelaAluno.getSelectionModel().selectedItemProperty().isNull());\r\n }",
"public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }",
"public void llenarComboGrado() {\t\n\t\tString respuesta = negocio.llenarComboGrado(\"\");\n\t\tSystem.out.println(respuesta);\t\n\t}",
"private void fillTreasuryStateCb() {\n ObservableList treasuryStateLst = FXCollections.observableArrayList(\"Pendiente\", \"Pagado\", \"Ninguno\");\n getTreasuryStateCb().setItems(treasuryStateLst);\n }",
"public List<SelectItem> getListaMes()\r\n/* 163: */ {\r\n/* 164:209 */ ArrayList<SelectItem> lista = new ArrayList();\r\n/* 165:210 */ for (Mes mes : Mes.values()) {\r\n/* 166:211 */ lista.add(new SelectItem(mes, mes.getNombre()));\r\n/* 167: */ }\r\n/* 168:213 */ return lista;\r\n/* 169: */ }",
"public static DefaultComboBoxModel getArtigos(Integer codEv, Integer numEd) throws SQLException{\r\n DefaultComboBoxModel model = new DefaultComboBoxModel();\r\n String selectTableSQL = \"SELECT idArt FROM Artigo WHERE codEv = \" + codEv +\" AND numEd = \" + numEd + \"\";\r\n System.out.println(selectTableSQL);\r\n Statement statement = dbConnection.createStatement();\r\n ResultSet rs = statement.executeQuery(selectTableSQL);\r\n model.addElement(\" --- \");\r\n while(rs.next()){\r\n model.addElement(rs.getString(\"idArt\"));\r\n }\r\n rs.close();\r\n return model;\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n tblClientes = new javax.swing.JTable();\n btnSair = new javax.swing.JButton();\n comboBoxOrdenacao = new javax.swing.JComboBox<>();\n\n setTitle(\"Lista de Clientes\");\n\n tblClientes.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {},\n {},\n {},\n {}\n },\n new String [] {\n\n }\n ));\n tblClientes.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n tblClientesMousePressed(evt);\n }\n });\n jScrollPane1.setViewportView(tblClientes);\n\n btnSair.setText(\"Sair\");\n btnSair.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSairActionPerformed(evt);\n }\n });\n\n comboBoxOrdenacao.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"< Selecionar Ordenação >\", \"Nome\" }));\n comboBoxOrdenacao.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n comboBoxOrdenacaoActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 783, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(comboBoxOrdenacao, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnSair)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 271, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSair)\n .addComponent(comboBoxOrdenacao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(16, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public void llenarComboBox(){\n TipoMiembroComboBox.removeAllItems();\n TipoMiembroComboBox.addItem(\"Administrador\");\n TipoMiembroComboBox.addItem(\"Editor\");\n TipoMiembroComboBox.addItem(\"Invitado\");\n }",
"public void combo(){\r\n // Define rendering of the list of values in ComboBox drop down. \r\n cbbMedicos.setCellFactory((comboBox) -> {\r\n return new ListCell<Usuario>() {\r\n @Override\r\n protected void updateItem(Usuario item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if (item == null || empty) {\r\n setText(null);\r\n } else {\r\n setText(item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico());\r\n }\r\n }\r\n };\r\n });\r\n\r\n // Define rendering of selected value shown in ComboBox.\r\n cbbMedicos.setConverter(new StringConverter<Usuario>() {\r\n @Override\r\n public String toString(Usuario item) {\r\n if (item == null) {\r\n return null;\r\n } else {\r\n return item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico();\r\n }\r\n }\r\n\r\n @Override\r\n public Usuario fromString(String string) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }\r\n });\r\n }",
"public void rellena_jcombobox_articulos()\r\n\t{\r\n\t\tresultset1 = base_datos.obtener_objetos(\"SELECT descripcionArticulo FROM articulos ORDER BY 1;\");\t\r\n\r\n\t\ttry //USAMOS UN WHILE PARA RELLENAR EL JCOMBOX CON LOS RESULTADOS DEL RESULSET\r\n\t\t{\r\n\t\t\twhile(resultset1.next())\r\n\t\t\t{\r\n\t\t\t\tcomboArticulo.addItem(resultset1.getString(\"descripcionArticulo\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void widgetSelected(SelectionEvent e) {\n\t\tdoctorcombo.removeAll();\n\t\tint i = subject.getSelectionIndex();\n\t\t if(i == 0){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(0));\n\t\t\t\tfor (int k = 0; k < j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(0),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t else if(i == 1){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(1));\n\t\t\t\tfor (int k = 0; k < j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(1),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t else if(i == 2){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(2));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(2),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\n\t\t\t}\n\t\t else if(i == 3){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(3));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(3),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\n\t\t\t}\n\t\t else if(i == 4){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(4));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(4),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}",
"public void mostrarCategoria(JComboBox<Categoria>jComboBoxCategoria){\n \n try{\n con = ConexionBD.getConexion();\n String sql=\"SELECT * FROM categorias WHERE id_estado = 1 ORDER BY id_categoria\";\n sent = con.createStatement();\n ResultSet rs = sent.executeQuery(sql);\n \n \n while (rs.next()){\n jComboBoxCategoria.addItem(\n new Categoria (\n rs.getString(\"id_categoria\"), \n rs.getString(\"nombre_categoria\")\n )\n );\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(null,\"error\");\n \n \n \n }\n \n }",
"public List<Ejercicio> getListaEjercicio()\r\n/* 155: */ {\r\n/* 156:202 */ if (this.listaEjercicio == null) {\r\n/* 157:203 */ this.listaEjercicio = this.servicioEjercicio.obtenerListaCombo(\"nombre\", true, null);\r\n/* 158: */ }\r\n/* 159:205 */ return this.listaEjercicio;\r\n/* 160: */ }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n bindingGroup = new org.jdesktop.beansbinding.BindingGroup();\n\n listaDeServico = new ArrayList<ServicoDoSistema>();\n jPanel1 = new javax.swing.JPanel();\n btNovo = new javax.swing.JButton();\n btSalvar = new javax.swing.JButton();\n btRemover = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n txtPesquisa = new javax.swing.JTextField();\n btPesquisar = new javax.swing.JButton();\n jPanel3 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n txtCodigo = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n txtNome = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n txtDescricao = new javax.swing.JTextArea();\n jLabel4 = new javax.swing.JLabel();\n cbStatus = new javax.swing.JComboBox<>();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblLista = new javax.swing.JTable();\n\n listaDeServico = ObservableCollections.observableList(listaDeServico);\n\n setClosable(true);\n setTitle(\"Cadastro de serviços do sistema\");\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Controles\"));\n\n btNovo.setText(\"Novo\");\n\n org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement==null}\"), btNovo, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\n bindingGroup.addBinding(binding);\n\n btNovo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btNovoActionPerformed(evt);\n }\n });\n\n btSalvar.setText(\"Salvar\");\n btSalvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btSalvarActionPerformed(evt);\n }\n });\n\n btRemover.setText(\"Remover\");\n\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement!=null}\"), btRemover, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\n bindingGroup.addBinding(binding);\n\n btRemover.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btRemoverActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(btNovo, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btSalvar, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btRemover, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btNovo)\n .addComponent(btSalvar)\n .addComponent(btRemover))\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Pesquisa\"));\n\n txtPesquisa.setToolTipText(\"\");\n\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement==null}\"), txtPesquisa, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\n bindingGroup.addBinding(binding);\n\n txtPesquisa.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n txtPesquisaKeyReleased(evt);\n }\n });\n\n btPesquisar.setText(\"pesquisar\");\n\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement==null}\"), btPesquisar, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\n bindingGroup.addBinding(binding);\n\n btPesquisar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btPesquisarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(txtPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, 364, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btPesquisar, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(152, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btPesquisar))\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Formulário\"));\n\n jLabel1.setText(\"Código\");\n\n txtCodigo.setEditable(false);\n\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement.codigo}\"), txtCodigo, org.jdesktop.beansbinding.BeanProperty.create(\"text\"));\n bindingGroup.addBinding(binding);\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement!=null}\"), txtCodigo, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\n bindingGroup.addBinding(binding);\n\n jLabel2.setText(\"Nome\");\n\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement.nome}\"), txtNome, org.jdesktop.beansbinding.BeanProperty.create(\"text\"));\n bindingGroup.addBinding(binding);\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement!=null}\"), txtNome, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\n bindingGroup.addBinding(binding);\n\n jLabel3.setText(\"Descrição\");\n\n txtDescricao.setColumns(20);\n txtDescricao.setRows(5);\n\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement.descricao}\"), txtDescricao, org.jdesktop.beansbinding.BeanProperty.create(\"text\"));\n bindingGroup.addBinding(binding);\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement!=null}\"), txtDescricao, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\n bindingGroup.addBinding(binding);\n\n jScrollPane2.setViewportView(txtDescricao);\n\n jLabel4.setText(\"Status\");\n\n cbStatus.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Inativo\", \"Ativo\" }));\n\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement.status}\"), cbStatus, org.jdesktop.beansbinding.BeanProperty.create(\"selectedItem\"));\n bindingGroup.addBinding(binding);\n binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, tblLista, org.jdesktop.beansbinding.ELProperty.create(\"${selectedElement!=null}\"), cbStatus, org.jdesktop.beansbinding.BeanProperty.create(\"enabled\"));\n bindingGroup.addBinding(binding);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(112, 112, 112)\n .addComponent(jLabel2))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(txtCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(cbStatus, 0, 256, Short.MAX_VALUE))))\n .addContainerGap())\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cbStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0))\n );\n\n jScrollPane1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Lista\"));\n\n org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listaDeServico, tblLista);\n org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${codigo}\"));\n columnBinding.setColumnName(\"Codigo\");\n columnBinding.setColumnClass(Integer.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${descricao}\"));\n columnBinding.setColumnName(\"Descricao\");\n columnBinding.setColumnClass(String.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${nome}\"));\n columnBinding.setColumnName(\"Nome\");\n columnBinding.setColumnClass(String.class);\n columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create(\"${status}\"));\n columnBinding.setColumnName(\"Status\");\n columnBinding.setColumnClass(String.class);\n bindingGroup.addBinding(jTableBinding);\n jTableBinding.bind();\n jScrollPane1.setViewportView(tblLista);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n bindingGroup.bind();\n\n pack();\n }",
"public pansiyon() {\n initComponents();\n for (int i =1900; i <2025; i++) {\n \n cmbkayıtyılı.addItem(Integer.toString(i));\n \n }\n for (int i =1900; i <2025; i++) {\n \n cmbayrılısyılı.addItem(Integer.toString(i));\n \n }\n }",
"private void chegada() {\n Pessoa pessoa = tablePessoa.getSelectionModel().getSelectedItem();\n if(pessoa==null){\n pessoa=tablePessoa.getItems().get(0);\n \n }\n// if(pessoa!=null){\n Chegada chegada = new Chegada(\n pessoa.getRg(),\n pessoa.getNome(),\n pessoa.getSegundoNome(),\n pessoa.getTelefone(),\n pessoa.getSexo(),\n HoraChegada,\n pessoa.getData()\n \n );\n \n// }\n mainApp.getPersonData2().add(chegada);\n \n }",
"public void escolherequipa ()\n {\n if (idec != -1 && idev !=-1 && idec != idev)\n {\n ArrayList<String> equipaanotar = new ArrayList<String>();\n equipaanotar.add(nomeequipas.get(idec));\n equipaanotar.add(nomeequipas.get(idev));\n ddes.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, equipaanotar));\n }\n }",
"public void addItemsCitas(){\n cmbPacientes.removeAllItems();\n cmbPacientes.addItem(\"Seleccione una opcion\");\n cmbPacientes.addItem(\"Paciente\");\n cmbPacientes.addItem(\"Doctor\");\n cmbPacientes.addItem(\"Mostrar todo\");\n }",
"private ArrayList<Tarea> getTareas(Date desde, Date hasta) {\n BDConsulter consulter = new BDConsulter(DATABASE_URL, DATABASE_USER, DATABASE_PASS);//genero la clase, que se conecta a la base postgresql\n consulter.connect();//establezco la conexion\n\n //Si no hay ningun integrante seleccionado, selecciono todos\n List<String> integrantesSeleccionados = jListIntegrantes.getSelectedValuesList();\n DefaultListModel<String> model = (DefaultListModel<String>) jListIntegrantes.getModel();\n List<String> integrantes = new ArrayList<String>();\n if (integrantesSeleccionados.size() == 0) {\n for (int i = 0; i < model.getSize(); i++) {\n System.out.println((model.getElementAt(i)));\n integrantes.add(model.getElementAt(i));\n }\n integrantesSeleccionados = integrantes;\n }\n\n ArrayList<Tarea> tareas = new ArrayList<>();\n for (String s : integrantesSeleccionados) {\n tareas.addAll(consulter.getTareas(desde, hasta, (String) jComboBoxProyecto.getSelectedItem(), (String) jComboBoxGrupos.getSelectedItem(), s));//obtengo las tareas creadas entre un rango de fecha dado\n }\n consulter.disconnect();//termino la conexion con la base//termino la conexion con la base\n return tareas;\n }",
"@Override\r\n\tpublic List<EstadoDTO> listaEstados() throws Exception {\n\t\treturn objDAO.listaEstados();\r\n\t}",
"public ConsultaListaTitular(FacturacionPrincipal principal, int estado) {\n\t\tsuper(MensajesVentanas.ventanaActiva);\n\t\tthis.principal = principal;\n\t\tthis.estado = estado;\n\t\tinitialize();\n\t\tCalendar fechaActual = Calendar.getInstance();\n\t\tCalendar fechaEvento = Calendar.getInstance();\n\t\tfechaEvento.setTimeInMillis(CR.meServ.getListaRegalos().getFechaEvento().getTime()+(24*60*60*1000));\n\t\tif(fechaActual.after(fechaEvento)){\n\t\t\tgetJButton4().setEnabled(false);\n\t\t\tgetJButton8().setEnabled(false);\n\t\t} else\n\t\t\tgetJButton7().setEnabled(false);\n\t\tgetJButton1().setEnabled(false);\n\t\tgetJButton2().setEnabled(false);\n\t\tgetJButton5().setEnabled(false);\n\t\tthis.repintarPantalla();\n\t\tagregarListeners();\n\t}",
"public configPro1() {\n initComponents();\n \n cboPai.addItem(\"Ecuador\");\n cboPai.addItem(\"Colombia\");\n cboPai.addItem(\"Argentina\");\n \n \n \n cboPai.setSelectedItem(ProperPais());\n cboCiu.setSelectedItem(ProperCiudad());\n \n switch (ProperEstadoCivil())\n {\n case \"Casado\":\n rbCas.setSelected(true);\n break;\n case \"Divorciado\":\n rbDiv.setSelected(true);\n break;\n case \"Soltero\":\n rbSolt.setSelected(true);\n break;\n case \"Viudo\":\n rbViu.setSelected(true);\n break;\n }\n \n\n \n }",
"public List<SelectItem>getListaCiudadOrigen(){\r\n\t\tList<SelectItem>selectItems= new ArrayList<SelectItem>();\r\n\t\tList<Ciudad>ciudades= ciudadEJB.listarCiudad();\r\n\t\tselectItems.add(new SelectItem(0,\"Seleccione una ciudad\"));\r\n\t\tfor (int i = 0; i < ciudades.size(); i++) {\r\n\t\t\t\r\n\t\t\tSelectItem se = new SelectItem(ciudades.get(i).getId(), ciudades.get(i).getNombre());\r\n\t\t\t\r\n\t\t\tselectItems.add(se);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn selectItems;\r\n\t\t\r\n\t}",
"public Locar() {\n \n initComponents();\n \n \n comboCliente.addItem(\"\");\n comboVeiculo.addItem(\"\");\n \n for (int i=0; i < LocadoraDados.getClientes().size(); i++) { \n comboCliente.addItem(LocadoraDados.getClientes().get(i).getNome()+ \" | \" + String.valueOf(LocadoraDados.getClientes().get(i).getID())); \n \n }\n \n for (int i=0; i < LocadoraDados.getVeiculos().size(); i++) { \n comboVeiculo.addItem(LocadoraDados.getVeiculos().get(i).getDescricao()+ \" | \" + String.valueOf(LocadoraDados.getVeiculos().get(i).getCodigoAuto())); \n \n }\n telaVeiculos = new Veiculos(-1);\n telaVeiculos.setVisible(false);\n \n listarLocacoes = new ListarLocacoes();\n listarLocacoes.setVisible(false);\n \n \n \n \n }",
"private void povoarSpinners() {\n List<String> lista = new ArrayList<>();\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[1]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[2]);\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnNivel.setAdapter(arrayAdapter);\n lista = new ArrayList<>();\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[1]);\n arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnEstado.setAdapter(arrayAdapter);\n }",
"private void establecerMenu(ArrayList<PlatilloMenu> lMenu) {\n Object[] columnas = {\"Platillo\", \"Reservados\", \"Para vender\"};\n Object[][] modelo = new Object[lMenu.size()][3];\n int x = 0;\n DefaultComboBoxModel modeloLista;\n ArrayList<Platillo> listaPlatilllos = new ArrayList<>();\n for (PlatilloMenu platilloMenu : lMenu) {\n int paraVender = platilloMenu.getCantidad();\n int reservados = platilloMenu.getReservados();\n // Si el platillo del menu aún se puede vender\n if (paraVender > 0 || reservados > 0) {\n // Se agrega el platillo a la lista de platillos\n listaPlatilllos.add(platilloMenu.getPlatillo());\n }\n modelo[x][0] = platilloMenu.getPlatillo().getNombre();\n modelo[x][1] = reservados;\n modelo[x][2] = paraVender;\n x++;\n }\n // Se establece el modelo en la tabla con los datos\n tablaMenu.setDefaultEditor(Object.class, null);\n tablaMenu.setModel(new DefaultTableModel(modelo, columnas));\n tablaMenu.setCellSelectionEnabled(false);\n tablaMenu.setRowSelectionAllowed(false);\n Object[] arregloPlatillos;\n // Si hay platillos que se puedan vender\n if (listaPlatilllos.size() > 0) {\n // Se guardan en el arreglo\n arregloPlatillos = listaPlatilllos.toArray();\n modeloLista = new DefaultComboBoxModel(arregloPlatillos);\n comboPlatillos.setModel(modeloLista);\n // Si es horario de comidas\n if (this.categoría.equals(\"COMIDA\")) {\n // Consulta la sopa del día\n this.sopaDelDia = Control.menu.consultarSopaDia(diaSemana);\n // si hay una sopa establecida en el menú\n if (sopaDelDia != null) {\n // Se habilita el checkbox y se establece el nombre\n checkBoxSopa.setEnabled(true);\n checkBoxSopa.setText(sopaDelDia.getNombre());\n } else {\n checkBoxSopa.setEnabled(false);\n checkBoxSopa.setText(\"SOPA NO ESTABLECIDA\");\n }\n } else {\n checkBoxSopa.setEnabled(false);\n }\n \n }//Si no\n else {\n \n // Se guarda un solo valor indicando el resultado de la búsqueda\n arregloPlatillos = new Object[1];\n arregloPlatillos[0] = \"-------SIN PLATILLOS DISPONIBLES------\";\n modeloLista = new DefaultComboBoxModel(arregloPlatillos);\n comboPlatillos.setModel(modeloLista);\n // Se desactivan todos los componentes\n //desactivarComponentes(this);\n }\n }",
"private void iniciaComponets() {\n String[] arr = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.SHORT);\n for (int i = 0; i < arr.length; i++) {\n JCheckBox name = (JCheckBox) jPanelSemanal.getComponent(i);\n name.setText(arr[i]);\n }\n // el panel mensual\n // pongo los numeros de los dias de la semana (primerom, segundo...)\n jComboBoxNumDiaSem.removeAllItems();\n for (NumDiaDeSemana dia : NumDiaDeSemana.values()) {\n jComboBoxNumDiaSem.addItem(dia);\n }\n jComboBoxDiaSem.removeAllItems();\n String[] arr1 = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.LONG);\n for (String i : arr1) {\n jComboBoxDiaSem.addItem(i);\n }\n //panel anual\n jComboBoxAnualNumDia.removeAllItems();\n for (NumDiaDeSemana dia : NumDiaDeSemana.values()) {\n jComboBoxAnualNumDia.addItem(dia);\n }\n // pongo los dias de la semana en los JCheckBox\n jComboBoxAnualDiaSem.removeAllItems();\n arr1 = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.LONG);\n for (String i : arr1) {\n jComboBoxAnualDiaSem.addItem(i);\n }\n\n }",
"private void loadlec() {\n try {\n\n ResultSet rs = DBConnection.search(\"select * from lecturers\");\n Vector vv = new Vector();\n//vv.add(\"\");\n while (rs.next()) {\n\n// vv.add(rs.getString(\"yearAndSemester\"));\n String gette = rs.getString(\"lecturerName\");\n\n vv.add(gette);\n\n }\n //\n jComboBox1.setModel(new DefaultComboBoxModel<>(vv));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public JComboBox getJComboBoxProvincia()\r\n {\r\n \tif (jComboBoxProvincia == null) {\r\n\t\t\tEdicionOperations oper = new EdicionOperations();\r\n\t\t\tArrayList<Provincia> listaProvincias = oper.obtenerProvinciasConNombre();\r\n\t\t\tjComboBoxProvincia = new JComboBox(listaProvincias.toArray());\r\n\t\t\tjComboBoxProvincia\r\n\t\t\t\t\t.setSelectedIndex(this\r\n\t\t\t\t\t\t\t.provinciaIndexSeleccionar(ConstantesLocalGISEIEL.idProvincia));\r\n\t\t\tjComboBoxProvincia.setRenderer(new UbicacionListCellRenderer());\r\n\t\t\tjComboBoxProvincia.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tif (getJComboBoxMunicipio() != null) {\r\n\t\t\t\t\t\tif (jComboBoxProvincia.getSelectedIndex() == 0) {\r\n\t\t\t\t\t\t\tjComboBoxMunicipio.removeAllItems();\r\n\t\t\t\t\t\t\tMunicipio municipio = new Municipio();\r\n\t\t\t\t\t\t\tmunicipio.setIdIne(\"\");\r\n\t\t\t\t\t\t\tmunicipio.setNombreOficial(\"\");\r\n\t\t\t\t\t\t\tjComboBoxMunicipio.addItem(municipio);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tEdicionOperations oper = new EdicionOperations();\r\n\t\t\t\t\t\t\tjComboBoxProvincia\r\n\t\t\t\t\t\t\t\t\t.setSelectedIndex(provinciaIndexSeleccionar(ConstantesLocalGISEIEL.idProvincia));\r\n\r\n\t\t\t\t\t\t\tif (jComboBoxProvincia.getSelectedItem() != null) {\r\n\t\t\t\t\t\t\t\tEdicionUtils.cargarLista(\r\n\t\t\t\t\t\t\t\t\t\tgetJComboBoxMunicipio(),\r\n\t\t\t\t\t\t\t\t\t\toper.obtenerTodosMunicipios(((Provincia) jComboBoxProvincia\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getSelectedItem())\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getIdProvincia()));\r\n\t\t\t\t\t\t\t\tjComboBoxMunicipio\r\n\t\t\t\t\t\t\t\t\t\t.setSelectedIndex(municipioIndexSeleccionar(ConstantesLocalGISEIEL.idMunicipio));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\r\n\t\treturn jComboBoxProvincia;\r\n }",
"@Override\n\t\t\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t\t\tint selectedIndex = methodsList.getSelectedIndex();\n\t\t\t\t\n\t\t\t\tif (selectedIndex == -1) {\n\t\t\t\t\t// Si es -1, es porque no hay nada seleccionado\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// En este caso ya sabemos que hay algo que esta \n\t\t\t\t// seleccionado, de modo que podemos obtener el metodo seleccionado!\n\t\t\t\tMethod selectedMethod = methodFinder.getMethods().get(selectedIndex);\n\t\t\t\t\n\t\t\t\tservicios = new ArrayList<CodeInspectionService>();\n\t\t\t\t\n\t\t\t\t// Agregamos todos los servicios que necesitamos para analizar el codigo.\n\t\t\t\t// Cada vez que el programa pase por una linea, la enviará\n\t\t\t\t// a todos los servicios que esten registrados.\n\t\t\t\t// Los servicios entonces van a procesar esa linea y van a registrar\n\t\t\t\t// los resultados en un objeto CodeMetric.\n\t\t\t\t\n\t\t\t\t// Con este servicio contamos las lineas de codigo.\n\t\t\t\tservicios.add(new CodeLinesNumberInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos las lineas comentadas\n\t\t\t\tservicios.add(new CommentedLinesInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos la complejidad ciclomatica\n\t\t\t\tservicios.add(new CyclomaticComplexityInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos Halstead (?) quizas esto tengamos que separarlo en \n\t\t\t\t// otros servicios mas pequeños, porque hay varias metricas de halstead\n\t\t\t\tservicios.add(new HalsteadInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos el Fan In del metodo seleccionado\n\t\t\t\t// Fan in es la cantidad de veces que ese metodo\n\t\t\t\t// es invocado desde afuera\n\t\t\t\tservicios.add(new FanInInspectionService(methodFinder.getMethods(), selectedMethod));\n\t\t\t\t\n\t\t\t\t// Contamos el Fan Out del metodo seleccionado\n\t\t\t\t// Fan out es la cantidad de veces que el metodo seleccionado\n\t\t\t\t// llama a otros metodos.\n\t\t\t\tservicios.add(new FanOutInspectionService(methodFinder.getMethods(), selectedMethod));\n\t\t\t\t\n\t\t\t\tIterator<String> methodLinesIterator = selectedMethod.getLines().iterator();\n\t\t\t\twhile(methodLinesIterator.hasNext()) {\n\t\t\t\t\tString line = methodLinesIterator.next();\n\t\t\t\t\tfor (CodeInspectionService servicio : servicios) {\n\t\t\t\t\t\tservicio.analyzeLine(line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tfor (CodeInspectionService servicio : servicios) {\n\t\t\t\t\tCodeMetric metrica = servicio.getMetric();\n\t\t\t\t\tsb.append(metrica.getName() + \": \" + metrica.getValue() + \"\\n\");\n\t\t\t\t}\n\t\t\t\teditorTextArea.setText(sb.toString());\n\t\t\t\t\n\t\t\t\t// Imprimimos el codigo en pantalla\n\t\t\t\t// para mostrar el metodo que estamos analizando.\n\t\t\t\tcodeTextArea.setText(selectedMethod.toString());\n\t\t\t\t\n\t\t\t}",
"public void BuscarGrupo() {\r\n try {\r\n // Inicializamos la tabla para refrescar todos los datos contenidos.\r\n InicializarTabla(_escuchador.session);\r\n Transaction tx = _escuchador.session.beginTransaction();\r\n List<Cursos> tabla=rsmodel.lista;\r\n List<Cursos> borrados = new <Cursos>ArrayList();\r\n if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Todos los campos\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getCodigo().toString().contains(menuCursos.campoCursosBuscar.getText().toLowerCase()) && !obj.getNombre().toLowerCase().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n else if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Código del curso\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getCodigo().toString().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n else if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Nombre del curso\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getNombre().toLowerCase().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n tabla.removeAll(borrados);\r\n tx.commit();\r\n if(tabla.isEmpty()){tabla.add(new Cursos(null));}\r\n rs=tabla;\r\n ControladorTabla registrosBuscados = new ControladorTabla(tabla);\r\n menuCursos.getTablaCursos().setModel(registrosBuscados);\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, e, \"Excepción\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"public void Loadata(){ // fill the choice box\n stats.removeAll(stats);\n String seller = \"Seller\";\n String customer = \"Customer\";\n stats.addAll(seller,customer);\n Status.getItems().addAll(stats);\n }",
"private void refreshList()\n\t\t{\n\t\tint cpt = 0;\n\t\tthis.combo.removeAllItems();\n\t\tthis.listPort = meteoPort.findListPortSerie();\n\t\tif (listPort.size() > 0)\n\t\t\t{\n\t\t\tfor(String string:listPort)\n\t\t\t\t{\n\t\t\t\tif (!meteoPort.isStationMeteoAvailable(string, 1000))\n\t\t\t\t\t{\n\t\t\t\t\tcombo.addItem(string);\n\t\t\t\t\tcpt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif (cpt > 0)\n\t\t\t\t{\n\t\t\t\tbuttonValider.setEnabled(true);\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tbuttonValider.setEnabled(false);\n\t\t\t}\n\t\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jTextField2 = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n jTextField4 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n comboEstado = new javax.swing.JComboBox<>();\n\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null, null, null, null, null},\n {null, null, null, null, null, null, null, null, null},\n {null, null, null, null, null, null, null, null, null},\n {null, null, null, null, null, null, null, null, null}\n },\n new String [] {\n \"Beneficio Humedo\", \"Responsable\", \"Capturista\", \"Domicilio\", \"Telefono\", \"Estado\", \"Municipio\", \"Localidad\", \"Sociedad\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false, false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jTable1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jTable1MouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(jTable1);\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Filtros\"));\n\n jLabel1.setText(\"Beneficio\");\n\n jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField1KeyReleased(evt);\n }\n });\n\n jTextField2.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField2KeyReleased(evt);\n }\n });\n\n jLabel2.setText(\"Responsable\");\n\n jLabel3.setText(\"Domicilio\");\n\n jTextField3.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField3KeyReleased(evt);\n }\n });\n\n jTextField4.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextField4KeyReleased(evt);\n }\n });\n\n jLabel4.setText(\"Sociedad\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(170, Short.MAX_VALUE))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n jButton2.setText(\"Exportar\");\n\n jButton3.setText(\"Nuevo\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jButton4.setText(\"Editar\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jButton5.setText(\"Desactivar\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n comboEstado.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n comboEstadoActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(comboEstado, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton5)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton3)\n .addComponent(jButton4)\n .addComponent(jButton5)\n .addComponent(comboEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n }",
"private void preenchePeriodo() {\n PeriodoDAO pDAO = new PeriodoDAO();\n for (int i = 0; i < pDAO.listar().size(); i++) {\n cbPeriodo.addItem(pDAO.listar().get(i).getDescricao());\n }\n }",
"private void carregaComboUfs() {\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Inhumas\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Goianira\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Goiânia\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"SP\", \"Campinas\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"SP\", \"São José dos Campos\"));\n\t\t\n\t\t\n\t\tfor (Municipio municipio : listaDeMunicipios) {\n\t\t\tif(!listaDeUfs.contains(municipio.getUf())) {\n\t\t\t\tlistaDeUfs.add(municipio.getUf());\n\t\t\t}\n\t\t}\n\t\t\n\t\tcmbUfs.addItem(\"--\");\n\t\tfor (String uf : listaDeUfs) {\n\t\t\tcmbUfs.addItem(uf);\n\t\t}\n\t}",
"public CadastroCarroView() {\n initComponents();\n ReadTable();\n MarcaVeiculoDao marca = new MarcaVeiculoDao();\n ModeloVeiculoDao modelo = new ModeloVeiculoDao();\n StatusDao status = new StatusDao();\n //Função abaixo Carrega o jCombox Marca.\n for(MarcaVeiculoBeans marcab : marca.ReadMarca()){\n \n jComboMarca.addItem(marcab);\n \n \n }\n //Função abaixo carrega o jCombox Modelos.\n for(ModeloVeiculoBeans modelob : modelo.Read()){\n jComboModelo.addItem(modelob);\n }\n \n for(StatusBeans sts : status.ReadStatus() ){\n jComboStatusID.addItem(sts);\n }\n }",
"private void CBFakture() {\n try {\n cmbFakture.removeAllItems();\n List<Faktura> fakture = Controller.getInstance().vratiFaktureView();\n for (Faktura fak : fakture) {\n cmbFakture.addItem(fak);\n }\n } catch (Exception ex) {\n Logger.getLogger(ProizvodUpdate.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n ClinicaFprojectPUEntityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(\"ClinicaFprojectPU\").createEntityManager();\n pacienteQuery = java.beans.Beans.isDesignTime() ? null : ClinicaFprojectPUEntityManager.createQuery(\"SELECT p FROM Paciente p\");\n pacienteList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : pacienteQuery.getResultList();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n setClosable(true);\n\n jButton1.setText(\"jButton1\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"jButton2\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(356, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addGap(34, 34, 34)\n .addComponent(jButton1)\n .addGap(155, 155, 155))\n .addGroup(layout.createSequentialGroup()\n .addGap(153, 153, 153)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(134, 134, 134)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 174, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(49, 49, 49))\n );\n\n pack();\n }",
"public ObservableList<Company> LoadCombo() {\n ObservableList<Company> _list = FXCollections.observableArrayList();\n _list.add(new Company(\"20428776110\", \"ICR PERU\"));\n _list.add(new Company(\"20555029277\", \"ICR INSTALACIONES\"));\n return _list;\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n campoFilme = new javax.swing.JComboBox<>();\n botaoCadastrar = new javax.swing.JButton();\n botaoExcluir = new javax.swing.JButton();\n jLabel7 = new javax.swing.JLabel();\n campoSala = new javax.swing.JComboBox<>();\n jSpinner1 = new javax.swing.JSpinner();\n jLabel6 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel1.setText(\"Cadastro de Sessao\");\n\n jLabel2.setText(\"Filme:\");\n\n jLabel5.setText(\"Sala: \");\n\n campoFilme.setModel(new javax.swing.DefaultComboBoxModel(SelectModel.selectFilmeAll().toArray()));\n campoFilme.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n campoFilmeActionPerformed(evt);\n }\n });\n\n botaoCadastrar.setText(\"Cadastrar\");\n botaoCadastrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botaoCadastrarActionPerformed(evt);\n }\n });\n\n botaoExcluir.setText(\"Cancelar\");\n botaoExcluir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n botaoExcluirActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Horário:\");\n\n campoSala.setModel(new javax.swing.DefaultComboBoxModel(SelectModel.selectSalaAll().toArray()));\n campoSala.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n campoSalaActionPerformed(evt);\n }\n });\n\n jSpinner1.setModel(new SpinnerNumberModel(0, 0, 24, 1));\n\n jLabel6.setText(\"horas\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel5)\n .addComponent(jLabel7))\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(campoFilme, javax.swing.GroupLayout.PREFERRED_SIZE, 484, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel6))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(botaoCadastrar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(botaoExcluir))\n .addComponent(campoSala, javax.swing.GroupLayout.PREFERRED_SIZE, 484, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(layout.createSequentialGroup()\n .addGap(184, 184, 184)\n .addComponent(jLabel1)))\n .addContainerGap(34, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(campoFilme, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(campoSala, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(46, 46, 46)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(botaoCadastrar)\n .addComponent(botaoExcluir))\n .addContainerGap(50, Short.MAX_VALUE))\n );\n\n JComponent editor = jSpinner1.getEditor();\n ( (DefaultEditor)editor).getTextField().setFocusable( false ); // Converte para DefaultEditor e acessa o TextField\n\n pack();\n setLocationRelativeTo(null);\n }",
"public void isiPilihanDokter() {\n String[] list = new String[]{\"\"};\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(list));\n\n /*Mengambil data pilihan spesialis*/\n String nama = (String) pilihPoliTujuan.getSelectedItem();\n String kodeSpesialis = ss.serviceGetIDSpesialis(nama);\n\n /* Mencari dokter where id_spesialis = pilihSpesialis */\n tmd.setData(ds.serviceGetAllDokterByIdSpesialis(kodeSpesialis));\n int b = tmd.getRowCount();\n\n /* Menampilkan semua nama berdasrkan pilihan sebelumnya */\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(ds.serviceTampilNamaDokter(kodeSpesialis, b)));\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jbloco = new javax.swing.JComboBox();\n japartamento = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Condomínio-SJ2\");\n\n jbloco.setForeground(new java.awt.Color(153, 0, 153));\n jbloco.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"BLOCO A\", \"BLOCO B\", \"BLOCO C\", \"BLOCO D\", \"BLOCO F\", \"BLOCO G\", \"BLOCO H\", \"BLOCO I\", \"BLOCO J\", \"BLOCO K\", \" \", \" \" }));\n jbloco.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jblocoActionPerformed(evt);\n }\n });\n\n japartamento.setForeground(new java.awt.Color(204, 0, 204));\n japartamento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"APARTAMENTO 101\", \"APARTAMENTO 102\", \"APARTAMENTO 103\", \"APARTAMENTO 104\", \"APARTAMENTO 201\", \"APARTAMENTO 202\", \"APARTAMENTO 203\", \"APARTAMENTO 204\", \"APARTAMENTO 301\", \"APARTAMENTO 302\", \"APARTAMENTO 303\", \"APARTAMENTO 304\", \"APARTAMENTO 401\", \"APARTAMENTO 402\", \"APARTAMENTO 403\", \"APARTAMENTO 404\", \" \", \" \" }));\n\n jButton1.setText(\"Pesquisar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Verificar possibilidade de agendamento :\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 431, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jbloco, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(88, 88, 88)\n .addComponent(japartamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(97, 97, 97)\n .addComponent(jButton1)))\n .addContainerGap(54, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(46, 46, 46)\n .addComponent(jLabel1)\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jbloco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(japartamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addContainerGap(230, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }",
"public CadastroDentista() {\n initComponents();\n con_dent = new ConectaBanco();\n con_dent.OpenDB();\n con_dent.QuerySQL(\"SELECT * FROM dentistas\");\n\n try{\n con_dent.rs.first();\n txtCodigo.setText(con_dent.rs.getString(\"cod_dentista\"));\n txtNome.setText(con_dent.rs.getString(\"nome_dent\"));\n txtRG.setText(con_dent.rs.getString(\"rg_dent\"));\n txtCPF.setText(con_dent.rs.getString(\"cpf_dent\"));\n txtCRO.setText(con_dent.rs.getString(\"cro_dent\"));\n txtNasc.setText(con_dent.rs.getString(\"dtnasc_dent\"));\n cbSexo.setSelectedItem(con_dent.rs.getString(\"sexo_dent\"));\n txtRua.setText(con_dent.rs.getString(\"endereco_dent\"));\n txtNumero.setText(con_dent.rs.getString(\"numero_dent\"));\n txtCidade.setText(con_dent.rs.getString(\"cidade_dent\"));\n txtEstado.setText(con_dent.rs.getString(\"estado_dent\"));\n txtTel.setText(con_dent.rs.getString(\"telefone_dent\"));\n txtCel.setText(con_dent.rs.getString(\"celular_dent\"));\n } \n catch(SQLException erroSQL){\n JOptionPane.showMessageDialog(null,\"Nenhum dentista cadastrado\");\n }\n }",
"private void pesquisaTipoAnimal() throws SQLException {\n\n conexao conexao = new conexao();\n conexao.getConexao();\n String selectSQL = \"SELECT * FROM tipoAnimal A \";\n\n Statement pstmtCon;\n pstmtCon = conexao.getConexao().createStatement();\n\n ResultSet rs = pstmtCon.executeQuery(selectSQL);\n\n pesquisa_ComboTipoAnimal.removeAllItems();\n pesquisa_ComboTipoAnimal.addItem(\"Selecionar\");\n\n while (rs.next()) {\n\n pesquisa_ComboTipoAnimal.addItem(rs.getString(\"descricao\"));\n\n }\n\n rs.close();\n pstmtCon.close();\n }",
"protected void filtrarEstCid() {\r\n\t\tif (cmbx_cidade.getSelectedItem() != \"\" && cmbx_estado.getSelectedItem() != \"\") {\r\n\t\t\tStringBuilder filtracomando = new StringBuilder();\r\n\r\n\t\t\tfiltracomando\r\n\t\t\t\t\t.append(comando + \" WHERE ESTADO = '\" + Estado.validar(cmbx_estado.getSelectedItem().toString())\r\n\t\t\t\t\t\t\t+ \"' AND CIDADE = '\" + cmbx_cidade.getSelectedItem().toString() + \"'\");\r\n\t\t\tlistacliente = tabelaCliente.mostraRelatorio(filtracomando.toString());\r\n\r\n\t\t\ttablecliente.setModel(tabelaCliente);\r\n\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Escolha a Cidade e o Estado que deseja Filtrar\");\r\n\t\t}\r\n\t}"
] | [
"0.7545824",
"0.73836637",
"0.7369149",
"0.7083712",
"0.69266",
"0.68924344",
"0.6892204",
"0.67629236",
"0.67565405",
"0.66982085",
"0.66821665",
"0.66028416",
"0.6565804",
"0.6546086",
"0.65169644",
"0.6506896",
"0.64904016",
"0.64022446",
"0.6385165",
"0.63660073",
"0.63604796",
"0.6356509",
"0.6348074",
"0.63441366",
"0.632424",
"0.63223004",
"0.6278187",
"0.62673455",
"0.6247755",
"0.62156993",
"0.6215132",
"0.61923665",
"0.6185866",
"0.616323",
"0.6162411",
"0.6153679",
"0.6153563",
"0.61330545",
"0.61175925",
"0.6110011",
"0.60713834",
"0.6066355",
"0.6064559",
"0.60334265",
"0.6025705",
"0.60205704",
"0.60090554",
"0.5994614",
"0.5982397",
"0.59737957",
"0.596749",
"0.5964924",
"0.5962342",
"0.59593415",
"0.5950155",
"0.5940323",
"0.5937202",
"0.59299034",
"0.5927003",
"0.5925905",
"0.59181446",
"0.59145695",
"0.5912749",
"0.5905926",
"0.58886707",
"0.5887375",
"0.5876916",
"0.58742976",
"0.5857659",
"0.5856071",
"0.58388186",
"0.5835117",
"0.5815851",
"0.5808712",
"0.5801527",
"0.58007663",
"0.57996124",
"0.5795249",
"0.57865113",
"0.57850933",
"0.5782099",
"0.57798076",
"0.5778642",
"0.5774478",
"0.5763183",
"0.5762831",
"0.576187",
"0.5756568",
"0.5756173",
"0.5753496",
"0.5744414",
"0.574343",
"0.5740936",
"0.5739647",
"0.5738964",
"0.5738788",
"0.57268536",
"0.57245934",
"0.5724306",
"0.5716438"
] | 0.66711825 | 11 |
Popula combo cidades de acordo com o estado selecionado | public List<SelectItem> getCidades() throws ClassNotFoundException, SQLException{
List<SelectItem> retorno = new LinkedList<SelectItem>();
if(flagEstadoSelecionado){
for(TB_CIDADES cidade : cidadeDAO.listarCidadesPorIdUF(estadoSelecionado.getID_UF()))
retorno.add(new SelectItem(cidade, cidade.getNOME_CIDADE()));
}else{
//Procura o primeiro estado cadastrado para lista as cidades apropriadas
int primeiroIdDosEstados = ufDAO.listarTodos().get(0).getID_UF();
for(TB_CIDADES cidade : cidadeDAO.listarCidadesPorIdUF(primeiroIdDosEstados))
retorno.add(new SelectItem(cidade, cidade.getNOME_CIDADE()));
}
return retorno;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void combo() {\n cargaCombo(combo_habitacion, \"SELECT hh.descripcion\\n\" +\n \"FROM huespedes h\\n\" +\n \"LEFT JOIN estadia_huespedes eh ON eh.huespedes_id = h.id\\n\" +\n \"LEFT JOIN estadia_habitaciones ehh ON eh.id_estadia = ehh.id_estadia\\n\" +\n \"LEFT JOIN estadia e ON e.id = ehh.id_estadia \\n\" +\n \"LEFT JOIN habitaciones hh ON hh.id = ehh.id_habitacion\\n\" +\n \"WHERE eh.huespedes_id = \"+idd+\" AND e.estado ='A'\\n\" +\n \"ORDER BY descripcion\\n\" +\n \"\",\"hh.descripcion\");\n cargaCombo(combo_empleado, \"SELECT CONCAT(p.nombre, ' ',p.apellido) FROM persona p\\n\" +\n \"RIGHT JOIN empleado e ON e.persona_id = p.id\", \"empleado\");\n cargaCombo(combo_producto, \"SELECT producto FROM productos order by producto\", \"producto\");\n }",
"public void iniciar_combo() {\n try {\n Connection cn = DriverManager.getConnection(mdi_Principal.BD, mdi_Principal.Usuario, mdi_Principal.Contraseña);\n PreparedStatement psttt = cn.prepareStatement(\"select nombre from proveedor \");\n ResultSet rss = psttt.executeQuery();\n\n cbox_proveedor.addItem(\"Seleccione una opción\");\n while (rss.next()) {\n cbox_proveedor.addItem(rss.getString(\"nombre\"));\n }\n \n PreparedStatement pstt = cn.prepareStatement(\"select nombre from sucursal \");\n ResultSet rs = pstt.executeQuery();\n\n \n cbox_sucursal.addItem(\"Seleccione una opción\");\n while (rs.next()) {\n cbox_sucursal.addItem(rs.getString(\"nombre\"));\n }\n \n PreparedStatement pstttt = cn.prepareStatement(\"select id_compraE from compra_encabezado \");\n ResultSet rsss = pstttt.executeQuery();\n\n \n cbox_compra.addItem(\"Seleccione una opción\");\n while (rsss.next()) {\n cbox_compra.addItem(rsss.getString(\"id_compraE\"));\n }\n \n PreparedStatement ps = cn.prepareStatement(\"select nombre_moneda from moneda \");\n ResultSet r = ps.executeQuery();\n\n \n cbox_moneda.addItem(\"Seleccione una opción\");\n while (r.next()) {\n cbox_moneda.addItem(r.getString(\"nombre_moneda\"));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }",
"public void datosCombobox() {\n listaColegios = new ColegioDaoImp().listar();\n for (Colegio colegio : listaColegios) {\n cbColegio.addItem(colegio.getNombre());\n }\n }",
"public void carrega_cidade() throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUF.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n \n ResultSet rs = preparador.executeQuery();\n cbCidade.removeAllItems();\n //passando valores do banco para o objeto result; \n try{ \n \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidade.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n Conexao.desConectar();\n \n }",
"private void comboMultivalores(HTMLSelectElement combo, String tabla, String defecto, boolean dejarBlanco) {\n/* 393 */ SisMultiValoresDAO ob = new SisMultiValoresDAO();\n/* 394 */ Collection<SisMultiValoresDTO> arr = ob.cargarTabla(tabla);\n/* 395 */ ob.close();\n/* 396 */ if (dejarBlanco) {\n/* 397 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 398 */ op.setValue(\"\");\n/* 399 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 400 */ combo.appendChild(op);\n/* */ } \n/* 402 */ Iterator<SisMultiValoresDTO> iterator = arr.iterator();\n/* 403 */ while (iterator.hasNext()) {\n/* 404 */ SisMultiValoresDTO reg = (SisMultiValoresDTO)iterator.next();\n/* 405 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 406 */ op.setValue(\"\" + reg.getCodigo());\n/* 407 */ op.appendChild(this.pagHTML.createTextNode(reg.getDescripcion()));\n/* 408 */ if (defecto.equals(reg.getCodigo())) {\n/* 409 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 410 */ escogida.setValue(\"on\");\n/* 411 */ op.setAttributeNode(escogida);\n/* */ } \n/* 413 */ combo.appendChild(op);\n/* */ } \n/* 415 */ arr.clear();\n/* */ }",
"private void carregaComboDentista() {\n CtrPessoa ctrD = new CtrPessoa();\n ArrayList<Pessoa> result = ctrD.getPessoa(\"\", new Dentista());\n\n ObservableList<Pessoa> dentistas = FXCollections.observableArrayList(result);\n\n if (!result.isEmpty()) {\n cbDentista.setItems(dentistas);\n cbDentista.setValue(cbDentista.getItems().get(0)); //inicializando comboBox\n }\n }",
"public void carregaCidadeSelecionada(String nome) throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list);\n \n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbCidadeEditar.setSelectedItem(nome);\n \n \n \n \n }",
"private void cargaComboBoxTipoGrano() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoGranoEntity p\");\n java.util.List<TipoGranoEntity> listaTipoGranoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoGranoEntity tipoGrano : listaTipoGranoEntity) {\n miVectorTipoLaboreo.add(tipoGrano.getTgrNombre());\n cbxSemillas.addItem(tipoGrano);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }",
"public void carregaEstadoSelecionado(String nome) throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUfEditar.addItem(list);\n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbUfEditar.setSelectedItem(nome);\n \n \n \n }",
"public void llenarComboSeccion() {\t\t\n\t\tString respuesta = negocio.llenarComboSeccion(\"\");\n\t\tSystem.out.println(respuesta);\t\t\n\t}",
"private void preencherComboEstados() {\n\t\tList<Estado> listEstado;\n\t\tObservableList<Estado> oListEstado;\n\t\tEstadosDAO estadosDao;\n\n\t\t//Instancia a DAO estados\n\t\testadosDao = new EstadosDAO();\n\n\t\t//Chama o metodo para listar todos os estados\n\t\tlistEstado = estadosDao.selecionar();\n\n\t\t//Verifica se a lista de estados está vazia\n\t\tif(listEstado.isEmpty()) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//Atribui a lista retornada ao observablearray\n\t\toListEstado = FXCollections.observableArrayList(listEstado);\n\n\t\t//Adiciona os itens no combobx\n\t\tcboEstado.setItems(oListEstado);\n\n\t\t//Seleciona o primeio item do combobox\n\t\tcboEstado.getSelectionModel().select(0);\n\t}",
"private void mostradados() {\r\n\t\tint in = 0;\r\n\r\n\t\tfor (Estado e : Estado.values()) {\r\n\t\t\tif (in == 0) {\r\n\t\t\t\tcmbx_estado.addItem(\"\");\r\n\t\t\t\tin = 1;\r\n\t\t\t}\r\n\t\t\tcmbx_estado.addItem(e.getNome());\r\n\t\t}\r\n\r\n\t\tfor (int x = 0; x < listacliente.size(); x++) {\r\n\t\t\tin = 0;\r\n\t\t\tif (x == 0) {\r\n\t\t\t\tcmbx_cidade.addItem(\"\");\r\n\t\t\t}\r\n\r\n\t\t\tfor (int y = 0; y < cmbx_cidade.getItemCount(); y++) {\r\n\t\t\t\tif (listacliente.get(x).getCidade().equals(cmbx_cidade.getItemAt(y).toString()))\r\n\t\t\t\t\tin++;\r\n\t\t\t\tif (in > 1)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (in < 1)\r\n\t\t\t\tcmbx_cidade.addItem(listacliente.get(x).getCidade());\r\n\t\t}\r\n\t}",
"private void comboCarrega() {\n\n try {\n con = BancoDeDados.getConexao();\n //cria a string para inserir no banco\n String query = \"SELECT * FROM servico\";\n\n PreparedStatement cmd;\n cmd = con.prepareStatement(query);\n ResultSet rs;\n\n rs = cmd.executeQuery();\n\n while (rs.next()) {\n JCservico.addItem(rs.getString(\"id\") + \"-\" + rs.getString(\"modalidade\"));\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro de SQL \" + ex.getMessage());\n }\n }",
"private void cargaComboBoxTipoLaboreo() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoLaboreoEntity p\");\n java.util.List<TipoLaboreoEntity> listaTipoLaboreoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoLaboreoEntity tipoLaboreo : listaTipoLaboreoEntity) {\n miVectorTipoLaboreo.add(tipoLaboreo.getTpoNombre());\n cboMomentos.addItem(tipoLaboreo);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }",
"public void carrega_estado() throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUF.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n \n \n Conexao.desConectar();\n }",
"public void listarIgrejaComboBox() {\n\n IgrejasDAO dao = new IgrejasDAO();\n List<Igrejas> lista = dao.listarIgrejas();\n cbIgrejas.removeAllItems();\n\n for (Igrejas c : lista) {\n cbIgrejas.addItem(c);\n }\n }",
"private void cargaComboTipoDocumento() {\n\t\tcomboTipoDoc = new JComboBox();\n\t\tfor (TipoDocumentoDTO tipoDocumentoDTO : tip) {\n\t\t\tcomboTipoDoc.addItem(tipoDocumentoDTO.getAbreviacion());\n\t\t}\n\n\t}",
"private void llenarCombo(HTMLSelectElement combo, String tabla, String codigo, String descripcion, String condicion, String defecto, boolean dejarBlanco) {\n/* 436 */ if (dejarBlanco) {\n/* 437 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 438 */ op.setValue(\"\");\n/* 439 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 440 */ combo.appendChild(op);\n/* */ } \n/* 442 */ TGeneralDAO rsTGen = new TGeneralDAO();\n/* 443 */ Collection<TGeneralDTO> arr = rsTGen.cargarTabla(tabla, codigo, descripcion, condicion);\n/* 444 */ rsTGen.close();\n/* 445 */ Iterator<TGeneralDTO> iterator = arr.iterator();\n/* 446 */ while (iterator.hasNext()) {\n/* 447 */ TGeneralDTO regGeneral = (TGeneralDTO)iterator.next();\n/* 448 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 449 */ op.setValue(\"\" + regGeneral.getCodigoS());\n/* 450 */ op.appendChild(this.pagHTML.createTextNode(regGeneral.getDescripcion()));\n/* 451 */ if (defecto != null && defecto.equals(regGeneral.getCodigoS())) {\n/* 452 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 453 */ escogida.setValue(\"on\");\n/* 454 */ op.setAttributeNode(escogida);\n/* */ } \n/* 456 */ combo.appendChild(op);\n/* */ } \n/* */ }",
"private void actualizarCombos(){\n Set<String> listaAños = serviciosCuenta.obtieneAños();\n for (String año : listaAños) {\n this.jcbSeleccionAñoIni.addItem(año);\n this.jcbSeleccionAñoFin.addItem(año);\n }\n \n String AñoIni = this.jcbSeleccionAñoIni.getSelectedItem().toString();\n String AñoFin = this.jcbSeleccionAñoFin.getSelectedItem().toString();\n \n this.jcbSeleccionMesIni.removeAllItems();\n this.jcbSeleccionInicio.removeAllItems();\n Set<String> listaMesesIni = serviciosCuenta.obtieneMeses(AñoIni);\n Set<String> listaMesesFin = serviciosCuenta.obtieneMeses(AñoFin);\n for (String mes : listaMesesIni) {\n this.jcbSeleccionMesIni.addItem(mes);\n }\n for (String mes : listaMesesFin) {\n this.jcbSeleccionMesFin.addItem(mes);\n }\n \n String MesIni = this.jcbSeleccionMesIni.getSelectedItem().toString();\n String MesFin = this.jcbSeleccionMesFin.getSelectedItem().toString();\n ArrayList<String> listaDiasIni = serviciosCuenta.obtieneDias(AñoIni, MesIni);\n ArrayList<String> listaDiasFin = serviciosCuenta.obtieneDias(AñoFin, MesFin);\n \n for (String dia : listaDiasIni) {\n this.jcbSeleccionInicio.addItem(dia);\n }\n for (String dia : listaDiasFin) {\n this.jcbSeleccionFin.addItem(dia);\n }\n this.jcbSeleccionFin.setSelectedIndex(this.jcbSeleccionFin.getItemCount() - 1);\n //System.out.println(\"Saliendo: private void actualizarCombos()\");\n }",
"private void actualizarComboboxCursos() {\n\t\tint curso;\n\n\t\tDefaultComboBoxModel dcbm = new DefaultComboBoxModel();\n\t\tdcbm.removeAllElements();\n\n\t\tLinkedHashSet<Integer> resultado = modelo.obtenerCursos();\n\t\tIterator it = resultado.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tcurso = (int) it.next();\n\n\t\t\tdcbm.addElement(curso);\n\t\t}\n\t\tjfad.cBCursos.setModel(dcbm);\n\t\tjfad.cBCursosMod.setModel(dcbm);\n\t\tSystem.out.println(dcbm.getSelectedItem());\n\t}",
"private void initCombobox() {\n comboConstructeur = new ComboBox<>();\n comboConstructeur.setLayoutX(100);\n comboConstructeur.setLayoutY(250);\n\n\n BDDManager2 bddManager2 = new BDDManager2();\n bddManager2.start(\"jdbc:mysql://localhost:3306/concession?characterEncoding=utf8\", \"root\", \"\");\n listeConstructeur = bddManager2.select(\"SELECT * FROM constructeur;\");\n bddManager2.stop();\n for (int i = 0; i < listeConstructeur.size(); i++) {\n comboConstructeur.getItems().addAll(listeConstructeur.get(i).get(1));\n\n\n }\n\n\n\n\n\n\n }",
"public void carregaCidadeModificada() throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n \n ResultSet rs = preparador.executeQuery();\n cbCidadeEditar.removeAllItems();\n //passando valores do banco para o objeto result; \n try{ \n \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n \n }",
"private void cargaLista() {\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Aclaracion\", \"Aclaracion\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revision\", \"Revision\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revocatoria\", \"Revocatoria\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Subsidiaria\", \"Subsidiaria\"));\n \n }",
"public void riempiProceduraComboBox(){\n Statement stmt;\n ResultSet rst;\n String query = \"SELECT P.schema, P.nomeProcedura FROM Procedura P\";\n \n proceduraComboBox.removeAllItems();\n try{\n stmt = Database.getDefaultConnection().createStatement();\n rst = stmt.executeQuery(query);\n \n while(rst.next()){\n //le Procedure nella comboBox saranno mostrate secondo il modello: nomeSchema.nomeProcedura\n //in quanto Procedure appartenenti a Schemi diversi possono avere lo stesso nome\n proceduraComboBox.addItem(rst.getString(1)+\".\"+rst.getString(2));\n }\n proceduraComboBox.setSelectedIndex(-1);\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n }",
"private void fillcbGrupo() {\n\t\tcbGrupoContable.setNullSelectionAllowed(false);\n\t\tcbGrupoContable.setInputPrompt(\"Seleccione Grupo Contable\");\n\t\tfor (GruposContablesModel grupo : grupoimpl.getalls()) {\n\t\t\tcbGrupoContable.addItem(grupo.getGRC_Grupo_Contable());\n\t\t\tcbGrupoContable.setItemCaption(grupo.getGRC_Grupo_Contable(), grupo.getGRC_Nombre_Grupo_Contable());\n\t\t}\n\t}",
"public void setComboBoxValues() {\n String sql = \"select iName from item where iActive=? order by iName asc\";\n \n cbo_iniName.removeAllItems();\n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,\"Yes\");\n rs = pst.executeQuery();\n \n while (rs.next()) {\n cbo_iniName.addItem(rs.getString(1));\n }\n \n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item list cannot be loaded\");\n }finally {\n try{\n rs.close();\n pst.close();\n \n }catch(Exception e) {}\n }\n }",
"private void llenarCombo() {\n cobOrdenar.removeAllItems();\n cobOrdenar.addItem(\"Fecha\");\n cobOrdenar.addItem(\"Nro Likes\");\n cobOrdenar.setSelectedIndex(-1); \n }",
"public configPro1() {\n initComponents();\n \n cboPai.addItem(\"Ecuador\");\n cboPai.addItem(\"Colombia\");\n cboPai.addItem(\"Argentina\");\n \n \n \n cboPai.setSelectedItem(ProperPais());\n cboCiu.setSelectedItem(ProperCiudad());\n \n switch (ProperEstadoCivil())\n {\n case \"Casado\":\n rbCas.setSelected(true);\n break;\n case \"Divorciado\":\n rbDiv.setSelected(true);\n break;\n case \"Soltero\":\n rbSolt.setSelected(true);\n break;\n case \"Viudo\":\n rbViu.setSelected(true);\n break;\n }\n \n\n \n }",
"private void CargarListaFincas() {\n listaFincas = controlgen.GetComboBox(\"SELECT '-1' AS ID, 'Seleccionar' AS DESCRIPCION\\n\" +\n \"UNION\\n\" +\n \"SELECT `id` AS ID, `descripcion` AS DESCRIPCION\\n\" +\n \"FROM `fincas`\\n\"+\n \"/*UNION \\n\"+\n \"SELECT 'ALL' AS ID, 'TODOS' AS DESCRIPCION*/\");\n \n Utilidades.LlenarComboBox(cbFinca, listaFincas, \"DESCRIPCION\");\n \n }",
"public void mostrarCategoria(JComboBox<Categoria>jComboBoxCategoria){\n \n try{\n con = ConexionBD.getConexion();\n String sql=\"SELECT * FROM categorias WHERE id_estado = 1 ORDER BY id_categoria\";\n sent = con.createStatement();\n ResultSet rs = sent.executeQuery(sql);\n \n \n while (rs.next()){\n jComboBoxCategoria.addItem(\n new Categoria (\n rs.getString(\"id_categoria\"), \n rs.getString(\"nombre_categoria\")\n )\n );\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(null,\"error\");\n \n \n \n }\n \n }",
"private void carregarComboMarca(){\r\n\t\tMarcaEquipamentoDAO marcaDAO = new MarcaEquipamentoDAO(FormEquipamento.this);\r\n\t\tlistaCombo = marcaDAO.listar() ;\r\n\t\tif (!listaCombo.isEmpty()){\r\n\t\t\tArrayAdapter<MarcaEquipamento> adaptador = new ArrayAdapter<MarcaEquipamento>(FormEquipamento.this , \r\n\t\t\t\t\tandroid.R.layout.simple_spinner_item, \r\n\t\t\t\t\tlistaCombo );\r\n\t\t\tadaptador.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n\t\t\tcomboMarca.setAdapter(adaptador);\r\n\t\t}\r\n\t}",
"public Usuarios() {\n try {\n initComponents();\n String c_est, c_mun, c_ciu, id1;\n this.setLocationRelativeTo(null);\n String[] datos = new String[2];\n a = new Archivos();\n lineas = new String[9];\n lineas = a.Leer();\n m = new ManejadorSQL(lineas[2], lineas[1], lineas[3], lineas[4], lineas[5], lineas[7], lineas[6]);\n m.setLineas(lineas);\n ResultSet b_esta = m.Select(\"tblsit_estado order by nb_estado\", \"id_estado,nb_estado\");//Seleccionamos los estados para el combo box\n while (b_esta.next()) {\n datos[0] = b_esta.getString(1);\n datos[1] = b_esta.getString(2);\n u_c_estado.addItem(datos[1]); // agregamos los estados\n //System.out.println(datos[0]);\n }\n DefaultComboBoxModel modeloCombo = new DefaultComboBoxModel();// TODO add your handling code here:\n modeloCombo.addElement(\"Seleccionar\");\n u_ciudad.setModel(modeloCombo);\n u_c_municipio.setModel(modeloCombo);\n \n } catch (Exception ex) {\n Logger.getLogger(Usuarios.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void popuniComboZaMesto() {\n try {\n jComboMesto.removeAllItems();\n List<MestoEntity> mesta = Controller.ucitajListuMesta();\n \n for (IDomainEntity mesto : mesta) {\n if(mesto instanceof MestoEntity)\n jComboMesto.addItem((MestoEntity) mesto);\n }\n } catch (Exception ex) {\n Logger.getLogger(FKupac.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void llenarComboGrado() {\t\n\t\tString respuesta = negocio.llenarComboGrado(\"\");\n\t\tSystem.out.println(respuesta);\t\n\t}",
"private void inicializarCombos() {\n\t\tlistaGrupoUsuario = GrupoUsuarioDAO.readTodos(this.mainApp.getConnection());\n\t\tfor (GrupoUsuario grupo : listaGrupoUsuario) {\n\t\t\tthis.observableListaGrupoUsuario.add(grupo.getNombre());\n\t\t}\n\t\tthis.comboGrupoUsuario.setItems(this.observableListaGrupoUsuario);\n\t\tnew AutoCompleteComboBoxListener(comboGrupoUsuario);\n\n\t\tObservableList<String> status = FXCollections.observableArrayList(\"Bloqueado\",\"Activo\",\"Baja\");\n\t\tthis.comboStatus.setItems(status);\n\t\tthis.comboEmpleados.setItems(FXCollections.observableArrayList(this.listaEmpleados));\n\t}",
"void hienThi() {\n LoaiVT.Open();\n ArrayList<LoaiVT> DSSP = LoaiVT.DSLOAIVT;\n VatTu PX = VatTu.getPX();\n \n try {\n txtMaVT.setText(PX.getMaVT());\n txtTenVT.setText(PX.getTenVT());\n txtDonVi.setText(PX.getDVT());\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n for(LoaiVT SP: DSSP){ \n cb.addElement(SP.getMaLoai());\n if(SP.getMaLoai().equals(PX.getMaLoai())){\n cb.setSelectedItem(SP.getMaLoai());\n }\n }\n cbMaloai.setModel(cb);\n } catch (Exception ex) {\n txtMaVT.setText(\"\");\n txtTenVT.setText(\"\");\n txtDonVi.setText(\"\");\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n cb.setSelectedItem(\"\");\n cbMaloai.setModel(cb);\n }\n \n \n }",
"public void combo(){\r\n // Define rendering of the list of values in ComboBox drop down. \r\n cbbMedicos.setCellFactory((comboBox) -> {\r\n return new ListCell<Usuario>() {\r\n @Override\r\n protected void updateItem(Usuario item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if (item == null || empty) {\r\n setText(null);\r\n } else {\r\n setText(item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico());\r\n }\r\n }\r\n };\r\n });\r\n\r\n // Define rendering of selected value shown in ComboBox.\r\n cbbMedicos.setConverter(new StringConverter<Usuario>() {\r\n @Override\r\n public String toString(Usuario item) {\r\n if (item == null) {\r\n return null;\r\n } else {\r\n return item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico();\r\n }\r\n }\r\n\r\n @Override\r\n public Usuario fromString(String string) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }\r\n });\r\n }",
"private void initComboBox() {\n jComboBox1.removeAllItems();\n listaDeInstrutores = instrutorDao.recuperarInstrutor();\n listaDeInstrutores.forEach((ex) -> {\n jComboBox1.addItem(ex.getNome());\n });\n }",
"public String extraerCombo(){\n String consulta=null,combo;\n \n combo=comboBuscar.getSelectedItem().toString();\n \n if(combo.equals(\"Buscar por No.Control:\")){\n consulta=\"noControl\";\n } \n if(combo.equals(\"Buscar por Nombre:\")){\n consulta=\"nombreCompleto\"; \n }\n if(combo.equals(\"Buscar por Carrera:\")){\n consulta=\"nombreCarrera\";\n }\n return consulta;\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n ClinicaFprojectPUEntityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(\"ClinicaFprojectPU\").createEntityManager();\n pacienteQuery = java.beans.Beans.isDesignTime() ? null : ClinicaFprojectPUEntityManager.createQuery(\"SELECT p FROM Paciente p\");\n pacienteList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : pacienteQuery.getResultList();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox<>();\n\n setClosable(true);\n\n jButton1.setText(\"jButton1\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"jButton2\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n jComboBox1.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jComboBox1ItemStateChanged(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(356, Short.MAX_VALUE)\n .addComponent(jButton2)\n .addGap(34, 34, 34)\n .addComponent(jButton1)\n .addGap(155, 155, 155))\n .addGroup(layout.createSequentialGroup()\n .addGap(153, 153, 153)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(134, 134, 134)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 174, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(49, 49, 49))\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jbloco = new javax.swing.JComboBox();\n japartamento = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Condomínio-SJ2\");\n\n jbloco.setForeground(new java.awt.Color(153, 0, 153));\n jbloco.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"BLOCO A\", \"BLOCO B\", \"BLOCO C\", \"BLOCO D\", \"BLOCO F\", \"BLOCO G\", \"BLOCO H\", \"BLOCO I\", \"BLOCO J\", \"BLOCO K\", \" \", \" \" }));\n jbloco.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jblocoActionPerformed(evt);\n }\n });\n\n japartamento.setForeground(new java.awt.Color(204, 0, 204));\n japartamento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"APARTAMENTO 101\", \"APARTAMENTO 102\", \"APARTAMENTO 103\", \"APARTAMENTO 104\", \"APARTAMENTO 201\", \"APARTAMENTO 202\", \"APARTAMENTO 203\", \"APARTAMENTO 204\", \"APARTAMENTO 301\", \"APARTAMENTO 302\", \"APARTAMENTO 303\", \"APARTAMENTO 304\", \"APARTAMENTO 401\", \"APARTAMENTO 402\", \"APARTAMENTO 403\", \"APARTAMENTO 404\", \" \", \" \" }));\n\n jButton1.setText(\"Pesquisar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Verificar possibilidade de agendamento :\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 431, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jbloco, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(88, 88, 88)\n .addComponent(japartamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(97, 97, 97)\n .addComponent(jButton1)))\n .addContainerGap(54, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(46, 46, 46)\n .addComponent(jLabel1)\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jbloco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(japartamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addContainerGap(230, Short.MAX_VALUE))\n );\n\n pack();\n setLocationRelativeTo(null);\n }",
"public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }",
"public FrmEjemploCombo() {\n initComponents();\n \n cargarAutos();\n }",
"private JComboBox<Cliente> crearComboClientes() {\n\n JComboBox<Cliente> combo = new JComboBox<>(new Vector<>(almacen.getClientes()));\n combo.setMaximumSize(new Dimension(500, 40));\n\n combo.setRenderer(new DefaultListCellRenderer() {\n @Override\n public Component getListCellRendererComponent(JList<? extends Object> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n\n Component resultado = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\n Cliente cliente = (Cliente) value;\n this.setText(cliente != null ? cliente.getNombre() : \"No existen clientes\");\n\n return resultado;\n }\n });\n\n return combo;\n }",
"public Carta() {\n initComponents();\n \n \n \n items[0] = \"Entradas\";\n items[1] = \"Fuertes\";\n items[2] = \"Postres\";\n comboCategorias.setModel(new javax.swing.DefaultComboBoxModel(items));\n comboCategoriasM.setModel(new javax.swing.DefaultComboBoxModel(items));\n\n }",
"private void iniciaTela() {\n try {\n tfCod.setText(String.valueOf(reservaCliDAO.getLastId()));\n desabilitaCampos(false);\n DefaultComboBoxModel modeloComboCliente;\n modeloComboCliente = new DefaultComboBoxModel(funDAO.getAll().toArray());\n cbFunc.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(quartoDAO.getAll().toArray());\n cbQuarto.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(cliDAO.getAll().toArray());\n cbCliente.setModel(modeloComboCliente);\n btSelect.setEnabled(false);\n verificaCampos();\n carregaTableReserva(reservaDAO.getAll());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }",
"public void llenarComboBox(){\n TipoMiembroComboBox.removeAllItems();\n TipoMiembroComboBox.addItem(\"Administrador\");\n TipoMiembroComboBox.addItem(\"Editor\");\n TipoMiembroComboBox.addItem(\"Invitado\");\n }",
"public InformeCobranzasView() {\n super();\n setLocationRelativeTo(this);\n initComponents();\n estadoInicial();\n\n estilosFecha();\n Utilidad.soloNumeros(txHasta);\n Utilidad.soloNumeros(txDesde);\n \n cbOpcion.setSelectedIndex(0);\n\n }",
"public void addItemsCitas(){\n cmbPacientes.removeAllItems();\n cmbPacientes.addItem(\"Seleccione una opcion\");\n cmbPacientes.addItem(\"Paciente\");\n cmbPacientes.addItem(\"Doctor\");\n cmbPacientes.addItem(\"Mostrar todo\");\n }",
"public JComboBox getJComboBoxProvincia()\r\n {\r\n \tif (jComboBoxProvincia == null) {\r\n\t\t\tEdicionOperations oper = new EdicionOperations();\r\n\t\t\tArrayList<Provincia> listaProvincias = oper.obtenerProvinciasConNombre();\r\n\t\t\tjComboBoxProvincia = new JComboBox(listaProvincias.toArray());\r\n\t\t\tjComboBoxProvincia\r\n\t\t\t\t\t.setSelectedIndex(this\r\n\t\t\t\t\t\t\t.provinciaIndexSeleccionar(ConstantesLocalGISEIEL.idProvincia));\r\n\t\t\tjComboBoxProvincia.setRenderer(new UbicacionListCellRenderer());\r\n\t\t\tjComboBoxProvincia.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tif (getJComboBoxMunicipio() != null) {\r\n\t\t\t\t\t\tif (jComboBoxProvincia.getSelectedIndex() == 0) {\r\n\t\t\t\t\t\t\tjComboBoxMunicipio.removeAllItems();\r\n\t\t\t\t\t\t\tMunicipio municipio = new Municipio();\r\n\t\t\t\t\t\t\tmunicipio.setIdIne(\"\");\r\n\t\t\t\t\t\t\tmunicipio.setNombreOficial(\"\");\r\n\t\t\t\t\t\t\tjComboBoxMunicipio.addItem(municipio);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tEdicionOperations oper = new EdicionOperations();\r\n\t\t\t\t\t\t\tjComboBoxProvincia\r\n\t\t\t\t\t\t\t\t\t.setSelectedIndex(provinciaIndexSeleccionar(ConstantesLocalGISEIEL.idProvincia));\r\n\r\n\t\t\t\t\t\t\tif (jComboBoxProvincia.getSelectedItem() != null) {\r\n\t\t\t\t\t\t\t\tEdicionUtils.cargarLista(\r\n\t\t\t\t\t\t\t\t\t\tgetJComboBoxMunicipio(),\r\n\t\t\t\t\t\t\t\t\t\toper.obtenerTodosMunicipios(((Provincia) jComboBoxProvincia\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getSelectedItem())\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getIdProvincia()));\r\n\t\t\t\t\t\t\t\tjComboBoxMunicipio\r\n\t\t\t\t\t\t\t\t\t\t.setSelectedIndex(municipioIndexSeleccionar(ConstantesLocalGISEIEL.idMunicipio));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\r\n\t\treturn jComboBoxProvincia;\r\n }",
"private JComboBox getJComboBoxEntidad()\r\n {\r\n \tif (jComboBoxEntidad == null)\r\n\t\t{\r\n\t\t\tjComboBoxEntidad = new JComboBox();\r\n//\t\t \tjComboBoxEntidad.setEditable(true);\r\n\t\t\tjComboBoxEntidad.setRenderer(new UbicacionListCellRenderer());\r\n\t\t\tjComboBoxEntidad.addActionListener(new ActionListener()\r\n\t\t\t{\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t\t{ \r\n\t\t\t\t\t\r\n\t\t\t\t\tif (jComboBoxEntidad.getSelectedIndex()==0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tjComboBoxNucleo.removeAllItems();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tEntidadesSingularesEIEL entidad = new EntidadesSingularesEIEL();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (jComboBoxProvincia.getSelectedItem() != null)\r\n\t\t\t\t\t\t\tentidad.setCodINEProvincia(((Provincia)jComboBoxProvincia.getSelectedItem()).getIdProvincia());\r\n\t\t\t\t\t\tif (jComboBoxMunicipio.getSelectedItem() != null && !jComboBoxMunicipio.getSelectedItem().equals(\"\"))\r\n\t\t\t\t\t\t\tentidad.setCodINEMunicipio(\r\n\t\t\t\t\t\t\t\t\t((Municipio)jComboBoxMunicipio.getSelectedItem()).getIdIne()\r\n\t\t \t\t\t\t\t\t);\r\n\t\t \tif (jComboBoxEntidad.getSelectedItem() != null && !jComboBoxEntidad.getSelectedItem().equals(\"\"))\r\n\t\t \t\tentidad.setCodINEEntidad(((EntidadesSingularesEIEL)jComboBoxEntidad.getSelectedItem()).getCodINEEntidad());\r\n\t\t\t\t\r\n\t\t \t\t\t\r\n\t\t \tif (entidad.getCodINEEntidad()!=null){\r\n\t\t \t\tEdicionOperations oper = new EdicionOperations();\r\n\t\t \t\tEdicionUtils.cargarLista(getJComboBoxNucleo(), \r\n\t\t \t\t\t\t\toper.obtenerNucleosConNombre(entidad));\r\n\t\t \t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jComboBoxEntidad;\r\n }",
"private void iniciaComponets() {\n String[] arr = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.SHORT);\n for (int i = 0; i < arr.length; i++) {\n JCheckBox name = (JCheckBox) jPanelSemanal.getComponent(i);\n name.setText(arr[i]);\n }\n // el panel mensual\n // pongo los numeros de los dias de la semana (primerom, segundo...)\n jComboBoxNumDiaSem.removeAllItems();\n for (NumDiaDeSemana dia : NumDiaDeSemana.values()) {\n jComboBoxNumDiaSem.addItem(dia);\n }\n jComboBoxDiaSem.removeAllItems();\n String[] arr1 = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.LONG);\n for (String i : arr1) {\n jComboBoxDiaSem.addItem(i);\n }\n //panel anual\n jComboBoxAnualNumDia.removeAllItems();\n for (NumDiaDeSemana dia : NumDiaDeSemana.values()) {\n jComboBoxAnualNumDia.addItem(dia);\n }\n // pongo los dias de la semana en los JCheckBox\n jComboBoxAnualDiaSem.removeAllItems();\n arr1 = man.getNamesCalendar(Calendar.DAY_OF_WEEK, Calendar.LONG);\n for (String i : arr1) {\n jComboBoxAnualDiaSem.addItem(i);\n }\n\n }",
"private void cargarCmbColores(){\n MapaColores.getMap().forEach((k,v)->cmbColores.getItems().add(k));\n cmbColores.getSelectionModel().selectFirst();\n }",
"public void llenarComboCategoria() {\n comboCategoria.removeAllItems();\n getIDCategoria();\n comboCategoria.setVisible(true);\n labelCategoria.setVisible(true);\n if (IDCategoria < 0) {\n comboCategoria.setVisible(false);\n comboCategoria.setEditable(false);\n labelCategoria.setVisible(false);\n this.repaint();\n } else {\n try {\n ResultSet resultado = buscador.getResultSet(\"select ID, valor from INSTANCIACATEGORIA where IDTIpoCategoria = \" + IDCategoria + \";\");\n while (resultado.next()) {\n String ID = resultado.getObject(\"ID\").toString();\n String valor = resultado.getObject(\"valor\").toString();\n comboCategoria.addItem(makeObj(valor, Integer.parseInt(ID)));\n }\n } catch (SQLException e) {\n System.out.println(\"*SQL Exception: *\" + e.toString());\n }\n }\n }",
"public void widgetSelected(SelectionEvent e) {\n\t\tdoctorcombo.removeAll();\n\t\tint i = subject.getSelectionIndex();\n\t\t if(i == 0){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(0));\n\t\t\t\tfor (int k = 0; k < j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(0),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t else if(i == 1){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(1));\n\t\t\t\tfor (int k = 0; k < j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(1),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t else if(i == 2){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(2));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(2),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\n\t\t\t}\n\t\t else if(i == 3){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(3));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(3),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\n\t\t\t}\n\t\t else if(i == 4){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(4));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(4),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}",
"public CadastroCarroView() {\n initComponents();\n ReadTable();\n MarcaVeiculoDao marca = new MarcaVeiculoDao();\n ModeloVeiculoDao modelo = new ModeloVeiculoDao();\n StatusDao status = new StatusDao();\n //Função abaixo Carrega o jCombox Marca.\n for(MarcaVeiculoBeans marcab : marca.ReadMarca()){\n \n jComboMarca.addItem(marcab);\n \n \n }\n //Função abaixo carrega o jCombox Modelos.\n for(ModeloVeiculoBeans modelob : modelo.Read()){\n jComboModelo.addItem(modelob);\n }\n \n for(StatusBeans sts : status.ReadStatus() ){\n jComboStatusID.addItem(sts);\n }\n }",
"public void construirSegundoSetDeDominiosReglaCompleja() {\n\n\t\tlabeltituloSeleccionDominios = new JLabel();\n\n\t\tcomboDominiosSet2ReglaCompleja = new JComboBox(dominio);// creamos el Segundo combo,y le pasamos un array de cadenas\n\t\tcomboDominiosSet2ReglaCompleja.setSelectedIndex(0);// por defecto quiero visualizar el Segundo item\n\t\titemscomboDominiosSet2ReglaCompleja = new JComboBox();// creamo el segundo combo, vacio\n\t\titemscomboDominiosSet2ReglaCompleja.setEnabled(false);// //por defecto que aparezca deshabilitado\n\n\t\tlabeltituloSeleccionDominios.setText(\"Seleccione el Segundo Dominio de regla compleja\");\n\t\tpanelDerecho.add(labeltituloSeleccionDominios);\n\t\tlabeltituloSeleccionDominios.setBounds(30, 30, 50, 20);\n\t\tpanelDerecho.add(comboDominiosSet2ReglaCompleja);\n\t\tcomboDominiosSet2ReglaCompleja.setBounds(100, 30, 150, 24);\n\t\tpanelDerecho.add(itemscomboDominiosSet2ReglaCompleja);\n\t\titemscomboDominiosSet2ReglaCompleja.setBounds(100, 70, 150, 24);\n\n\t\tpanelDerecho.setBounds(10, 50, 370, 110);\n\n\t\t/* Creamos el objeto controlador, para manejar los eventos */\n\t\tControlDemoCombo controlDemoCombo = new ControlDemoCombo(this);\n\t\tcomboDominiosSet2ReglaCompleja.addActionListener(controlDemoCombo);// agregamos escuchas\n\n\t}",
"public void construirCuartoSetDeDominiosReglaCompleja() {\n\n\t\tlabeltituloSeleccionDominios = new JLabel();\n\n\t\tcomboDominiosSet4ReglaCompleja = new JComboBox(dominio);// creamos el Cuarto combo,y le pasamos un array de cadenas\n\t\tcomboDominiosSet4ReglaCompleja.setSelectedIndex(0);// por defecto quiero visualizar el Cuarto item\n\t\titemscomboDominiosSet4ReglaCompleja = new JComboBox();// creamo el Cuarto combo, vacio\n\t\titemscomboDominiosSet4ReglaCompleja.setEnabled(false);// //por defecto que aparezca deshabilitado\n\n\t\tlabeltituloSeleccionDominios.setText(\"Seleccione el Cuarto Dominio de regla compleja\");\n\t\tpanelDerecho.add(labeltituloSeleccionDominios);\n\t\tlabeltituloSeleccionDominios.setBounds(30, 30, 50, 20);\n\t\tpanelDerecho.add(comboDominiosSet4ReglaCompleja);\n\t\tcomboDominiosSet4ReglaCompleja.setBounds(100, 30, 150, 24);\n\t\tpanelDerecho.add(itemscomboDominiosSet4ReglaCompleja);\n\t\titemscomboDominiosSet4ReglaCompleja.setBounds(100, 70, 150, 24);\n\n\t\tpanelDerecho.setBounds(10, 50, 370, 110);\n\n\t\t/* Creamos el objeto controlador, para manejar los eventos */\n\t\tControlDemoCombo controlDemoCombo = new ControlDemoCombo(this);\n\t\tcomboDominiosSet4ReglaCompleja.addActionListener(controlDemoCombo);// agregamos escuchas\n\n\t}",
"private void pesquisaTipoAnimal() throws SQLException {\n\n conexao conexao = new conexao();\n conexao.getConexao();\n String selectSQL = \"SELECT * FROM tipoAnimal A \";\n\n Statement pstmtCon;\n pstmtCon = conexao.getConexao().createStatement();\n\n ResultSet rs = pstmtCon.executeQuery(selectSQL);\n\n pesquisa_ComboTipoAnimal.removeAllItems();\n pesquisa_ComboTipoAnimal.addItem(\"Selecionar\");\n\n while (rs.next()) {\n\n pesquisa_ComboTipoAnimal.addItem(rs.getString(\"descricao\"));\n\n }\n\n rs.close();\n pstmtCon.close();\n }",
"public void seleccionarTipoComprobante() {\r\n if (com_tipo_comprobante.getValue() != null) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n } else {\r\n tab_tabla1.limpiar();\r\n tab_tabla2.limpiar();\r\n }\r\n tex_num_transaccion.setValue(null);\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales,tex_num_transaccion\");\r\n }",
"private JComboBox getColoda() {\n\t\tif (coloda == null) {\n\t\t\tcoloda = new JComboBox();\n\t\t\tcoloda.setModel(new DefaultComboBoxModel(new String [] {\"36\", \"52\"}));\n\t\t}\n\t\treturn coloda;\n\t}",
"@Transactional(readOnly = true)\n\tList<Acondicionador> getAcondicionadoresForCombobox();",
"public void construirPrimerSetDeDominiosReglaCompleja() {\n\n\t\tlabeltituloSeleccionDominios = new JLabel();\n\n\t\tcomboDominiosSet1ReglaCompleja = new JComboBox(dominio);// creamos el primer combo,y le pasamos un array de cadenas\n\t\tcomboDominiosSet1ReglaCompleja.setSelectedIndex(0);// por defecto quiero visualizar el primer item\n\t\titemscomboDominiosSet1ReglaCompleja = new JComboBox();// creamo el segundo combo, vacio\n\t\titemscomboDominiosSet1ReglaCompleja.setEnabled(false);// //por defecto que aparezca deshabilitado\n\n\t\tlabeltituloSeleccionDominios.setText(\"Seleccione el primer Dominio de regla compleja\");\n\t\tpanelCentral.add(labeltituloSeleccionDominios);\n\t\tlabeltituloSeleccionDominios.setBounds(30, 30, 50, 20);\n\t\tpanelCentral.add(comboDominiosSet1ReglaCompleja);\n\t\tcomboDominiosSet1ReglaCompleja.setBounds(100, 30, 150, 24);\n\t\tpanelCentral.add(itemscomboDominiosSet1ReglaCompleja);\n\t\titemscomboDominiosSet1ReglaCompleja.setBounds(100, 70, 150, 24);\n\n\t\tpanelCentral.setBounds(10, 50, 370, 110);\n\n\t\t/* Creamos el objeto controlador, para manejar los eventos */\n\t\tControlDemoCombo controlDemoCombo = new ControlDemoCombo(this);\n\t\tcomboDominiosSet1ReglaCompleja.addActionListener(controlDemoCombo);// agregamos escuchas\n\n\t}",
"private void cbOrdonariActionPerformed(java.awt.event.ActionEvent evt) { \n if (cbOrdonari.getSelectedIndex() == 0) {\n agenda.ordoneaza(Agenda.CriteriuOrdonare.DUPA_NUME);\n }\n if (cbOrdonari.getSelectedIndex() == 1) {\n agenda.ordoneaza(Agenda.CriteriuOrdonare.DUPA_PRENUME);\n }\n if (cbOrdonari.getSelectedIndex() == 2) {\n agenda.ordoneaza(Agenda.CriteriuOrdonare.DUPA_DATA_NASTERII);\n }\n if (cbOrdonari.getSelectedIndex() == 3) {\n agenda.ordoneaza(Agenda.CriteriuOrdonare.DUPA_NUMAR_TELEFON);\n }\n }",
"public void tampil_siswa(){\n try {\n Connection con = conek.GetConnection();\n Statement stt = con.createStatement();\n String sql = \"select id from nilai order by id asc\"; // disini saya menampilkan NIM, anda dapat menampilkan\n ResultSet res = stt.executeQuery(sql); // yang anda ingin kan\n \n while(res.next()){\n Object[] ob = new Object[6];\n ob[0] = res.getString(1);\n \n comboId.addItem(ob[0]); // fungsi ini bertugas menampung isi dari database\n }\n res.close(); stt.close();\n \n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }",
"public JComboBox getJComboBoxMunicipio()\r\n {\r\n \tif (jComboBoxMunicipio == null) {\r\n\t\t\tjComboBoxMunicipio = new JComboBox();\r\n\t\t\tjComboBoxMunicipio.setRenderer(new UbicacionListCellRenderer());\r\n\t\t\tjComboBoxMunicipio.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\t\tif (jComboBoxMunicipio.getSelectedIndex() != 0) {\r\n\t\t\t\t\t\tMunicipioEIEL municipio = new MunicipioEIEL();\r\n\t\t\t\t\t\tif (jComboBoxProvincia.getSelectedItem() != null) {\r\n\t\t\t\t\t\t\tmunicipio\r\n\t\t\t\t\t\t\t\t\t.setCodProvincia(((Provincia) jComboBoxProvincia\r\n\t\t\t\t\t\t\t\t\t\t\t.getSelectedItem())\r\n\t\t\t\t\t\t\t\t\t\t\t.getIdProvincia());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (jComboBoxMunicipio.getSelectedItem() != null) {\r\n\t\t\t\t\t\t\tmunicipio\r\n\t\t\t\t\t\t\t\t\t.setCodMunicipio(((Municipio) jComboBoxMunicipio\r\n\t\t\t\t\t\t\t\t\t\t\t.getSelectedItem()).getIdIne());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (municipio.getCodMunicipio()!=null){\r\n\t \t\t\tEdicionOperations oper = new EdicionOperations();\r\n\t \t\t\tEdicionUtils.cargarLista(getJComboBoxEntidad(), oper.obtenerEntidadesConNombre(municipio));\r\n//\t \t\t\tSystem.out.println(\"PASO1\");\r\n\t \t\t\t//EdicionUtils.cargarLista(jComboBoxNucleo, oper.obtenerNucleosConNombre(entidad)); \r\n \t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jComboBoxMunicipio;\r\n }",
"private void carregaComboUfs() {\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Inhumas\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Goianira\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Goiânia\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"SP\", \"Campinas\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"SP\", \"São José dos Campos\"));\n\t\t\n\t\t\n\t\tfor (Municipio municipio : listaDeMunicipios) {\n\t\t\tif(!listaDeUfs.contains(municipio.getUf())) {\n\t\t\t\tlistaDeUfs.add(municipio.getUf());\n\t\t\t}\n\t\t}\n\t\t\n\t\tcmbUfs.addItem(\"--\");\n\t\tfor (String uf : listaDeUfs) {\n\t\t\tcmbUfs.addItem(uf);\n\t\t}\n\t}",
"private void setearOpcionesMenuCobros()\r\n\t{\r\n\t\tArrayList<FormularioVO> lstFormsMenuCobros = new ArrayList<FormularioVO>();\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t/*Buscamos los Formulairos correspondientes a este TAB*/\r\n\t\tfor (FormularioVO formularioVO : this.permisos.getLstPermisos().values()) {\r\n\t\t\t\r\n\t\t\tif(\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_COBRO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_COBRO_OTRO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_EGRESO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_GASTOS) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_DEPOSITO) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_CONCILIACION) ||\r\n\t\t\t\tformularioVO.getCodigo().equals(VariablesPermisos.FORMULARIO_INGRESO_EGRESO_OTRO))\r\n\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tlstFormsMenuCobros.add(formularioVO);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t/*Si hay formularios para el tab*/\r\n\t\tif(lstFormsMenuCobros.size()> 0)\r\n\t\t{\r\n\r\n\t\t\tthis.layoutMenu = new VerticalLayout();\r\n\t\t\t//this.tabMantenimientos.setMargin(true);\r\n\t\t\t\r\n\t\t\tthis.lbCobros.setVisible(true);\r\n\t\t\tthis.layoutMenu.addComponent(this.lbCobros);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (FormularioVO formularioVO : lstFormsMenuCobros) {\r\n\t\t\t\t\r\n\t\t\t\tswitch(formularioVO.getCodigo())\r\n\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_COBRO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_COBRO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarIngresoCobro();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.ingCobro);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_COBRO_OTRO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_COBRO_OTRO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarOtroCobro();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.otroCobro);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_EGRESO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_EGRESO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarIngresoEgreso();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.ingEgreso);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_INGRESO_EGRESO_OTRO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_INGRESO_EGRESO_OTRO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarOtroEgreso();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.otroEgreso);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\r\n\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_GASTOS:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_GASTOS, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarGastos();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.gastos);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\r\n\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_DEPOSITO:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_DEPOSITO, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarDeposito();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.deposito);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase VariablesPermisos.FORMULARIO_CONCILIACION:\r\n\t\t\t\t\t\tif(this.permisos.permisoEnFormulaior(VariablesPermisos.FORMULARIO_CONCILIACION, VariablesPermisos.OPERACION_LEER)){\r\n\t\t\t\t\t\t\tthis.habilitarConciliacion();\r\n\t\t\t\t\t\t\tthis.layoutMenu.addComponent(this.conciliacion);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.menuItems.addComponent(this.layoutMenu);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"private void defaultdata()\n {\n try\n {\n \n StageBao stage_bao =\n new BaoFactory().createStageBao(); //create building bao object\n List<StageDto> stage_list =\n stage_bao.viewAll(); //get all building from DB\n \n stageComboBox.removeAllItems(); //remove all item from building combobox\n\n if(stage_list!=null&&!stage_list.isEmpty())\n {\n for(int i = 0; i<stage_list.size(); i++)\n {\n stageComboBox.addItem(stage_list.get(i).getNumber());\n }\n\n stageComboBox.setSelectedIndex(-1); //select no thing in this combo\n }\n \n \n DepartmentBao depart_bao = new BaoFactory().createDepartmentBao();\n List<DepartmentDto> depart_list = depart_bao.viewAll();\n DepartComboBox.removeAllItems();\n\n if(depart_list!=null&&!depart_list.isEmpty())\n {\n for(int i = 0; i<depart_list.size(); i++)\n {\n DepartComboBox.addItem(depart_list.get(i).getName());\n }\n DepartComboBox.setSelectedIndex(-1);\n }\n\n \n }\n \n catch(Exception e)\n {\n e.printStackTrace();\n }\n\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n loadTable();\n ObservableList<String> opt = FXCollections.observableArrayList(\n \"A01\",\n \"A02\",\n \"A02\",\n \"A03\",\n \"A04\",\n \"B01\",\n \"B02\",\n \"B03\",\n \"B04\",\n \"C01\",\n \"C02\",\n \"C03\",\n \"C04\",\n \"D01\",\n \"D02\",\n \"D03\",\n \"D04\");\n \n cb1.setItems(opt);\n \n \n \n \n ObservableList<String> options = FXCollections.observableArrayList();\n Connection cnx = Myconn.getInstance().getConnection();\n String e=\"\\\"\"+\"Etudiant\"+\"\\\"\";\n ResultSet rs = cnx.createStatement().executeQuery(\"select full_name from user where role=\"+e+\"\");\n while(rs.next()){\n options.add(rs.getString(\"full_name\"));\n \n }\n// ObservableList<String> options = FXCollections.observableArrayList(\"Option 1\",\"Option 2\",\"Option 3\");\n comboE.setItems(options);\n } catch (SQLException ex) {\n Logger.getLogger(SoutenanceController.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n bindingGroup = new org.jdesktop.beansbinding.BindingGroup();\n\n jComboBox2 = new javax.swing.JComboBox<>();\n buttonGroup1 = new javax.swing.ButtonGroup();\n entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(\"crmPU\").createEntityManager();\n clienteQuery = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery(\"SELECT c FROM Cliente c\");\n clienteList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : clienteQuery.getResultList();\n crmPUEntityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(\"crmPU\").createEntityManager();\n clienteQuery1 = java.beans.Beans.isDesignTime() ? null : crmPUEntityManager.createQuery(\"SELECT c FROM Cliente c\");\n clienteList1 = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : clienteQuery1.getResultList();\n funcionarioQuery = java.beans.Beans.isDesignTime() ? null : crmPUEntityManager.createQuery(\"SELECT f FROM Funcionario f\");\n funcionarioList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : funcionarioQuery.getResultList();\n jTextField1 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n cmbFuncionario = new javax.swing.JComboBox<>();\n jButton1 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n cmbCliente = new javax.swing.JComboBox<>();\n txtData = new javax.swing.JFormattedTextField();\n jButton2 = new javax.swing.JButton();\n\n jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jTextField1.setText(\"jTextField1\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel3.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n jLabel3.setText(\"Visitas Programadas\");\n\n jLabel1.setText(\"Cliente\");\n\n jLabel2.setText(\"Data prevista\");\n\n jLabel4.setText(\"Func. Responsável\");\n\n org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, funcionarioList, cmbFuncionario);\n bindingGroup.addBinding(jComboBoxBinding);\n\n jButton1.setText(\"Salvar\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton6.setText(\"<\");\n jButton6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton6ActionPerformed(evt);\n }\n });\n\n jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, clienteList1, cmbCliente);\n bindingGroup.addBinding(jComboBoxBinding);\n\n try {\n txtData.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter(\"##/##/####\")));\n } catch (java.text.ParseException ex) {\n ex.printStackTrace();\n }\n\n jButton2.setText(\"Visitas\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(61, 61, 61)\n .addComponent(jButton6)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(cmbCliente, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtData)\n .addComponent(cmbFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton2)\n .addGap(64, 64, 64))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jButton6))\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(cmbCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(cmbFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(49, 49, 49)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(18, 18, 18)\n .addComponent(jLabel5)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n bindingGroup.bind();\n\n pack();\n }",
"private void cargarBasic(Cola<String> a) {\n\n while (!a.esVacio()) {\n\n jComboBoxBasic.addItem(a.deColar());\n\n\n }\n\n }",
"public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tEvaluacionProveedorBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.evaluacionproveedor,new Object(),this.evaluacionproveedorParameterGeneral,this.evaluacionproveedorReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tEvaluacionProveedorBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.evaluacionproveedor,new Object(),this.evaluacionproveedorParameterGeneral,this.evaluacionproveedorReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,EvaluacionProveedorConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }",
"private void buildComboBoxes() {\n buildCountryComboBox();\n buildDivisionComboBox();\n }",
"private void cargaComonentes() {\n\t\trepoInstituciones = new InstitucionesRepository(session);\n\t\trepoInstitucion_usuario = new Institucion_UsuariosRepository(session);\n\t\tList upgdsList = null;\n\t\tif(mainApp.getUsuarioApp().getPer_Usu_Id().equalsIgnoreCase(\"Alcaldia\")){\n\t\t\tupgdsList = repoInstituciones.listByMunicipio(mainApp.getUsuarioApp().getMun_Usu_Id());\n\t\t\tInstituciones instiL=new Instituciones();\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstiL=(Instituciones) iter.next();\n\t\t\t\tinstitucionesList.add(instiL);\n\t\t\t}\n\t\t}else{\n\t\t\tInstitucion_Usuarios institucion_usuario = new Institucion_Usuarios();\n\t\t\tupgdsList = repoInstitucion_usuario.getListIpsByUsuario(mainApp.getUsuarioApp().getUsu_Id());\n\t\t\tIterator iter = upgdsList.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tinstitucion_usuario = (Institucion_Usuarios) iter.next();\n\t\t\t\tinstitucionesList.add(repoInstituciones.findById(institucion_usuario.getIps_Ipsu_Id()));\n\t\t\t}\n\t\t}\n\t\t\n\t\tinstitucionesBox.setItems(institucionesList);\n\t\tinstitucionesBox.setValue(mainApp.getInstitucionApp());\n\n\t\tinstitucionesBox.valueProperty().addListener(new ChangeListener<Instituciones>() {\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends Instituciones> observable, Instituciones oldValue,\n\t\t\t\t\tInstituciones newValue) {\n\t\t\t\tmainApp.setInstitucionApp(newValue);\n\t\t\t}\n\t\t});\n\t}",
"public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tLibroContableBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.librocontable,new Object(),this.librocontableParameterGeneral,this.librocontableReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tLibroContableBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.librocontable,new Object(),this.librocontableParameterGeneral,this.librocontableReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,LibroContableConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }",
"public void construirSetOperadores() {\n\n\t\tlabeltituloSeleccionOperador = new JLabel();\n\n\t\tcomboOperadores = new JComboBox(operadores);// creamos el Cuarto combo,y le pasamos un array de cadenas\n\t\tcomboOperadores.setSelectedIndex(0);// por defecto quiero visualizar el Cuarto item\n\t\t\n\n\t\tlabeltituloSeleccionOperador.setText(\"Seleccione el operador que relaciona ambas reglas\");\n\t\tpanelCentral.add(labeltituloSeleccionOperador);\n\t\tlabeltituloSeleccionOperador.setBounds(30, 30, 50, 20);\n\t\tpanelCentral.add(comboOperadores);\n\t\tcomboOperadores.setBounds(100, 30, 150, 24);\n\t\t\n\n\t\tpanelCentral.setBounds(10, 50, 370, 110);\n\n\t\t/* Creamos el objeto controlador, para manejar los eventos */\n\t\tControlDemoCombo controlDemoCombo = new ControlDemoCombo(this);\n\t\tcomboOperadores.addActionListener(controlDemoCombo);// agregamos escuchas\n\n\t}",
"private void listadoRol(JComboBox cbb) throws SQLException {\n\t\tint selected = cbb.getSelectedIndex();\n\t\tDefaultComboBoxModel model = (DefaultComboBoxModel) cbb.getModel();\n\t\tif (!coordUsuario.listaRol().isEmpty()) {\n\t\tlistaRol = coordUsuario.listaRol();\n\t\t // Borrar Datos Viejos\n\t model.removeAllElements();\n\t for (int i=0;i<listaRol.size();i++) {\n\t model.addElement(listaRol.get(i).getNombre());\n\t }\n\t // setting model with new data\n\t cbb.setModel(model);\n\t cbb.setRenderer(new MyComboBox(\"Rol\")); \n \tcbb.setSelectedIndex(selected); \n\t}}",
"public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tCierreCajaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.cierrecaja,new Object(),this.cierrecajaParameterGeneral,this.cierrecajaReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tCierreCajaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.cierrecaja,new Object(),this.cierrecajaParameterGeneral,this.cierrecajaReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,CierreCajaConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }",
"public List<Joueur> List_Joueur_HommesForComboBox() \r\n {\r\n List<Joueur> j = new ArrayList<>();\r\n String req= \"SELECT * FROM personne WHERE datedestruction is NULL and role = 'Joueur' and sexe='Homme' \";\r\n try {\r\n ResultSet res = ste.executeQuery(req);\r\n while (res.next()) {\r\n \r\n Joueur Jou = new Joueur(\r\n res.getInt(\"idpersonne\"),\r\n \r\n res.getString(\"nom\"),\r\n res.getString(\"prenom\")\r\n );\r\n j.add(Jou);\r\n \r\n System.out.println(\"------- joueurs selectionné avec succés----\");\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"----------Erreur lors methode : List_Joueur_Hommes()------\");\r\n }\r\n return j;\r\n \r\n}",
"public ComboBoxModel getTiposProducto();",
"private void initComboModelo()\n {\n cmbModelo.removeAllItems();\n ArrayList parametros = new ArrayList();\n parametros.add(FarmaVariables.vCodGrupoCia);\n parametros.add(FarmaVariables.vCodCia);\n FarmaLoadCVL.loadCVLFromSP(cmbModelo, \n \"cmbModelo\",\n \"PTOVENTA_ADMIN_IMP.IMP_LISTA_MODELOS(?,?)\", \n parametros, \n false); \n \n if(VariablesImpresoras.vTipComp.equals(ConstantsModuloVenta.TIPO_COMP_TICKET))\n {\n try\n { \n VariablesImpresoras.vModeloImpresora = DBImpresoras.getModeloImpresora(VariablesImpresoras.vSecImprLocal);\n cmbModelo.setSelectedItem(VariablesImpresoras.vModeloImpresora); \n }\n catch (Exception e)\n { log.debug(\"\", e);\n VariablesImpresoras.vModeloImpresora = \"\";\n }\n btnModelo.setVisible(true);\n cmbModelo.setVisible(true);\n btnNSerie.setVisible(true);\n txtSerieImpr.setVisible(true);\n \n //ERIOS 11.11.2013 Se habilita para el perfil operador\n if(FarmaVariables.dlgLogin.verificaRol(FarmaConstants.ROL_OPERADOR_SISTEMAS))\n {\n txtSerieImpr.setEditable(true);\n }\n }\n else\n {\n btnModelo.setVisible(false);\n cmbModelo.setVisible(false);\n btnNSerie.setVisible(false);\n txtSerieImpr.setVisible(false);\n }\n }",
"public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tPlantillaFacturaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.plantillafactura,new Object(),this.plantillafacturaParameterGeneral,this.plantillafacturaReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tPlantillaFacturaBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.plantillafactura,new Object(),this.plantillafacturaParameterGeneral,this.plantillafacturaReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,PlantillaFacturaConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }",
"public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tTipoDireccionBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.tipodireccion,new Object(),this.tipodireccionParameterGeneral,this.tipodireccionReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tTipoDireccionBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.tipodireccion,new Object(),this.tipodireccionParameterGeneral,this.tipodireccionReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,TipoDireccionConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }",
"public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tLiquidacionImpuestoImporBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.liquidacionimpuestoimpor,new Object(),this.liquidacionimpuestoimporParameterGeneral,this.liquidacionimpuestoimporReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tLiquidacionImpuestoImporBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.liquidacionimpuestoimpor,new Object(),this.liquidacionimpuestoimporParameterGeneral,this.liquidacionimpuestoimporReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,LiquidacionImpuestoImporConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }",
"public void seleccionarBeneficiario(){\n\t\tvisualizarGrabarRequisito = false;\r\n\t\ttry{\r\n\t\t\tlog.info(\"intItemBeneficiarioSeleccionar:\"+intItemBeneficiarioSeleccionar);\r\n\t\t\tif(intItemBeneficiarioSeleccionar.equals(new Integer(0))){\r\n\t\t\t\tbeneficiarioSeleccionado = null;\r\n\t\t\t\tlistaEgresoDetalleInterfaz = new ArrayList<EgresoDetalleInterfaz>();\r\n\t\t\t\tbdTotalEgresoDetalleInterfaz = null;\r\n\t\t\t\t//\r\n\t\t\t\tmostrarPanelAdjuntoGiro = false;\r\n\t\t\t\tdeshabilitarNuevo = false;\r\n\t\t\t\tdeshabilitarNuevoBeneficiario = false;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(BeneficiarioPrevision beneficiarioPrevision : expedientePrevisionGirar.getListaBeneficiarioPrevision()){\r\n\t\t\t\tif(beneficiarioPrevision.getId().getIntItemBeneficiario().equals(intItemBeneficiarioSeleccionar)){\r\n\t\t\t\t\tbeneficiarioSeleccionado = beneficiarioPrevision;\r\n\t\t\t\t\tlistaEgresoDetalleInterfaz = previsionFacade.cargarListaEgresoDetalleInterfaz(expedientePrevisionGirar, beneficiarioSeleccionado);\t\t\t\t\t\r\n\t\t\t\t\tbdTotalEgresoDetalleInterfaz = ((EgresoDetalleInterfaz)(listaEgresoDetalleInterfaz.get(0))).getBdSubTotal();;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tList<ControlFondosFijos> listaControlValida = new ArrayList<ControlFondosFijos>();\r\n\t\t\tfor(ControlFondosFijos controlFondosFijos : listaControl){\r\n\t\t\t\tAcceso acceso = bancoFacade.obtenerAccesoPorControlFondosFijos(controlFondosFijos);\r\n\t\t\t\tlog.info(controlFondosFijos);\r\n\t\t\t\tlog.info(acceso);\t\t\t\t\r\n\t\t\t\tif(acceso!=null\r\n\t\t\t\t&& acceso.getAccesoDetalleUsar()!=null\r\n\t\t\t\t&& acceso.getAccesoDetalleUsar().getBdMontoMaximo()!=null\r\n\t\t\t\t&& acceso.getAccesoDetalleUsar().getBdMontoMaximo().compareTo(bdTotalEgresoDetalleInterfaz)>=0){\r\n\t\t\t\t\tlistaControlValida.add(controlFondosFijos);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvisualizarGrabarRequisito = true;\r\n\t\t\tdeshabilitarNuevoBeneficiario = false;\r\n\t\t\t\r\n\t\t\tif(listaControlValida.isEmpty() && intItemBeneficiarioSeleccionar!=0){\r\n\t\t\t\t//Deshabilitamos todos los campos para detener el proceso de grabacion\r\n\t\t\t\tif(validarExisteRequisito()) {\r\n\t\t\t\t\tmensajeAdjuntarRequisito = \"No existe un fondo de cambio con un monto máximo configurado que soporte el monto de giro del expediente.\"+\r\n\t\t\t\t\t \"Este giro será realizado por la Sede Central.\";\r\n\t\t\t\t\tmostrarMensajeAdjuntarRequisito = true;\r\n\t\t\t\t\tmostrarPanelAdjuntoGiro = true;\r\n\t\t\t\t\thabilitarGrabarRequisito = true;\t\r\n\t\t\t\t\tvisualizarGrabarAdjunto = true;\r\n\t\t\t\t\tdeshabilitarNuevo = true;\r\n\t\t\t\t\tdeshabilitarDescargaAdjuntoGiro = false;\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmensajeAdjuntarRequisito = \"Ya existen requisitos registrados para este expediente.\";\r\n\t\t\t\t\tarchivoAdjuntoGiro = previsionFacade.getArchivoPorRequisitoPrevision(lstRequisitoPrevision.get(0));\r\n\t\t\t\t\tmostrarMensajeAdjuntarRequisito = true;\r\n\t\t\t\t\tmostrarPanelAdjuntoGiro = true;\r\n\t\t\t\t\thabilitarGrabarRequisito = false;\r\n\t\t\t\t\tvisualizarGrabarAdjunto =false;\r\n\t\t\t\t\tdeshabilitarNuevo = true;\r\n\t\t\t\t\tdeshabilitarDescargaAdjuntoGiro = true;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tvisualizarGrabarRequisito = false;\r\n\t\t\t\tmostrarPanelAdjuntoGiro = false;\r\n\t\t\t\tdeshabilitarNuevo = false;\r\n\t\t\t\tdeshabilitarDescargaAdjuntoGiro = false;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}catch (Exception e){\r\n\t\t\tlog.error(e.getMessage(),e);\r\n\t\t}\r\n\t}",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n //Preenche o comboBox sexo\r\n cb_sexo.setItems(listSexo);\r\n cb_uf.setItems(listUf);\r\n cb_serie.setItems(listSerie);\r\n\r\n// // Preenche o comboBox UF\r\n// this.cb_uf.setConverter(new ConverterDados(ConverterDados.GET_UF));\r\n// this.cb_uf.setItems(AlunoDAO.executeQuery(null, AlunoDAO.QUERY_TODOS));\r\n//\r\n// //Preenche o comboBox Serie\r\n// this.cb_serie.setConverter(new ConverterDados(ConverterDados.GET_SERIE));\r\n// this.cb_serie.setItems(AlunoDAO.executeQuery(null, AlunoDAO.QUERY_TODOS));\r\n this.codAluno.setCellValueFactory(cellData -> cellData.getValue().getCodigoProperty().asObject());\r\n this.nomeAluno.setCellValueFactory(cellData -> cellData.getValue().getNomeProperty());\r\n this.sexoAluno.setCellValueFactory(cellData -> cellData.getValue().getSexoProperty());\r\n this.enderecoAluno.setCellValueFactory(cellData -> cellData.getValue().getEnderecoProperty());\r\n this.cepAluno.setCellValueFactory(cellData -> cellData.getValue().getCepProperty());\r\n this.nascimentoAluno.setCellValueFactory(cellData -> cellData.getValue().getNascimentoProperty());\r\n this.ufAluno.setCellValueFactory(cellData -> cellData.getValue().getUfProperty());\r\n this.maeAluno.setCellValueFactory(cellData -> cellData.getValue().getMaeProperty());\r\n this.paiAluno.setCellValueFactory(cellData -> cellData.getValue().getPaiProperty());\r\n this.telefoneAluno.setCellValueFactory(cellData -> cellData.getValue().getTelefoneProperty());\r\n this.serieAluno.setCellValueFactory(cellData -> cellData.getValue().getSerieProperty());\r\n this.ensinoAluno.setCellValueFactory(cellData -> cellData.getValue().getEnsinoProperty());\r\n\r\n //bt_excluir.disableProperty().bind(tabelaAluno.getSelectionModel().selectedItemProperty().isNull());\r\n //bt_editar.disableProperty().bind(tabelaAluno.getSelectionModel().selectedItemProperty().isNull());\r\n }",
"public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tPagosAutorizadosBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.pagosautorizados,new Object(),this.pagosautorizadosParameterGeneral,this.pagosautorizadosReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tPagosAutorizadosBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.pagosautorizados,new Object(),this.pagosautorizadosParameterGeneral,this.pagosautorizadosReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,PagosAutorizadosConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }",
"public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tCostoGastoImporBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.costogastoimpor,new Object(),this.costogastoimporParameterGeneral,this.costogastoimporReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tCostoGastoImporBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.costogastoimpor,new Object(),this.costogastoimporParameterGeneral,this.costogastoimporReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,CostoGastoImporConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Prov = new javax.swing.JComboBox<>();\n Ko = new javax.swing.JComboBox<>();\n Kec = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n Prov.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n Prov.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n ProvItemStateChanged(evt);\n }\n });\n Prov.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ProvActionPerformed(evt);\n }\n });\n\n Ko.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n Kec.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(79, 79, 79)\n .addComponent(Prov, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(Ko, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(31, 31, 31)\n .addComponent(Kec, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(79, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(247, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Prov, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Ko, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(Kec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(108, 108, 108))\n );\n\n pack();\n }",
"public pansiyon() {\n initComponents();\n for (int i =1900; i <2025; i++) {\n \n cmbkayıtyılı.addItem(Integer.toString(i));\n \n }\n for (int i =1900; i <2025; i++) {\n \n cmbayrılısyılı.addItem(Integer.toString(i));\n \n }\n }",
"private void fillCombos() {\n String sql1=\"SELECT deger from birim\";\n String sql2=\"SELECT deger from unvan\";\n String sql3=\"SELECT deger from gorev\";\n String sql4=\"SELECT deger from gorevsekli\";\n String sql5=\"SELECT deger from atamasekli\";\n String sql6=\"SELECT deger from hizmetsinifi\";\ntry{ps=conn.prepareStatement(sql1);\nrs=ps.executeQuery();\nwhile (rs.next()){\n String deger=rs.getString(\"deger\");\n jComboBox1.addItem(deger);\n}\n \n} catch(Exception e){\n \n} try{ps=conn.prepareStatement(sql2);\nrs=ps.executeQuery();\nwhile (rs.next()){\n String deger=rs.getString(\"deger\");\n jComboBox2.addItem(deger);\n}\n \n} catch(Exception e){\n \n} try{ps=conn.prepareStatement(sql3);\nrs=ps.executeQuery();\nwhile (rs.next()){\n String deger=rs.getString(\"deger\");\n jComboBox3.addItem(deger);\n}\n \n} catch(Exception e){\n \n} try{ps=conn.prepareStatement(sql4);\nrs=ps.executeQuery();\nwhile (rs.next()){\n String deger=rs.getString(\"deger\");\n jComboBox4.addItem(deger);\n}\n \n} catch(Exception e){\n \n} try{ps=conn.prepareStatement(sql5);\nrs=ps.executeQuery();\nwhile (rs.next()){\n String deger=rs.getString(\"deger\");\n jComboBox13.addItem(deger);\n}\n \n} catch(Exception e){\n \n} \n try{ps=conn.prepareStatement(sql6);\nrs=ps.executeQuery();\nwhile (rs.next()){\n String deger=rs.getString(\"deger\");\n jComboBox5.addItem(deger);\n}\n \n} catch(Exception e){\n \n} \n \n }",
"private void borrarCombos(){\n this.jcbSeleccionAñoIni.removeAllItems();\n this.jcbSeleccionAñoFin.removeAllItems();\n this.jcbSeleccionMesIni.removeAllItems();\n this.jcbSeleccionMesFin.removeAllItems();\n this.jcbSeleccionInicio.removeAllItems();\n this.jcbSeleccionFin.removeAllItems();\n }",
"private String[] cargaComboRol() {\n\n\t\tcomboRol = new JComboBox();\n\t\tfor (RolDTO rolDTO : top) {\n\t\t\tcomboRol.addItem(rolDTO.getDescripcion());\n\t\t}\n\t\tString[] arr = new String[top.size()];\n\t\tfor (int i = 0; i < top.size(); i++) {\n\t\t\tarr[i] = top.get(i).getDescripcion();\n\t\t}\n\t\treturn arr;\n\n\t}",
"public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tAnalisisTransaClienteBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.analisistransacliente,new Object(),this.analisistransaclienteParameterGeneral,this.analisistransaclienteReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tAnalisisTransaClienteBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.analisistransacliente,new Object(),this.analisistransaclienteParameterGeneral,this.analisistransaclienteReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,AnalisisTransaClienteConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }",
"public void jComboBoxActionPerformedGeneral(String sTipo,ActionEvent evt) {\t\t\r\n\t\ttry {\r\n\t\t\t/*\t\t\r\n\t\t\tEventoGlobalTipo eventoGlobalTipo=EventoGlobalTipo.CONTROL_CHANGE;\r\n\t\t\t\r\n\t\t\tif(this.esUsoDesdeHijo) {\r\n\t\t\t\teventoGlobalTipo=EventoGlobalTipo.FORM_HIJO_ACTUALIZAR;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tContainer containerParent=null;\r\n\t\t\tComponent componentOpposite=null;\r\n\t\t\tBoolean esControlTabla=false;\r\n\t\t\t\t\r\n\t\t\tArrayList<Classe> classes=new ArrayList<Classe>();\r\n\t\t\t\r\n\t\t\tUtilidadTipoPrecioBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.BEFORE,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CLICKED,sTipo,this.utilidadtipoprecio,new Object(),this.utilidadtipoprecioParameterGeneral,this.utilidadtipoprecioReturnGeneral);\r\n\t\t\tJComboBox jComboBoxGenerico=null;\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tif(evt.getSource().getClass().equals(JComboBox.class)\r\n\t\t\t\t|| evt.getSource().getClass().equals(JComboBoxMe.class)) {\r\n\t\t\t\t\t\r\n\t\t\t\tjComboBoxGenerico=(JComboBox)evt.getSource();\r\n\t\t\t\t\r\n\t\t\t\tcontainerParent=jComboBoxGenerico.getParent();\r\n\t\t\t\t\r\n\t\t\t\tcomponentOpposite=null;//evt.getOppositeComponent();\r\n\t\t\t\t\r\n\t\t\t\tif((containerParent!=null && containerParent.getClass().equals(JTableMe.class))\r\n\t\t\t\t\t|| (componentOpposite!=null && componentOpposite.getClass().equals(JTableMe.class))\r\n\t\t\t\t) {\t\t\t\t\t\r\n\t\t\t\t\tesControlTabla=true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.esControlTabla=esControlTabla;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString sFinalQueryCombo=\"\";\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t\r\n\t\t\tUtilidadTipoPrecioBeanSwingJInternalFrameAdditional.procesarEventosVista(this.parametroGeneralUsuario,this.moduloActual,this.opcionActual,this.usuarioActual,this,FuncionTipo.AFTER,ControlTipo.COMBOBOX,EventoTipo.CHANGE,EventoSubTipo.CHANGED,sTipo,this.utilidadtipoprecio,new Object(),this.utilidadtipoprecioParameterGeneral,this.utilidadtipoprecioReturnGeneral);\r\n\t\t\t*/\t\t\t\t\t\t\r\n \t\t} catch(Exception e) {\r\n \t\t\tFuncionesSwing.manageException2(this, e,logger,UtilidadTipoPrecioConstantesFunciones.CLASSNAME);\r\n \t\t}\t\t\r\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n selectOrdem = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n nome = new javax.swing.JTextField();\n btnSalvar = new javax.swing.JButton();\n btnCancelar = new javax.swing.JButton();\n descErro = new javax.swing.JLabel();\n\n jLabel2.setText(\"Ordem na exibição\");\n\n selectOrdem.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"1\" }));\n\n jLabel1.setText(\"Nome da lista\");\n\n btnSalvar.setText(\"Salvar Lista\");\n\n btnCancelar.setText(\"Cancelar\");\n\n descErro.setForeground(new java.awt.Color(255, 51, 51));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnSalvar)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnCancelar))\n .addComponent(nome, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)\n .addComponent(descErro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(selectOrdem, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(selectOrdem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(descErro, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(13, 13, 13)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSalvar)\n .addComponent(btnCancelar))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n }",
"public void construirTercerSetDeDominiosReglaCompleja() {\n\n\t\tlabeltituloSeleccionDominios = new JLabel();\n\n\t\tcomboDominiosSet3ReglaCompleja = new JComboBox(dominio);// creamos el Tercer combo,y le pasamos un array de cadenas\n\t\tcomboDominiosSet3ReglaCompleja.setSelectedIndex(0);// por defecto quiero visualizar el Tercer item\n\t\titemscomboDominiosSet3ReglaCompleja = new JComboBox();// creamo el Tercer combo, vacio\n\t\titemscomboDominiosSet3ReglaCompleja.setEnabled(false);// //por defecto que aparezca deshabilitado\n\n\t\tlabeltituloSeleccionDominios.setText(\"Seleccione el Tercer Dominio de regla compleja\");\n\t\tpanelCentral.add(labeltituloSeleccionDominios);\n\t\tlabeltituloSeleccionDominios.setBounds(30, 30, 50, 20);\n\t\tpanelCentral.add(comboDominiosSet3ReglaCompleja);\n\t\tcomboDominiosSet1ReglaCompleja.setBounds(100, 30, 150, 24);\n\t\tpanelCentral.add(itemscomboDominiosSet3ReglaCompleja);\n\t\titemscomboDominiosSet3ReglaCompleja.setBounds(100, 70, 150, 24);\n\n\t\tpanelCentral.setBounds(10, 50, 370, 110);\n\n\t\t/* Creamos el objeto controlador, para manejar los eventos */\n\t\tControlDemoCombo controlDemoCombo = new ControlDemoCombo(this);\n\t\tcomboDominiosSet4ReglaCompleja.addActionListener(controlDemoCombo);// agregamos escuchas\n\n\t}",
"public void setvalues(){\n Connection con= getConnection();\n Statement pst1;\n ResultSet rs1;\n \n try{\n \n String qry1=\"SELECT DISTINCT(`StudentGroup`) FROM `sessions`\";\n \n pst1=con.prepareStatement(qry1);\n rs1=pst1.executeQuery(qry1);\n\n combo_studentGroup.removeAllItems();\n \n while(rs1.next()){\n combo_studentGroup.addItem(rs1.getString(\"StudentGroup\"));\n }\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n \n }"
] | [
"0.77590466",
"0.75764143",
"0.74860466",
"0.7298097",
"0.7237055",
"0.723324",
"0.72120047",
"0.7198809",
"0.71946794",
"0.71941435",
"0.7152424",
"0.7117318",
"0.71088743",
"0.70838606",
"0.70748484",
"0.7028201",
"0.7023203",
"0.70034486",
"0.699046",
"0.69250524",
"0.692279",
"0.6916378",
"0.68982214",
"0.68868846",
"0.6880548",
"0.6862187",
"0.6858148",
"0.68268496",
"0.68239826",
"0.6808753",
"0.6777473",
"0.6772947",
"0.6768401",
"0.67573243",
"0.6745541",
"0.67054904",
"0.66753227",
"0.6670605",
"0.66577446",
"0.66175354",
"0.6600345",
"0.6593273",
"0.6578752",
"0.6578634",
"0.6568736",
"0.6568005",
"0.6553862",
"0.6549145",
"0.6528418",
"0.6527168",
"0.6525699",
"0.6521085",
"0.65117115",
"0.6494396",
"0.64923906",
"0.64919305",
"0.644419",
"0.64398843",
"0.6432063",
"0.64168805",
"0.639911",
"0.63904214",
"0.6380883",
"0.6371823",
"0.6365352",
"0.6354798",
"0.635196",
"0.6349399",
"0.63412976",
"0.6335794",
"0.6334587",
"0.6318902",
"0.6315077",
"0.6287924",
"0.6287489",
"0.62800443",
"0.62789214",
"0.6278294",
"0.6277144",
"0.62722045",
"0.6269632",
"0.6266189",
"0.6265003",
"0.6261643",
"0.6251968",
"0.62491286",
"0.624872",
"0.6245923",
"0.6242087",
"0.6240239",
"0.6239356",
"0.62377936",
"0.6235824",
"0.6231401",
"0.62248427",
"0.6224378",
"0.6212971",
"0.6212696",
"0.6210362",
"0.6204725"
] | 0.6236416 | 92 |
Returns the remainder of 'reader' as a string, closing it when done. | public static String readFully(Reader reader) throws IOException {
try {
StringWriter writer = new StringWriter();
char[] buffer = new char[1024];
int count;
while ((count = reader.read(buffer)) != -1) {
writer.write(buffer, 0, count);
}
return writer.toString();
} finally {
reader.close();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static String getString(Reader reader) {\n StringBuffer buf = new StringBuffer();\n char[] buffer = new char[1024];\n int count;\n try {\n while ((count = reader.read(buffer)) != -1) {\n buf.append(buffer, 0, count);\n }\n } catch (IOException e) {\n return null;\n }\n return buf.toString();\n }",
"private static String getString(BufferedReader reader) throws IOException{\n String result=null;\n while(result==null) {\n result = reader.readLine();\n }\n return result.trim();\n }",
"private String readAll(Reader rd) throws IOException {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tint cp;\r\n\t\twhile ((cp = rd.read()) != -1) {\r\n\t\t\tsb.append((char) cp);\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}",
"public static String read(Reader in) throws IOException {\n\t\tStringBuilder result = new StringBuilder();\n\t try {\n\t \tchar[] buf = new char[1024]; int r = 0;\n\t while ((r = in.read(buf)) != -1) {result.append(new String(buf, 0, r));}\n\t } finally { in.close();}\n\t\tString text=result.toString();\n\t\treturn text;\n\t}",
"private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private static String readAll(Reader rd) throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tsb.append((char) cp);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private static String readAll(Reader rd) throws IOException {\n\t\t StringBuilder sb = new StringBuilder();\n\t\t int cp;\n\t\t while ((cp = rd.read()) != -1) {\n\t\t sb.append((char) cp);\n\t\t }\n\t\t return sb.toString();\n\t\t }",
"public static String getText(BufferedReader reader) throws IOException {\n StringBuilder answer = new StringBuilder();\n // reading the content of the file within a char buffer\n // allow to keep the correct line endings\n char[] charBuffer = new char[8192];\n int nbCharRead /* = 0*/;\n try {\n while ((nbCharRead = reader.read(charBuffer)) != -1) {\n // appends buffer\n answer.append(charBuffer, 0, nbCharRead);\n }\n Reader temp = reader;\n reader = null;\n temp.close();\n } finally {\n closeWithWarning(reader);\n }\n return answer.toString();\n }",
"private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }",
"private static String readAllBytes(Reader rd) throws IOException {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tstringBuilder.append((char) cp);\n\t\t}\n\t\treturn stringBuilder.toString();\n\t}",
"private static String readNextLine(BufferedReader reader) {\n\t\t\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\treturn line;\n\t\t} catch(IOException e) {\n\t\t\tGdx.app.error(TAG, \"Failed to read the file\", e);\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch(IOException ex) {\n\t\t\t\tGdx.app.error(TAG, \"Failed to close file\");\n\t\t\t\tGdx.app.exit();\n\t\t\t}\n\t\t\tGdx.app.exit();\n\t\t\treturn null;\n\t\t}\n\t}",
"public static String readerToText(Reader reader) {\n\t\tStringBuilder sbf = new StringBuilder();\n\t\ttry (BufferedReader br = new BufferedReader(reader)) {\n\t\t\tString str = null;\n\t\t\twhile ((str = br.readLine()) != null) {\n\t\t\t\tsbf.append(str).append('\\n');\n\t\t\t}\n\t\t\treturn sbf.toString();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error while reading from reader. {}\", e.getMessage());\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public String read() throws IOException {\n return reader.readLine();\n }",
"private String read() {\n\n String s = \"\";\n\n try {\n // Check if there are bytes available\n if (inStream.available() > 0) {\n\n // Read bytes into a buffer\n byte[] inBuffer = new byte[1024];\n int bytesRead = inStream.read(inBuffer);\n\n // Convert read bytes into a string\n s = new String(inBuffer, \"ASCII\");\n s = s.substring(0, bytesRead);\n }\n\n } catch (Exception e) {\n Log.e(TAG, \"Read failed!\", e);\n }\n\n return s;\n }",
"public static String getLine(InputStreamReader reader) {\n StringBuffer b = new StringBuffer();\n int c;\n try {\n while ((c = reader.read()) != -1 && c != '\\n') {\n if (c != '\\r')\n b.append((char)c);\n }\n } catch (IOException ioe) {\n c = -1;\n }\n\n if (c == -1 && b.length() == 0)\n return null;\n else\n return b.toString();\n }",
"static String readString() throws IOException{\n return bufferedReader.readLine();\n }",
"private String read(InputStream in) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(in), 1000);\n for (String line = r.readLine(); line != null; line = r.readLine()) {\n sb.append(line);\n }\n in.close();\n return sb.toString();\n }",
"private String readStream(InputStream in) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = in.read();\n while(i != -1) {\n bo.write(i);\n i = in.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }",
"public static String getContent(InputStreamReader inputReader)\n throws Exception {\n StringBuilder buffer = new StringBuilder();\n BufferedReader reader = new BufferedReader(inputReader);\n try {\n int read = reader.read();\n while (read != -1) {\n buffer.append((char) read);\n read = reader.read();\n }\n } finally {\n reader.close();\n }\n return buffer.toString();\n }",
"private static String read(InputStream in) throws IOException {\n StringBuilder builder = new StringBuilder();\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n String line = null;\n while ((line = reader.readLine()) != null)\n builder.append(line);\n\n return builder.toString();\n }",
"private String readResult() throws IOException {\n return reader.readLine();\n }",
"private static String readIt(InputStream stream) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(stream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return sb.toString();\n\t}",
"public String readString() throws IOException {\n return WritableUtils.readString(in);\n }",
"StreamReader underlyingReader();",
"private String readStream(InputStream in) throws IOException {\n BufferedReader r = new BufferedReader(new InputStreamReader(in));\n\n StringBuilder sb = new StringBuilder();\n String line;\n\n // Reads every line and stores them in sb.\n while((line = r.readLine()) != null) {\n sb.append(line);\n }\n\n // Closes the input stream.\n in.close();\n\n return sb.toString();\n }",
"protected String readAscii(BinaryDataReader dataReader) throws IOException\n\t{\n\t\tbyte[] data = new byte[this.count];\n\n\t\t// read string buffer\n\t\tif (this.count <= 4)\n\t\t{\n\t\t\t// unpack integer\n\t\t\tint value = this.value;\n\t\t\tfor (int i = 0; i < this.count; i++)\n\t\t\t{\n\t\t\t\tdata[i] = (byte) (value & 0x00FF);\n\t\t\t\tvalue = value >> 8;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// convert state to long offset for reading large buffer\n\t\t\tlong offset = ((long) this.value) & 0xffffffffL;\n\n\t\t\tlong pos0 = dataReader.getFilePointer();\n\t\t\tdataReader.seek(offset);\n\t\t\tdataReader.readByteArray(data);\n\t\t\tdataReader.seek(pos0);\n\t\t}\n\n\t\treturn new String(data);\n\t}",
"private String _read(InputStream in, String enc) throws IOException\n {\n int ptr = 0;\n int count;\n \n while ((count = in.read(_readBuffer, ptr, _readBuffer.length - ptr)) > 0) {\n ptr += count;\n // buffer full? Need to realloc\n if (ptr == _readBuffer.length) {\n _readBuffer = Arrays.copyOf(_readBuffer, ptr + ptr);\n }\n }\n \n return new String(_readBuffer, 0, ptr, enc);\n }",
"private StringBuilder inputStreamToString(InputStream is) {\n \t String line = \"\";\n \t StringBuilder total = new StringBuilder();\n \t \n \t // Wrap a BufferedReader around the InputStream\n \t BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n \n \t // Read response until the end\n \t try {\n \t\t\twhile ((line = rd.readLine()) != null) { \n \t\t\t total.append(line); \n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t \n \t // Return full string\n \t return total;\n \t}",
"public String readString() throws IOException {\n checkOpened();\n return dis.readUTF();\n }",
"private static String readFromStream(InputStream inputStream) throws IOException {\n\n // Create a new empty string builder\n StringBuilder stringBuilder = new StringBuilder();\n\n // Create a bufferedReader that reads from the inputStream param\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream,\n Charset.forName(\"UTF-8\")));\n\n // Create a string that is one line of the buffered reader\n String line = bufferedReader.readLine();\n\n while (line != null) {\n // Add line to stringBuilder\n stringBuilder.append(line);\n\n // Set line to the next line in buffered reader\n line = bufferedReader.readLine();\n }\n\n // Return string builder as a string\n return stringBuilder.toString();\n }",
"public String readString() {\n final int BUF_SIZE = 100;\n byte[] byteDest = new byte[BUF_SIZE];\n String ret = \"\";\n int num = BUF_SIZE;\n try {\n while (!ret.contains(\"\\r\")) {\n if ((num = in.read(byteDest)) > 0) {\n ret += new String(byteDest, 0, num);\n }\n }\n } catch (IOException e) {\n print(\"Error reading String from \" + portName);\n }\n print(\"Read :\" + ret + \":\");\n return ret;\n }",
"private String readString( InputStream stream ) throws IOException {\n char delimiter = (char) stream.read();\n buffer = new StringBuffer();\n while ( true ) {\n int c = stream.read();\n if ( c == delimiter ) {\n break;\n }\n else {\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n throw new TableFormatException(\n \"End of line within a string literal\" );\n case '\\\\':\n buffer.append( (char) stream.read() );\n break;\n case END:\n throw new TableFormatException(\n \"End of file within a string literal\" );\n default:\n buffer.append( (char) c );\n }\n }\n }\n return buffer.toString();\n }",
"public String read() throws Exception {\r\n\t\tBufferedReader reader = null;\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\ttry {\r\n\t\t\tif (input==null) input = new FileInputStream(file);\r\n\t\t\treader = new BufferedReader(new InputStreamReader(input,charset));\r\n\t\t\tchar[] c= null;\r\n\t\t\twhile (reader.read(c=new char[8192])!=-1) {\r\n\t\t\t\tsb.append(c);\r\n\t\t\t}\r\n\t\t\tc=null;\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\treturn sb.toString().trim();\r\n\t}",
"String read();",
"String read();",
"private static String ioStr(InputStream in) throws IOException {\n\t\t// Read input\n\t\tString str = new String();\n\t\tString next = null;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\t\twhile ((next = reader.readLine()) != null) {\n\t\t\tstr += next + \"\\n\";\n\t\t}\n\t\tin.close();\n\n\t\t// Convert result accordingly\n\t\tif (str.length() > 1) {\n\t\t\treturn str.substring(0, str.length() - 1);\n\t\t}\n\t\treturn str;\n\t}",
"public String readString() {\n return readNextLine();\n }",
"public static String toString(final Reader input) throws IOException {\n final StringWriter sw = new StringWriter();\n copy(input, sw);\n return sw.toString();\n }",
"private static String readFromStream(InputStream inputStream) {\n StringBuilder outputString = new StringBuilder();\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"));\n BufferedReader reader = new BufferedReader(inputStreamReader);\n try {\n String line = reader.readLine();\n while (line != null) {\n outputString.append(line);\n line = reader.readLine();\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error reading line from reader, readFromStream() block\", e);\n }\n }\n return outputString.toString();\n }",
"private static String readAll(Reader rd,boolean graph) throws IOException {\n StringBuilder sb = new StringBuilder();\n int cp;\n int count = 0;\n while ((cp = rd.read()) != -1) {\n count++;\n sb.append((char) cp);\n }\n //System.out.println(sb.toString());\n if(graph == false) {\n System.out.println(sb.deleteCharAt(0));\n System.out.println(sb.deleteCharAt(count - 2));\n }\n return sb.toString();\n }",
"private String getXMLText(final XMLStreamReader reader)\n throws XMLStreamException {\n String text = null;\n if (reader.hasNext()) {\n reader.next();\n text = reader.getText();\n }\n return text;\n }",
"private synchronized String readString(int len) throws IOException {\n\t\tread(bytes, len);\n\t\treturn readString(bytes, 0, len);\n\t}",
"private String getInstanceFromFile() throws IOException{\n StringBuilder instance = new StringBuilder();\n boolean over = false;\n while(!over){\n char c = (char) reader.read();\n if(c == '\\n')\n over = true;\n else\n instance.append(c);\n }\n return instance.toString();\n }",
"private String readStream(InputStream is) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = is.read();\n while(i != -1) {\n bo.write(i);\n i = is.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }",
"private String readStream(InputStream is) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(is),1000);\n for (String line = r.readLine(); line != null; line =r.readLine()){\n sb.append(line);\n }\n is.close();\n return sb.toString();\n }",
"public static String getText(Reader reader) throws IOException {\n BufferedReader bufferedReader = new BufferedReader(reader);\n return getText(bufferedReader);\n }",
"public static String readString() {\n return in.nextLine();\n }",
"private String readLine() {\n\t\ttry {\n\t\t\treturn reader.nextLine();\t\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"private static String getStringFromInputStream(InputStream is) {\r\n\r\n BufferedReader br = null;\r\n StringBuilder sb = new StringBuilder();\r\n\r\n String line;\r\n try {\r\n\r\n br = new BufferedReader(new InputStreamReader(is));\r\n while ((line = br.readLine()) != null) {\r\n sb.append(line);\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n if (br != null) {\r\n try {\r\n br.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n return sb.toString();\r\n\r\n }",
"public String readString(){\n\t\tif(sc.hasNext()){\n\t\t\treturn sc.next();\n\t\t}\n\t\tsc.nextLine();\n\t\treturn null;\n\t}",
"public String read();",
"private String inputStreamToString(InputStream is) {\n Scanner scanner = new Scanner(is);\n Scanner tokenizer = scanner.useDelimiter(\"\\\\A\");\n String str = tokenizer.hasNext() ? tokenizer.next() : \"\";\n scanner.close();\n return str;\n }",
"public String readString() {\n byte[] byteForStream = new byte[1024];\n String message = \"\";\n\n mListener.onCarRunning();\n\n\n int bytes;\n\n while (true) {\n try {\n bytes = mInputStream.read(byteForStream);\n message = new String(byteForStream, 0, bytes);\n Log.d(TAG, \" Read from inputstream \" + message);\n\n } catch (IOException e) {\n Log.e(TAG, \" error reading from inputstream \" + e.getMessage());\n break;\n }\n }\n return message;\n }",
"public String read()\n\t{\n\t\ttry\n\t\t{\n\t\t\tint startAt = 0;\n\t\t\tString tempRead = inFromClient.readLine();\n\t\t\t\n\t\t\t// Clear out any nonalphabetic characters from the input buffer if\n\t\t\t// the user has just connected.\n\t\t\tif (!hasReadOnce)\n\t\t\t{\n\t\t\t\tfor (int ctr = 0; ctr < tempRead.length(); ctr++)\n\t\t\t\t{\n\t\t\t\t\tif ((tempRead.charAt(ctr) >= 'a' && tempRead.charAt(ctr) <= 'z')\n\t\t\t\t\t\t|| (tempRead.charAt(ctr) >= 'A' && tempRead.charAt(ctr) <= 'Z'))\n\t\t\t\t\t{\n\t\t\t\t\t\tstartAt = ctr;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thasReadOnce = true;\n\t\t\t}\n\n\t\t\thasPrinted = true;\n\t\t\ttempRead = tempRead.substring(startAt, tempRead.length());\n\t\t\t\n\t\t\t// Never return nonprintable characters. To support windows telnet, go back one\n\t\t\t// character for each backspace (chr #8) encountered.\n\t\t\tString newRead = \"\";\n\t\t\tfor (int ctr = 0; ctr < tempRead.length(); ctr++)\n\t\t\t{\n\t\t\t\tif (tempRead.charAt(ctr) > 31)\n\t\t\t\t\tnewRead = newRead+tempRead.charAt(ctr);\n\t\t\t\tif (tempRead.charAt(ctr) == 8 && newRead.length() > 0)\n\t\t\t\t\tnewRead = newRead.substring(0, newRead.length()-1);\n\t\t\t}\n\n\t\t\treturn newRead;\n\n\t\t} catch (NullPointerException e) {\n\t\t\tthis.closeSocket();\n\t\t\tif (ch.shortName.length() > 0)\n\t\t\t\tsysLog(\"connections\", \"Socket closed unexpectedly: \"+ch.shortName);\n\t\t\telse\n\t\t\t\tsysLog(\"connections\", \"Socket closed unexpectedly: No character.\");\n\t\t\treturn \"\";\n\t\t} catch (SocketException e) {\n\t\t\treturn \"\";\n\t\t} catch (Exception e) {\n\t\t\tif (ch.shortName.length() > 0)\n\t\t\t\tsysLog(\"connections\", \"Socket closed unexpectedly: \"+ch.shortName);\n\t\t\telse\n\t\t\t\tsysLog(\"connections\", \"Socket closed unexpectedly: No character.\");\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public static String read(InputStream in) throws IOException {\n\t\tStringBuilder result = new StringBuilder();\n\t try {\n\t byte[] buf = new byte[1024]; int r = 0;\n\t while ((r = in.read(buf)) != -1) {result.append(new String(buf, 0, r));}\n\t } finally { in.close();}\n\t\tString text=result.toString();\n\t\treturn text;\n\t}",
"private StringBuilder inputStreamToString(InputStream is) {\n String rLine = \"\";\n StringBuilder answer = new StringBuilder();\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\n try {\n while ((rLine = br.readLine()) != null) {\n answer.append(rLine);\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return answer;\n }",
"protected String readFullyAsString(InputStream inputStream)\n\t\t\tthrows IOException {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tbyte[] buffer = new byte[1024];\n\t\tint length;\n\t\twhile ((length = inputStream.read(buffer)) != -1) {\n\t\t\tbaos.write(buffer, 0, length);\n\t\t}\n\t\treturn baos.toString(StandardCharsets.UTF_8.name());\n\t}",
"public String read() {\n\t\tStringBuffer text = new StringBuffer((int)file.length());\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader b = new BufferedReader(fr);\n\t\t\tboolean eof = false;\n\t\t\tString line;\n\t\t\tString ret = \"\\n\";\n\t\t\twhile (!eof) {\n\t\t\t\tline = b.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t} else {\n\t\t\t\t\ttext.append(line);\n\t\t\t\t\ttext.append(ret);\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"File \" + file.getName() +\n\t\t\t\t\" is unreadable : \" + e.toString());\n\t\t}\n\t\treturn text.toString();\n\t}",
"public String readString(){\r\n byte[] pLen = new byte[1];\r\n byte[] pTAG = new byte[1];\r\n byte[] pSN = new byte[10];\r\n byte[] pNumTagFound = new byte[1];\r\n short tag = cardReader.select(handle,pTAG, pLen, pSN);\r\n if (tag < 0 ){\r\n message = \"No card found\";\r\n System.err.println(message);\r\n }\r\n if (!login()) return \"No card found\";\r\n String s;\r\n byte[] bdata = new byte[16];\r\n cardReader.read(handle,blocknr,bdata);\r\n s = new String(bdata);\r\n System.err.println(\"Read block: \" + s); \r\n return s;\r\n }",
"private static String convertInputStreamToString(InputStream inputStream) throws IOException{\t\t\t\t\t\t\t\t\t\n\n\t\tBufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));\t\t\t\t\t\t\t\t\t\n\t\tString line = \"\";\t\t\t\t\t\t\t\t\t\n\t\tString result = \"\";\t\t\t\t\t\t\t\t\t\n\t\twhile((line = bufferedReader.readLine()) != null)\t{\t\t\t\t\t\t\t\t\n\t\t\tresult += line;\t\t\t\t\t\t\t\t\n\t\t}\t\t\t\t\t\t\t\t\t\n\n\t\tinputStream.close();\t\t\t\t\t\t\t\t\t\n\t\treturn result;\t\t\t\t\t\t\t\t\t\n\t}",
"static String loadStream(InputStream in) throws IOException { \n\t\tint ptr = 0; \n\t\tin = new BufferedInputStream(in); \n\t\tStringBuffer buffer = new StringBuffer(); \n\t\twhile( (ptr = in.read()) != -1 ) { \n\t\t\tbuffer.append((char)ptr); \n\t\t} \n\t\treturn buffer.toString(); \n\t}",
"String readString();",
"private static String readFromStream(InputStream inputStream) throws IOException {\n StringBuilder output = new StringBuilder();\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"));\n BufferedReader reader = new BufferedReader(inputStreamReader);\n String line = reader.readLine();\n while (line != null) {\n output.append(line);\n line = reader.readLine();\n }\n }\n return output.toString();\n }",
"public String toString() {\n if (writer != null) {\n writer.close();\n return writer.toString();\n }\n else\n if (blockIn != null) {\n return blockIn;\n } else {\n return \"\";\n }\n }",
"private String streamToString(InputStream is) throws IOException {\n String str = \"\";\n \n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n \n try {\n BufferedReader reader = new BufferedReader(\n new InputStreamReader(is));\n \n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n \n reader.close();\n } finally {\n is.close();\n }\n \n str = sb.toString();\n }\n \n return str;\n }",
"public static StringBlock read(IntReader reader) throws IOException {\n ChunkUtil.readCheckType(reader, CHUNK_TYPE);\n int chunkSize = reader.readInt();\n int stringCount = reader.readInt();\n int styleOffsetCount = reader.readInt();\n int flags = reader.readInt();\n int stringsOffset = reader.readInt();\n int stylesOffset = reader.readInt();\n\n StringBlock block = new StringBlock();\n block.m_isUTF8 = (flags & UTF8_FLAG) != 0;\n block.m_stringOffsets = reader.readIntArray(stringCount);\n if (styleOffsetCount != 0) {\n block.m_styleOffsets = reader.readIntArray(styleOffsetCount);\n }\n {\n int size = ((stylesOffset == 0) ? chunkSize : stylesOffset) - stringsOffset;\n block.m_strings = new byte[size];\n reader.readFully(block.m_strings);\n }\n if (stylesOffset != 0) {\n int size = (chunkSize - stylesOffset);\n if ((size % 4) != 0) {\n throw new IOException(\"Style data size is not multiple of 4 (\" + size + \").\");\n }\n block.m_styles = reader.readIntArray(size / 4);\n }\n\n return block;\n }",
"protected abstract Reader getReader() throws IOException;",
"public String getStringFromInputStream(InputStream is) {\n\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n } finally {\n try {\n br.close();\n } catch (Exception e) {\n }\n br = null;\n return sb.toString();\n }\n }",
"private static String readStr(InputStream stream, int length, boolean allowEof) throws IOException {\n byte[] b = new byte[length];\n int readBytes = stream.read(b);\n if (readBytes != length && !(allowEof && length == 0)) {\n throw new EOFException(\"Unexpected end of steam. Read bytes \" + readBytes + \"; required \" + length);\n }\n\n return new String(b, ENCODING);\n }",
"private String readFully(String filename) throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(filename));\n\t\tStringBuilder buf=new StringBuilder();\n\t\tchar[] data=new char[8192];\n\t\tint num=reader.read(data);\n\t\twhile(num>-1){\n\t\t\tbuf.append(data,0,num);\n\t\t\tnum=reader.read(data);\n\t\t}\n\t\treturn buf.toString();\n\t}",
"private static String convertInputStreamToString(InputStream inputStream) throws IOException{\n BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream));\n String line = \"\";\n String result = \"\";\n while((line = bufferedReader.readLine()) != null)\n result += line;\n\n inputStream.close();\n return result;\n\n }",
"public String read() {\n\t\tString Line = \"\";\n\t\tInteger[] byteCodes = compressFileReader();\n\t\tif (byteCodes == null)\n\t\t\treturn null;\n\t\tint index = 0;\n\t\tint nextCode = byteCodes[index++];\n\t\tString val = readingMap[nextCode];\n\n\t\twhile (index < byteCodes.length - 1) {\n\t\t\tLine += val;\n\t\t\tnextCode = byteCodes[index++];\n\t\t\tString s = readingMap[nextCode];\n\t\t\tif (s == null) {\n\t\t\t\t@SuppressWarnings(\"unused\")\n\t\t\t\tint i = 0;\n\t\t\t}\n\t\t\tif (readingkeysCount == nextCode)\n\t\t\t\ts = val + val.charAt(0);\n\t\t\tif (readingkeysCount < 256 + keysPossible)\n\t\t\t\treadingMap[readingkeysCount++] = val + s.charAt(0);\n\t\t\tval = s;\n\t\t}\n\t\tLine += val;\n\t\treturn Line + '\\n';\n\t}",
"public String next() {\n try {\n String result = fNextLine;\n if (fNextLine != null) {\n fNextLine = fIn.readLine();\n if (fNextLine == null) {\n fIn.close();\n }\n }\n\n return result;\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }",
"@Override\n\tpublic String getNext() throws IOException {\n\t\ttry {\n\t\t\t// Ignore space, tab, newLine, commentary\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = this.ignore(nextVal);\n\n\t\t\treturn (!isEndOfFile(nextVal)) ? this.getInstruction(nextVal) : null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\n\t}",
"public final String readNextLine() throws IOException {\r\n String str;\r\n if (buf_end-buf_pos <= 0) {\r\n if (fillBuffer() < 0) {\r\n throw new IOException(\"Error filling buffer!\");\r\n }\r\n }\r\n int lineEnd = -1;\r\n for (int i = buf_pos; i < buf_end; i++) {\r\n if (buffer[i] == '\\n') {\r\n lineEnd = i;\r\n break;\r\n }\r\n }\r\n if (lineEnd < 0) {\r\n StringBuilder input = new StringBuilder(256);\r\n int c;\r\n while (((c = read()) != -1) && (c != '\\n')) {\r\n input.append((char)c);\r\n }\r\n if ((c == -1) && (input.length() == 0)) {\r\n return null;\r\n }\r\n return input.toString();\r\n }\r\n\r\n if (lineEnd > 0 && buffer[lineEnd-1] == '\\r') {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos -1);\r\n }\r\n else {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos);\r\n }\r\n buf_pos = lineEnd +1;\r\n return str;\r\n }",
"@Override\n public String readLine() {\n try {\n return this.bufferedReader.readLine();\n } catch (IOException e) {\n return \"\";\n }\n }",
"public String readNextText(final String name) {\r\n\t\tfinal StringBuilder result = new StringBuilder();\r\n\t\treturn result.toString();\r\n\t}",
"public static String read(String filename) throws IOException {\n // Reading input by lines:\n BufferedReader in = new BufferedReader(new FileReader(filename));\n// BufferedInputStream in2 = new BufferedInputStream(new FileInputStream(filename));\n String s;\n int s2;\n StringBuilder sb = new StringBuilder();\n while((s = in.readLine())!= null)\n sb.append( s + \"\\n\");\n// sb.append((char) s2);\n in.close();\n return sb.toString();\n }",
"public String readFileBufferedReader() {\n String result = \"\";\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(new File(ALICE_PATH)));\n\n for (String x = in.readLine(); x != null; x = in.readLine()) {\n result = result + x + '\\n';\n }\n\n } catch (IOException e) {\n }\n\n if(in != null)try {\n in.close();\n } catch (IOException e) {\n }\n\n return result;\n }",
"static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }",
"public static String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(stream));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n return sb.toString();\n }",
"public String readLine() throws IOException {\n\t\t// Punt on this and use BufferedReader routines.\n\t\tBufferedReader d = new BufferedReader(new InputStreamReader(this));\n\t\treturn d.readLine();\n\t}",
"public String readStream(InputStream in) {\n BufferedReader reader = null;\n StringBuffer data = new StringBuffer(\"\");\n try {\n reader = new BufferedReader(new InputStreamReader(in));\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n data.append(line);\n }\n } catch (IOException e) {\n Log.e(\"Log\", \"IOException\");\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return data.toString();\n }",
"public static char[] readReaderContents(Reader reader) throws CoreException {\r\n\t\tCheck.checkArg(reader);\r\n try {\r\n char[] buf = new char[1024];\r\n StringBuffer sb = new StringBuffer();\r\n int len;\r\n while ((len = reader.read(buf)) > 0) {\r\n sb.append(buf, 0, len);\r\n }\r\n reader.close();\r\n return sb.toString().toCharArray();\r\n } catch (UnsupportedEncodingException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n } catch (IOException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n }\r\n\t}",
"private String next(int i) throws IOException {\r\n\t\tif(buffer!=null) {\r\n\t\t\tString s=buffer;\r\n\t\t\tbuffer=null;\r\n\t\t\treturn s;\r\n\t\t}\r\n\t\tif (i==0) {\r\n\t\t\treturn in.readLine();\r\n\t\t} else return in2.readLine();\r\n\t}",
"public static String GetStringFromInputStream(InputStream is) {\n\t\tString line;\n\t\tStringBuilder total = new StringBuilder();\n\n\t\t// Wrap a BufferedReader around the InputStream\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is));\n\n\t\t// Read response until the end\n\t\ttry {\n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\ttotal.append(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tis.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tUtilities\n\t\t\t\t\t\t.LogWarning(\"GetStringFromInputStream - could not close stream\");\n\t\t\t}\n\t\t}\n\n\t\t// Return full string\n\t\treturn total.toString();\n\t}",
"private static String convertInputStreamToString(InputStream inputStream) throws IOException {\n BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream));\n String line = \"\";\n String result = \"\";\n while((line = bufferedReader.readLine()) != null)\n result += line;\n\n inputStream.close();\n return result;\n\n }",
"public final String getStringFromFile(final int length) throws IOException {\r\n\r\n if (length <= 0) {\r\n return new String(\"\");\r\n }\r\n\r\n byte[] b = new byte[length];\r\n raFile.readFully(b);\r\n final String s = new String(b);\r\n b = null;\r\n return s;\r\n }",
"@NonNull\n public static String getStringFrom(InputStream inputStream) {\n StringBuffer dataStringBuffer = new StringBuffer(\"\");\n try {\n InputStreamReader isr = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(isr);\n String readString = bufferedReader.readLine();\n while (readString != null) {\n dataStringBuffer.append(readString);\n readString = bufferedReader.readLine();\n }\n isr.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n return dataStringBuffer.toString();\n }",
"@Override\n public String readFile(BufferedReader reader)\n {\n try\n {\n StringBuffer strLine = new StringBuffer();\n String line;\n\n while ((line = reader.readLine()) != null)\n {\n if (!line.startsWith(\"--\", 0))\n {\n strLine.append(line);\n\n // use ; as the command delimiter and execute the query on the database.\n if (line.endsWith(\";\"))\n {\n super.exeQuery(strLine.toString());\n strLine = new StringBuffer();\n }\n }\n }\n\n return strLine.toString();\n }\n catch (IOException ioex)\n {\n logger.error(\"Error reading contents from file.\");\n return null;\n }\n }",
"private static String readFile(String file) throws IOException { //Doesn't work - possible error with FileReader\n //BufferedReader reader = new BufferedReader(new FileReader(file));\n //FileReader reader=new FileReader(file);\n\n\n FileReader file2 = new FileReader(file);\n System.out.println(\"Inside readFile\");\n BufferedReader buffer = new BufferedReader(file2);\n\n\n\n //String line = null;\n String line=\"\";\n\n StringBuilder stringBuilder = new StringBuilder();\n String ls = System.getProperty(\"line.separator\");\n try {\n while ((line = buffer.readLine()) != null) {\n System.out.println(line);\n stringBuilder.append(line);\n stringBuilder.append(ls);\n }\n return stringBuilder.toString();\n\n }finally{\n buffer.close();//https://stackoverflow.com/questions/326390/how-do-i-create-a-java-string-from-the-contents-of-a-file\n }\n /*Scanner scanner = null;\n scanner = new Scanner(file);\n StringBuilder stringBuilder = new StringBuilder();\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n stringBuilder.append(line);\n\n System.out.println(\"line: \"+line);\n }\n return stringBuilder.toString();*/\n\n }",
"public String readUTF() throws IOException;",
"public static String readString(String prompt) throws IOException {\r\n\t\tString value = \"\";\r\n\t\twhile (true) {\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.print(prompt + \" _>\");\r\n\t\t\t\tvalue = reader.readLine();\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.err.println(ex.getLocalizedMessage());\r\n\t\t\t\tthrow ex;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn value;\r\n\t}",
"public Reader getReader() {\n return in;\n }",
"private static String readUntil(InputStreamReader r, char limit)\n\t\t\tthrows IOException {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int i = r.read(); i != -1; i = r.read()) {\n\t\t\tchar c = (char) i;\n\t\t\tbuilder.append(c);\n\t\t\tif (c == limit) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn builder.toString();\n\t}",
"public static String getStringFromInputStream(InputStream is) {\n\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return sb.toString();\n }",
"protected abstract Reader read() throws IOException;",
"private String nextLine(BufferedReader reader) throws IOException {\n String ln = reader.readLine();\n if (ln != null) {\n int ci = ln.indexOf('#');\n if (ci >= 0)\n ln = ln.substring(0, ci);\n ln = ln.trim();\n }\n return ln;\n }",
"public String getRecord(long offset) throws IOException {\n\t\tdataBase.seek(offset);\n\t\treturn dataBase.readLine();\n\t}",
"public String getStringContent() throws IOException;"
] | [
"0.7598298",
"0.68845993",
"0.6679152",
"0.6657902",
"0.6644316",
"0.6644316",
"0.6482999",
"0.6392372",
"0.6258061",
"0.6241162",
"0.6229719",
"0.6190207",
"0.61830074",
"0.6137014",
"0.6115781",
"0.6096509",
"0.60175663",
"0.5987121",
"0.59604806",
"0.5952931",
"0.5927848",
"0.5927656",
"0.59258705",
"0.58919823",
"0.5861227",
"0.585353",
"0.5838036",
"0.5825284",
"0.5818493",
"0.5816045",
"0.57768327",
"0.5771638",
"0.5768918",
"0.5754638",
"0.5754638",
"0.57355756",
"0.57229286",
"0.57227916",
"0.5720536",
"0.56877863",
"0.5671062",
"0.5668076",
"0.5645297",
"0.5639873",
"0.56134045",
"0.5611137",
"0.55856526",
"0.5574651",
"0.5574449",
"0.55431587",
"0.55343884",
"0.553288",
"0.55311954",
"0.55274725",
"0.55126727",
"0.5507844",
"0.5506084",
"0.54785186",
"0.5471343",
"0.5468116",
"0.54563534",
"0.54544955",
"0.5441302",
"0.543882",
"0.5437632",
"0.5432313",
"0.5429319",
"0.5429071",
"0.5428816",
"0.5427975",
"0.5410766",
"0.53998667",
"0.5390049",
"0.53822386",
"0.5374676",
"0.5371982",
"0.535579",
"0.53436816",
"0.5338517",
"0.5333055",
"0.53278464",
"0.53253406",
"0.532136",
"0.5313005",
"0.5312708",
"0.5311897",
"0.5303854",
"0.5277045",
"0.5276207",
"0.5275793",
"0.52725345",
"0.5268775",
"0.5264064",
"0.5260591",
"0.5259669",
"0.52510256",
"0.52510124",
"0.5245838",
"0.5245672",
"0.52403843"
] | 0.75710344 | 1 |
Returns the ASCII characters up to but not including the next "\r\n", or "\n". | public static String readAsciiLine(InputStream in) throws IOException {
// TODO: support UTF-8 here instead
StringBuilder result = new StringBuilder(80);
while (true) {
int c = in.read();
if (c == -1) {
throw new EOFException();
} else if (c == '\n') {
break;
}
result.append((char) c);
}
int length = result.length();
if (length > 0 && result.charAt(length - 1) == '\r') {
result.setLength(length - 1);
}
return result.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void getNonBlank() throws IOException{\n while(curr_char == 32)\n {\n curr_char = pbIn.read();\n }\n }",
"private String readStringUntil0x() throws IOException {\n String thisLine = \"\";\n int ch;\n while ((ch = ins.read()) != -1) {\n if (ch != 0x0) {\n thisLine = thisLine + String.valueOf((char) ch);\n } else {\n break;\n }\n }\n return thisLine;\n }",
"private char read() throws SAXException, IOException {\n for (;;) { // the loop is here for the CRLF case\n if (unreadBuffer != -1) {\n char c = (char) unreadBuffer;\n unreadBuffer = -1;\n return c;\n }\n assert (bufLen > -1);\n pos++;\n assert pos <= bufLen;\n linePrev = line;\n colPrevPrev = colPrev;\n colPrev = col;\n col++;\n if (pos == bufLen) {\n boolean charDataContinuation = false;\n if (cstart > -1) {\n flushChars();\n charDataContinuation = true;\n }\n bufLen = reader.read(buf);\n assert bufLen <= buf.length;\n if (bufLen == -1) {\n return '\\u0000';\n } else {\n for (int i = 0; i < characterHandlers.length; i++) {\n CharacterHandler ch = characterHandlers[i];\n ch.characters(buf, 0, bufLen);\n }\n }\n if (charDataContinuation) {\n cstart = 0;\n }\n pos = 0;\n }\n char c = buf[pos];\n if (c > '\\u007F' && nonAsciiProhibited\n && !alreadyComplainedAboutNonAscii) {\n err(\"The character encoding of the document was not explicit but the document contains non-ASCII.\");\n }\n switch (c) {\n case '\\n':\n /*\n * U+000D CARRIAGE RETURN (CR) characters, and U+000A LINE\n * FEED (LF) characters, are treated specially. Any CR\n * characters that are followed by LF characters must be\n * removed, and any CR characters not followed by LF\n * characters must be converted to LF characters.\n */\n if (prev == '\\r') {\n // swallow the LF\n colPrev = colPrevPrev;\n col = 0;\n if (cstart != -1) {\n flushChars();\n cstart = pos + 1;\n }\n prev = c;\n continue;\n } else {\n linePrev = line;\n line++;\n colPrevPrev = colPrev;\n colPrev = col;\n col = 0;\n }\n break;\n case '\\r':\n c = buf[pos] = '\\n';\n linePrev = line;\n line++;\n colPrevPrev = colPrev;\n colPrev = col;\n col = 0;\n prev = '\\r';\n if (contentModelFlag != ContentModelFlag.PCDATA) {\n prevFourPtr++;\n prevFourPtr %= 4;\n prevFour[prevFourPtr] = c;\n }\n return c;\n case '\\u0000':\n /*\n * All U+0000 NULL characters in the input must be replaced\n * by U+FFFD REPLACEMENT CHARACTERs. Any occurrences of such\n * characters is a parse error.\n */\n err(\"Found U+0000 in the character stream.\");\n c = buf[pos] = '\\uFFFD';\n break;\n case '\\u000B':\n case '\\u000C':\n if (inContent) {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.FATAL) {\n fatal(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n } else {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.ALTER_INFOSET) {\n c = buf[pos] = ' ';\n }\n warn(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n }\n }\n break;\n default:\n if ((c & 0xFC00) == 0xDC00) {\n // Got a low surrogate. See if prev was high surrogate\n if ((prev & 0xFC00) == 0xD800) {\n int intVal = (prev << 10) + c + SURROGATE_OFFSET;\n if (isNonCharacter(intVal)) {\n warn(\"Astral non-character.\");\n }\n if (isAstralPrivateUse(intVal)) {\n warnAboutPrivateUseChar();\n }\n } else {\n // XXX figure out what to do about lone high\n // surrogates\n err(\"Found low surrogate without high surrogate.\");\n c = buf[pos] = '\\uFFFD';\n }\n } else if (inContent && (c < ' ' || isNonCharacter(c))\n && (c != '\\t')) {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.FATAL) {\n fatal(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n } else {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.ALTER_INFOSET) {\n c = buf[pos] = '\\uFFFD';\n }\n warn(\"This document is not mappable to XML 1.0 without data loss due to a character that is not a legal XML 1.0 character.\");\n }\n } else if (isPrivateUse(c)) {\n warnAboutPrivateUseChar();\n }\n }\n prev = c;\n if (contentModelFlag != ContentModelFlag.PCDATA) {\n prevFourPtr++;\n prevFourPtr %= 4;\n prevFour[prevFourPtr] = c;\n }\n return c;\n }\n }",
"public char readCharNonBlock() {\n return ((char) readLongNonBlock());\n }",
"char[] getCharContent() throws IOException;",
"@Override\n\tpublic SerializableString getEscapeSequence(int ch) {\n\t\t// no further escaping (beyond ASCII chars) needed:\n\t\treturn null;\n\t}",
"public String getCharacterSequence();",
"@Override\n public Character next() {\n int charValue;\n if (linePos >= LINE_LEN) {\n charValue = CARRIAGE_RETURN;\n asciiBase = 0;\n linePos = -2;\n lines++;\n // Skips lines starting with alphanumeric characters to preserve formatting\n while (Character.isLetterOrDigit((char)(lines % ASCII_RANGE) + ASCII_START)) {\n lines++;\n }\n }\n else if (linePos < 0) {\n charValue = LINE_FEED;\n }\n else {\n charValue = ((asciiBase + linePos + lines) % ASCII_RANGE) + ASCII_START;\n while (Character.isLetterOrDigit((char)charValue)) {\n asciiBase++;\n charValue = ((asciiBase + linePos + lines) % ASCII_RANGE) + ASCII_START;\n }\n itemsToSend--;\n }\n linePos++;\n return new Character((char) charValue);\n }",
"private char getChar() {\n\t\t//Must declare as int, because -1 in char is 65535\n\t\tint c = '\\0';\n\t\ttry {\n\t\t\tc = inFile.read();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error occurred when trying to read characters\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (c == -1) {\n\t\t\teof = true;\n\t\t\treturn EndOfFile;\n\t\t} else if (c == '\\n' || c == '\\r') {\n\t\t\tlineNumber++;\n\t\t}\n\t\treturn (char) c;\t\n\t}",
"public final String readASCIILine() throws IOException\n {\n char buf[] = lineBuffer;\n\n if (buf == null)\n {\n buf = lineBuffer = new char[128];\n }\n\n int room = buf.length;\n int offset = 0;\n int c;\n\n loop: while (true)\n {\n switch (c = in.read())\n {\n case -1:\n case '\\n':\n break loop;\n\n case '\\r':\n int c2 = in.read();\n if ((c2 != '\\n') && (c2 != -1))\n {\n if (!(in instanceof PushbackInputStream))\n {\n in = new PushbackInputStream(in);\n }\n ((PushbackInputStream) in).unread(c2);\n }\n break loop;\n\n default:\n if (--room < 0)\n {\n buf = new char[offset + 128];\n room = buf.length - offset - 1;\n System.arraycopy(lineBuffer, 0, buf, 0, offset);\n lineBuffer = buf;\n }\n buf[offset++] = (char) c;\n break;\n }\n }\n if ((c == -1) && (offset == 0))\n {\n return null;\n }\n return String.copyValueOf(buf, 0, offset);\n }",
"private int readSkipWs() throws IOException {\n for (;;) {\n int c = _in.read();\n if (c == -1 || c > ' ') {\n return c;\n }\n }\n }",
"public char nextClean() throws JSONException {\n for(;;) {\n char c = this.next();\n if(c == 0 || c > ' ') {\n return c;\n }\n }\n }",
"public int getCharEnd() {\n\t\treturn -1;\n\t}",
"@Test(timeout = 4000)\n public void test063() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n javaCharStream0.maxNextCharInd = 2;\n javaCharStream0.prevCharIsCR = true;\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('\\u0000', char0);\n }",
"char skipSpaces () {\n char c = getChar ();\n while (c == ' ' || c == '\\t' || c == '\\n' || c == '\\r') {\n if (c == '\\n') { m_nbLines++; }\n c = getNextChar ();\n }\n return c;\n }",
"private String quitarCaracteresNoImprimibles(String mensaje) {\n String newMensaje = \"\";\n int codigoLetra = 0;\n for (char letra : mensaje.toCharArray()) {\n codigoLetra = (int) letra;\n if (codigoLetra >= 32 && codigoLetra <= 128) {\n newMensaje += letra;\n }\n }\n return newMensaje;\n }",
"char getPreviousReadChar();",
"private int skipWhitespace() {\n int prev = '\\n';\n while (position < length) {\n int c = data.charAt(position);\n switch (c) {\n case '\\t': case ' ':\n prev = c;\n position++;\n break;\n case '\\n':\n // handle \\r\\n\n if (prev != '\\r') {\n lineNumber++;\n }\n prev = c;\n position++;\n break;\n case '\\r':\n prev = c;\n position++;\n lineNumber++;\n break;\n default:\n return prev;\n }\n }\n return prev;\n }",
"@Override\n\tpublic int[] getEscapeCodesForAscii() {\n\t\treturn asciiEscapes;\n\t}",
"public CharacterEscapes getCharacterEscapes()\n/* */ {\n/* 659 */ return this._characterEscapes;\n/* */ }",
"private boolean skipNewline() {\n\t\tif (nextChar == '\\n') {\n\n\t\t\tnextChar = getChar();\n\t\t\treturn true;\n\t\t}\n\t\tif (nextChar == '\\r') {\n\t\t\tlineNumber++;\n\t\t\tcolumnNumber = 1;\n\t\t\tnextChar = getChar();\n\n\t\t\t// skip over next char if '\\n'\n\t\t\tif (nextChar == '\\n')\n\t\t\t\tnextChar = getChar();\n\t\t\treturn true;\n\t\t}\n\t\t// newline char not found\n\t\treturn false;\n\t}",
"int getEndCharIndex();",
"public char next() throws JSONException {\n int c;\n if(this.usePrevious) {\n this.usePrevious = false;\n c = this.previous;\n } else {\n try {\n c = this.reader.read();\n } catch (IOException e) {\n throw new JSONException(e);\n }\n\n if(c <= 0) {\n this.eof = true;\n c = 0;\n }\n }\n\n this.index += 1;\n if(this.previous == '\\r') {\n this.line += 1;\n this.character = c == '\\n' ? 0 : 1;\n } else if(c == '\\n') {\n this.line += 1;\n this.character = 0;\n } else {\n this.character += 1;\n }\n\n this.previous = (char) c;\n\n return this.previous;\n }",
"public int getCharStart() {\n\t\treturn -1;\n\t}",
"private static char unescapeNonASCIIChar(String str) {\n\t\treturn (char) Integer.parseInt(str.substring(2, 4), 16);\n\t}",
"public char failsafe_GET()\n { return (char)((char) get_bytes(data, 35, 1)); }",
"public final char EOS () {\n\t\t\treturn EOS_CHAR;\n\t\t}",
"private String validateChar(String text) {\n char[] validChars = new char[text.length()];\n int validCount = 0;\n for (int i = 0; i < text.length(); i++) {\n char c = text.charAt(i);\n boolean valid = (c >= 0x20 && c <= 0xd7ff) || (c >= 0xe000 && c <= 0xfffd);\n if (valid) {\n validChars[validCount++] = c;\n } else {\n if (c == 10) // LineBreak\n {\n validChars[validCount++] = c;\n }\n }\n }\n return new String(validChars, 0, validCount);\n }",
"char getChar () { \n return m_pos < m_len ? m_buffer.charAt (m_pos) : '\\0';\n }",
"public char getChar()\n throws IOException\n {\n return (char) lineNumberReader.read();\n }",
"private int huntLeft(String in, int offset) {\n char temp = 0;\n for(int i = offset - 1; i >= 0; i--) {\n temp = in.charAt(i);\n if(temp == '\\n' || temp == '\\r')\n return i;\n }\n return 0; //eof counts\n }",
"public String getVideoBufferCharacters()\n\t{\n\t\tint maxRows, maxCols, index;\n\t\tStringBuffer text;\n\t\t\n\t\t// Retrieve screen dimension in text mode\n\t\tmaxRows = screen.getScreenRows();\n\t\tmaxCols = screen.getScreenColumns();\n\t\t\n\t\t// Create initial stringbuffer\n\t\ttext = new StringBuffer(maxRows * maxCols);\n\t\t\n\t\t// Convert each character in textSnapshot into Unicode character\n\t\tfor (int row = 0; row < maxRows; row++)\n\t\t{\n\t\t\tfor (int col = 0; col < maxCols; col++)\n\t\t\t{\n\t\t\t\tindex = videocard.textSnapshot[(row * maxCols * 2) + (col * 2)] & 0xFF;\n\t\t\t\tif (index < 255)\n\t\t\t\t{\n\t\t\t\t\ttext.append(textTranslation.asciiToUnicode[index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Add a newline at the end of row\n\t\t\ttext.append(\"\\n\");\n\t\t}\n\t\t\n\t\treturn text.toString();\n\t}",
"public FontCharCodeIterator getCharCodeIterator() throws PDFNetException {\n/* 684 */ return new FontCharCodeIterator(GetCharCodeIterator(this.a), this.b);\n/* */ }",
"@Test(timeout = 4000)\n public void test009() throws Throwable {\n StringReader stringReader0 = new StringReader(\"kE4X 9\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1), 66, 1279);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('k', char0);\n }",
"char getEChar();",
"@Test\n\tpublic void test_ReadNextUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0, -22, -87, -107, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readNextUtf8String());\n\t\tassertEquals(\"\\uaa55\", br.readNextUtf8String());\n\t}",
"public String extractString()\n\t{\n\t\t// holds the string builder object to return\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\t// for every byte\n\t\tfor (int i = 0; i < bytes.length; i++)\n\t\t{\n\t\t\t// extract the current character\n\t\t\tchar current = (char) (bytes[i] & 0xFF);\n\t\t\t\n\t\t\t// append the character\n\t\t\tif (current > 0)\n\t\t\t{\n\t\t\t\tsb.append(current);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// return the string\n\t\treturn sb.toString();\n\t}",
"public char readChar() {\n return readNextLine().charAt(0);\n }",
"public static boolean isAsciiControl(char ch) {\n/* 441 */ return (ch < ' ' || ch == '');\n/* */ }",
"private DecoderState readControlChars(ByteBuf in) {\n\n DecoderState nextState = DecoderState.READ_CONTROL_CHARS;\n\n int index = in.forEachByte(new ByteBufProcessor() {\n @Override\n public boolean process(byte b) throws Exception {\n switch (b) {\n // This is a little more lax than the spec which allows for only\n // EOL character(s) between frames.\n case ' ':\n case CARRIAGE_RETURN_CHAR:\n case LINE_FEED_CHAR:\n case NULL_CHAR:\n // ignore the character\n return true;\n\n default:\n return false;\n }\n }\n });\n\n if (index != -1) {\n // A non-control character was found so we skip up to that index and\n // move to the next state.\n in.readerIndex(index);\n nextState = DecoderState.READ_COMMAND;\n }\n else {\n // Discard all available bytes because we couldn't find a\n // non-control character.\n in.readerIndex(in.writerIndex());\n }\n\n return nextState;\n }",
"public String nextTo(char c) {\n char next;\n AppMethodBeat.m2504i(50193);\n StringBuffer stringBuffer = new StringBuffer();\n while (true) {\n next = next();\n if (next != c && next != 0 && next != 10 && next != 13) {\n stringBuffer.append(next);\n } else if (next != 0) {\n back();\n }\n }\n if (next != 0) {\n }\n String trim = stringBuffer.toString().trim();\n AppMethodBeat.m2505o(50193);\n return trim;\n }",
"public char peekChar() throws Exception {\n currentChar();\n\n if (line == null) {\n return PascalToken.EOF_CHAR;\n }\n int nextPos = currentPos + 1;\n\n return nextPos < line.length() ? line.charAt(nextPos) : PascalToken.EOL_CHAR;\n }",
"@AutoEscape\n\tpublic String getNguoiChuTri();",
"public char getChar() throws IOException {\r\n\t\treturn (char)lineReader.read();\r\n\t}",
"public int get_char() {\n return local_char;\n }",
"public int getSingleChar() {\n return -1;\n }",
"public String read()\n\t{\n\t\ttry\n\t\t{\n\t\t\tint startAt = 0;\n\t\t\tString tempRead = inFromClient.readLine();\n\t\t\t\n\t\t\t// Clear out any nonalphabetic characters from the input buffer if\n\t\t\t// the user has just connected.\n\t\t\tif (!hasReadOnce)\n\t\t\t{\n\t\t\t\tfor (int ctr = 0; ctr < tempRead.length(); ctr++)\n\t\t\t\t{\n\t\t\t\t\tif ((tempRead.charAt(ctr) >= 'a' && tempRead.charAt(ctr) <= 'z')\n\t\t\t\t\t\t|| (tempRead.charAt(ctr) >= 'A' && tempRead.charAt(ctr) <= 'Z'))\n\t\t\t\t\t{\n\t\t\t\t\t\tstartAt = ctr;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thasReadOnce = true;\n\t\t\t}\n\n\t\t\thasPrinted = true;\n\t\t\ttempRead = tempRead.substring(startAt, tempRead.length());\n\t\t\t\n\t\t\t// Never return nonprintable characters. To support windows telnet, go back one\n\t\t\t// character for each backspace (chr #8) encountered.\n\t\t\tString newRead = \"\";\n\t\t\tfor (int ctr = 0; ctr < tempRead.length(); ctr++)\n\t\t\t{\n\t\t\t\tif (tempRead.charAt(ctr) > 31)\n\t\t\t\t\tnewRead = newRead+tempRead.charAt(ctr);\n\t\t\t\tif (tempRead.charAt(ctr) == 8 && newRead.length() > 0)\n\t\t\t\t\tnewRead = newRead.substring(0, newRead.length()-1);\n\t\t\t}\n\n\t\t\treturn newRead;\n\n\t\t} catch (NullPointerException e) {\n\t\t\tthis.closeSocket();\n\t\t\tif (ch.shortName.length() > 0)\n\t\t\t\tsysLog(\"connections\", \"Socket closed unexpectedly: \"+ch.shortName);\n\t\t\telse\n\t\t\t\tsysLog(\"connections\", \"Socket closed unexpectedly: No character.\");\n\t\t\treturn \"\";\n\t\t} catch (SocketException e) {\n\t\t\treturn \"\";\n\t\t} catch (Exception e) {\n\t\t\tif (ch.shortName.length() > 0)\n\t\t\t\tsysLog(\"connections\", \"Socket closed unexpectedly: \"+ch.shortName);\n\t\t\telse\n\t\t\t\tsysLog(\"connections\", \"Socket closed unexpectedly: No character.\");\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public char getRepersent()\n {\n return this.repersent;\n }",
"public final String readNextLine() throws IOException {\r\n String str;\r\n if (buf_end-buf_pos <= 0) {\r\n if (fillBuffer() < 0) {\r\n throw new IOException(\"Error filling buffer!\");\r\n }\r\n }\r\n int lineEnd = -1;\r\n for (int i = buf_pos; i < buf_end; i++) {\r\n if (buffer[i] == '\\n') {\r\n lineEnd = i;\r\n break;\r\n }\r\n }\r\n if (lineEnd < 0) {\r\n StringBuilder input = new StringBuilder(256);\r\n int c;\r\n while (((c = read()) != -1) && (c != '\\n')) {\r\n input.append((char)c);\r\n }\r\n if ((c == -1) && (input.length() == 0)) {\r\n return null;\r\n }\r\n return input.toString();\r\n }\r\n\r\n if (lineEnd > 0 && buffer[lineEnd-1] == '\\r') {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos -1);\r\n }\r\n else {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos);\r\n }\r\n buf_pos = lineEnd +1;\r\n return str;\r\n }",
"public String readString() {\n final int BUF_SIZE = 100;\n byte[] byteDest = new byte[BUF_SIZE];\n String ret = \"\";\n int num = BUF_SIZE;\n try {\n while (!ret.contains(\"\\r\")) {\n if ((num = in.read(byteDest)) > 0) {\n ret += new String(byteDest, 0, num);\n }\n }\n } catch (IOException e) {\n print(\"Error reading String from \" + portName);\n }\n print(\"Read :\" + ret + \":\");\n return ret;\n }",
"private char readUnicodeChar() throws IOException, DasmError {\n int result = 0;\n for (int i = 0; i < 4; i++) {\n readNextChar();\n if (nextChar == -1) return 0;\n\n int tmp = Character.digit((char) nextChar, 16);\n if (tmp == -1)\n throw new DasmError(\"Invalid '\\\\u' escape sequence\");\n result = (result << 4) | tmp;\n }\n return (char) result;\n }",
"@Override\n public String getChr() {\n return getContig();\n }",
"@Override\n\t\tpublic char[] getPrintChars() {\n\t\t\tif(this.color == RedBlackTree.BLACK){\n\t\t\t\tString intString = data.toString()+\"(B)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tString intString = data.toString()+\"(R)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t}\n\t\t\t\n\t\t}",
"@Test(timeout = 4000)\n public void test129() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.getBeginLine();\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"private int indexOfNextUnescapedChar(String s, char c, int start){\n int pos = 0;\n while(true){\n pos = s.indexOf(c, start+pos);\n if(pos <= 0)break;\n if((pos > start) && (s.charAt(pos-1) != '\\\\'))break;\n else pos++;\n }\n return pos;\n }",
"static char[] getAutoactivationChars() {\n\n // To enable content proposal on deleting a char\n \n String delete = new String(new char[] { 8 });\n String allChars = LCL + UCL + NUMS + delete;\n return allChars.toCharArray();\n }",
"private static String readLine(ResettableInputStream in, int maxLength)\n throws IOException {\n\n StringBuilder s = new StringBuilder();\n int c;\n int i = 1;\n while ((c = in.readChar()) != -1) {\n // FIXME: support \\r\\n\n if (c == '\\n') {\n break;\n }\n //System.out.printf(\"seen char val: %c\\n\", (char)c);\n s.append((char)c);\n\n if (i++ > maxLength) {\n System.out.println(\"Output: >\" + s + \"<\");\n throw new RuntimeException(\"Too far!\");\n }\n }\n if (s.length() > 0) {\n s.append('\\n');\n return s.toString();\n } else {\n return null;\n }\n }",
"private static String fixPrintWriterNewLine(String decodedString) {\n StringBuilder fixedString = new StringBuilder();\n for(int i = 0; i < decodedString.length(); i++) {\n\n if(decodedString.charAt(i) == '\\n' ) {\n fixedString.append(\"\\r\\n\");\n }\n else {\n fixedString.append(decodedString.charAt(i));\n }\n }\n return fixedString.toString();\n }",
"public String getCharacters()\n\t{\n\t\treturn characters;\n\t}",
"static void trimNL() {\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cn')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cr')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n }",
"public char readChar() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn (char) (-1);\n\t\treturn (char) last();\n\t}",
"static void trimNL(String s) {\n StringBuilder sb = new StringBuilder(s);\n while(sb.length() > 0 && (sb.charAt(sb.length() - 1) == '\\u005cr' || sb.charAt(sb.length() - 1) == '\\u005cn'))\n sb.deleteCharAt(sb.length() - 1);\n }",
"private char peek(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex>=iMessage.length()) return NONE;//return no character if beyond end of the message\r\n return iMessage.charAt(iIndex);//return current character\r\n \r\n }",
"public static String convertNonAscii(String s) {\r\n\t\tif (s == null)\r\n\t\t\treturn null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tint n = s.length();\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tif (i > n-6) {\r\n\t\t\t\tsb.append(s.charAt(i));\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tString c = s.substring(i, i+6);\r\n\t\t\tint pos;\r\n\t\t\tfor (pos = 0; pos < UNICODE_STRING.length && !UNICODE_STRING[pos].equals(c); pos++) ;\r\n\t\t\tif (pos < UNICODE_STRING.length) {\r\n\t\t\t\tsb.append(PLAIN_ASCII.charAt(pos));\r\n\t\t\t\ti += 5;\r\n\t\t\t} else {\r\n\t\t\t\tsb.append(c.charAt(0));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}",
"char getNextChar () {\n m_pos++; \n return getChar ();\n }",
"public static void expectAsciiAll(ByteReader r, String expected) {\n\t\tfor (int i = 0; i < expected.length(); i++) {\n\t\t\tchar c = (char) r.readUbyte();\n\t\t\tif (c == expected.charAt(i)) continue;\n\t\t\tif (i < expected.length() - 1) r.skip(expected.length() - i - 1);\n\t\t\tthrow exceptionf(\"Expected '%s': '%s'\", escape(expected.charAt(i)), escape(c));\n\t\t}\n\t}",
"public static int ascii(char c) {\n \treturn (int)c;\n }",
"private static int charAt(String data) {\n\t\treturn 0;\n\t}",
"private String getString(byte c) {\n\t\treturn c==1? \"$ \": \" \";\n\t}",
"@Pure\n public Integer getEndCharacter() {\n return this.endCharacter;\n }",
"private char next(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex>=iMessage.length()) return NONE;//return no character if beyond end of the message\r\n return iMessage.charAt(iIndex++);//return current character and advance to next\r\n \r\n }",
"private int getChar() {\n\n\t\ttry {\n\t\t\treturn stream.read();\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.print(e.getMessage());\n\t\t\tSystem.err.println(\"IOException occured in Lexer::getChar()\");\n\t\t\treturn -1;\n\t\t}\n\n\t}",
"public String getUntilMeetChar(char specialchar) {\r\n String result = \"\"; // store the extracted characters here\r\n \r\n // while we can extract characters\r\n while (true) {\r\n \r\n // if no next character return the built string\r\n if (!this.stream.hasNext()) return result;\r\n \r\n // consume a character from the stream\r\n char c = this.stream.next();\r\n \r\n // stop read if we meet a special char\r\n if (c==specialchar) return result;\r\n \r\n // unix line feed \\n\r\n if (c=='\\n') {\r\n this.currentline++; // track line\r\n return result;\r\n }\r\n \r\n // windows line feed \\r\\n\r\n if (c=='\\r' && this.stream.peek()=='\\n') {\r\n this.currentline++; // track line\r\n this.stream.next(); // consume the '\\n'\r\n return result;\r\n }\r\n \r\n // concat the char to the result string\r\n result += c;\r\n }\r\n }",
"public void ignorableWhitespace(char[] ch, int start, int length) { }",
"protected String getChar(String asciiCode) {\n\t\tString result = null;\n\t\tif(asciiCode == null){\n\t\t\t//default\n\t\t\tresult = \"|\";\n\t\t}else if (asciiCode.startsWith(\"#\")\n\t\t\t\t&& asciiCode.length() > 1) {\n\t\t\tresult = String.valueOf(Character.toChars(Integer.valueOf(asciiCode\n\t\t\t\t\t.substring(1))));\n\t\t} else {\n\t\t\tresult = asciiCode;\n\t\t}\n\t\treturn result;\n\t}",
"public char getChar();",
"private static String miniBlow(char c, int n){\n\t\tString result = \"\";\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tresult += c;\n\t\t}\n\t\treturn result;\n\t}",
"private int getNextChar() throws IOException{\n\t\tpos++;\n\t\tsourceReader.mark(20);\n\t\treturn sourceReader.read();\n\t}",
"static int chara(String a) {\n int character = 0;\n while ((16 * character) < a.length()) {\n character++;\n }\n return character;\n }",
"public char nextChar() {\n this.inputStr = this.s.nextLine();\n\n if (!inputStr.isEmpty()) {\n for (int i = 0; i < inputStr.length(); i++) {\n if (inputStr.charAt(i) >= 'A' && inputStr.charAt(i) <= 'Z') {\n return inputStr.charAt(i);\n } else if (inputStr.charAt(i) >= 'a' && inputStr.charAt(i) <= 'z') {\n return inputStr.charAt(i);\n }\n }\n }\n return ' ';\n }",
"public char currentChar() throws Exception {\n // first line?\n if (currentPos == -2) {\n readLine();\n return nextChar();\n }\n\n // at end of file?\n if (line == null) {\n return PascalToken.EOF_CHAR;\n }\n\n // at end of line?\n if (currentPos == -1 || currentPos == line.length()) {\n return PascalToken.EOL_CHAR;\n }\n\n // Need to read next line?\n if (currentPos > line.length()) {\n readLine();\n return nextChar();\n }\n // return char at current pos\n return line.charAt(currentPos);\n }",
"char getChar(int offset) throws BadLocationException;",
"public int nextC()\r\n\t{\r\n\t\tlastc = thisc;\t/* save current character, in case of backup */\r\n\t\t\r\n\t\t/* check for character waiting */\r\n\t\tif (holdc == 0) {\r\n\t\t\t/* no character waiting, get next from file,\r\n * ignore most control characters */\r\n\t\t\tdo {\r\n\t\t\t\tthisc = getC();\r\n\t\t\t\tif (thisc == EOF) return EOF;\r\n } while (thisc < 0x20 && ctlchars[thisc]);\r\n\r\n\t\t} else {\r\n\t\t\t/* we looked ahead, so use the saved character */\r\n\t\t\tthisc = holdc;\r\n\t\t\tholdc = 0;\r\n\t\t\tif (thisc == EOF) return EOF;\r\n\t\t}\r\n\t\r\n\t\t/* special rule for carriage return characters:\r\n\t\t * if CR is followed by LF, return just the LF\r\n\t\t * else replace the CR with a LF\r\n\t\t * but then we have to hold the character that isn't a LF,\r\n\t\t * unless it is an ignored character */\r\n\t\tif (thisc == '\\r') {\r\n\t\t holdc = getC();\r\n\t if (holdc < 0x20) {\r\n\t if (holdc == '\\n' || ctlchars[holdc]) holdc = 0;\r\n\t }\r\n\t\t thisc = '\\n';\r\n\t\t}\r\n\t\t\r\n\t\t/* capture the character in a buffer, for diagnostics */\r\n\t\tif (lastc == '\\n' || bufpos >= BUFSIZE) {\r\n\t\t\tprvsize = bufpos;\r\n\t\t\tbufpos = 0;\r\n\t\t\tcurrentbuf = 1 - currentbuf;\r\n\t\t}\r\n\t\tbuffer[currentbuf][bufpos++] = (byte)thisc;\r\n\t\r\n\t\treturn thisc;\r\n\t}",
"private int currentChar()\n {\n if (m_bufferOffset_ < 0) {\n m_source_.previousCodePoint();\n return m_source_.nextCodePoint();\n }\n\n // m_bufferOffset_ is never 0 in normal circumstances except after a\n // discontiguous contraction since it is always returned and moved\n // by 1 when we do nextChar()\n return UTF16.charAt(m_buffer_, m_bufferOffset_ - 1);\n }",
"public static int estimateConsecutiveAscii(ByteBuffer buffer, int index, int limit) {\n int i = index;\n int lim = limit - 7;\n while (i < lim && (buffer.getLong(i) & ASCII_MASK_LONG) == 0) {\n i += 8;\n }\n return i - index;\n }",
"public char nextChar() throws Exception {\n currentPos++;\n return currentChar();\n }",
"private static int lastnlposition(byte[] data, int len) {\n int at = -1;\n for(int i=len-1; i >= 0; i--) {\n if(data[i] == '\\n') {\n at = i;\n break;\n }\n }\n return at;\n }",
"private static String readAllBytes(Reader rd) throws IOException {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tint cp;\n\t\twhile ((cp = rd.read()) != -1) {\n\t\t\tstringBuilder.append((char) cp);\n\t\t}\n\t\treturn stringBuilder.toString();\n\t}",
"@Test(timeout = 4000)\n public void test053() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1, 0);\n char char0 = javaCharStream0.readChar();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndLine());\n assertEquals('Z', char0);\n }",
"private int readChar(boolean movePointer) throws Exception {\n if (_bi >= _blen) {\n _blen = _reader.read(_buf, 0, 2048);\n if (log) {\n StringBuffer sbBuffer = new StringBuffer();\n for (int i = 0; i < 300; i++) {\n sbBuffer.append(_buf[i]);\n }\n }\n log = false;\n\n _bi = 0;\n if (_blen < 0)\n return -1;\n }\n char ret = _buf[_bi];\n if (movePointer)\n _bi++;\n return ret;\n }",
"public abstract char getStarterChar();",
"private void skipBadChar() throws IOException {\n while (!isValid()) {\n if (c == -1 || isSpace() || shouldStop()) {\n return;\n }\n c = r.read();\n }\n }",
"static String trimStart(String s) {\n StringBuilder sb = new StringBuilder(s);\n while(sb.length() > 0 && (sb.charAt(0) == '\\u005cr'\n || sb.charAt(0) == '\\u005cn'\n || sb.charAt(0) == '\\u005ct'\n || sb.charAt(0) == ' ')) {\n sb.deleteCharAt(0);\n }\n return sb.toString();\n }",
"char readChar();",
"private String avoidErrorChar (String original) {\n\t\tStringBuffer modSB = new StringBuffer();\n\t\tfor (int j=0; j < original.length(); j++) {\n\t\t\tchar c = original.charAt(j);\n\t\t\tif (c == '\\n') {\n\t\t\t\tmodSB.append(\"\\\\n\"); // rimpiazzo il ritorno a capo con il simbolo \\n\n\t\t\t} else if (c == '\"') {\n\t\t\t\tmodSB.append(\"''\"); // rimpiazzo le doppie virgolette (\") con due apostofi ('')\n\t\t\t} else if ((int)c > 31 || (int)c !=127){ // non stampo i primi 32 caratteri di controllo\n\t\t\t\tmodSB.append(c);\n\t\t\t}\n\t\t}\n\t\treturn modSB.toString();\n\t}",
"public static String nl() {\n return nl;\n }",
"public static String stripNonValidXMLCharacters(String in) {\n if ((in == null) || in.isEmpty()) {\n return \"\"; // vacancy test.\n }\n StringBuilder out = new StringBuilder(in.length()); // Used to hold the output.\n for (int i = 0; i < in.length(); i++) {\n char current = in.charAt(i); // Used to reference the current character.\n // NOTE: No IndexOutOfBoundsException caught here; it should not happen.\n if ((current == 0x9) ||\n (current == 0xA) ||\n (current == 0xD) ||\n ((current >= 0x20) && (current <= 0xD7FF)) ||\n ((current >= 0xE000) && (current <= 0xFFFD)) ||\n ((current >= 0x10000) && (current <= 0x10FFFF)))\n {\n out.append(current);\n }\n }\n return out.toString();\n }",
"private boolean endline() {\r\n return (CHAR('\\r') || true) && CHAR('\\n');\r\n }",
"private void _writeStringASCII(int len, int maxNonEscaped)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1117 */ int end = this._outputTail + len;\n/* 1118 */ int[] escCodes = this._outputEscapes;\n/* 1119 */ int escLimit = Math.min(escCodes.length, maxNonEscaped + 1);\n/* 1120 */ int escCode = 0;\n/* */ \n/* */ \n/* 1123 */ while (this._outputTail < end)\n/* */ {\n/* */ char c;\n/* */ do\n/* */ {\n/* 1128 */ c = this._outputBuffer[this._outputTail];\n/* 1129 */ if (c < escLimit) {\n/* 1130 */ escCode = escCodes[c];\n/* 1131 */ if (escCode != 0) {\n/* */ break;\n/* */ }\n/* 1134 */ } else if (c > maxNonEscaped) {\n/* 1135 */ escCode = -1;\n/* 1136 */ break;\n/* */ }\n/* 1138 */ } while (++this._outputTail < end);\n/* 1139 */ break;\n/* */ \n/* */ \n/* 1142 */ int flushLen = this._outputTail - this._outputHead;\n/* 1143 */ if (flushLen > 0) {\n/* 1144 */ this._writer.write(this._outputBuffer, this._outputHead, flushLen);\n/* */ }\n/* 1146 */ this._outputTail += 1;\n/* 1147 */ _prependOrWriteCharacterEscape(c, escCode);\n/* */ }\n/* */ }",
"public String getString_entries_receiveEst() { \n char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,11)];\n int i;\n for (i = 0; i < carr.length; i++) {\n if ((char)getElement_entries_receiveEst(i) == (char)0) break;\n carr[i] = (char)getElement_entries_receiveEst(i);\n }\n return new String(carr,0,i);\n }"
] | [
"0.63273174",
"0.61041546",
"0.59768367",
"0.59725696",
"0.5896164",
"0.5831526",
"0.5788474",
"0.57611084",
"0.574291",
"0.5717369",
"0.5685016",
"0.56420463",
"0.55684406",
"0.5557532",
"0.5526444",
"0.54951894",
"0.5482825",
"0.547007",
"0.54234356",
"0.5412055",
"0.5400752",
"0.53902835",
"0.5371178",
"0.5370907",
"0.5351931",
"0.5324735",
"0.5293848",
"0.52772456",
"0.5268542",
"0.5234034",
"0.52263516",
"0.5222003",
"0.52174616",
"0.52171504",
"0.5213953",
"0.5211786",
"0.52073807",
"0.5196266",
"0.5192831",
"0.5191997",
"0.5180846",
"0.51794374",
"0.5174035",
"0.51669157",
"0.5159826",
"0.5157479",
"0.51493037",
"0.5142745",
"0.51414496",
"0.51402116",
"0.5136854",
"0.5130321",
"0.51287705",
"0.51081324",
"0.5103454",
"0.508388",
"0.50747675",
"0.5070478",
"0.50609547",
"0.5060415",
"0.5059183",
"0.505891",
"0.50556016",
"0.5053098",
"0.5040394",
"0.50394917",
"0.5038456",
"0.50382715",
"0.5032977",
"0.5028728",
"0.502694",
"0.5015406",
"0.5012794",
"0.50118506",
"0.50084245",
"0.50054103",
"0.49973413",
"0.49876505",
"0.49669033",
"0.49661535",
"0.49644575",
"0.49631292",
"0.4957988",
"0.49545228",
"0.49514788",
"0.49496356",
"0.4946968",
"0.4946227",
"0.49441773",
"0.49424827",
"0.49378446",
"0.4936104",
"0.49222717",
"0.49197653",
"0.4913398",
"0.49097672",
"0.49085724",
"0.49059114",
"0.4905098",
"0.4904637"
] | 0.55046624 | 15 |
Closes 'closeable', ignoring any checked exceptions. Does nothing if 'closeable' is null. | public static void closeQuietly(Closeable closeable) {
if (closeable != null) {
try {
closeable.close();
} catch (RuntimeException rethrown) {
throw rethrown;
} catch (Exception ignored) {
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static final void safeClose(Object closeable) {\n try {\n if (closeable != null) {\n if (closeable instanceof Closeable) ((Closeable) closeable).close();\n else if (closeable instanceof AutoCloseable) ((AutoCloseable) closeable).close();\n else if (closeable instanceof Socket) ((Socket) closeable).close();\n else if (closeable instanceof ServerSocket) ((ServerSocket) closeable).close();\n else throw new IllegalArgumentException(\"Unknown object to close\");\n }\n } catch (Exception e) {\n Log.e(TAG, \"failed to close \" + closeable.getClass().getName(), e);\n }\n }",
"static void silentlyClose(Closeable closeable)\n {\n try\n {\n if (closeable != null) closeable.close();\n }\n catch (IOException e)\n {\n // Ignore\n }\n }",
"public static <T extends Closeable> T closeSafe(T closeable)\n\t{\n\t\tif (null != closeable)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcloseable.close();\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\t// Ignore errors on close\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"public static void m85581a(Closeable closeable) {\n if (closeable != null) {\n try {\n closeable.close();\n } catch (Exception unused) {\n }\n }\n }",
"public static void m136425a(Closeable closeable) {\n if (closeable != null) {\n try {\n closeable.close();\n } catch (Exception unused) {\n }\n }\n }",
"public static void m18360a(Closeable closeable) {\n if (closeable != null) {\n try {\n closeable.close();\n } catch (Throwable unused) {\n }\n }\n }",
"public static void closeIgnoringExceptions(AutoCloseable closeable) {\n if (closeable != null) {\n try {\n closeable.close();\n\n // Suppress it since we ignore any exceptions\n // SUPPRESS CHECKSTYLE IllegalCatch\n } catch (Exception e) {\n // Still log the Exception for issue tracing\n LOG.log(Level.WARNING, String.format(\"Failed to close %s\", closeable), e);\n }\n }\n }",
"public static void m20202a(Closeable closeable) {\n if (closeable != null) {\n try {\n closeable.close();\n } catch (RuntimeException e) {\n throw e;\n } catch (Exception unused) {\n }\n }\n }",
"public interface IClosable extends Closeable {\n\n public void close();\n\n public boolean closed();\n}",
"public interface Closeable {\n \n void close();\n \n boolean isClosed();\n }",
"public interface Closeable {\n void close();\n boolean isClosed();\n}",
"public static void m66055a(Closeable closeable) {\n if (closeable != null) {\n try {\n closeable.close();\n } catch (RuntimeException e) {\n throw e;\n } catch (Exception unused) {\n }\n }\n }",
"public\n void close() throws ResourceException;",
"public synchronized void close() {}",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"public void close() throws IOException;",
"void close() throws IOException;",
"void close() throws IOException;",
"void close() throws IOException;",
"void close() throws IOException;",
"void close() throws IOException;",
"void close() throws IOException;",
"void close() throws IOException;",
"void close() throws IOException;",
"void close() throws IOException;",
"void close() throws IOException;",
"void close() throws IOException;",
"public interface Closeable extends java.io.Closeable {\n /**\n * Doesn't throw a checked exception.\n */\n public void close();\n}",
"public void close() {\n wrapped.close();\n }",
"public void close() {\n if (cleanup != null) {\n cleanup.disable();\n }\n if (isOpen()) {\n forceClose();\n }\n }",
"public static final void m148917a(Closeable closeable, Throwable th) {\n if (closeable != null) {\n if (th == null) {\n closeable.close();\n return;\n }\n try {\n closeable.close();\n } catch (Throwable th2) {\n C47885a.m148820a(th, th2);\n }\n }\n }",
"public void close() {}",
"void close(boolean evictOnClose) throws IOException;",
"public void closeResource(Object resource);",
"void close() throws Exception;",
"void close() throws Exception;",
"public void close() throws OBException;",
"public void close() throws java.io.IOException { throw new RuntimeException(\"Stub!\"); }",
"public abstract void close() throws IOException;",
"public abstract void close() throws IOException;",
"public abstract void close();",
"public abstract void close();",
"public abstract void close();",
"public abstract void close();",
"public abstract void close();",
"abstract void close();",
"abstract void close();",
"@Override\n public void close() throws IOException {\n isClosed = true;\n }",
"public boolean closeUnchecked() {\r\n PacketRepository.send(CloseInterface.class, (opened == null ||\r\n opened.getDefinition() == null || opened.getDefinition().getContext() == null)\r\n ? new InterfaceContext(player, -1, false) : opened.getDefinition().getContext().setPlayer(player));\r\n opened = null;\r\n return true;\r\n }",
"@Override public abstract void close();",
"public native int close() throws IOException,IllegalArgumentException;",
"public void close() throws IOException {\n\t}",
"public void close() throws IOException {\n\t}",
"default void close() {\n }",
"default void close() {\n }",
"public void close() {\n // should i do something ?\n }",
"abstract public void close() throws IOException;",
"@Override\n void close();",
"@Override\n void close();",
"@Override\n void close();",
"@Override\n void close();",
"public void close()\r\n\t{\r\n\t if (isOpen()) try {\r\n\t \tfd.close();\r\n\t } catch (IOException ex) {\r\n\t \t/* do nothing */\r\n\t } finally {\r\n\t\t thisc = EOF;\r\n\t\t holdc = EOF;\r\n\t\t fd = null;\r\n\t }\r\n\t}",
"public void\n close();",
"public void close() {\n }",
"public void close() {\n }",
"public void close() {\n }",
"public void closed(Throwable t);",
"void close() throws Exception;",
"public void close() {\n finalize0();\n }",
"private void close() {\r\n try {\r\n if (m_in != null) {\r\n m_in.close();\r\n }\r\n if (m_out != null) {\r\n m_out.close();\r\n }\r\n if (m_socket != null) {\r\n m_socket.close();\r\n }\r\n } catch (IOException e) {\r\n throw new WrappedRuntimeException(e);\r\n }\r\n }",
"public void close()\r\n {\r\n }",
"@Override\n public void close() {\n //no-op\n }",
"public void close() {\n }",
"public void close() {\n }",
"public void close() {\n }",
"public void close() throws IOException {\n\n\t}",
"@Override\n void close();",
"@Override\n void close();",
"@Override\n public void setCloseable(boolean arg0)\n {\n \n }",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();"
] | [
"0.7851926",
"0.75352407",
"0.74449706",
"0.72656643",
"0.7217342",
"0.71863425",
"0.7105893",
"0.7079648",
"0.67490846",
"0.6739129",
"0.6655201",
"0.6564664",
"0.6438115",
"0.63986874",
"0.636958",
"0.636958",
"0.636958",
"0.636958",
"0.636958",
"0.636958",
"0.636958",
"0.636958",
"0.63285226",
"0.63285226",
"0.63285226",
"0.63285226",
"0.63285226",
"0.63285226",
"0.63285226",
"0.63285226",
"0.63285226",
"0.63285226",
"0.63285226",
"0.63058573",
"0.6272291",
"0.621848",
"0.6179138",
"0.61687154",
"0.61480373",
"0.6139443",
"0.6122447",
"0.6122447",
"0.60703164",
"0.6065411",
"0.60641086",
"0.60641086",
"0.60198164",
"0.60198164",
"0.60198164",
"0.60198164",
"0.60198164",
"0.60176307",
"0.60176307",
"0.59869653",
"0.5980805",
"0.59741735",
"0.5971971",
"0.5970113",
"0.5970113",
"0.5952412",
"0.5952412",
"0.5946745",
"0.5934894",
"0.5933356",
"0.5933356",
"0.5933356",
"0.5933356",
"0.59244776",
"0.59222066",
"0.5900667",
"0.5900667",
"0.5900667",
"0.58800197",
"0.5870118",
"0.5868966",
"0.5866446",
"0.5863404",
"0.5862773",
"0.5860716",
"0.5860716",
"0.5860716",
"0.5835542",
"0.5829397",
"0.5829397",
"0.5826137",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905",
"0.5824905"
] | 0.76467425 | 1 |
Computes the initial size and collects garbage as a part of opening the cache. Dirty entries are assumed to be inconsistent and will be deleted. | private void processJournal() throws IOException {
deleteIfExists(journalFileTmp);
for (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {
Entry entry = i.next();
if (entry.currentEditor == null) {
for (int t = 0; t < valueCount; t++) {
size += entry.lengths[t];
}
} else {
entry.currentEditor = null;
for (int t = 0; t < valueCount; t++) {
deleteIfExists(entry.getCleanFile(t));
deleteIfExists(entry.getDirtyFile(t));
}
i.remove();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic long getCacheSize() {\n\t\treturn 0;\n\t}",
"private void ensureCapacity() {\r\n\t\t\tdouble loadFactor = getLoadFactor();\r\n\r\n\t\t\tif (loadFactor >= CAPACITY_THRESHOLD)\r\n\t\t\t\trehash();\r\n\t\t}",
"private void flushCache()\n {\n Entry<Integer, String> eldestEntry;\n File oldestFile;\n long eldestFileSize;\n int count = 0;\n\n int MAX_DELETE_FILE = 4;\n int MAX_CACHE_FILE_ALLOW = 1000;\n\n while (count < MAX_DELETE_FILE && (cacheSize > MAX_CACHE_FILE_ALLOW || cacheByteSize > maxCacheByteSize))\n {\n eldestEntry = mLinkedHashMap.entrySet().iterator().next();\n oldestFile = new File(eldestEntry.getValue());\n eldestFileSize = oldestFile.length();\n mLinkedHashMap.remove(eldestEntry.getKey());\n oldestFile.delete();\n cacheSize = mLinkedHashMap.size();\n cacheByteSize -= eldestFileSize;\n count++;\n }// while (count < MAX_DELETE_FILE && (cacheSize > MAX_CACHE_FILE_ALLOW || cacheByteSize > maxCacheByteSize))\n }",
"@Override\n\tpublic int getSizeToCache() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic long getMaxCacheSize() {\n\t\treturn 0;\n\t}",
"@Override\n public int getCacheSize() {\n return 4 * 1024 * 1024;\n }",
"public int getCacheSize();",
"public void shrinkCacheToMaximumSize() {\n while (this.cacheSize > this.maximumCacheSize) {\n getNodeFromCache();\n }\n }",
"@PostConstruct\n public void initCache() {\n cache = Collections.synchronizedMap(new HashMap<>(cacheCapacity, 1));\n }",
"int getCurrentCacheSize();",
"@Override\n public int getCacheSize() {\n return 4 + 20 * (4 + 4 + 8);\n }",
"private void initializeCache(int cacheSize){\n \t\tlruCache = new LRUCache(cacheSize);\n \t}",
"public static long getCacheSize() {\n return sDiskLruCache.size();\n }",
"@Override\n public int getCacheSize() {\n return 4 + 20 * 88;\n }",
"private static Cache<DHTKey, LruRetentionInfo> buildEmptyCacheWithCapacity(long capacityBytes) {\n return Caffeine.newBuilder().weigher(cacheWeigher).maximumWeight(capacityBytes).recordStats().build();\n }",
"private void init() {\n mMemoryCache = new LruCache<String, Bitmap>(DEFAULT_MEM_CACHE_SIZE) {\n /**\n * Measure item size in kilobytes rather than units which is more\n * practical for a bitmap cache\n */\n @Override\n protected int sizeOf(String key, Bitmap bitmap) {\n final int bitmapSize = getBitmapSize(bitmap) / 1024;\n return bitmapSize == 0 ? 1 : bitmapSize;\n }\n };\n }",
"public Cache(Integer size) {\n this.size = size;\n recentlyUsed = new ArrayList<K>();\n cache = new HashMap<>();\n }",
"long getLocalOnHeapSizeInBytes();",
"@Override\n\tpublic synchronized void initialize() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files == null) {\n\t\t\treturn;\n\t\t}\n\t\tfor (File file : files) {\n\t\t\tFileInputStream fis = null;\n\t\t\ttry {\n\t\t\t\tfis = new FileInputStream(file);\n\t\t\t\tCacheHeader entry = CacheHeader.readHeader(fis);\n\t\t\t\tentry.size = file.length();\n\t\t\t\tputEntry(entry.key, entry);\n\t\t\t} catch (IOException e) {\n\t\t\t\tif (file != null) {\n\t\t\t\t\tfile.delete();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (fis != null) {\n\t\t\t\t\t\tfis.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ignored) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"int getCacheSizeInMiB();",
"private void init() {\n _capacity = 1 << 9;\n int holderSize = _capacity << 1;\n _keyValueHolder = new int[holderSize];\n _mask = holderSize - 1;\n _maxNumEntries = (int) (_capacity * LOAD_FACTOR);\n }",
"@Test\n public void testCoh3710_size()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertEquals(0, getNamedCache(getCacheName0()).size());\n }\n });\n }",
"private void flushCache()\n {\n cachedDecomposition = null;\n cachedCentroid = null;\n cachedBounds = null;\n }",
"public void reset()\n {\n \tthis.heapFiles.clear();\n }",
"public void setCacheSize(int size) {\n\t\t_cacheSize = size;\n\t}",
"private void init() {\n clearCaches();\n }",
"public void flushCaches() {\n LOCAL_SMALL_CACHE.clear();\n LOCAL_LARGE_CACHE.clear();\n }",
"long getLocalOffHeapSizeInBytes();",
"Builder withCacheSizeInMiB(int sizeInMiB);",
"public void clear()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n deferFlush();\n\n synchronized (this)\n {\n while (true)\n {\n try\n {\n // notify cache entries of their impending removal\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n ((Entry) iter.next()).discard();\n }\n\n // verify that the cache maintains its data correctly\n if (m_cCurUnits != 0)\n {\n // soft assertion\n Base.out(\"Invalid unit count after clear: \" + m_cCurUnits);\n m_cCurUnits = 0;\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n // reset the cache storage\n super.clear();\n\n // reset hit/miss stats\n resetHitStatistics();\n\n // schedule next flush\n scheduleFlush();\n }\n }",
"public MemoryCache() {\n\t\t// use 25% of available heap size\n\t\tsetLimit(Runtime.getRuntime().maxMemory() / 10);\n\t}",
"int getLocalOnHeapSize();",
"@Override\n public int getCacheSize() {\n return 4 + this.arraySet.getTotalBytesSize();\n }",
"public int getCacheSize() {\n\t\treturn _cacheSize;\n\t}",
"public Cache(int size) {\r\n\t\t\r\n\t\tcache = new LinkedList<T>();\r\n\t\tmaxStorage = size;\r\n\t}",
"public void onLowMemory() {\r\n \t\tlog.info(\"On low memory : cleaning tiles - size = \" + cacheOfImages.size());\r\n \t\tArrayList<String> list = new ArrayList<String>(cacheOfImages.keySet());\r\n \t\t// remove first images (as we think they are older)\r\n \t\tfor (int i = 0; i < list.size()/2; i ++) {\r\n \t\t\tBitmap bmp = cacheOfImages.remove(list.get(i));\r\n \t\t\tif(bmp != null){\r\n \t\t\t\tbmp.recycle();\r\n \t\t\t}\r\n \t\t}\r\n \t\tSystem.gc();\r\n \t}",
"@Override\n\tpublic synchronized void clear() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files != null) {\n\t\t\tfor (File file : files) {\n\t\t\t\tfile.delete();\n\t\t\t}\n\t\t}\n\t\tmEntries.clear();\n\t\tmTotalSize = 0;\n\t\tVolleyLog.d(\"Cache cleared.\");\n\t}",
"int getLocalOffHeapSize();",
"public int getCacheSize() {\n return cache.size();\n }",
"public int setUp() throws IOException {\r\n\t\tint kSz = 0;\r\n\t\tkeys = ByteBuffer.allocate(size * FREE.length);\r\n\t\tvalues = ByteBuffer.allocate(size * 8);\r\n\t\tclaims = ByteBuffer.allocate(size);\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tkeys.put(FREE);\r\n\t\t\tvalues.putLong(-1);\r\n\t\t\tclaims.put((byte) 0);\r\n\t\t\tkSz++;\r\n\t\t}\r\n\t\treturn size;\r\n\t}",
"public void reset() {\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n CacheData<K, V> pair = getCacheData(i);\r\n if (pair != null) {\r\n pair.reset();\r\n }\r\n }\r\n }",
"public void clear() {\n //construct(initialCap, loadFactor);\n \n //MapElement me = null;\n\n for (int i = 0; i < capacity; i++) {\n if (map[i] != null) {\n /*me = map[i];\n for (int j = 0; j < count[i]; j++) {\n MapElement release = me;\n me = me.getNext();\n releaseMapElement(release);\n }*/ \n map[i] = null;\n }\n }\n contents = 0;\n }",
"@Override\n public synchronized int size() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.size();\n }",
"public TransactionBuilder setCacheSize(long size);",
"private void collectGarbageInCache() {\n CacheReference r;\n while ((r = (CacheReference)queue.poll()) != null) {\n fontCache.remove(r.getKey());\n }\n }",
"protected void initializeCache() {\n\t\tif (cache == null){\n\t\t\tcache = Collections.synchronizedMap(new HashMap());\n\t\t}\n\t\telse{\n\t\t\tcache.clear();\n\t\t}\n\t}",
"public static void setDiskCacheSize(long size) {\n sDiskCacheSize = size;\n }",
"public void clear() {\n cache = new BigDecimal[cache.length];\n }",
"public void clearDiskCache()\n {\n clearCache(cacheDirectory);\n }",
"int getMaximumCacheSize();",
"private void clearResetCache() {\n for(IoBuffer buf : resetCache) {\n buf.free();\n }\n resetCache = null;\n }",
"@Override\n\tpublic void setSizeToCache(int sizeToCache) {\n\t\t\n\t}",
"public int size() {\n return cache.size();\n }",
"public void testSizeManagementWMS() {\n initCache();\n \n ArrayList<WMSTile> wcos = new ArrayList<WMSTile>();\n long putSize = 0;\n long maxSize = 0;\n int cacheSizeDropCount = 0;\n for (int i = 0; i < 1000; i++) {\n WMSTile wco = getDefaultWMSCacheObject(\"q\" + i, 50, true);\n putSize += wco.getSize();\n\n wcos.add(wco);\n long size = wmsCache.getSize();\n\n if (size < maxSize) {\n maxSize = size;\n cacheSizeDropCount++;\n } else {\n maxSize = size;\n }\n\n boolean result = wmsCache.put(wco.getQuery(), wco.getColourmode(), PointType.POINT_1, wco);\n\n //test if cache is full the put was unsuccessful\n //allow for cachecleaner to have reduced the size between put and test\n boolean test = (wmsCache.getSize() + wco.getSize() > wmsCache.getMaxCacheSize()) == !result;\n if (test == false) {\n assertTrue((size + wco.getSize() > wmsCache.getMaxCacheSize()) == !result);\n }\n\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n }\n\n //test size calcuations are operating\n assertTrue(putSize > 10000);\n\n //test cache cleaner was run more than once\n assertTrue(cacheSizeDropCount > 1);\n\n //test cache size is under max\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n\n //test gets. Anything that is a placeholder will be null.\n int cachedCount = 0;\n for (int i = 0; i < wcos.size(); i++) {\n WMSTile getwco = wmsCache.get(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1);\n if (getwco.getCached()) {\n assertTrue(compareWMSObjects(wcos.get(i), getwco));\n cachedCount++;\n }\n }\n\n //test if at least 2 objects were cached at the end\n assertTrue(cachedCount > 1);\n }",
"private void reset()\r\n {\r\n log.info(\"{0}: Resetting cache\", logCacheName);\r\n\r\n try\r\n {\r\n storageLock.writeLock().lock();\r\n\r\n if (dataFile != null)\r\n {\r\n dataFile.close();\r\n }\r\n\r\n final File dataFileTemp = new File(rafDir, fileName + \".data\");\r\n Files.delete(dataFileTemp.toPath());\r\n\r\n if (keyFile != null)\r\n {\r\n keyFile.close();\r\n }\r\n final File keyFileTemp = new File(rafDir, fileName + \".key\");\r\n Files.delete(keyFileTemp.toPath());\r\n\r\n dataFile = new IndexedDisk(dataFileTemp, getElementSerializer());\r\n keyFile = new IndexedDisk(keyFileTemp, getElementSerializer());\r\n\r\n this.recycle.clear();\r\n this.keyHash.clear();\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure resetting state\", logCacheName, e);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n }",
"@Override\n\tpublic int size() {\n\t\treadLock.lock();\n\t\ttry {\n\t\t\treturn cache.size();\n\t\t} finally {\n\t\t\treadLock.unlock();\n\t\t}\n\t}",
"int getSize() {\n synchronized (lock) {\n return cache.size();\n }\n }",
"private void pruneIfNeeded(int neededSpace) {\n\t\tif ((mTotalSize + neededSpace) < mMaxCacheSizeInBytes) {\n\t\t\treturn;\n\t\t}\n\t\tif (VolleyLog.DEBUG) {\n\t\t\tVolleyLog.v(\"Pruning old cache entries.\");\n\t\t}\n\n\t\tlong before = mTotalSize;\n\t\tint prunedFiles = 0;\n\t\tlong startTime = SystemClock.elapsedRealtime();\n\n\t\tIterator<Map.Entry<String, CacheHeader>> iterator = mEntries.entrySet()\n\t\t\t\t.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry<String, CacheHeader> entry = iterator.next();\n\t\t\tCacheHeader e = entry.getValue();\n\t\t\tboolean deleted = getFileForKey(e.key).delete();\n\t\t\tif (deleted) {\n\t\t\t\tmTotalSize -= e.size;\n\t\t\t} else {\n\t\t\t\tVolleyLog.d(\n\t\t\t\t\t\t\"Could not delete cache entry for key=%s, filename=%s\",\n\t\t\t\t\t\te.key, getFilenameForKey(e.key));\n\t\t\t}\n\t\t\titerator.remove();\n\t\t\tprunedFiles++;\n\n\t\t\tif ((mTotalSize + neededSpace) < mMaxCacheSizeInBytes\n\t\t\t\t\t* HYSTERESIS_FACTOR) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (VolleyLog.DEBUG) {\n\t\t\tVolleyLog.v(\"pruned %d files, %d bytes, %d ms\", prunedFiles,\n\t\t\t\t\t(mTotalSize - before), SystemClock.elapsedRealtime()\n\t\t\t\t\t\t\t- startTime);\n\t\t}\n\t}",
"public void clear()\n\t{\n\t\troot = null;\n\t\tmaxKeyLen = -1;\n\t\tsize = 0;\n\t}",
"@Override\n public void reset() throws IOException {\n\td.numObjectsCached = 0;\n\td.reset();\n }",
"public void reallocateBuckets() { }",
"public void clearDataCache() {\n\t\t_cumulativeVolumeTable.clear();\n\t\tbookMap.clear();\n\t\tquoteMap.clear();\n\t\tmillisCST = 0L;\n\t}",
"public int getInitialCapacity();",
"public static void gc() {\n // Collecting RAM before collecting EEPROM means that only live objects\n // in RAM with pointers to EEPROM will be considered as roots while\n // marking EEPROM objects.\n Native.gc();\n\n int wordSize = Native.getPersistentMemorySize()/4;\n try {\n int[] bitVector = new int[(wordSize / 32) + 2];\n int[] markingStack = new int[GC_MARK_STACK_SIZE];\n Native.gcPersistentMemory(bitVector, markingStack);\n } catch (OutOfMemoryError oome) {\n throw new OutOfMemoryError(\"Cannot allocate auxillary data structures for persistent gc\");\n }\n }",
"public int getPkCacheSize() {\n return 0;\n }",
"private ImageCache(Context context) {\n int memClass = ((ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE)).getMemoryClass();\n memClass = memClass > 32 ? 32 : memClass;\n\n final int cacheSize = 1024 * 1024 * memClass / 8;\n memoryCache = new LruCache<String, Bitmap>(cacheSize) {\n protected int sizeOf(String key, Bitmap bitmap) {\n return bitmap.getRowBytes() * bitmap.getHeight();\n }\n };\n\n File cacheDir = DiskLruCache.getDiskCacheDir(context, DISK_CACHE_SUB_DIR);\n diskCache = DiskLruCache.openCache(context, cacheDir, DISK_CACHE_SIZE);\n }",
"@Test\n public void sizeTest()\n {\n assertEquals(0, map.size());\n\n int count = 0;\n for (int i = 0; i < 10; i++)\n {\n map.put(i, i);\n assertEquals(++count, map.size());\n }\n\n assertEquals(count, map.size());\n map.clear();\n assertEquals(0, map.size());\n }",
"public void clear()\n {\n this.buckets = new Object[this.capacity];\n this.size = 0;\n }",
"public BitmapMemoryCache() {\r\n //use 25% of available heap size\r\n setLimit(Runtime.getRuntime().maxMemory() / 4);\r\n }",
"public static void flush() {\n try {\n sDiskLruCache.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public InMemoryResponseCache() {\n\t\tthis( 250*1024 ); // 250 KB cache\n\t}",
"public BoundedCache( final int cacheSize ) {\n mCacheSize = cacheSize;\n }",
"private void growSize() {\n size++;\n\n if (size > maxSize) {\n if (keys.length == Integer.MAX_VALUE) {\n throw new IllegalStateException(\"Max capacity reached at size=\" + size);\n }\n\n // Double the capacity.\n rehash(keys.length << 1);\n }\n }",
"public MRUCache(int size, CacheDataFactory<K, V> fact, CacheSource<K,V> source) {\r\n factory = fact;\r\n this.source = source;\r\n buckets = new AtomicReference[nextPrime(size + (int)(size * .15))];\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n buckets[i] = new AtomicReference<CacheData<K, V>>(null);\r\n }\r\n }",
"public void reset () {\n\t\topen();\n\t\ttry {\n\t\t\tcontainer.setLength(0);\n\t\t\treservedBitMap.setLength(0);\n\t\t\tupdatedBitMap.setLength(0);\n\t\t\tfreeList.setLength(0);\n\t\t\tsize = 0;\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}",
"public HAMap(int initialCapacity, double loadFactor) {\n buckets = new ArrayList<>();\n for (int i = 0; i < initialCapacity; i++) {\n buckets.add(new ArrayList<>());\n }\n keySet = new HashSet<>();\n numBuckets = initialCapacity;\n numEntries = 0;\n this.loadFactor = loadFactor;\n }",
"private static void initializeCache() {\n\t\t// prepare cache folder for this application instance\n\t\tFile cacheRoot = getApplicationCache();\n\n\t\ttry {\n\t\t\tfor (int i = 0; true; i++) {\n\t\t\t\tFile cache = new File(cacheRoot, String.format(\"%d\", i));\n\t\t\t\tif (!cache.isDirectory() && !cache.mkdirs()) {\n\t\t\t\t\tthrow new IOException(\"Failed to create cache dir: \" + cache);\n\t\t\t\t}\n\n\t\t\t\tfinal File lockFile = new File(cache, \".lock\");\n\t\t\t\tboolean isNewCache = !lockFile.exists();\n\n\t\t\t\tfinal RandomAccessFile handle = new RandomAccessFile(lockFile, \"rw\");\n\t\t\t\tfinal FileChannel channel = handle.getChannel();\n\t\t\t\tfinal FileLock lock = channel.tryLock();\n\n\t\t\t\tif (lock != null) {\n\t\t\t\t\t// setup cache dir for ehcache\n\t\t\t\t\tSystem.setProperty(\"ehcache.disk.store.dir\", cache.getAbsolutePath());\n\n\t\t\t\t\tint applicationRevision = getApplicationRevisionNumber();\n\t\t\t\t\tint cacheRevision = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcacheRevision = new Scanner(channel, \"UTF-8\").nextInt();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\n\t\t\t\t\tif (cacheRevision != applicationRevision && applicationRevision > 0 && !isNewCache) {\n\t\t\t\t\t\tLogger.getLogger(Main.class.getName()).log(Level.WARNING, String.format(\"App version (r%d) does not match cache version (r%d): reset cache\", applicationRevision, cacheRevision));\n\n\t\t\t\t\t\t// tag cache with new revision number\n\t\t\t\t\t\tisNewCache = true;\n\n\t\t\t\t\t\t// delete all files related to previous cache instances\n\t\t\t\t\t\tfor (File it : getChildren(cache)) {\n\t\t\t\t\t\t\tif (!it.equals(lockFile)) {\n\t\t\t\t\t\t\t\tdelete(cache);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isNewCache) {\n\t\t\t\t\t\t// set new cache revision\n\t\t\t\t\t\tchannel.position(0);\n\t\t\t\t\t\tchannel.write(Charset.forName(\"UTF-8\").encode(String.valueOf(applicationRevision)));\n\t\t\t\t\t\tchannel.truncate(channel.position());\n\t\t\t\t\t}\n\n\t\t\t\t\t// make sure to orderly shutdown cache\n\t\t\t\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tCacheManager.getInstance().shutdown();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tlock.release();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\thandle.close();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// cache for this application instance is successfully set up and locked\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// try next lock file\n\t\t\t\thandle.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLogger.getLogger(Main.class.getName()).log(Level.WARNING, e.toString(), e);\n\t\t}\n\n\t\t// use cache root itself as fail-safe fallback\n\t\tSystem.setProperty(\"ehcache.disk.store.dir\", new File(cacheRoot, \"default\").getAbsolutePath());\n\t}",
"private void resize() {\r\n capacity = capacity*2;\r\n IDictionary<K, V>[] temp = chains;\r\n chains = makeArrayOfChains(capacity);\r\n for (int i = 0; i < capacity/2; i++) {\r\n if (temp[i]!=null) {\r\n IDictionary<K, V> each = temp[i];\r\n for (KVPair<K, V> element: each) {\r\n putKV(element);\r\n load--;\r\n }\r\n }\r\n }\r\n \r\n }",
"public int size() {\r\n\t\treturn cache.size();\r\n\t}",
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"public FileGarbageCollector(){\n\t\tthis.maxAge = 0;\n\t\tthis.dirs = new Vector<File>();\n\t}",
"private void subLengthFromCacheSize(final IndexedDiskElementDescriptor value)\r\n {\r\n contentSize.addAndGet((value.len + IndexedDisk.HEADER_SIZE_BYTES) / -1024 - 1);\r\n }",
"private void resetBytesFree()\r\n {\r\n this.bytesFree.set(0);\r\n }",
"@Override\n\tpublic void clear() {\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\tcache.clear();\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"public int GetSize() \n\t{\n\t\treturn numEntries; //dummy return so file would compile\n\t}",
"@SuppressWarnings({\"unchecked\", \"CallToThreadYield\"})\n public void cleanup() {\n\n long now = System.currentTimeMillis();\n ArrayList<K> deleteKey;\n\n synchronized (cacheMap) {\n MapIterator itr = cacheMap.mapIterator();\n\n deleteKey = new ArrayList<>((cacheMap.size() / 2) + 1);\n K key;\n CacheObject c;\n\n while (itr.hasNext()) {\n key = (K) itr.next();\n c = (CacheObject) itr.getValue();\n\n if (c != null && (now > (timeToLive + c.lastAccessed))) {\n deleteKey.add(key);\n }\n }\n }\n\n deleteKey.stream().map((key) -> {\n synchronized (cacheMap) {\n Object remove = cacheMap.remove(key);\n }\n return key;\n }).forEachOrdered((K _item) -> {\n Thread.yield();\n });\n }",
"public void clear() {\n cache.clear();\n }",
"private MyHashMap<K,V> resize() {\n\t//resize hashmap\n\t\n\tint biggercapacity=(2*capacity)+1;\n\n\tMyHashMap<K,V> biggermap= new MyHashMap(biggercapacity,loadFactor);\n\t\n\t//rehash items\n\t\n\t\n\tfor(int i=0;i<this.capacity;i++) {\n\t for(MyEntry k:table[i]) {\n\t\tbiggermap.put(k.key, k.value);\n\t }\n\t}\n\tthis.capacity=biggercapacity;\n\tthis.table=biggermap.table;\n\treturn biggermap;\n }",
"@Override\n\t\tprotected int sizeOf(CacheKey key, CacheInfo cacheInfo) {\n\t\t\tif (cacheInfo == null)\n\t\t\t\treturn 0;\n\t\t\treturn cacheInfo.size;\n\t\t}",
"public int getCacheSize(){ return Integer.parseInt(cacheSize.getText()); }",
"@Test\n public void testCompact_Overflow_Caching_Enabled() throws Exception {\n\n File file = new File(System.getProperty(\"java.io.tmpdir\") + File.separator\n + \"oasis-collection-testCompact_Overflow_Caching_Enabled\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2, file);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1, 1);\n instance.enableCache();\n instance.addAll(c);\n\n instance.remove(2);\n instance.compact();\n instance.disableCache();\n\n assertNumberFilesInDirectory(instance.instanceStore(), 2);\n\n }",
"public void clearMemoryCache() {\r\n cache.evictAll();\r\n Log.d(TAG, \"Manually cleaned complete cache.\");\r\n }",
"public void ensureCapacity(final int minCapacity) {\n if (minCapacity > cache.length) {\n int oldCapacity = cache.length;\n BigDecimal oldCache[] = cache;\n int newCapacity = oldCapacity + CAPACITY_BUMP_SIZE;\n if (newCapacity < minCapacity) {\n newCapacity = minCapacity;\n }\n cache = new BigDecimal[newCapacity];\n System.arraycopy(oldCache, 0, cache, 0, oldCapacity);\n }\n }",
"public void clear() {\n this.cache.clear();\n }",
"MyHashMap(int initialCapacity) {\r\n data = new Node[initialCapacity];\r\n }",
"public static void initializeMetrics()\n {\n // Get the Java runtime\n Runtime runtime = Runtime.getRuntime();\n // Run the garbage collector\n runtime.gc();\n \tstartingMemory = runtime.totalMemory() - runtime.freeMemory();\n }",
"public static void clearAllCache() {\n try {\n sLruCache.evictAll();\n sDiskLruCache.delete();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public WeakIdentityCache() {\n threshold = 16;\n entries = new Entry[threshold];\n }",
"@Override\r\n @SuppressWarnings(\"unchecked\")\r\n public void clear() {\r\n size = 0;\r\n hashTable = new LinkedList[capacity];\r\n }",
"public static void main(String[] var0) {\n\n// for(int i =0;i<10;i++){\n// Object object = new byte[2*1024*1024];\n// map.put(i+\"\",object);\n// }\n // map =null;\n System.gc();\n// System.out.println(\"打印出了最大可用堆内存\");\n// System.out.println(\"-Xmx\" + Runtime.getRuntime().maxMemory() / 1024L / 1024L + \"M\");\n }",
"protected void resetCache() {\n if (cacheResults && initialized) {\n dataCache.clear();\n }\n }"
] | [
"0.6861188",
"0.6722663",
"0.6715408",
"0.67127305",
"0.6655129",
"0.65707386",
"0.65160316",
"0.6499546",
"0.6493266",
"0.63642216",
"0.63457346",
"0.6332803",
"0.6330877",
"0.6330068",
"0.6244113",
"0.6237054",
"0.6226454",
"0.62193847",
"0.6202122",
"0.6151945",
"0.6143668",
"0.61317164",
"0.6115635",
"0.6091522",
"0.60769296",
"0.6071327",
"0.60684425",
"0.6067824",
"0.60606235",
"0.605525",
"0.6023237",
"0.6015518",
"0.6015411",
"0.5993162",
"0.59907687",
"0.5988341",
"0.5980677",
"0.59677166",
"0.5962449",
"0.5957417",
"0.59230906",
"0.58913726",
"0.5882225",
"0.588088",
"0.5864953",
"0.5841814",
"0.5841619",
"0.5821981",
"0.5815922",
"0.5802796",
"0.5789224",
"0.57887787",
"0.57881725",
"0.5784186",
"0.57804656",
"0.57761955",
"0.57736856",
"0.5768743",
"0.57682025",
"0.5756833",
"0.57555526",
"0.57549024",
"0.57355857",
"0.5729298",
"0.57253224",
"0.571782",
"0.57142365",
"0.5702351",
"0.56898344",
"0.56877726",
"0.5686468",
"0.5685269",
"0.568154",
"0.5677224",
"0.56759965",
"0.56752264",
"0.56726176",
"0.565823",
"0.565565",
"0.56514704",
"0.56506884",
"0.56426775",
"0.564235",
"0.56359327",
"0.5629299",
"0.56254923",
"0.562498",
"0.5619734",
"0.5611828",
"0.56046444",
"0.5603647",
"0.56000304",
"0.55877084",
"0.55853474",
"0.5577589",
"0.55768186",
"0.55728686",
"0.5567761",
"0.5565348",
"0.5561356",
"0.5555934"
] | 0.0 | -1 |
Creates a new journal that omits redundant information. This replaces the current journal if it exists. | private synchronized void rebuildJournal() throws IOException {
if (journalWriter != null) {
journalWriter.close();
}
Writer writer = new BufferedWriter(new FileWriter(journalFileTmp), IO_BUFFER_SIZE);
writer.write(MAGIC);
writer.write("\n");
writer.write(VERSION_1);
writer.write("\n");
writer.write(Integer.toString(appVersion));
writer.write("\n");
writer.write(Integer.toString(valueCount));
writer.write("\n");
writer.write("\n");
for (Entry entry : lruEntries.values()) {
if (entry.currentEditor != null) {
writer.write(DIRTY + ' ' + entry.key + '\n');
} else {
writer.write(CLEAN + ' ' + entry.key + entry.getLengths() + '\n');
}
}
writer.close();
journalFileTmp.renameTo(journalFile);
journalWriter = new BufferedWriter(new FileWriter(journalFile, true), IO_BUFFER_SIZE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addItem(RpgJournal journal){\n boolean journalExists = false;\n for(int i = 0; i < journals.size(); i++){\n if(journal.getId().equals(journals.get(i).getId()))\n journalExists = true;\n }\n\n if(!journalExists){\n journals.add(journal);\n this.notifyItemInserted(journals.size()-1);\n }\n }",
"private void startFresh() throws JournalException {\n try {\n this.log = this.node.getWriter(this.filename, false);\n } catch (IOException e) {\n throw new JournalException(\"Failed to create initial log file.\");\n }\n }",
"private boolean addJournal(Journal journal) {\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif (items.get(i).keyEquals(journal))\n\t\t\t\treturn false;\n\t\titems.add(journal);\n\t\treturn true;\n\t}",
"public void setJournal(String journal) {\n this.journal = journal;\n }",
"public interface JournalWriter {\n\n /**\n * Marks all logs as completed.\n */\n void completeLogs() throws IOException;\n\n /**\n * Returns an output stream for the journal checkpoint. The returned output stream is a singleton\n * for this writer.\n *\n * @param latestSequenceNumber the sequence number of the latest journal entry. This sequence\n * number will be used to determine the next sequence numbers for the subsequent journal\n * entries.\n * @return the output stream for the journal checkpoint\n */\n JournalOutputStream getCheckpointOutputStream(long latestSequenceNumber) throws IOException;\n\n /**\n * Writes an entry to the current log stream. {@link #flush} should be called\n * afterward to ensure the entry is persisted.\n *\n * @param entry the journal entry to write\n */\n void write(JournalEntry entry) throws IOException;\n\n /**\n * Flushes the current log stream. Otherwise this operation is a no-op.\n */\n void flush() throws IOException;\n\n /**\n * @return the next sequence number\n */\n long getNextSequenceNumber();\n\n /**\n * Closes the journal.\n */\n void close() throws IOException;\n\n /**\n * Recovers the checkpoint in case the master crashed while updating it previously.\n */\n void recover();\n\n /**\n * Deletes all of the completed logs.\n */\n void deleteCompletedLogs() throws IOException;\n\n /**\n * Marks the current log as completed. If successful, the current log will no longer exist. The\n * current log must be closed before this call.\n */\n void completeCurrentLog() throws IOException;\n}",
"public static void main(String args[])\n {\n ArrayList<Journal> testJournalList = Journal.getSampleJournals();\n\n Journal testJournal1 = new Journal(\"TEST JOURNAL 1\");\n Journal testJournal2 = new Journal(\"TEST JOURNAL 2\");\n testJournalList.add(testJournal1);\n testJournalList.add(testJournal2);\n //BibliographyDatabase.printAll();\n\n BibliographyDatabase.addListOfJournals(testJournalList);\n //BibliographyDatabase.printAll();\n\n testJournal1.addIssue(2020, 8, 15); // should add successfully\n BibliographyDatabase.addJournal(\"Ancient Greece\"); // should add successfully\n //BibliographyDatabase.printAll();\n \n BibliographyDatabase.addJournal(testJournal1); // already in list\n BibliographyDatabase.addJournal(new Journal(\"Modern Drummer\")); // should add successfully\n BibliographyDatabase.removeJournal(\"Not in List\"); // not in list\n //BibliographyDatabase.printAll();\n\n Issue testIssue1 = new Issue(2010, 13, 8, testJournal1);\n testIssue1.addArticle(\"The 18th Dynasty\", \"Michael Stevenson\"); // should add successfully\n BibliographyDatabase.addIssue(testIssue1); // should add successfully\n BibliographyDatabase.addIssue(testIssue1); // already in list\n BibliographyDatabase.removeIssue(\"TEST JOURNAL 1\", 13, 8); // should remove successfully\n BibliographyDatabase.addIssue(testIssue1); // should add successfully\n //BibliographyDatabase.printAll();\n\n Article testArticle1 = new Article(\"Plants and Animals\", \"Indie Author\");\n Article testArticle2 = new Article(\"Cities\", \"Indie Author\", testIssue1);\n BibliographyDatabase.addArticle(testArticle1); // should add to independent section\n BibliographyDatabase.addArticle(testArticle2); // should add successfully\n //BibliographyDatabase.printAll();\n\n BibliographyDatabase.removeArticle(\"Not in Bib\", \"Unknown Author\"); // not in list\n BibliographyDatabase.removeArticle(\"Not in Bib2\", \"Unknown Author2\"); // not in list\n BibliographyDatabase.removeArticle(\"Plants and Animals\", \"Indie Author\"); // should remove from independent section\n BibliographyDatabase.removeArticle(\"Cities\", \"Indie Author\"); // should remove\n BibliographyDatabase.printAll();\n\n System.out.println(BibliographyDatabase.getMostFrequentAuthor()); // Michael Stevenson\n }",
"public void saveOrUpdate(JournalDetail journalDetail) {\n\t\tjournalDao.saveOrUpdate(journalDetail);\r\n\t\t\r\n\t}",
"@Override\n public boolean createPettyCashJournal(PettyCashBean pettycashjournal) {\n pettycashjournal.setGendate(C_Util_Date.generateDate());\n return in_pettycashjournaldao.createPettyCashJournal(pettycashjournal);\n }",
"public String getJournal() {\n return journal;\n }",
"public Journal(String name, String text)\n {\n this.name = name;\n this.text = text;\n this.date = currentDate;\n this.time = currentTime;\n this.uneditedName = name;\n }",
"public interface JournalStore\n{\n /**\n * Initialize the store.\n * \n * @param service The associated DirectoryService\n * @throws IOException If the initialization failed\n */\n void init( DirectoryService service ) throws IOException;\n\n\n /**\n * Write the changes on disk\n * \n * @throws IOException If the write failed\n */\n void sync() throws IOException;\n\n\n /**\n * Destroy the logs. \n * \n * @throws IOException If we can't destroy the logs\n */\n void destroy() throws IOException;\n\n\n /**\n * Gets the current revision of the server (a.k.a. the HEAD revision).\n *\n * @return the current revision of the server\n */\n long getCurrentRevision();\n\n\n /**\n * Records a change as a forward LDIF and the authorized principal\n *\n * @param principal The principal who is logging the change\n * @param revision The operation revision\n * @param forward The change to log\n * @return <code>true</code> if the entry has been written\n */\n boolean log( LdapPrincipal principal, long revision, LdifEntry forward );\n\n\n /**\n * Records a ack for a change\n *\n * @param revision The change revision which is acked\n * @return <code>true</code> if the ack has been written\n */\n boolean ack( long revision );\n\n\n /**\n * Records a nack for a change\n *\n * @param revision The change revision which is nacked\n * @return <code>true</code> if the nack has been written\n */\n boolean nack( long revision );\n\n\n /**\n * The file name to use as the journal file. Default to \n * 'journal.ldif'\n * @param fileName the fileName to set\n */\n void setFileName( String fileName );\n\n\n /**\n * The working directory on which the journal file will be stored. Default\n * to 'server-work'\n * @param workingDirectory The working directory in which the journal file\n * will be stored\n */\n void setWorkingDirectory( String workingDirectory );\n}",
"int insert(Journal record);",
"public MedicalJournal saveMedicalJournal(MedicalJournal medJournal) {\r\n\t\t\r\n\t\tthis.medicalJournalRepository.save(medJournal);\r\n\t\t\r\n\t\treturn medJournal;\r\n\t}",
"public void deleteJournal(long journal_id) {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_JOURNAL, KEY_ID + \" = ?\",\n new String[] { String.valueOf(journal_id) });\n }",
"@Id\n @GeneratedValue\n @Column(name = \"JournalID\", unique = false, nullable = false, insertable = true, updatable = true)\n public Integer getJournalId() {\n return this.journalId;\n }",
"Article createArticle();",
"void addTransactionJournal(MasterTableJournal change) {\n transaction_mod_list.add(change);\n system.stats().increment(journal_count_stat_key);\n }",
"public Journal(String name, String text, String date, String time)\n {\n this.name = name;\n this.text = text;\n this.date = date;\n this.time = time;\n }",
"JournalEntry read() throws IOException, InvalidJournalEntryException;",
"int insertSelective(Journal record);",
"T create() throws PersistException;",
"public com.walgreens.rxit.ch.cda.StrucDocTitleFootnote addNewFootnote()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocTitleFootnote target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocTitleFootnote)get_store().add_element_user(FOOTNOTE$8);\n return target;\n }\n }",
"public OralHealthJournal(int id, String socialSecurityNumber)\n\t{\n\t\tthis.m_id = id;\n\t\tthis.m_socialSecurityNumber = socialSecurityNumber;\n\t}",
"@Override\n\tpublic void orphan(DBSet db, boolean asPack) \n\t{\n\t\tdb.getAddressPersonMap().removeItem(this.recipient.getAddress());\n\t\tdb.getPersonAddressMap().removeItem(this.key, this.recipient.getAddress());\n\n\t\t//UPDATE REFERENCE OF CREATOR\n\t\t// not needthis.creator.setLastReference(this.reference, db);\t\t\n\t\t//UPDATE REFERENCE OF RECIPIENT\n\t\tthis.recipient.removeReference(db);\n\t}",
"public void doNew() {\n\n if (!canChangeDocuments()) {\n return;\n }\n \n setDocument(fApplication.createNewDocument());\n }",
"public Shout dup (Shout self)\n {\n if (self == null)\n return null;\n\n Shout copy = new Shout ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.group = self.group;\n copy.content = self.content.duplicate ();\n return copy;\n }",
"public void saveOrUpdate(JournalMaster journalMaster) {\n\t\tjournalDao.saveOrUpdate(journalMaster);\r\n\t}",
"public Whisper dup (Whisper self)\n {\n if (self == null)\n return null;\n\n Whisper copy = new Whisper ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.content = self.content.duplicate ();\n return copy;\n }",
"@Override\n public Libro createLibro(long isbn) {\n return libroPersistence.create(isbn);\n }",
"WithCreate withNotes(String notes);",
"Journal selectByPrimaryKey(Long id);",
"public Persistence() {}",
"public RecoveryJournal(String path, String filename)\n throws IOException {\n this.gzipFile = new File(path, filename + GZIP_SUFFIX);\n this.out = initialize(gzipFile);\n }",
"private void createCatalogFileIfNoneExists(){\n\t\t\n\t\tinOut = new IOUtility();\n\t\t\n\t\tif (inOut.checkLocalCache()) {\n\t\t\tcatalog = inOut.readCatalogFromFile();\n\t\t}\n\n\t\telse {\n\n\t\t\ttry {\n\t\t\t\tinOut.createCatalogFile();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t} \n\t\t}\n\t\t\n\t}",
"@Column(name = \"JournalName\", unique = false, nullable = true, insertable = true, updatable = true)\n public String getJournalName() {\n return this.journalName;\n }",
"public void insert(JournalEntry entry) {\n SQLiteDatabase db = instance.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(\"title\", entry.getTitle());\n values.put(\"mood\", entry.getMood());\n values.put(\"content\", entry.getContent());\n db.insert(\"entries\", null, values);\n }",
"void create(int id, int authorId, String title);",
"public static boolean loadJournal(ObservableList<JournalEntry> entryList){\n entryList.clear();\n try{\n String query = \"SELECT * FROM JOURNAL WHERE date=\\'\" + Calendar.selectedDay.getDate() + \"\\'\"; // Setup query for task\n ResultSet results = DatabaseHandler.executeQuery(query); // Setup ResultSet for query\n // Loop through journal entries\n while(results.next()) {\n String text = results.getString(\"text\"); // Store attributes of journal entry\n String date = results.getString(\"date\");\n entryList.add(new JournalEntry(text, LocalDate.parse(date))); // save into list\n }\n return true;\n } catch (SQLException e) { // If Journals are unable to be loaded\n e.printStackTrace(); // Create alert for failing to load\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(null);\n alert.setContentText(\"Unable to load journal entry.\");\n alert.showAndWait();\n }\n return false;\n }",
"public int updateJournal(Journal journal) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_TITLE, journal.getTitle());\n values.put(KEY_DESCRIP,journal.getDescrip());\n values.put(KEY_DATE,journal.getDateAt());\n\n // updating row\n return db.update(TABLE_JOURNAL, values, KEY_ID + \" = ?\",\n new String[] { String.valueOf(journal.getId()) });\n }",
"@Override\n public DocumentServiceEntry getNewDocument() {\n UserService userService = UserServiceFactory.getUserService();\n DocumentServiceEntry doc = new DocumentServiceEntry();\n doc.setTitle(\"Untitled Document\");\n doc.setIdentifier(doc.getTitle().replaceAll(\"[^a-zA-Z0-9_\\\\-\\\\.]\", \"\"));\n doc.setAuthor(userService.getCurrentUser().getEmail());\n doc.setEditor(userService.getCurrentUser().getNickname());\n return doc;\n }",
"gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi addNewMedlineSi();",
"private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}",
"public Paper clone() \r\n\t{\r\n\t\tPaper copy = null;\r\n\t\ttry\r\n\t\t{ \r\n\t\t\tcopy = new Paper(this.getId(), new String(this.getTitle()), new String(this.getURI()),\r\n\t\t\t\tthis.year, new String(this.biblio_info), \r\n\t\t\t\tnew String(this.authors), new String(this.url) ); \r\n\t\t}\r\n\t\tcatch (Exception e) { e.printStackTrace(System.out); }\r\n\t\treturn copy;\r\n\t}",
"Book addBook(String title, String[] authors, boolean silent);",
"public void createNewStock(Stock stock) throws DuplicateEntry, InvalidDateEntry {\n\t\tif (!validateDate(stock.getDate())) {\n\t\t\tlog.error(\"Date entered is a future date for:\" + stock.getStock() + \"date given : \" + stock.getDate());\n\t\t\tthrow new InvalidDateEntry(\n\t\t\t\t\t\"Date entered is a future date for: \" + stock.getStock() + \" date given : \" + stock.getDate());\n\t\t}\n\n\t\tif (checkForDuplicates(new StockId(stock.getStock(), stock.getDate()))) {\n\t\t\tlog.error(\"Duplcate Record for :\" + stock.getStock() + \"on \" + stock.getDate());\n\t\t\tthrow new DuplicateEntry(\"Duplcate Record for : \" + stock.getStock() + \" on \" + stock.getDate());\n\t\t}\n\n\t\tstockRepo.save(stock);\n\n\t}",
"String getGlJournalId();",
"@Transient\n @Override\n public Integer getId()\n {\n return this.journalId;\n }",
"public FMISComLocal create() throws javax.ejb.CreateException;",
"private FSDataOutputStream createNewFile() throws Exception {\n\t\tlogger.traceEntry();\n\t\tPath newFile = new Path(rootDirectory, \"dim_\" + System.currentTimeMillis() + \".json\");\n\t\tlogger.debug(\"Creating file \" + newFile.getName());\n\t\tFSDataOutputStream dataOutputStream = null;\n\n\t\tif (!hadoopFileSystem.exists(newFile)) {\n\t\t\tdataOutputStream = hadoopFileSystem.create(newFile);\n\t\t} else {\n\t\t\tdataOutputStream = hadoopFileSystem.append(newFile);\n\t\t}\n\n\t\tdataOutputStreams.clear();\n\t\tdataOutputStreams.add(dataOutputStream);\n\t\tlogger.traceExit();\n\t\treturn dataOutputStream;\n\t}",
"public static Room createAlreadyPersistent(RoomProxy proxy, String name){\n if(proxy.isObjectPresent()) return proxy.getTheObject();\n return new Room(proxy.getId(), name, true);\n }",
"protected abstract T createNewEntry(PersistentEntity persistentEntity);",
"private static void createNotesCollectionIfNotExists(UserRegistry registry) throws RegistryException {\n if (!registry.resourceExists(NoteConstants.NOTE_LOCATION)) {\n Collection collection = registry.newCollection();\n registry.put(NoteConstants.NOTE_LOCATION, collection);\n }\n }",
"public DataEntry createEntry(String tableName, DataEntry entry) {\n\t\tDataEntry oldEntry = null;\n\t\tif (tables.containsKey(tableName)) {\n\t\t\tTable table = tables.get(tableName);\n\t\t\toldEntry = table.create(entry.getProductId(), entry);\n\t\t\tdataToHistory(oldEntry);\n\t\t}\n\t\treturn oldEntry;\n\t}",
"Book createBook();",
"public BinaryContent createClone(BinaryContent t)\r\n\t{\n\t\treturn null;\r\n\t}",
"public static boolean insertJournalEntry(JournalEntry entry){\n try {\n String action = \"INSERT INTO JOURNAL VALUES (?, ?)\"; // Setup query for task\n PreparedStatement statement = DatabaseHandler.getConnection().prepareStatement(action); // Setup statement for query\n statement.setString(1, entry.getDate().toString()); // Store date of the journal\n statement.setString(2, entry.getText()); // Store content of journal\n int result = statement.executeUpdate(); // send out the statement\n return (result > 1);\n } catch (SQLException e) { // If Journal was unable to be saved\n e.printStackTrace(); // Create new alert for failing to save\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(null);\n alert.setContentText(\"Unable to add new entry.\");\n alert.showAndWait();\n }\n return false;\n }",
"public Chord duplicate ()\r\n {\r\n // Beams are not copied\r\n Chord clone = new Chord(getMeasure(), slot);\r\n clone.stem = stem;\r\n stem.addTranslation(clone);\r\n\r\n // Notes (we make a deep copy of each note)\r\n List<TreeNode> notesCopy = new ArrayList<>();\r\n notesCopy.addAll(getNotes());\r\n\r\n for (TreeNode node : notesCopy) {\r\n Note note = (Note) node;\r\n new Note(clone, note);\r\n }\r\n\r\n clone.tupletFactor = tupletFactor;\r\n\r\n clone.dotsNumber = dotsNumber;\r\n clone.flagsNumber = flagsNumber; // Not sure TODO\r\n\r\n // Insure correct ordering of chords within their container\r\n ///Collections.sort(getParent().getChildren(), chordComparator);\r\n\r\n return clone;\r\n }",
"public LogBook() {\n logs = new UniqueLogList();\n exercises = new UniqueExerciseList();\n }",
"QuoteNote createQuoteNote();",
"public void saveNew() {\r\n String name, compName;\r\n double price;\r\n int id, inv, max, min, machId;\r\n //Gets the ID of the last part in the inventory and adds 1 to it \r\n id = Inventory.getAllParts().get(Inventory.getAllParts().size() - 1).getId() + 1;\r\n name = nameField.getText();\r\n inv = Integer.parseInt(invField.getText());\r\n price = Double.parseDouble(priceField.getText());\r\n max = Integer.parseInt(maxField.getText());\r\n min = Integer.parseInt(minField.getText());\r\n\r\n if (inHouseSelected) {\r\n machId = Integer.parseInt(machineOrCompanyField.getText());\r\n Part newPart = new InHouse(id, name, price, inv, min, max, machId);\r\n Inventory.addPart(newPart);\r\n } else {\r\n compName = machineOrCompanyField.getText();\r\n Part newPart = new Outsourced(id, name, price, inv, min, max, compName);\r\n Inventory.addPart(newPart);\r\n }\r\n\r\n }",
"boolean storeAuthor(Author author) throws PersistenceException, IllegalArgumentException;",
"public Note addNote(String title, String text) {\n Note newNote = new Note(title, text);\n notes.add(newNote); //add to ArrayList\n return newNote;\n }",
"void cloneTo(NamedStorage storage);",
"@Override\n\tpublic LMSLeaveInformation create(int SNo) {\n\t\tLMSLeaveInformation lmsLeaveInformation = new LMSLeaveInformationImpl();\n\n\t\tlmsLeaveInformation.setNew(true);\n\t\tlmsLeaveInformation.setPrimaryKey(SNo);\n\n\t\treturn lmsLeaveInformation;\n\t}",
"@Override\n public DocumentServiceEntry createDocument(String title, String contents) throws DocumentServiceException {\n DocsService svc = getDocsService();\n DocumentEntry newDocument = new DocumentEntry();\n newDocument.setTitle(new PlainTextConstruct(title));\n DocumentEntry entry;\n try {\n MediaByteArraySource source = new MediaByteArraySource(contents.getBytes(\"UTF8\"), \"text/plain\");\n newDocument.setMediaSource(source);\n entry = svc.insert(new URL(DOCS_SCOPE + \"default/private/full\"), newDocument);\n } catch (Exception e) {\n e.printStackTrace();\n throw new DocumentServiceException(e.getMessage());\n }\n return getDocumentReference(entry);\n }",
"long addEntry(long ledger, ByteBuf entry, boolean rollLog) throws IOException;",
"public void create(Singer newRecord);",
"public void createEditLog(long startingTransactionId) throws IOException {\n mEditLog = new EditLog(mEditLogPath, false, startingTransactionId);\n }",
"public com.walgreens.rxit.ch.cda.StrucDocTitleContent addNewContent()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocTitleContent target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocTitleContent)get_store().add_element_user(CONTENT$0);\n return target;\n }\n }",
"@Override\n public ProductBacklog createNewBacklog(ProductBacklog productBacklog) {\n return backlogRepository.save(productBacklog);\n }",
"private void recover() throws IllegalStateException, InvalidRecordLocationException, IOException, IOException {\n \n RecordLocation pos = null;\n int transactionCounter = 0;\n \n log.info(\"Journal Recovery Started from: \" + journal);\n ConnectionContext context = new ConnectionContext();\n \n // While we have records in the journal.\n while ((pos = journal.getNextRecordLocation(pos)) != null) {\n org.activeio.Packet data = journal.read(pos);\n DataStructure c = (DataStructure) wireFormat.unmarshal(data);\n \n if (c instanceof Message ) {\n Message message = (Message) c;\n JournalMessageStore store = (JournalMessageStore) createMessageStore(message.getDestination());\n if ( message.isInTransaction()) {\n transactionStore.addMessage(store, message, pos);\n }\n else {\n store.replayAddMessage(context, message);\n transactionCounter++;\n }\n } else {\n switch (c.getDataStructureType()) {\n case JournalQueueAck.DATA_STRUCTURE_TYPE:\n {\n JournalQueueAck command = (JournalQueueAck) c;\n JournalMessageStore store = (JournalMessageStore) createMessageStore(command.getDestination());\n if (command.getMessageAck().isInTransaction()) {\n transactionStore.removeMessage(store, command.getMessageAck(), pos);\n }\n else {\n store.replayRemoveMessage(context, command.getMessageAck());\n transactionCounter++;\n }\n }\n break;\n case JournalTopicAck.DATA_STRUCTURE_TYPE: \n {\n JournalTopicAck command = (JournalTopicAck) c;\n JournalTopicMessageStore store = (JournalTopicMessageStore) createMessageStore(command.getDestination());\n if (command.getTransactionId() != null) {\n transactionStore.acknowledge(store, command, pos);\n }\n else {\n store.replayAcknowledge(context, command.getClientId(), command.getSubscritionName(), command.getMessageId());\n transactionCounter++;\n }\n }\n break;\n case JournalTransaction.DATA_STRUCTURE_TYPE:\n {\n JournalTransaction command = (JournalTransaction) c;\n try {\n // Try to replay the packet.\n switch (command.getType()) {\n case JournalTransaction.XA_PREPARE:\n transactionStore.replayPrepare(command.getTransactionId());\n break;\n case JournalTransaction.XA_COMMIT:\n case JournalTransaction.LOCAL_COMMIT:\n Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());\n if (tx == null)\n break; // We may be trying to replay a commit that\n // was already committed.\n \n // Replay the committed operations.\n tx.getOperations();\n for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {\n TxOperation op = (TxOperation) iter.next();\n if (op.operationType == TxOperation.ADD_OPERATION_TYPE) {\n op.store.replayAddMessage(context, (Message) op.data);\n }\n if (op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {\n op.store.replayRemoveMessage(context, (MessageAck) op.data);\n }\n if (op.operationType == TxOperation.ACK_OPERATION_TYPE) {\n JournalTopicAck ack = (JournalTopicAck) op.data;\n ((JournalTopicMessageStore) op.store).replayAcknowledge(context, ack.getClientId(), ack.getSubscritionName(), ack\n .getMessageId());\n }\n }\n transactionCounter++;\n break;\n case JournalTransaction.LOCAL_ROLLBACK:\n case JournalTransaction.XA_ROLLBACK:\n transactionStore.replayRollback(command.getTransactionId());\n break;\n }\n }\n catch (IOException e) {\n log.error(\"Recovery Failure: Could not replay: \" + c + \", reason: \" + e, e);\n }\n }\n break;\n case JournalTrace.DATA_STRUCTURE_TYPE:\n JournalTrace trace = (JournalTrace) c;\n log.debug(\"TRACE Entry: \" + trace.getMessage());\n break;\n default:\n log.error(\"Unknown type of record in transaction log which will be discarded: \" + c);\n }\n }\n }\n \n RecordLocation location = writeTraceMessage(\"RECOVERED\", true);\n journal.setMark(location, true);\n \n log.info(\"Journal Recovered: \" + transactionCounter + \" message(s) in transactions recovered.\");\n }",
"JournalOutputStream getCheckpointOutputStream(long latestSequenceNumber) throws IOException;",
"public JournalArticlePersistence getJournalArticlePersistence() {\n\t\treturn journalArticlePersistence;\n\t}",
"public DataEntry create(long dataEntryId);",
"@Override\n\tpublic Paper create(long paperId) {\n\t\tPaper paper = new PaperImpl();\n\n\t\tpaper.setNew(true);\n\t\tpaper.setPrimaryKey(paperId);\n\n\t\tString uuid = PortalUUIDUtil.generate();\n\n\t\tpaper.setUuid(uuid);\n\n\t\tpaper.setCompanyId(companyProvider.getCompanyId());\n\n\t\treturn paper;\n\t}",
"void create(Authority authority) throws ExTrackDAOException;",
"private void processJournal() throws IOException {\n\t\tdeleteIfExists(journalFileTmp);\n\t\tfor (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {\n\t\t\tEntry entry = i.next();\n\t\t\tif (entry.currentEditor == null) {\n\t\t\t\tfor (int t = 0; t < valueCount; t++) {\n\t\t\t\t\tsize += entry.lengths[t];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tentry.currentEditor = null;\n\t\t\t\tfor (int t = 0; t < valueCount; t++) {\n\t\t\t\t\tdeleteIfExists(entry.getCleanFile(t));\n\t\t\t\t\tdeleteIfExists(entry.getDirtyFile(t));\n\t\t\t\t}\n\t\t\t\ti.remove();\n\t\t\t}\n\t\t}\n\t}",
"private void _addMessage(LogMessage logMessage) {\n\t\tString realmName = logMessage.getRealm();\n\t\tLinkedHashSet<LogMessage> logMessages = this.logMessagesByRealmAndId.computeIfAbsent(realmName,\n\t\t\t\tOperationsLog::newHashSet);\n\t\tlogMessages.add(logMessage);\n\n\t\t// store under locator\n\t\tLinkedHashMap<Locator, LinkedHashSet<LogMessage>> logMessagesLocator = this.logMessagesByLocator.computeIfAbsent(\n\t\t\t\trealmName, this::newBoundedLocatorMap);\n\t\tLinkedHashSet<LogMessage> messages = logMessagesLocator.computeIfAbsent(logMessage.getLocator(),\n\t\t\t\tOperationsLog::newHashSet);\n\t\tmessages.add(logMessage);\n\n\t\t// prune if necessary\n\t\tList<LogMessage> messagesToRemove = _pruneMessages(realmName, logMessages);\n\n\t\t// persist changes for non-transient realms\n\t\tStrolchRealm realm = getContainer().getRealm(realmName);\n\t\tif (!realm.getMode().isTransient())\n\t\t\tpersist(realm, logMessage, messagesToRemove);\n\t}",
"@Test\r\n public void testCopyEdits() throws Exception {\r\n MiniDFSCluster cluster = null;\r\n JournalService service = null;\r\n JournalHttpServer jhs1 = null, jhs2 = null;\r\n\r\n try {\r\n cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0).build();\r\n\r\n // restart namenode, so it will have finalized edit segments\r\n cluster.restartNameNode();\r\n\r\n conf.set(DFSConfigKeys.DFS_JOURNAL_EDITS_DIR_KEY, path1.getPath());\r\n InetSocketAddress nnAddr = cluster.getNameNode(0).getNameNodeAddress();\r\n InetSocketAddress serverAddr = new InetSocketAddress(50900);\r\n JournalListener listener = Mockito.mock(JournalListener.class);\r\n service = new JournalService(conf, nnAddr, serverAddr, listener);\r\n service.start();\r\n \r\n // get namenode clusterID/layoutVersion/namespaceID\r\n StorageInfo si = service.getJournal().getStorage();\r\n JournalInfo journalInfo = new JournalInfo(si.layoutVersion, si.clusterID,\r\n si.namespaceID);\r\n\r\n // start jns1 with path1\r\n jhs1 = new JournalHttpServer(conf, service.getJournal(),\r\n NetUtils.createSocketAddr(\"localhost:50200\"));\r\n jhs1.start();\r\n\r\n // get all edit segments\r\n InetSocketAddress srcRpcAddr = NameNode.getServiceAddress(conf, true);\r\n NamenodeProtocol namenode = NameNodeProxies.createNonHAProxy(conf,\r\n srcRpcAddr, NamenodeProtocol.class,\r\n UserGroupInformation.getCurrentUser(), true).getProxy();\r\n\r\n RemoteEditLogManifest manifest = namenode.getEditLogManifest(1); \r\n jhs1.downloadEditFiles(\r\n conf.get(DFSConfigKeys.DFS_NAMENODE_HTTP_ADDRESS_KEY), manifest);\r\n\r\n // start jns2 with path2\r\n conf.set(DFSConfigKeys.DFS_JOURNAL_EDITS_DIR_KEY, path2.getPath());\r\n Journal journal2 = new Journal(conf);\r\n journal2.format(si.namespaceID, si.clusterID); \r\n jhs2 = new JournalHttpServer(conf, journal2,\r\n NetUtils.createSocketAddr(\"localhost:50300\"));\r\n jhs2.start();\r\n\r\n // transfer edit logs from j1 to j2\r\n JournalSyncProtocol journalp = JournalService.createProxyWithJournalSyncProtocol(\r\n NetUtils.createSocketAddr(\"localhost:50900\"), conf,\r\n UserGroupInformation.getCurrentUser());\r\n RemoteEditLogManifest manifest1 = journalp.getEditLogManifest(journalInfo, 1); \r\n jhs2.downloadEditFiles(\"localhost:50200\", manifest1);\r\n\r\n } catch (IOException e) {\r\n LOG.error(\"Error in TestCopyEdits:\", e);\r\n assertTrue(e.getLocalizedMessage(), false);\r\n } finally {\r\n if (jhs1 != null)\r\n jhs1.stop();\r\n if (jhs2 != null)\r\n jhs2.stop();\r\n if (cluster != null)\r\n cluster.shutdown();\r\n if (service != null)\r\n service.stop();\r\n }\r\n }",
"private void createTempDatabase() {\n\t\thandler = new ERXmlDocumentHandler(doc);\n\t\tList<String> filter = initFilter(subjectId);\n\t\tparseEntitys(filter);\n\t}",
"public org.landxml.schema.landXML11.FieldNoteDocument.FieldNote addNewFieldNote()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.FieldNoteDocument.FieldNote target = null;\r\n target = (org.landxml.schema.landXML11.FieldNoteDocument.FieldNote)get_store().add_element_user(FIELDNOTE$4);\r\n return target;\r\n }\r\n }",
"@NotThreadSafe\npublic interface JournalReader extends Closeable {\n /**\n * Reads an entry from the journal. Return null if there is no more entry left.\n *\n * @return the journal entry, null if no more entry left\n * @throws InvalidJournalEntryException if the journal entry is invalid (e.g. corrupted entry)\n */\n JournalEntry read() throws IOException, InvalidJournalEntryException;\n\n /**\n * Gets the the sequence number of the next journal log entry to read. This method is valid\n * no matter whether this JournalReader is closed or not.\n *\n * @return the next sequence number\n */\n long getNextSequenceNumber();\n}",
"private TicketLog createLog() throws SQLException {\n\t\t\t\t\treturn new TicketLog(rs.getLong(1), rs.getString(2),\n\t\t\t\t\t\t\trs.getLong(3),\n\t\t\t\t\t\t\tTicketLog.Action.valueOf(rs.getString(4)),\n\t\t\t\t\t\t\trs.getInt(5));\n\t\t\t\t}",
"@Override\n public boolean createDailyNote(String note) {\n dailyNotes.add(new DailyNote(note));\n return true;\n }",
"AccountBankStatementImportJournalCreationEntity selectByPrimaryKey(Integer id);",
"private long addReceipt() {\n Entity receipt = createReceiptEntity(\n ORIGINAL_PRICE, ORIGINAL_STORE, ORIGINAL_TIMESTAMP, ORIGINAL_CATEGORIES);\n datastore.put(receipt);\n return receipt.getKey().getId();\n }",
"@Override\n\tpublic LocalRichInfo create(long id) {\n\t\tLocalRichInfo localRichInfo = new LocalRichInfoImpl();\n\n\t\tlocalRichInfo.setNew(true);\n\t\tlocalRichInfo.setPrimaryKey(id);\n\n\t\treturn localRichInfo;\n\t}",
"public synchronized void createIfNotExists(SQLiteDatabase db) {\n db.execSQL(SQL_CREATE_DATASOURCE);\n }",
"Snapshot create();",
"public void createNoteBookFile(NoteBook myNoteBook) throws DaoException {\n\t\tFile notebookFile = new File(FILE_NAME);\n\t\tif (notebookFile.exists()) {\n\t\t\tnotebookFile.delete();\n\t\t}\n\t\ttry {\n\t\t\tnotebookFile.createNewFile();\n\t\t} catch (IOException e) {\n\t\t\tthrow new DaoException(\"Create NoteBook file error\", e);\n\t\t}\n\t}",
"@Override\r\n\tpublic ItemLog createItemLog() {\n\t\treturn new HpLog();\r\n\t}",
"public PersistentShopkeeper newShopkeeper(long idCreateIfLessZero) throws PersistenceException {\n if(idCreateIfLessZero > 0) return (PersistentShopkeeper)PersistentProxi.createProxi(idCreateIfLessZero, 192);\n long id = ConnectionHandler.getTheConnectionHandler().theShopkeeperFacade.getNextId();\n Shopkeeper result = new Shopkeeper(null,null,null,null,null,null,id);\n Cache.getTheCache().put(result);\n return (PersistentShopkeeper)PersistentProxi.createProxi(id, 192);\n }",
"private static Logger getOrCreateLogger(final String name) {\n\t\tif (name == null || name.length() == 0) {\n\t\t\treturn root;\n\t\t} else {\n\t\t\tLogger logger = loggers.get(name);\n\t\t\tif (logger == null) {\n\t\t\t\tLogger parent = getOrCreateLogger(reduce(name));\n\t\t\t\tlogger = new Logger(parent, name);\n\t\t\t\tloggers.put(name, logger);\n\t\t\t}\n\t\t\treturn logger;\n\t\t}\n\t}",
"void createACustomerWithoutTransaction() {\r\n\t\tSystem.out.println(\"\\nCreating a customer without a transaction:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\tem.persist(c1);\r\n\t\tem.close();\r\n\t}",
"public void create_crystal() {\n\t\tcrystalQuantity[1] += (1+create_modifier);\n\t\tautomerge();\n\t\tcollection();\n\t}",
"void save(JournalPage page);",
"public static NoteMaster createEntity(EntityManager em) {\n NoteMaster noteMaster = new NoteMaster()\n .semestre(DEFAULT_SEMESTRE)\n .noteCC1(DEFAULT_NOTE_CC_1)\n .noteCC2(DEFAULT_NOTE_CC_2)\n .noteFinal(DEFAULT_NOTE_FINAL)\n .date(DEFAULT_DATE);\n return noteMaster;\n }",
"@Override\n\tprotected List<Change> getJournalImpl(RepositoryModel repository, long ticketId) {\n\t\tJedis jedis = pool.getResource();\n\t\tif (jedis == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\tList<Change> changes = getJournal(jedis, repository, ticketId);\n\t\t\tif (ArrayUtils.isEmpty(changes)) {\n\t\t\t\tlog.warn(\"Empty journal for {}:{}\", repository, ticketId);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn changes;\n\t\t} catch (JedisException e) {\n\t\t\tlog.error(\"failed to retrieve journal from Redis @ \" + getUrl(), e);\n\t\t\tpool.returnBrokenResource(jedis);\n\t\t\tjedis = null;\n\t\t} finally {\n\t\t\tif (jedis != null) {\n\t\t\t\tpool.returnResource(jedis);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private void addArticle() {\n\t\tAdminComposite.display(\"\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\tQuotationDetailsDTO detail = new QuotationDetailsDTO();\n\t\ttry {\n\t\t\tdetail = createQuotationDetail(detail);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (validateMandatoryParameters(detail)) {\n\t\t\taddToArticleTable(detail);\n\t\t}\n\t}",
"MasterTableJournal(int table_id) {\r\n this.table_id = table_id;\r\n command_journal = new byte[16];\r\n command_parameters = new IntegerVector(32);\r\n }"
] | [
"0.5567089",
"0.546708",
"0.5453828",
"0.53358084",
"0.5072631",
"0.50654244",
"0.5039111",
"0.503623",
"0.50177014",
"0.49444032",
"0.48982322",
"0.47783685",
"0.46806824",
"0.46548715",
"0.46490365",
"0.46479112",
"0.46404928",
"0.45874",
"0.45748228",
"0.45707104",
"0.44773847",
"0.44734913",
"0.44613373",
"0.44528428",
"0.43980616",
"0.43945506",
"0.43941274",
"0.43882072",
"0.43816605",
"0.43774238",
"0.43680987",
"0.43085012",
"0.43060213",
"0.429412",
"0.4257169",
"0.4253952",
"0.4250336",
"0.42206022",
"0.42164394",
"0.42150056",
"0.4213404",
"0.42048386",
"0.41989124",
"0.4185495",
"0.4179541",
"0.41762713",
"0.41639918",
"0.41575477",
"0.4154315",
"0.41506648",
"0.41498157",
"0.4121956",
"0.41216284",
"0.41176724",
"0.4105752",
"0.41042167",
"0.41038465",
"0.41009837",
"0.41003633",
"0.40941626",
"0.4093625",
"0.40890792",
"0.40844736",
"0.40836984",
"0.4079921",
"0.40782154",
"0.40712282",
"0.40687254",
"0.406421",
"0.40546647",
"0.4054092",
"0.40530777",
"0.40486723",
"0.40440547",
"0.4041866",
"0.4041282",
"0.40412667",
"0.40316424",
"0.40309095",
"0.40263802",
"0.40239638",
"0.40233442",
"0.40207183",
"0.4019201",
"0.40162313",
"0.4016203",
"0.40138832",
"0.40095165",
"0.40051264",
"0.39926133",
"0.3989533",
"0.39870128",
"0.39858356",
"0.39820886",
"0.39790794",
"0.39774117",
"0.39753863",
"0.39744076",
"0.3969362",
"0.39640456"
] | 0.528048 | 4 |
Returns the directory where this cache stores its data. | public File getDirectory() {
return directory;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected File getCacheDirectory() {\n \t\treturn Activator.getDefault().getStateLocation().append(\"cache\").toFile(); //$NON-NLS-1$\n \t}",
"@Override\r\n\tpublic File getCacheDir() {\r\n\t\treturn CommonUtil.getCacheDir();\r\n\t}",
"public File getLocalCacheDirectory() {\n return pathsProvider.getLocalAcmCacheDir();\n }",
"public Path getDataDirectory();",
"public File getDataStoreDir() {\n\t\treturn this.localDataStoreDir;\n\t}",
"public static File getDataDirectory() {\n\t\treturn DATA_DIRECTORY;\n\t}",
"public String getDataDir() {\n\t\treturn dataDir;\n\t}",
"private File getDataDir(){\n\t\tFile file = new File(this.configManager.getConfigDirectory() +\n\t\t\t\tFile.separator + \n\t\t\t\tDATA_DIR);\n\t\t\n\t\tif(!file.exists()){\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t\n\t\treturn file;\n\t}",
"public String getDataDirectory() {\n return dataDirectory;\n }",
"public String getFileSystemPath() {\n return getCacheDir().getAbsolutePath()\n + File.separator\n + getItemPath();\n }",
"public File getStoreDir();",
"public String getDir();",
"public File getCacheRoot()\r\n {\r\n return cache.getCacheRoot();\r\n }",
"public String getDirectory() {\n return directoryProperty().get();\n }",
"public String getFileDirectory() {\n String storedDirectory = settings.get(\"fileDirectory\");\n \n // Default to the program files\n if (storedDirectory == null) {\n storedDirectory = System.getenv(\"ProgramFiles\");\n }\n \n return storedDirectory;\n }",
"private static File getExternalCacheDir(Context context) {\n // TODO: This needs to be moved to a background thread to ensure no disk access on the\n // main/UI thread as unfortunately getExternalCacheDir() calls mkdirs() for us (even\n // though the Volley library will later try and call mkdirs() as well from a background\n // thread).\n return context.getExternalCacheDir();\n }",
"private String getDataDirectory() {\n Session session = getSession();\n String dataDirectory;\n try {\n dataDirectory = (String) session.createSQLQuery(DATA_DIRECTORY_QUERY).list().get(0);\n } finally {\n releaseSession(session);\n }\n return dataDirectory;\n }",
"public String directory () {\n\t\treturn directory;\n\t}",
"protected File getDir() {\n return hasSubdirs ? DatanodeUtil.idToBlockDir(baseDir,\n getBlockId()) : baseDir;\n }",
"public File getDefaultDiskCacheDir() {\n if (mContext == null)\n throw new FIllegalArgumentException(\"Context can not be null\");\n return DiskCacheUtil.getDiskLruCacheDir(mContext);\n }",
"public final String getCachePath() {\n\t\treturn cachePath;\n\t}",
"String getDir();",
"public String nextCacheDir() {\n if (cacheDir != null) return cacheDir;\n // assign cacheDir\n int nVer = nextVersion();\n cacheDir = CacheDirectory.cacheDirName(identity, nVer+\"\");\n return cacheDir;\n }",
"java.io.File getBaseDir();",
"private File getCacheDir(Context context, String uniqueName) {\n\t\tStringBuilder cachePath = new StringBuilder();\n\t\tif(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) || !Environment.isExternalStorageRemovable()){//API9\n\t\t\tcachePath.append(context.getExternalCacheDir().getPath());\n\t\t} else {\n\t\t\tcachePath.append(context.getCacheDir().getPath());\n\t\t}\n\t return new File(cachePath.toString() + File.separator + uniqueName);\n\t}",
"public File getCartridgeDir() {\n\t\treturn new File(DataStore.getInstance().getValue(CodegenConstants.DATASTORE_CARTRIDGE_DIR));\n\t}",
"public static File getExternalCacheDir(Context context) {\n\t\t// if (hasExternalCacheDir()) {\n\t\t// return context.getExternalCacheDir();\n\t\t// }\n\t\t// Before Froyo we need to construct the external cache dir ourselves\n\t\tfinal String cacheDir = FileUtils.sdPath + \"/pic_cache/\";\n\t\treturn new File(cacheDir);\n\t}",
"public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}",
"public static File getConfigDirectory() {\n return getDirectoryStoragePath(\"/NWD/config\", false);\n }",
"public String getWalletFileDirectoryFull() {\r\n return dataDirectory + walletFileDirectory;\r\n }",
"abstract public String getDataResourcesDir();",
"@Override\r\n\t\tpublic String getDir()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public File getDataFolder() {\n return dataFolder;\n }",
"Object getDir();",
"public String getLocalBasePath() {\n\t\treturn DataManager.getLocalBasePath();\n\t}",
"public File getCommonDir()\n {\n return validatePath(ServerSettings.getInstance().getProperty(ServerSettings.COMMON_DIR));\n }",
"public static File getExternalCacheDir(Context context) {\n\n\t\tif (VersionUtils.hasFroyo()) {\n\t\t\treturn context.getExternalCacheDir();\n\n\t\t}\n\t\t// Before Froyo we need to construct the external cache dir ourselves\n\n\t\tfinal String cacheDir = \"/Android/data/\" + context.getPackageName() + \"/cache/\";\n\n\t\treturn new File(Environment.getExternalStorageDirectory().getPath() + cacheDir);\n\n\t}",
"public File getDirectory() {\n\t\treturn file.getParentFile();\n\t}",
"public String getBaseDirectory()\n {\n return m_baseDirectory;\n }",
"private String getDirectoryForBackup() {\n\t\tString backupPath = configurationService.getValue(BACKUP_FOLDER_CONFIG);\n\t\tif (backupPath == null) {\n\t\t\t// if backup path null throw error, backup folder must be set\n\t\t\tthrow new ResultCodeException(CoreResultCode.BACKUP_FOLDER_NOT_FOUND,\n\t\t\t\t\tImmutableMap.of(\"property\", BACKUP_FOLDER_CONFIG));\n\t\t}\n\t\t// apend script default backup folder\n\t\tbackupPath = backupPath + \"/\" + SCRIPT_DEFAULT_BACKUP_FOLDER;\n\t\t// add date folder\n\t\tZonedDateTime date = ZonedDateTime.now();\n\t\tDecimalFormat decimalFormat = new DecimalFormat(\"00\");\n\t\treturn backupPath + date.getYear() + decimalFormat.format(date.getMonthValue())\n\t\t\t\t+ decimalFormat.format(date.getDayOfMonth()) + \"/\";\n\t}",
"public String getDir() {\n return dir;\n }",
"public String getPathToSyncDir() {\n return properties.getProperty(PATH_TO_SYNC_DIR);\n }",
"public static String downloadDir() {\n\n String downloads = stringValue(\"treefs.downloads\");\n if(isNullOrEmpty(downloads)) {\n // default home location\n downloads = home() + File.separator + \"downloads\";\n } else {\n downloads = home() + File.separator + downloads;\n }\n\n System.out.println(\"downloadDir=\" + downloads);\n return downloads;\n }",
"public File getModelDir() {\n\t\treturn new File(DataStore.getInstance().getValue(CodegenConstants.DATASTORE_MODEL_DIR));\n\t}",
"public static String getOutputDir() {\n outputDir = getProperty(\"outputDir\");\n if (outputDir == null) outputDir = \"./\";\n return outputDir;\n }",
"public String getDir() {\n return this.dir;\n }",
"private Optional<Path> dataSetDir() {\n Optional<String> dataSetDirProperty = demoProperties.dataSetDir();\n if (!dataSetDirProperty.isPresent()) {\n logger.info(\"Data set directory (app.demo.data-set-dir) is not set.\");\n return Optional.empty();\n }\n Path dataSetDirPath = Paths.get(dataSetDirProperty.get());\n if (!isReadableDir(dataSetDirPath)) {\n logger.warn(\n \"Data set directory '{}' doesn't exist or cannot be read. No external data sets will be loaded.\",\n dataSetDirPath.toAbsolutePath());\n return Optional.empty();\n }\n return Optional.of(dataSetDirPath);\n }",
"public String getBundleDir()\n {\n if ( bundleDir != null )\n {\n bundleDir = cleanBundleDir( bundleDir );\n }\n return bundleDir;\n }",
"public String getWalletFileDirectory() {\r\n return walletFileDirectory;\r\n }",
"public Path outputDir() {\n return dir;\n }",
"public static String getDownloadDirectory() {\n return downloadDirectory;\n }",
"String getDirectoryPath();",
"public java.io.File getBaseDir() {\n return baseDir;\n }",
"public static File getLogDirectory() {\n\t\treturn LOG_DIRECTORY;\n\t}",
"public File getCacheFile() {\n return new File(cacheDir.getAbsolutePath() + File.separator + this.cacheFile);\n }",
"public static String rootDir()\n {\n read_if_needed_();\n \n return _root;\n }",
"FsPath baseDir();",
"public File getDirectory()\n {\n return directory;\n }",
"public Path getSimulationLocation() {\n return FileManager.getSimulationDirectory(name);\n }",
"public static String getUserDir() {\r\n\t\treturn userDir;\r\n\t}",
"public File getBasedir()\n {\n return basedir;\n }",
"@Override\n public String getCurrentDirectory() {\n return (String) gemFileState.get(STATE_SYNC_DIRECTORY);\n }",
"public Queue getQueueDir() {\n Queue result;\n synchronized (this.queueDir) {\n result = this.queueDir;\n }\n return result;\n }",
"String getDatabaseDirectoryPath();",
"public File getDirectoryValue();",
"public String getDir(){\r\n\t\treturn dir;\r\n\t}",
"public String getConfigurationDirectory() {\n\t\treturn props.getProperty(ARGUMENT_CONFIGURATION_DIRECTORY);\n\t}",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}",
"public String getDirectoryPath() {\n return EXTERNAL_PATH;\n }",
"Path getBaseInputDir();",
"@Override\n public String getApplicationDirectory() {\n return Comm.getAppHost().getAppLogDirPath();\n }",
"public synchronized static String getCurrentDirectory() {\n if (currentDirectory == null)\n currentDirectory = canon(System.getProperty(\"user.home\"));\n return currentDirectory;\n }",
"public String getBlockFileDirectoryFull() {\r\n return dataDirectory + blockFileDirectory;\r\n }",
"public String getPath() {\n\t\treturn pfDir.getPath();\n\t}",
"public static String getPath() { return Objects.requireNonNull(Bukkit.getServer().getPluginManager().getPlugin(\"Catacombs\"))\n .getDataFolder().getAbsolutePath(); }",
"public static String getUserDir() {\n return System.getProperty(\"user.dir\");\n }",
"public static Object getInternalStorageDirectory() {\n\n FileObject root = Repository.getDefault().getDefaultFileSystem().getRoot();\n\n //FileObject dir = root.getFileObject(\"Storage\");\n \n //return dir;\n return null;\n }",
"private String getPath() {\r\n\t\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\r\n\t\t}",
"public Directory getDirectory() {\n\n\tif( _directory == null) { // If the current directory was not already parsed,\n \n \t _directory = parseDirectory(); // parse it.\n\t}\n\n\treturn _directory; // Return the current root directory.\n }",
"public String workingDirectory() {\n\t\treturn workingDir.getAbsolutePath();\n\t}",
"public File getRootDir() {\n return rootDir;\n }",
"private String getDownloadDir() throws IOException {\n if (!\"mounted\".equals(Environment.getExternalStorageState())) {\n return null;\n }\n String str = this.webView.getContext().getExternalFilesDir(null) + \"/socialsharing-downloads\";\n createOrCleanDir(str);\n return str;\n }",
"public File mo12778a() {\n File externalCacheDir = context.getExternalCacheDir();\n if (externalCacheDir == null) {\n return null;\n }\n String str = str;\n return str != null ? new File(externalCacheDir, str) : externalCacheDir;\n }",
"public String getDirectoryPath() { return DirectoryManager.OUTPUT_RESULTAT + \"/\" + directoryName;}",
"public File getGitRepoContainerDir() {\n return config.getGitReposParentDir();\n }",
"public File getCacheFile() {\n return AQUtility.getCacheFile(this.cacheDir, getCacheUrl());\n }",
"public String getAssetDirectory() {\n return String.format(\"plugin-webapp/%s\", getId());\n }",
"private StringBuffer getLogDirectory() {\n final StringBuffer directory = new StringBuffer();\n directory.append(directoryProvider.get());\n if (directory.charAt(directory.length() - 1) != File.separatorChar) {\n directory.append(File.separatorChar);\n }\n return directory;\n }",
"public static String getBaseDir() {\r\n Path currentRelativePath = Paths.get(System.getProperty(\"user.dir\"));\r\n return currentRelativePath.toAbsolutePath().toString();\r\n }",
"public String getShHarvestedDataDir() {\n\n\t\treturn shHarvestedDataDir;\n\n\t}",
"public static String getDatabaseExportDirectory() {\n\t\tif (xml == null) return \"\";\n\t\treturn databaseExportDir;\n\t}",
"public static File getScriptDirectory() {\n \t\treturn new File(getScriptlerHomeDirectory(), \"scripts\");\n \t}",
"public File getRootDir() {\r\n\t\treturn rootDir;\r\n\t}",
"private static File createReserveDiskCacheDir(Context context) {\n\t\tFile cacheDir = StorageUtils.getCacheDirectory(context, false);\n\t\tFile individualDir = new File(cacheDir, \"lazy-cache\");\n\t\tif (individualDir.exists() || individualDir.mkdir()) {\n\t\t\tcacheDir = individualDir;\n\t\t}\n\t\treturn cacheDir;\n\t}",
"@Internal(\"Represented as part of archivePath\")\n public File getDestinationDir() {\n return destinationDir;\n }",
"public String getBaseDirectoryName() {\n return mBaseDirectoryName;\n }",
"public String getHarvestedDataDir() {\n\n\t\treturn harvestedDataDir;\n\n\t}"
] | [
"0.8200023",
"0.789051",
"0.77999634",
"0.7445608",
"0.7373118",
"0.73676383",
"0.7304824",
"0.72837543",
"0.7207879",
"0.71918017",
"0.7153751",
"0.71361136",
"0.7113249",
"0.709274",
"0.70898324",
"0.7079653",
"0.70266837",
"0.6984843",
"0.69388103",
"0.69264597",
"0.69171035",
"0.6801106",
"0.67714894",
"0.6742685",
"0.6682382",
"0.6677142",
"0.66721594",
"0.66712415",
"0.6651029",
"0.66414607",
"0.6639625",
"0.6637328",
"0.66082907",
"0.65805125",
"0.6576056",
"0.65545243",
"0.6551583",
"0.6524453",
"0.65240306",
"0.6511361",
"0.65045434",
"0.65040267",
"0.6489887",
"0.64720184",
"0.6471994",
"0.646359",
"0.6431491",
"0.63847876",
"0.6369419",
"0.6366892",
"0.63504153",
"0.63488054",
"0.6335001",
"0.63077486",
"0.6301768",
"0.62994623",
"0.6299091",
"0.6292911",
"0.62847304",
"0.6283752",
"0.6281458",
"0.6269793",
"0.6259522",
"0.62432754",
"0.6235609",
"0.6230493",
"0.6228649",
"0.6228181",
"0.6228181",
"0.6228181",
"0.6228181",
"0.621567",
"0.6193249",
"0.6189405",
"0.6188783",
"0.61827356",
"0.61810726",
"0.61704016",
"0.61588323",
"0.61465985",
"0.61463684",
"0.6129518",
"0.6127561",
"0.612214",
"0.6117013",
"0.6114455",
"0.6114125",
"0.6113858",
"0.6107315",
"0.6106213",
"0.6104132",
"0.6097396",
"0.6073427",
"0.6071083",
"0.6069396",
"0.60679364",
"0.6058659",
"0.6058111",
"0.605613",
"0.60540265"
] | 0.62492716 | 63 |
Returns the maximum number of bytes that this cache should use to store its data. | public long maxSize() {
return maxSize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final synchronized int getMaximumSize() {\n\t\treturn cacheSize;\n\t}",
"public int getCacheMaxSizeKB() {\n return (cacheHandler.getMaxCacheSizeKB());\n }",
"public int maximumSizeInBytes() {\n return maximumSizeInBytes;\n }",
"public int getMaximumCacheSize() {\n return this.maximumCacheSize;\n }",
"int getMaximumCacheSize();",
"public int getMaxDiskCacheSize() {\n return mMaxDiskCacheSize;\n }",
"public static native int getMaxCacheMem();",
"public int getMaximumSize() {\n return maximumSize;\n }",
"private int getMaxSize() {\r\n return PropUtils.getValue(sizeLimitProp, DEFAULT_MAX_SIZE);\r\n }",
"public static int size_max() {\n return (8 / 8);\n }",
"@Override\n\tpublic long maxSize() {\n\t\treturn Main.chunkStoreAllocationSize;\n\t}",
"public Long maxSizeInMegabytes() {\n return this.maxSizeInMegabytes;\n }",
"public int getMaxSize()\n {\n return m_MaxSize;\n }",
"public int getMaxSize() {\n return maxSize;\n }",
"public int getMaxSize() {\n return maxSize;\n }",
"public int getMaxSize() {\n return maxSize;\n }",
"public Long get_cachemaxmemorykb() throws Exception {\n\t\treturn this.cachemaxmemorykb;\n\t}",
"public int getMaxSize() {\n return maxSize_;\n }",
"public int getMaxSize() {\n return maxSize_;\n }",
"@Override\n\tpublic long getMaxCacheSize() {\n\t\treturn 0;\n\t}",
"public int getMaxCacheSizeOnVeryLowDiskSpace() {\n return mMaxCacheSizeOnVeryLowDiskSpace;\n }",
"public int getCapacity() {\n\t\treturn this.maxCapacity;\n\t}",
"@Override\n public int getMaxCapacity() {\n return 156250000;\n }",
"public int getMaxSize() {\n return maxSize_;\n }",
"public int getMaxSize() {\n return maxSize_;\n }",
"int getTotalLength() {\n synchronized (lock) {\n return cache.getTotalLength();\n }\n }",
"public int getMaximumCapacity() { // get the max capacity\n\t\treturn maximumCapacity;\n\t}",
"int getSize() {\n synchronized (lock) {\n return cache.size();\n }\n }",
"public int maxSize()\n {\n return maxSize;\n }",
"public int getSize() {\n return this.serialize().limit();\n }",
"public static native int getMaxCache();",
"public int getMaximalSize() {\n return maximalSize;\n }",
"public int getMaxCacheSizeOnLowDiskSpace() {\n return mMaxCacheSizeOnLowDiskSpace;\n }",
"public float getCacheSizeKB() {\n return ((float) cacheHandler.getCurrentCacheSizeBytes() / 1000);\n }",
"public Long get_cache64maxmemorykb() throws Exception {\n\t\treturn this.cache64maxmemorykb;\n\t}",
"public int getSizeLimit() {\n\t\treturn sizeLimit;\n\t}",
"@java.lang.Override\n public int getMaximumCapacity() {\n return maximumCapacity_;\n }",
"public abstract long getMaxSize();",
"public int getMaxSize(){\n return maxSize;\n }",
"long getMemorySize() {\n return MemoryBudget.DELTAINFO_OVERHEAD +\n MemoryBudget.byteArraySize(key.length);\n }",
"long getMaxFileSizeBytes();",
"long getMemLimit();",
"public long getMemUsedMax() {\n return memUsedMax;\n }",
"@java.lang.Override\n public int getMaximumCapacity() {\n return maximumCapacity_;\n }",
"int getCacheSizeInMiB();",
"public int getMaxSize(){\n\t\treturn ds.length;\n\t}",
"public static long getCacheSize() {\n return sDiskLruCache.size();\n }",
"public static long getMaxNonHeapMemory() {\n\t\tMemoryMXBean memBean = ManagementFactory.getMemoryMXBean();\n\t\tMemoryUsage nonHeap = memBean.getNonHeapMemoryUsage();\n\n\t\treturn nonHeap.getMax();\n\t}",
"long getMaxMemory();",
"public Long get_cachemaxmemoryactivekb() throws Exception {\n\t\treturn this.cachemaxmemoryactivekb;\n\t}",
"public long getMaximumFileSize()\r\n\t{\r\n\t\treturn maxFileSize;\r\n\t}",
"public long getCacheSize() {\n DiskCacheManager diskCacheManager = getDiskCacheManager();\n if (diskCacheManager == null) return 0;\n return diskCacheManager.getCacheSize();\n }",
"public int maxEntrySize() {\n\t\tint max = Integer.MIN_VALUE;\n\t\tfor (int i = 0; (i < table.length); i++) {\n\t\t\tif (table [i] != null) {\n\t\t\t\tif (table[i].size() > max)\n\t\t\t\t\tmax = table[i].size();\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"public int getCacheSize(){ return Integer.parseInt(cacheSize.getText()); }",
"public long getMemMax() {\n return memMax;\n }",
"public int getTransactionMaxSize() {\r\n return transactionMaxSize;\r\n }",
"public int getCacheSize() {\n return cache.size();\n }",
"public static int sizeBits_max() {\n return 8;\n }",
"public int getMaximumValue() {\n/* 359 */ return Math.min(32767, (this.c.getMaximumSize()).width);\n/* */ }",
"public int getTrieDictionaryForestMaxTrieSizeMB() {\n return Integer.parseInt(getOptional(\"kylin.dictionary.forest-trie-max-mb\", \"500\"));\n }",
"public Integer getMaxQuota() {\n return (Integer) getAttributeInternal(MAXQUOTA);\n }",
"public abstract int getMaxIntermediateSize();",
"protected long getLiveSetSize() {\n\t\t// Sum of bytes removed from the containers.\n\t\tlong removed = 0;\n\n\t\tfor (int i = 0; i < sets.length; i++)\n\t\t\tremoved += sets[i].getContainer().getBytesRemoved();\n\n\t\t/*\n\t\t * The total number of butes still alive is the throughput minus the number of\n\t\t * bytes either removed from the container or never added in the first place.\n\t\t */\n\t\tlong size = getThroughput() - removed - producerThreadPool.getBytesNeverAdded();\n\n\t\treturn (size > 0) ? size : 0;\n\t}",
"synchronized final long getMaxFileSize() {\n return this.maxFileSize;\n }",
"public Long sizeInKB() {\n return this.sizeInKB;\n }",
"public synchronized int getUpperSizeLimit() {\n \t\treturn upper;\n \t}",
"private int calcMaxSize(int capacity) {\n // Clip the upper bound so that there will always be at least one available slot.\n int upperBound = capacity - 1;\n return Math.min(upperBound, (int) (capacity * loadFactor));\n }",
"public static int getMaxSize(){\n\t\treturn 2* 4;\n\t}",
"public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}",
"public final int capacity() {\n return packetCache.getCapacity();\n }",
"public final int getMaxLinkCount() {\n\t\tint r = 0;\n\t\tlockMe(this);\n\t\tr = maxLinkCount;\n\t\tunlockMe(this);\n\t\treturn r;\n\t}",
"public int getCacheSize() {\n\t\treturn _cacheSize;\n\t}",
"public Long get_cacheutilizedmemorykb() throws Exception {\n\t\treturn this.cacheutilizedmemorykb;\n\t}",
"public BigInteger getMaxUses() {\r\n return maxUses;\r\n }",
"public long getSize() {\n // a char is two bytes\n int size = (key.length() * 2) + 4;\n\n if (id != null) {\n size += ((id.length() * 2) + 4);\n }\n\n if (content != null) {\n if (content.getClass() == String.class) {\n size += ((content.toString().length() * 2) + 4);\n } else if (content instanceof CacheContent) {\n size += ((CacheContent) content).getSize();\n } else {\n return -1;\n }\n\n //add created, lastUpdate, and wasFlushed field sizes (1, 8, and 8)\n return size + 17;\n } else {\n return -1;\n }\n }",
"static public int getMaxLogStoreSize() {\n return (null == logFileMaxSize) ? DEFAULT_logFileMaxSize : logFileMaxSize;\n }",
"public int capacity() {\n\t\t// Report max number of elements before expansion\n\t\t// O(1)\n\t\treturn data.length;\n\t}",
"long throttleByteCount() {\n return parseLong(settings.get(THROTTLE_BYTE_COUNT), Long.MAX_VALUE);\n }",
"abstract int getMaxMemoryUsage();",
"long throttleByteCount() {\n return parseLong(get(THROTTLE_BYTE_COUNT), Long.MAX_VALUE);\n }",
"public long getMaximum() {\n\t\treturn this._max;\n\t}",
"public int getMaxCount() {\n return maxCount_;\n }",
"public long getByteCount() {\n return byteCount;\n }",
"@Override\n protected long getMaxBytes(final PropertyContext context) {\n return Long.MAX_VALUE;\n }",
"public Integer getMaxLength() { \n\t\treturn getMaxLengthElement().getValue();\n\t}",
"public int getMaxBufferSize() {\r\n return maxBufferSize;\r\n }",
"public Integer getMaxLength() {\n\t\treturn maxLength;\n\t}",
"public byte get_max() {\n return (byte)getSIntBEElement(offsetBits_max(), 8);\n }",
"public int size() {\n return cache.size();\n }",
"public int getMaxBufferSize() {\n return maxBufferSize;\n }",
"public Integer maxLength() {\n return this.maxLength;\n }",
"public int getMaximumBlockSize()\n {\n return bouquet.getSheaf().getPageSize() - Pack.BLOCK_PAGE_HEADER_SIZE - Pack.BLOCK_HEADER_SIZE;\n }",
"public int getMaxCount() {\n return maxCount_;\n }",
"public int serializedSizeInBytes() {\n\t\treturn this.sizeInBytes() + 3 * 4;\n\t}",
"@ManagedAttribute(description = \"Size in bytes\")\n\tpublic long getSizeInBytes() {\n\t\ttry {\n\t\t\treturn store.estimateSize().bytes();\n\t\t} catch (IOException e) {\n\t\t\treturn -1;\n\t\t}\n\t}",
"public int size() {\r\n\t\treturn cache.size();\r\n\t}",
"@Override\n\tpublic int size() {\n\t\treadLock.lock();\n\t\ttry {\n\t\t\treturn cache.size();\n\t\t} finally {\n\t\t\treadLock.unlock();\n\t\t}\n\t}",
"default int getMaximumCount(int slot) {\n\t\treturn 64;\n\t}",
"public double getMaxMemUsage() {\n return maxMemory;\n }",
"public long getMinFree() {\n return params.getMinimumFree() * 1024 * 1024;\n }"
] | [
"0.8501158",
"0.82318324",
"0.7935563",
"0.76729214",
"0.76586497",
"0.75193053",
"0.7388594",
"0.738536",
"0.7376586",
"0.73523176",
"0.73308146",
"0.730422",
"0.72742397",
"0.72415215",
"0.72415215",
"0.72415215",
"0.7220198",
"0.7203834",
"0.7203834",
"0.7191739",
"0.7178243",
"0.7176474",
"0.7166847",
"0.71646535",
"0.7163996",
"0.7160836",
"0.7152468",
"0.71398973",
"0.7131705",
"0.7101939",
"0.7095591",
"0.70778155",
"0.70750415",
"0.70691335",
"0.70504403",
"0.70393676",
"0.7018984",
"0.7002318",
"0.7000601",
"0.69953805",
"0.69943136",
"0.6992874",
"0.69760734",
"0.6970844",
"0.6948316",
"0.6942773",
"0.69216955",
"0.69145674",
"0.69080865",
"0.69002616",
"0.6897491",
"0.68924",
"0.68543404",
"0.6839327",
"0.68297076",
"0.6822472",
"0.68131936",
"0.68077844",
"0.6792385",
"0.6789667",
"0.67797184",
"0.67678326",
"0.6764044",
"0.67637587",
"0.6755306",
"0.67552876",
"0.6736653",
"0.67259574",
"0.6716552",
"0.67088103",
"0.66922987",
"0.66849375",
"0.6683903",
"0.66823924",
"0.66807973",
"0.6676627",
"0.6671543",
"0.66707623",
"0.6657146",
"0.6645409",
"0.66289675",
"0.66271645",
"0.66205436",
"0.6609694",
"0.6609132",
"0.66016793",
"0.65814185",
"0.65779275",
"0.65690076",
"0.656859",
"0.6566289",
"0.65635216",
"0.6554177",
"0.65409666",
"0.65389943",
"0.6537704",
"0.6533616",
"0.65256774",
"0.65245813",
"0.65221107"
] | 0.72950596 | 12 |
Returns the number of bytes currently being used to store the values in this cache. This may be greater than the max size if a background deletion is pending. | public synchronized long size() {
return size;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final synchronized int getMaximumSize() {\n\t\treturn cacheSize;\n\t}",
"int getSize() {\n synchronized (lock) {\n return cache.size();\n }\n }",
"public int getCacheMaxSizeKB() {\n return (cacheHandler.getMaxCacheSizeKB());\n }",
"public int size() {\n processQueue();\n return weakCache.size();\n }",
"protected long getLiveSetSize() {\n\t\t// Sum of bytes removed from the containers.\n\t\tlong removed = 0;\n\n\t\tfor (int i = 0; i < sets.length; i++)\n\t\t\tremoved += sets[i].getContainer().getBytesRemoved();\n\n\t\t/*\n\t\t * The total number of butes still alive is the throughput minus the number of\n\t\t * bytes either removed from the container or never added in the first place.\n\t\t */\n\t\tlong size = getThroughput() - removed - producerThreadPool.getBytesNeverAdded();\n\n\t\treturn (size > 0) ? size : 0;\n\t}",
"int getTotalLength() {\n synchronized (lock) {\n return cache.getTotalLength();\n }\n }",
"long getMemorySize() {\n return MemoryBudget.DELTAINFO_OVERHEAD +\n MemoryBudget.byteArraySize(key.length);\n }",
"public int maximumSizeInBytes() {\n return maximumSizeInBytes;\n }",
"@Override\n\tpublic long maxSize() {\n\t\treturn Main.chunkStoreAllocationSize;\n\t}",
"public int size() {\n return cache.size();\n }",
"public int size() {\r\n\t\treturn cache.size();\r\n\t}",
"public int size() {\n synchronized (cacheMap) {\n return cacheMap.size();\n }\n }",
"public static long getCacheSize() {\n return sDiskLruCache.size();\n }",
"public int getMaxDiskCacheSize() {\n return mMaxDiskCacheSize;\n }",
"public float getCacheSizeKB() {\n return ((float) cacheHandler.getCurrentCacheSizeBytes() / 1000);\n }",
"@Override\n\tpublic int size() {\n\t\treadLock.lock();\n\t\ttry {\n\t\t\treturn cache.size();\n\t\t} finally {\n\t\t\treadLock.unlock();\n\t\t}\n\t}",
"public long getSize() {\n // a char is two bytes\n int size = (key.length() * 2) + 4;\n\n if (id != null) {\n size += ((id.length() * 2) + 4);\n }\n\n if (content != null) {\n if (content.getClass() == String.class) {\n size += ((content.toString().length() * 2) + 4);\n } else if (content instanceof CacheContent) {\n size += ((CacheContent) content).getSize();\n } else {\n return -1;\n }\n\n //add created, lastUpdate, and wasFlushed field sizes (1, 8, and 8)\n return size + 17;\n } else {\n return -1;\n }\n }",
"int getMaximumCacheSize();",
"public Long sizeInKB() {\n return this.sizeInKB;\n }",
"public int getCacheSize() {\n return cache.size();\n }",
"public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}",
"public Long maxSizeInMegabytes() {\n return this.maxSizeInMegabytes;\n }",
"public long getCacheSize() {\n DiskCacheManager diskCacheManager = getDiskCacheManager();\n if (diskCacheManager == null) return 0;\n return diskCacheManager.getCacheSize();\n }",
"public static int size_max() {\n return (8 / 8);\n }",
"public int getSize() {\n return this.serialize().limit();\n }",
"public int getCachedTasksSize() {\n return cachedTasks.size();\n }",
"@Override\n\tpublic long getMaxCacheSize() {\n\t\treturn 0;\n\t}",
"public int getMaximumCacheSize() {\n return this.maximumCacheSize;\n }",
"public long maxSize() {\n\t\treturn maxSize;\n\t}",
"public int size()\n {\n // check if the cache needs flushing\n checkFlush();\n\n return super.size();\n }",
"public int getCurrentSize() {\n return count;\n }",
"public static int registeredSize() {\n\t\tInteger count = new Integer(0);\n\t\tObject object = cache.get(FQN_COUNT, LOGGED_COUNT);\n\t\tif (object != null) {\n\t\t\tcount = (Integer) object;\n\t\t}\n\n\t\treturn (count == null ? 0 : count.intValue());\n\t}",
"public long size() {\n\t\treturn size;\n\t}",
"@ManagedAttribute(description = \"Size in bytes\")\n\tpublic long getSizeInBytes() {\n\t\ttry {\n\t\t\treturn store.estimateSize().bytes();\n\t\t} catch (IOException e) {\n\t\t\treturn -1;\n\t\t}\n\t}",
"public int getCapacity() {\n\t\treturn this.maxCapacity;\n\t}",
"private int getMaxSize() {\r\n return PropUtils.getValue(sizeLimitProp, DEFAULT_MAX_SIZE);\r\n }",
"@Override\n public synchronized int size() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.size();\n }",
"long storageSize();",
"public int getCachedCount() {\n return cached_.size();\n }",
"public long getSize() {\n return size.get();\n }",
"@Override\n\tpublic long size() {\n\t\treturn this.currentLength.get();\n\t}",
"public long getGlobalMemcacheSize() {\n long total = 0;\n synchronized (onlineRegions) {\n for (HRegion region : onlineRegions.values()) {\n total += region.memcacheSize.get();\n }\n }\n return total;\n }",
"public int getCachedCount() {\n return cached_.size();\n }",
"public int getMaxSize()\n {\n return m_MaxSize;\n }",
"public int maxSize()\n {\n return maxSize;\n }",
"public int getCacheSize() {\n\t\treturn _cacheSize;\n\t}",
"public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }",
"public int getMaximumSize() {\n return maximumSize;\n }",
"long getLocalOnHeapSizeInBytes();",
"int getCacheSizeInMiB();",
"public int capacity() {\n\t\t// Report max number of elements before expansion\n\t\t// O(1)\n\t\treturn data.length;\n\t}",
"public int size() {\n return used;\n }",
"public Long get_cacheutilizedmemorykb() throws Exception {\n\t\treturn this.cacheutilizedmemorykb;\n\t}",
"public int getSizeLimit() {\n\t\treturn sizeLimit;\n\t}",
"int memSize() {\n // treat Code as free\n return BASE_NODE_SIZE + 3 * 4;\n }",
"public int getMaxSize() {\n return maxSize;\n }",
"public int getMaxSize() {\n return maxSize;\n }",
"public int getMaxSize() {\n return maxSize;\n }",
"public int size() {\n int size = 0;\n\n Collection<CacheableObject> values = new HashSet<CacheableObject>();\n synchronized(theLock) {\n values.addAll(valueMap.values());\n }\n\n for (CacheableObject cObj : values) {\n if (! this.isExpired(cObj)) {\n size++;\n }\n }\n\n return size;\n }",
"public long getRetainedSizeInBytes()\n {\n return INSTANCE_SIZE\n + sizeOf(nullable)\n + estimatedSizeOf(columnName)\n + sizeOf(comment, SizeOf::estimatedSizeOf)\n + jdbcTypeHandle.getRetainedSizeInBytes();\n }",
"public static native int getMaxCacheMem();",
"public int getCacheSize(){ return Integer.parseInt(cacheSize.getText()); }",
"long getLocalOffHeapSizeInBytes();",
"public int size() {\n return 4 + value.length + BufferUtil.paddingLength(value.length, 4);\n }",
"public Long sizeInBytes() {\n return this.sizeInBytes;\n }",
"public long getMemUsedMax() {\n return memUsedMax;\n }",
"public long getByteCount() {\n return byteCount;\n }",
"public static int size() {\n\t\treturn (anonymousSize() + registeredSize());\n\t}",
"public int serializedSizeInBytes() {\n\t\treturn this.sizeInBytes() + 3 * 4;\n\t}",
"public int getMaxSize() {\n return maxSize_;\n }",
"public int getMaxSize() {\n return maxSize_;\n }",
"public static int totalSize_entries_id() {\n return (176 / 8);\n }",
"public double getCapacity() {\n\t\tIterator<Ball> it = this.contents.iterator();\n\t\tdouble retVal = 0;\n\t\twhile (it.hasNext()) {\n\t\t\tretVal += it.next().getCapacity();\n\t\t}\n\t\treturn retVal;\n\t}",
"public int getMaxSize() {\n return maxSize_;\n }",
"public final int capacity() {\n return packetCache.getCapacity();\n }",
"public int getTotalCapacity() {\n return totalCapacity;\n }",
"@Override\n public int getCacheSize() {\n return 4 + this.arraySet.getTotalBytesSize();\n }",
"int getLocalOnHeapSize();",
"public Integer size() { return this.entries.length(); }",
"public int getMaxSize() {\n return maxSize_;\n }",
"int memSize() {\r\n\t\treturn BASE_NODE_SIZE + 5 * 4;\r\n\t}",
"int getLocalOffHeapSize();",
"public long getEntrySize() {\n return size;\n }",
"public long getTotalSize() {\n return totalSize;\n }",
"public long getTotalFreeSpaceInBytes() {\n return totalFreeSpaceInBytes_;\n }",
"public long getTotalFreeSpaceInBytes() {\n return totalFreeSpaceInBytes_;\n }",
"public int getFreeListSize() {\n return this.mFreeList.size();\n }",
"long getOccupiedSize();",
"int getByteCount() {\n\t\treturn byteCount;\n\t}",
"public int size() {\n synchronized (this.base) {\n return this.base.size();\n }\n }",
"public int maxEntrySize() {\n\t\tint max = Integer.MIN_VALUE;\n\t\tfor (int i = 0; (i < table.length); i++) {\n\t\t\tif (table [i] != null) {\n\t\t\t\tif (table[i].size() > max)\n\t\t\t\t\tmax = table[i].size();\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"int getCurrentCacheSize();",
"public synchronized int size() {\r\n return size;\r\n }",
"public int getMaxCacheSizeOnLowDiskSpace() {\n return mMaxCacheSizeOnLowDiskSpace;\n }",
"int getCachedCount();",
"public static int totalSize_entries_receiveEst() {\n return (176 / 8);\n }",
"public int getTransactionMaxSize() {\r\n return transactionMaxSize;\r\n }",
"public int getCapacity() {\n\t\tfinal String key = ConfigNames.CHILD_THREADS.toString();\n\n\t\tif (getJson().isNull(key)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn getJson().getInt(key);\n\t}",
"public int getTrieDictionaryForestMaxTrieSizeMB() {\n return Integer.parseInt(getOptional(\"kylin.dictionary.forest-trie-max-mb\", \"500\"));\n }",
"public int getMaximalSize() {\n return maximalSize;\n }"
] | [
"0.78360605",
"0.7537864",
"0.7535879",
"0.74551857",
"0.7362541",
"0.73616815",
"0.72642595",
"0.7225465",
"0.719003",
"0.7132777",
"0.7132598",
"0.70923793",
"0.70833236",
"0.7083106",
"0.69942474",
"0.69812644",
"0.69747376",
"0.6967212",
"0.6945122",
"0.69352925",
"0.69283825",
"0.68907386",
"0.6877576",
"0.68774444",
"0.6856419",
"0.684906",
"0.6844803",
"0.6840161",
"0.6838325",
"0.68248576",
"0.680879",
"0.67959887",
"0.6773665",
"0.6757536",
"0.6745324",
"0.67385316",
"0.67380124",
"0.67352957",
"0.6729687",
"0.67173564",
"0.67159086",
"0.67018026",
"0.6698633",
"0.66908556",
"0.6688439",
"0.66871274",
"0.6685368",
"0.66824186",
"0.6677747",
"0.66637397",
"0.6645548",
"0.6642363",
"0.66396654",
"0.66359",
"0.6624479",
"0.6621096",
"0.6621096",
"0.6621096",
"0.66208583",
"0.66166353",
"0.6609572",
"0.6600239",
"0.6591463",
"0.65889746",
"0.6588596",
"0.6582409",
"0.65802187",
"0.6579472",
"0.65668666",
"0.6564997",
"0.6564997",
"0.6549236",
"0.6547152",
"0.654487",
"0.654426",
"0.6536731",
"0.6536306",
"0.6533331",
"0.65287846",
"0.65269107",
"0.65162814",
"0.6513905",
"0.6499569",
"0.64973927",
"0.64850724",
"0.64850724",
"0.64820415",
"0.64796793",
"0.64788145",
"0.64779377",
"0.6476652",
"0.64706784",
"0.64685315",
"0.6467355",
"0.6462352",
"0.6457584",
"0.6451152",
"0.6449043",
"0.64487505",
"0.64486533"
] | 0.67935145 | 32 |
We only rebuild the journal when it will halve the size of the journal and eliminate at least 2000 ops. | private boolean journalRebuildRequired() {
final int REDUNDANT_OP_COMPACT_THRESHOLD = 2000;
return redundantOpCount >= REDUNDANT_OP_COMPACT_THRESHOLD
&& redundantOpCount >= lruEntries.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private synchronized void rebuildJournal() throws IOException {\n\t\tif (journalWriter != null) {\n\t\t\tjournalWriter.close();\n\t\t}\n\n\t\tWriter writer = new BufferedWriter(new FileWriter(journalFileTmp), IO_BUFFER_SIZE);\n\t\twriter.write(MAGIC);\n\t\twriter.write(\"\\n\");\n\t\twriter.write(VERSION_1);\n\t\twriter.write(\"\\n\");\n\t\twriter.write(Integer.toString(appVersion));\n\t\twriter.write(\"\\n\");\n\t\twriter.write(Integer.toString(valueCount));\n\t\twriter.write(\"\\n\");\n\t\twriter.write(\"\\n\");\n\n\t\tfor (Entry entry : lruEntries.values()) {\n\t\t\tif (entry.currentEditor != null) {\n\t\t\t\twriter.write(DIRTY + ' ' + entry.key + '\\n');\n\t\t\t} else {\n\t\t\t\twriter.write(CLEAN + ' ' + entry.key + entry.getLengths() + '\\n');\n\t\t\t}\n\t\t}\n\n\t\twriter.close();\n\t\tjournalFileTmp.renameTo(journalFile);\n\t\tjournalWriter = new BufferedWriter(new FileWriter(journalFile, true), IO_BUFFER_SIZE);\n\t}",
"private void processJournal() throws IOException {\n\t\tdeleteIfExists(journalFileTmp);\n\t\tfor (Iterator<Entry> i = lruEntries.values().iterator(); i.hasNext(); ) {\n\t\t\tEntry entry = i.next();\n\t\t\tif (entry.currentEditor == null) {\n\t\t\t\tfor (int t = 0; t < valueCount; t++) {\n\t\t\t\t\tsize += entry.lengths[t];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tentry.currentEditor = null;\n\t\t\t\tfor (int t = 0; t < valueCount; t++) {\n\t\t\t\t\tdeleteIfExists(entry.getCleanFile(t));\n\t\t\t\t\tdeleteIfExists(entry.getDirtyFile(t));\n\t\t\t\t}\n\t\t\t\ti.remove();\n\t\t\t}\n\t\t}\n\t}",
"private void m145778h() {\n if (!this.f119477j.mo115499a() && !this.f119478k && mo115435b(\"PRAGMA journal_size_limit\", null, null) != 524288) {\n mo115435b(\"PRAGMA journal_size_limit=524288\", null, null);\n }\n }",
"@Test\n public void write100Megs() throws Exception {\n final int segmentSize = 0x00100000;\n final int expectedSegments = 100;\n \n for (int i = 0; i < expectedSegments; i++) {\n journal.append(bytes(segmentSize));\n }\n journal.drain();\n \n Assert.assertEquals(expectedSegments * 2, dir.list().length);\n }",
"boolean mergeJournalChanges(long commit_id) {\n\n // Average size of pending transactions when this method is called...\n ++TS_merge_count;\n TS_merge_size += transaction_mod_list.size();\n if ((TS_merge_count % 32) == 0) {\n system.stats().set(\n (int) ((TS_merge_size * 1000000L) / TS_merge_count),\n \"MultiVersionTableIndices.average_journal_merge_mul_1000000\");\n// DatabaseSystem.stats().set(\n// TS_merge_size / TS_merge_count,\n// \"MultiVersionTableIndices.average_journal_merge\");\n// DatabaseSystem.stats().set(\n// TS_merge_size,\n// \"MultiVersionTableIndices.TS_merge_size\");\n// DatabaseSystem.stats().set(\n// TS_merge_count,\n// \"MultiVersionTableIndices.TS_merge_count\");\n }\n\n int merge_count = 0;\n int size = transaction_mod_list.size();\n while (transaction_mod_list.size() > 0) {\n\n MasterTableJournal journal =\n (MasterTableJournal) transaction_mod_list.get(0);\n\n if (commit_id > journal.getCommitID()) {\n\n ++merge_count;\n if (Debug().isInterestedIn(Lvl.INFORMATION)) {\n Debug().write(Lvl.INFORMATION, this,\n \"Merging '\" + table_name + \"' journal: \" + journal);\n }\n\n // Remove the top journal entry from the list.\n transaction_mod_list.remove(0);\n system.stats().decrement(journal_count_stat_key);\n\n }\n else { // If (commit_id <= journal.getCommitID())\n return false;\n }\n }\n\n return true;\n\n }",
"private void m145780j() {\n String str;\n if (!this.f119477j.mo115499a() && !this.f119478k) {\n if ((this.f119477j.f119578d & 536870912) != 0) {\n str = \"WAL\";\n } else {\n str = \"PERSIST\";\n }\n m145773d(str);\n }\n }",
"void prepareSortedLedgerStorageCheckpoint(long numBytesFlushed) throws IOException;",
"private void updateIndex() throws IOException {\n // maintain the document store (corpus) - if there is one\n if (currentMemoryIndex.containsPart(\"corpus\")) {\n // get all corpora + shove into document store\n ArrayList<DocumentReader> readers = new ArrayList<>();\n readers.add((DocumentReader) currentMemoryIndex.getIndexPart(\"corpus\"));\n for (String path : geometricParts.getAllShards().getBinPaths()) {\n String corpus = path + File.separator + \"corpus\";\n readers.add(new CorpusReader(corpus));\n }\n }\n // finally write new checkpointing data (checkpoints the disk indexes)\n Parameters checkpoint = createCheckpoint();\n this.checkpointer.saveCheckpoint(checkpoint);\n }",
"private static void deleteMemo() {\n\t\t\n\t}",
"protected void optimizeFile()\r\n {\r\n final ElapsedTimer timer = new ElapsedTimer();\r\n timesOptimized++;\r\n log.info(\"{0}: Beginning Optimization #{1}\", logCacheName, timesOptimized);\r\n\r\n // CREATE SNAPSHOT\r\n Collection<IndexedDiskElementDescriptor> defragList = null;\r\n\r\n storageLock.writeLock().lock();\r\n\r\n try\r\n {\r\n queueInput = true;\r\n // shut off recycle while we're optimizing,\r\n doRecycle = false;\r\n defragList = createPositionSortedDescriptorList();\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n\r\n // Defrag the file outside of the write lock. This allows a move to be made,\r\n // and yet have the element still accessible for reading or writing.\r\n long expectedNextPos = defragFile(defragList, 0);\r\n\r\n // ADD THE QUEUED ITEMS to the end and then truncate\r\n storageLock.writeLock().lock();\r\n\r\n try\r\n {\r\n try\r\n {\r\n if (!queuedPutList.isEmpty())\r\n {\r\n // pack them at the end\r\n expectedNextPos = defragFile(queuedPutList, expectedNextPos);\r\n }\r\n // TRUNCATE THE FILE\r\n dataFile.truncate(expectedNextPos);\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Error optimizing queued puts.\", logCacheName, e);\r\n }\r\n\r\n // RESTORE NORMAL OPERATION\r\n removeCount = 0;\r\n resetBytesFree();\r\n this.recycle.clear();\r\n queuedPutList.clear();\r\n queueInput = false;\r\n // turn recycle back on.\r\n doRecycle = true;\r\n isOptimizing = false;\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n\r\n log.info(\"{0}: Finished #{1}, Optimization took {2}\",\r\n logCacheName, timesOptimized, timer.getElapsedTimeString());\r\n }",
"private void maybeResize() {\n\t\tif ( this.size <= this.table.length / 2) return;\r\n\t\t\r\n\t\t//store the current entries\r\n\t\tList<Entry<K,V>> temp = new ArrayList<>();\r\n\t\tfor (Entry<K,V> entry : this.entrySet())\r\n\t\t\ttemp.add(temp.size(), entry);\r\n\t\t\r\n\t\t//create new table\r\n\t\tthis.createTable(this.table.length * 2);\r\n\t\t\r\n\t\t//reinsert the old entries (since the capacity has changed, indices will be different)\r\n\t\tfor (Entry<K,V> entry : temp ) \r\n\t\t\tthis.put(entry.getKey(), entry.getValue());\r\n\t\t\r\n\t}",
"private int cleanupSegmentsToMaintainSize(Log log) {\n if (log.config.retentionSize < 0 || log.size() < log.config.retentionSize)\n return 0;\n\n final AtomicLong diff = new AtomicLong(log.size() - log.config.retentionSize);\n\n return log.deleteOldSegments(new Predicate<LogSegment>() {\n @Override\n public boolean apply(LogSegment segment) {\n if (diff.get() - segment.size() >= 0) {\n diff.addAndGet(-segment.size());\n return true;\n } else {\n return false;\n }\n }\n });\n }",
"private void cleanUp() {\n if (rehash()) {\n // If we rehashed, we needn't clean up (clean up happens as\n // a side effect).\n return;\n }\n\n if (size == 0) {\n // No live entries == nothing to clean.\n return;\n }\n\n // Clean log(table.length) entries picking up where we left off\n // last time.\n int index = clean;\n Object[] table = this.table;\n for (int counter = table.length; counter > 0; counter >>= 1,\n index = next(index)) {\n Object k = table[index];\n\n if (k == TOMBSTONE || k == null) {\n continue; // on to next entry\n }\n\n // The table can only contain null, tombstones and references.\n @SuppressWarnings(\"unchecked\")\n Reference<ThreadLocal<?>> reference\n = (Reference<ThreadLocal<?>>) k;\n if (reference.get() == null) {\n // This thread local was reclaimed by the garbage collector.\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n }\n }\n\n // Point cursor to next index.\n clean = index;\n }",
"public void toReturn(Document doc){\n documents.remove(doc);\n doc.setCopies(doc.copiesNumber() + 1);\n //TODO check data and fee\n //TODO rewrite list of documents\n }",
"private void grow() {\n int oldCapacity = heap.length;\n // Double size if small; else grow by 50%\n int newCapacity = oldCapacity + ((oldCapacity < 64) ?\n (oldCapacity + 2) :\n (oldCapacity >> 1));\n Object[] newQueue = new Object[newCapacity];\n for (int i = 0; i < heap.length; i++) {\n newQueue[i] = heap[i];\n }\n heap = newQueue;\n }",
"protected void enlarge ()\n {\n // The new capacity of the graph\n int newLength = 1 + vertices.length + ENLARGE_VALUE * vertices.length / 100;\n\n E[] newVertices = (E[]) new Object[newLength];\n Node[] newAdjacencySequences = new Node[newLength];\n \n for (int index = 0; index <= lastIndex; index++)\n {\n newVertices[index] = vertices[index];\n vertices[index] = null;\n newAdjacencySequences[index] = adjacencySequences[index];\n adjacencySequences[index] = null;\n }\n\n vertices = newVertices;\n adjacencySequences = newAdjacencySequences;\n }",
"void compact(long maxSize) throws IOException;",
"private void removePrecious(CacheRepositoryEntry entry)\n {\n try {\n long size = entry.getSize();\n synchronized (_precious) {\n if (_precious.remove(entry.getPnfsId())) {\n _preciousSpace -= size;\n }\n }\n } catch (CacheException e) {\n _log.error(\"failed to get entry size : \" + e.getMessage());\n }\n }",
"private void handleShrinking( GameState state )\r\n\t{\n\t\t\r\n\t\tint shrinkLength = (int)(shrinkPercent * entities.length);\r\n\t\t\r\n\t\tif ( size < shrinkLength )\r\n\t\t{\r\n\t\t\tshrinkTime += state.seconds;\r\n\t\t\t\r\n\t\t\tif ( shrinkTime >= shrinkReadyTime )\r\n\t\t\t{\r\n\t\t\t\tentities = Arrays.copyOf( entities, shrinkLength );\r\n\t\t\t\tshrinkTime = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tshrinkTime = 0;\r\n\t\t}\r\n\t}",
"private void growSize() {\n size++;\n\n if (size > maxSize) {\n if (keys.length == Integer.MAX_VALUE) {\n throw new IllegalStateException(\"Max capacity reached at size=\" + size);\n }\n\n // Double the capacity.\n rehash(keys.length << 1);\n }\n }",
"@Test\n public void flushedTest() {\n for (int i = 0; i < InvertedIndexManager.DEFAULT_FLUSH_THRESHOLD * 2; i++) {\n iim.addDocument(dummy);\n }\n\n assertEquals(\n InvertedIndexManager.DEFAULT_FLUSH_THRESHOLD,\n iim.getNumDocuments(0)\n );\n\n assertEquals(\n InvertedIndexManager.DEFAULT_FLUSH_THRESHOLD,\n iim.getNumDocuments(1)\n );\n }",
"synchronized protected void enlargeArrays() {\n \t\tenlargeArrays(5);\n \t}",
"void vacuum( String workspaceName, long revision);",
"public void truncate() {\n\t\ttry {\n\t\t\t_reopenToken = _trackingIndexWriter.deleteAll();\n\t\t\tlog.warn(\"lucene index truncated\");\n\t\t} catch(IOException ioEx) {\n\t\t\tlog.error(\"Error truncating lucene index: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t \t\t \t ioEx);\t\t\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\t_indexWriter.commit(); \n\t\t\t} catch (IOException ioEx) {\n\t\t\t\tlog.error(\"Error truncating lucene index: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t ioEx);\n\t\t\t}\n\t\t}\n\t}",
"Builder withAutoCommitBufferSizeInKiB(int sizeInKiB);",
"private void startFresh() throws JournalException {\n try {\n this.log = this.node.getWriter(this.filename, false);\n } catch (IOException e) {\n throw new JournalException(\"Failed to create initial log file.\");\n }\n }",
"private void rehashing(boolean increase){\r\n int newLength;\r\n // if loadFactor is too big. //\r\n if (increase){\r\n newLength = capacity()*CAPACITY_CHANGE;\r\n }\r\n // if loadFactor is too small. //\r\n else{newLength = capacity()/CAPACITY_CHANGE;}\r\n // builds the new hashSet with the new capacity. //\r\n ClosedHashCell[] newHashSet = new ClosedHashCell[newLength];\r\n buildHashSet(newLength, newHashSet);\r\n for (ClosedHashCell cell : hashSet){\r\n if (cell.getValue() != null) {\r\n int j = 0;\r\n int clamping = (cell.getValue().hashCode() + (j+j*j) / 2) & (newLength - 1);\r\n while (!newHashSet[clamping].addMe(cell.getValue())) {\r\n j++;\r\n clamping = (cell.getValue().hashCode() + (j+j*j) / 2) & (newLength - 1);\r\n }\r\n }\r\n }\r\n hashSet = newHashSet;\r\n }",
"public void recycle(DocumentsWriterPerThread dwpt) {\n }",
"private void reallocateIfOverfilled() {\r\n\t\tif ((size * 1.0 / table.length) > MAX_FULLNESS_PERCENTAGE) {\r\n\t\t\treallocateArray();\r\n\t\t}\r\n\t}",
"void testCommitClash(MasterTableJournal journal)\r\n throws TransactionException {\r\n // Very nasty search here...\r\n// int cost = entries() * journal.entries();\r\n// System.out.print(\" CLASH COST = \" + cost + \" \");\r\n\r\n for (int i = 0; i < entries(); ++i) {\r\n byte tc = getCommand(i);\r\n if (tc == 2) { // command - row remove\r\n int row_index = getRowIndex(i);\r\n// System.out.println(\"* \" + row_index);\r\n for (int n = 0; n < journal.entries(); ++n) {\r\n// System.out.print(\" \" + journal.getRowIndex(n));\r\n if (journal.getCommand(n) == 2 &&\r\n journal.getRowIndex(n) == row_index) {\r\n throw new TransactionException(\r\n TransactionException.ROW_REMOVE_CLASH,\r\n \"Concurrent Serializable Transaction Conflict(1): \" +\r\n \"Current row remove clash ( row: \" + row_index + \" )\");\r\n }\r\n }\r\n// System.out.println();\r\n }\r\n }\r\n }",
"public static void main(String[] args) throws CorruptIndexException, LockObtainFailedException, IOException, ParseException{\n\t\tboolean lucene_im_mem = false;\n\t\t//1. Build the Index with varying \"database size\"\n\t\tString dirName =\"/data/home/duy113/SupSearchExp/AIDSNew/\";\n//\t\tString dirName = \"/Users/dayuyuan/Documents/workspace/Experiment/\";\n\t\tString dbFileName = dirName + \"DBFile\";\n\t\tString trainQueryName= dirName + \"TrainQuery\";\n//\t\tString testQuery15 = dirName + \"TestQuery15\";\n\t\tString testQuery25 = dirName + \"TestQuery25\";\n//\t\tString testQuery35 = dirName + \"TestQuery35\";\n\t\tGraphDatabase query = new GraphDatabase_OnDisk(testQuery25, MyFactory.getSmilesParser());\n\t\tdouble[] minSupts = new double[4];\n\t\tminSupts[0] = 0.05; minSupts[1] = 0.03; minSupts[2] =0.02; minSupts[3] = 0.01;\n \t\tint lwIndexCount[] = new int[1];\n\t\tlwIndexCount[0] = 479;\t\n//\t\tSystem.out.println(\"Build CIndexFlat Left-over: \");\n//\t\tfor(int j = 3; j< 4; j++){\n//\t\t\tdouble minSupt = minSupts[j];\n//\t\t\tfor(int i = 4; i<=10; i = i+2){\n//\t\t\t\tString baseName = dirName + \"G_\" + i + \"MinSup_\" + minSupt + \"/\";\n//\t\t\t\tGraphDatabase trainingDB = new GraphDatabase_OnDisk(dbFileName + i, MyFactory.getDFSCoder());\n//\t\t\t\tGraphDatabase trainQuery = new GraphDatabase_OnDisk(trainQueryName, MyFactory.getSmilesParser());\t\t\n//\t\t\t\tif(i == 2){\n//\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat\");\n//\t\t\t\t\tCIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, baseName, minSupt, lwIndexCount[0]);\n//\t\t\t\t}\n//\t\t\t\telse{\n//\t\t\t\t\tString featureBaseName = dirName + \"G_2\" + \"MinSup_\" + minSupt + \"/\";\n//\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat with Features \" + featureBaseName);\n//\t\t\t\t\tCIndexExp.buildIndex(featureBaseName, trainingDB, baseName, minSupt);\n//\t\t\t\t}\n//\t\t\t\tSystem.gc();\n//\t\t\t}\n//\t\t}\n\t\tSystem.out.println(\"Run Query Processing: \");\n\t\tfor(int j = 0; j< 4; j++){\n\t\t\tdouble minSupt = minSupts[j];\n\t\t\tfor(int i = 2; i<=10; i = i+2){\n\t\t\t\tString baseName = dirName + \"G_\" + i + \"MinSup_\" + minSupt + \"/\";\n\t\t\t\tGraphDatabase trainingDB = new GraphDatabase_OnDisk(dbFileName + i, MyFactory.getDFSCoder());\n\t\t\t\tGraphDatabase trainQuery = new GraphDatabase_OnDisk(trainQueryName, MyFactory.getSmilesParser());\t\t\n\t\t\t\tif(j!=0 || i!=2){\n\t\t\t\t\tSystem.out.println(baseName + \"LWindex\");\n\t\t\t\t\t//LWIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, trainQuery.getParser(),baseName, minSupt, lwIndexCount);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tLWIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tLWIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\t\t\n\t\t\t\t\tSystem.out.println(baseName + \"PrefixIndex\");\n\t\t\t\t\t//PrefixIndexExp.buildIndex(trainingDB, trainingDB, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tPrefixIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tPrefixIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\t\t\n\t\t\t\t\tSystem.out.println(baseName + \"PrefixIndexHi\");\n\t\t\t\t\t//PrefixIndexExp.buildHiIndex(trainingDB, trainingDB, 2, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tPrefixIndexExp.runHiIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tPrefixIndexExp.runHiIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t\tSystem.out.println(baseName + \"GPTree\");\n\t\t\t\t\t//GPTreeExp.buildIndex(trainingDB, trainingDB, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tGPTreeExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tGPTreeExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat\");\n\t\t\t\t\t//CIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, baseName, minSupt, lwIndexCount[0]);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tCIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tCIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t}\n\t\t\t\tif(j==0&&i==2){\n\t\t\t\t\tSystem.out.println(baseName + \"CIndexTopDown: \" + lwIndexCount[0]);\n\t\t\t\t\tCIndexExp.buildIndexTopDown(trainingDB, trainQuery, trainingDB,MyFactory.getUnCanDFS(), baseName, minSupt, 2*trainQuery.getTotalNum()/lwIndexCount[0] ); // 8000 test queries\n\t\t\t\t\t//System.gc();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(baseName + \"CIndexTopDown: \" + lwIndexCount[0]);\n\t\t\t\tCIndexExp.runIndexTopDown(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\tCIndexExp.runIndexTopDown(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\tSystem.gc();\n\t\t\t}\n\t\t}\n\t\tAIDSLargeExp.main(args);\n\t}",
"@Test\n public void testCompact_Overflow_Caching_Disabled() throws Exception {\n\n File file = new File(System.getProperty(\"java.io.tmpdir\") + File.separator\n + \"oasis-collection-testCompact_Overflow_Caching_Disabled\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2, file);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(2);\n instance.compact();\n\n assertNumberFilesInDirectory(instance.instanceStore(), 2);\n }",
"public void finishedDirectIndexBuild()\n\t{\n\t\tif(logger.isInfoEnabled()){\n\t\t\tlogger.info(\"flushing utf block lexicon to disk after the direct index completed\");\n\t\t}\n\t\t//only write a temporary lexicon if there are any items in it\n\t\tif (TempLex.getNumberOfNodes() > 0)\n\t\t\twriteTemporaryLexicon();\n\n\t\t//merges the temporary lexicons\n\t\tif (tempLexFiles.size() > 0)\n\t\t{\n\t\t\ttry{\n\t\t\t\tmerge(tempLexFiles);\n\t\n\t\t\t\t//creates the offsets file\n\t\t\t\tfinal String lexiconFilename = \n\t\t\t\t\tindexPath + ApplicationSetup.FILE_SEPARATOR + \n\t\t\t\t\tindexPrefix + ApplicationSetup.LEXICONSUFFIX;\n\t\t\t\tLexiconInputStream lis = getLexInputStream(lexiconFilename);\n\t\t\t\tcreateLexiconIndex(\n\t\t\t\t\tlis,\n\t\t\t\t\tlis.numberOfEntries(),\n\t\t\t\t\t/* after inverted index is built, the lexicon will be transformed into a\n\t\t\t\t\t * normal lexicon, without block frequency */\n\t\t\t\t\tUTFLexicon.lexiconEntryLength\n\t\t\t\t\t); \n\t\t\t\tTermCount = lis.numberOfEntries();\n\t\t\t\tif (index != null)\n\t\t\t\t{\n\t\t\t\t\tindex.addIndexStructure(\"lexicon\", \"uk.ac.gla.terrier.structures.UTFBlockLexicon\");\n\t\t\t\t\tindex.addIndexStructureInputStream(\"lexicon\", \"uk.ac.gla.terrier.structures.UTFBlockLexiconInputStream\");\n\t\t\t\t\tindex.setIndexProperty(\"num.Terms\", \"\"+lis.numberOfEntries());\n\t\t\t\t\tindex.setIndexProperty(\"num.Pointers\", \"\"+lis.getNumberOfPointersRead());\n\t\t\t\t}\n\t\t\t} catch(IOException ioe){\n\t\t\t\tlogger.error(\"Indexing failed to write a lexicon index file to disk\", ioe);\n\t\t\t}\t\n\t\t}\n\t\telse\n\t\t\tlogger.warn(\"No temporary lexicons to merge, skipping\");\n\t\t\n\t}",
"@Override\n @Secured(SecurityRoles.ADMINISTRATOR)\n public void reindex() {\n revisionDao.deleteAll();\n // OK, launches a new indexation\n indexFromLatest();\n }",
"public void truncate(int n) {\n if (n >= ON) return;\n compress();\n for (int i = n; i < OLast; i++) O[i] = null;\n OLast = ON = n;\n }",
"long recalculateRevision();",
"private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }",
"private void execute0()\n {\n if (logger.isDebugEnabled())\n {\n debugLogCompactingMessage(taskId);\n }\n\n long lastCheckObsoletion = startNanos;\n double compressionRatio = scanners.getCompressionRatio();\n if (compressionRatio == MetadataCollector.NO_COMPRESSION_RATIO)\n compressionRatio = 1.0;\n\n long lastBytesScanned = 0;\n\n if (!controller.cfs.getCompactionStrategyContainer().isActive())\n throw new CompactionInterruptedException(op.getProgress());\n\n estimatedKeys = writer.estimatedKeys();\n while (compactionIterator.hasNext())\n {\n if (op.isStopRequested())\n throw new CompactionInterruptedException(op.getProgress());\n\n UnfilteredRowIterator partition = compactionIterator.next();\n if (writer.append(partition))\n totalKeysWritten++;\n\n long bytesScanned = scanners.getTotalBytesScanned();\n\n // Rate limit the scanners, and account for compression\n if (compactionRateLimiterAcquire(limiter, bytesScanned, lastBytesScanned, compressionRatio))\n lastBytesScanned = bytesScanned;\n\n long now = System.nanoTime();\n if (now - lastCheckObsoletion > TimeUnit.MINUTES.toNanos(1L))\n {\n controller.maybeRefreshOverlaps();\n lastCheckObsoletion = now;\n }\n }\n\n // point of no return\n newSStables = writer.finish();\n\n\n completed = true;\n }",
"private void flushCache()\n {\n Entry<Integer, String> eldestEntry;\n File oldestFile;\n long eldestFileSize;\n int count = 0;\n\n int MAX_DELETE_FILE = 4;\n int MAX_CACHE_FILE_ALLOW = 1000;\n\n while (count < MAX_DELETE_FILE && (cacheSize > MAX_CACHE_FILE_ALLOW || cacheByteSize > maxCacheByteSize))\n {\n eldestEntry = mLinkedHashMap.entrySet().iterator().next();\n oldestFile = new File(eldestEntry.getValue());\n eldestFileSize = oldestFile.length();\n mLinkedHashMap.remove(eldestEntry.getKey());\n oldestFile.delete();\n cacheSize = mLinkedHashMap.size();\n cacheByteSize -= eldestFileSize;\n count++;\n }// while (count < MAX_DELETE_FILE && (cacheSize > MAX_CACHE_FILE_ALLOW || cacheByteSize > maxCacheByteSize))\n }",
"public void onLowMemory() {\r\n \t\tlog.info(\"On low memory : cleaning tiles - size = \" + cacheOfImages.size());\r\n \t\tArrayList<String> list = new ArrayList<String>(cacheOfImages.keySet());\r\n \t\t// remove first images (as we think they are older)\r\n \t\tfor (int i = 0; i < list.size()/2; i ++) {\r\n \t\t\tBitmap bmp = cacheOfImages.remove(list.get(i));\r\n \t\t\tif(bmp != null){\r\n \t\t\t\tbmp.recycle();\r\n \t\t\t}\r\n \t\t}\r\n \t\tSystem.gc();\r\n \t}",
"private void grow(int n) {\n\t\tint newSize = length + n;\n\t\tif (newSize > limit) {\n\t\t\t// find smallest power of 2 greater than newSize\n\t\t\tlimit = (int) Math.pow(2, Math.ceil(Math.log(newSize) / LN2));\n\t\t\tfloat[] newBuffer = new float[limit];\n\t\t\tSystem.arraycopy(data, 0, newBuffer, 0, length);\n\t\t\tdata = newBuffer;\n\t\t}\n\t}",
"protected void rehash() {\n int oldCapacity = table.length;\n ServerDescEntry oldMap[] = table;\n\n int newCapacity = oldCapacity * 2 + 1;\n ServerDescEntry newMap[] = new ServerDescEntry[newCapacity];\n\n threshold = (int)(newCapacity * loadFactor);\n table = newMap;\n\n for (int i = oldCapacity ; i-- > 0 ;) {\n for (ServerDescEntry old = oldMap[i] ; old != null ; ) {\n ServerDescEntry e = old;\n old = old.next;\n\n int index = (e.desc.sid & 0x7FFFFFFF) % newCapacity;\n e.next = newMap[index];\n newMap[index] = e;\n }\n }\n }",
"@Test\n public void testIndexRebuildCountPartitionsLeft() throws Exception {\n pds = true;\n\n Ignite ignite = startGrid(0);\n\n ignite.cluster().state(ClusterState.ACTIVE);\n\n IgniteCache<Object, Object> cache1 = ignite.cache(CACHE_NAME);\n\n for (int i = 0; i < 100_000; i++) {\n Long id = (long)i;\n\n BinaryObjectBuilder o = ignite.binary().builder(OBJECT_NAME)\n .setField(KEY_NAME, id)\n .setField(COLUMN1_NAME, i / 2)\n .setField(COLUMN2_NAME, \"str\" + Integer.toHexString(i));\n\n cache1.put(id, o.build());\n }\n\n ignite.cluster().state(ClusterState.INACTIVE);\n\n File dir = U.resolveWorkDirectory(U.defaultWorkDirectory(), DFLT_STORE_DIR, false);\n\n IOFileFilter filter = FileFilterUtils.nameFileFilter(\"index.bin\");\n\n Collection<File> idxBinFiles = FileUtils.listFiles(dir, filter, TrueFileFilter.TRUE);\n\n for (File indexBin : idxBinFiles)\n U.delete(indexBin);\n\n ignite.cluster().state(ClusterState.ACTIVE);\n\n MetricRegistry metrics = cacheGroupMetrics(0, GROUP_NAME);\n\n LongMetric idxBuildCntPartitionsLeft = metrics.findMetric(\"IndexBuildCountPartitionsLeft\");\n\n assertTrue(\"Timeout wait start rebuild index\",\n waitForCondition(() -> idxBuildCntPartitionsLeft.value() > 0, 30_000));\n\n assertTrue(\"Timeout wait finished rebuild index\",\n GridTestUtils.waitForCondition(() -> idxBuildCntPartitionsLeft.value() == 0, 30_000));\n }",
"private void ensureCapacity() {\r\n\t\t\tdouble loadFactor = getLoadFactor();\r\n\r\n\t\t\tif (loadFactor >= CAPACITY_THRESHOLD)\r\n\t\t\t\trehash();\r\n\t\t}",
"private void enlargeHashTable()\n {\n TableEntry<K,V>[] oldTable = hashTable;\n int oldSize = hashTable.length;\n int newSize = getNextPrime(oldSize + oldSize);\n\n // The case is safe because the new array contains null entries\n @SuppressWarnings(\"unchecked\")\n TableEntry<K, V>[] temp = (TableEntry<K, V>[]) new TableEntry[newSize];\n hashTable = temp;\n numberOfEntries = 0; // Reset size of dictionary, since it will be\n // incremented by add during rehash\n\n // Rehash dictionary entries from old array to the new and bigger\n // array; skip both null locations and removed entries\n for (int index = 0; index < oldSize; index++)\n {\n if ( (oldTable[index] != null) && oldTable[index].isIn() )\n add(oldTable[index].getKey(), oldTable[index].getValue());\n } // end for\n }",
"private void recover() throws IllegalStateException, InvalidRecordLocationException, IOException, IOException {\n \n RecordLocation pos = null;\n int transactionCounter = 0;\n \n log.info(\"Journal Recovery Started from: \" + journal);\n ConnectionContext context = new ConnectionContext();\n \n // While we have records in the journal.\n while ((pos = journal.getNextRecordLocation(pos)) != null) {\n org.activeio.Packet data = journal.read(pos);\n DataStructure c = (DataStructure) wireFormat.unmarshal(data);\n \n if (c instanceof Message ) {\n Message message = (Message) c;\n JournalMessageStore store = (JournalMessageStore) createMessageStore(message.getDestination());\n if ( message.isInTransaction()) {\n transactionStore.addMessage(store, message, pos);\n }\n else {\n store.replayAddMessage(context, message);\n transactionCounter++;\n }\n } else {\n switch (c.getDataStructureType()) {\n case JournalQueueAck.DATA_STRUCTURE_TYPE:\n {\n JournalQueueAck command = (JournalQueueAck) c;\n JournalMessageStore store = (JournalMessageStore) createMessageStore(command.getDestination());\n if (command.getMessageAck().isInTransaction()) {\n transactionStore.removeMessage(store, command.getMessageAck(), pos);\n }\n else {\n store.replayRemoveMessage(context, command.getMessageAck());\n transactionCounter++;\n }\n }\n break;\n case JournalTopicAck.DATA_STRUCTURE_TYPE: \n {\n JournalTopicAck command = (JournalTopicAck) c;\n JournalTopicMessageStore store = (JournalTopicMessageStore) createMessageStore(command.getDestination());\n if (command.getTransactionId() != null) {\n transactionStore.acknowledge(store, command, pos);\n }\n else {\n store.replayAcknowledge(context, command.getClientId(), command.getSubscritionName(), command.getMessageId());\n transactionCounter++;\n }\n }\n break;\n case JournalTransaction.DATA_STRUCTURE_TYPE:\n {\n JournalTransaction command = (JournalTransaction) c;\n try {\n // Try to replay the packet.\n switch (command.getType()) {\n case JournalTransaction.XA_PREPARE:\n transactionStore.replayPrepare(command.getTransactionId());\n break;\n case JournalTransaction.XA_COMMIT:\n case JournalTransaction.LOCAL_COMMIT:\n Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());\n if (tx == null)\n break; // We may be trying to replay a commit that\n // was already committed.\n \n // Replay the committed operations.\n tx.getOperations();\n for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {\n TxOperation op = (TxOperation) iter.next();\n if (op.operationType == TxOperation.ADD_OPERATION_TYPE) {\n op.store.replayAddMessage(context, (Message) op.data);\n }\n if (op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {\n op.store.replayRemoveMessage(context, (MessageAck) op.data);\n }\n if (op.operationType == TxOperation.ACK_OPERATION_TYPE) {\n JournalTopicAck ack = (JournalTopicAck) op.data;\n ((JournalTopicMessageStore) op.store).replayAcknowledge(context, ack.getClientId(), ack.getSubscritionName(), ack\n .getMessageId());\n }\n }\n transactionCounter++;\n break;\n case JournalTransaction.LOCAL_ROLLBACK:\n case JournalTransaction.XA_ROLLBACK:\n transactionStore.replayRollback(command.getTransactionId());\n break;\n }\n }\n catch (IOException e) {\n log.error(\"Recovery Failure: Could not replay: \" + c + \", reason: \" + e, e);\n }\n }\n break;\n case JournalTrace.DATA_STRUCTURE_TYPE:\n JournalTrace trace = (JournalTrace) c;\n log.debug(\"TRACE Entry: \" + trace.getMessage());\n break;\n default:\n log.error(\"Unknown type of record in transaction log which will be discarded: \" + c);\n }\n }\n }\n \n RecordLocation location = writeTraceMessage(\"RECOVERED\", true);\n journal.setMark(location, true);\n \n log.info(\"Journal Recovered: \" + transactionCounter + \" message(s) in transactions recovered.\");\n }",
"@Test\n public void testCompact_Overflow_Caching_Enabled() throws Exception {\n\n File file = new File(System.getProperty(\"java.io.tmpdir\") + File.separator\n + \"oasis-collection-testCompact_Overflow_Caching_Enabled\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2, file);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1, 1);\n instance.enableCache();\n instance.addAll(c);\n\n instance.remove(2);\n instance.compact();\n instance.disableCache();\n\n assertNumberFilesInDirectory(instance.instanceStore(), 2);\n\n }",
"private synchronized void updateFolds(final FoldHierarchyTransaction tran) {\r\n final FoldHierarchy fh = getOperation().getHierarchy();\r\n final BaseDocument doc = (BaseDocument)getOperation().getHierarchy().getComponent().getDocument();\r\n try {\r\n //parse document and create an array of folds\r\n List/*<FoldInfo>*/ generated = generateFolds2(doc);\r\n logger.fine(\"generated \" + generated.size());\r\n \r\n //get existing folds\r\n List existingFolds = FoldUtilities.findRecursive(fh.getRootFold());\r\n Iterator itr = existingFolds.iterator();\r\n \r\n final ArrayList newborns = new ArrayList(generated.size() / 2);\r\n final ArrayList/*<Fold>*/ zombies = new ArrayList(generated.size() / 2);\r\n \r\n //delete unexisting\r\n while(itr.hasNext()) {\r\n Fold f = (Fold)itr.next();\r\n if(!generated.contains(new FoldInfo(f.getStartOffset(), f.getEndOffset(), -1, \"\"))) {\r\n //delete this one\r\n logger.fine(\"adding \" + f + \" to zombies\");\r\n zombies.add(f);\r\n }\r\n }\r\n \r\n //and create new ones\r\n itr = generated.iterator();\r\n while(itr.hasNext()) {\r\n FoldInfo fi = (FoldInfo)itr.next();\r\n Iterator existingItr = existingFolds.iterator();\r\n boolean add = true;\r\n while(existingItr.hasNext()) {\r\n Fold f = (Fold)existingItr.next();\r\n if(f.getStartOffset() == fi.startOffset && f.getEndOffset() == fi.endOffset) {\r\n add = false;\r\n }\r\n }\r\n if(add) {\r\n newborns.add(fi);\r\n logger.fine(\"adding \" + fi + \" to newborns\");\r\n }\r\n }\r\n \r\n //run folds update in event dispatching thread\r\n Runnable updateTask = new Runnable() {\r\n public void run() {\r\n //lock the document for changes\r\n doc.readLock();\r\n try {\r\n //lock the hierarchy\r\n fh.lock();\r\n try {\r\n try {\r\n //remove outdated folds\r\n Iterator i = zombies.iterator();\r\n while(i.hasNext()) {\r\n Fold f = (Fold)i.next();\r\n getOperation().removeFromHierarchy(f, tran);\r\n }\r\n \r\n //add new folds\r\n Iterator newFolds = newborns.iterator();\r\n while(newFolds.hasNext()) {\r\n FoldInfo f = (FoldInfo)newFolds.next();\r\n getOperation().addToHierarchy(GROUP, f.label, false, f.startOffset , f.endOffset , 0, 0, null, tran);\r\n }\r\n }catch(BadLocationException ble) {\r\n //when the document is closing the hierarchy returns different empty document, grrrr\r\n ErrorManager.getDefault().notify(ble);\r\n }\r\n// }finally {\r\n// tran.commit();\r\n// }\r\n } finally {\r\n fh.unlock();\r\n }\r\n } finally {\r\n doc.readUnlock();\r\n }\r\n }\r\n };\r\n \r\n if(SwingUtilities.isEventDispatchThread()) {\r\n updateTask.run();\r\n } else {\r\n SwingUtilities.invokeAndWait(updateTask);\r\n }\r\n \r\n \r\n }catch(BadLocationException e) {\r\n ErrorManager.getDefault().notify(e);\r\n }catch(InterruptedException ie) {\r\n ;\r\n }catch(InvocationTargetException ite) {\r\n ErrorManager.getDefault().notify(ite);\r\n }\r\n }",
"private void checkAndModifySize() {\r\n if (size == data.length * LOAD_FACTOR) {\r\n resizeAndTransfer();\r\n }\r\n }",
"private void addPrecious(CacheRepositoryEntry entry)\n {\n try {\n long size = entry.getSize();\n synchronized (_precious) {\n if (_precious.add(entry.getPnfsId())) {\n _preciousSpace += size;\n }\n }\n } catch (CacheException e) {\n _log.error(\"failed to get entry size : \" + e.getMessage());\n }\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tprivate void increaseCapacity()\r\n\t{\r\n\t\t// Store a reference to the old table\r\n\t\tHashEntry<K, V>[] oldTable = table;\r\n\r\n\t\t// Attempt to resize the table\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Make a new table full of empty entries\r\n\t\t\ttable = new HashEntry[SIZES[++sizeIdx]];\r\n\t\t}\r\n\t\t// We have too many entries in the hash table: no more sizes left\r\n\t\tcatch (ArrayIndexOutOfBoundsException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Too many entries in hash table. Exiting.\");\r\n\t\t\tSystem.exit(4);\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < oldTable.length; ++i)\r\n\t\t{\r\n\t\t\t// If we are at an entry with a key and value\r\n\t\t\tif (oldTable[i] != null && !oldTable[i].isTombstone)\r\n\t\t\t{\r\n\t\t\t\t// Add every value at that key to the bigger table\r\n\t\t\t\tfor (V value : oldTable[i].value)\r\n\t\t\t\t{\r\n\t\t\t\t\tinsert(oldTable[i].key, value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected void removeOldData() {\n if (!storage.isEmpty()) {\n long timeLowerbound = storage.lastKey() - maxStorageTime;\n while (!storage.isEmpty() && storage.firstKey() < timeLowerbound) {\n storage.pollFirstEntry();\n } \n }\n }",
"@Test\n public void pruningAssertAfterRollover() throws Exception {\n _persistit.getTimestampAllocator().bumpTimestamp(1000000);\n\n // Write records until we have enough journal\n Exchange ex = getExchange(TREE_NAME1);\n Transaction txn = _persistit.getTransaction();\n txn.begin();\n for (long i = 0, curSize = 0; curSize < JournalManager.ROLLOVER_THRESHOLD; i += 1000) {\n writeRecords(ex, i, 1000);\n curSize = _persistit.getJournalManager().getCurrentJournalSize();\n }\n txn.commit();\n txn.end();\n _persistit.releaseExchange(ex);\n\n // Now write a few records that won't be pruned\n ex = getExchange(TREE_NAME2);\n txn.begin();\n writeRecords(ex, 0, 10);\n txn.commit();\n txn.end();\n _persistit.releaseExchange(ex);\n\n /*\n * Two iterations needed: 1) Dirty pages from writes 2) Empty checkpoint\n * (baseAddress now equals curAddress - CP.OVERHEAD)\n */\n for (int i = 0; i < 2; ++i) {\n _persistit.checkpoint();\n _persistit.getJournalManager().copyBack();\n }\n\n crashWithoutFlushAndRestoreProperties();\n\n // Timestamp was now back in time, writing same records creates invalid\n // MVVs\n txn = _persistit.getTransaction();\n ex = getExchange(TREE_NAME2);\n txn.begin();\n writeRecords(ex, 0, 10);\n txn.commit();\n txn.end();\n\n // Pruning caused assert\n ex.clear().append(0);\n ex.prune();\n }",
"@Test\n public void testCompact_Last_Segment_Caching_Disabled() throws Exception {\n\n File file = new File(System.getProperty(\"java.io.tmpdir\") + File.separator\n + \"oasis-collection-testCompact_Last_Segment_Caching_Disabled\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2, file);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(7);\n instance.compact();\n\n assertNumberFilesInDirectory(instance.instanceStore(), 2);\n }",
"public void setRecreateIndexes(java.lang.Long value);",
"private void appendToShardsAndDays(StringBuilder builder, BitSet bits, String date) {\n log.debug(\"bits.length():\" + bits.length() + \", bits.cardinality():\" + bits.cardinality());\n if ((bits.length() > 1) && ((float) (bits.cardinality()) >= (collapseDatePercentThreshold * bits.length()))) {\n if (log.isDebugEnabled()) {\n log.debug(\"Collapsing shards for \" + date + \" down to just the date with \" + bits.cardinality() + \" of \" + bits.length() + \" shards marked\");\n }\n if (builder.length() > 0) {\n builder.append(',');\n }\n builder.append(date);\n } else {\n if (log.isDebugEnabled()) {\n log.debug(\"Appending \" + bits.cardinality() + \" of \" + bits.length() + \" shards for \" + date);\n }\n StringBuilder shard = new StringBuilder();\n shard.append(date).append('_');\n int baseShardLen = shard.length();\n\n for (int i = 0; i < bits.length(); i++) {\n if (bits.get(i)) {\n shard.setLength(baseShardLen);\n shard.append(i);\n String shardString = shard.toString();\n if (builder.length() > 0) {\n builder.append(',');\n }\n builder.append(shardString);\n }\n }\n }\n }",
"private void m14054e() {\n SQLiteDatabase openOrCreateDatabase;\n SQLiteDatabase sQLiteDatabase = null;\n boolean z = true;\n try {\n openOrCreateDatabase = SQLiteDatabase.openOrCreateDatabase(f18052m, null);\n } catch (Exception e) {\n openOrCreateDatabase = sQLiteDatabase;\n }\n if (openOrCreateDatabase != null) {\n try {\n long queryNumEntries = DatabaseUtils.queryNumEntries(openOrCreateDatabase, \"wof\");\n long queryNumEntries2 = DatabaseUtils.queryNumEntries(openOrCreateDatabase, \"bdcltb09\");\n boolean z2 = queryNumEntries > BNOffScreenParams.MIN_ENTER_INTERVAL;\n if (queryNumEntries2 <= BNOffScreenParams.MIN_ENTER_INTERVAL) {\n z = false;\n }\n openOrCreateDatabase.close();\n if (z2 || z) {\n new C3333a().execute(new Boolean[]{Boolean.valueOf(z2), Boolean.valueOf(z)});\n }\n } catch (Exception e2) {\n }\n }\n }",
"@Test\n public void testCompact_Mid_Segment_Emptied_Caching_Enabled() throws Exception {\n\n File file = new File(System.getProperty(\"java.io.tmpdir\") + File.separator\n + \"oasis-collection-testCompact_Last_Segment_Emptied_Caching_Enabled\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2, file);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1, 1);\n instance.enableCache();\n instance.addAll(c);\n\n instance.remove(4);\n instance.remove(5);\n instance.compact();\n instance.disableCache();\n\n assertNumberFilesInDirectory(instance.instanceStore(), 2);\n\n }",
"protected void rehash() {\n int oldCapacity = table.length;\n Entry oldMap[] = table;\n\n int newCapacity = oldCapacity * 2 + 1;\n Entry newMap[] = new Entry[newCapacity];\n\n threshold = (int) (newCapacity * loadFactor);\n table = newMap;\n\n for (int i = oldCapacity; i-- > 0; ) {\n for (Entry old = oldMap[i]; old != null; ) {\n Entry e = old;\n old = old.next;\n\n int index = (e.key & 0x7FFFFFFF) % newCapacity;\n e.next = newMap[index];\n newMap[index] = e;\n }\n }\n }",
"public void reallocateBuckets() { }",
"private void resize() {\n if ((double) size / buckets.length > LOADFACTOR) {\n HashTableChained newTable = new HashTableChained(2 * buckets.length);\n for (int i = 0; i < buckets.length; i++) {\n SListNode current = (SListNode) buckets[i].front();\n try {\n while (current.isValidNode()) {\n Entry entry = (Entry) current.item();\n newTable.insert(entry.key(), entry.value());\n current = (SListNode) current.next();\n }\n } catch(InvalidNodeException e1) {\n System.err.println(\"Tried to use invalid node.\");\n }\n }\n buckets = newTable.buckets;\n largePrime = newTable.largePrime;\n }\n }",
"@Test\n public void testCompact_Last_Segment_Emptied_Caching_Enabled() throws Exception {\n\n File file = new File(System.getProperty(\"java.io.tmpdir\") + File.separator\n + \"oasis-collection-testCompact_Last_Segment_Emptied_Caching_Enabled\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2, file);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1, 1);\n instance.enableCache();\n instance.addAll(c);\n\n instance.remove(6);\n instance.remove(6);\n instance.compact();\n instance.disableCache();\n\n assertNumberFilesInDirectory(instance.instanceStore(), 2);\n\n }",
"public interface LogStorage {\n\n /**\n * Returns first log index in log.\n */\n long getFirstLogIndex();\n\n /**\n * Returns last log index in log.\n */\n long getLastLogIndex();\n\n /**\n * Get logEntry by index.\n */\n LogEntry getEntry(final long index);\n\n /**\n * Get logEntry's term by index. This method is deprecated, you should use {@link #getEntry(long)} to get the log id's term.\n * @deprecated\n */\n @Deprecated\n long getTerm(final long index);\n\n /**\n * Append entries to log.\n */\n boolean appendEntry(final LogEntry entry);\n\n /**\n * Append entries to log, return append success number.\n */\n int appendEntries(final List<LogEntry> entries);\n\n /**\n * Delete logs from storage's head, [first_log_index, first_index_kept) will\n * be discarded.\n */\n boolean truncatePrefix(final long firstIndexKept);\n\n /**\n * Delete uncommitted logs from storage's tail, (last_index_kept, last_log_index]\n * will be discarded.\n */\n boolean truncateSuffix(final long lastIndexKept);\n\n /**\n * Drop all the existing logs and reset next log index to |next_log_index|.\n * This function is called after installing snapshot from leader.\n */\n boolean reset(final long nextLogIndex);\n\n\n boolean init();\n}",
"private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }",
"private void resize(int newCapacity){\n ArrayList<ArrayList<Entry>> newBuckets = new ArrayList<>();\n for (int i = 0; i < newCapacity; i++) {\n newBuckets.add(new ArrayList<>());\n }\n\n for(K key:this){\n int newIndex=reduce(key,newCapacity);\n newBuckets.get(newIndex).add(new Entry(key,get(key)));\n\n }\n\n buckets=newBuckets;\n numBuckets=newCapacity;\n\n }",
"private void expand() {\n int capacity = newCapacity();\n IntIntMap h = new IntIntMap(capacity);\n for (int i = 0; i < entries.length; i += 2) {\n if (entries[i] != EMPTY) {\n h.put(entries[i], entries[i + 1]);\n }\n }\n this.entries = h.entries;\n this.threshold = h.threshold;\n this.modulo = h.modulo;\n this.modulo2 = h.modulo2;\n }",
"private void pruneIfNeeded(int neededSpace) {\n\t\tif ((mTotalSize + neededSpace) < mMaxCacheSizeInBytes) {\n\t\t\treturn;\n\t\t}\n\t\tif (VolleyLog.DEBUG) {\n\t\t\tVolleyLog.v(\"Pruning old cache entries.\");\n\t\t}\n\n\t\tlong before = mTotalSize;\n\t\tint prunedFiles = 0;\n\t\tlong startTime = SystemClock.elapsedRealtime();\n\n\t\tIterator<Map.Entry<String, CacheHeader>> iterator = mEntries.entrySet()\n\t\t\t\t.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry<String, CacheHeader> entry = iterator.next();\n\t\t\tCacheHeader e = entry.getValue();\n\t\t\tboolean deleted = getFileForKey(e.key).delete();\n\t\t\tif (deleted) {\n\t\t\t\tmTotalSize -= e.size;\n\t\t\t} else {\n\t\t\t\tVolleyLog.d(\n\t\t\t\t\t\t\"Could not delete cache entry for key=%s, filename=%s\",\n\t\t\t\t\t\te.key, getFilenameForKey(e.key));\n\t\t\t}\n\t\t\titerator.remove();\n\t\t\tprunedFiles++;\n\n\t\t\tif ((mTotalSize + neededSpace) < mMaxCacheSizeInBytes\n\t\t\t\t\t* HYSTERESIS_FACTOR) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (VolleyLog.DEBUG) {\n\t\t\tVolleyLog.v(\"pruned %d files, %d bytes, %d ms\", prunedFiles,\n\t\t\t\t\t(mTotalSize - before), SystemClock.elapsedRealtime()\n\t\t\t\t\t\t\t- startTime);\n\t\t}\n\t}",
"protected boolean reserve(final int size) {\n\t\tif (size > this.buffer.length) {\n\t\t\tfinal long oldbuffer[] = this.buffer;\n\t\t\tthis.buffer = new long[size];\n\t\t\tSystem.arraycopy(oldbuffer, 0, this.buffer, 0, oldbuffer.length);\n\t\t\tthis.rlw.array = this.buffer;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private synchronized void saveInternal() {\n if (relatedDocumentsCounter == 0) {\r\n return;\r\n }\r\n\r\n final TrigramIndexJsonModel model = new TrigramIndexJsonModel( relatedDocuments, indexGeneration, trigram );\r\n final TrigramDocumentCountJsonModel count = new TrigramDocumentCountJsonModel( trigram, globalRelatedDocumentsCounter );\r\n\r\n indexGeneration++;\r\n relatedDocuments = new TreeSet<>();\r\n relatedDocumentsCounter = 0;\r\n\r\n // put that save action and all unnecessary path calculations into a thread pool, \r\n // no need that other word can't be indexed, because of someone's save action... \r\n\r\n Runnable runnable = new Runnable() {\r\n @Override\r\n public void run() {\r\n Path trigramsPath = TrigramSubPathCalculator.getPathForTrigram( trigramsBasePath, trigram,\r\n \".\" + model.getIndexGeneration() + TRIGRAM_REFERENCE_SUFFIX );\r\n createTargetDirectoryIfNotExist( trigramsPath.getParent() );\r\n\r\n // write content of one part of the index\r\n try (BufferedWriter writer = Files.newBufferedWriter( trigramsPath, StandardCharsets.UTF_8 )) {\r\n Gson gson = new Gson();\r\n writer.write( gson.toJson( model ) );\r\n }\r\n catch (IOException e) {\r\n System.out.println( String.format( \"saving file: '%s' caused this error...\", trigramsPath ) );\r\n e.printStackTrace();\r\n }\r\n\r\n // write+overwrite the global documents counter as well\r\n Path trigramCountPath = TrigramSubPathCalculator.getPathForTrigram( trigramsBasePath, trigram, TRIGRAM_COUNT_SUFFIX );\r\n\r\n try (BufferedWriter writer = Files.newBufferedWriter( trigramCountPath, StandardCharsets.UTF_8 )) {\r\n Gson gson = new Gson();\r\n writer.write( gson.toJson( count ) );\r\n }\r\n catch (IOException e) {\r\n System.out.println( String.format( \"saving file: '%s' caused this error...\", trigramCountPath ) );\r\n e.printStackTrace();\r\n }\r\n\r\n }\r\n };\r\n\r\n // TODO: put into task thread-pool (deque) for really saving indexing time.\r\n runnable.run();\r\n }",
"private void rehash(double growthFactor) {\n \tsize=0;\n \tint newBuckets = (int) Math.round(Math.max(buckets.length*growthFactor, MIN_BUCKETS));\n \t\n \tLinkedList<Entry> tempEntries = new LinkedList<Entry>();\n \t\n \tfor(int i=0;i<buckets.length;i++) {\n \t\tLinkedList<Entry> tempBucket = buckets[i];\n \t\t\n \t\twhile(!tempBucket.isEmpty()) {\n \t\t\tEntry tempEntry = tempBucket.get(0);\n \t\t\t\n \t\t\ttempEntries.add(tempEntry);\n \t\t\ttempBucket.remove(0);\n \t\t\t\n \t\t}\n \t\t\n \t}\n \t\n \tinitBuckets(newBuckets);\n \t\n \tfor(int i=0;i<tempEntries.size();i++) {\n \t\tput(tempEntries.get(i).getKey(), tempEntries.get(i).getValue());\n \t}\n }",
"void rebuildIfNecessary();",
"public final void mo14831s() {\n Iterator it = ((ArrayList) mo14817d()).iterator();\n while (it.hasNext()) {\n File file = (File) it.next();\n if (file.listFiles() != null) {\n m6739b(file);\n long c = m6740c(file, false);\n if (((long) this.f6567b.mo14797a()) != c) {\n try {\n new File(new File(file, String.valueOf(c)), \"stale.tmp\").createNewFile();\n } catch (IOException unused) {\n f6563c.mo14884b(6, \"Could not write staleness marker.\", new Object[0]);\n }\n }\n for (File b : file.listFiles()) {\n m6739b(b);\n }\n }\n }\n }",
"protected static void rehash() \r\n\t{\r\n\t\tEntry\told, e;\r\n\t\tint\t\ti, index;\r\n\r\n\t\tEntry\toldMap[] = m_table;\r\n\t\tint\t\toldCapacity = oldMap.length;\r\n\r\n\t\tint newCapacity = oldCapacity * 2 + 1;\r\n\t\tEntry newMap[] = new Entry[newCapacity];\r\n\r\n\t\tm_threshold = (int)(newCapacity * m_loadFactor);\r\n\t\tm_table = newMap;\r\n\r\n\t\tfor (i = oldCapacity ; i-- > 0 ;) {\r\n\t\t\tfor (old = oldMap[i] ; old != null ; ) {\r\n\t\t\t\te = old;\r\n\t\t\t\told = old.m_next;\r\n\r\n\t\t\t\tindex = (e.m_name.hashCode() & 0x7FFFFFFF) % newCapacity;\r\n\t\t\t\te.m_next = newMap[index];\r\n\t\t\t\tnewMap[index] = e;\r\n\t\t\t}\r\n\t\t}\r\n }",
"@Test\n public void testCompact_Mid_Segment_Caching_Disabled() throws Exception {\n\n File file = new File(System.getProperty(\"java.io.tmpdir\") + File.separator\n + \"oasis-collection-testCompact_Last_Segment_Caching_Disabled\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2, file);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(5);\n instance.compact();\n\n assertNumberFilesInDirectory(instance.instanceStore(), 2);\n }",
"public static void main(String[] args) throws IOException, SQLException, InterruptedException {\r\n System.setOut(new PrintStream(new FileOutputStream(new File(\"log.txt\"))));\r\n\r\n if (Config.DB.NUCLEAR_OPTION) {\r\n String myDearestWarning = \"NUCLEAR_OPTION ENABLED... RUN FOR YOUR FUCKIN LIFE (i.e. ask yourself if you ABSOLUTELY need this)\\n\" +\r\n \"THIS OPTION SHOULD BE USED ONLY FOR TESTING. IT WILL DELETE THESE TABLES TO START A FRESH DEDUPLICATION/MERGE:\\n\" +\r\n \"articles, articles_authors, authors, authors_organizes, journals, merge_logs, organizes\\n\" +\r\n \"YOU HAVE 20 SECONDS TO THINK ABOUT YOUR LIFE...\";\r\n\r\n System.out.println(myDearestWarning);\r\n System.err.println(myDearestWarning);\r\n\r\n Thread.sleep(20000);\r\n }\r\n\r\n long start = System.nanoTime();\r\n\r\n IndexElastic.indexCrawledISIAndScopus();\r\n\r\n importAllScopus();\r\n\r\n IndexElastic.indexAvailableArticles();\r\n IndexElastic.indexAvailableJournals();\r\n IndexElastic.indexAvailableOrganizations();\r\n\r\n int maxIDOfISI = DataUtl.getMaxIDOfTable(Config.DB.INPUT, \"isi_documents\");\r\n if (Config.START_IMPORT_ISI_FROM > maxIDOfISI) {\r\n throw new RuntimeException(\"Config.START_IMPORT_ISI_FROM is larger than the current max ID of isi_documents.\");\r\n }\r\n\r\n for (int i = Config.START_IMPORT_ISI_FROM; i <= maxIDOfISI; ++i) {\r\n\r\n try {\r\n List<Deduplicator.Match> matches = Deduplicator.deduplicate(Article.ISI, i);\r\n\r\n if (matches.size() != 0) {\r\n writeLogToDB(matches);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n Sluginator.slugifyAll();\r\n\r\n long elapsed = System.nanoTime() - start;\r\n\r\n IndexElastic.cleanTemporaryIndices();\r\n\r\n System.out.println(\"All took \" + elapsed + \" nanoseconds\");\r\n }",
"private final void onDisk(TransactionInternal txn, LogEntry entry) throws BabuDBException {\n \n // append the entry to the DiskLogger if available, wait otherwise\n try {\n \n synchronized (diskLogger) {\n \n while (diskLogger.get() == null) {\n diskLogger.wait();\n }\n \n diskLogger.get().append(entry);\n }\n } catch (InterruptedException ie) {\n \n if (entry != null) entry.free();\n throw new BabuDBException(ErrorCode.INTERRUPTED, \"Operation \" +\n \"could not have been stored persistent to disk and \" +\n \"will therefore be discarded.\", ie.getCause());\n } \n }",
"MasterTableJournal(int table_id) {\r\n this.table_id = table_id;\r\n command_journal = new byte[16];\r\n command_parameters = new IntegerVector(32);\r\n }",
"public synchronized int resize(int newBytesPerId, int newBytesPerType, int newBytesPerPath)\n throws IOException {\n if (this.bytesPerId > newBytesPerId && this.entries > 0)\n throw new IllegalStateException(\"Cannot reduce the number of bytes per id when there are entries in the index\");\n if (this.bytesPerType > newBytesPerType && this.entries > 0)\n throw new IllegalStateException(\"Cannot reduce the number of bytes per type when there are entries in the index\");\n if (this.bytesPerPath > newBytesPerPath && this.entries > 0)\n throw new IllegalStateException(\"Cannot reduce the number of bytes per path when there are entries in the index\");\n if (this.isReadOnly)\n throw new IllegalStateException(\"This index is readonly\");\n \n int newBytesPerSlot = newBytesPerId + newBytesPerType + newBytesPerPath;\n \n logger.info(\"Resizing uri index to {} ({}) slots and {} ({}) bytes per entry\", new Object[] { slots, this.slots, newBytesPerSlot, this.bytesPerSlot });\n \n String fileName = FilenameUtils.getBaseName(idxFile.getName());\n String fileExtension = FilenameUtils.getExtension(idxFile.getName());\n String idxFilenameNew = fileName + \"_resized.\" + fileExtension;\n File idxNewFile = new File(idxFile.getParentFile(), idxFilenameNew);\n long time = System.currentTimeMillis();\n \n logger.debug(\"Creating resized index at \" + idxNewFile);\n \n // Create the new index\n RandomAccessFile idxNew = null;\n try {\n idxNew = new RandomAccessFile(idxNewFile, \"rwd\");\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"Index file \" + idxNewFile + \" cannot be created: \" + e.getMessage(), e);\n }\n \n // Write header\n idxNew.seek(IDX_START_OF_HEADER);\n idxNew.writeInt(indexVersion);\n idxNew.writeInt(newBytesPerId);\n idxNew.writeInt(newBytesPerType);\n idxNew.writeInt(newBytesPerPath);\n idxNew.writeLong(slots);\n idxNew.writeLong(entries);\n \n // Position to read the whole content\n idx.seek(IDX_START_OF_CONTENT);\n \n // Write entries\n for (int i = 0; i < slots; i++) {\n byte[] bytes = new byte[newBytesPerSlot];\n if (i < this.slots) {\n idx.read(bytes, 0, this.bytesPerSlot);\n idxNew.write(bytes);\n } else {\n // Write an empty line\n idxNew.write(bytes);\n }\n }\n \n logger.debug(\"Removing old index at \" + idxFile);\n \n // Close and delete the old index\n idx.close();\n if (!idxFile.delete())\n throw new IOException(\"Unable to delete old index file \" + idxFile);\n \n // Close the new index, and move it into the old index' place\n logger.debug(\"Moving resized index into regular position at \" + idxFile);\n idxNew.close();\n if (!idxNewFile.renameTo(idxFile))\n throw new IOException(\"Unable to move new index file to \" + idxFile);\n \n try {\n idx = new RandomAccessFile(idxFile, \"rwd\");\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"Index file \" + idxNewFile + \" cannot be created: \" + e.getMessage(), e);\n }\n \n this.bytesPerSlot = newBytesPerSlot;\n this.bytesPerId = newBytesPerId;\n this.bytesPerType = newBytesPerType;\n this.bytesPerPath = newBytesPerPath;\n \n time = System.currentTimeMillis() - time;\n logger.info(\"Uri index resized in {}\", ConfigurationUtils.toHumanReadableDuration(time));\n return newBytesPerSlot;\n }",
"public static void main(String[] args) throws IOException {\n System.setProperty(\"entityExpansionLimit\", \"10000000\");\n\n String dblpXmlFilename = \"data/dblp.xml\";\n String dblpDtdFilename = \"data/dblp.dtd\";\n\n System.out.println(\"building the dblp main memory DB ...\");\n RecordDbInterface dblp;\n try {\n dblp = new RecordDb(dblpXmlFilename, dblpDtdFilename, false);\n } catch (final IOException ex) {\n System.err.println(\"cannot read dblp XML: \" + ex.getMessage());\n return;\n } catch (final SAXException ex) {\n System.err.println(\"cannot parse XML: \" + ex.getMessage());\n return;\n }\n System.out.format(\"MMDB ready: %d publs, %d pers\\n\\n\", dblp.numberOfPublications(), dblp.numberOfPersons());\n\n PrintWriter publicationsWriter = new PrintWriter(\"data/publications.json\", StandardCharsets.UTF_8);\n for (Publication publication1 : ProgressBar.wrap(dblp.getPublications(), \"publications\")) {\n JSONObject jo = new JSONObject();\n jo.put(\"key\", publication1.getKey());\n if (publication1.getPublicationStream() != null) {\n jo.put(\"title\", publication1.getPublicationStream().getTitle());\n }\n jo.put(\"year\", publication1.getYear());\n if (publication1.getJournal() != null) {\n jo.put(\"journal_title\", publication1.getJournal().getTitle());\n }\n if (publication1.getBooktitle() != null) {\n jo.put(\"book_title\", publication1.getBooktitle().getTitle());\n }\n if (publication1.getToc() != null) {\n jo.put(\"toc_key\", publication1.getToc().getKey());\n }\n jo.put(\"mdate\", publication1.getMdate());\n\n Map<String, JSONArray> publicationIds = new HashMap<>();\n for (PublicationIDType publicationIDType : publication1.getIdTypes()) {\n publicationIds.put(publicationIDType.label(), new JSONArray(publication1.getIds(publicationIDType)));\n }\n\n jo.put(\"ids\", new JSONObject(publicationIds));\n\n publicationsWriter.println(jo);\n }\n\n PrintWriter tocWriter = new PrintWriter(\"data/tocs.json\", StandardCharsets.UTF_8);\n for (TableOfContents toc : ProgressBar.wrap(dblp.getTocs(), \"TOCs\")) {\n JSONObject jo = new JSONObject();\n jo.put(\"key\", toc.getKey());\n jo.put(\"page_url\", toc.getPageUrl());\n\n tocWriter.println(jo);\n }\n\n PrintWriter personsWriter = new PrintWriter(\"data/persons.json\", StandardCharsets.UTF_8);\n for (Person person : ProgressBar.wrap(dblp.getPersons(), \"persons\")) {\n JSONObject jo = new JSONObject();\n jo.put(\"key\", person.getKey());\n jo.put(\"primary_name\", person.getPrimaryName());\n jo.put(\"pid\", person.getPid());\n jo.put(\"most_recent_mdate\", person.getAggregatedMdate());\n jo.put(\"mdate\", person.getMdate());\n jo.put(\"number_of_publications\", person.numberOfPublications());\n jo.put(\"publication_ids\", new JSONArray(person.getPublications().stream().map(Publication::getKey).collect(Collectors.toUnmodifiableList())));\n jo.put(\"number_of_coauthors\", dblp.numberOfCoauthors(person));\n\n Map<String, JSONArray> personIds = new HashMap<>();\n for (PersonIDType personIDType : person.getIdTypes()) {\n personIds.put(personIDType.label(), new JSONArray(person.getIds(personIDType)));\n }\n\n jo.put(\"ids\", new JSONObject(personIds));\n\n personsWriter.println(jo);\n }\n }",
"protected void grow(int size) {\n if (size < 128) {\n size = 128;\n }\n if (size < table.length) {\n return;\n }\n char [] newTable = new char[size];\n System.arraycopy(table, 0, newTable, 0, table.length);\n for(int i = table.length; i < size; i++) {\n newTable[i] = (char)i;\n }\n table = newTable;\n }",
"public synchronized void flush() throws IOException {\n\t\tcheckNotClosed();\n\t\ttrimToSize();\n\t\tjournalWriter.flush();\n\t}",
"public void shrinkCacheToMaximumSize() {\n while (this.cacheSize > this.maximumCacheSize) {\n getNodeFromCache();\n }\n }",
"private void grow() {\n Book[] temp = new Book[books.length + GROWTH_SIZE];\n for (int i = 0; i < books.length; i ++){\n temp[i] = books[i];\n }\n books = temp;\n }",
"public boolean unload100OldestChunks()\n {\n return false;\n }",
"public boolean unload100OldestChunks()\n {\n return false;\n }",
"public void optimiseForDb() {\n \tif (CollectionUtils.isNotEmpty(this.allocation)) {\n\t \tList<Allocation> alloc = Lists.newArrayList(this.allocation)\n\t \t\t\t.stream()\n\t \t\t\t.filter(a -> a.account != null && a.getPercentage() != 0.0)\n\t \t\t\t.collect(Collectors.toList());\n\t \tif (alloc.size() != this.allocation.size()) {\n\t \t\tLOG.info(\"{} optimised\", this); //$NON-NLS-1$\n\t \t\tthis.allocation.clear();\n\t \t\tthis.allocation.addAll(alloc);\n\t \t}\n\t \tif (CollectionUtils.isEmpty(alloc)) {\n\t \t\tLOG.info(\"{} empty, cleared\", this); //$NON-NLS-1$\n\t \t\t// de-allocate any empty list. They are a waste of space in the database\n\t \t\tthis.allocation = null;\n\t \t}\n \t} else {\n \t\t// de-allocate any empty list. They are a waste of space in the database\n \t\tthis.allocation = null;\n \t}\n }",
"private void enlargeCapacity() {\n Object[] tmp = this.container;\n this.container = new Object[this.container.length + this.capacity];\n System.arraycopy(tmp, 0, this.container, 0, tmp.length);\n }",
"private void grow() {\n final int new_size = Math.min(size * 2, Const.MAX_TIMESPAN);\n if (new_size == size) {\n throw new AssertionError(\"Can't grow \" + this + \" larger than \" + size);\n }\n values = Arrays.copyOf(values, new_size);\n qualifiers = Arrays.copyOf(qualifiers, new_size);\n }",
"protected void grow() {\n }",
"public void setSize(int size) {\n\t\tif (size < 0) {\n\t\t throw new IllegalArgumentException(\"Log cache size can't be negative\");\n\t\t}\n\t\tint delta = this.size - size;\n\t\tthis.size = size;\n\t\tif (delta <= 0) {\n\t\t return;\n\t\t}\n\t\tif (messages.size() < size) {\n\t\t return;\n\t\t}\n\t\twhile (delta-- > 0) {\n\t\t messages.removeFirst();\n\t\t}\n\t}",
"private void ensureCapacity()\n {\n if (numberOfEntries >= dictionary.length - 1)\n {\n int newCapacity = 2 * dictionary.length;\n checkCapacity(newCapacity); // Is capacity too big?\n dictionary = Arrays.copyOf(dictionary, newCapacity + 1);\n } // end if\n }",
"private void addCommand(byte command) {\r\n if (journal_entries >= command_journal.length) {\r\n // Resize command array.\r\n int grow_size = Math.min(4000, journal_entries);\r\n grow_size = Math.max(4, grow_size);\r\n byte[] new_command_journal = new byte[journal_entries + grow_size];\r\n System.arraycopy(command_journal, 0, new_command_journal, 0,\r\n journal_entries);\r\n command_journal = new_command_journal;\r\n }\r\n\r\n command_journal[journal_entries] = command;\r\n ++journal_entries;\r\n }",
"private void invertedToDatabase(){\r\n cleFreq = new HashMap<>();\r\n System.out.println(\"Strat collecting\");\r\n Map<String,List<Invertedindex>> collects = collecting();\r\n System.out.println(\"Ending collecting\");\r\n Database.getInstance().invertedIndex(collects);\r\n Database.getInstance().addPoids(cleFreq);\r\n }",
"private synchronized void shrink() {\n if (isMutable()) {\n throw new IllegalStateException(\"Can't shrink a mutable test result!\");\n }\n\n // Should ensure we have a resultsFile.\n sections = null;\n\n // NOTE: if either of these are discarded, it may be a good idea to\n // optimize reload() to not read the section/stream data since\n // a small property lookup could incur a huge overhead\n //props = null; // works, may or may-not improve memory usage\n //desc = null; // doesn't work in current implementation\n }",
"long optimize(CapacityExtractorOutputStream out, long now, AtomicLong allocation) {\n int currentChunk = chunk(now);\n \n long reclaimed = 0L;\n\n synchronized(this.chunks) { \n for (int i = 0; i < this.chunks.length; i++) {\n if (null == this.chunks[i] || i == currentChunk) {\n continue;\n }\n int size = this.chunks[i].size();\n \n try {\n this.chunks[i].writeTo(out);\n int capacity = out.getCapacity();\n \n if (capacity > size) {\n this.chunks[i].resize(size);\n allocation.addAndGet(size);\n reclaimed += (capacity - size);\n } \n } catch (IOException ioe) { \n }\n }\n }\n \n return reclaimed;\n }",
"private void reallocateUnConsumedEsnRecords() {\n\t\tesnInfoRepository\n\t\t\t\t.findAllByIsConsumed(false).stream().filter(item -> (Days\n\t\t\t\t\t\t.daysBetween(new DateTime(item.getDateClaimed()), new DateTime()).isGreaterThan(Days.days(2))))\n\t\t\t\t.forEach(item -> {\n\t\t\t\t\titem.setUserClaimed(null);\n\t\t\t\t\titem.setDateClaimed(null);\n\t\t\t\t});\n\t}",
"public void recover(Iterator<String> uuids) throws IndexException\n {\n IndexReader reader = indexStorage.getIndexReader();\n try\n {\n final HashMap<String, Document> addedDocuments = new HashMap<String, Document>();\n final HashSet<String> removedDocuments = new HashSet<String>();\n while (uuids.hasNext())\n {\n String nodeUuid = uuids.next();\n\n GetContentEntryCommand getCommand = new GetContentEntryCommand(nodeUuid);\n final ContentEntry contentEntry = (ContentEntry)indexStorage.invokeNextInterceptor(null, getCommand);\n if (contentEntry == null)\n {\n if (indexStorage.getDocument(nodeUuid, reader) != null)\n {\n // item exist in index storage but doesn't exist in\n // persistence storage\n removedDocuments.add(nodeUuid);\n }\n }\n else\n {\n\n Document doc = nodeIndexer.createDocument(contentEntry);\n\n if (indexStorage.getDocument(nodeUuid, reader) != null)\n {\n // out dated content\n addedDocuments.put(nodeUuid, doc);\n removedDocuments.add(nodeUuid);\n }\n else\n {\n // content desn't exist\n addedDocuments.put(nodeUuid, doc);\n }\n }\n //flash if changes more when BUFFER_MAX_SIZE \n if (checkFlush(addedDocuments, removedDocuments))\n {\n flash(addedDocuments, removedDocuments);\n }\n }\n //if some changes left\n if (addedDocuments.size() + removedDocuments.size() >= 0)\n {\n indexStorage.save(new LuceneIndexTransaction(addedDocuments, removedDocuments));\n }\n }\n catch (Throwable e)\n {\n throw new IndexException(e.getLocalizedMessage(), e);\n }\n }",
"private void expandCapacity() {\n heap = Arrays.copyOf(heap, heap.length * 2);\n }",
"public boolean UploadHugeDocumentsWithoutDelete (ClsNodeDocument[] docs, String transID, String status, String dataFlow, String submitURL, String token, Date submitted, Timestamp submittedTS, String user);",
"private void growMap() {\n\t\tshort chunkId;\n\n\t\t// Fill until full\n\t\twhile (end % STORED_CHUNKS != currChunk % STORED_CHUNKS || end == 0) {\n\t\t\tchunkId = (short) random.nextInt(chunks.length);\n\t\t\tmap[end % STORED_CHUNKS] = chunkId;\n\t\t\tchunks[chunkId].setupToStage(stage, end * MapChunk.WIDTH * tileSize, 0);\n\t\t\tend++;\n\t\t}\n\t}"
] | [
"0.6649425",
"0.66069835",
"0.560765",
"0.5460151",
"0.52692515",
"0.5066824",
"0.5035168",
"0.5030134",
"0.5029576",
"0.50090635",
"0.50070053",
"0.4992917",
"0.49808818",
"0.4940399",
"0.49257824",
"0.49241835",
"0.49198815",
"0.49004173",
"0.4899449",
"0.48893097",
"0.4887348",
"0.48852366",
"0.48839357",
"0.4878629",
"0.48749995",
"0.4864141",
"0.48547485",
"0.4851892",
"0.4849729",
"0.48449123",
"0.48447838",
"0.48392537",
"0.4831748",
"0.47894332",
"0.47854647",
"0.4784888",
"0.4777248",
"0.47711542",
"0.47665247",
"0.47663328",
"0.47632778",
"0.47623125",
"0.47570443",
"0.47557864",
"0.4749202",
"0.47440732",
"0.4723039",
"0.4718661",
"0.4717234",
"0.4717101",
"0.4713565",
"0.47118026",
"0.47085747",
"0.47020102",
"0.470181",
"0.4700039",
"0.4694441",
"0.46943316",
"0.46934474",
"0.46885848",
"0.46866462",
"0.46841112",
"0.46755058",
"0.46690723",
"0.46683648",
"0.466499",
"0.46641997",
"0.46640438",
"0.4662144",
"0.4655998",
"0.46496293",
"0.46472102",
"0.46452844",
"0.46450248",
"0.46418455",
"0.46369383",
"0.46354476",
"0.46323383",
"0.4613843",
"0.46081117",
"0.46005514",
"0.459924",
"0.45981637",
"0.45972773",
"0.45972773",
"0.4586374",
"0.45823073",
"0.45810312",
"0.45803908",
"0.45745972",
"0.4574247",
"0.4573136",
"0.45725498",
"0.456858",
"0.45643613",
"0.45624945",
"0.4561718",
"0.4559006",
"0.45547187",
"0.45544955"
] | 0.6770914 | 0 |
Returns true if this cache has been closed. | public boolean isClosed() {
return journalWriter == null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isClosed() {\n\t\tsynchronized (closed) {\n\t\t\treturn closed;\n\t\t}\n\t}",
"public synchronized boolean isClosed() {\r\n\t\treturn closed;\r\n\t}",
"public boolean isClosed() {\n\t\treturn (dbConnection == null);\n\t}",
"public boolean isClosed() {\n return this.closed.get();\n }",
"public boolean closed() {\r\n return closed;\r\n }",
"public boolean isClosed(){\n return this.closed.get();\n }",
"private synchronized boolean isClosed()\n {\n return isClosed;\n }",
"public boolean isClosed() {\n return closed;\n }",
"public boolean isClosed() {\n\t\treturn this.closed;\n\t}",
"public boolean hasClosingTime() {\n return genClient.cacheHasKey(CacheKey.closingTime);\n }",
"public boolean isClosed() {\n\t\treturn mService == null;\n\t}",
"public final boolean isClosed() {\n return closeReceived && isCloseSent();\n }",
"public final boolean isClosed() {\n\t\treturn (m_flags & Closed) != 0 ? true : false;\n\t}",
"public boolean isClosed() {\n return closed;\n }",
"boolean isCloseRequested()\r\n\t{\r\n\t\treturn this.closeRequested;\r\n\t}",
"public boolean isClosed() throws RemoteException {\r\n return closed;\r\n }",
"public boolean isClosed() {\n return (mRLS == null);\n }",
"public boolean isClosed() {\n boolean result = true;\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n result &= catalog.isClosed( );\n }\n return result;\n\n }",
"public boolean isClosed()\n {\n return _isClosed;\n }",
"public boolean isClosed()\n {\n return _isClosed;\n }",
"public boolean isClosed() {\n return this.isClosed;\n }",
"private boolean streamClosed() {\n boolean closed = false;\n if (nonNull(dataStream) && Objects.nonNull(streamLinkedOrConsumedField)) {\n try {\n closed = (boolean) streamLinkedOrConsumedField.get(dataStream);\n } catch (Exception e) {\n }\n }\n return closed;\n }",
"public boolean isClosed() throws SQLException {\n\n try {\n debugCodeCall(\"isClosed\");\n return result == null;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public boolean close() {\n\t\tif (_OPEN) {\n\t\t\t_OPEN = false;\n\t\t\tdoPurgeAction();\n\t\t\treturn (true);\n\t\t}\n\t\treturn (false);\n\t}",
"public boolean close() {\n\t\tif(isOpen()){\n\t\t\treturn releaseChannel();\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isClosed() {\n\t\treturn ( mCurrentState == STATE.CLOSED_CANCEL ) || ( mCurrentState == STATE.CLOSED_CONFIRMED );\n\t}",
"public boolean getClose()\n\t{\n\t\treturn getBooleanIOValue(\"Close\", true);\n\t}",
"public boolean\tisClosed();",
"public boolean canClose(){\n return true;\n }",
"public boolean isClosed() {\n return false;\n }",
"public boolean isOpened() {\r\n return opened != null;\r\n }",
"public boolean close() {\n\t\ttry {\n\t\t\tconnection.close();\n\t\t\treturn connection.isClosed();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isDisposed() {\n return disposed;\n }",
"public boolean isDisposed() {\n return disposed;\n }",
"public boolean isNotNullClosingTime() {\n return genClient.cacheValueIsNotNull(CacheKey.closingTime);\n }",
"private final boolean isOpen()\n {\n return !closed;\n }",
"@Basic(init = @Expression(\"false\"))\n public boolean isClosed() {\n return $closed;\n }",
"public boolean isDoorClosed() {\n\t\treturn isClosed;\n\t}",
"public boolean isOpened()\n {\n \n boolean retVal = isOpened_0(nativeObj);\n \n return retVal;\n }",
"public boolean isClosed() {\n return calculateSumOfHouse() > 31;\n }",
"boolean isClosed();",
"boolean isClosed();",
"boolean isClosed();",
"boolean isClosed();",
"public boolean isDisposed() {\r\n return _isdisposed;\r\n }",
"public boolean getClosed(){\n \treturn this.isClosed;\n }",
"public boolean isSetDateClose()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DATECLOSE$4) != 0;\n }\n }",
"@Override\n\tpublic boolean isClosed() throws SQLException {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean isClosed() throws SQLException {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isClosed() throws SQLException {\n\t\treturn false;\r\n\t}",
"public static boolean isWindowClosed() {\n\t\treturn windowClosed;\n\t}",
"public boolean isDeadEnd() {\n return getClosedFuses().size() <= 1;\n }",
"@Override\n\tpublic boolean isClosed() \n\t{\n\t\treturn false;\n\t}",
"public boolean close()\r\n\t{\r\n\t\tif(status == 'B')\r\n\t\t{\r\n\t\t\tthis.status = 'D';\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\t\tpublic boolean isClosed() throws SQLException {\n\t\t\treturn false;\r\n\t\t}",
"public boolean hasNewBatchCloseEnabled() {\n return genClient.cacheHasKey(CacheKey.newBatchCloseEnabled);\n }",
"public boolean isFinished() {\n\t\treturn (finished);\n\t}",
"public boolean isClosed() throws SQLException {\n return currentPreparedStatement.isClosed();\n }",
"public boolean isShutdown() {\n lock.lock();\n try {\n return state == State.SHUTDOWN;\n } finally {\n lock.unlock();\n }\n }",
"public boolean close() {\n boolean operation = false;\n try {\n fileStream.close();\n operation = true;\n } catch ( Exception error ) {\n System.out.println(error.toString());\n }\n return operation;\n }",
"public boolean isOpened() {\n\t\treturn mCurrentState == STATE.OPENED;\n\t}",
"private boolean isOpened() {\n if (mIpcChannel != null && mIpcChannel.isOpened()) {\n return true;\n }\n\n return false;\n }",
"boolean isIsClosable();",
"public boolean isOpened() {\n return opened;\n }",
"public boolean isFinished() {\r\n\t\treturn this.finished;\r\n\t}",
"public synchronized boolean allEvaluatorsAreClosed() {\n synchronized (this.evaluators) {\n for (final EvaluatorManager eval : this.evaluators.values()) {\n if (!eval.isClosed()) {\n return false;\n }\n }\n }\n return true;\n }",
"public boolean isOpen()\r\n {\r\n if(connection != null)\r\n {\r\n try\r\n {\r\n return !connection.isClosed();\r\n } catch(SQLException exception)\r\n {\r\n LOG.log(Level.SEVERE, \"\", exception);\r\n }\r\n }\r\n return false;\r\n }",
"public boolean isEngineClosed() {\r\n return (tlsEngine.isOutboundDone() && tlsEngine.isInboundDone());\r\n }",
"public boolean getClosed() {\n\treturn this.closed;\n }",
"public boolean isQueueClosed();",
"public boolean isReleased() {\n return released;\n }",
"public boolean isDisposed() {\n PublishSubscriber<T> c = state.current;\n return c.isDisposed();\n }",
"public boolean isClosed(){\n\t\tFreeVariableSet temp=freeVariables(new HashSet<Integer>());\n\t\tif (temp.size()==0) return true;\n\t\treturn false;\n\t}",
"public boolean safeToClose(){\n if(hashMapOfAllAccts.isEmpty()){\n return true;\n }\n return false;\n }",
"public boolean isFinished() {\n\t\treturn finished;\n\t}",
"public boolean isFinished() {\n\t\treturn finished;\n\t}",
"public boolean isOpened() {\n return false;\n }",
"@Override\n\tpublic boolean close() {\n\t\treturn super.close();\n\t}",
"public boolean isOpened() {\n return opened;\n }",
"public boolean isOpen() {\n return myOpen.get();\n }",
"public abstract boolean isClosed();",
"@Override\r\n\tpublic boolean close() {\n\t\taccountStatus = AccountStatus.CLOSED;\r\n\t\treturn true;\r\n\t}",
"public boolean close() throws InterruptedException {\n return this.close(10, TimeUnit.SECONDS);\n }",
"public boolean isfinished() {\n\t\treturn isFinished;\n\t}",
"protected boolean isFinished() {\n return finished;\n }",
"public boolean isOpened() {\r\n\t\treturn this.opened;\r\n\t}",
"public boolean isCloseable() {\n\t\tif (!hasSubTasks())\n\t\t\treturn true;\n\t\tboolean closeable = true;\n\t\tfor (ServiceSubTask subTask : getSubTasks().values()) {\n\t\t\tcloseable &= subTask.getStatus().equals(ServiceSubTaskStatus.CLOSED);\n\t\t}\n\t\treturn closeable;\n\t}",
"public boolean isFinished() {\n return finished;\n }",
"public boolean isOpen() {\n if (this.open) {\n return false;\n } else {\n return true;\n }\n }",
"@Override\n public boolean isClosed() throws SQLException {\n return false;\n }",
"public boolean isFinished() {\r\n\t\t\treturn tIsFinished;\r\n\t\t}",
"protected boolean isFinished() {\n\t\treturn isFinished;\n\t}",
"public synchronized boolean hasFinished ()\n {\n return this.finished;\n }",
"public boolean isCloseRequested(){\n return glfwWindowShouldClose(handle);\n }",
"public boolean checkClosed();",
"boolean isFinished() {\n if (completeCount < reserve) {\n return false;\n }\n\n // We need to check if the last entry was used\n final OutboundQueueEntry last = queue[reserve];\n return !last.isCommitted() || last.isCompleted();\n }",
"public boolean isOpen()\r\n\t{\r\n\t return (fd != null);\r\n\t}",
"protected boolean isFinished() {\n\treturn this.isDone;\n }",
"Promise<Boolean> close();",
"public boolean isOpen() {\r\n\t\treturn false;\r\n\t}"
] | [
"0.7578989",
"0.75510734",
"0.7464385",
"0.7437531",
"0.7397473",
"0.7330908",
"0.7182599",
"0.71800166",
"0.7140397",
"0.70899475",
"0.7086092",
"0.7083895",
"0.70634544",
"0.7054311",
"0.7046921",
"0.70398873",
"0.70320565",
"0.7012113",
"0.6955326",
"0.6955326",
"0.69278586",
"0.68048173",
"0.6716946",
"0.6706681",
"0.66607827",
"0.6643849",
"0.6630786",
"0.6570429",
"0.6552873",
"0.6552678",
"0.6533",
"0.6498841",
"0.6439182",
"0.6439182",
"0.64280784",
"0.6419546",
"0.6378282",
"0.6368782",
"0.6352073",
"0.6347408",
"0.63184345",
"0.63184345",
"0.63184345",
"0.63184345",
"0.6317175",
"0.63105667",
"0.62983006",
"0.6293334",
"0.62904656",
"0.62904656",
"0.6289225",
"0.628702",
"0.6269922",
"0.6269281",
"0.62384164",
"0.6236193",
"0.6225561",
"0.6222454",
"0.6221151",
"0.62188494",
"0.6217392",
"0.6212391",
"0.61957645",
"0.6193188",
"0.61851895",
"0.6175743",
"0.6166499",
"0.6164223",
"0.61608756",
"0.6158067",
"0.6149192",
"0.61437786",
"0.61407363",
"0.614054",
"0.6128717",
"0.6128717",
"0.6125465",
"0.6123394",
"0.6106096",
"0.6105226",
"0.6095667",
"0.6080007",
"0.6072048",
"0.6066174",
"0.60482925",
"0.6035837",
"0.60328156",
"0.6024844",
"0.6016342",
"0.6001015",
"0.5994547",
"0.59929395",
"0.5967624",
"0.59592706",
"0.59557843",
"0.5953407",
"0.59451824",
"0.59446824",
"0.5944274",
"0.5931058"
] | 0.71351135 | 9 |
Force buffered operations to the filesystem. | public synchronized void flush() throws IOException {
checkNotClosed();
trimToSize();
journalWriter.flush();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void flushBuffer() throws IOException {\n\n }",
"@Override\n\tpublic void flushBuffer() throws IOException {\n\t}",
"public void flush() throws IOException {\n // nothing to do with cached bytes\n }",
"public synchronized void flush() throws java.io.IOException { throw new RuntimeException(\"Stub!\"); }",
"public void flushBuffers()\n throws IOException\n {\n pool.moveToStart();\n Buffer buffer;\n while (pool.getValue() != null)\n {\n buffer = pool.remove();\n if (buffer.isDirty())\n {\n file.seek(buffer.getBlockNumber() * BLOCK_SIZE);\n file.write(buffer.readBlock());\n diskWrites++;\n }\n }\n }",
"public void forceFlush() throws IOException {\n flushCurrentIndexBlock();\n }",
"void flush() throws IOException;",
"void flush() throws IOException;",
"void flush() throws IOException;",
"public void flush() throws IOException;",
"public void flush() throws IOException;",
"public void flush() throws IOException;",
"void flush() {\r\n synchronized (sync) {\r\n updatedFiles.clear();\r\n }\r\n }",
"@Override\n public void flush() throws IOException {\n checkStreamState();\n flushIOBuffers();\n }",
"private void flushWrite() throws IOException, BadDescriptorException {\n if (reading || !modes.isWritable() || buffer.position() == 0) return; // Don't bother\n \n int len = buffer.position();\n buffer.flip();\n int n = descriptor.write(buffer);\n \n if(n != len) {\n // TODO: check the return value here\n }\n buffer.clear();\n }",
"@Override\r\n public synchronized void flush() throws IOException {\r\n\t\tif ( count != 0 ) {\r\n\t\t writeBuffer(buf, 0, count );\r\n\t\t count = 0;\r\n\t\t}\r\n\t}",
"void flushBf()\n {\n if (components.contains(Component.FILTER))\n {\n File path = descriptor.fileFor(Component.FILTER);\n try (SeekableByteChannel fos = Files.newByteChannel(path.toPath(), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.WRITE);\n DataOutputStreamPlus stream = new BufferedDataOutputStreamPlus(fos))\n {\n // bloom filter\n BloomFilter.serializer.serialize((BloomFilter) bf, stream);\n stream.flush();\n SyncUtil.sync((FileChannel) fos);\n }\n catch (IOException e)\n {\n throw new FSWriteError(e, path);\n }\n }\n }",
"public void flush(){\n\t\ttry{\n\t\t\tse.write(buffer, 0, bufferPos);\n\t\t\tbufferPos = 0;\n\t\t\tse.flush();\n\t\t}catch(IOException ioex){\n\t\t\tfailures = true;\n\t\t}\n\t}",
"private void ensureReadNonBuffered() throws IOException, BadDescriptorException {\n if (reading) {\n if (buffer.hasRemaining()) {\n Ruby localRuntime = getRuntime();\n if (localRuntime != null) {\n throw localRuntime.newIOError(\"sysread for buffered IO\");\n } else {\n throw new IOException(\"sysread for buffered IO\");\n }\n }\n } else {\n // libc flushes writes on any read from the actual file, so we flush here\n flushWrite();\n buffer.clear();\n buffer.flip();\n reading = true;\n }\n }",
"public void flush() throws IOException {\n\t\tif ((buffer.length - cursor) > 50000) {\n\t\t\tSystem.out.println(\"WASTED: \" + (buffer.length - cursor));\n\t\t}\n\t}",
"public abstract void flush();",
"public void flush() throws IOException {\n\t\tmFile.seek(mOffset);\n\t\tmWriter.write(mBuffer, 0, mBufferLength);\n\t\tmOffset += mBufferLength;\n\t\tmBufferLength = 0;\n\t}",
"@Override\n public void flush() throws IOException {\n }",
"public static void flush() {\n try {\n sDiskLruCache.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"void flush() throws Exception;",
"private static void flushInternalBuffer() {\n\n //Strongly set the last byte to \"0A\"(new line)\n if (mPos < LOG_BUFFER_SIZE_MAX) {\n buffer[LOG_BUFFER_SIZE_MAX - 1] = 10;\n }\n\n long t1, t2;\n\n //Save buffer to SD card.\n t1 = System.currentTimeMillis();\n writeToSDCard();\n //calculate write file cost\n t2 = System.currentTimeMillis();\n Log.i(LOG_TAG, \"internalLog():Cost of write file to SD card is \" + (t2 - t1) + \" ms!\");\n\n //flush buffer.\n Arrays.fill(buffer, (byte) 0);\n mPos = 0;\n }",
"public void flush();",
"public void flush();",
"public void flush();",
"public void flush();",
"public void flush() throws IOException {\n\t\t// TODO implement me\n\t}",
"void flushBuffer();",
"public void sync()\n {\n byte[] blockData = new byte[Disk.blockSize];\n SysLib.int2bytes(totalBlocks, blockData, 0);\n SysLib.int2bytes(inodeBlocks, blockData, 4);\n SysLib.int2bytes(freeList, blockData, 8);\n SysLib.rawwrite(0, blockData);\n }",
"@Override\r\n public void flush ()\r\n {\r\n }",
"public void flush() {\n\t\t\n\t}",
"void flushBlocking();",
"public synchronized void flush() {\n\t\ttry {\n\t\t\tcloseWriter();\n\t\t} catch(IOException ioe ) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\topenWriter(true);\n\t\t} catch(IOException ioe ) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}",
"void freeze() {\n setState(State.FROZEN); // prevent new puts to this chunk\n while (pendingOps.get() != 0) ;\n }",
"@Override\n public void hflush() throws IOException {\n hsync();\n }",
"public void flush() throws IOException {\n dos.flush();\n }",
"public void flush() {\r\n\t\ttry {\r\n\t\t\tdos.flush();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void sync()\n\t{\n\t\tbyte[] buffer = new byte[Disk.blockSize];\n\n\t\t// Write the totalBlocks, totalInodes, and freeList.\n\t\tSysLib.int2bytes(totalBlocks, buffer, 0);\n\t\tSysLib.int2bytes(totalInodes, buffer, 4);\n\t\tSysLib.int2bytes(freeList, buffer, 8);\n\t\tSysLib.int2bytes(lastFreeBlock, buffer, 12);\n\n\t\t// Write the block back to disk.\n\t\tSysLib.rawwrite(0, buffer);\n\t}",
"@Override\n public void flush() {\n }",
"@Override\n public void flush() {\n }",
"@Override\n public void flush() {\n }",
"@Override\n public void flush()\n {\n }",
"public void flush()\n/* */ throws IOException\n/* */ {\n/* 833 */ _flushBuffer();\n/* 834 */ if ((this._writer != null) && \n/* 835 */ (isEnabled(JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM))) {\n/* 836 */ this._writer.flush();\n/* */ }\n/* */ }",
"void flushBefore(long pos) throws IOException;",
"@Override\n public void flush() throws IOException {\n byteBufferStreamOutput.flush();\n }",
"void sync() throws IOException;",
"public void flush(){\r\n mBufferData.clear();\r\n }",
"@Override\r\n\tpublic void flush() {\n\t}",
"@Override\n\tpublic void sync() throws IOException {\n\t\t\n\t}",
"public static void sync() {\n // write out superblock if updated\n // write out free list blocks if updated\n // write out inode blocks if updated\n // write out data blocks if updated\n\n // at present, all changes to inodes, data blocks, \n // and free list blocks\n // are written as they go, so this method does nothing.\n }",
"public void commitPendingDataToDisk() {\n /*\n r5 = this;\n monitor-enter(r5);\n r1 = r5.mPendingWrite;\t Catch:{ all -> 0x0039 }\n r3 = 0;\n r5.mPendingWrite = r3;\t Catch:{ all -> 0x0039 }\n if (r1 != 0) goto L_0x000a;\n L_0x0008:\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n L_0x0009:\n return;\n L_0x000a:\n r3 = r5.mWriteLock;\t Catch:{ all -> 0x0039 }\n r3.lock();\t Catch:{ all -> 0x0039 }\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n r2 = new java.io.FileOutputStream;\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3 = r3.chooseForWrite();\t Catch:{ IOException -> 0x003c }\n r2.<init>(r3);\t Catch:{ IOException -> 0x003c }\n r3 = r1.marshall();\t Catch:{ IOException -> 0x003c }\n r2.write(r3);\t Catch:{ IOException -> 0x003c }\n r2.flush();\t Catch:{ IOException -> 0x003c }\n android.os.FileUtils.sync(r2);\t Catch:{ IOException -> 0x003c }\n r2.close();\t Catch:{ IOException -> 0x003c }\n r3 = r5.mFile;\t Catch:{ IOException -> 0x003c }\n r3.commit();\t Catch:{ IOException -> 0x003c }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0039:\n r3 = move-exception;\n monitor-exit(r5);\t Catch:{ all -> 0x0039 }\n throw r3;\n L_0x003c:\n r0 = move-exception;\n r3 = \"BatteryStats\";\n r4 = \"Error writing battery statistics\";\n android.util.Slog.w(r3, r4, r0);\t Catch:{ all -> 0x0052 }\n r3 = r5.mFile;\t Catch:{ all -> 0x0052 }\n r3.rollback();\t Catch:{ all -> 0x0052 }\n r1.recycle();\n r3 = r5.mWriteLock;\n r3.unlock();\n goto L_0x0009;\n L_0x0052:\n r3 = move-exception;\n r1.recycle();\n r4 = r5.mWriteLock;\n r4.unlock();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.internal.os.BatteryStatsImpl.commitPendingDataToDisk():void\");\n }",
"@Override\r\n\tpublic void flush() {\n\t\t\r\n\t}",
"void flush();",
"void flush();",
"void flush();",
"void flush();",
"void flush();",
"void flush();",
"void flush();",
"void flush();",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"@Override\n\tpublic void flush() {\n\t\t\n\t}",
"@Override\n\tpublic void flush() {\n\t}",
"public abstract void Flush()\n\t\tthrows IOException, SMBException;",
"public void syncHandle() {\n syncOldStream();\n }",
"public void flush() {\n flushed = true;\n }",
"public int flush()\n/* */ {\n/* 145 */ return 0;\n/* */ }",
"public void flushData()\n {\n try {\n //outputStreamAccelerometer.flush();\n //outputStreamLinear.flush();\n outputStreamAccelerometer.close();\n outputStreamLinear.close();\n\n String paths[] = {fileAccelerometer.getPath(), fileLinear.getPath(), fileSettings.getPath()};\n MediaScannerConnection.scanFile(context, paths, null, this);\n }\n catch(Exception exc)\n {\n Log.e(\"LOGGER_ERROR_FLUSH\", exc.toString());\n exc.printStackTrace();\n }\n }",
"protected void deferFlush()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n m_lNextFlush = Long.MAX_VALUE;\n }",
"@Override\n\tpublic void sync() throws IOException\n\t{\n\n\t}",
"public void flush() throws IOException\n {\n getStream().flush();\n }",
"private void flushBuffer(Runnable paramRunnable) {\n/* 149 */ int i = this.buf.position();\n/* 150 */ if (i > 0 || paramRunnable != null)\n/* */ {\n/* 152 */ flushBuffer(this.buf.getAddress(), i, paramRunnable);\n/* */ }\n/* */ \n/* 155 */ this.buf.clear();\n/* */ \n/* 157 */ this.refSet.clear();\n/* */ }",
"@Override\r\n public void flush() {\n\r\n }",
"@Override\r\n public void flush() {\n\r\n }",
"public void flush () throws IOException\n {\n if (m_nBufferedBitCount > 0)\n {\n if (m_nBufferedBitCount != CGlobal.BITS_PER_BYTE)\n if (LOGGER.isDebugEnabled ())\n LOGGER.debug (\"Flushing BitOutputStream with only \" + m_nBufferedBitCount + \" bits\");\n m_aOS.write ((byte) m_nBuffer);\n m_nBufferedBitCount = 0;\n m_nBuffer = 0;\n }\n }",
"@Override\n public void flush() throws IOException {\n FileDescriptor myFd = fd;\n if (myFd == null) throw new IOException(\"socket closed\");\n\n // Loop until the output buffer is empty.\n Int32Ref pending = new Int32Ref(0);\n while (true) {\n try {\n // See linux/net/unix/af_unix.c\n Os.ioctlInt(myFd, OsConstants.TIOCOUTQ, pending);\n } catch (ErrnoException e) {\n throw e.rethrowAsIOException();\n }\n\n if (pending.value <= 0) {\n // The output buffer is empty.\n break;\n }\n\n try {\n Thread.sleep(10);\n } catch (InterruptedException ie) {\n break;\n }\n }\n }",
"@Deprecated\n public void sync() throws IOException {\n hflush();\n }",
"private void commitAll(){\n if(isDiskBufferEnabled && persistenceService != null){\n persistenceService.commit(WIKIDATA_SYNONYMY_BUFFER);\n persistenceService.commit(WIKIDATA_HYPERNYMY_BUFFER);\n persistenceService.commit(WIKIDATA_ASK_BUFFER);\n }\n }",
"private void invalidateBuffer() throws IOException, BadDescriptorException {\n if (!reading) flushWrite();\n int posOverrun = buffer.remaining(); // how far ahead we are when reading\n buffer.clear();\n if (reading) {\n buffer.flip();\n // if the read buffer is ahead, back up\n FileChannel fileChannel = (FileChannel)descriptor.getChannel();\n if (posOverrun != 0) fileChannel.position(fileChannel.position() - posOverrun);\n }\n }",
"public void sync() {\n\t\tif (!validState) {\n\t\t\tthrow new InvalidStateException();\n\t\t}\n\t\tif (useMmap) {\n\t\t\tsyncAllMmaps();\n\t\t}\n\t\tif (fileChannel != null) {\n\t\t\ttry {\n\t\t\t\tfileChannel.force(false);\n\t\t\t} catch (Exception ign) {\n\t\t\t}\n\t\t}\n\t\tif (callback != null) {\n\t\t\tcallback.synched();\n\t\t}\n\t}",
"public synchronized int flush()\n {\n int fileCount = files.size();\n int cb = (maxFiles * maxChars * SysLib.CBCHAR) + \n (maxFiles * SysLib.CBINT);\n byte b[] = new byte[cb];\n int inodeOffset = 0;\n int fileNameOffset = fileCount * SysLib.CBINT;\n\n for (int i = 0; i < fileCount; i++)\n {\n byte strBytes[] = files.get(i).getBytes();\n int cbStr = strBytes.length;\n\n SysLib.int2bytes(cbStr, b, inodeOffset);\n inodeOffset += SysLib.CBINT;\n\n // Don't write zero-length strings\n if (strBytes.length > 0)\n {\n System.arraycopy(strBytes, 0, b, fileNameOffset, cbStr);\n\n fileNameOffset += cbStr;\n }\n }\n\n if (inode.write(0, b) < 0)\n {\n return -1;\n }\n\n return 0;\n }",
"void sync()throws IOException;",
"public abstract void resetBytesWritten();",
"@Override\n public void flush() throws IOException {\n ConsoleRedirect.this.flush(buffer, 0, pos);\n pos = 0;\n }",
"private void flushCache()\n {\n Entry<Integer, String> eldestEntry;\n File oldestFile;\n long eldestFileSize;\n int count = 0;\n\n int MAX_DELETE_FILE = 4;\n int MAX_CACHE_FILE_ALLOW = 1000;\n\n while (count < MAX_DELETE_FILE && (cacheSize > MAX_CACHE_FILE_ALLOW || cacheByteSize > maxCacheByteSize))\n {\n eldestEntry = mLinkedHashMap.entrySet().iterator().next();\n oldestFile = new File(eldestEntry.getValue());\n eldestFileSize = oldestFile.length();\n mLinkedHashMap.remove(eldestEntry.getKey());\n oldestFile.delete();\n cacheSize = mLinkedHashMap.size();\n cacheByteSize -= eldestFileSize;\n count++;\n }// while (count < MAX_DELETE_FILE && (cacheSize > MAX_CACHE_FILE_ALLOW || cacheByteSize > maxCacheByteSize))\n }",
"public void sync () throws java.io.SyncFailedException, ObjectStoreException\n {\n }",
"void sync() \n\t{\n\t\tFileTableEntry ftEntry = open(\"/\", \"w\");\t\t//read directory from disk\n\t\tbyte[] buffer = directory.directory2bytes();\n\t\twrite(ftEntry, buffer);\n\t\tclose(ftEntry);\n\t\tsuperblock.sync();\t\t\t\t\t//write superblock back to disk\n\t}",
"protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}",
"public void expandFile()\n throws IOException\n {\n file.seek(FILE_SIZE);\n for (int i = 0; i < BLOCK_SIZE; i++)\n {\n file.write(0);\n }\n FILE_SIZE += BLOCK_SIZE;\n }",
"private void refreshIO() throws IOException {\n FileIO io = fileIOFactory.build(segmentId);\n\n io.position(io().position());\n\n io().close();\n\n this.io = io;\n }",
"public void flush() {\n wasFlushed = true;\n }",
"public void performOperation() {\n processFile(this.scopedFile);\n }",
"@Override\r\n public void write(byte[] buffer) throws IOException {\r\n inWrite1 = true;\r\n try {\r\n super.write(buffer);\r\n if (!inWrite3) {\r\n /*if (!Helper.NEW_IO_HANDLING \r\n && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, buffer.length);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, buffer.length, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n inWrite1 = false;\r\n } catch (IOException e) {\r\n inWrite1 = false;\r\n throw e;\r\n }\r\n }",
"@SuppressWarnings(\"GuardedByChecker\")\n private void sendFlushDataLocked() {\n assert mWriteState == State.WAITING_FOR_FLUSH;\n int size = mFlushData.size();\n ByteBuffer[] buffers = new ByteBuffer[size];\n int[] positions = new int[size];\n int[] limits = new int[size];\n for (int i = 0; i < size; i++) {\n ByteBuffer buffer = mFlushData.poll();\n buffers[i] = buffer;\n positions[i] = buffer.position();\n limits[i] = buffer.limit();\n }\n assert mFlushData.isEmpty();\n assert buffers.length >= 1;\n mWriteState = State.WRITING;\n mRequestHeadersSent = true;\n if (!CronetBidirectionalStreamJni.get().writevData(mNativeStream,\n CronetBidirectionalStream.this, buffers, positions, limits,\n mEndOfStreamWritten && mPendingData.isEmpty())) {\n // Still waiting on flush. This is just to have consistent\n // behavior with the other error cases.\n mWriteState = State.WAITING_FOR_FLUSH;\n throw new IllegalArgumentException(\"Unable to call native writev.\");\n }\n }"
] | [
"0.6660231",
"0.66189384",
"0.6555017",
"0.65389675",
"0.65255004",
"0.64684",
"0.6458419",
"0.6458419",
"0.6458419",
"0.64552236",
"0.64552236",
"0.64552236",
"0.6355665",
"0.6344866",
"0.62948686",
"0.627767",
"0.62343335",
"0.62137353",
"0.61932695",
"0.6185402",
"0.61823225",
"0.61647576",
"0.61634773",
"0.6145263",
"0.6112363",
"0.60937893",
"0.607703",
"0.607703",
"0.607703",
"0.607703",
"0.6061147",
"0.6053383",
"0.6045496",
"0.602718",
"0.6016496",
"0.60149246",
"0.6009082",
"0.60049754",
"0.6000674",
"0.5979039",
"0.59673536",
"0.59627503",
"0.5960704",
"0.5960704",
"0.5960704",
"0.5952872",
"0.594971",
"0.59485716",
"0.59082085",
"0.58980316",
"0.5893127",
"0.5867995",
"0.586486",
"0.5855588",
"0.5849306",
"0.58478606",
"0.5841596",
"0.5841596",
"0.5841596",
"0.5841596",
"0.5841596",
"0.5841596",
"0.5841596",
"0.5841596",
"0.5840971",
"0.5840971",
"0.5840971",
"0.5840971",
"0.5836016",
"0.5833021",
"0.5818227",
"0.57938653",
"0.57938373",
"0.5780734",
"0.57776624",
"0.5771429",
"0.5757388",
"0.5747107",
"0.5734249",
"0.5731588",
"0.57211065",
"0.571214",
"0.5701018",
"0.568513",
"0.56733584",
"0.56720555",
"0.5663336",
"0.5651217",
"0.5641573",
"0.56371903",
"0.5600763",
"0.55552435",
"0.5550309",
"0.5537084",
"0.55311394",
"0.5491842",
"0.548819",
"0.54862183",
"0.5483852",
"0.54828775"
] | 0.5956608 | 45 |
Closes this cache. Stored values will remain on the filesystem. | public synchronized void close() throws IOException {
if (journalWriter == null) {
return; // already closed
}
for (Entry entry : new ArrayList<Entry>(lruEntries.values())) {
if (entry.currentEditor != null) {
entry.currentEditor.abort();
}
}
trimToSize();
journalWriter.close();
journalWriter = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void close() throws IOException {\n maxStreamPos = cache.length();\n\n seek(maxStreamPos);\n flushBefore(maxStreamPos);\n super.close();\n cache.close();\n cache = null;\n cacheFile.delete();\n cacheFile = null;\n stream.flush();\n stream = null;\n StreamCloser.removeFromQueue(closeAction);\n }",
"public void close() throws IOException {\n // nothing to do with cached bytes\n }",
"public static void close() {\n try {\n sDiskLruCache.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void close() {\n\t\tgetter().close();\r\n\t}",
"public void close () {\n\t\tif (this.container!=null)\n\t\t\ttry {\n\t\t\t\tcontainer.close();\n\t\t\t\tcontainer = null;\n\t\t\t\tmetaData.seek(0);\n\t\t\t\tmetaData.writeInt(blockSize);\n\t\t\t\tmetaData.writeInt(size);\n\t\t\t\tmetaData.close();\n\t\t\t\treservedBitMap.close();\n\t\t\t\tupdatedBitMap.close();\n\t\t\t\tfreeList.close();\n\t\t\t}\n\t\t\tcatch (IOException ie) {\n\t\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t\t}\n\t}",
"@Override\n public void close() throws IOException {\n if (closed.compareAndSet(false, true)) {\n timer.cancel();\n\n // If there was a currently executing task wait for it, to\n // avoid false positives on file handle leak.\n try {\n timerThread.join();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt(); // Restore interrupted flag\n }\n\n try {\n IOUtils.close(systemsCache.values());\n } finally {\n storesCache.clear();\n }\n }\n }",
"public void close() {\n\t\tkeystore = null;\n\t}",
"protected void disposeInternal()\r\n {\r\n if (!isAlive())\r\n {\r\n log.error(\"{0}: Not alive and dispose was called, filename: {1}\",\r\n logCacheName, fileName);\r\n return;\r\n }\r\n\r\n // Prevents any interaction with the cache while we're shutting down.\r\n setAlive(false);\r\n\r\n final Thread optimizationThread = currentOptimizationThread;\r\n if (isRealTimeOptimizationEnabled && optimizationThread != null)\r\n {\r\n // Join with the current optimization thread.\r\n log.debug(\"{0}: In dispose, optimization already in progress; waiting for completion.\",\r\n logCacheName);\r\n\r\n try\r\n {\r\n optimizationThread.join();\r\n }\r\n catch (final InterruptedException e)\r\n {\r\n log.error(\"{0}: Unable to join current optimization thread.\",\r\n logCacheName, e);\r\n }\r\n }\r\n else if (isShutdownOptimizationEnabled && this.getBytesFree() > 0)\r\n {\r\n optimizeFile();\r\n }\r\n\r\n saveKeys();\r\n\r\n try\r\n {\r\n log.debug(\"{0}: Closing files, base filename: {1}\", logCacheName,\r\n fileName);\r\n dataFile.close();\r\n dataFile = null;\r\n keyFile.close();\r\n keyFile = null;\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure closing files in dispose, filename: {1}\",\r\n logCacheName, fileName, e);\r\n }\r\n\r\n log.info(\"{0}: Shutdown complete.\", logCacheName);\r\n }",
"public void dispose( String cache )\r\n throws IOException\r\n {\r\n // nothing needs to be done\r\n }",
"public void close() throws IOException {\n if (dataFile != null)\n dataFile.close();\n dataFile = null;\n super.close();\n }",
"public void close() throws IOException {\n closeStream();\n\n if (storeOutputStream != null) {\n storeOutputStream.close();\n storeOutputStream = null;\n }\n\n super.close();\n if (storeFile != null) {\n storeFile.delete();\n }\n closed = true;\n }",
"public static void close(String name) {\n synchronized (CacheStorageManager.class) {\n CacheStorage cache = map.remove(name);\n if (cache != null) {\n cache.close();\n }\n }\n }",
"public synchronized void close() {}",
"public void closeStorage() {\n\t\tdbStats.commit();\n\t\tdbStats.close();\n\t}",
"public synchronized void close() {\n\n mOpenCounter--;\n\n if(mOpenCounter == 0) {\n // Closing database\n mDatabase.close();\n }\n }",
"public void close() {\n if (this.accessFile != null) {\n try {\n this.accessFile.close();\n } catch (IOException unused) {\n }\n this.accessFile = null;\n }\n }",
"@Override\n public void close() {\n for (PipelineDataSourceWrapper each : cachedDataSources.values()) {\n try {\n each.close();\n } catch (final SQLException ex) {\n log.error(\"An exception occurred while closing the data source\", ex);\n }\n }\n cachedDataSources.clear();\n }",
"public void close() {\n\t\tif (this.session instanceof DatabaseSession) {\n\t\t\t((DatabaseSession) this.session).logout();\n\t\t}\n\t\tthis.session.release();\n\t}",
"public void close() {\n dispose();\n }",
"public void close()\n\t\t{\n\t\t}",
"@Override\n public void dispose() throws CacheException {\n }",
"public void close()\n\t{\n\t\ttransfh.close();\n\t\ttransfh = null;\n\t\tmeshes.clear();\n\t\tmats.clear();\n\t}",
"public void close() {\n\t\t}",
"protected void forceClose() throws IOException {\n\t\tif (SDFSLogger.isDebug())\n\t\t\tSDFSLogger.getLog().debug(\n\t\t\t\t\t\"close \" + df.getMetaFile().getPath() + \" flag=\" + flags);\n\t\tLock l = null;\n\t\tthis.closeLock.lock();\n\t\ttry {\n\t\t\tl = df.getReadLock();\n\t\t\tl.lock();\n\t\t\tif (!this.isClosed()) {\n\n\t\t\t\ttry {\n\t\t\t\t\tif (this.writtenTo && Main.safeSync) {\n\t\t\t\t\t\tdf.writeCache();\n\t\t\t\t\t\tdf.getMetaFile().sync();\n\t\t\t\t\t\tdf.sync(false);\n\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\n\t\t\t\t} finally {\n\t\t\t\t\tdf.unRegisterChannel(this, this.getFlags());\n\t\t\t\t\tthis.closed = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} finally {\n\t\t\tif (l != null)\n\t\t\t\tl.unlock();\n\t\t\tthis.closeLock.unlock();\n\t\t}\n\t}",
"public void close() {\n wrapped.close();\n }",
"@Override\n public void close() {\n restore();\n }",
"public final void close() {\n LuaValue[] old = array;\n array = new LuaValue[] {old[index]};\n old[index] = null;\n index = 0;\n }",
"@Override\n public void close()\n {\n synchronized (this) {\n if (closed) {\n return;\n }\n closed = true;\n }\n\n readers.forEach(ExchangeStorageReader::close);\n }",
"public void close() {\n finalize0();\n }",
"public void dispose() {\n/* 105 */ this.cache.clear();\n/* */ }",
"public void dispose()\n\t{\n\t\tthis.accessor.dispose();\n\t\tthis.env.close();\n\t}",
"public void close() {\n\t\t\r\n\t}",
"public void close() {\n saveConfigurationSettings();\n removeAllLogHandlers();\n try {\n Constants.PREFS.flush();\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void close() {\n\t\tsuper.close();\n\t\t\n\t\tbnetMap.clear();\n\t\titemIds.clear();\n\t}",
"public void close() {}",
"public static void close() {\n HashMap<String, Transaction> map = instance.getTransactions();\n for (Transaction transaction : map.values()) {\n transaction.destroy();\n }\n map.clear();\n instance.transactions.remove();\n }",
"public void close() throws IOException{\n\t\tcp.close();\n\t\tSuaDB.fileMgr().flushFile(fileName);\n\t}",
"public synchronized void close() throws IOException {\n if (isOpen()) {\n randomAccessFile.close();\n randomAccessFile = null;\n ioBuffer = null;\n }\n }",
"public void close() {\r\n\t}",
"public void close() {\t\t\n\t}",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close();",
"public void close(){\r\n\t\tif (this.fileWriter != null){\r\n\t\t\ttry {\r\n\t\t\t\tthis.fileWriter.flush();\r\n\t\t\t\tthis.fileWriter.close();\r\n\t\t\t\tthis.fileWriter = null;\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlogger.error(\"Cannot close the file handle \"+this.myfilename+\". Your results might be lost. Cause: \"+e.getMessage());\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t}",
"@Override\n protected void doClose() {\n FileUtil.closeSilent(this.in);\n this.recordFactory = null;\n this.geometryFactory = null;\n this.in = null;\n this.recordDefinition = null;\n this.resource = null;\n }",
"@Override\n\tpublic void close() {\n\t\tsuper.close();\n\t\tlockRuntimeDao = null;\n\t\tplaceRuntimeDao = null;\n\t\tlocatorRuntimeDao = null;\n\t}",
"public void dispose() {\r\n\t\tclose();\r\n\t}",
"public void close()\n//\n////////////////////////////////////////////////////////////////////////\n{\n // Free up path\n path.unref();\n\n // The SoDetailList destructor deletes all details in the list, so\n // we don't have to do it here\n}",
"public void close() throws IOException {\r\n reader.close();\r\n reader = null;\r\n }",
"public void close() {\n\t\tthis.closed = true;\n\t\ttry {\n\t\t\tbdb.close();\n\t\t\tbdb = null;\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}",
"public synchronized void close() {\r\n\t\tif (mDataBase != null)\r\n\t\t\tmDataBase.close();\r\n\t\tsuper.close();\r\n\t}",
"public void close() {\n\t\tconfigurationReloader.shutdown();\n\t}",
"public void close() {\n\t\t\n\t}",
"public void close() {\n\t\t\n\t}",
"public void close() {\n\t\t\n\t}",
"public void close() {\n\n\t}",
"public void close() {\n\n\t}",
"public void close() throws IOException {\n open = false;\n stream.close();\n }",
"public void close() {\n if (cleanup != null) {\n cleanup.disable();\n }\n if (isOpen()) {\n forceClose();\n }\n }",
"public void close() {\n\t}",
"public void finalizar()\n\t{\n\t\tif( this.getIn() != null )\n\t\t\tthis.getIn().close();\n\t}",
"@Override\n public void close() {\n backingIterator.close();\n outputBuffer.close();\n isClosed = true;\n }",
"protected void finalize() {\n close();\n }",
"@Override\n void close();",
"@Override\n void close();",
"@Override\n void close();",
"@Override\n void close();",
"public void close() throws IOException {\r\n\r\n // System.out.println(\"FileDICOM.close\");\r\n this.finalize();\r\n }",
"@Override public abstract void close();",
"@Override\r\n\tpublic final void close() throws IOException {\r\n\t\tf.close();\r\n\t\tf = null;\r\n\t}",
"void close(boolean evictOnClose) throws IOException;",
"private void close() {\n\t\t\tDB.close(m_rs, m_pstmt);\n\t\t\tm_rs = null;\n\t\t\tm_pstmt = null;\n\t\t}",
"protected void close(int flags) throws IOException {\n\t\tLock l = null;\n\t\tthis.closeLock.lock();\n\t\ttry {\n\t\t\tl = df.getReadLock();\n\t\t\tl.lock();\n\t\t\tif (Main.safeClose) {\n\t\t\t\tif (SDFSLogger.isDebug())\n\t\t\t\t\tSDFSLogger.getLog().debug(\n\t\t\t\t\t\t\t\"close \" + df.getMetaFile().getPath() + \" flag=\"\n\t\t\t\t\t\t\t\t\t+ flags);\n\t\t\t\tif (!this.isClosed()) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (this.writtenTo && Main.safeSync) {\n\t\t\t\t\t\t\tdf.writeCache();\n\t\t\t\t\t\t\tdf.getMetaFile().sync();\n\t\t\t\t\t\t\tdf.sync(false);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tthis.closed = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.closeLock.unlock();\n\t\t\tif (l != null)\n\t\t\t\tl.unlock();\n\t\t}\n\t}",
"@Override\r\n\tpublic synchronized void close() {\n\t\tsuper.close();\r\n\t}",
"void close() {\n unload0(name, handle);\n }",
"public void close() throws IOException {\n\t\tif (keyClass != null) {\n\t\t keySerializer.close();\n\t\t valueSerializer.close();\n\t\t}\n\n\t\t// Write EOF_MARKER for key/value length\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tdecompressedBytesWritten += 2 * WritableUtils.getVIntSize(EOF_MARKER);\n \n\t\t//Flush the stream\n\t\tout.flush();\n \n\t\tif (compressOutput) {\n\t\t // Flush\n\t\t compressedOut.finish();\n\t\t compressedOut.resetState();\n\t\t}\n \n\t\t// Close the underlying stream iff we own it...\n\t\tif (ownOutputStream) {\n\t\t out.close();\n\t\t}\n\t\telse {\n\t\t // Write the checksum\n\t\t checksumOut.finish();\n\t\t}\n\n\t\tcompressedBytesWritten = rawOut.getPos() - start;\n\n\t\tif (compressOutput) {\n\t\t // Return back the compressor\n\t\t CodecPool.returnCompressor(compressor);\n\t\t compressor = null;\n\t\t}\n\n\t\tout = null;\n\t\tif(writtenRecordsCounter != null) {\n\t\t writtenRecordsCounter.increment(numRecordsWritten);\n\t\t}\n\t }",
"@Override\r\n\tpublic void close()\r\n\t{\n\t\t\r\n\t}",
"public void close()\r\n {\r\n }",
"protected final void close()\n {\n try {\n _reader.close();\n _reader = null;\n } catch ( IOException except ) { }\n }",
"@Override\r\n public synchronized void close() {\r\n super.close();\r\n if (myWritableDb != null) {\r\n myWritableDb.close();\r\n myWritableDb = null;\r\n }\r\n }",
"protected void finalize() {\n\t\tclose();\n\t}",
"public void close() {\n }",
"public void close() {\n }",
"public void close() {\n }",
"public void close()\r\n\t{\r\n\t if (isOpen()) try {\r\n\t \tfd.close();\r\n\t } catch (IOException ex) {\r\n\t \t/* do nothing */\r\n\t } finally {\r\n\t\t thisc = EOF;\r\n\t\t holdc = EOF;\r\n\t\t fd = null;\r\n\t }\r\n\t}",
"public void close() throws IOException {\n reset();\n _reader.close();\n }",
"public synchronized void close()\n {\n if (open) {\n open = false;\n reset();\n line.close();\n }\n }",
"public void Close() {\n\t\tfd.close();\r\n\t}"
] | [
"0.7609852",
"0.74119043",
"0.7352454",
"0.6974696",
"0.66416943",
"0.66053295",
"0.65700436",
"0.6537089",
"0.64975005",
"0.64959407",
"0.6435021",
"0.64160746",
"0.6353265",
"0.6335836",
"0.6334791",
"0.6314373",
"0.6239817",
"0.623755",
"0.62282133",
"0.62029994",
"0.6191373",
"0.61735636",
"0.61639464",
"0.615508",
"0.61518764",
"0.61386424",
"0.6127767",
"0.61048716",
"0.6096637",
"0.60966235",
"0.6087983",
"0.6080406",
"0.6069357",
"0.6057264",
"0.60465807",
"0.6032533",
"0.60286266",
"0.6028492",
"0.6011776",
"0.60016847",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.59996396",
"0.5998195",
"0.5994304",
"0.599416",
"0.5989401",
"0.5988116",
"0.5981229",
"0.5980916",
"0.5977282",
"0.5976767",
"0.59744185",
"0.59744185",
"0.59744185",
"0.59698266",
"0.59698266",
"0.594888",
"0.5940448",
"0.59388506",
"0.59295595",
"0.592864",
"0.59214175",
"0.591855",
"0.591855",
"0.591855",
"0.591855",
"0.5908577",
"0.5907331",
"0.5907251",
"0.5907065",
"0.5903376",
"0.5896661",
"0.5895001",
"0.58941853",
"0.58935887",
"0.58792436",
"0.5876268",
"0.5870102",
"0.58673215",
"0.5862613",
"0.5862518",
"0.5862518",
"0.5862518",
"0.5856523",
"0.5855942",
"0.58555853",
"0.5853288"
] | 0.59953856 | 56 |
Closes the cache and deletes all of its stored values. This will delete all files in the cache directory including files that weren't created by the cache. | public void delete() throws IOException {
close();
deleteContents(directory);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void deleteCache() {\n\n for (final File f : Constants.CACHE_LOCATION.listFiles()) {\n if (!f.isDirectory()) {\n f.delete();\n }\n }\n\n logsByCharacterMap = Collections.emptyMap();\n }",
"public static void clear() {\n\t\tmemoryCache.clear();\n\n\t\t// Remove everything from file cache\n\t\tFile cachedFileDir = new File(diskCachePath);\n\t\tif (cachedFileDir.exists() && cachedFileDir.isDirectory()) {\n\t\t\tFile[] cachedFiles = cachedFileDir.listFiles();\n\t\t\tfor (File f : cachedFiles) {\n\t\t\t\tif (f.exists() && f.isFile()) {\n\t\t\t\t\tf.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void deleteCacheFiles() {\n\n\t\t// get the directory file\n\t\tFile cache = new File(Constants.CACHE_DIR_PATH);\n\n\t\t// check if we got the correct instance of that directory file.\n\t\tif (!cache.exists() || !cache.isDirectory())\n\t\t\treturn;\n\n\t\t// gets the list of files in the directory\n\t\tFile[] files = cache.listFiles();\n\t\t// deleting\n\n\t\tdeleteFiles(cache);\n\t\tfiles = null;\n\t\tcache = null;\n\n\t}",
"public void clearCache() {\n\n\t\t// clearing form soft reference\n\t\tif (softCache != null) {\n\t\t\tsoftCache.clear();\n\t\t}\n\n\t\t// clearing from cache directory\n\t\tdeleteCacheFiles();\n\n\t}",
"public void destroy()\n {\n if ( cacheManager == null )\n {\n return;\n }\n\n LOG.info( \"clearing all the caches\" );\n\n cacheManager.close();\n cacheManager = null;\n //cacheManager.clearAll();\n //cacheManager.shutdown();\n }",
"public static void clearAllCache() {\n try {\n sLruCache.evictAll();\n sDiskLruCache.delete();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void close() {\n try {\n sDiskLruCache.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic synchronized void clear() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files != null) {\n\t\t\tfor (File file : files) {\n\t\t\t\tfile.delete();\n\t\t\t}\n\t\t}\n\t\tmEntries.clear();\n\t\tmTotalSize = 0;\n\t\tVolleyLog.d(\"Cache cleared.\");\n\t}",
"void destroy() {\n destroyCache();\n }",
"private static void clearCache(File cacheDir)\n {\n // Get the list of the files in the cache folder\n final File[] files = cacheDir.listFiles();\n\n // Perform a for loop to delete/remove all files\n for (File file : files)\n {\n file.delete();\n }\n // end of for (int i=0; i<files.length; i++)\n }",
"public void close() throws IOException {\n maxStreamPos = cache.length();\n\n seek(maxStreamPos);\n flushBefore(maxStreamPos);\n super.close();\n cache.close();\n cache = null;\n cacheFile.delete();\n cacheFile = null;\n stream.flush();\n stream = null;\n StreamCloser.removeFromQueue(closeAction);\n }",
"private void reset()\r\n {\r\n log.info(\"{0}: Resetting cache\", logCacheName);\r\n\r\n try\r\n {\r\n storageLock.writeLock().lock();\r\n\r\n if (dataFile != null)\r\n {\r\n dataFile.close();\r\n }\r\n\r\n final File dataFileTemp = new File(rafDir, fileName + \".data\");\r\n Files.delete(dataFileTemp.toPath());\r\n\r\n if (keyFile != null)\r\n {\r\n keyFile.close();\r\n }\r\n final File keyFileTemp = new File(rafDir, fileName + \".key\");\r\n Files.delete(keyFileTemp.toPath());\r\n\r\n dataFile = new IndexedDisk(dataFileTemp, getElementSerializer());\r\n keyFile = new IndexedDisk(keyFileTemp, getElementSerializer());\r\n\r\n this.recycle.clear();\r\n this.keyHash.clear();\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure resetting state\", logCacheName, e);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n }",
"public static void clearCache() {\n CACHE.remove();\n }",
"public void dispose() {\n Collection<File> values = compareFiles.values();\n for (File file : values) {\n file.delete();\n }\n\n compareFiles.clear();\n }",
"@Override\n public int clear() {\n return deleteContents(getCacheDir());\n }",
"public static void clearCache() {\n cacheKeys.clear();\n cacheValues.clear();\n }",
"public void clearDiskCache()\n {\n clearCache(cacheDirectory);\n }",
"public boolean clearCache() {\n File directory=new File(cacheDirectory);\n File[] files=directory.listFiles();\n boolean alldeleted=true;\n for (File file:files) {\n if (!engine.deleteTempFile(file)) { // this will delete files recursively for directories\n engine.logMessage(\"SYSTEM ERROR: Unable to delete cache for: \"+file.getAbsolutePath());\n alldeleted=false; \n }\n }\n return alldeleted;\n }",
"public void clearCache();",
"public void clear() {\n cache.clear();\n }",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}",
"void deleteCache(URI location) {\n \t\tFile cacheFile = getCache(location);\n \t\t// delete the cache file if it exists\n \t\tsafeDelete(cacheFile);\n \t\t// delete a resumable download if it exists\n \t\tsafeDelete(new File(new File(cacheFile.getParentFile(), DOWNLOADING), cacheFile.getName()));\n \t}",
"void clearCache();",
"void clearCache();",
"private void clearResetCache() {\n for(IoBuffer buf : resetCache) {\n buf.free();\n }\n resetCache = null;\n }",
"@Override\n\tpublic void clear() {\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\tcache.clear();\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"public static void clearCache() {\r\n\t\tsInstance.mSettings.clear();\r\n\t}",
"protected void clearCaches() {\n DescriptorFactory.clearInstance();\n ObjectTypeFactory.clearInstance();\n TypeQualifierApplications.clearInstance();\n TypeQualifierAnnotation.clearInstance();\n TypeQualifierValue.clearInstance();\n // Make sure the codebases on the classpath are closed\n AnalysisContext.removeCurrentAnalysisContext();\n Global.removeAnalysisCacheForCurrentThread();\n MethodInfo.clearCaches();\n if (classPath != null) {\n classPath.close();\n }\n }",
"public void destroy() throws Exception {\n\t\tICache cache = getCache ();\n\t\tif(cache!=null) cache.shutdown ();\n\t}",
"protected void invalidateCache() {\r\n\tcurrentFilesFresh = false;\r\n }",
"public void dispose( String cache )\r\n throws IOException\r\n {\r\n // nothing needs to be done\r\n }",
"public static void clearCache() {\n getPersistence().clearCache();\n }",
"public static void clearCache() {\n getPersistence().clearCache();\n }",
"public static void clearCache() {\n getPersistence().clearCache();\n }",
"public void clearCache() {\n\tmyCachedCrum = null;\n\tmyCachedRoot = null;\n\tmyCachedPath = MuSet.make();\n/*\nudanax-top.st:13116:CanopyCache methodsFor: 'operations'!\n{void} clearCache\n\t\"Clear the cache because the canopy has\n\t changed. This ought to destroy the cachedPath. \n\t This must be cleared after every episode!!!!!!\"\n\tmyCachedCrum _ NULL.\n\tmyCachedRoot _ NULL.\n\tmyCachedPath _ MuSet make.!\n*/\n}",
"@PreDestroy\n\tpublic void destroy() {\n\t cacheTree.destroy();\n\t}",
"@VisibleForTesting\n public static void clearCachedPaths() {\n requireNonNull(CACHE, \"CACHE\");\n CACHE.asMap().clear();\n }",
"public static void clearCache(){\n cache.clear();\n cache2.clear();\n }",
"private void flushCache()\n {\n Entry<Integer, String> eldestEntry;\n File oldestFile;\n long eldestFileSize;\n int count = 0;\n\n int MAX_DELETE_FILE = 4;\n int MAX_CACHE_FILE_ALLOW = 1000;\n\n while (count < MAX_DELETE_FILE && (cacheSize > MAX_CACHE_FILE_ALLOW || cacheByteSize > maxCacheByteSize))\n {\n eldestEntry = mLinkedHashMap.entrySet().iterator().next();\n oldestFile = new File(eldestEntry.getValue());\n eldestFileSize = oldestFile.length();\n mLinkedHashMap.remove(eldestEntry.getKey());\n oldestFile.delete();\n cacheSize = mLinkedHashMap.size();\n cacheByteSize -= eldestFileSize;\n count++;\n }// while (count < MAX_DELETE_FILE && (cacheSize > MAX_CACHE_FILE_ALLOW || cacheByteSize > maxCacheByteSize))\n }",
"@Override\n public void cleanup() {\n for (String key : cache.keySet()) {\n CacheObject co = cache.get(key).get();\n if (co.isExpired()) {\n synchronized (co) {\n if (co.isExpired()) {\n cache.remove(key);\n queue.add(co);\n }\n }\n }\n }\n\n }",
"@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}",
"private void disposeAndDeleteAllImages() {\r\n\r\n\t\tPhotoLoadManager.stopImageLoading(true);\r\n\t\tThumbnailStore.cleanupStoreFiles(true, true);\r\n\r\n\t\tPhotoImageCache.disposeAll();\r\n\r\n\t\tExifCache.clear();\r\n\t}",
"public void clearCache() {\n mCache.clear();\n }",
"public void Clean()\n\t{\n\t\tstorage.clear();\n\t}",
"public void clear() {\n this.cache.clear();\n }",
"public static void clearAllCache() {\n page_cache.clear();\n key_relate.clear();\n }",
"public static void close(String name) {\n synchronized (CacheStorageManager.class) {\n CacheStorage cache = map.remove(name);\n if (cache != null) {\n cache.close();\n }\n }\n }",
"protected void disposeInternal()\r\n {\r\n if (!isAlive())\r\n {\r\n log.error(\"{0}: Not alive and dispose was called, filename: {1}\",\r\n logCacheName, fileName);\r\n return;\r\n }\r\n\r\n // Prevents any interaction with the cache while we're shutting down.\r\n setAlive(false);\r\n\r\n final Thread optimizationThread = currentOptimizationThread;\r\n if (isRealTimeOptimizationEnabled && optimizationThread != null)\r\n {\r\n // Join with the current optimization thread.\r\n log.debug(\"{0}: In dispose, optimization already in progress; waiting for completion.\",\r\n logCacheName);\r\n\r\n try\r\n {\r\n optimizationThread.join();\r\n }\r\n catch (final InterruptedException e)\r\n {\r\n log.error(\"{0}: Unable to join current optimization thread.\",\r\n logCacheName, e);\r\n }\r\n }\r\n else if (isShutdownOptimizationEnabled && this.getBytesFree() > 0)\r\n {\r\n optimizeFile();\r\n }\r\n\r\n saveKeys();\r\n\r\n try\r\n {\r\n log.debug(\"{0}: Closing files, base filename: {1}\", logCacheName,\r\n fileName);\r\n dataFile.close();\r\n dataFile = null;\r\n keyFile.close();\r\n keyFile = null;\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure closing files in dispose, filename: {1}\",\r\n logCacheName, fileName, e);\r\n }\r\n\r\n log.info(\"{0}: Shutdown complete.\", logCacheName);\r\n }",
"public void invalidateCaches() {\n cfgCache.invalidateAll();\n analysisCache.invalidateAll();\n }",
"public void releaseCachedPages() {\n cache.removeAll();\n }",
"public void clear() {\n\t\tthis.cache.clear();\n\t}",
"public void close() throws IOException {\n // nothing to do with cached bytes\n }",
"public void clearCaches() {\n if (mImageCache != null) {\n mImageCache.clearCaches();\n }\n\n // clear the keys of images we've already downloaded\n sKeys.clear();\n }",
"public static void deleteCache(Context context){\n File baseDir = getResourcesFolder(context);\n //basDir could be null if storage has not yet been selected (extreme cases where memory is too low)\n if(baseDir != null) {\n File[] content = baseDir.listFiles();\n if(content != null)\n for (File file : content)\n deleteRecursively(file);\n }\n }",
"public void clearMemoryCache() {\r\n cache.evictAll();\r\n Log.d(TAG, \"Manually cleaned complete cache.\");\r\n }",
"public static void clearAll(Context ctx){\n \t\t// delete files\n \t\tfor( File f : getCachedFiles(ctx) ){\n \t\t\tf.delete();\n \t\t}\n \t}",
"static void clearCache() {\n CONFIG_VALUES = null;\n RUN_MODE = null;\n }",
"public abstract void clearCache();",
"public static void closeAutoClearCache() {\n SharePrefUtil.put().putBoolean(OPEN_AUTO_CLEAR_CACHE, false).apply();\n stopAutoClear();\n }",
"@SuppressWarnings({\"unchecked\", \"CallToThreadYield\"})\n public void cleanup() {\n\n long now = System.currentTimeMillis();\n ArrayList<K> deleteKey;\n\n synchronized (cacheMap) {\n MapIterator itr = cacheMap.mapIterator();\n\n deleteKey = new ArrayList<>((cacheMap.size() / 2) + 1);\n K key;\n CacheObject c;\n\n while (itr.hasNext()) {\n key = (K) itr.next();\n c = (CacheObject) itr.getValue();\n\n if (c != null && (now > (timeToLive + c.lastAccessed))) {\n deleteKey.add(key);\n }\n }\n }\n\n deleteKey.stream().map((key) -> {\n synchronized (cacheMap) {\n Object remove = cacheMap.remove(key);\n }\n return key;\n }).forEachOrdered((K _item) -> {\n Thread.yield();\n });\n }",
"private void invalidateCache() {\n\t\tLog.d(TAG, \"invalidateCache() is removing in-memory cache\");\n\t\tpackageMapping.clear();\n\t\tvalidCache = false;\n\t}",
"public void dispose() {\n/* 105 */ this.cache.clear();\n/* */ }",
"public void clearDataCache() {\n\t\t_cumulativeVolumeTable.clear();\n\t\tbookMap.clear();\n\t\tquoteMap.clear();\n\t\tmillisCST = 0L;\n\t}",
"public static void deleteCache(Context context) {\n Glide.get(context).clearMemory();\n\n try {\n File dir = context.getCacheDir();\n deleteDir(dir);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }",
"public static void deleteCache(Context context) {\n try {\n File dir = context.getCacheDir();\n deleteDir(dir);\n } catch (Exception e) {}\n }",
"public void clearCache() {\n textureCache.clear();\n modelCache.clear();\n blockModelCache.clear();\n }",
"public static void deleteCache(Context context) {\n try {\n File dir = context.getExternalCacheDir();\n deleteDir(dir);\n } catch (Exception e) { e.printStackTrace();}\n }",
"public void resetStore() {\n try {\n db.close();\n uncommited = null;\n uncommitedDeletes = null;\n autoCommit = true;\n bloom = new BloomFilter();\n utxoCache = new LRUCache(openOutCache, 0.75f);\n } catch (IOException e) {\n log.error(\"Exception in resetStore.\", e);\n }\n\n File f = new File(filename);\n if (f.isDirectory()) {\n for (File c : f.listFiles())\n c.delete();\n }\n openDB();\n }",
"public void deleteStorage() {\n deleteReportDir(reportDir_);\n reportDir_ = null;\n deleteReportDir(leftoverDir_);\n leftoverDir_ = null;\n }",
"public void clear() throws CacheException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Cache \" + cache.getName() + \": removing all entries\");\n }\n cache.removeAll();\n }",
"static void dispose() {\n for (final Writer w : logFiles.values()) {\n try {\n w.close();\n } catch (IOException ioe) {\n // don't care\n }\n }\n logFiles.clear();\n }",
"public void invalidate() {\n boolean hasLock = false;\n while (!hasLock) {\n synchronized (this) {\n if (!lock) {\n lock = true;\n hasLock = true;\n }\n }\n if (!hasLock) try {\n Thread.sleep(1000);\n } catch (Exception e) {\n }\n }\n try {\n if (cacheFile.exists()) cacheFile.delete();\n } finally {\n lock = false;\n }\n }",
"public void exit(Context context) {\n // clear cache\n deleteFile(context.getCacheDir());\n deleteFile(context.getFilesDir());\n }",
"public void clearCache() {\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\t}",
"public static void flush() {\n try {\n sDiskLruCache.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void clearCache() {\n reflectorCache.clear();\n }",
"public void cleanDescriptorCache() {\n _descriptorCache = new DescriptorCacheImpl();\n }",
"public void close() {\n\t\tkeystore = null;\n\t}",
"public void flushCaches() {\n LOCAL_SMALL_CACHE.clear();\n LOCAL_LARGE_CACHE.clear();\n }",
"public DBMaker deleteFilesAfterClose(){\n this.deleteFilesAfterCloseFlag = true;\n return this;\n }",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tmImageFetcher.closeCache();\n\t}",
"public void stop() throws LifecycleException {\n disable();\n\n try {\n defaultHelper.destroy();\n } catch (Exception e) {\n // XXX: ignore\n }\n\n // destroy the cache-helpers\n Enumeration helpers = Collections.enumeration(cacheHelpers.values());\n while(helpers.hasMoreElements()) {\n CacheHelper cacheHelper = (CacheHelper)helpers.nextElement();\n try {\n cacheHelper.destroy();\n } catch (Exception e) {\n // XXX: ignore\n }\n } \n cacheHelpers.clear();\n cacheMappings.clear();\n cacheHelpersByFilterName.clear();\n listeners.clear();\n }"
] | [
"0.75569254",
"0.7154876",
"0.71484786",
"0.7110767",
"0.7092915",
"0.7056921",
"0.70186824",
"0.6867069",
"0.67497694",
"0.66438174",
"0.66426134",
"0.66102856",
"0.6554545",
"0.65385103",
"0.65365356",
"0.64785063",
"0.6456542",
"0.64073676",
"0.63742954",
"0.63735557",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6342664",
"0.6311824",
"0.6309725",
"0.6309725",
"0.63096905",
"0.6295768",
"0.6263754",
"0.62544364",
"0.62417537",
"0.6237969",
"0.6233838",
"0.6225475",
"0.6225475",
"0.6225475",
"0.6205545",
"0.6198459",
"0.619842",
"0.614229",
"0.6139781",
"0.6122802",
"0.61228",
"0.6120189",
"0.6117106",
"0.611677",
"0.61124676",
"0.61114",
"0.60857546",
"0.60844684",
"0.60840446",
"0.60767615",
"0.6063004",
"0.6052532",
"0.60487735",
"0.6043498",
"0.6026791",
"0.60094017",
"0.5992056",
"0.59715104",
"0.59624976",
"0.5956946",
"0.5952371",
"0.5945481",
"0.59284914",
"0.5906373",
"0.5904199",
"0.59008485",
"0.58998567",
"0.5886148",
"0.5857465",
"0.5847835",
"0.5836665",
"0.58345443",
"0.57955086",
"0.5791289",
"0.57903945",
"0.57860065",
"0.57765996",
"0.5762085",
"0.5754417",
"0.57496095",
"0.57379174",
"0.57346755"
] | 0.0 | -1 |
Returns an editor for this snapshot's entry, or null if either the entry has changed since this snapshot was created or if another edit is in progress. | public Editor edit() throws IOException {
return DiskLruCache.this.edit(key, sequenceNumber);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected MigrationEditorOperation getEditor() {\n IEditorPart editorPart = PluginUtil.getActiveEditor();\n if (editorPart instanceof MigrationEditorOperation) {\n return (MigrationEditorOperation) editorPart;\n }\n return null;\n }",
"public Editor getEditor() {\n if (currentEditor == null) {\n getTopEditor(); // this will trigger creation of a new top editor if it doesn't exist and currentEditor will be assigned with that one as well\n }\n return currentEditor;\n }",
"private TreeViewer getEntryEditorWidgetTreeViewer()\n {\n if ( entryEditor != null )\n {\n EntryEditorWidget mainWidget = entryEditor.getMainWidget();\n if ( mainWidget != null )\n {\n TreeViewer viewer = mainWidget.getViewer();\n return viewer;\n }\n }\n return null;\n }",
"private IEntry getEntryEditorWidgetTreeViewerInput()\n {\n TreeViewer viewer = getEntryEditorWidgetTreeViewer();\n if ( viewer != null )\n {\n Object o = viewer.getInput();\n if ( o instanceof IEntry )\n {\n return ( IEntry ) o;\n }\n }\n return null;\n }",
"public Editor getEditor() { return editor; }",
"public CellEditor getEditor(String bookmark, Object fieldId) {\n\t\t\treturn null;\n\t\t}",
"public EditorView getEditorView() {\n\t\treturn this.editorView;\n\t}",
"@Api(1.0)\n public HaloPreferencesStorageEditor edit() {\n if (mCurrentEditor == null) {\n mCurrentEditor = new HaloPreferencesStorageEditor(getSharedPreferences());\n }\n return mCurrentEditor;\n }",
"public Component getEditorComponent ()\r\n {\r\n return editor;\r\n }",
"public String getEditor() {\n return (String)getAttributeInternal(EDITOR);\n }",
"public String getEditor() {\n return (String)getAttributeInternal(EDITOR);\n }",
"public java.awt.Component getInPlaceCustomEditor () {\n if (modifiedEditor instanceof EnhancedPropertyEditor) {\n return ((EnhancedPropertyEditor)modifiedEditor).getInPlaceCustomEditor ();\n } else {\n return null;\n }\n }",
"private TaskEditor getTaskEditor(EditableTask editable) {\n \t\tif (editable.getEditor() == null) {\n // Create a new editor using the extension point data\n \t\t\tTaskEditor editor = TaskEditorManager.getInstance().getEditor(editable.getKind());\n \t\t\tif (editor != null) {\n \t\t\t\tComposite editorPanel = new Composite(taskEditorContainer, SWT.NULL);\n \t\t\t\tGridLayout layout = new GridLayout();\n \t\t\t\tlayout.marginWidth = 0;\n \t\t\t\tlayout.marginHeight = 0;\n \t\t\t\teditorPanel.setLayout(layout);\n \t\t\t\tmform.getToolkit().adapt(editorPanel);\n \t\t\t\teditor.createControl(editorPanel, mform.getToolkit());\n \t\t\t\teditable.setEditor(editor);\n \t\t\t\tGridData gridData = new GridData(GridData.FILL_BOTH);\n \t\t\t\teditor.getControl().setLayoutData(gridData);\n \t\t\t} \n \t\t}\n \t\treturn editable.getEditor();\t\n \t}",
"public final MWC.GUI.Editable.EditorType getInfo()\r\n\t{\r\n\t\tif (_myEditor == null)\r\n\t\t\t_myEditor = new FieldInfo(this, this.getName());\r\n\r\n\t\treturn _myEditor;\r\n\t}",
"public synchronized IEditorPart getActiveEditor() {\n return activeEditorMap.get(currentWindow);\n }",
"public TopEntityEditor getTopEditor() {\n if (topEditor == null) {\n try {\n if (entity == null) {\n entity = createEntity();\n }\n if (entity == null) {\n return null;\n }\n topEditor = new TopEntityEditor(entity, getEditorDao());\n currentEditor = topEditor;\n } catch (InvalidEntityBeanPropertyException iepex) {\n throw new RuntimeException(\"Failed to instantiate EntityEditorManager topEditor - invalid entity bean property exception thrown while creating TopEntityEditor\", iepex);\n } catch (Exception ex) {\n throw new RuntimeException(\"Exception while creating a new entity in EntityEditorManager.createEntity()\", ex);\n }\n }\n return topEditor;\n }",
"protected ITextEditor getEditor() {\n return editor;\n }",
"public MyTextPane getEditor() {\n\t\treturn editor;\n\t}",
"public Part getPartToModify()\n {\n if (partTable.getSelectionModel().getSelectedItem() != null)\n {\n return ((Part) partTable.getSelectionModel().getSelectedItem());\n }\n return null;\n }",
"public JawbComponent getEditorComponent () {\n if (editorComponent == null)\n initEditorComponent ();\n return editorComponent;\n }",
"public MWC.GUI.Editable.EditorType getInfo()\n\t{\n\t\tif (_myEditor == null)\n\t\t\t_myEditor = new InvestigateInfo(this);\n\n\t\treturn _myEditor;\n\t}",
"public MapEditor getMapEditor() {\n\t\treturn mapEditor;\n\t}",
"public static IEditorPart getActiveEditor(){\r\n\t\tIWorkbench workbench = PlatformUI.getWorkbench();\r\n\t\tIWorkbenchWindow window = workbench.getActiveWorkbenchWindow();\r\n\t\tIWorkbenchPage page = window.getActivePage();\r\n\t\tIEditorPart editorPart = page.getActiveEditor();\r\n\t\treturn editorPart;\r\n\t}",
"public Editor getEditor(String idRevista){\n Editor editor = null;\n String id, nome;\n\n try{\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT Editor.* FROM Editor \" +\n \"INNER JOIN Revista \" +\n \"ON Revista.Editor_ID = Editor.ID \" +\n \"WHERE Revista.ID = \" + idRevista);\n ResultSet rs = stm.executeQuery();\n if(rs.next()){\n id = rs.getString(\"ID\");\n nome = rs.getString(\"Nome\");\n editor = new Editor(id,nome);\n }\n }\n catch (Exception e){\n e.getMessage();\n }\n finally {\n con.close(connection);\n }\n return editor;\n }",
"public Container getContainer() {\n return editor;\n }",
"public synchronized IEditorPart getActiveEditor(IWorkbenchWindow window) {\n return activeEditorMap.get(window);\n }",
"public java.lang.Boolean getEdit() {\n return edit;\n }",
"@Override\n public TreeCellEditor getCellEditor() {\n final TreeCellEditor ed = super.getCellEditor();\n if (ed == null) {\n return null;\n }\n if (wrapper == null) {\n wrapper = new RendererEditorWrapper();\n }\n wrapper.ed = ed;\n return wrapper;\n }",
"@Override\n\tpublic EditLogic getEditLogic() {\n\t\treturn null;\n\t}",
"protected Rectangle getVisibleEditorRect() {\n Rectangle alloc = editor.getBounds();\n if ((alloc.width > 0) && (alloc.height > 0)) {\n alloc.x = alloc.y = 0;\n Insets insets = editor.getInsets();\n alloc.x += insets.left;\n alloc.y += insets.top;\n alloc.width -= insets.left + insets.right + caretMargin;\n alloc.height -= insets.top + insets.bottom;\n return alloc;\n }\n return null;\n }",
"public Git.Entry getObject() { return ent; }",
"public VdbEditor getVdbEditor(final IFile vdb) {\n \t\tfinal IWorkbenchWindow window = UiPlugin.getDefault()\n \t\t\t\t.getCurrentWorkbenchWindow();\n \n \t\tif (window != null) {\n \t\t\tfinal IWorkbenchPage page = window.getActivePage();\n \n \t\t\tif (page != null) {\n \t\t\t\tVdbEditor editor = findEditorPart(page, vdb);\n \t\t\t\tif( editor != null ) {\n \t\t\t\t\treturn editor;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn null;\n \t}",
"public LeafValueEditor<SSDate> asEditor() {\n return box.asEditor();\n }",
"public Component getCustomEditor() {\n\t\treturn mEditor;\n\t}",
"private VdbEditor findEditorPart(final IWorkbenchPage page, IFile vdbFile) {\n \t\tfinal IEditorReference[] editors = page.getEditorReferences();\n \t\tfor (int i = 0; i < editors.length; ++i) {\n \n \t\t\tfinal IEditorPart editor = editors[i].getEditor(false);\n \t\t\tif (editor instanceof VdbEditor) {\n \t\t\t\tfinal VdbEditor vdbEditor = (VdbEditor) editor;\n \t\t\t\tfinal IPath editorVdbPath = vdbEditor.getVdb().getName();\n \t\t\t\tif (vdbFile.getFullPath().equals(editorVdbPath)) \n \t\t\t\t\treturn vdbEditor;\n \n \t\t\t}\n \t\t}\n \n \t\treturn null;\n \t}",
"public java.lang.String getEditInfoResult() {\r\n return localEditInfoResult;\r\n }",
"@Column (name=\"LAST_EDITOR\")\r\n\tpublic String getLastEditor() {\r\n\t\treturn lastEditor;\r\n\t}",
"public Object \n getCellEditorValue() \n {\n BaseEditor editor = null;\n if(pField.getPluginName() != null) {\n try {\n\tPluginMgrClient pclient = PluginMgrClient.getInstance();\n\teditor = pclient.newEditor(pField.getPluginName(), \n\t\t\t\t pField.getPluginVersionID(), \n\t\t\t\t pField.getPluginVendor());\n }\n catch(PipelineException ex) {\n }\n }\n \n return editor; \n }",
"public EditPanel getEditPanel() { return ep; }",
"public OsmDataLayer getEditLayer() {\n\t\treturn null;\n\t}",
"public Object getEditorValue() {\r\n\t try{\r\n\t\treturn new Integer(getText());\r\n\t }catch(Exception e){}\r\n\t return null;\r\n\t}",
"public PetalEditor getEditor() {\n return petal_editor;\n }",
"public BaseEditorPanel getEditorPanel ()\n {\n return _epanel;\n }",
"protected InteractionDrawingEditor getViewEditor()\n {\n return view.getEditor();\n }",
"public final EventHandler<ListView.EditEvent<T>> getOnEditCommit() {\n\n return this.getWrappedControl().getOnEditCommit();\n }",
"public InitialValueEditor getInitEditor() {\n return initEditor;\n }",
"public DelegatingCredentialRequestEditor getEditor() {\n return editor;\n }",
"public TreeTableCellEditor getEditor() {\n return treeTableCellEditor;\n }",
"public int getLastEditType(){\n return lastEditType;\n }",
"@Nullable\n public JComponent getPreferredFocusedComponent() {\n return myEditor;\n }",
"@Override\r\n\tpublic GridRecordEditor getGridRecordEditor(String sectionName, ListGrid grid) {\n\t\treturn null;\r\n\t}",
"public E getEntry() {\n return _entry;\n }",
"protected abstract Entity getEditedEntity();",
"public boolean getEdited() {\r\n\t\treturn this.edited;\r\n\t}",
"public String getAsText() {\n return modifiedEditor.getAsText ();\n }",
"public boolean getEdited() {\r\n return this.edited;\r\n }",
"public KTableCellEditor getCellEditor() {\n\t\treturn null;\r\n\t}",
"public Long getLastEditUin() {\n return this.LastEditUin;\n }",
"public DivisionDataEdit asEditable() {\n return new DivisionDataEdit(this);\n }",
"protected final JTextComponent getComponent() {\n return editor;\n }",
"public EditTaskOption getEditTaskOption() {\n return (EditTaskOption) commandData.get(CommandProperties.EDIT_SET_PROPERTY);\n }",
"protected TransactionalEditingDomain getEditingDomain() {\n // try adapting the workbench part\n IWorkbenchPart part = getWorkbenchPart();\n\n if (part != null) {\n IEditingDomainProvider edProvider = (IEditingDomainProvider) part.getAdapter(IEditingDomainProvider.class);\n\n if (edProvider != null) {\n EditingDomain domain = edProvider.getEditingDomain();\n\n if (domain instanceof TransactionalEditingDomain) {\n return (TransactionalEditingDomain) domain;\n }\n }\n }\n\n return null;\n }",
"public Date getEditTime() {\n return editTime;\n }",
"public String getEdited() {\n return Edited;\n }",
"public VocabularyConcept getEditableConcept() {\r\n for (VocabularyConcept vc : vocabularyConcepts.getList()) {\r\n if (vc != null) {\r\n return vc;\r\n }\r\n }\r\n return null;\r\n }",
"public Object getItem ()\r\n {\r\n return editor.getText ();\r\n }",
"public final ObjectProperty<EventHandler<ListView.EditEvent<T>>> onEditCommitProperty() {\n\n return this.getWrappedControl().onEditCommitProperty();\n }",
"public boolean getEditing() {\r\n return this.editing;\r\n }",
"public IEntry getSelectedEntry()\n {\n return selectedEntry;\n }",
"public Boolean getEditFlag() {\n return editFlag;\n }",
"@Override\n\tpublic java.lang.String getEditorType() {\n\t\treturn _scienceApp.getEditorType();\n\t}",
"public Date getEditDate() {\n return editDate;\n }",
"public Document getDocument() {\n return editor.getDocument();\n }",
"@ApiModelProperty(value = \"The metadata for the fields on the issue that can be amended.\")\n public IssueUpdateMetadata getEditmeta() {\n return editmeta;\n }",
"public Button getEditButton() {\n\t\treturn editButton;\n\t}",
"@Override\n public FormFieldComponent getEditorComponent() {\n return (FormFieldComponent)editor;\n }",
"public boolean hasEditor()\n\t{\n\t\treturn true;\n\t}",
"public AssetEntryPersistence getAssetEntryPersistence() {\n\t\treturn assetEntryPersistence;\n\t}",
"public it.gov.agenziaentrate.ivaservizi.docs.xsd.fatture.v12.CessionarioCommittenteType getCessionarioCommittente()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n it.gov.agenziaentrate.ivaservizi.docs.xsd.fatture.v12.CessionarioCommittenteType target = null;\r\n target = (it.gov.agenziaentrate.ivaservizi.docs.xsd.fatture.v12.CessionarioCommittenteType)get_store().find_element_user(CESSIONARIOCOMMITTENTE$6, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"protected String getCurrentCode() {\n IDocument doc = EditorUtilities.getDocument(editor);\n if (doc != null) {\n return doc.get();\n }\n return null;\n }",
"public final boolean isEdited(){\n\t\treturn JsUtils.getNativePropertyBoolean(this, \"edited\");\n\t}",
"public ImmunizationDefinition getDefinition() {\n long __key = this.definitionImmunizationDefinitionId;\n if (definition__resolvedKey == null || !definition__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n ImmunizationDefinitionDao targetDao = daoSession.getImmunizationDefinitionDao();\n ImmunizationDefinition definitionNew = targetDao.load(__key);\n synchronized (this) {\n definition = definitionNew;\n \tdefinition__resolvedKey = __key;\n }\n }\n return definition;\n }",
"public final boolean getEditable() {\n return this.editableProperty().getValue();\n }",
"public int getEditedTime() {\n return instance.getEditedTime();\n }",
"public String getLastEditTime() {\n return editedTimeList.get(editedTimeList.size() - 1);\n }",
"public native CellRecord getEditedRecord(int rowNum, int colNum) /*-{\r\n var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();\r\n var record = self.getEditedRecord(rowNum, colNum);\r\n if (record == null) return null;\r\n return @com.smartgwt.client.widgets.cube.CellRecord::getOrCreateRef(Lcom/google/gwt/core/client/JavaScriptObject;)(record);\r\n }-*/;",
"public M csolEditorNull(){if(this.get(\"csolEditorNot\")==null)this.put(\"csolEditorNot\", \"\");this.put(\"csolEditor\", null);return this;}",
"String getEditore();",
"private GitCommit getParentImpl()\n {\n RevCommit r = _rev.getParentCount()>0? _rev.getParent(0) : null;\n if(r!=null) r = (RevCommit)getRevObject(r); // They return a rev commit, but it isn't loaded!\n return r!=null? new GitCommit(r) : null;\n }",
"public Cursor getEditedReportCursor() {\n return getContext().getContentResolver().query(\n ReportEntry.CONTENT_URI,\n null,\n ReportEntry.COLUMN_SYNC_STATUS + \" =? \" +\n //ReportEntry.COLUMN_SYNC_STATUS + \" =? \" +\n \" AND \" + ReportEntry.COLUMN_REPORT_ID + \" NOT LIKE ?\",\n new String[] {\n SyncStatus.EDITED_REPORT.toString(),\n \"-%\"\n // SyncStatus.SYNC_IN_PROGRESS.toString(),\n //Constants.INTERNAL_REPORT_ID\n },\n null\n );\n }",
"@Nullable\n public ObjectId getRevision() {\n return ObjectIds.copyOrNull(revision);\n }",
"public String getCurrentEntry() {\n if (entries.size() > 0) {\n int index = Math.round(offsetValue) % entries.size();\n return entries.get(index);\n }\n\n return null;\n }",
"public interface EditableProvider {\n\n Module getRootModule();\n\n /**\n * @return the type of the specified editable object, or null if it is not an editable object.\n */\n Type getTypeOfObject(Object objectInstance);\n\n}",
"public AdapterMapEditor getD_MapEditor() {\n return d_MapEditor;\n }",
"ImmutableList<SchemaOrgType> getEditorList();",
"@Override\n\tpublic long getChangesetEntryId() {\n\t\treturn _changesetEntry.getChangesetEntryId();\n\t}",
"public String getAsText() {\n\t\treturn mEditor.getText();\n\t}",
"public UserFunctionEditor getUserFunctionEditor() {\n return (UserFunctionEditor) functionEditor;\n }",
"public void correcto( Editor<Tipo> editor );",
"@Override\n\tpublic Editore getOneById(int id) {\n\t\treturn null;\n\t}"
] | [
"0.7127147",
"0.67674273",
"0.6492621",
"0.6382462",
"0.63730854",
"0.6159649",
"0.6093516",
"0.6028866",
"0.60180414",
"0.59560347",
"0.59560347",
"0.5906322",
"0.5896462",
"0.5884741",
"0.58688855",
"0.5866238",
"0.58499223",
"0.575714",
"0.5657488",
"0.5642413",
"0.56424004",
"0.56242055",
"0.5553717",
"0.5550888",
"0.5542881",
"0.55292445",
"0.54910076",
"0.5490875",
"0.54825646",
"0.5454955",
"0.5437182",
"0.54173565",
"0.54100597",
"0.5404036",
"0.5397064",
"0.5382895",
"0.5358102",
"0.53550214",
"0.534538",
"0.5324084",
"0.529428",
"0.52904403",
"0.52792853",
"0.52599007",
"0.5244402",
"0.52397114",
"0.5235709",
"0.52215195",
"0.5205677",
"0.52021646",
"0.5190522",
"0.518989",
"0.5170871",
"0.5129394",
"0.5092796",
"0.5062483",
"0.5058492",
"0.5050714",
"0.5039108",
"0.5036786",
"0.50346464",
"0.50243634",
"0.50183666",
"0.5007515",
"0.49856812",
"0.49853322",
"0.49571252",
"0.49549806",
"0.49472097",
"0.49366903",
"0.49330786",
"0.4923954",
"0.49217877",
"0.49132916",
"0.49095377",
"0.48801026",
"0.4874804",
"0.48740354",
"0.48732674",
"0.48684078",
"0.48621753",
"0.4846436",
"0.48447505",
"0.48353347",
"0.48337057",
"0.48279133",
"0.4822562",
"0.4819477",
"0.4817579",
"0.48141682",
"0.48110062",
"0.48015714",
"0.47618765",
"0.47566396",
"0.47540933",
"0.47533026",
"0.47524506",
"0.47474098",
"0.47450382",
"0.4738809"
] | 0.50464684 | 58 |
Returns an unbuffered input stream to read the last committed value, or null if no value has been committed. | public InputStream newInputStream(int index) throws IOException {
synchronized (DiskLruCache.this) {
if (entry.currentEditor != this) {
throw new IllegalStateException();
}
if (!entry.readable) {
return null;
}
return new FileInputStream(entry.getCleanFile(index));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public InputStream getStream() throws ValueFormatException,\n RepositoryException {\n return null;\n }",
"public synchronized Object \n read() \n throws PipeException \n {\n if (!connected) {\n throw new PipeException(\"Pipe not connected\");\n } else if (closedByReader) {\n throw new PipeException(\"Pipe closed\");\n } else if (writeSide != null && !writeSide.isAlive()\n\t && !closedByWriter && (in < 0)) {\n throw new PipeException(\"Write end dead\");\n }\n\n readSide = Thread.currentThread();\n int trials = 2;\n while (in < 0) {\n if (closedByWriter) { \n\t/* closed by writer, return EOF */\n\treturn null;\n }\n if ((writeSide != null) && (!writeSide.isAlive()) && (--trials < 0)) {\n\tthrow new PipeException(\"Pipe broken\");\n }\n /* might be a writer waiting */\n notifyAll();\n try {\n\twait(1000);\n } catch (InterruptedException ex) {\n\tthrow new PipeException(\"Interrupted pipe\");\n }\n }\n Object ret = buffer[out++];\n if (out >= buffer.length) {\n out = 0;\n }\n if (in == out) {\n /* now empty */\n in = -1;\t\t\n }\n return ret;\n }",
"@Override\n\tpublic T peek() {\n\t\treturn last.getValue();\n\t}",
"public synchronized final Object readObject() {\n\t\tif (!inQueue.isEmpty())\n\t\t\treturn inQueue.dequeue();\n\t\telse return null;\n\t}",
"public T getLast() {\n if (this.getSize() > 0) {\n return buffer[index];\n }\n return null;\n }",
"@Override\r\n\tpublic InputStream getInputStream() throws IOException {\n\t\treturn this.s.getInputStream();\r\n\t}",
"@Override\n\tpublic BufferedReader getReader() throws IOException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic BufferedReader getReader() throws IOException {\n\t\treturn null;\n\t}",
"public Storable readStorable() throws IOException {\n Storable storable;\n String s = readString();\n\n if (s.equals(\"NULL\"))\n return null;\n\n if (s.equals(\"REF\")) {\n int ref = readInt();\n return (Storable) retrieve(ref);\n }\n\n storable = (Storable) makeInstance(s);\n map(storable);\n storable.read(this);\n return storable;\n }",
"public BCPGInputStream getInputStream()\n {\n return in;\n }",
"@Override\n\t\tpublic BufferedReader getReader() throws IOException {\n\t\t\treturn null;\n\t\t}",
"public Reader getReader() {\n return in;\n }",
"public static <E> E last(Stream<E> stream) {\n E last = null;\n if (stream != null) for (E item : stream) { last = item; }\n return last;\n }",
"private InputStream getStream() throws IOException {\n if (delegatee == null) {\n try {\n delegatee = value.getStream();\n } catch (RepositoryException re) {\n throw (IOException) new IOException(re.getMessage()).initCause(re);\n }\n }\n return delegatee;\n }",
"public String lastOutput() throws IOException {\n stream.flush();\n os.flush();\n return os.asString();\n }",
"public Stream<T> getRemainingStream() {\n try (CloseableStreamIterator<T> self = this) {\n Stream<T> result = toStream(this.iterator)\n .onClose(this.stream::close);\n\n this.stream = null;\n this.iterator = null;\n\n return result;\n }\n }",
"Stream<In> getInputStream();",
"Object nextValue() throws IOException;",
"public Object peek() {\n\t\treturn get(getSize() - 1);\n\t}",
"@Override\n\tpublic SmCdr2 getCurrentValue() throws IOException, InterruptedException {\n\t\treturn null;\n\t}",
"public static BufferedOutputStream get(OutputStream out) {\n if(out == null || out instanceof BufferedOutputStream) {\n return (BufferedOutputStream)out;\n }\n return new BufferedOutputStream(out);\n }",
"@Override\r\n\tpublic E pollLast() {\n\t\treturn null;\r\n\t}",
"public E pollLast() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(data.size() - 1);\r\n\t\tdata.remove(data.size() - 1);\r\n\t\treturn ret;\r\n\t}",
"public synchronized String Readline() {\n\t return lines.poll();\n\t}",
"private String readLine() {\r\n\t\ttry {\r\n\t\t\treturn input.readLine();\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public abstract SeekInputStream getRawInput();",
"@Override\r\n public Object getBufferedFileInputStream(String name) {\n return null; \r\n }",
"synchronized public long peek() {\n return currValue;\n }",
"@Override\n\tpublic InputStream getInputStream() throws IOException {\n\t\treturn null;\n\t}",
"public String readLine() {\n if(in.hasNextLine()) {\n return in.nextLine();\n } else {\n // remote host closed connection!\n cleanup();\n return null;\n }\n }",
"public int read() throws IOException {\n if (closed) {\n throw new IOException(\"Stream is already closed\");\n }\n\n int inputByte = inputStream.read();\n if (inputByte == -1 && inputStream != originalInputStream) {\n // If we got EOF reading from buffer or file, switch to the original stream and get\n // the next byte from there instead\n if (readingFromBuffer) {\n readingFromBuffer = false;\n inputStream.close(); // Close the input byte stream\n } else {\n inputStream.close(); // Close the input file stream\n // start appending to the file\n storeOutputStream = new BufferedOutputStream(new FileOutputStream(storeFile, true));\n }\n // The original stream is now the current stream\n inputStream = originalInputStream;\n inputByte = inputStream.read();\n }\n\n if (inputByte != -1 && inputStream == originalInputStream) {\n // If not EOF and reading from original stream, save the bytes we read\n saveByte(inputByte);\n }\n\n return inputByte;\n }",
"@Override\n public int read() throws IOException {\n if (stream.available() > 0) {\n return stream.read();\n } else {\n layer.receiveMoreDataForHint(getHint());\n // either the stream is now filled, or we ran into a timeout\n // or the next stream is available\n return stream.read();\n }\n }",
"@Override\r\n\tpublic Text getCurrentValue() throws IOException, InterruptedException {\n\t\treturn this.value;\r\n\t}",
"public Stream stream() {\n Preconditions.checkState(prepared);\n Preconditions.checkState(!closed);\n return new Stream();\n }",
"public static InputStream nullInput() {\n if(nullIn == null) {\n nullIn = new NullInputStream();\n }\n return nullIn;\n }",
"public int read() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn -1;\n\n\t\tsynchronized (buffer) {\n\t\t\tint outgoing = buffer[bufferIndex++] & 0xff;\n\t\t\tif (bufferIndex == bufferLast) { // rewind\n\t\t\t\tbufferIndex = 0;\n\t\t\t\tbufferLast = 0;\n\t\t\t}\n\t\t\treturn outgoing;\n\t\t}\n\t}",
"public int read() throws IOException {\n if(available() == 0) throw new EOFException(\"No data available.\");\n int ret = data.getFirst().get();\n updateBufferList();\n return ret;\n }",
"public InputStream getOptionalData() throws StandardException;",
"public String readInput() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic E peekLast() {\n\t\treturn null;\r\n\t}",
"public <T> T readValue() {\n return readObject();\n }",
"protected String readLine()\n { try { if (stdin!=null) return stdin.readLine(); } catch (IOException e) {}\n return null;\n }",
"public int peek() {\n\t\tif(output.isEmpty()){\n\t\t\twhile(!input.isEmpty()){\n\t\t\t\toutput.push(input.pop());\n\t\t\t}\n\t\t}\n\t\treturn output.peek();\n\t}",
"public static String bufferScanner() throws IOException\n\t{\n\treturn br.readLine();\n\t}",
"private int readByReadWriteTransaction(Operation o, Variable v) {\n if (v.getTransactionIdToCommit() == o.getTransactionId()) {\n o.setValue(v.getValueToCommit());\n return v.getValueToCommit();\n } else {\n o.setValue(v.getLastCommittedValue());\n return v.getLastCommittedValue();\n }\n }",
"public InputStream getInputStream() {\n return _combinedInputStream;\n }",
"public static BufferedInputStream get(InputStream in) {\n if(in == null || in instanceof BufferedInputStream) {\n return (BufferedInputStream)in;\n }\n return new BufferedInputStream(in);\n }",
"public int read() throws IOException {\n int result = super.read();\n if(iMaxSet) {\n iRemainder--;\n } else {\n iRemainder = available();\n }\n return result;\n }",
"public final T getValue() {\n return this.getValue(this.getBuffer());\n }",
"public long readLong() {\n while (isEmpty()) {\n }\n Timing.waitSyncLocal();\n readEnable.setNow(1);\n Timing.waitClockLocal();\n return (readData.getLong());\n }",
"public final String readNextLine() throws IOException {\r\n String str;\r\n if (buf_end-buf_pos <= 0) {\r\n if (fillBuffer() < 0) {\r\n throw new IOException(\"Error filling buffer!\");\r\n }\r\n }\r\n int lineEnd = -1;\r\n for (int i = buf_pos; i < buf_end; i++) {\r\n if (buffer[i] == '\\n') {\r\n lineEnd = i;\r\n break;\r\n }\r\n }\r\n if (lineEnd < 0) {\r\n StringBuilder input = new StringBuilder(256);\r\n int c;\r\n while (((c = read()) != -1) && (c != '\\n')) {\r\n input.append((char)c);\r\n }\r\n if ((c == -1) && (input.length() == 0)) {\r\n return null;\r\n }\r\n return input.toString();\r\n }\r\n\r\n if (lineEnd > 0 && buffer[lineEnd-1] == '\\r') {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos -1);\r\n }\r\n else {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos);\r\n }\r\n buf_pos = lineEnd +1;\r\n return str;\r\n }",
"public InputStream getInputStream() throws IOException;",
"public InputStream getInputStream() throws IOException;",
"public Optional<TransactionHistory> readTransaction()\n {\n return null;\n }",
"public Object peek()\n {\n return queue.peekLast();\n }",
"InputStream getInputStream() throws IOException;",
"InputStream getInputStream() throws IOException;",
"InputStream getInputStream() throws IOException;",
"public E peek() throws FileQueueClosedException;",
"public InputStream getInputStream() throws IOException {\n return con.getInputStream();\n }",
"public Serializable read_value( InputStream is ){\r\n\t return is.read_value( new UtcTBase() );\r\n }",
"public E peek() {\n try {\n return b(1, (Long) null, (TimeUnit) null);\n } catch (InterruptedException unused) {\n return null;\n }\n }",
"String readLine() throws IOException\n\t{\n\t\tString line = null;\n\t\tif (haveStreams())\n\t\t\tline = m_in.readLine();\n\t\telse\n\t\t\tline = keyboardReadLine();\n\n\t\tsetCurrentLine(line);\n\t\treturn line;\n\t}",
"public Result getCurrentValue() throws IOException, InterruptedException {\n return value;\n }",
"public default InputStream getBinaryStream() throws JdbxException\n\t{\n\t\treturn get(GetAccessors.BINARYTREAM);\n\t}",
"public int last() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn -1;\n\t\tsynchronized (buffer) {\n\t\t\tint outgoing = buffer[bufferLast - 1];\n\t\t\tbufferIndex = 0;\n\t\t\tbufferLast = 0;\n\t\t\treturn outgoing;\n\t\t}\n\t}",
"private ObjectInputStream getInputStream() {\n\t\t// retornamos el stream de entrada\n\t\treturn this.inputStream;\n\t}",
"private int getInput() {\n final boolean debug = false;\n int toRead;\n int result;\n int nread;\n\n // if (checkForDeadChannel()) return EINVAL;\n\n // Skipped pushback processing code for stacked Channels\n\n\n // See if we can fill an existing buffer. If we can, read only\n // as much as will fit in it. Otherwise allocate a new buffer,\n // add it to the input queue and attempt to fill it to the max.\n\n ChannelBuffer buf = inQueueTail;\n\n if ((buf != null) && (buf.nextAdded < buf.bufLength)) {\n if (debug) {\n System.out.println(\"smaller than buffer\");\n }\n toRead = buf.bufLength - buf.nextAdded;\n\t} else {\n if (debug) {\n System.out.println(\"fits in existing buffer\");\n }\n\n buf = saveInBuf;\n saveInBuf = null;\n\n // Check the actual buffersize against the requested\n // buffersize. Buffers which are smaller than requested are\n // squashed. This is done to honor dynamic changes of the\n // buffersize made by the user.\n\n if ((buf != null) && ((buf.bufLength - buf.BUFFER_PADDING) < bufSize)) {\n buf = null;\n }\n if (buf == null) {\n if (debug) {\n System.out.println(\"allocated ChannelBuffer of size \" + bufSize);\n }\n buf = new ChannelBuffer(bufSize);\n }\n buf.next = null;\n\n // Use the actual size of the buffer to determine\n // the number of bytes to read from the channel and not the\n // size for new buffers. They can be different if the\n // buffersize was changed between reads.\n\n toRead = buf.bufLength - buf.nextAdded;\n if (debug) {\n System.out.println(\"toRead set to \" + toRead);\n }\n\n if (inQueueTail == null) {\n inQueueHead = buf;\n } else {\n inQueueTail.next = buf;\n }\n\n inQueueTail = buf;\n }\n\n // If EOF is set, we should avoid calling the driver because on some\n // platforms it is impossible to read from a device after EOF.\n\n if (eofCond) {\n if (debug) {\n System.out.println(\"eofCond was true, no error return\");\n }\n return 0;\n }\n\n // FIXME: We do not handle non-blocking or this CHANNEL_TIMER_FEV flag yet\n\n if (/*CHANNEL_TIMER_FEV &&*/\n !blocking) {\n return TclPosixException.EWOULDBLOCK;\n } else {\n result = 0;\n\n // Can we even use this for a brain-dead nonblocking IO check?\n int numAvailable = /*input.available();*/ 0;\n\n if (!blocking && (numAvailable < toRead)) {\n result = TclPosixException.EWOULDBLOCK;\n nread = -1;\n } else {\n try {\n if (debug) {\n System.out.println(\"now to read \" + toRead + \" bytes\");\n }\n\n nread = input.read(buf.buf, buf.nextAdded, toRead);\n\n // read() returns -1 on EOF\n if (nread == -1) {\n if (debug) {\n System.out.println(\"got EOF from read() call\");\n }\n nread = 0;\n }\n } catch (IOException ex) {\n // FIXME: How do we recover from IO errors here?\n // I think we need to set result to a POSIX error\n ex.printStackTrace(System.err);\n nread = -1;\n }\n }\n }\n\n if (nread > 0) {\n if (debug) {\n System.out.println(\"nread is \" + nread);\n }\n buf.nextAdded += nread;\n\n // should avoid calling the driver because on some platforms we\n // will block in the low level reading code even though the\n // channel is set into nonblocking mode.\n\n if (nread < toRead) {\n blocked = true;\n }\n } else if (nread == 0) {\n eofCond = true;\n encodingEnd = true;\n if (debug) {\n System.out.println(\"nread is zero, eofCond set, encodingEnd set\");\n }\n } else if (nread < 0) {\n if (debug) {\n System.out.println(\"nread is \" + nread);\n }\n if ((result == TclPosixException.EWOULDBLOCK) ||\n (result == TclPosixException.EAGAIN)) {\n blocked = true;\n\t result = TclPosixException.EAGAIN;\n\t }\n // FIXME: Called needs to raise a TclException\n //Tcl_SetErrno(result);\n return result;\n }\n if (debug) {\n System.out.println(\"no error return\");\n }\n return 0;\n }",
"public process get_last() {\n\t\treturn queue.getLast();\n\t}",
"public final UnitOfWork getNext() throws IOException {\n UnitOfWork result = null;\n\n synchronized (addedFrontWork) {\n if (addedFrontWork.size() > 0) {\n result = addedFrontWork.removeFirst();\n }\n }\n\n if (result == null) {\n result = doGetNext();\n\n if (result == null) {\n synchronized (addedBackWork) {\n if (addedBackWork.size() > 0) {\n result = addedBackWork.removeFirst();\n }\n }\n }\n }\n\n if (result != null && result.getWorkStatus() == WorkStatus.ALL_DONE) {\n sawAllDone.set(true);\n }\n\n return result;\n }",
"public String getOutput() {\r\n return innerStream.getString();\r\n }",
"public T peek() {\r\n return get(size() - 1);\r\n\t}",
"public InputStream getIn() {\n\t\treturn proc.getInputStream();\n\t}",
"public int read() throws IOException {\n if (!_open)\n return -1;\n long _here = position();\n int val = _backing.read();\n if (val >= 0) {\n val = _head.crypt((byte) val, _here);\n }\n return val;\n }",
"public InputStreamReader getStreamReader() {\n return streamReader;\n }",
"public FixedBitSet getLastValue() {\n return value;\n }",
"public long readLongNonBlock() {\n Timing.throughputLocal(0);\n readEnable.setNow(1);\n Timing.waitClockLocal();\n return (readData.getLong());\n }",
"public T read() throws IOException;",
"public Order readLatest() {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();\r\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT o.customer_id, oi.order_id, \"\r\n\t\t\t\t\t\t+ \"GROUP_CONCAT(i.item_id, ',', i.name, ',', i.value, ',', oi.quantity SEPARATOR ';') items \"\r\n\t\t\t\t\t\t+ \"FROM orders o \"\r\n\t\t\t\t\t\t+ \"INNER JOIN orders_items oi \"\r\n\t\t\t\t\t\t+ \"ON o.order_id = oi.order_id \"\r\n\t\t\t\t\t\t+ \"INNER JOIN items i \"\r\n\t\t\t\t\t\t+ \"ON oi.item_id = i.item_id \"\r\n\t\t\t\t\t\t+ \"GROUP BY oi.order_id \"\r\n\t\t\t\t\t\t+ \"ORDER BY o.order_id DESC LIMIT 1\");) {\r\n\t\t\tresultSet.next();\r\n\t\t\treturn modelFromResultSet(resultSet);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public E peekLast();",
"public O last()\r\n {\r\n if (isEmpty()) return null;\r\n return last.getObject();\r\n }",
"public final PrintStream getInputStream() {\n return inputStream;\n }",
"public ValueType peek() {\r\n // TODO\r\n return null;\r\n }",
"public IOBuffer getIOBuffer() {\n\t\treturn iOBuffer;\n\t}",
"public InputStream getStream();",
"public LoggedDataInputStream getInputStream() {\n return inputStream;\n }",
"public Object read() throws IOException {\n int code = 1;\n try {\n code = in.readUnsignedByte();\n } catch (EOFException eof) {\n return null;\n }\n if (code == Type.BYTES.code) {\n return new Buffer(readBytes());\n } else if (code == Type.BYTE.code) {\n return readByte();\n } else if (code == Type.BOOL.code) {\n return readBool();\n } else if (code == Type.INT.code) {\n return readInt();\n } else if (code == Type.LONG.code) {\n return readLong();\n } else if (code == Type.FLOAT.code) {\n return readFloat();\n } else if (code == Type.DOUBLE.code) {\n return readDouble();\n } else if (code == Type.STRING.code) {\n return readString();\n } else if (code == Type.VECTOR.code) {\n return readVector();\n } else if (code == Type.LIST.code) {\n return readList();\n } else if (code == Type.MAP.code) {\n return readMap();\n } else if (code == Type.MARKER.code) {\n return null;\n } else if (50 <= code && code <= 200) { // application-specific typecodes\n return new Buffer(readBytes());\n } else {\n throw new RuntimeException(\"unknown type\");\n }\n }",
"public long readLong() throws IOException {\n return in.readLong();\n }",
"private static synchronized long pop() throws IOException {\n\t\tString id = null;\n\n\t\t// check unfinished first\n\t\tif (!unfinished_queue.isEmpty())\n\t\t\treturn unfinished_queue.poll();\n\n\t\tid = queueReader.readLine();\n\n\t\tif (id == null)\n\t\t\treturn -1;\n\n\t\treturn new Long(id);\n\t}",
"public String peek()\n\t{\n\t\tString firstVal;\n\t\tfirstVal = q.peekFirst();\n\t\treturn firstVal;\n\t}",
"OutputStream getStdin();",
"Object readValue();",
"public abstract VALUEIN getCurrentValue() throws IOException, \n InterruptedException;",
"public String ReadLine(int maxBlockingTime) {\n\tlong startTime = System.currentTimeMillis();\n\twhile (System.currentTimeMillis() - startTime < maxBlockingTime) {\n\t String s = ReadLine();\n\t if (s != null) {\n\t\treturn s;\n\t }\n\t try {Thread.sleep(10); } catch (Exception e) { }\n\t}\n\treturn null;\n }",
"public float getVal() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 8);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 8);\n\t\t}\n\t}",
"public T peek()\n {\n if (isEmpty())\n return null;\n \n return first.getData();\n }",
"public E poll() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(0);\r\n\t\tdata.remove(0);\r\n\t\treturn ret;\r\n\t}",
"public T peek()\n {\n\n if (ll.getSize()==0){\n return null;\n }else\n return ll.getData(ll.getSize()-1);\n }",
"public InputStream getInputStream();",
"public InputStream getInputStream();",
"public synchronized OutputStream getOutputStream() throws IOException, InterruptedException {\n/* 112 */ while (this.outputStream == null) {\n/* */ \n/* 114 */ checkTimeout();\n/* 115 */ wait(1000L);\n/* */ } \n/* */ \n/* 118 */ return this.outputStream;\n/* */ }"
] | [
"0.56349325",
"0.529443",
"0.51824003",
"0.5133739",
"0.513344",
"0.5078014",
"0.50581294",
"0.50581294",
"0.50448257",
"0.5028552",
"0.5011505",
"0.5009704",
"0.5005368",
"0.49971822",
"0.49910283",
"0.49832138",
"0.49730796",
"0.49570617",
"0.4949065",
"0.49458084",
"0.49437976",
"0.49337256",
"0.49265334",
"0.4914932",
"0.4911025",
"0.49023163",
"0.48975265",
"0.48973197",
"0.48954514",
"0.48734686",
"0.48545155",
"0.48499897",
"0.48416156",
"0.48305696",
"0.48254773",
"0.4806115",
"0.48021242",
"0.4800592",
"0.4794065",
"0.4780718",
"0.47706643",
"0.4759246",
"0.47401145",
"0.473863",
"0.47330534",
"0.47250345",
"0.47207394",
"0.47128442",
"0.47100246",
"0.47082824",
"0.4708155",
"0.47033417",
"0.47033417",
"0.4684652",
"0.46839467",
"0.46837106",
"0.46837106",
"0.46837106",
"0.46737257",
"0.46715024",
"0.4671387",
"0.46696842",
"0.46659896",
"0.4648431",
"0.46327174",
"0.46319234",
"0.46302608",
"0.46249497",
"0.46247527",
"0.46246773",
"0.46182013",
"0.46141055",
"0.46090785",
"0.4594763",
"0.45893425",
"0.45855722",
"0.45838064",
"0.45804334",
"0.4572826",
"0.45726144",
"0.45681477",
"0.45537898",
"0.45501715",
"0.45481595",
"0.45471543",
"0.45455524",
"0.45446235",
"0.45338172",
"0.4528818",
"0.45286104",
"0.45267257",
"0.45259246",
"0.45255002",
"0.45208025",
"0.4520183",
"0.4513562",
"0.45076102",
"0.45046496",
"0.45045125",
"0.45045125",
"0.45028037"
] | 0.0 | -1 |
Returns the last committed value as a string, or null if no value has been committed. | public String getString(int index) throws IOException {
InputStream in = newInputStream(index);
return in != null ? inputStreamToString(in) : null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLastCommit() {\n return getCellContent(LAST_COMMIT);\n }",
"public String getLastReleaseValue() {\n \treturn resolver.getLastReleaseValue();\n }",
"public String getLastOperation()\n {\n if (!getCvpOperation().isNull())\n {\n com.sybase.afx.json.JsonObject cvpOperation = (com.sybase.afx.json.JsonObject)(com.sybase.afx.json.JsonReader.parse(__cvpOperation.getValue()));\n return (String)cvpOperation.get(\"cvp_name\");\n }\n if (getPendingChange() == 'C')\n {\n }\n else if (getPendingChange() == 'D')\n {\n }\n else if (getPendingChange() == 'U')\n {\n }\n return null;\n }",
"public String getLastC() {\n\t\treturn lastFieldC.getText();\n\t}",
"public String getLastChange() {\n return lastChange;\n }",
"public RTWValue lastAsValue();",
"public String getValueAsString() {\n return value == null ? StringUtils.EMPTY : value.toString();\n }",
"public String getStringValue() {\n if (getValueIndex() <= 0)\n return null;\n return ((StringEntry) getPool().getEntry(getValueIndex())).\n getStringEntry().getValue();\n }",
"public String getSaveString() {\n return \"\" + Value;\n }",
"String getCurrentValue();",
"public String getLastUpdatedString() {\n return lastUpdated.toString();\n }",
"private Data getLastCommitData(int varIndex) {\n List<Data> dataList = _dataMap.get(varIndex);\n return dataList.get(dataList.size() - 1);\n }",
"public String getLastP() {\n\t\treturn lastFieldP.getText();\n\t}",
"public String getString() {\r\n\t\tString s = value.getString();\r\n\t\t// System.out.println(\"Getting string of: \" + s);\r\n\t\tif (s == null)\r\n\t\t\treturn (s);\r\n\t\treturn (substitution(s));\r\n\t}",
"public O last()\r\n {\r\n if (isEmpty()) return null;\r\n return last.getObject();\r\n }",
"public String getString() { \n return new BigInteger(this.value).toString();\n }",
"public V getLastValue()\n\t{\n\t\tV amount = null;\n\t\tfinal Entry< Double, V > entry = getLastEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\tamount = entry.getElement();\n\t\t}\n\t\treturn amount;\n\t}",
"public String getStringValue() {\n if (value == null) return null;\n PropertyEditor propertyEditor = PropertyEditors.getEditor(clazz);\n propertyEditor.setValue(value);\n return propertyEditor.getAsText();\n }",
"@Override\n public String tail() {\n String str = null;\n if (!isEmpty()) {\n str = tail.getValue();\n }\n return str;\n }",
"public final String get() {\n return null;\n }",
"public String getValue() {\n\t return valueS != null ? valueS : value+\"\";\n\t }",
"public String getStringValue()\n {\n return this.getValue();\n }",
"public String value() {\n\t\treturn null;\r\n\t}",
"public T getLast(){\n\treturn _end.getCargo();\n }",
"static String getLastCheckpointAsString() {\n HashMap<String, String> checkpoint = getLastCheckpoint();\n if (checkpoint == null) {\n return \"0 \";\n } else {\n StringBuilder sb = new StringBuilder();\n sb.append(checkpoint.size()).append(\" \");\n for (String name : checkpoint.keySet()) {\n sb.append(name).append(\"#####\");\n sb.append(checkpoint.get(name)).append(\"#####\");\n }\n return sb.toString();\n }\n }",
"public String getLastMsg() {\n String s = msgs.peekTail();\n return s == null ? \"\" : s;\n }",
"@Override\n\tpublic String getString() {\n\t\treturn value;\n\t}",
"public java.lang.String getValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VALUE$12);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public String getCurrent() {\n\t\t\tString result=\"\";\n\t\t\treturn result ;\n\t\t}",
"public T getLast() {\n if (this.getSize() > 0) {\n return buffer[index];\n }\n return null;\n }",
"public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}",
"public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}",
"public String getLast()\n {\n return lastItem;\n }",
"public String toStr() {\r\n return value.toString();\r\n }",
"public String getStringValue() {\n\t\treturn rawValue;\n\t}",
"public String getLastLogged()\n {\n return lastLogged;\n }",
"public String back()\n {\n\treturn tail.value;\n }",
"public String getValue() {\n return String.valueOf(value);\n }",
"public String retrieve() {\n\t\t// TODO Write me!\n\t\t\n\t\treturn null;\n\t}",
"private String getNullValueText() {\n return getNull();\n }",
"public String getLastMessage() {\n return lastMessage;\n }",
"private static String getValue(Object o) {\n if (o != null) {\n return o.toString();\n }\n return \"null\";\n }",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getValue() {\n\t\treturn null;\r\n\t}",
"protected String getValueOfColumnLastUpdateUser() {\n return SessionContext.open().getUid();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn getValue() != null ? getValue().toString() : \"null\";\n\t}",
"public String getValue() {\n\t\tString value;\n\t\ttry {\n\t\t\tvalue = this.getString(\"value\");\n\t\t} catch (Exception e) {\n\t\t\tvalue = null;\n\t\t}\n\t\treturn value;\n\t}",
"@Override\r\n public String toString() {\r\n return (value == null) ? \"\" : value;\r\n }",
"public String getUpdated() {\n if(updated == null)\n return \"\";\n return updated.toString();\n }",
"String getValue()\n {\n return value.toString();\n }",
"public String getLastReport()\n {\n return null;\n }",
"public int getLastSavedId() {\n\t\tNativeQuery query = session.createNativeQuery(\"SELECT Id FROM terms ORDER BY Id DESC LIMIT 1\");\n\t\t// int lastUpdatedValue=(int)query;\n\t\tint lastUpdatedValue = ((Number) query.getSingleResult()).intValue();\n\t\tSystem.out.println(\"the result is\" + lastUpdatedValue);\n\t\treturn lastUpdatedValue;\n\t}",
"public String getStringValue() {\n return box.getFormat().format(box, box.getValue());\n }",
"Commit getCurrentCommit() {\n String branchh = null;\n Commit prev = null;\n File currentB = new File(\".gitlet/current\");\n for (File file: currentB.listFiles()) {\n branchh = file.getName();\n }\n return deserializeCommit(\".gitlet/heads/\" + branchh);\n }",
"public FixedBitSet getLastValue() {\n return value;\n }",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getValue() {\n\t\treturn null;\n\t}",
"public String getLastMove() {\n\t\treturn lastMove;\r\n\t}",
"public String getLastUpdateString() {\r\n return getLastUpdateString(lastUpdatedTime);\r\n }",
"@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}",
"public String lastOutput() throws IOException {\n stream.flush();\n os.flush();\n return os.asString();\n }",
"public java.lang.String getValue() {\n java.lang.Object ref = value_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n value_ = s;\n }\n return s;\n }\n }",
"public String getValue() {\n Object ref = value_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n value_ = s;\n return s;\n }\n }",
"public String getValue() {\n Object ref = value_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n value_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public java.lang.String getValue() {\n java.lang.Object ref = value_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n value_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getValue() {\n java.lang.Object ref = value_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n value_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getValue() {\n java.lang.Object ref = value_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n value_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getValue() {\n java.lang.Object ref = value_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n value_ = s;\n return s;\n }\n }",
"public T getLast() {\n\t\t//return the data in the last node\n\t\treturn getLastNode().getData();\n\t}",
"public String getLastUpdated() {\n return lastUpdated;\n }",
"public java.lang.String getValue() {\n java.lang.Object ref = value_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n value_ = s;\n return s;\n }\n }",
"public java.lang.String getValue() {\n java.lang.Object ref = value_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n value_ = s;\n return s;\n }\n }",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n optionalValue_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getValue() {\n java.lang.Object ref = value_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n value_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n optionalValue_ = s;\n }\n return s;\n }\n }",
"public String valueInCurrentSlot() {\n return this.innerProperties() == null ? null : this.innerProperties().valueInCurrentSlot();\n }",
"public String getLastUpdate() {\n return lastUpdate;\n }",
"public String getVal() {\n Object ref = val_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n val_ = s;\n }\n return s;\n }\n }",
"@Column (name=\"LAST_EDITOR\")\r\n\tpublic String getLastEditor() {\r\n\t\treturn lastEditor;\r\n\t}",
"public String getLastText() {\n\t\treturn lastText;\n\t}",
"public java.lang.CharSequence getUnionString() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }",
"public String getLastCommand() {\n return lastCommand;\n }",
"public java.lang.String getValue() {\n return value;\n }",
"@Override\r\n\tpublic E getLast() {\n\t\treturn null;\r\n\t}",
"public String NullSave()\n {\n return \"null\";\n }",
"@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}",
"public Move lastCommittedMove() {return lastCommittedMove; }",
"public String getValue() {\n\t\treturn value.replace(\"\\\\r\\\\n\", \"\\r\\n\");\n\t}",
"@Override\n public String getValue() {\n return this.value.toString();\n }",
"public String value()\n {\n return value;\n }",
"public String max()\r\n\t {\r\n\t\t if(this.max != null)\r\n\t\t {\r\n\t\t\t return this.max.getValue(); \r\n\t\t }\r\n\t\t return null;\r\n\t }",
"public String getVal() {\n Object ref = val_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n val_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }",
"public T getLast() {\n return this.getHelper(this.indexCorrespondingToTheLatestElement).data;\n }",
"public String toString() {\n\t\treturn String.valueOf(this.currentValue);\n\t}",
"public CFString value() {\n return lazyGlobalValue.value();\n }",
"@Override\n\tpublic String get() {\n\t\treturn null;\n\t}",
"public char lastChar() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn (char) (-1);\n\t\treturn (char) last();\n\t}",
"public String getLastCell() {\n\t\treturn lastCell;\n\t}",
"public static String getGitTimestamp() {\n return StringUtils.defaultIfEmpty(gitProperties.getProperty(GIT_PROPERTIES_COMMIT_TS_KEY),\n StringUtils.EMPTY);\n }"
] | [
"0.692228",
"0.66395646",
"0.6457605",
"0.6320048",
"0.6216864",
"0.61954564",
"0.6169907",
"0.61368006",
"0.609998",
"0.6096557",
"0.60634184",
"0.5949371",
"0.58984196",
"0.58883935",
"0.5886832",
"0.58703583",
"0.58673316",
"0.5858014",
"0.58333844",
"0.5829411",
"0.5746389",
"0.57402366",
"0.57294685",
"0.5728722",
"0.5721418",
"0.5717596",
"0.57146025",
"0.571457",
"0.57046443",
"0.5702454",
"0.5690765",
"0.5690765",
"0.56871456",
"0.56869507",
"0.568207",
"0.5680344",
"0.5677667",
"0.5675155",
"0.5667916",
"0.5654093",
"0.56502134",
"0.5643584",
"0.5634219",
"0.5634219",
"0.5634219",
"0.5633696",
"0.5632986",
"0.563022",
"0.56278425",
"0.56191367",
"0.5618659",
"0.5597333",
"0.5594076",
"0.559026",
"0.5588475",
"0.558775",
"0.5573441",
"0.5573441",
"0.5573441",
"0.55729085",
"0.5571107",
"0.5570746",
"0.556777",
"0.55592453",
"0.5550764",
"0.5548483",
"0.5545635",
"0.5544886",
"0.55383486",
"0.5531907",
"0.5529389",
"0.5526404",
"0.5514498",
"0.551339",
"0.5506391",
"0.5497221",
"0.5494811",
"0.54882354",
"0.5488193",
"0.5477635",
"0.5475913",
"0.5472312",
"0.546826",
"0.5466994",
"0.54668397",
"0.546324",
"0.54620755",
"0.54612345",
"0.5451699",
"0.54486954",
"0.5448161",
"0.5446009",
"0.54387975",
"0.54370356",
"0.5433697",
"0.54336363",
"0.54308426",
"0.54302377",
"0.5425607",
"0.54217964",
"0.54139787"
] | 0.0 | -1 |
Commits this edit so it is visible to readers. This releases the edit lock so another edit may be started on the same key. | public void commit() throws IOException {
if (hasErrors) {
completeEdit(this, false);
remove(entry.key); // the previous entry is stale
} else {
completeEdit(this, true);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void commit() {\n doCommit();\n }",
"public void commit() {\n\t\tcommitted = true;\n\t}",
"public void commit() {\n tryCommit(true);\n }",
"public void commit () throws IOException {\n log.info(\"Internal committing index ... \");\n this.writer().commit();\n commitCounter = 0;\n this.closeReader();\n }",
"@Override\n\tpublic void commitCalendar(CalendarEdit edit) {\n\t\t\n\t}",
"@Override\n public void commit() throws IOException {\n if (!committed && currentFile != null) {\n long pos = currentFile.getLineReadPos();\n currentFile.setPos(pos);\n currentFile.setLastUpdated(updateTime);\n committed = true;\n }\n }",
"public Document commitEditableInstance()\n throws WorkflowException, MappingException, RepositoryException, RemoteException;",
"public void commit() {\n }",
"public void commitWriter () {\n try {\n writer.commit();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"protected void commit() {\n \t\t\tif (fStart < 0) {\n \t\t\t\tif (fDocumentUndoManager.fFoldingIntoCompoundChange) {\n \t\t\t\t\tfDocumentUndoManager.fCurrent= createCurrent();\n \t\t\t\t} else {\n \t\t\t\t\treinitialize();\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tupdateTextChange();\n \t\t\t\tfDocumentUndoManager.fCurrent= createCurrent();\n \t\t\t}\n \t\t\tfDocumentUndoManager.resetProcessChangeState();\n \t\t}",
"@Override\n protected void commitView(ViewImpl view)\n {\n boolean oldValue = view.setAllowHiddenEntities( true );\n\n ObjectInstance oi = view.getObjectInstance();\n\n // TODO: implement optimistic locking check.\n\n EntityInstanceImpl lastEntityInstance = oi.getLastEntityInstance();\n\n commitExcludes( view, oi, lastEntityInstance );\n commitDeletes( view, oi, lastEntityInstance );\n commitIncludes( view, oi );\n commitUpdates( view, oi );\n\n view.setAllowHiddenEntities( oldValue );\n }",
"void commit() {\n }",
"@Override\n public void commit() {\n }",
"public GlBuffer commit(){\n return commit(true);\n }",
"@Override\n\tpublic void commit() {\n\n\t}",
"public void commit();",
"public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}",
"public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}",
"public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}",
"public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}",
"public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}",
"public void commit() {\n\t\tcommitted = true;\n\t\tbackUp();\n\t\t//back up the current board info at the meanwhile\n\t}",
"public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"@Override\n\tpublic int commit() {\n\t\treturn 0;\n\t}",
"public void commit(int tid) {\n List<Lock> lockList = null;\n\n // check wheter there is read-only transaction running\n boolean hasRO = _tm.hasRunningReadonly();\n for (Integer varIndex : _lockTable.keySet()) {\n lockList = _lockTable.get(varIndex);\n int size = lockList.size();\n for (int i = size - 1; i >= 0; i--) {\n Lock lc = lockList.get(i);\n if (lc.getTranId() == tid) {\n\n // If the lock type is write, means this transaction writes a variable\n // in uncommitDataMap\n if (lc.getType() == Lock.Type.WRITE) {\n if (_uncommitDataMap.containsKey(varIndex)) {\n List<Data> dataList = _dataMap.get(varIndex);\n Data d = _uncommitDataMap.get(varIndex);\n d.setCommitTime(_tm.getCurrentTime());\n\n // If no read-only transaction, replace the old version\n if (!hasRO) {\n dataList.clear();\n }\n dataList.add(d);\n _uncommitDataMap.remove(varIndex);\n }\n }\n lockList.remove(i);\n break;\n }\n }\n }\n // remove this transaction from accessed list\n _accessedTransactions.remove(tid);\n }",
"public Editor edit() throws IOException {\n\t\t\treturn DiskLruCache.this.edit(key, sequenceNumber);\n\t\t}",
"@Override\n\tpublic void commitInmate(InmateData inmate) {\n\t\t\n\t}",
"public void commit() {\n if( dirty ) {\n value = textField.getText();\n notifyTextValueChanged();\n }\n dirty = false;\n }",
"protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\t}",
"void committed() {\n\t\t\tfor (Entry<Integer, Object> entry : newData.entrySet())\n\t\t\t\toriginalData.put(entry.getKey(), entry.getValue());\n\t\t\treset();\n\t\t\taction = RowAction.UPDATE;\n\t\t}",
"private void commitEdit (int validValue)\r\n\t{\r\n\t\tm_value = validValue;\r\n\t}",
"void commit();",
"void commit();",
"public void commit(){\n \n }",
"public synchronized void commit(int trxnId)\n {\n ResourceManager rm;\n for (Enumeration e = transactionTouch.keys(); e.hasMoreElements();) {\n rm = (ResourceManager)e.nextElement();\n try {\n rm.commit(trxnId);\n } catch (Exception x)\n {\n System.out.println(\"EXCEPTION:\");\n System.out.println(x.getMessage());\n x.printStackTrace();\n }\n }\n transactionTouch.remove(trxnId);\n lm.UnlockAll(trxnId);\n }",
"R commit(C change);",
"void commit() throws CommitException;",
"public void commit() throws ResourceException;",
"public void commit(Writer output) throws IOException {\n postData(new StringReader(\"<commit/>\"), output);\n }",
"boolean commitEntryMemTableFlush() throws IOException;",
"public void commit() throws IOException {\n this.snapLog.commit();\n }",
"private void commitAction(int buttonID){\n if (buttonID == R.id.buttonDEL) {\n if (inputConn != null)\n inputConn.deleteSurroundingText(1, 0);\n } else if (buttonID == R.id.buttonSHIFT) {\n toggleCase();\n }\n else if (buttonID == R.id.buttonALT){\n toggleAlt();\n }\n else if(buttonID == R.id.buttonSPACE) {\n if (inputConn != null)\n inputConn.commitText(\" \",1);\n }\n else if(buttonID == R.id.buttonENTER) {\n if (inputConn != null)\n inputConn.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER));\n inputConn.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_ENTER));\n }\n\n }",
"public abstract void commit();",
"private void commit() {\n if (vote != Vote.COMMIT) {\n throw new IllegalStateException(\"Cannot commit transaction with vote: \" + vote);\n }\n\n for (ObjectVersion<V> objectVersion : objectVersions.values()) {\n objectVersion.commit();\n }\n }",
"public void commitChanges()\n {\n }",
"public void commitTransaction(TransID tid) \n throws IOException, IllegalArgumentException{// Not yet complete\n\t try {\n\t\t ADisk_lock.lock();\n\t\t // Call commit\n\t\t atranslist.get(tid).commit();\n\t\t Transaction temp = atranslist.remove(tid);\n\t\t wblist.addCommitted(temp);\t \n\t }\n\t finally{\n\t\t ADisk_lock.unlock();\n\t }\n }",
"void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }",
"public synchronized void writeCommit(Transaction t) {\n\t\tflush();\n\t\tpw.println(t.transactionId() + \" commit\");\t\n\t\tflush();\n\t}",
"public void putDocumentAfterEdit() {\r\n\t\tif(pointer < strategy.getEntireHistory().size()-1) {\r\n\t\t\tstrategy.putVersion(currentDocument);\r\n\t\t}\r\n\t}",
"public UpdateResponse commit(boolean waitFlush, boolean waitSearcher, boolean softCommit) throws SolrServerException, IOException {\n return new UpdateRequest().setAction(UpdateRequest.ACTION.COMMIT, waitFlush, waitSearcher, softCommit).process( this );\n }",
"public final void setOnEditCommit(EventHandler<ListView.EditEvent<T>> value) {\n\n this.getWrappedControl().setOnEditCommit(value);\n }",
"public void commitEntity();",
"void commit() throws StorageException, ValidationException, KeyValueStoreException;",
"@Override\n\tpublic void commit(boolean onSave) {\n\t\tsuper.commit(onSave);\n\t}",
"public void commit() throws IOException, InterruptedException, InvalidLoadOptionException {\n if (filterColumnToValueMappingForDelete.size() != 0) {\n closeDelete();\n }\n if (filterColumnToValueMappingForUpdate.size() != 0 && !ifRowsDeleted()) {\n closeUpdate();\n }\n }",
"@Override\n\tpublic void commitLogFor(Model reference) {\n\t\t\n\t\treference.commitRedo();\n\t}",
"@Override\r\n\tpublic void flushEntry(String key) {\n\t\t\r\n\t}",
"void commit() throws InterruptedException;",
"protected boolean attemptCommit() {\n \t\t\tpretendCommit();\n \t\t\tif (isValid()) {\n \t\t\t\tfDocumentUndoManager.commit();\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\treturn false;\n \t\t}",
"void commit() {\n historySegments.clear();\n currentSegment.clear();\n }",
"protected void pretendCommit() {\n \t\t\tif (fStart > -1) {\n \t\t\t\tfText= fDocumentUndoManager.fTextBuffer.toString();\n \t\t\t\tfPreservedText= fDocumentUndoManager.fPreservedTextBuffer.toString();\n \t\t\t}\n \t\t}",
"public void closeEntry() throws IOException {\n\t\tif ( this.assemLen > 0 ) {\n\t\t\tfor ( int i = this.assemLen ; i < this.assemBuf.length ; ++i )\n\t\t\t\tthis.assemBuf[i] = 0;\n\t\t\tthis.buffer.writeRecord( this.assemBuf );\n\t\t\tthis.currBytes += this.assemLen;\n\t\t\tthis.assemLen = 0;\n\t\t\t}\n\t\tif ( this.currBytes < this.currSize )\n\t\t\tthrow new IOException ( \"entry closed at '\" + this.currBytes + \"' before the '\" + this.currSize\n + \"' bytes specified in the header were written\" );\n\t\t}",
"public static void commit(Commit proposal)\n {\n logger.debug(\"committing {}\", proposal);\n RowMutation rm = proposal.makeMutation();\n Table.open(rm.getTable()).apply(rm, true);\n\n synchronized (lockFor(proposal.key))\n {\n PaxosState state = SystemTable.loadPaxosState(proposal.key, proposal.update.metadata());\n SystemTable.savePaxosCommit(proposal, !state.inProgressCommit.isAfter(proposal));\n }\n }",
"public UpdateResponse commit(boolean waitFlush, boolean waitSearcher) throws SolrServerException, IOException {\n return new UpdateRequest().setAction(UpdateRequest.ACTION.COMMIT, waitFlush, waitSearcher).process( this );\n }",
"public synchronized void setCommitted(CommitInfo info) {\n\t\t// We can't be committed twice.\n\t\tAssert.assertTrue(null == _commitInfo);\n\t\t// The commit offset must be a positive number.\n\t\tAssert.assertTrue(info.intentionOffset > 0L);\n\t\t\n\t\t_commitInfo = info;\n\t\tthis.notifyAll();\n\t}",
"public void commit() {\n\t\tif (commit) {\n\t\t\t// Récupérer le path du JSON\n\t\t\tSystem.out.println(ClassLoader.getSystemResource(jsonFile));\n\t\t\tURL url = ClassLoader.getSystemResource(jsonFile);\n\t\t\t// On ouvre un flux d'écriture vers le fichier JSON\n\t\t\ttry (OutputStream ops = new FileOutputStream(Paths.get(url.toURI()).toFile())) {\n\t\t\t\t// Ecriture du fichier JSON avec formatage\n\t\t\t\t// (WithDefaultPrettyPrinter)\n\t\t\t\tobjectMapper.writerWithDefaultPrettyPrinter().writeValue(ops, database);\n\t\t\t\tlogger.info(\"OK - fichier JSON mis à jour \" + jsonFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tlogger.info(\"KO - FILE_NOT_FOUND\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - FILE_NOT_FOUND\", e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.info(\"KO - I/O ERROR\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - I/O ERROR\", e);\n\t\t\t} catch (URISyntaxException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"void commit(IDevTree tree, Map options) throws IOException;",
"@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}",
"public void editOperation() {\n\t\t\r\n\t}",
"private void edit() {\n\n\t}",
"public void setEdit() {\n keyTextField.setEditable(false);\n }",
"@Override\n public void commit() throws SQLException {\n if (isTransActionAlive() && !getTransaction().getStatus().isOneOf(TransactionStatus.MARKED_ROLLBACK,\n TransactionStatus.ROLLING_BACK)) {\n // Flush synchronizes the database with in-memory objects in Session (and frees up that memory)\n getSession().flush();\n // Commit those results to the database & ends the Transaction\n getTransaction().commit();\n }\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tInvoker.getInstance()\n\t\t\t\t\t.executeCommand(new GraphicElementEditCommitCommand(model, dialog.getGraphicElement()));\n\t\t\tdialog.setVisible(false);\n\t\t}",
"public void unlock(int key);",
"void commit() throws IndexTransactionException;",
"public void commit() {\r\n for (Iterator<Connection> it = connections.values().iterator(); it.hasNext();) {\r\n Connection conn = it.next();\r\n try {\r\n conn.commit();\r\n } catch (SQLException ex) {\r\n log.severe(\"Partial commit failure: \" + ex.getMessage());\r\n }\r\n }\r\n closeConnections();\r\n }",
"public void close() throws RemoteException {\r\n tx.commit();\r\n }",
"private void close() throws CorruptIndexException, IOException {\n\n\t\tidxWriter.forceMerge(1);\n\t\tidxWriter.commit();\n\t\tidxWriter.close();\n\t}",
"public void commit (boolean force) throws IOException {\n // There is something to commit\n if (commitCounter > 0 || !force)\n this.commit();\n }",
"public GlBuffer commit(final Chunk<E> chunk){\n return commit(chunk, true);\n }",
"public void flush() {\n synchronized (getLock()) {\n sIndexWritersCache.flush(this);\n sIndexReadersCache.removeIndexReader(this);\n }\n }",
"public final ObjectProperty<EventHandler<ListView.EditEvent<T>>> onEditCommitProperty() {\n\n return this.getWrappedControl().onEditCommitProperty();\n }",
"public void commitChanges(){\r\n try{\r\n //Record the state of unfinished set in unfinished.dat\r\n unfinishedFileOutputStream = new FileOutputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetOutputStream = new ObjectOutputStream(unfinishedFileOutputStream);\r\n unfinishedSetOutputStream.writeObject(unfinished);\r\n unfinishedSetOutputStream.close();\r\n unfinishedFileOutputStream.close();\r\n\r\n //Record the state of finished list in finished.dat\r\n finishedFileOutputStream = new FileOutputStream(FINISHED_FILE_PATH);\r\n finishedListOutputStream = new ObjectOutputStream(finishedFileOutputStream);\r\n finishedListOutputStream.writeObject(finished);\r\n finishedListOutputStream.close();\r\n finishedFileOutputStream.close();\r\n\r\n //Record the state of activities list in activities.dat\r\n activitiesFileOutputStream = new FileOutputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListOutputStream = new ObjectOutputStream(activitiesFileOutputStream);\r\n activitiesListOutputStream.writeObject(activities);\r\n activitiesListOutputStream.close();\r\n activitiesFileOutputStream.close();\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Stress in commiting changes: \" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }",
"public synchronized void updateCommitNumber()\n\t{\n\t\tm_dbCommitNum++;\n\t}",
"@Override\n\t\t\tpublic void CommitHandle(JTable table) {\n\t\t\t}",
"@Override\n\t\t\tpublic void CommitHandle(JTable table) {\n\t\t\t}",
"@Override\n public void edit() {\n this.parent.handleEditSignal(this.deadline);\n }",
"public void commit() throws ResourceException\n {\n if (inManagedTransaction)\n {\n try\n {\n inManagedTransaction = false;\n con.commit();\n }\n catch (SQLException e)\n {\n checkException(e);\n } // end of try-catch\n } // end of if ()\n else\n {\n throw new JBossResourceException(\"Trying to commit outside of a local tx\");\n } // end of else\n\n }",
"@Override\r\n\t\tpublic void commit() throws SQLException {\n\t\t\t\r\n\t\t}",
"void commit() throws SoarException\n {\n // if lazy, commit\n if(db != null && params.lazy_commit.get() == LazyCommitChoices.on)\n {\n // Commit and then start next lazy-commit transaction\n try\n {\n db.commitExecuteUpdate( /* soar_module::op_reinit */);\n db.beginExecuteUpdate( /* soar_module::op_reinit */);\n }\n catch(SQLException e)\n {\n throw new SoarException(\"Error while forcing commit: \" + e.getMessage(), e);\n }\n }\n \n }",
"public void commitMove() {\n // Nothing currently staged\n if ( board.currentState() == Board.NORMAL ) {\n // Dilemma - nulling this now helps the gui know that nothing was committed\n // However, it prevents us from referencing the previous move if an errant commit occurs\n lastCommittedMove = null;\n return;\n }\n\n lastCommittedMove = Assistant.WordPlay.boardMakeMove(board, this.masterDictionary());\n board.finishPlayingTiles();\n\n // Move was invalid\n if ( lastCommittedMove == null ) { return; }\n \n // Commit the move and re-draw tiles\n board.add(lastCommittedMove);\n drawNewTiles(lastCommittedMove);\n\n if ( rack.size() == 0 ) {\n state = GAMEOVER;\n moves = new MovePackage();\n } else {\n moves = Assistant.WordPlay.boardFindall(board, rack, masterDictionary());\n }\n }",
"public final void mCOMMIT() throws RecognitionException {\n try {\n int _type = COMMIT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:350:7: ( C O M M I T )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:350:9: C O M M I T\n {\n mC(); \n mO(); \n mM(); \n mM(); \n mI(); \n mT(); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public void commitChanges(){\n\t\tskipRulesView.updateSkipRule();\n\t\tvalidationRulesView.updateValidationRule();\n\t\tdynamicListsView.updateDynamicLists();\n\t}",
"Clock.Entry tryCommit(Transaction transaction, long id);",
"public static void clear() {\n doEdit();\n mEditor.clear();\n doCommit();\n }",
"public RevCommit commit(MetaDataUpdate update) throws IOException {\n try (BatchMetaDataUpdate batch = openUpdate(update)) {\n batch.write(update.getCommitBuilder());\n return batch.commit();\n }\n }",
"public void undoableEditHappened() { }"
] | [
"0.6265113",
"0.6154873",
"0.61537516",
"0.60995036",
"0.5995161",
"0.5974802",
"0.5960929",
"0.5923481",
"0.59010583",
"0.589396",
"0.58489877",
"0.58411086",
"0.58404374",
"0.582278",
"0.5793463",
"0.57428306",
"0.5679688",
"0.5679688",
"0.5679688",
"0.5679688",
"0.5679688",
"0.563438",
"0.5633142",
"0.5633142",
"0.5633142",
"0.5633142",
"0.55718476",
"0.5570748",
"0.5470008",
"0.5459937",
"0.54342365",
"0.54222065",
"0.5411989",
"0.5341395",
"0.53377944",
"0.53377944",
"0.53374237",
"0.53301305",
"0.5326542",
"0.53161794",
"0.5309966",
"0.5285266",
"0.52665275",
"0.5261273",
"0.52206385",
"0.5216639",
"0.5208265",
"0.5181531",
"0.5172152",
"0.5172021",
"0.5164751",
"0.5162454",
"0.5140689",
"0.51337844",
"0.5133068",
"0.511545",
"0.5104494",
"0.5099635",
"0.5098354",
"0.5094418",
"0.50910217",
"0.5089539",
"0.5079383",
"0.5065208",
"0.5037961",
"0.4988311",
"0.49555457",
"0.49498868",
"0.49407554",
"0.49320197",
"0.49301606",
"0.49167585",
"0.49135372",
"0.4906447",
"0.48966408",
"0.4896219",
"0.48907265",
"0.4890638",
"0.48885617",
"0.4879456",
"0.48774806",
"0.48675796",
"0.4865484",
"0.48615712",
"0.48577446",
"0.4857328",
"0.48539105",
"0.4852788",
"0.4852788",
"0.48518863",
"0.4846178",
"0.4845287",
"0.48437455",
"0.48267403",
"0.48238263",
"0.4822843",
"0.4810711",
"0.48102322",
"0.4797123",
"0.47899002"
] | 0.7418504 | 0 |
Aborts this edit. This releases the edit lock so another edit may be started on the same key. | public void abort() throws IOException {
completeEdit(this, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void abort() {\n isAborted = true;\n cancelCommands();\n cancel(true);\n }",
"protected void cancel() {\n abort();\n if(cancelAction != null) {\n cancelAction.accept(getObject());\n }\n }",
"public void abort() {\n if (null == putMethod) {\n return;\n } else {\n putMethod.abort();\n putMethod = null;\n }\n }",
"@Action\n public void acCancel() {\n setChangeObj(false);\n }",
"@Action\n public void acCancel() {\n setChangeObj(false);\n }",
"public synchronized void cancel() {\n }",
"public void cancel() {\n\t\tcancel(false);\n\t}",
"public void stopEditing() {\n CellEditor ce;\n if (Table.isEditing() && ((ce = Table.getCellEditor()) != null)) {\n ce.stopCellEditing();\n }\n }",
"public void abort() {\n reservedSpace.clear();\n this.abortRequested = true;\n stop();\n }",
"public void abort(int tid) {\n List<Lock> lockList = null;\n for (Integer varIndex : _lockTable.keySet()) {\n lockList = _lockTable.get(varIndex);\n int size = lockList.size();\n for (int i = size - 1; i >= 0; i--) {\n if (lockList.get(i).getTranId() == tid) {\n if (lockList.get(i).getType() == Lock.Type.WRITE) {\n _uncommitDataMap.remove(varIndex);\n }\n lockList.remove(i);\n break;\n }\n }\n }\n // remove this transaction from accessed list\n _accessedTransactions.remove(tid);\n }",
"@Override\n public void revoke() {\n\t\t\tcore(HexEditorConstants.CELL_STATUS_UNDO);\n\t\t\tif (singleCommand) {\n\t\t\t\ttable.select(row);\n\t\t\t\tcursor.setSelection(row, col + 1);\n\t\t\t}\n\t\t}",
"void cancel(T entity, boolean editMode);",
"@Override\n public void abort() { \n abortFlag = true ;\n }",
"public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}",
"protected void exitEditMode(){\n editName.setEnabled(false);\n editEmail.setEnabled(false);\n saveButton.setVisibility(View.INVISIBLE);\n }",
"private void stopEditing() {\n int col_index = table.getEditingColumn();\n if (col_index >= 0) {\n TableColumn col = table.getColumnModel().getColumn(col_index);\n col.getCellEditor().stopCellEditing();\n }\n }",
"void abort() {\n\n // Revision number = 0 indicates an aborted transaction.\n this.targetRevisionNumber.set( 0L );\n\n // Clean up aborted revisions ...\n for ( AbstractVersionedItem versionedItem : this.versionedItemsWritten ) {\n versionedItem.removeAbortedRevision();\n }\n\n this.versionedItemsRead.clear();\n this.versionedItemsWritten.clear();\n\n // Trigger any clean up that is possible from no longer needing our source version.\n this.cleanUpOlderRevisions();\n\n }",
"public void cancelState() {\n if (isQuestionEditMode) {\n //deleteAllQuestionInputTextAreas();\n //addCurrentQuestionsToView();\n }\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}",
"public synchronized void abort(int trxnId)\n {\n ResourceManager rm;\n for (Enumeration e = transactionTouch.keys(); e.hasMoreElements();) {\n rm = (ResourceManager)e.nextElement();\n try {\n rm.abort(trxnId);\n } catch (Exception x)\n {\n System.out.println(\"EXCEPTION:\");\n System.out.println(x.getMessage());\n x.printStackTrace();\n }\n }\n transactionTouch.remove(trxnId);\n lm.UnlockAll(trxnId);\n }",
"public void cancelCellEditing() {\n\r\n\t\t\t\t\t}",
"public void cancel() {\n btCancel().push();\n }",
"private void cancel() {\n recoTransaction.cancel();\n }",
"public void cancel() {\n\t\tinterrupt();\n\t}",
"@Override\n\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"public void cancelRead(final SelectionKey key)\n {\n key.cancel();\n }",
"public void cancelCellEditing() {\n\trealEditor.cancelCellEditing();\n\tif(editingComponent != null)\n\t editingContainer.remove(editingComponent);\n\teditingComponent = null;\n }",
"public void cancel() {\n\t}",
"@Override\n\tpublic void cancelCellEditing() {\n\t\tlog.info(\"|------表格单元格编辑模型------|\\t\"+\"cancelCellEditing\\t\");\n\t}",
"void cancel() {\n if (mCurrentRequest != null) {\n mCurrentRequest.cancel();\n mCurrentRequest = null;\n }\n mPendingEntries.clear();\n }",
"public void cancel() {\n writeData(ESC.CMD_CANCEL);\n }",
"@Override\n public void abort() {\n giocoinesecuzione = null;\n }",
"public void cancel()\n\t{\n\t\t_buttonHit = true;\n\t}",
"public void cancelTransaction() {\n\t\t//Cancel the transaction\n\t\tregister[registerSelected].cancelTransaction();\n\t}",
"@Override\n\t\t\tpublic void editingCanceled(ChangeEvent arg0) {\n\n\t\t\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void doCancel() throws Exception {\r\n\t\tif (_mode == MODE_LIST_OFF_PAGE)\r\n\t\t\treturnToListPage(false);\r\n\t\telse if (getPageDataStoresStatus() == DataStoreBuffer.STATUS_NEW || getPageDataStoresStatus() == DataStoreBuffer.STATUS_NEW_MODIFIED) {\r\n\t\t\ttry {\r\n\t\t\t\tdoDelete();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n undoChanges();\r\n scrollToMe();\r\n\t}",
"@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}",
"public void cancel() {\n\t\tcancelled = true;\n\t}",
"public void cancel()\n\t{\n\t}",
"protected void cancelChanges() {\n }",
"public void cancel() {\n ei();\n this.fd.eT();\n this.oJ.b(this);\n this.oM = Status.CANCELLED;\n if (this.oL != null) {\n this.oL.cancel();\n this.oL = null;\n }\n }",
"private void cancel() {\n setResult(RESULT_CANCELED, null);\n dbHelper.rollback();\n finish();\n }",
"private void cancelAction() {\n\t\tparent.tabbedView.remove(this);\n\t\tparent.repaint();\n\t}",
"public void abortTransaction(TransID tid) throws IllegalArgumentException {//done\n\t// Check that this is actually an active transaction\n try {\n\t\tatranslist.get(tid).abort();\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\tSystem.out.println(\"IO exception\");\n\t\te.printStackTrace();\n\t\tSystem.exit(-1);\n\t}\n atranslist.remove(tid);\n }",
"public void cancelRowUpdates() throws SQLException\n {\n m_rs.cancelRowUpdates();\n }",
"public void cancel(){\n cancelled = true;\n }",
"private void cancel() {\n\t\tfinish();\n\t}",
"@Override\n public void cancel() {\n }",
"@Override\n\tpublic void editingCanceled(ChangeEvent arg0) {\n\n\t}",
"@Override\n public void cancel() {\n\n }",
"public void unlock(int key);",
"@Override\n public void cancel() {\n\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcancel();\n\t\t\t}",
"public boolean cancel();",
"public void undo() {\n setExecuted(false);\n }",
"@Override\n\t\t\tpublic void editingCanceled(ChangeEvent e) {\n\t\t\t}",
"@Override\r\n\tpublic void cancelCellEditing() {\n\r\n\t}",
"public synchronized void writeAbort(Transaction t) {\n\t\tflush();\n\t\tpw.println(t.transactionId() + \" abort\");\t\n\t\tflush();\n\t}",
"void cancelOrder(String orderKey);",
"public void deactivate() {\n\t\tentity.deactivateInstance(this);\n\t}",
"public void abort() throws IOException;",
"private void abortTxn() throws InterruptedException {\n LOG.info(\"Aborting Txn id {} on End Point {}\", txnBatch.getCurrentTxnId(), endPoint);\n try {\n callWithTimeout(new CallRunner<Void>() {\n @Override\n public Void call() throws StreamingException, InterruptedException {\n txnBatch.abort(); // could block\n return null;\n }\n });\n } catch (InterruptedException e) {\n throw e;\n } catch (TimeoutException e) {\n LOG.warn(\"Timeout while aborting Txn \" + txnBatch.getCurrentTxnId() + \" on EndPoint: \" + endPoint, e);\n } catch (Exception e) {\n LOG.warn(\"Error aborting Txn \" + txnBatch.getCurrentTxnId() + \" on EndPoint: \" + endPoint, e);\n // Suppressing exceptions as we don't care for errors on abort\n }\n }",
"@Override\n\tpublic void cancel() {\n\t\t\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"public void cancelar() {\n setCancelado(true);\n }",
"public void onCancelClicked(View view) {\n\n if(mEditMode){\n //remove the item from database\n getContentResolver().delete(SavingsContentProvider.CONTENT_URI, SavingsItemEntry._ID + \"=\" + mSavingsBean.getId(), null);\n Log.d(Constants.LOG_TAG, \"Edit Mode, delete existing savings item:\");\n Log.d(Constants.LOG_TAG, mSavingsBean.toString());\n //Go back to Dashboard\n Utils.gotoDashBoard(this);\n finish();\n }else{\n finish();\n }\n }",
"public void unlock() {\n setLock.unlock(this);\n }",
"void cancelOriginal();",
"public void revoke();",
"@Override\n public void cancel() {\n }",
"public void setEdit() {\n keyTextField.setEditable(false);\n }",
"protected abstract void abortTxn(Txn txn) throws PersistException;",
"public void discardAndGoBack() {\n try {\n currentEditor.setValue(null);\n if (currentEditor instanceof RestrictedEntityEditor) {\n ((RestrictedEntityEditor) currentEditor).refreshListOfValues();\n }\n } catch (Exception ex) {\n throw new RuntimeException(\"Exception while discarding value of an editor. \", ex);\n }\n goBack();\n }",
"public void cancelOperation() {\n\n System.out.println(\"Sorry, a problem occurred, deposit money operation is unsuccessful\");\n System.out.println(\"Current information : \");\n while (!storage.isEmpty()) {\n Command command = storage.pop();\n command.undo();\n }\n }",
"@Override\n\tpublic void undo() {\n\t\tsecurity.off();\n\t}",
"protected void actionPerformedCancel ()\n {\n Preferences rootPreferences = Preferences.systemRoot ();\n PreferencesTableModel rootPrefTableModel = new PreferencesTableModel (rootPreferences);\n rootPrefTableModel.undo ();\n Preferences userPreferences = Preferences.userRoot ();\n PreferencesTableModel userPrefTableModel = new PreferencesTableModel (userPreferences);\n userPrefTableModel.undo ();\n this.setVisible (false);\n this.dispose ();\n }",
"void onCancel(int key);",
"public void abort() throws StreamingException, TxnBatchFailure, InterruptedException {\n synchronized (txnBatchLock) {\n abortTxn();\n nextTxn(true); // roll to next\n }\n }",
"private void abortOrder() {\n OrderDataService.cancelOrder(eventUid, isMarkedSeats, order);\n\n String orderInvalidMessage = \"שים לב! לא נותרו כרטיסים בכמות שבחרת. במידה ולא אזלו הכרטיסים, נסה שוב\";\n Toast.makeText(PaymentActivity.this, orderInvalidMessage, Toast.LENGTH_LONG).show();\n final Intent detailActivityIntent = new Intent(this, EventDetailsActivity.class);\n detailActivityIntent.putExtra(\"eventUid\", eventUid);\n\n // Send user back to event details activity after toast was shown for long enough\n Thread thread = new Thread(){\n @Override\n public void run() {\n try {\n Thread.sleep(2500);\n startActivity(detailActivityIntent);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n };\n\n thread.start();\n }",
"public void cancel() {\n target.setAllowFlight(false);\n target.setWalkSpeed(0.01F);\n target.setFlySpeed(0.01F);\n targets.remove(target);\n\n JavaUtils.broadcastStage(\"done\",this);\n }",
"public void cancel() {\n cancelSoftwareAnimations();\n }",
"private void cancel(){\n\t\trefreshInformationsFromTableView(null);\n\t\thidePassword();\n\t\tclearFields();\n\t\tchangeCancelButton.setText(\"Zmień hasło\");\n\t\tnewUser = false;\n\t}",
"public void cancel(View v) {\n finish();\n }",
"public static void abandon(TransactionalEditingDomain domain, String message) {\n\t\tif (domain instanceof MSLEditingDomain) {\n\t\t\tMSLEditingDomain mslDomain = (MSLEditingDomain) domain;\n\t\t\t\n\t\t\tInternalTransaction tx = mslDomain.getActiveTransaction();\n\t\t\tif ((tx != null) && !tx.isReadOnly()) {\n\t\t\t\ttx.abort(new Status(\n\t\t\t\t\tIStatus.CANCEL,\n\t\t\t\t\tMSLPlugin.getPluginId(),\n\t\t\t\t\tMSLStatusCodes.TRANSACTION_ABORTED,\n\t\t\t\t\tmessage,\n\t\t\t\t\tnull));\n\t\t\t}\n\t\t}\n\t}",
"public void cancelExecution() {\n \n \t\tcancelOrKillExecution(true);\n \t}",
"public void i() {\n if (this.e != null) {\n this.e.cancel();\n this.e = null;\n }\n if (this.d != null) {\n this.d.cancel();\n this.d.purge();\n this.d = null;\n }\n }",
"public synchronized void cancel() {\n this.executionState = JobExecutionState.CANCELLED;\n this.finished = Instant.now();\n }",
"@Override\n void undo() {\n assert false;\n }"
] | [
"0.6659315",
"0.64067286",
"0.63418186",
"0.62977487",
"0.62977487",
"0.6171196",
"0.60722893",
"0.60550934",
"0.604998",
"0.6045554",
"0.60235137",
"0.6020639",
"0.60157776",
"0.60032487",
"0.59511477",
"0.5909415",
"0.58994305",
"0.5894848",
"0.5872943",
"0.5852604",
"0.5842709",
"0.5822405",
"0.58214885",
"0.5808075",
"0.5783947",
"0.57799166",
"0.5723794",
"0.57237935",
"0.57209206",
"0.5718424",
"0.5714144",
"0.57040024",
"0.5688745",
"0.5662793",
"0.5657595",
"0.5641178",
"0.5641178",
"0.5641178",
"0.5640959",
"0.56387657",
"0.56387657",
"0.56387657",
"0.56387657",
"0.56387657",
"0.56387657",
"0.56353456",
"0.56352425",
"0.5633064",
"0.56260586",
"0.5624408",
"0.5609492",
"0.5604373",
"0.5589477",
"0.55759895",
"0.55663055",
"0.55660784",
"0.5547993",
"0.5525168",
"0.5521159",
"0.5520298",
"0.551992",
"0.5511936",
"0.5499702",
"0.5497875",
"0.548281",
"0.547943",
"0.54469556",
"0.5445103",
"0.544125",
"0.5438433",
"0.54334456",
"0.5431219",
"0.5428693",
"0.54275167",
"0.54275167",
"0.54275167",
"0.54220754",
"0.5414944",
"0.54102504",
"0.54043657",
"0.54034",
"0.53986734",
"0.53926307",
"0.5380817",
"0.53725994",
"0.53716594",
"0.53641444",
"0.53612167",
"0.53593403",
"0.5354259",
"0.532973",
"0.5322184",
"0.53132886",
"0.53104246",
"0.5303461",
"0.53028184",
"0.53020686",
"0.52964175",
"0.52934587",
"0.52832127"
] | 0.7255199 | 0 |
Set lengths using decimal numbers like "10123". | private void setLengths(String[] strings) throws IOException {
if (strings.length != valueCount) {
throw invalidLengths(strings);
}
try {
for (int i = 0; i < strings.length; i++) {
lengths[i] = Long.parseLong(strings[i]);
}
} catch (NumberFormatException e) {
throw invalidLengths(strings);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setLength( long length );",
"void setLength(int length);",
"public void setLength(long length);",
"public void setLength(long length);",
"public void setLength(double length){this.length=length;}",
"public void setLength(double len) throws IllegalArgumentException\n {\n if (len<0) throw new IllegalArgumentException (\"Length cannot be negative\" + len);\n else length = len;\n }",
"public void setLength(float length) { // l = 2.3\r\n\t\tthis.length = length; // length = 2.3\r\n\t\t\r\n\t}",
"public void setLength(double length)\r\n {\r\n this.length = length;\r\n }",
"public void setLength(double newLength) {\n length = newLength;\n }",
"public void setLength(Double newlength)\n {\n length = newlength;\n }",
"default void setLength(double t) {\r\n scaleDirection(t / getLength());\r\n }",
"public void setLength(double length) {\r\n this.length = length;\r\n }",
"public void setLength(double length) {\n this.length = length;\n }",
"public void setLength(double length) {\n\t\tthis.length = length;\n\t}",
"public void setLength(long length) { \n this.length = length; \n }",
"public boolean setLength(double Length);",
"public void setLength(int length)\n {\n this.length = length;\n }",
"public void setLengths(int[] lengths) {\n this.put(PdfNameValue.LENGTH1, new PdfNumber(lengths[0]));\n this.put(PdfNameValue.LENGTH2, new PdfNumber(lengths[1]));\n this.put(PdfNameValue.LENGTH3, new PdfNumber(lengths[2]));\n }",
"public void setNumDigits(int digits) {\r\n \r\n //Set Value\r\n numDigits = digits;\r\n \r\n }",
"public void setLength(int length) {\r\n this.length = length;\r\n }",
"public void setLength(int length) {\r\n this.length = length;\r\n }",
"public void setLength(int n){ // Setter method\n \n length = n; // set the class attribute (variable) radius equal to num\n }",
"synchronized void setLength(int length) {\n this.length = length;\n }",
"@Override\n\tpublic void setLength(int length) {\n\t\t\n\t}",
"public void setLength(int length) {\r\n\t\tthis.length = length;\r\n\t}",
"public void setLength(){\n out.print(\"Please enter a number greater than 0:\\t\");\n while (true) {\n try {\n this.sideLength = Integer.parseInt(sc.next());\n if (this.sideLength > 0) {\n break;\n } else {\n out.print(\"Please re-enter a number greater than 0!:\\t\");\n }// End if else\n } catch (NumberFormatException e) {\n out.print(\"Please enter a number (not a letter) greater than 0!:\\t\");\n //this.sideLength = 0;\n }// End try catch\n }// End running while loop\n }",
"public void setLength(long length) {\r\n\t\tthis.length = length;\r\n\t}",
"public void setLength(int length) {\n\t\tthis.length = length;\n\t}",
"public void setLength(int length) {\n\t\tthis.length = length;\n\t}",
"public void setLength(int length) {\n\t\tthis.length = length;\n\t}",
"public Builder setLength(int value) {\n \n length_ = value;\n onChanged();\n return this;\n }",
"public void setLength(int length)\n {\n encryptionDictionary.setInt(\"Length\", length);\n }",
"public void setLength(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), LENGTH, value);\r\n\t}",
"@Override\n public void init()\n {\n out = mul(num(100.0/Math.log10(length)), log10(div(sum(truerange(), length), diff(highest(length), lowest(length)))));\n }",
"public void setLength(int length){\n\t\tif(length > 0){\n\t\t\tthis.length = length; //this.length is the length were in right now. and = length is the length the object is given\n\t\t}\n\t\t\n\t\t\n\t}",
"public void setLength(int duration){\n\t\tlength = duration;\n\t}",
"private void initDigits(Set<String> s) {\n\t\tfill(s,'0','9');\n }",
"public void setLength(Integer length) throws DBException {\n _length = length;\n }",
"public void setLength(Integer length) throws DBException {\n _length = length;\n }",
"public void setBaseLength(double baseLength) {\n this.baseLength = baseLength;\n }",
"public void setLength( int length ) { setCapacity( length ); this.length = length; }",
"public void setLength(){\n this.length = 0;\n for (Music track : this.tracks){\n this.length += track.getLength();\n }\n }",
"public void setCurrentLength(long currentLength) { \n this.currentLength = currentLength; \n }",
"public static void setLength( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, LENGTH, value);\r\n\t}",
"public void setLineLength(int len) {\n lineLength = len / 4 * 4;\n }",
"private void setDigitsAfterDot(int digits) {\n // check for logical error\n if(digits < 0) {\n // error ..\n eHandler.newError(ErrorType.INVALID_ARGUMENT, \"setDigitsAfterDot\" , \"Negative digits number\");\n\n // exit from method\n return;\n } // end of if statement\n\n // set the digitsAfterDot\n digitsAfterDot = digits;\n\n }",
"public static void setLength(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, LENGTH, value);\r\n\t}",
"public void setLength( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), LENGTH, value);\r\n\t}",
"Length createLength();",
"private void setBarLenght(int len) {\n // check for logical error\n if(len <= 0) {\n // error ..\n eHandler.newError(ErrorType.INVALID_ARGUMENT, \"setBarLenght\", \"Zero or negative bar lenght\");\n\n // set to default\n barLenght =DEFAULT_BAR_LENGH;\n\n // exit from method\n return;\n } // end of if statement\n\n // set the barLenght\n barLenght = len;\n\n }",
"public void setLen_cable(java.math.BigDecimal newLen_cable)\n\t\tthrows java.rmi.RemoteException;",
"Length initLength(Length iLength)\n {\n iLength.updateElementValue(\"Length\");\n return iLength;\n }",
"public void setDecimals(int decimals) {\n this.converter.decimalsProperty().set(decimals);\n }",
"public void setLength(int length) {\n\t\tif (length <= 0)\n\t\t\tthrow new IllegalArgumentException(\"length must be > 0\");\n\n\t\tthis.length = length;\n\t}",
"@JsProperty(name = \"length\")\n public native void setLength(@DoNotAutobox Number value);",
"public void writeLength(){\n\t\tfor(int i = 0; i < DIFF_CHARACTERS; i++){\n\t\t\tm_arraylists[i].length();\n\t\t}\n\t}",
"public void setUnit(Length units) {\n unit = units;\n }",
"void setAxisLength(CalibratedAxis axis, long length);",
"protected String correctDigits(int start, int digits)\n\t{\n\t\tString end = Integer.toString(start);\n\t\twhile(end.length() < digits)\n\t\t{\n\t\t\tend = \"0\" + end;\n\t\t}\n\t\treturn end;\n\t}",
"public static void setPrepositionLength(long l){\n\t\tprepositionLength = l;\n\t}",
"public void setNumDecimals(int numDecimals) {\n this.numDecimals = numDecimals;\n }",
"public void setLenCalcType(int ltype){\n // Verify the ttype and ltype\n if (ltype != LENGTH_LAZY && ltype != LENGTH_LAZY_GOOD &&\n ltype != LENGTH_NEAR_OPT) {\n throw new IllegalArgumentException(\"Unrecognized length \"+\n \"calculation type code: \"+ltype);\n }\n\n if(ltype == LENGTH_NEAR_OPT){\n\t if(savedC==null)\n\t\tsavedC = new int[SAVED_LEN];\n\t if(savedCT==null)\n\t\tsavedCT = new int[SAVED_LEN];\n\t if(savedA==null)\n\t\tsavedA = new int[SAVED_LEN];\n\t if(savedB==null)\n\t\tsavedB = new int[SAVED_LEN];\n\t if(savedDelFF==null)\n\t\tsavedDelFF = new boolean[SAVED_LEN];\n }\n\n this.ltype = ltype;\n }",
"void setExpectedLength(final int expectedLength) {\n this.vars.put(\"expectedLength\", String.valueOf(expectedLength));\n }",
"private static void setupMaxLength(String[] arr, AllDataRecords rec) {\r\n\t\t\r\n\t\tif(rec.getDateLength() < arr[1].length())\r\n\t\t\trec.setDateLength(arr[1].length());\r\n\t\t\r\n\t\tif(rec.getStratumLength() < arr[4].length()) \r\n\t\t\trec.setStratumLength(arr[4].length());\r\n\t\t\r\n\t\tif(rec.getRaceOtherLength() < arr[8].length()) \r\n\t\t\trec.setRaceOtherLength(arr[8].length());\r\n\t\t\r\n\t\tif(rec.getDiagOtherLength() < arr[10].length()) \r\n\t\t\trec.setDiagOtherLength(arr[10].length());\r\n\t\t\r\n\t\tif(rec.getNarr1Length() < arr[17].length()) \r\n\t\t\trec.setNarr1Length(arr[17].length());\r\n\t\t\r\n\t\tif(rec.getNarr2Length() < arr[18].length())\r\n\t\t\trec.setNarr2Length(arr[18].length());\r\n\t}",
"public void setLength(int newLength) {\r\n\t\tif (cursor + newLength > buffer.length)\r\n\t\t\tthrow new IllegalArgumentException(\"Can't set new length if it exceeds buffer\");\r\n\t\tlimit = cursor + newLength;\r\n\t}",
"public void setScale_length(float scale_length) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 0, scale_length);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 0, scale_length);\n\t\t}\n\t}",
"public void setLendeveille(Integer lendeveille) {\r\n\t\tthis.lendeveille = lendeveille;\r\n\t}",
"protected final void setLC(int lc) {\n\tif (lc < 1 || lc > 65536) {\n\t throw new IllegalArgumentException(\"Length should be from '1' to '65535'.\");\n\t}\n\tthis.lc = lc;\n }",
"public int setLengthDependent(String lengthDependent) {\r\n return setAttribute(MEConstants.lengthDependent, lengthDependent);\r\n }",
"float getLength();",
"float getLength();",
"public void setRecord_length(int len) {\n\t\trecord_length = len;\n\t}",
"private String getLengthsFormatted() {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (int i = 0; i < paths.size(); i++) {\n\t\t\tsb.append((int) paths.get(i).getLength());\n\n\t\t\tif (i != paths.size() - 1) {\n\t\t\t\tsb.append(\", \");\n\t\t\t}\n\t\t}\n\n\t\treturn sb.toString();\n\t}",
"public abstract void getLength(double length);",
"public void setNumberLength(java.lang.Integer numberLength) {\r\n this.numberLength = numberLength;\r\n }",
"public int getDecimalDigits() { return 1; }",
"public int getDecimalDigits() { return 1; }",
"private static String makeCorrectSize(String s, int length){\n\t\tStringBuilder sb = new StringBuilder(s); \n\t\tfor(int i = sb.length(); i<length; i++){\n sb.append(\" \");\n }\n\t\treturn sb.toString(); \n\n\t}",
"public void addLength(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), LENGTH, value);\r\n\t}",
"@Override\n\tpublic LSystemBuilder setUnitLength(double unitLength) {\n\t\tthis.unitLength = unitLength;\n\t\treturn this;\n\t}",
"private int set_dft_length(int num_taps) {\n int result, n = num_taps;\n for (result = 8; n > 2; result <<= 1, n >>= 1) {\n ;\n }\n result = range_limit(result, 4096, 131072);\n assert (num_taps * 2 < result);\n return result;\n }",
"public void setLength(int length) {\n\t\tloadProgress.setLength(length);\n\t}",
"public void handleIncreaseLengthPowerup(){\n myRectangle.setWidth(myRectangle.getWidth()*increaseLengthPowerupSizeFactor);\n myLength=(int)(myLength*increaseLengthPowerupSizeFactor);\n }",
"public void set_length(short value) {\n setUIntElement(offsetBits_length(), 8, value);\n }",
"public void setLength_unit(byte length_unit) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 8, length_unit);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 8, length_unit);\n\t\t}\n\t}",
"private static int calcPyramidSize(int length)\r\n\t{\r\n\t\tdouble n = (-1 + Math.sqrt(1 + 8 * length)) / 2;\r\n\t\treturn (int)n; //Smallest value.\r\n\t}",
"public void addLength( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), LENGTH, value);\r\n\t}",
"public void setBBoxLength(int aLength)\r\n {\r\n theBBoxLength = aLength;\r\n if (theBBoxLengthField != null)\r\n {\r\n theBBoxLengthField.setValue(theBBoxLength);\r\n theBBoxLengthField.updateUI();\r\n }\r\n }",
"public double addLength(Length l1, Length l2) {\n return Double.sum(l1.value*l1.unit.baseUnitConversion, l2.value*l2.unit.baseUnitConversion);\n }",
"private void setUpFormat() {\n form = (DecimalFormat)NumberFormat.getNumberInstance();\n form.setMaximumFractionDigits(precision);\n }",
"public void addLength(int num) {\r\n this.length += num;\r\n }",
"public void setWitdh(int newValue)\n {\n width = newValue;\n }",
"public static String padZeros(String s, int reqLen) {\r\n\t\tString pz = \"\";\r\n\t\tint padlen = 0;\r\n\t\tint lengthAfterDec = 0;\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tint indexofDec = s.lastIndexOf(\".\");\r\n\t\tif (indexofDec == -1) {\r\n\t\t\t// if decimal position is not there , add all zeroes to end of it\r\n\t\t\tif (reqLen > 0) {\r\n\t\t\t\tsb.append(s.trim() + \".\");\r\n\t\t\t\twhile (reqLen > 0) {\r\n\t\t\t\t\tsb.append(\"0\");\r\n\t\t\t\t\treqLen--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tpz = sb.toString();\r\n\t\t} else {\r\n\t\t\tlengthAfterDec = s.substring(indexofDec).length() - 1;\r\n\t\t\tif (lengthAfterDec < reqLen) {\r\n\t\t\t\tpadlen = reqLen - lengthAfterDec;\r\n\r\n\t\t\t}\r\n\t\t\tif (padlen > 0) {\r\n\t\t\t\tsb.append(s.trim());\r\n\t\t\t\twhile (padlen > 0) {\r\n\t\t\t\t\tsb.append(\"0\");\r\n\t\t\t\t\tpadlen--;\r\n\t\t\t\t}\r\n\t\t\t\tpz = sb.toString();\r\n\t\t\t} else {\r\n\t\t\t\tpz = s;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn pz;\r\n\t}",
"private void parseUnitLength(String line) throws IllegalArgumentException {\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tif(tokens.length != 2) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid unitLength argument\");\n\t\t}\n\t\tthis.setUnitLength(Double.parseDouble(tokens[1]));\n\t}",
"LengthAdd createLengthAdd();",
"public void setBase(double baseWidth, double baseLength) {\n setBaseWidth(baseWidth);\n setBaseLength(baseLength);\n }",
"public void setXLength(int length) {\n this.xLength = length;\n }",
"@Test\n public void testSetLimite() {\n \n assertEquals(0.0,soin3.getLimite(),0.01);\n soin3.setLimite(56.0);\n assertEquals(56.0,soin3.getLimite(),0.01);\n }",
"public void setDataLength(int length) {\n // should be below 255, check!\n m_DataLength = length + 2;\n }",
"void setMaxCharSize(int value);"
] | [
"0.6745118",
"0.66928756",
"0.65375197",
"0.65375197",
"0.6475718",
"0.6376495",
"0.6373268",
"0.63224375",
"0.62975025",
"0.62665826",
"0.6234995",
"0.6195181",
"0.61534935",
"0.60189396",
"0.5974213",
"0.59739244",
"0.5962491",
"0.59416145",
"0.59342945",
"0.59166354",
"0.59166354",
"0.59131736",
"0.5890556",
"0.58656687",
"0.58537894",
"0.583114",
"0.5792217",
"0.57618374",
"0.57618374",
"0.57618374",
"0.57387614",
"0.5666533",
"0.56182474",
"0.5592138",
"0.5579202",
"0.5570047",
"0.55574346",
"0.553974",
"0.553974",
"0.55227107",
"0.5517707",
"0.5505783",
"0.5498516",
"0.54873943",
"0.5451126",
"0.5443902",
"0.5435951",
"0.54350275",
"0.5428646",
"0.54180664",
"0.53842634",
"0.53782266",
"0.53626835",
"0.5362363",
"0.5355661",
"0.53486794",
"0.53217685",
"0.5320503",
"0.53170294",
"0.53005993",
"0.5275416",
"0.5274796",
"0.52473956",
"0.52469885",
"0.52398676",
"0.5226848",
"0.5212796",
"0.521189",
"0.52051544",
"0.51854575",
"0.51854575",
"0.5175138",
"0.5174423",
"0.5162027",
"0.5155984",
"0.51542723",
"0.51542723",
"0.51494443",
"0.51445174",
"0.5140622",
"0.51377296",
"0.51302373",
"0.512612",
"0.5115192",
"0.511024",
"0.510858",
"0.5100008",
"0.5099941",
"0.5097495",
"0.5092148",
"0.5066411",
"0.5059931",
"0.5054942",
"0.50515836",
"0.50473684",
"0.50391424",
"0.5037465",
"0.50227404",
"0.50205696",
"0.49882662"
] | 0.617456 | 12 |
set CA cert in chain | public static void main(String[] args) throws Exception {
File f = new File(System.getProperty("test.src", "."), CA);
FileInputStream fis = new FileInputStream(f);
CertificateFactory fac = CertificateFactory.getInstance("X.509");
Certificate cacert = fac.generateCertificate(fis);
Certificate[] signercerts = new Certificate[4];
signercerts[1] = cacert;
signercerts[3] = cacert;
// set signer certs
f = new File(System.getProperty("test.src", "."), SIGNER1);
fis = new FileInputStream(f);
Certificate signer1 = fac.generateCertificate(fis);
signercerts[0] = signer1;
f = new File(System.getProperty("test.src", "."), SIGNER2);
fis = new FileInputStream(f);
Certificate signer2 = fac.generateCertificate(fis);
signercerts[2] = signer2;
UnresolvedPermission up = new UnresolvedPermission
("type", "name", "actions", signercerts);
if (!up.getUnresolvedType().equals("type") ||
!up.getUnresolvedName().equals("name") ||
!up.getUnresolvedActions().equals("actions")) {
throw new SecurityException("Test 1 Failed");
}
Certificate[] certs = up.getUnresolvedCerts();
if (certs == null || certs.length != 2) {
throw new SecurityException("Test 2 Failed");
}
boolean foundSigner1 = false;
boolean foundSigner2 = false;
if (certs[0].equals(signer1) || certs[1].equals(signer1)) {
foundSigner1 = true;
}
if (certs[0].equals(signer2) || certs[1].equals(signer2)) {
foundSigner2 = true;
}
if (!foundSigner1 || !foundSigner2) {
throw new SecurityException("Test 3 Failed");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void assignCAPath()\n {\n this.caPath = CA_PATH.get(conf);\n\n if (CA_PATH_ENV.get(conf) != null) {\n String envVarTlsCAPath = System.getenv(CA_PATH_ENV.get(conf));\n if (envVarTlsCAPath != null) {\n this.caPath = envVarTlsCAPath;\n }\n }\n }",
"public void setRootCa(String path);",
"public void setTlsCertPath(String tlsCertPath);",
"X509Cert caCert(String caName, ReqRespDebug debug) throws CmpClientException, PkiErrorException;",
"public void importCA(File certfile){\n try {\n File keystoreFile = new File(archivo);\n \n //copia .cer -> formato manipulacion\n FileInputStream fis = new FileInputStream(certfile);\n DataInputStream dis = new DataInputStream(fis);\n byte[] bytes = new byte[dis.available()];\n dis.readFully(bytes);\n ByteArrayInputStream bais = new ByteArrayInputStream(bytes);\n bais.close();\n CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n Certificate certs = cf.generateCertificate(bais);\n //System.out.println(certs.toString());\n //inic keystore\n FileInputStream newib = new FileInputStream(keystoreFile);\n KeyStore keystore = KeyStore.getInstance(INSTANCE);\n keystore.load(newib,ksPass );\n String alias = (String)keystore.aliases().nextElement();\n newib.close();\n \n //recupero el array de certificado del keystore generado para CA\n Certificate[] certChain = keystore.getCertificateChain(alias);\n certChain[0]= certs; //inserto el certificado entregado por CA\n //LOG.info(\"Inserto certifica CA: \"+certChain[0].toString());\n //recupero la clave privada para generar la nueva entrada\n Key pk = (PrivateKey)keystore.getKey(alias, ksPass); \n keystore.setKeyEntry(alias, pk, ksPass, certChain);\n LOG.info(\"Keystore actualizado: [OK]\");\n \n FileOutputStream fos = new FileOutputStream(keystoreFile);\n keystore.store(fos,ksPass);\n fos.close(); \n \n } catch (FileNotFoundException ex) {\n LOG.error(\"Error - no se encuentra el archivo\",ex);\n } catch (IOException | NoSuchAlgorithmException | CertificateException | KeyStoreException ex) {\n LOG.error(\"Error con el certificado\",ex);\n } catch (UnrecoverableKeyException ex) {\n LOG.error(ex);\n }\n }",
"public void setCertificateChain(java.nio.ByteBuffer certificateChain) {\n this.certificateChain = certificateChain;\n }",
"public void setTlsCert(String tlsCert);",
"public CreateCertFromCSR setCaInfo(X500Name subject, PrivateKey key) {\n caSubject = subject;\n caKey = key;\n return this;\n }",
"private void setCertificate(\n int index, com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n ensureCertificateIsMutable();\n certificate_.set(index, value);\n }",
"public void setCA(java.lang.String CA) {\n this.CA = CA;\n }",
"public void setValidator(X509CertChainValidator validator){\n \t CommonX509TrustManager mtm = new CommonX509TrustManager(validator);\n \t setTrustManager(mtm);\n }",
"public void setRootCaData(String data);",
"public void addCert(String certificate) throws ERMgmtException{\n try{\n CertificateFactory certificateFactory = CertificateFactory.getInstance(\"X.509\");\n InputStream certificateInputStream = new ByteArrayInputStream(certificate.getBytes());\n X509Certificate toadd = (X509Certificate) certificateFactory.generateCertificate(certificateInputStream);\n certificateInputStream.close();\n mCertList.add(toadd); \n loadTM(); \n } catch (Exception e){ \n throw new ERMgmtException(\"Trust Manager Error: \", e);\n } \n \n\n }",
"protected final synchronized void setTrustedRootCertificate(\n final X509Certificate newRootCert) throws SAMLEngineException {\n if (newRootCert == null) {\n throw new IllegalArgumentException(\"Root certificate may not be \"\n + \"null\");\n }\n if (this.trustedRootCertificate == null) {\n this.trustedRootCertificate = newRootCert;\n } else {\n throw new SAMLEngineException(\n \"Root certificate cannot be overwritten\");\n }\n }",
"public void checkServerTrusted ( X509Certificate[] chain, String authType ) throws CertificateException { \n //String to hold the issuer of first member in the chain\n String issuer = \"\";\n //String to hold the subject of the first member in the chain\n String subject = \"\";\n //Calendar to get the valid on and expires on date\n Calendar cal=Calendar.getInstance();\n //Date and String to hold the date the certificate was issued on\n Date issuedOn = null;\n String issuedOnString = new String(\"\");\n //Date and String to hold the date the certificate is valid until\n Date expiresOn = null;\n String expiresOnString = new String(\"\");\n //BigInteger to hold the serial number of the certificate\n BigInteger serial = null;\n //the highest certificate in the chain (the root)\n X509Certificate highestCert = null;\n \n try {\n highestCert = chain[0];\n issuer = highestCert.getIssuerX500Principal().toString();\n subject = highestCert.getSubjectX500Principal().toString();\n serial = highestCert.getSerialNumber();\n \n issuedOn = highestCert.getNotBefore();\n cal.setTime(issuedOn);\n issuedOnString = new String((cal.get(Calendar.MONTH)+1) + \"/\"+cal.get(Calendar.DAY_OF_MONTH)+\"/\"+cal.get(Calendar.YEAR));\n expiresOn = highestCert.getNotAfter();\n cal.setTime(expiresOn);\n expiresOnString = new String( (cal.get(Calendar.MONTH)+1) + \"/\"+cal.get(Calendar.DAY_OF_MONTH)+\"/\"+cal.get(Calendar.YEAR));\n \n mTrustManager.checkServerTrusted(chain, authType);\n } catch (CertificateException cx) { \n \t if ( !mAllowUntrusted )\n \t {\n \t\t ERTrustManagerCertificateException erce = new ERTrustManagerCertificateException(\"\\nUntrusted Certificate Found: \"+\n \"\\nIssued by: \"+ issuer + \n \"\\nIssued to: \" + subject + \n \"\\nIssued on: \" + issuedOnString + \n \"\\nExpires on: \" + expiresOnString + \n \"\\nSerial: \" + serial); \n \t\t erce.setCertificate(highestCert);\n \n \t throw erce;\n \t }\n }\n\n }",
"@Test\n\tpublic void testGetCACerts_unTA_ClientCert() {\n\t\tSystem.out.println(\"Beginning TC2017\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\t\tX509Certificate myCert1 = null;\n\t\t\n\t\tassertNotNull(ec);\n\t\t// get a good cert to use for tls authentication\n\t\tmyCert1 = getTrustedCert();\n\n\t\tassertNotNull(myCert1);\n\n\t\tSystem.out.println(\"\\nSetting TLS authentication credentials ...\");\n\n\t\tec.setTLSAuthenticationCredentials(myCert1, mKey);\n\t\t\n\t\t// note - using untrusted trust anchor\n\t\tec.setTrustAnchor(mUntrustedCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Caught Exception as expected: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\tassertNull(newCACerts);\n\t\t\n\t\tSystem.out.println(\"Ending TC2017\");\n\t}",
"@ZAttr(id=1201)\n public void setReverseProxyClientCertCA(String zimbraReverseProxyClientCertCA) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraReverseProxyClientCertCA, zimbraReverseProxyClientCertCA);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"@ZAttr(id=1201)\n public Map<String,Object> setReverseProxyClientCertCA(String zimbraReverseProxyClientCertCA, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraReverseProxyClientCertCA, zimbraReverseProxyClientCertCA);\n return attrs;\n }",
"@Test\n\tpublic void testGetCACerts_ClientCert() {\n\t\tSystem.out.println(\"Beginning TC2011\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\t\tX509Certificate myCert1 = null;\n\t\t\n\t\tassertNotNull(ec);\n\t\t// get a good cert to use for tls authentication\n\t\tmyCert1 = getTrustedCert();\n\n\t\tassertNotNull(myCert1);\n\n\t\tSystem.out.println(\"\\nSetting TLS authentication credentials ...\");\n\n\t\tec.setTLSAuthenticationCredentials(myCert1, mKey);\n\t\t\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Caught Exception as expected: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\tassertNull(newCACerts);\n\t\t\n\t\tSystem.out.println(\"Ending TC2011\");\n\t}",
"public void setCer(String cer) {\n this.cer = cer;\n }",
"private void setTrustedCertificates() {\n TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() {\n public java.security.cert.X509Certificate[] getAcceptedIssuers() {\n return null;\n }\n\n public void checkClientTrusted(X509Certificate[] certs, String authType) {\n }\n\n public void checkServerTrusted(X509Certificate[] certs, String authType) {\n }\n }};\n // Install the all-trusting trust manager\n final SSLContext sc;\n try {\n sc = SSLContext.getInstance(\"TLS\");\n sc.init(null, trustAllCerts, new java.security.SecureRandom());\n } catch (NoSuchAlgorithmException | KeyManagementException e) {\n e.printStackTrace();\n return;\n }\n\n HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());\n // Create all-trusting host name verifier\n HostnameVerifier allHostsValid = new HostnameVerifier() {\n public boolean verify(String hostname, SSLSession session) {\n return true;\n }\n };\n\n // Install the all-trusting host verifier\n HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);\n }",
"public void setUserCertificatesPath(String path);",
"@Test\n\tpublic void testGetCACerts() {\n\t\tSystem.out.println(\"Beginning TC2001\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tassertNotNull(ec);\n\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | CACertsException\n\t\t\t\t| BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertNotNull(newCACerts);\n\t\tif (newCACerts != null) {\n\t\t\tassertFalse(newCACerts.isEmpty());\n\t\t}\n\n\t\tfor (X509Certificate c : newCACerts) {\n\t\t\t// System.out.println(c.toString());\n\t\t\tSystem.out.println(\"Issuer: \" + c.getIssuerDN().getName());\n\t\t\tassertNotNull(c.getIssuerDN().getName());\n\t\t\tassertFalse(c.getIssuerDN().getName().equals(\"\"));\n\t\t}\n\t\tSystem.out.println(\"Ending TC2001\");\n\t}",
"private void setupCertificates(OkHttpClient.Builder builder, final X509Certificate[] certificates) {\n TrustManager[] trustManager = new TrustManager[]{new X509TrustManager() {\n @Override\n public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {\n }\n\n @Override\n public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {\n }\n\n @Override\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[]{};\n }\n }};\n\n try {\n // install the trust manager\n SSLContext sslContext = SSLContext.getInstance(\"SSL\");\n sslContext.init(null, trustManager, new SecureRandom());\n // create an ssl socket factory with our trust manager\n SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();\n\n builder.sslSocketFactory(sslSocketFactory);\n builder.hostnameVerifier(new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n return true;\n }\n });\n } catch (Exception e) {\n MyLog.e(\"HttpClientFactory\", e.getMessage());\n }\n }",
"void setCertificateIssuer(javax.security.auth.x500.X500Principal r1, javax.security.auth.x500.X500Principal r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: sun.security.x509.X509CRLEntryImpl.setCertificateIssuer(javax.security.auth.x500.X500Principal, javax.security.auth.x500.X500Principal):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: sun.security.x509.X509CRLEntryImpl.setCertificateIssuer(javax.security.auth.x500.X500Principal, javax.security.auth.x500.X500Principal):void\");\n }",
"@Test\n\tpublic void testAddX509CertificateToKeyStore() throws KeyStoreException, CertificateException, IOException, NoSuchAlgorithmException, InvalidKeySpecException {\n\t\t\n\t\tX509Certificate cert = DbMock.readCert(\"apache-tomcat.pem\");\n\t\t\n\t\tKeyStore keyStore = KeyStore.getInstance(\"JKS\");\n\t\t//initialize keystore\n\t\tkeyStore.load(null, null);\n\t\t\n\t\tJcaUtils.addX509CertificateToKeyStore(keyStore, \"alias1\", cert);\n\t\t\n\t\t// Save the new keystore contents\n\t\tFileOutputStream out = new FileOutputStream(\"/Users/davide/Downloads/ks.dat\");\n\t\tkeyStore.store(out, \"davidedc\".toCharArray());\n\t\tout.close();\n\t}",
"@Test\n\tpublic void testGetCACerts_TAandTLS() {\n\t\tSystem.out.println(\"Beginning TC2002\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\t\tX509Certificate myCert1 = null;\n\n\t\tassertNotNull(ec);\n\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t// get a good cert to use for tls credentials\n\t\tmyCert1 = getTrustedCert();\n\t\tec.setTLSAuthenticationCredentials(myCert1, mKey);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | CACertsException\n\t\t\t\t| BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertNotNull(newCACerts);\n\t\tif (newCACerts != null) {\n\t\t\tassertFalse(newCACerts.isEmpty());\n\t\t}\n\n\t\tfor (X509Certificate c : newCACerts) {\n\t\t\t// System.out.println(c.toString());\n\t\t\tSystem.out.println(\"Issuer: \" + c.getIssuerDN().getName());\n\t\t\tassertNotNull(c.getIssuerDN().getName());\n\t\t\tassertFalse(c.getIssuerDN().getName().equals(\"\"));\n\t\t}\n\t\tSystem.out.println(\"Ending TC2002\");\n\t}",
"public ERTrustManager(boolean allowUntrustedCert) throws ERMgmtException{\n //loads the default certificates into the trustManager; \n loadDefaults();\n mAllowUntrusted = allowUntrustedCert;\n //add the DataPower Certificates\n addCert(DATAPOWER_CA_CERT_PEM_9005);\n addCert(DATAPOWER_CA_CERT_PEM_9004);\n \n }",
"public SingleCertificateResolver(X509Certificate paramX509Certificate) {\n/* 45 */ this.certificate = paramX509Certificate;\n/* */ }",
"public ClientBuilder certs(List<CertificateInfo> certs) {\n this.certs = Objects.requireNonNull(certs);\n return this;\n }",
"public void validate(KeyStore keyStore, Certificate cert) throws CertificateException\n {\n if (cert != null && cert instanceof X509Certificate)\n {\n ((X509Certificate)cert).checkValidity();\n \n String certAlias = \"[none]\";\n try\n {\n certAlias = keyStore.getCertificateAlias((X509Certificate)cert);\n Certificate[] certChain = keyStore.getCertificateChain(certAlias);\n \n ArrayList<X509Certificate> certList = new ArrayList<X509Certificate>();\n for (Certificate item : certChain)\n {\n if (!(item instanceof X509Certificate))\n {\n throw new CertificateException(\"Invalid certificate type in chain\");\n }\n certList.add((X509Certificate)item);\n }\n \n if (certList.isEmpty())\n {\n throw new CertificateException(\"Invalid certificate chain\");\n \n }\n \n X509CertSelector certSelect = new X509CertSelector();\n certSelect.setCertificate(certList.get(0));\n \n // Configure certification path builder parameters\n PKIXBuilderParameters pbParams = new PKIXBuilderParameters(_trustStore, certSelect);\n pbParams.addCertStore(CertStore.getInstance(\"Collection\", new CollectionCertStoreParameters(certList)));\n \n // Set static Certificate Revocation List\n if (_crls != null && !_crls.isEmpty())\n {\n pbParams.addCertStore(CertStore.getInstance(\"Collection\", new CollectionCertStoreParameters(_crls)));\n }\n \n // Enable revocation checking\n pbParams.setRevocationEnabled(true);\n \n // Set maximum certification path length\n pbParams.setMaxPathLength(_maxCertPathLength);\n \n // Build certification path\n CertPathBuilderResult buildResult = CertPathBuilder.getInstance(\"PKIX\").build(pbParams); \n \n // Validate certification path\n CertPathValidator.getInstance(\"PKIX\").validate(buildResult.getCertPath(),pbParams);\n }\n catch (Exception ex)\n {\n Log.debug(ex);\n throw new CertificateException(\"Unable to validate certificate for alias [\" +\n certAlias + \"]: \" + ex.getMessage());\n }\n } \n }",
"private void setHascert() {\r\n\t\tthis.hascert = true;\r\n\t}",
"public CertificateValidator(KeyStore trustStore, Collection<? extends CRL> crls)\n {\n _trustStore = trustStore;\n _crls = crls;\n }",
"public void setFileCertificates(Certificate[] acFileCertificates)\r\n {\r\n this.acFileCertificates = acFileCertificates;\r\n }",
"protected static void setCertificatePath(String certificatePath) {\n Program.certificatePath = certificatePath;\n Program.authType = AUTH_TYPE.CERT;\n }",
"@Override\n protected Object execute0() throws Exception {\n String msg = \"requestor \" + name;\n\n String conf = Base64.encodeToString(X509Util.parseCert(IoUtil.read(certFile)).getEncoded());\n\n try {\n caManager.changeRequestor(name, RequestorEntry.TYPE_CERT, conf);\n println(\"updated \" + msg);\n return null;\n } catch (CaMgmtException ex) {\n throw new CmdFailure(\"could not update \" + msg + \", error: \" + ex.getMessage(), ex);\n }\n }",
"@Override\n public TelemetryExporterBuilder<T> setTrustedCertificates(byte[] certificates) {\n delegate.setTrustedCertificates(certificates);\n tlsConfigHelper.setTrustManagerFromCerts(certificates);\n return this;\n }",
"private static void installAllCertificates(List<String> certificates, Server ra_ca_server) {\n\t \n\t String resultCertDownload;\n\t List<String> resultCheck;\n\t\tString state = \"\";\n\t\tString result = \"\";\n\t\tString progressPercentage;\n\t\tString additionalInfo = \"\";\n\n\t\tfor (String certificate : certificates) {\n\t\t\ttry {\n\t\t\t\tresultCertDownload = startInstallCertificate(ra_ca_server, certificate);\n\t\t\t\tif (resultCertDownload.equals(\"OK\")) {\n\t\t\t\t\tSystem.out.println(\"STARTED installation of certificate \" + certificate);\n\n\t\t\t\t\twhile (!state.equals(\"FINISHED\")) {\n\n\t\t\t\t\t\tresultCheck = checkInstallCertificates();\n\n\t\t\t\t\t\tstate = resultCheck.get(0);\n\t\t\t\t\t\tresult = resultCheck.get(1);\n\t\t\t\t\t\tprogressPercentage = resultCheck.get(2);\n\t\t\t\t\t\tadditionalInfo = resultCheck.get(3);\n\n\t\t\t\t\t\tif (state.equals(\"RUNNING\")) {\n\t\t\t\t\t\t\tSystem.out.println(\"Certificate \" + progressPercentage);\n\t\t\t\t\t\t\tTimeUnit.SECONDS.sleep(3);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (result.equals(\"SUCCESS\")) {\n\t\t\t\t\t\tSystem.out.println(\"Certificate successfully installed\");\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"FAILED installation of certificate \" + certificate + \"with info :\"\n\t\t\t\t\t\t+ additionalInfo);\n\t\t\t\t\t\tSystem.exit(1);\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"FAILED installation of certificate \" + certificate);\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Test\n\tpublic void testGetCACerts_untrustedTA() {\n\t\tSystem.out.println(\"Beginning TC2013\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tassertNotNull(ec);\n\n\t\t// note - using untrusted trust anchor\n\t\tec.setTrustAnchor(mUntrustedCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (CACertsException cae) {\n\t\t\tSystem.out.println(\"Caught CACertsException as expected: \"\n\t\t\t\t\t+ cae.getMessage());\n\t\t}\n\t\tassertNull(newCACerts);\n\t\tSystem.out.println(\"Ending TC2013\");\n\t}",
"private void addCertificate(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n ensureCertificateIsMutable();\n certificate_.add(value);\n }",
"public static File installBrokerCertificate(AsyncTestSpecification specification) throws Exception {\n String caCertPem = specification.getSecret().getCaCertPem();\n\n // First compute a stripped PEM certificate and decode it from base64.\n String strippedPem = caCertPem.replaceAll(BEGIN_CERTIFICATE, \"\")\n .replaceAll(END_CERTIFICATE, \"\");\n InputStream is = new ByteArrayInputStream(org.apache.commons.codec.binary.Base64.decodeBase64(strippedPem));\n\n // Generate a new x509 certificate from the stripped decoded pem.\n CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n X509Certificate caCert = (X509Certificate)cf.generateCertificate(is);\n\n // Create a new TrustStore using KeyStore API.\n char[] password = TRUSTSTORE_PASSWORD.toCharArray();\n KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());\n ks.load(null, password);\n ks.setCertificateEntry(\"root\", caCert);\n\n File trustStore = File.createTempFile(\"microcks-truststore-\" + System.currentTimeMillis(), \".jks\");\n\n try (FileOutputStream fos = new FileOutputStream(trustStore)) {\n ks.store(fos, password);\n }\n\n return trustStore;\n }",
"List<X509Cert> caCerts(String caName, ReqRespDebug debug) throws CmpClientException, PkiErrorException;",
"@Test\n\tpublic void testGetCACerts_unTAandHTTP() {\n\t\tSystem.out.println(\"Beginning TC2018\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tassertNotNull(ec);\n\n\t\tec.setHTTPCredentials(\"estuser\", \"estpwd\");\n\t\t//ec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Caught Exception as expected: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\tassertNull(newCACerts);\n\t\tSystem.out.println(\"Ending TC2018\");\n\t}",
"@Test\n\tpublic void testGetCACerts_noTA() {\n\t\tSystem.out.println(\"Beginning TC2010\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tassertNotNull(ec);\n\n\t\t// ec.setTrustAnchor(certs);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (CACertsException cae) {\n\t\t\tSystem.out.println(\"Caught CACertsException as expected: \"\n\t\t\t\t\t+ cae.getMessage());\n\t\t}\n\t\tassertNull(newCACerts);\n\t\tSystem.out.println(\"Ending TC2010\");\n\t}",
"public void setCertUri(java.lang.String certUri) {\n this.certUri = certUri;\n }",
"public Builder setCertificate(\n int index, liubaninc.m0.pki.CertificateOuterClass.Certificate value) {\n if (certificateBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureCertificateIsMutable();\n certificate_.set(index, value);\n onChanged();\n } else {\n certificateBuilder_.setMessage(index, value);\n }\n return this;\n }",
"private static String startInstallCertificate(Server RA_CA, String certificate) {\n\t\tString result;\n\t\ttry {\t\n\t\t\t\n\t\t\tString protocol = RA_CA.getProtocol();\n\t\t\tString inet = RA_CA.getInet();\n\t\t\tString tcpPort = RA_CA.getTcpPort();\n\t\t\t\n\t\t\tString location = protocol + \"://\" + inet + \":\" + tcpPort + \"/\" + certificate;\n\t\t\t\n\t\t\tString cmd = currentDir + scriptDir + \"startInstallCertificate.sh \" + location;\n\t\t\t\n\t\t\tProcess p = Runtime.getRuntime().exec(cmd);\n\t\t\tList<String> lines = readOutput(p);\n\t\t\tresult = checkOutput(lines);\n\t\t\tSystem.out.println(\"Result of startInstallCertificate is \" + result);\n\t\t\tif(!result.equals(\"OK\")){\n\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t}catch (Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn \"FAILURE\";\n\t\n\n\t}",
"public void setAuthority(double authority) {\n \tthis.CTCAuthority = authority;\n }",
"public void setTrustStore(String trustStoreLocation) {\n if (!complete) {\n this.trustStoreLocation = trustStoreLocation;\n } else {\n log.warn(\"Connection Descriptor setter used outside of factory.\");\n }\n }",
"@Test\n\tpublic void testGetCACerts_TAandUntrustedTLS() {\n\t\tSystem.out.println(\"Beginning TC2049\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t// Use an untrusted cert for the client\n\t\tec.setTLSAuthenticationCredentials(mUntrustedCert1, mKey);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Caught Exception as expected: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tassertNotNull(newCACerts);\n\t\tSystem.out.println(\"Ending TC2049\");\n\t}",
"public static void \n setDefaultTrustedCertificates(TrustedCertificates trusted) {\n\n trustedCertificates = trusted;\n }",
"@Value.Redacted\n List<X509Certificate> caCert();",
"private static void addUnsafeTrust(OkHttpClient.Builder builder) {\n final TrustManager[] trustAllCerts = new TrustManager[]{\n new X509TrustManager() {\n @Override\n public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {\n }\n\n @Override\n public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {\n }\n\n @Override\n public java.security.cert.X509Certificate[] getAcceptedIssuers() {\n return new java.security.cert.X509Certificate[]{};\n }\n }\n };\n\n // Install the all-trusting trust manager\n SSLContext sslContext = null;\n try {\n sslContext = SSLContext.getInstance(\"SSL\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n try {\n sslContext.init(null, trustAllCerts, new java.security.SecureRandom());\n } catch (KeyManagementException e) {\n e.printStackTrace();\n }\n\n // Create an ssl socket factory with our all-trusting manager\n final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();\n builder.sslSocketFactory(sslSocketFactory, (X509TrustManager) trustAllCerts[0]);\n builder.hostnameVerifier((hostname, session) -> true);\n }",
"@Test\n public void test02ConfRespSignedByDefaultCA() throws Exception {\n log.trace(\">test02ConfRespSignedByDefaultCA\");\n\n this.cmpConfiguration.setResponseProtection(cmpAlias, \"signature\");\n this.cmpConfiguration.setCMPDefaultCA(cmpAlias, this.testx509ca.getSubjectDN());\n this.globalConfigurationSession.saveConfiguration(ADMIN, this.cmpConfiguration);\n\n byte[] nonce = CmpMessageHelper.createSenderNonce();\n byte[] transid = CmpMessageHelper.createSenderNonce();\n\n // Send a confirm message to the CA\n String hash = \"foo123\";\n // the parameter 'null' is to generate a confirm request for a recipient that does not exist\n PKIMessage confirm = genCertConfirm(userDN, null, nonce, transid, hash, 0, PKCSObjectIdentifiers.sha1WithRSAEncryption);\n assertNotNull(confirm);\n ByteArrayOutputStream bao = new ByteArrayOutputStream();\n ASN1OutputStream dOut = ASN1OutputStream.create(bao, ASN1Encoding.DER);\n dOut.writeObject(confirm);\n byte[] ba = bao.toByteArray();\n // Send request and receive response\n byte[] resp = sendCmpHttp(ba, 200, cmpAlias);\n checkCmpResponseGeneral(resp, this.testx509ca.getSubjectDN(), userDN, this.cacert, nonce, transid, true, null, PKCSObjectIdentifiers.sha1WithRSAEncryption.getId());\n checkCmpPKIConfirmMessage(userDN, this.cacert, resp);\n\n log.trace(\"<test02ConfRespSignedByDefaultCA\");\n }",
"public void testOverwriteRootCertificate() {\n try {\n testEngine.setTrustedRootCertificate(null);\n fail(\"Overwriting the root certificate with null \"\n + \"should be impossible\");\n } catch (IllegalArgumentException e) {\n assertNotNull(e);\n } catch (SAMLEngineException e) {\n e.log();\n fail(\"Overwriting the root certificate with null \"\n + \"should raise an IllegalArgumentException, not a \"\n + \"SAMLEngineException\");\n }\n try {\n testEngine.setTrustedRootCertificate(\n testEngine.getTrustedRootCertificate());\n fail(\"Overwriting the root certificate \"\n + \"should be impossible\");\n } catch (SAMLEngineException e) {\n e.log();\n assertNotNull(e);\n }\n }",
"public void setServerRootCaCertificate(String serverRootCaCertificate) {\n this.serverRootCaCertificate = serverRootCaCertificate;\n }",
"public void setCertBuf(Long certBuf) {\n\t\tthis.certBuf = certBuf;\n\t}",
"public void clickAttachCert() {\r\n\t\tattachCert.click();\r\n\t}",
"@Test\n\tpublic void testGetCACerts_HTTPandTA() {\n\t\tSystem.out.println(\"Beginning TC2003\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tassertNotNull(ec);\n\n\t\tec.setHTTPCredentials(\"estuser\", \"estpwd\");\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | CACertsException\n\t\t\t\t| BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tassertNotNull(newCACerts);\n\t\tif (newCACerts != null) {\n\t\t\tassertFalse(newCACerts.isEmpty());\n\t\t}\n\n\t\tfor (X509Certificate c : newCACerts) {\n\t\t\t// System.out.println(c.toString());\n\t\t\tSystem.out.println(\"Issuer: \" + c.getIssuerDN().getName());\n\t\t\tassertNotNull(c.getIssuerDN().getName());\n\t\t\tassertFalse(c.getIssuerDN().getName().equals(\"\"));\n\t\t}\n\t\tSystem.out.println(\"Ending TC2003\");\n\t}",
"public static TrustAnchorsResolver createTrustAnchorProviderWith2tierTestRootCACertificate() {\n return (aaguid) -> {\n Set<TrustAnchor> set = new HashSet<>();\n set.add(new TrustAnchor(load2tierTestRootCACertificate(), null));\n return set;\n };\n }",
"public void setRootService(RootService rootService) throws CertException;",
"public interface X509CertChainValidator\n{\n\t/**\n\t * Performs validation of a provided certificate path.\n\t * @param certPath to be validated\n\t * @return result of validation\n\t */\n\tpublic ValidationResult validate(CertPath certPath);\n\t\n\t/**\n\t * Performs validation of a provided certificate chain.\n\t * @param certChain to be validated\n\t * @return result of validation\n\t */\n\tpublic ValidationResult validate(X509Certificate[] certChain);\n\t\n\t/**\n\t * Returns a list of trusted issuers of certificates. \n\t * @return array containing trusted issuers' certificates\n\t */\n\tpublic X509Certificate[] getTrustedIssuers();\n\t\n\t/**\n\t * Registers a listener which can react to errors found during certificate \n\t * validation. It is useful in two cases: (rarely) if you want to change \n\t * the default logic of the validator and if you will use the validator indirectly\n\t * (e.g. to validate SSL socket connections) and want to get the original \n\t * {@link ValidationError}, not the exception. \n\t * \n\t * @param listener to be registered\n\t */\n\tpublic void addValidationListener(ValidationErrorListener listener);\n\t\n\t/**\n\t * Unregisters a previously registered validation listener. If the listener\n\t * was not registered then the method does nothing. \n\t * @param listener to be unregistered\n\t */\n\tpublic void removeValidationListener(ValidationErrorListener listener);\n\t\n\t\n\t/**\n\t * Registers a listener which can react to errors found during refreshing \n\t * of the trust material: trusted CAs or CRLs. This method is useful only if\n\t * the implementation supports updating of CAs or CRLs, otherwise the listener\n\t * will not be invoked. \n\t * \n\t * @param listener to be registered\n\t */\n\tpublic void addUpdateListener(StoreUpdateListener listener);\n\t\n\t/**\n\t * Unregisters a previously registered CA or CRL update listener. If the listener\n\t * was not registered then the method does nothing. \n\t * @param listener to be unregistered\n\t */\n\tpublic void removeUpdateListener(StoreUpdateListener listener);\n}",
"private static void setAllowAllSSL(HttpsURLConnection httpsConn,\n KeyManager km) throws KeyManagementException, NoSuchAlgorithmException {\n TrustManager[] trustAllCerts = new TrustManager[] {\n new X509TrustManager() {\n @Override\n public java.security.cert.X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[]{};\n }\n\n @Override\n public void checkClientTrusted(\n java.security.cert.X509Certificate[] certs, String authType)\n throws CertificateException {\n }\n\n @Override\n public void checkServerTrusted(\n java.security.cert.X509Certificate[] certs, String authType)\n throws CertificateException {\n }\n }\n };\n KeyManager[] kms = (km == null) ? null : new KeyManager[]{km};\n SSLContext sc = SSLContext.getInstance(\"SSL\");\n sc.init(kms, trustAllCerts, new SecureRandom());\n httpsConn.setSSLSocketFactory(sc.getSocketFactory());\n // Don't check the hostname\n httpsConn.setHostnameVerifier(new NoopHostnameVerifier());\n }",
"@Test\n\tpublic void testGetCACerts_simpleEnroll_TLS() {\n\t\tSystem.out.println(\"Beginning TC2023\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tX509Certificate newCert = null;\n\t\tESTClient ec = new ESTClient();\n\t\tX509Certificate myCert1 = null;\n\n\t\tassertNotNull(ec);\n\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\t\t\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | CACertsException\n\t\t\t\t| BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t\tassertNotNull(newCACerts);\n\t\tif (newCACerts != null) {\n\t\t\tassertFalse(newCACerts.isEmpty());\n\t\t}\n\n\t\t\n\t\t/*\n\t\t * OK, we have the new trust anchor. Let's start a new session\n\t\t * using this TA and attempt a simple enroll.\n\t\t */\n\t\tec = new ESTClient();\n\t\tassertNotNull(ec);\n\n\t\tec.setTrustAnchor(newCACerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t// get a good cert to use for tls credentials\n\t\tmyCert1 = getTrustedCert();\n\t\tec.setTLSAuthenticationCredentials(myCert1, mKey);\n\n\t\t/*\n\t\t * Attempt to provision a new certificate\n\t\t */\n\t\ttry {\n\t\t\tnewCert = ec.sendSimpleEnrollRequest(mCSR, ESTClient.AuthMode.authTLS, mKey, Boolean.FALSE);\n\t\t} catch (InvalidKeyException | CertificateException | IOException\n\t\t\t\t| EncodingException | EnrollException\n\t\t\t\t| EnrollRetryAfterException | BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tassertNotNull(newCert);\n\t\tSystem.out.println(\"Ending TC2023\");\n\t}",
"public SSLOpts setCertValidate(CertValidate certValidate) {\r\n\t\tthis.certValidate = certValidate;\r\n\t\treturn this;\r\n\t}",
"private void assignCertAndKeyPath()\n {\n\n if (CLIENT_PATH_ENV.get(conf) != null &&\n SERVER_PATH_ENV.get(conf) != null) {\n String envVarTlsClientCertPath =\n System.getenv(CLIENT_PATH_ENV.get(conf));\n String envVarTlsClientKeyPath =\n System.getenv(SERVER_PATH_ENV.get(conf));\n if (envVarTlsClientCertPath != null && envVarTlsClientKeyPath != null) {\n // If expected env variables are present, check if file exists\n File certFile = new File(envVarTlsClientCertPath);\n File keyFile = new File(envVarTlsClientKeyPath);\n if (certFile.exists() && keyFile.exists()) {\n // set paths and return if both files exist\n this.certPath = envVarTlsClientCertPath;\n this.keyPath = envVarTlsClientKeyPath;\n return;\n }\n }\n }\n\n // Now we know that we are a Client, without valid env variables\n // We shall try to read off of the default Client path\n if (CLIENT_PATH.get(conf) != null &&\n (new File(CLIENT_PATH.get(conf))).exists()) {\n LOG.error(\"Falling back to CLIENT_PATH (\" + CLIENT_PATH.get(conf) +\n \") since env var path is not valid/env var not present\");\n this.keyPath = CLIENT_PATH.get(conf);\n this.certPath = CLIENT_PATH.get(conf);\n return;\n }\n\n // Looks like default Client also does not exist\n // Time to use the server cert and see if we have any luck\n LOG.error(\"EnvVar and CLIENT_PATH (\" + CLIENT_PATH.get(conf) +\n \") both do not exist/invalid, trying SERVER_PATH(\" +\n SERVER_PATH.get(conf) + \")\");\n this.keyPath = SERVER_PATH.get(conf);\n this.certPath = SERVER_PATH.get(conf);\n }",
"public X509Certificate[] getCertificateChain();",
"public X509Certificate[] getServerCertificateChain() {\n/* */ try {\n/* 208 */ return this.delegate.getServerCertificateChain();\n/* 209 */ } catch (SSLPeerUnverifiedException sSLPeerUnverifiedException) {\n/* */ \n/* */ \n/* */ \n/* 213 */ return null;\n/* */ } \n/* */ }",
"public void resetCertificates()\n\t{\n\t\t// Reset memory. Don't use the inner save.\n\t\tfor (Castle castle : _castles.values())\n\t\t\tcastle.setLeftCertificates(300, false);\n\t\t\n\t\t// Update all castles with a single query.\n\t\ttry (Connection con = L2DatabaseFactory.getInstance().getConnection();\n\t\t\tPreparedStatement ps = con.prepareStatement(RESET_CERTIFICATES))\n\t\t{\n\t\t\tps.executeUpdate();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tLOGGER.error(\"Failed to reset certificates.\", e);\n\t\t}\n\t}",
"public static void installTrustManagerNotValidatingCertificateChains() throws NoSuchAlgorithmException,\n KeyManagementException\n {\n // see http://code.google.com/p/misc-utils/wiki/JavaHttpsUrl\n SSLContext sslContext = SSLContext.getInstance(\"SSL\");\n sslContext.init(null, new TrustManager[] {createTrustManagerNotValidatingCertificateChains()}, new java.security.SecureRandom());\n HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());\n }",
"private static void handleSSLCertificate() throws Exception {\n\t\tTrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\n\t\t\tpublic X509Certificate[] getAcceptedIssuers() {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tpublic void checkClientTrusted(X509Certificate[] certs,\n\t\t\t\t\tString authType) {\n\t\t\t\t// Trust always\n\t\t\t}\n\n\t\t\tpublic void checkServerTrusted(X509Certificate[] certs,\n\t\t\t\t\tString authType) {\n\t\t\t\t// Trust always\n\t\t\t}\n\t\t} };\n\n\t\t// Install the all-trusting trust manager\n\t\tSSLContext sc = SSLContext.getInstance(\"SSL\");\n\t\t// Create empty HostnameVerifier\n\t\tHostnameVerifier hv = new HostnameVerifier() {\n\t\t\tpublic boolean verify(String arg0, SSLSession arg1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\n\t\tsc.init(null, trustAllCerts, new java.security.SecureRandom());\n\t\tHttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());\n\t\tHttpsURLConnection.setDefaultHostnameVerifier(hv);\n\t}",
"public void updateCertificateEnter(String certificateId) throws ClassNotFoundException, SQLException;",
"@Override\n protected void createConnectionOptions(ClientOptions clientOptions) {\n if (clientOptions.getOption(ClientOptions.CON_SSL_TRUST_ALL).hasParsedValue()) {\n try {\n SSLContext ctx = SSLContext.getInstance(\"TLS\");\n ctx.init(new KeyManager[0], new TrustManager[]{new TrustingTrustManager()}, null);\n SSLContext.setDefault(ctx);\n } catch (NoSuchAlgorithmException | KeyManagementException e) {\n throw new RuntimeException(\"Could not set up the all-trusting TrustManager\", e);\n }\n }\n\n // Configure SSL options, which in case of activemq-client are set as Java properties\n // http://activemq.apache.org/how-do-i-use-ssl.html\n // https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#CustomizingStores\n\n if (clientOptions.getOption(ClientOptions.CON_SSL_KEYSTORE_LOC).hasParsedValue()) {\n System.setProperty(\"javax.net.ssl.keyStore\", relativize(clientOptions.getOption(ClientOptions.CON_SSL_KEYSTORE_LOC).getValue()));\n }\n if (clientOptions.getOption(ClientOptions.CON_SSL_KEYSTORE_PASS).hasParsedValue()) {\n System.setProperty(\"javax.net.ssl.keyStorePassword\", clientOptions.getOption(ClientOptions.CON_SSL_KEYSTORE_PASS).getValue());\n }\n// System.setProperty(\"javax.net.ssl.keyStorePassword\", \"secureexample\");\n if (clientOptions.getOption(ClientOptions.CON_SSL_TRUSTSTORE_LOC).hasParsedValue()) {\n System.setProperty(\"javax.net.ssl.trustStore\", relativize(clientOptions.getOption(ClientOptions.CON_SSL_TRUSTSTORE_LOC).getValue()));\n }\n if (clientOptions.getOption(ClientOptions.CON_SSL_TRUSTSTORE_PASS).hasParsedValue()) {\n System.setProperty(\"javax.net.ssl.trustStorePassword\", clientOptions.getOption(ClientOptions.CON_SSL_TRUSTSTORE_PASS).getValue());\n }\n if (clientOptions.getOption(ClientOptions.CON_SSL_STORE_TYPE).hasParsedValue()) {\n System.setProperty(\"javax.net.ssl.keyStoreType\", clientOptions.getOption(ClientOptions.CON_SSL_STORE_TYPE).getValue());\n System.setProperty(\"javax.net.ssl.trustStoreType\", clientOptions.getOption(ClientOptions.CON_SSL_STORE_TYPE).getValue());\n }\n\n super.createConnectionOptions(clientOptions);\n }",
"public static void updatesTheSpecifiedTrustedIdentityProvider(\n com.azure.resourcemanager.datalakestore.DataLakeStoreManager manager) {\n TrustedIdProvider resource =\n manager\n .trustedIdProviders()\n .getWithResponse(\n \"contosorg\", \"contosoadla\", \"test_trusted_id_provider_name\", com.azure.core.util.Context.NONE)\n .getValue();\n resource.update().withIdProvider(\"https://sts.windows.net/ea9ec534-a3e3-4e45-ad36-3afc5bb291c1\").apply();\n }",
"private void installTrustStore() {\n if (trustStoreType != null) {\n System.setProperty(\"javax.net.ssl.trustStore\", trustStore);\n if (trustStoreType != null) {\n System.setProperty(\"javax.net.ssl.trustStoreType\", trustStoreType);\n }\n if (trustStorePassword != null) {\n System.setProperty(\"javax.net.ssl.trustStorePassword\", trustStorePassword);\n }\n }\n }",
"private X509Certificate getTrustedCert() {\n\t\tSystem.out.println(\"Beginning getTrustedCert ...\");\n\t\tESTClient ec = new ESTClient();\n\t\tX509Certificate newCert = null;\n\t\t\n\t\tassertNotNull(ec);\n\t\t\n\t\tmCerts = Helpers.loadTA(mTrustDB);\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setHTTPCredentials(\"estuser\", \"estpwd\");\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to provision a new certificate\n\t\t */\n\t\ttry {\n\t\t\tnewCert = ec.sendSimpleEnrollRequest(mCSR, ESTClient.AuthMode.authHTTPonly, mKey, Boolean.FALSE);\n\t\t} catch (InvalidKeyException\n\t\t\t\t| CertificateException | IOException | EncodingException\n\t\t\t\t| EnrollException | EnrollRetryAfterException | BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newCert;\n\t}",
"private SSLContext initSSLContext() {\n KeyStore ks = KeyStoreUtil.loadSystemKeyStore();\n if (ks == null) {\n _log.error(\"Key Store init error\");\n return null;\n }\n if (_log.shouldLog(Log.INFO)) {\n int count = KeyStoreUtil.countCerts(ks);\n _log.info(\"Loaded \" + count + \" default trusted certificates\");\n }\n\n File dir = new File(_context.getBaseDir(), CERT_DIR);\n int adds = KeyStoreUtil.addCerts(dir, ks);\n int totalAdds = adds;\n if (adds > 0 && _log.shouldLog(Log.INFO))\n _log.info(\"Loaded \" + adds + \" trusted certificates from \" + dir.getAbsolutePath());\n if (!_context.getBaseDir().getAbsolutePath().equals(_context.getConfigDir().getAbsolutePath())) {\n dir = new File(_context.getConfigDir(), CERT_DIR);\n adds = KeyStoreUtil.addCerts(dir, ks);\n totalAdds += adds;\n if (adds > 0 && _log.shouldLog(Log.INFO))\n _log.info(\"Loaded \" + adds + \" trusted certificates from \" + dir.getAbsolutePath());\n }\n dir = new File(System.getProperty(\"user.dir\"));\n if (!_context.getBaseDir().getAbsolutePath().equals(dir.getAbsolutePath())) {\n dir = new File(_context.getConfigDir(), CERT_DIR);\n adds = KeyStoreUtil.addCerts(dir, ks);\n totalAdds += adds;\n if (adds > 0 && _log.shouldLog(Log.INFO))\n _log.info(\"Loaded \" + adds + \" trusted certificates from \" + dir.getAbsolutePath());\n }\n if (_log.shouldLog(Log.INFO))\n _log.info(\"Loaded total of \" + totalAdds + \" new trusted certificates\");\n\n try {\n SSLContext sslc = SSLContext.getInstance(\"TLS\");\n TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());\n tmf.init(ks);\n X509TrustManager defaultTrustManager = (X509TrustManager)tmf.getTrustManagers()[0];\n _stm = new SavingTrustManager(defaultTrustManager);\n sslc.init(null, new TrustManager[] {_stm}, null);\n /****\n if (_log.shouldLog(Log.DEBUG)) {\n SSLEngine eng = sslc.createSSLEngine();\n SSLParameters params = sslc.getDefaultSSLParameters();\n String[] s = eng.getSupportedProtocols();\n Arrays.sort(s);\n _log.debug(\"Supported protocols: \" + s.length);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n s = eng.getEnabledProtocols();\n Arrays.sort(s);\n _log.debug(\"Enabled protocols: \" + s.length);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n s = params.getProtocols();\n if (s == null)\n s = new String[0];\n _log.debug(\"Default protocols: \" + s.length);\n Arrays.sort(s);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n s = eng.getSupportedCipherSuites();\n Arrays.sort(s);\n _log.debug(\"Supported ciphers: \" + s.length);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n s = eng.getEnabledCipherSuites();\n Arrays.sort(s);\n _log.debug(\"Enabled ciphers: \" + s.length);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n s = params.getCipherSuites();\n if (s == null)\n s = new String[0];\n _log.debug(\"Default ciphers: \" + s.length);\n Arrays.sort(s);\n for (int i = 0; i < s.length; i++) {\n _log.debug(s[i]);\n }\n }\n ****/\n return sslc;\n } catch (GeneralSecurityException gse) {\n _log.error(\"Key Store update error\", gse);\n } catch (ExceptionInInitializerError eiie) {\n // java 9 b134 see ../crypto/CryptoCheck for example\n // Catching this may be pointless, fetch still fails\n _log.error(\"SSL context error - Java 9 bug?\", eiie);\n }\n return null;\n }",
"public ImportCertificateRequest withCertificateChain(java.nio.ByteBuffer certificateChain) {\n setCertificateChain(certificateChain);\n return this;\n }",
"private void addAllCertificate(\n java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {\n ensureCertificateIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, certificate_);\n }",
"public Builder setCertificate(\n int index, com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setCertificate(index, value);\n return this;\n }",
"public CertAuthClient addCertificationAuthentication(Consumer<Communique> certAuth)\n\t\t{\n\t\t\tthis.certAuth = this.certAuth.andThen(certAuth);\n\t\t\treturn this;\n\t\t}",
"public boolean addCertificate(SubjectInfo subjectInfo, boolean isCa){\n if(myDatabase.containsValid(subjectInfo.getOrganisation() +\"-\"+ subjectInfo.getOrganisationUnit()))\n return false;\n X500Name x500Name = generateX500Name(subjectInfo);\n String serial = String.valueOf(myDatabase.getCounter());\n\n Calendar calendar = Calendar.getInstance();\n Date startDate = calendar.getTime();\n calendar.add(Calendar.YEAR, 2); // Certificate duration will be fixed at 2 years\n Date endDate = calendar.getTime();\n\n KeyPair keyPair = generateKeyPair();\n\n IssuerData issuerData = generateIssuerData(subjectInfo.getDesiredSigner());\n SubjectData subjectData = new SubjectData(keyPair.getPublic(), x500Name, serial, startDate, endDate);\n\n X509Certificate certificate = certificateGenerator.generateCertificate(subjectData, issuerData, isCa);\n\n keyStoreWriter.loadKeyStore(null, keystorePassword.toCharArray());\n keyStoreWriter.write(serial, keyPair.getPrivate(), keystorePassword.toCharArray(), certificate);\n keyStoreWriter.saveKeyStore(keystoreFile, keystorePassword.toCharArray());\n myDatabase.writeNew(true,subjectInfo.getOrganisation() + \"-\" + subjectInfo.getOrganisationUnit());\n return true;\n }",
"private void loadTM() throws ERMgmtException{\n try{\n KeyStore ts = KeyStore.getInstance(KeyStore.getDefaultType());\n //random number generate to generated aliases for the new keystore\n Random generator = new Random();\n \n ts.load(null, null);\n \n if(mCertList.size() > 0){\n for(int i=0; i<mCertList.size(); i++){\n int randomInt = generator.nextInt();\n while(ts.containsAlias(\"certificate\"+randomInt)){\n randomInt = generator.nextInt();\n }\n ts.setCertificateEntry(\"certificate\"+randomInt, (X509Certificate) mCertList.get(i));\n } \n mTrustManagerFactory.init(ts); \n } else { \n mTrustManagerFactory.init((KeyStore) null);\n }\n \n TrustManager[] tm = mTrustManagerFactory.getTrustManagers();\n for(int i=0; i<tm.length; i++){\n if (tm[i] instanceof X509TrustManager) {\n mTrustManager = (X509TrustManager)tm[i]; \n break;\n }\n }\n \n } catch (Exception e){ \n throw new ERMgmtException(\"Trust Manager Error\", e);\n }\n \n }",
"public abstract T useTransportSecurity(File certChain, File privateKey);",
"@Test\n\tpublic void testGetCACerts_ClientCertV6() {\n\t\tSystem.out.println(\"Beginning TC2035\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\t\tX509Certificate myCert1 = null;\n\t\t\n\t\tassertNotNull(ec);\n\t\t// get a good cert to use for tls authentication\n\t\tmyCert1 = getTrustedCert();\n\n\t\tassertNotNull(myCert1);\n\n\t\tSystem.out.println(\"\\nSetting TLS authentication credentials ...\");\n\n\t\tec.setTLSAuthenticationCredentials(myCert1, mKey);\n\t\t\n\t\t// ipv6\n\t\tec.setServerName(\"ip6-localhost\");\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Caught Exception as expected: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\tassertNull(newCACerts);\n\t\t\n\t\tSystem.out.println(\"Ending TC2035\");\n\t}",
"public static void main(String[] args) {\n\t\ttry{\r\n\t\t\tInputStreamReader Flujo = new InputStreamReader(System.in);\r\n\r\n\t\t\tBufferedReader teclado = new BufferedReader(Flujo);\r\n\t\t\tSystem.out.print(\"Introducir Nombre Certificado: \" );\r\n\t\t\tString NameFile=teclado.readLine();\r\n\t\t\tSystem.out.println(\"Nombre fichero:\"+NameFile );\r\n\t\t\tFileInputStream fr = new FileInputStream(NameFile);\r\n\r\n\r\n\r\n\t\t\tCertificateFactory cf = CertificateFactory.getInstance(\"X509\");\r\n\t\t\tX509Certificate c = (X509Certificate) cf.generateCertificate(fr);\r\n\r\n\t\t\tSystem.out.println(\"Certificado Leido \\n\");\r\n\r\n\r\n\r\n\t\t\t//lectura certificado CA\r\n\t\t\tInputStreamReader Flujo3 = new InputStreamReader(System.in);\r\n\t\t\tBufferedReader teclado3 = new BufferedReader(Flujo3);\r\n\t\t\tSystem.out.print(\"Introducir Nombre Certificado CA(*.pem): \" );\r\n\t\t\tString NameFile3=teclado3.readLine();\r\n\t\t\tSystem.out.println(\"Leido nombre fichero CA:\"+NameFile3 );\r\n\r\n\r\n\t\t\tFileInputStream fr3 = new FileInputStream(NameFile3);\r\n\r\n\t\t\tCertificateFactory cf3 = CertificateFactory.getInstance(\"X509\");\r\n\t\t\tX509Certificate c3 = (X509Certificate) cf3.generateCertificate(fr3);\r\n\r\n\t\t\tPublicKey publicKeyCA=c3.getPublicKey();\r\n\t\t\tfr3.close();\r\n\t\t\tc.verify(publicKeyCA);\r\n\r\n\t\t\t//lectura del fichero crl.pem\r\n\r\n\t\t\tInputStreamReader Flujo2 = new InputStreamReader(System.in);\r\n\t\t\tBufferedReader teclado2 = new BufferedReader(Flujo2);\r\n\t\t\tSystem.out.print(\"Introducir Nombre fichero certificados revocados(*.pem): \" );\r\n\t\t\tString NameFile2=teclado2.readLine();\r\n\t\t\tSystem.out.println(\"Leido nombre fichero crl:\"+NameFile2);\r\n\r\n\t\t\tFileInputStream inStream = new FileInputStream(NameFile2);\r\n\r\n\t\t\tCertificateFactory cf1 = CertificateFactory.getInstance(\"X.509\");\r\n\r\n\t\t\tX509CRL crl = (X509CRL) cf1.generateCRL(inStream);\r\n\r\n\t\t\t//Imprime los campos del certificado en forma de string\r\n\r\n\t\t\tinStream.close();\r\n\r\n\t\t\tFileWriter fichSalida = new FileWriter(\"log.txt\");\r\n\t\t\tBufferedWriter fs= new BufferedWriter(fichSalida);\r\n\r\n\t\t\tif(crl.isRevoked(c)){\r\n\t\t\t\tSystem.out.println(\"Certificado \"+NameFile+\" Revocado\");\r\n\t\t\t\tfs.write(\"\\n Certificado \"+NameFile+\" Revocado\");\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"Certificado \"+NameFile+\" NO revocado\");\r\n\t\t\t\tfs.write(\"\\n Certificado \"+NameFile+\" NO revocado\");\r\n\t\t\t}\t\r\n\t\t\tcrl.verify(publicKeyCA);\t\t\t\t\t\t\r\n\r\n\t\t\tSystem.out.println(\"\\n Fichero CRL \"+NameFile2+\" HA SIDO FIRMADO POR LA CA\");\r\n\t\t\tfs.write(\"\\n Fichero CRL \"+NameFile2+\" HA SIDO FIRMADO POR LA CA\");\r\n\t\t\t\r\n\t\t\tSet setEntries=crl.getRevokedCertificates();\r\n\t\t\tif(setEntries!=null && setEntries.isEmpty()==false){\r\n\t\t\t\tfor(Iterator iterator = setEntries.iterator(); iterator.hasNext();){\r\n\t\t\t\t\tX509CRLEntry x509crlentry = (X509CRLEntry) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"serial number=\"+x509crlentry.getSerialNumber());\r\n\t\t\t\t\tSystem.out.println(\"revocacion date=\"+x509crlentry.getRevocationDate());\r\n\t\t\t\t\tSystem.out.println(\"extensions=\"+x509crlentry.hasExtensions());\r\n\t\t\t\t}\r\n\t\t\t}\t\t\r\n\r\n\t\t\tfs.close();\r\n\r\n\t\t}catch (Exception e) {\r\n\t\t\te.printStackTrace( );\r\n\t\t}\r\n\t}",
"@Override\n public void checkServerTrusted(\n java.security.cert.X509Certificate[] certs, String authType)\n throws CertificateException {\n InputStream inStream = null;\n try {\n // Loading the CA cert\n URL u = getClass().getResource(\"dstca.cer\");\n inStream = new FileInputStream(u.getFile());\n CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n X509Certificate ca = (X509Certificate) cf.generateCertificate(inStream);\n inStream.close();\n //if(certs[0].getSignature().equals(ca.getSignature()))\n for (int i = 0; i < certs.length ; i++) {\n X509Certificate cert = certs[i];\n // Verifing by public key\n try{\n cert.verify(certs[i+1].getPublicKey());\n }catch (Exception e) {\n cert.verify(ca.getPublicKey());\n }\n }\n } catch (Exception ex) {\n Monitor.logger(ex.getLocalizedMessage());\n ex.printStackTrace();\n throw new CertificateException(ex);\n } finally {\n try {\n inStream.close();\n } catch (IOException ex) {\n Monitor.logger(ex.getLocalizedMessage());\n ex.printStackTrace();\n }\n }\n\n }",
"public void beforeHookedMethod(MethodHookParam param) throws Throwable {\n param.args[0] = new TrustAllSSLSocketFactory();\n }",
"@Test\n\tpublic void testGetCACerts_simpleEnroll() {\n\t\tSystem.out.println(\"Beginning TC2019\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tX509Certificate newCert = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tassertNotNull(ec);\n\n\t\tec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\t\t\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (CertificateException | IOException | CACertsException\n\t\t\t\t| BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t\tassertNotNull(newCACerts);\n\t\tif (newCACerts != null) {\n\t\t\tassertFalse(newCACerts.isEmpty());\n\t\t}\n\n\t\t\n\t\t/*\n\t\t * OK, we have the new trust anchor. Let's start a new session\n\t\t * using this TA and attempt a simple enroll.\n\t\t */\n\t\tec = new ESTClient();\n\t\tassertNotNull(ec);\n\n\t\tec.setTrustAnchor(newCACerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setHTTPCredentials(\"estuser\", \"estpwd\");\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to provision a new certificate\n\t\t */\n\t\ttry {\n\t\t\tnewCert = ec.sendSimpleEnrollRequest(mCSR, ESTClient.AuthMode.authHTTPonly, mKey, Boolean.FALSE);\n\t\t} catch (InvalidKeyException | CertificateException | IOException\n\t\t\t\t| EncodingException | EnrollException\n\t\t\t\t| EnrollRetryAfterException | BufferSizeException e) {\n\t\t\tfail(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tassertNotNull(newCert);\n\t\tSystem.out.println(\"Ending TC2019\");\n\t}",
"@Override\n public void checkClientTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n finalDefaultTm.checkClientTrusted(chain, authType);\n }",
"@Test\n public void testHttps_simplepem() throws Exception {\n if (\"true\".equals(System.getProperty(\"io.r2.skipLongTests\"))) throw new SkipException(\"Long test skipped\");\n\n KeyStore ks = KeyStore.getInstance(\"simplepem\");\n ks.load(new MultiFileConcatSource()\n .alias(\"server\")\n .add(\"src/test/resources/certchain.pem\")\n .add(\"src/test/resources/key.pem\")\n .build(),\n new char[0]\n );\n\n KeyManagerFactory kmf = KeyManagerFactory.getInstance(\"simplepemreload\");\n kmf.init( ExpiringCacheKeyManagerParameters.forKeyStore(ks).withRevalidation(5) );\n\n KeyManager[] km = kmf.getKeyManagers();\n assertThat(km).hasSize(1);\n\n SSLContext ctx = SSLContext.getInstance(\"TLSv1.2\");\n ctx.init(km, null, null);\n\n HttpsServer server = startHttpsServer(ctx);\n\n try {\n HttpsURLConnection conn = createClientConnection();\n\n assertThat(conn.getPeerPrincipal().getName()).isEqualTo(\"CN=anna.apn2.com\");\n\n ks.load(new MultiFileConcatSource()\n .alias(\"server\")\n .add(\"src/test/resources/selfcert.pem\")\n .add(\"src/test/resources/selfkey.pem\")\n .build(),\n new char[0]\n );\n\n Thread.sleep(10000); // wait for picking up the change in 5 seconds (+extra)\n\n HttpsURLConnection conn2 = createClientConnection();\n\n assertThat(conn2.getPeerPrincipal().getName()).isEqualTo(\"CN=self.signed.cert,O=Radical Research,ST=NA,C=IO\");\n\n }\n finally {\n // stop server\n server.stop(0);\n }\n }",
"@VisibleForTesting\n IkeAuthDigitalSignRemoteConfig(@Nullable X509Certificate caCert) {\n super(IKE_AUTH_METHOD_PUB_KEY_SIGNATURE, AUTH_DIRECTION_REMOTE);\n if (caCert == null) {\n mTrustAnchor = null;\n } else {\n // The name constraints extension, defined in RFC 5280, indicates a name space\n // within which all subject names in subsequent certificates in a certification path\n // MUST be located.\n mTrustAnchor = new TrustAnchor(caCert, null /*nameConstraints*/);\n\n // TODO: Investigate if we need to support the name constraints extension.\n }\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void setChain(Set chain) \n\t{\n\t\tfor(Object c : chain)\n\t\t{\n\t\t\tthis.cars.add(c);\n\t\t}\n\t}",
"@Test\n\tpublic void testGetCACerts_HTTPandNoTA() {\n\t\tSystem.out.println(\"Beginning TC2012\");\n\t\tArrayList<X509Certificate> newCACerts = null;\n\t\tESTClient ec = new ESTClient();\n\n\t\tassertNotNull(ec);\n\n\t\tec.setHTTPCredentials(\"estuser\", \"estpwd\");\n\t\t//ec.setTrustAnchor(mCerts);\n\t\tec.setServerName(mTestServer);\n\t\tec.setServerPort(mTestPort);\n\t\tec.setNativeLogLevel(NativeLogLevel.logFull);\n\n\t\t/*\n\t\t * Attempt to fetch the latest CA certs from the EST server\n\t\t */\n\t\ttry {\n\t\t\tnewCACerts = ec.fetchLatestCACerts();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Caught Exception as expected: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t\tassertNull(newCACerts);\n\t\tSystem.out.println(\"Ending TC2012\");\n\t}",
"public final ArrayList<CertificateV2>\n getCertificateChain_() { return certificateChain_; }",
"@Override\n public String getCACertificate() throws IOException {\n LOGGER.debug(\"Getting CA certificate.\");\n try {\n return getPEMEncodedString(\n scmCertificateServer.getCaCertPath());\n } catch (CertificateException e) {\n throw new SCMSecurityException(\"getRootCertificate operation failed. \",\n e, GET_CA_CERT_FAILED);\n }\n }",
"@Test\n public void testHttps_simplepemreload() throws Exception {\n if (\"true\".equals(System.getProperty(\"io.r2.skipLongTests\"))) throw new SkipException(\"Long test skipped\");\n\n copyCertKey(\"certchain.pem\", \"key.pem\");\n\n KeyStore ks = getKeyStore();\n\n KeyManagerFactory kmf = KeyManagerFactory.getInstance(\"simplepemreload\");\n kmf.init( ExpiringCacheKeyManagerParameters.forKeyStore(ks).withRevalidation(5) );\n\n KeyManager[] km = kmf.getKeyManagers();\n assertThat(km).hasSize(1);\n\n SSLContext ctx = SSLContext.getInstance(\"TLSv1.2\");\n ctx.init(km, null, null);\n\n HttpsServer server = startHttpsServer(ctx);\n\n try {\n HttpsURLConnection conn = createClientConnection();\n\n assertThat(conn.getPeerPrincipal().getName()).isEqualTo(\"CN=anna.apn2.com\");\n\n Thread.sleep(1000); // avoid very quick overwriting of file in case of quick test run\n\n copyCertKey(\"selfcert.pem\", \"selfkey.pem\");\n\n Thread.sleep(10000); // wait for picking up the change in 5 seconds (+extra)\n\n HttpsURLConnection conn2 = createClientConnection();\n\n assertThat(conn2.getPeerPrincipal().getName()).isEqualTo(\"CN=self.signed.cert,O=Radical Research,ST=NA,C=IO\");\n\n }\n finally {\n // stop server\n server.stop(0);\n }\n }",
"private void createClientKeyStoreServerTrustStore(KeyStore clientKeyStore, KeyStore serverTrustStore) throws Exception {\n X500Principal DN = new X500Principal(\"CN=testclient2.example.com, OU=JBoss, O=Red Hat, L=Raleigh, ST=North Carolina, C=US\");\n SelfSignedX509CertificateAndSigningKey selfSignedX509CertificateAndSigningKey = SelfSignedX509CertificateAndSigningKey.builder()\n .setKeyAlgorithmName(\"DSA\")\n .setSignatureAlgorithmName(\"SHA1withDSA\")\n .setDn(DN)\n .setKeySize(1024)\n .build();\n X509Certificate certificate = selfSignedX509CertificateAndSigningKey.getSelfSignedCertificate();\n clientKeyStore.setKeyEntry(\"dnsincnclient\", selfSignedX509CertificateAndSigningKey.getSigningKey(), KEYSTORE_PASSWORD, new X509Certificate[]{certificate});\n serverTrustStore.setCertificateEntry(\"cn=testclient2.example.com,ou=jboss,o=red hat,l=raleigh,st=north carolina,c=us\", certificate);\n\n\n // Generate Test Authority self signed certificate\n final X500Principal CA_DN = new X500Principal(\"CN=Test Authority, OU=JBoss, O=Red Hat, L=Raleigh, ST=North Carolina, C=US\");\n selfSignedX509CertificateAndSigningKey = SelfSignedX509CertificateAndSigningKey.builder()\n .setDn(CA_DN)\n .setKeyAlgorithmName(\"RSA\")\n .setSignatureAlgorithmName(\"SHA256withRSA\")\n .addExtension(new BasicConstraintsExtension(false, true, -1))\n .build();\n final X509Certificate caCertificate = selfSignedX509CertificateAndSigningKey.getSelfSignedCertificate();\n final PrivateKey caKey = selfSignedX509CertificateAndSigningKey.getSigningKey();\n\n // Generate Test Client 1 self signed certificate\n DN = new X500Principal(\"CN=Test Client 1, OU=JBoss, O=Red Hat, L=Raleigh, ST=North Carolina, C=US\");\n selfSignedX509CertificateAndSigningKey = SelfSignedX509CertificateAndSigningKey.builder()\n .setDn(DN)\n .setKeyAlgorithmName(\"RSA\")\n .setSignatureAlgorithmName(\"SHA256withRSA\")\n .addExtension(false, \"SubjectAlternativeName\", \"DNS:testclient1.example.com\")\n .build();\n certificate = selfSignedX509CertificateAndSigningKey.getSelfSignedCertificate();\n clientKeyStore.setKeyEntry(\"testclient1\", selfSignedX509CertificateAndSigningKey.getSigningKey(), KEYSTORE_PASSWORD, new X509Certificate[]{certificate});\n serverTrustStore.setCertificateEntry(\"cn=test client 1,ou=jboss,o=red hat,l=raleigh,st=north carolina,c=us\", certificate);\n\n\n // Generate Signed Test Client certificate signed by Test Authority\n X500Principal subjectDN = new X500Principal(\"CN=Signed Test Client, OU=JBoss, O=Red Hat, ST=North Carolina, C=US\");\n\n KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(\"RSA\");\n KeyPair generatedKeys = keyPairGenerator.generateKeyPair();\n PrivateKey privateKey = generatedKeys.getPrivate();\n PublicKey publicKey = generatedKeys.getPublic();\n\n /*\n * The CA certificate is added using the alias of the client it is tested with, this is not really how the trust store should\n * be populated but as the test is also relying on the truststore to back the realm it needs to find an entry for the client\n * and we do not want to add the clients actual certificate as the test is testing CA signed certs.\n */\n serverTrustStore.setCertificateEntry(\"cn=signed test client,ou=jboss,o=red hat,st=north carolina,c=us\", caCertificate);\n\n certificate = new X509CertificateBuilder()\n .setIssuerDn(CA_DN)\n .setSubjectDn(subjectDN)\n .setSignatureAlgorithmName(\"SHA256withRSA\")\n .setSigningKey(caKey)\n .setPublicKey(publicKey)\n .build();\n clientKeyStore.setKeyEntry(\"testclientsignedbyca\", privateKey, KEYSTORE_PASSWORD, new X509Certificate[]{certificate});\n }",
"@Override\r\n\t\t\tpublic void checkClientTrusted(X509Certificate[] chain, String authType)\r\n\t\t\t\t\tthrows CertificateException {\n\t\t\t\t\r\n\t\t\t}",
"private static void doCACertVerification(final IHealthCard cardInt, final IHealthCard cardExt,\n final CardFileSystemData cardExtFs) {\n result = result.flatMap(__ -> new ReadCommand(cardExtFs.cvcCASfid, 0).executeOn(cardExt))\n .validate(Response.ResponseStatus.SUCCESS::validateResult)\n .map(Response::getResponseData)\n .map(GemCvCertificate::new)\n .flatMap(caCertificateFromExt -> new ManageSecurityEnvironmentCommand(\n ManageSecurityEnvironmentCommand.MseUseCase.KEY_SELECTION_FOR_CV_CERTIFICATE_VALIDATION, caCertificateFromExt)\n .executeOn(cardInt)\n .validate(Response.ResponseStatus.SUCCESS::validateResult)\n .flatMap(__ -> new PsoVerifyCertificateCommand(caCertificateFromExt)\n .executeOn(cardInt)\n .validate(Response.ResponseStatus.SUCCESS::validateResult)));\n }",
"public ValidationResult validate(X509Certificate[] certChain);"
] | [
"0.6536759",
"0.61586666",
"0.5863336",
"0.5798228",
"0.57451296",
"0.5705473",
"0.5673754",
"0.56547457",
"0.5610016",
"0.55805343",
"0.55674547",
"0.5511671",
"0.5488636",
"0.54463106",
"0.54388463",
"0.539568",
"0.5370848",
"0.53283185",
"0.5327289",
"0.53093415",
"0.53059727",
"0.5295654",
"0.52601326",
"0.52310663",
"0.5221369",
"0.5211157",
"0.5196004",
"0.51956403",
"0.5164249",
"0.51509315",
"0.51336753",
"0.51331073",
"0.51067144",
"0.5103131",
"0.50874394",
"0.50625825",
"0.50373256",
"0.50181705",
"0.4993049",
"0.4986453",
"0.49767435",
"0.49729374",
"0.4961158",
"0.49567774",
"0.49531254",
"0.49530047",
"0.49430573",
"0.49421695",
"0.49134755",
"0.4910454",
"0.48784187",
"0.48718587",
"0.4864506",
"0.4857875",
"0.48565158",
"0.48512018",
"0.48508558",
"0.4844696",
"0.48442376",
"0.48412406",
"0.48338407",
"0.482204",
"0.48134032",
"0.48112386",
"0.47972602",
"0.47899956",
"0.4777695",
"0.47771284",
"0.47762755",
"0.477172",
"0.4764561",
"0.47642514",
"0.4763005",
"0.47613686",
"0.47568431",
"0.4751111",
"0.47431308",
"0.47427192",
"0.47349283",
"0.47304532",
"0.4717176",
"0.4705768",
"0.47031656",
"0.47016108",
"0.46924052",
"0.46800023",
"0.46772423",
"0.4662809",
"0.46618515",
"0.46429747",
"0.4641299",
"0.4637405",
"0.46357736",
"0.46207458",
"0.46203688",
"0.46176952",
"0.46129227",
"0.46089903",
"0.46076426",
"0.46051022",
"0.46019867"
] | 0.0 | -1 |
/ Persist a new employee to the Data Source and then updated associated data/tables. | public Employee saveNewEmployee(EmployeeDto newEmpDto) {
Employee newEmp = null;
Department d = deptRepo.findByDeptName(newEmpDto.getDeptName());
RoleAndSeniority ras = rasRepo.findRoleAndSeniority(newEmpDto.getRoleName(), newEmpDto.getSeniority());
if(employeeDataIsOk(ras, newEmpDto)) {
newEmp = GenericBuilder.of(Employee::new)
.with(Employee::setDepartment, d)
.with(Employee::setRas, ras)
.with(Employee::setFirstName, newEmpDto.getFirstName())
.with(Employee::setLastName, newEmpDto.getLastName())
.with(Employee::setDob, newEmpDto.getDob())
.with(Employee::setHireDate, newEmpDto.getHireDate())
.with(Employee::setSalary, newEmpDto.getSalary())
.with(Employee::setSsn, newEmpDto.getSsn())
.with(Employee::setAnnualLeave, ras.getSeniority().getHolidayEntitlement())
.build();
em.persist(newEmp);
}
return newEmp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void addEmployee(Employee employee) {\n\t\tem.getTransaction().begin();\n\t\tem.persist(employee);\n\t\tem.getTransaction().commit();\n\t\tSystem.out.println(\"Data Added successfully\");\n\t\tlogger.log(Level.INFO, \"Data Added successfully\");\n\n\t}",
"@Transactional\n\t\tpublic void saveEmployee(EmployeeEntity employeeEntity) {\n\t\t\temployeedao.saveEmployee(employeeEntity);\n\t\t}",
"@Override\r\n\tpublic void saveEmployee(Employee employee) {\n\t\t\r\n\t}",
"@Override\n\tpublic void save(Employee employee) {\n\t\temployeeDao.save(employee);\n\t\t\n\t}",
"private void saveEmployee(Employee employee) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_KEY, employee.getKey());\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_VALUE, employee.getValue());\n\n getContext().getContentResolver().insert(\n ReportContract.EmployeeEntry.CONTENT_URI,\n contentValues\n );\n\n }",
"@Override\n public void save(Employee employee) {\n Employee dbEmployee = entityManager.merge(employee);\n \n //update with id from database so we can generate id for save/insert\n employee.setId(dbEmployee.getId());\n \n }",
"public void saveEmployee(Employe employee) {\n\t\t\n\t}",
"@Override\n\tpublic int saveEmployee() {\n\t\tEmployeeDao dao= new EmployeeDao();\n\t\tint result=dao.saveEmployee(new Employee(101349, \"Deevanshu\", 50000));\n\t\treturn result;\n\t}",
"@Override\n\tpublic void save(Employee theEmployee) {\n\t\t\n\t}",
"void addEmployee(Employee emp){\n\t\tEntityManager em = emf.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\tem.persist(emp);\n\t\ttx.commit();\n\t\tem.close();\n\t}",
"@Override\n public void save(Employee theEmployee) {\n Employee dbEmployee = entityManager.merge(theEmployee);\n theEmployee.setId(dbEmployee.getId());\n }",
"@Override\n\tpublic void store() {\n\n\t\tSystem.out.println(\"store() in Employee Dao\");\n\t}",
"public void update(Employee employee){\n employeeRepository.save(employee);\n }",
"@Override\n\tpublic void save(Employee employee) {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\n\t\t// Save an Employee\n\t\tcurrentSession.saveOrUpdate(employee);\n\t\t\n\t}",
"EmployeeDetail save(EmployeeDetail detail) throws DBException;",
"@Override\r\n\tpublic Employee save(Employee emp) {\n\t\t return empdao.save(emp);\r\n\t}",
"@Override\n\tpublic void updateEmployee(Employee employee) {\n\t\tEmployee updateEmployee = em.find(Employee.class, employee.getId());\n\t\t\n\t\tem.getTransaction().begin();\n\t\tem.merge(employee);\n\t\tem.getTransaction().commit();\n\t\tSystem.out.println(\"Data Updated successfully\");\n\t\tlogger.log(Level.INFO, \"Data Updated successfully\");\n\n\t}",
"@Transactional(readOnly = false)\r\n\tpublic void saveEmployee(Employee employee) {\r\n\t\tem.merge(employee);\r\n\t}",
"public void save(Employee employee) {\n String objectStr = MyUtils.serializeIntoAString(employee);\n Connection connection = null;\n Statement stmt = null;\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MyDB\", \"root\", \"password\");\n stmt = connection.createStatement();\n stmt.execute(\"INSERT INTO EMPLOYEE VALUES(\" + objectStr + \")\");\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void post(Employee employee) {\n\t\t empdao.save(employee);\r\n\t}",
"@Override\n\tpublic Employee saveEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.saveEmployee(Employee emp) save Employee object\");\n\t\treturn repositary.save(emp);\n\t}",
"void save(Employee employee);",
"public void addEmployee(Employee employee) {\n employeeRepository.save(employee);\n }",
"@Override\n\t@Transactional\n\tpublic Employee save(Employee employee) {\n\t\treturn employeeDao.save(employee);\n\t}",
"public void insert(EmployeeEntity entity){\n EmployeeDB.getInstance().insertOrUpdate(entity);\n }",
"public void updateemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}",
"public static void doStuff(){\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\n\t\t//As we omitted the argument, this will just create a new numeric ID\n\t\tEntity employee = new Entity(\"Employee\");\n\n\t\temployee.setProperty(\"firstName\", \"Patrick\");\n\t\temployee.setProperty(\"lastName\", \"MacDowell\");\n\n\t\tDate hireDate = new Date();\n\t\temployee.setProperty(\"hireDate\", hireDate);\n\n\t\temployee.setProperty(\"attendedHrTraining\", true);\n\n\t\tdatastore.put(employee);\n\t}",
"@Override\r\n\tpublic int insertEmployee(Employee employee) {\n\t\treturn employeedao.insertEmployee(employee);\r\n\t}",
"@Override\r\n\tpublic Employee change(Employee employee) {\n\t\treturn empdao.save(employee);\r\n\t}",
"public void addEmployee(final Employee employee) {\r\n\t\tfinal Session session = sessionFactory.getCurrentSession();\t\r\n\t\tsession.save(employee);\r\n\t}",
"@Override\r\n\tpublic int insertEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic Employee addEmployeeData(Employee emp) {\n\t\treturn employeeDAO.addEmployee(emp);\r\n\t}",
"@Override\n\tpublic void add(Employee employee) {\n\t\temployeeDao.save(employee);\t\t\n\t}",
"@Override\n\tpublic Employee save(Employee employee) {\n\t\treturn employeeRepository.save(employee);\n\t}",
"@Override\n\tpublic Employee updateEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.updateEmployee(Employee emp) update Employee object whos id is\" + emp.getId());\n\t\treturn repositary.save(emp);\n\t}",
"@Override\n\tpublic void update(Employee employee) {\n\t\temployeeDao.update(employee);\n\t}",
"public void updateEmployee(Employe employee) {\n\t\t\n\t}",
"public void addEmployee(Employee employee) throws SQLException {\n\t\tConnection connection = DatabaseConnection.getConnection();\n\t\tString query = \"INSERT INTO EMPLOYEE VALUES(?,?)\";\n\t\tPreparedStatement pStatement = connection.prepareStatement(query);\n\t\tpStatement.setString(1, employee.getEmpId());\n\t\tpStatement.setString(2, employee.getEname());\n\t\tpStatement.executeUpdate();\n\n\t}",
"@Override\r\n\tpublic int updateEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void updateEmployee() {\n\n\t}",
"@Override\r\n\tpublic int addEmployee(Employee employee) {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\t}",
"public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}",
"@Override\n\tpublic Employee registerEmployee(Employee employee) {\n\t\tEmployee updatedEmployee = null;\n\t\ttry {\n\t\t\tlogger.info(\"saving employee = {}\", employee);\n\t\t\tupdatedEmployee = employeeDao.registerEmployee(employee);\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(exception.getMessage());\n\t\t}\n\t\treturn updatedEmployee;\n\t}",
"void update(EmployeeDetail detail) throws DBException;",
"public void saveEmployee(Employee emp){\n System.out.println(\"saved\" + emp);\n\n }",
"@Override\n\t@Transactional\n\tpublic boolean saveEmployee(Employee employee) {\n\t\t\n\t\tentityManager.persist(employee);\n\t\tentityManager.flush();\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void updateEmployee(Employee t) {\n\t\t\r\n\t}",
"@Override\n\tpublic Employee createEmployee(Employee employee) {\n\t\tSession sess = sessionFactory.openSession();\n\t\tTransaction tx = sess.beginTransaction();\n\t\tsess.save(employee);\n\t\ttx.commit();\n\t\tsess.close();\n\n\t\treturn employee;\n\t}",
"@Override\r\n\tpublic int addEmployee1(Employee employee) throws SQLException {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\t\treturn added;\r\n\t}",
"public Employee save(Employee employee){\n return employeeRepository.save(employee);\n }",
"private void saveEmployee() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String nameString = mNameEditText.getText().toString().trim();\n String addressString = mAddressEditText.getText().toString().trim();\n String numberString = mNumberEditText.getText().toString().trim();\n String birthDateString = mBirthTextView.getText().toString().trim();\n\n // Check if this is supposed to be a new pet\n // and check if all the fields in the editor are blank\n if (mCurrentPetUri == null &&\n TextUtils.isEmpty(nameString) &&\n mImagePath.isEmpty()) {\n // Since no fields were modified, we can return early without creating a new pet.\n // No need to create ContentValues and no need to do any ContentProvider operations.\n return;\n }\n\n // Create a ContentValues object where column names are the keys,\n // and employee attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_NAME, nameString);\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_ADDRESS, addressString);\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_BIRTH_DAY, birthDateString);\n\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_PHOTOS, mImagePath);\n\n // If the number is not provided by the user, don't try to parse the string into an\n // integer value. Use 0 by default.\n int number = 0;\n if (!TextUtils.isEmpty(numberString)) {\n number = Integer.parseInt(numberString);\n }\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_NUMBER, number);\n\n // Determine if this is a new or existing pet by checking if mCurrentPetUri is null or not\n if (mCurrentPetUri == null) {\n // This is a NEW employee, so insert a new employee into the provider,\n // returning the content URI for the new pet.\n Uri newUri = getContentResolver().insert(EmployeeEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_employee_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_employee_successful),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n // Otherwise this is an EXISTING pet, so update the pet with content URI: mCurrentPetUri\n // and pass in the new ContentValues. Pass in null for the selection and selection args\n // because mCurrentPetUri will already identify the correct row in the database that\n // we want to modify.\n int rowsAffected = getContentResolver().update(mCurrentPetUri, values, null, null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsAffected == 0) {\n // If no rows were affected, then there was an error with the update.\n Toast.makeText(this, getString(R.string.editor_update_employee_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_update_employee_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }",
"public EmployeeEntity updateEmployeeData(EmployeeEntity employee, StorageContext context)\n\t\t\tthrows PragmaticBookSelfException {\n\n\t\tSession hibernateSession = context.getHibernateSession();\n\n\t\ttry {\n\t\t\thibernateSession.update(employee);\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\n\t\thibernateSession.evict(employee);\n\t\thibernateSession.flush();\n\n\t\treturn employee;\n\t}",
"public int insertEmployeeData(EmployeeEntity employee, StorageContext context) throws PragmaticBookSelfException {\n\t\tInteger result = 0;\n\t\tSession hibernateSession = context.getHibernateSession();\n\t\ttry {\n\t\t\tresult = (Integer) hibernateSession.save(employee);\n\t\t\thibernateSession.flush();\n\t\t} catch (HibernateException e) {\n\t\t\tthrow new PragmaticBookSelfException(e);\n\t\t}\n\n\t\treturn (int) result;\n\t}",
"@Override\n\tpublic int addNewEmployee(String firstName, String lastName, String email, String designation, String location,\n\t\t\tint salary) {\n\t\treturn template.update(\n\t\t\t\t\"insert into employee(fname, lname, email, desig, location, salary) values(?, ?, ?, ?, ?, ?)\",\n\t\t\t\tfirstName, lastName, email, designation, location, salary);\n\t}",
"@Override\r\n\tpublic Result update(Employees employees) {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic void updateEmployee(Employee e) {\n\t\t\n\t}",
"public void update(Employee e) {\n\t\t\r\n\t}",
"public abstract void updateEmployee(int id, Employee emp) throws DatabaseExeption;",
"public void updateEmployee(final Employee update) {\r\n\t\t sessionFactory.getCurrentSession().saveOrUpdate(update);\r\n\t }",
"public void save(Session session, Employee emp) {\n Transaction t = session.beginTransaction();\n session.saveOrUpdate(emp);\n t.commit();\n }",
"@Override\n\tpublic void save(EmpType entity) {\n\t\t\n\t}",
"public void updateEmployeeDetails(EmployeeDetails employeeDetails);",
"@Override\n\t//业务层修改员工方法\n\tpublic void update(Employee employee) {\n\t\temployeeDao.update(employee);\n\t}",
"@Override\n\tpublic void update(Employee employee) {\n\t}",
"public static void addEmployee(Employee employee) {\n try {\n if (employeeRepository.insert(dataSource, employee) == 1) {\n LOGGER.warn(\"The employee \" + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" is already in the list\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"in-list\") + \"\\n\");\n } else {\n LOGGER.info(\"The employee \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" was successfully added to the list of employees\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + \" \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"success.add\") + \"\\n\");\n }\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n }",
"@Override\n\tpublic void updateEmployee(int empid, int empNewSalary) {\n\t\t\n\t}",
"@Transactional\n public Employee insert(Employee employee) {\n logger.debug(\"Testing create employee :\");\n return employeeDao.insert(employee);\n }",
"@Override\n\tpublic void updateEmployee(List<Employee> employees) {\n\t\t\n\t}",
"public void createEmployee(Employee newEmployee) {\n\t\tif(false == this.employee.contains(newEmployee)) {\n\t\t\tthis.employee.add(newEmployee);\n\t\t}\n\t}",
"public EmployeeDTO updateEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;",
"@Override\r\n\tpublic void updateEmployee(long employeeId, Employee updateEmployee) {\n\t\t\r\n\t}",
"@FXML\r\n\tprivate void saveEmployee(ActionEvent event) {\r\n\t\tif (validateFields()) {\r\n\t\t\tEmployee e;\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\te = new Employee();\r\n\t\t\t\tlistaStaff.getItems().add(e);\r\n\t\t\t} else {\r\n\t\t\t\te = listaStaff.getSelectionModel().getSelectedItem();\r\n\t\t\t}\r\n\t\t\te.setUsername(txUsuario.getText());\r\n\t\t\te.setPassword(txPassword.getText());\r\n\t\t\tif (checkAdmin.isSelected())\r\n\t\t\t\te.setIsAdmin(1);\r\n\t\t\telse\r\n\t\t\t\te.setIsAdmin(0);\r\n\t\t\tif (checkTPV.isSelected())\r\n\t\t\t\te.setTpvPrivilege(1);\r\n\t\t\telse\r\n\t\t\t\te.setTpvPrivilege(0);\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\tservice.saveEmployee(e);\r\n\t\t\t\tnewEmployee = false;\r\n\t\t\t} else\r\n\t\t\t\tservice.updateEmployee(e);\r\n\t\t\tbtGuardar.setDisable(true);\r\n\t\t\tbtEditar.setDisable(false);\r\n\t\t\tconmuteFields();\r\n\t\t\tupdateList();\r\n\t\t}\r\n\t}",
"public void guardar(Empleado empleado) {\n\t\tentityManager.getTransaction().begin();\n\t\tentityManager.persist(empleado);\n\t\tentityManager.getTransaction().commit();\n\t\tJPAUtil.shutdown();\n\t}",
"@Transactional\n public Employee update(Employee employee) {\n logger.debug(\"update employee by id :\");\n return employeeDao.update(employee);\n }",
"@Override\r\n\tpublic boolean updateEmployee(Employee employee) {\n\t\tboolean added = false;\r\n\t\tString updateData = \"update employee set empName=?, salary=? ,technology=? where empId=?\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(updateData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getSalary());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getEmpId());\r\n\r\n\t\t\tint updated = ps.executeUpdate();\r\n\t\t\tif (updated > 0) {\r\n\t\t\t\tadded = true;\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\t}",
"@Override\n\t@Transactional\n\tpublic void updateEmp(int employeeID, Employee employee) {\n\t\tOptional<Employee> empData = employeeRepository.findById(employeeID);\n\t\tif(empData.isPresent()) {\n\t\t\tEmployee emp = empData.get();\n\t\t\temp.setFirstName(employee.getFirstName());\n\t\t\temp.setLastName(employee.getLastName());\n\t\t\temp.setEmail(employee.getEmail());\n\t\t\temp.setPhone(employee.getPhone());\n\t\t\temployeeRepository.save(emp);\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}",
"@Override\n\tpublic void saveOrUpdate(EmpType entity) {\n\n\t}",
"public void insert(Employee e) throws ClassNotFoundException, SQLException;",
"public void updateEmployee(Employee employee) throws SQLException {\n PreparedStatement preparedStatement = null;\n MysqlDbManager mysqlDb = MysqlDbManager.getInstance();\n String SQL = \"UPDATE employees SET surname=?, name=?, gender=?, marital_status=?, salary=?, dob=? WHERE idEmployee=?\";\n try {\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setString(1, employee.getSurname());\n preparedStatement.setString(2, employee.getName());\n preparedStatement.setString(3, employee.getGender());\n preparedStatement.setString(4, employee.getMaritalStatus());\n preparedStatement.setInt(5, employee.getSalary());\n preparedStatement.setDate(6, new Date(employee.getDob().getTime()));\n preparedStatement.setInt(7, employee.getId());\n mysqlDb.executePreparedUpdate(preparedStatement);\n } catch (NullPointerException e) {\n LOGGER.log(Level.SEVERE, \"There is no access to the mysql database: \" + e.toString());\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n } finally {\n try {\n if (preparedStatement != null) {\n preparedStatement.close();\n }\n if (!mysqlDb.getConnection().isClosed()) {\n mysqlDb.getConnection().close();\n }\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n }\n }\n }",
"@PostMapping(value = \"/addEmployee\")\n\tpublic void addEmployee() {\n\t\tEmployee e = new Employee(\"Iftekhar Khan\");\n\t\tdataServiceImpl.add(e);\n\t}",
"private void updateEmplUsingJDBC(\n final String firstName, final String lastName, final Date newStartDate) {\n \n LOG.info(\"updateEmployeeUsingJDBC: updating \" + firstName + \" \" + lastName);\n\n try {\n _updateEmployeeStatement.setDate(1, newStartDate);\n _updateEmployeeStatement.setString(2, firstName);\n _updateEmployeeStatement.setString(3, lastName);\n int rc = _updateEmployeeStatement.executeUpdate();\n if (rc <= 0) {\n LOG.error(\"updateEmplUsingJDBC: error updating employee, return = \" + rc);\n return;\n }\n } catch (Exception e) {\n LOG.error(\"updateEmplUsingJDBC: exception updating employee\", e);\n }\n }",
"@Transactional\n\t@CacheEvict(cacheNames = {\"allEmployeesCache\"}, allEntries = true)\n\tpublic void addEmployee(Employee employee) throws Exception {\n\t\tString password = passwordService.createPassword();\n\t\tString passwordEncode = passwordEncoder.encode(password);\n\t\tUser user = employee.getUser();\n\t\tuser.setEnabled(true);\n\t\tuser.setPassword(passwordEncode);\n\t\tOptional<Role> role1 = roleRepository.findById(1L);\n\t\tOptional<Role> role4 = roleRepository.findById(4L);\n List<Role> roles = new ArrayList<>();\n roles.add(role1.get());\n roles.add(role4.get());\n user.setRoles(roles);\n employee.setRegisterDateTime(LocalDateTime.now());\n final User userFromRequest = getUserFromRequest();\n employee.setUserRegister(userFromRequest);\n\t\temployeeRepository.save(employee);\n\t\tsendEmailForAddAdminEmployee(employee, password);\n\t}",
"@Override\r\n\tpublic String AddEmployeeDetails(EmployeeEntity employee) throws CustomException {\n\t\tString strMessage=\"\";\r\n\t\trepository.save(employee);\r\n\t\tstrMessage=\"Employee data has been saved\";\r\n\t\treturn strMessage;\r\n\t}",
"public void addEmployee(Employee emp) {\n\t\t\r\n\t}",
"public Employee updateEmployeeDetails(Employee employee) {\n\t\t long requestObjectEmployeeId = employee.getEmployeeId();\n\t\t Employee existedEmployee = employeeDao.findEmployeeByEmployeeId(requestObjectEmployeeId);\n\t\t if(employee != null) {\n\t\t\t return employeeDao.save(employee);\n\t\t }\n\t\t\treturn null;\t\n\t}",
"@Override\n\tpublic int updateEmployee(Employee emp) throws RemoteException {\n\t\treturn DAManager.updateEmployee(emp);\n\t}",
"private void updateEmployee(HttpServletRequest request, HttpServletResponse response)\r\n\t\tthrows Exception {\n\t\tint id = Integer.parseInt(request.getParameter(\"employeeId\"));\r\n\t\tString firstName = request.getParameter(\"firstName\");\r\n\t\tString lastName = request.getParameter(\"lastName\");\r\n\t\tint age = Integer.parseInt(request.getParameter(\"age\"));\r\n\t\tString gender = request.getParameter(\"gender\");\r\n\t\tString email = request.getParameter(\"email\");\r\n\t\t\r\n\t\t// create a new student object\r\n\t\tEmployee theEmployee = new Employee (id, firstName, lastName,gender,age, email);\r\n\t\t\r\n\t\t// perform update on database\r\n\t\temployeeDAO.updateEmployee(theEmployee);\r\n\t\t\r\n\t\t// send them back to the \"list students\" page\r\n\t\tlistEmployees(request, response);\r\n\t\t\r\n\t}",
"public void insertEmp(Emp emp) {\n\t\t\n\t}",
"public void saveEmployee(CreateOrEditEmployeeRequestDto employee);",
"@Override\r\n\tpublic boolean updateEmployee(EmployeeEO employeeEORef) {\n\t\tif(employeeDAORepoRef.findById(employeeEORef.getEmployeeId()).equals(null))\r\n\t\treturn false;\r\n\t\telse {\r\n\t\t\temployeeDAORepoRef.save(employeeEORef);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public void persist(final Employee transientInstance) {\n LOG.debug(\"persisting Employee instance\");\n try {\n entityManager.persist(transientInstance);\n LOG.debug(\"persist successful\");\n } catch (RuntimeException re) {\n LOG.error(\"persist failed\", re);\n throw re;\n }\n }",
"public String addEmployeeRecord(String firstName, String lastName,\n String socialSecurityNumber, String department,\n String roomNumber, String phoneNumber) {\n\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n int result = 0;\n\n try {\n\n connection = getConnection(connection);\n\n String queryString = \"INSERT INTO employees \"\n + \"(first_name, last_name, ssn, dept, room, phone)\"\n + \"values ( ?, ?, ?, ?, ?, ? )\";\n\n statement = connection.prepareStatement(queryString);\n statement.setString(1, firstName);\n statement.setString(2, lastName);\n statement.setString(3, socialSecurityNumber);\n statement.setString(4, department);\n statement.setString(5, roomNumber);\n statement.setString(6, phoneNumber);\n\n result = statement.executeUpdate();\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n System.err.println(\"General Error\");\n exception.printStackTrace();\n } finally {\n try {\n if (resultSet != null) {\n resultSet.close();\n }\n\n\n if (statement != null) {\n statement.close();\n }\n\n\n if (connection != null) {\n connection.close();\n }\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }\n if (result > 0) {\n return \"New employee added successfully.\";\n } else {\n return \"Error adding new employee.\";\n }\n }",
"public void updateEmp(Emp emp) {\n\t\t\n\t}",
"int insert(Employee record);",
"@Override\r\n\tpublic String save(Emp e) {\n\t\treturn \"JPA :Emp saved with ID \" + e.getEmpId(); \r\n\t}",
"@PutMapping(\"/employees/{employeeId}\")\r\n\tpublic Employee updateEmployee(@RequestBody Employee theEmployee) {\r\n\t\t\r\n\t\t\temployeeService.saveEmployee(theEmployee);\r\n\t\t\r\n\t\treturn theEmployee;\r\n\t}",
"private static void updateEmployeeHelper() {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Insert Employee's ID\");\n\t\tString newID = input.nextLine();\n\t\t\n\t\tSystem.out.println(\"Insert Current name\");\n\t\tString newName = input.nextLine();\n\n\t\tSystem.out.println(\"Insert Old Department\");\n\t\tString oldDepartment = input.nextLine();\n\n\t\tSystem.out.println(\"Insert New Department\");\n\t\tString newDepartment = input.nextLine();\n\n\t\tems2.updateEmployee(newID, newName, oldDepartment, newDepartment);\n\t}",
"@Override\n\tpublic void preparedUpdateEmployee(Employee e) {\n\t\t\n\t}",
"public int pushEmployee(boolean override) {\n\t\t// Can't push invalid data\n\t\tif (!this.validateEmployeePackage())\n\t\t\treturn this.validateEmployeePackageResult();\n\t\t// Manual if's are easier\n\t\tif (this.employeeExists()) {\n\t\t\tif (override) {\n\t\t\t\tint e = super.update(\"UPDATE \" + C.TABLE_EMPLOYEE + \" SET \"\n\t\t\t\t\t\t+ C.COLUMN_FIRST_NAME + \"='\" + this.getFirstName() + \"'\"\n\t\t\t\t\t\t+ C.COLUMN_LAST_NAME + \"='\" + this.getLastName() + \"' WHERE \"\n\t\t\t\t\t\t+ C.COLUMN_ID + \"=\" + this.getID());\n\t\t\t\treturn e > 0 ? EmployeeConnection.SUCCESS :\n\t\t\t\t\t\te < 0 ? EmployeeConnection.SQL_ERROR :\n\t\t\t\t\t\t\t\tEmployeeConnection.DRIVER_ERROR;\n\t\t\t} else\n\t\t\t\treturn EmployeeConnection.DUPLICATE_EMPLOYEE;\n\t\t} else {\n\t\t\tint e = super.update(\"INSERT INTO \" + C.TABLE_EMPLOYEE + \" (\" + C.COLUMN_ID\n\t\t\t\t\t+ \", \" + C.COLUMN_FIRST_NAME + \", \" + C.COLUMN_LAST_NAME\n\t\t\t\t\t+ \") VALUES (\" + this.getID() + \", '\" + this.getFirstName()\n\t\t\t\t\t+ \"', '\" + this.getLastName() + \"'\");\n\t\t\treturn e > 0 ? EmployeeConnection.SUCCESS :\n\t\t\t\t\te < 0 ? EmployeeConnection.SQL_ERROR :\n\t\t\t\t\t\t\tEmployeeConnection.DRIVER_ERROR;\n\t\t}\n\t}"
] | [
"0.7428786",
"0.7417229",
"0.73598254",
"0.73548853",
"0.7290273",
"0.72468287",
"0.71933967",
"0.7169913",
"0.715422",
"0.7101616",
"0.70663786",
"0.7052697",
"0.7042109",
"0.7035223",
"0.6971944",
"0.6953513",
"0.69420683",
"0.68893933",
"0.68846077",
"0.688065",
"0.6870497",
"0.686783",
"0.6837215",
"0.6834469",
"0.6828394",
"0.68014187",
"0.6721023",
"0.66941565",
"0.66923773",
"0.66795504",
"0.66572744",
"0.66460407",
"0.6645542",
"0.66454685",
"0.6633896",
"0.6612778",
"0.6598563",
"0.6591386",
"0.6538988",
"0.65153944",
"0.6508079",
"0.6484982",
"0.6477502",
"0.64736074",
"0.64615905",
"0.6457847",
"0.6454669",
"0.64511925",
"0.6430483",
"0.6429926",
"0.64181614",
"0.6407361",
"0.6399176",
"0.6391898",
"0.6389497",
"0.6386325",
"0.6360984",
"0.63376063",
"0.632191",
"0.6319804",
"0.6309167",
"0.6307576",
"0.63062954",
"0.6295978",
"0.62736434",
"0.62663925",
"0.6263856",
"0.6244717",
"0.6228785",
"0.62068635",
"0.6205146",
"0.6179798",
"0.61785305",
"0.6137068",
"0.61200905",
"0.6118973",
"0.6118651",
"0.61166084",
"0.6100809",
"0.6086942",
"0.60460305",
"0.6038095",
"0.60365903",
"0.6034262",
"0.6024079",
"0.6020597",
"0.60188127",
"0.6017798",
"0.600534",
"0.6003592",
"0.6000317",
"0.59961027",
"0.5991405",
"0.5990826",
"0.5989341",
"0.5985905",
"0.59592265",
"0.59588945",
"0.59581566",
"0.5956146"
] | 0.60934705 | 79 |
/ Validate employee data. | private boolean employeeDataIsOk(RoleAndSeniority ras, EmployeeDto newEmpDto) {
if(employeeSalaryInTheCorrectRange(ras, newEmpDto.getSalary()) && employeeSsnValid(newEmpDto)
&& employeeNameValid(newEmpDto) && employeeDobValid(newEmpDto)) {
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean validateEmployeeId(String employeeId);",
"public Employee validate() throws ValidationException {\n\n\n nameValidator();\n roleValidator();\n\n if (validationException.isEmpty()) return employee;\n throw validationException;\n }",
"private boolean isProblemData(Employee employee) {\n return (employee.getName().isEmpty()) ||\n employee.getPensionId().isEmpty() ||\n employee.getRole().isEmpty() ||\n Character.isLowerCase(employee.getName().charAt(0));\n }",
"private void validateData() {\n }",
"public boolean validateEmployeePackage() {\n\t\treturn this.validateID() && this.validateFirstName() && this.validateLastName();\n\t}",
"private void validateEmployee(final TimeEntryDto timeEntryDto, final BindingResult result) {\n\t\tif (timeEntryDto.getEmployeeId() == null) {\n\t\t\tresult.addError(new ObjectError(\"employee\", \"Employee not informed.\"));\n\t\t\treturn;\n\t\t}\n\n\t\tLOGGER.info(\"Validating employee id {}: \", timeEntryDto.getEmployeeId());\n\t\tfinal Optional<Employee> employee = this.employeeService.findById(timeEntryDto.getEmployeeId());\n\t\tif (!employee.isPresent()) {\n\t\t\tresult.addError(new ObjectError(\"employee\", \"Employee not found. Nonexistent ID.\"));\n\t\t}\n\t}",
"public void isValidEmployee(Employee employee) throws ValidationException, ServiceException {\n\t\tNumberValidator.isValidEmployeeId(employee.getEmployeeId());\n\t\tNumberValidator.isValidMobileNumber(employee.getMobileNumber());\n\t\tStringValidator.isValidName(employee.getName());\n\t\tStringValidator.isValidEmail(employee.getEmail());\n\t\tStringValidator.isValidPassword(employee.getPassword());\n\t\tStringValidator.isValidUsername(employee.getUsername());\n\t\tInteger id = employeeService.exists(employee.getEmployeeId());\n\t\tif (id != null) {\n\t\t\tthrow new ValidationException(\"Employee Id already exists\");\n\t\t}\n\t\tid = employeeService.exists(employee.getMobileNumber());\n\t\tif (id != null) {\n\t\t\tthrow new ValidationException(\"Mobile Number already exists\");\n\t\t}\n\t\tid = employeeService.exists(employee.getEmail());\n\t\tif (id != null) {\n\t\t\tthrow new ValidationException(\"Email Id already exists\");\n\t\t}\n\t\tDateValidator.isValidJoinedDate(employee.getJoinedDate());\n\t}",
"private boolean validityChecker(TextField employeeId) {\n\t\tString empid = employeeId.getValue();\n\t\tint length = empid.length();\n\t\tif (empid.matches(\".*[A-Za-z].*\") || length < minLength || length> maxLength)\n\t\t\treturn false;\n\t\tif(!isNew){\n\t\tif (EmployeeDAO.getEmployee(empid) == null)\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean validateEmployeeID() {\n if (employeeID.length() - 1 != 6) {\n return false;\n }\n else if (employeeID.toCharArray()[2] != '-') {\n return false;\n }\n else if (Character.isLetter(employeeID.toCharArray()[0] & employeeID.toCharArray()[1])) {\n return true;\n }\n else if (Character.isDigit(employeeID.toCharArray()[3] & employeeID.toCharArray()[4]\n & employeeID.toCharArray()[5] & employeeID.toCharArray()[6])) {\n return true;\n }\n else{\n return false;\n }\n }",
"public void validateInput(String fName, String lName, String zipCode, String employID){\n boolean firstname = firstNameTwoCharactersLong(fName);\n //boolean firstFilled = firstNameFilled\n boolean firstFilled = firstNameFilled(fName);\n //boolean lastname = lastNameTwoCharactersLong\n boolean lastname = lastNameTwoCharactersLong(lName);\n //boolean lastFilled = lastNameFilled\n boolean lastFilled = lastNameFilled(lName);\n //boolean the rest\n boolean employeeID = employeeIDValid(employID);\n boolean zCode = zipCodeValid(zipCode);\n\n //if all of them are valid=true then error prints \"there are no errors found\n if (firstname && firstFilled && lastname && lastFilled && employeeID && zCode){\n errorMessage = \"There were no errors found\";\n }\n //Display error message\n System.out.println(errorMessage);\n\n }",
"public boolean isValidList(List<Employee> employees) {\n return isValidEmployeeNames(employees)\n && isValidEmployeeIds(employees)\n && isExactlyOneCEO(employees)\n && isValidManagerIds(employees);\n }",
"@Test\n\tpublic void testValidate() {\n\t\tSystem.out.println(\"starting testValidate()\");\n\t\tPersonalData personalData = new PersonalData(\"Kelvin\", \"Huynh\", \"4081234567\", \"Kelvin_Huynh@email.com\");\n\t\tassertTrue (\"address validates\", personalData.validatePersonalData());\n\t System.out.println(\"testValidate PASSED\");\n\t}",
"public void isEmployee(String username) throws ValidationException {\n\t\ttry {\n\t\t\temployeeService.getEmployeeId(username);\n\t\t} catch (ServiceException e) {\n\t\t\tthrow new ValidationException(INVALIDEMPLOYEE);\n\t\t}\n\t}",
"public void validate(){\r\n\t\ttry{\r\n\t\t\t//First name, last name, date of birth and email are compulsory.\r\n\t\tif(FirstName==null||LastName==null||Dob==null||Email==null) \r\n\t\t\tthrow new Exception(\"One of the field is Empty :\\n(First name / last name / dob / email )\");\r\n\t\tif(TelephoneNumber!=0||MobileNumber!=0)\r\n\t\t\tthrow new Exception(\"Enter Contact Number\");\r\n\t\t\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\t/*finally{\r\n\t\t\tSystem.out.println(\"Program Executed\");\r\n\t\t}*/\r\n\t}",
"private void doCreateEmployee() {\n Scanner sc = new Scanner(System.in);\n Employee newEmployee = new Employee();\n int response;\n\n System.out.println(\"*** Hors Management System::System Administration::Create New Employee ***\");\n System.out.print(\"Enter First name>\");\n newEmployee.setFirstName(sc.nextLine().trim());\n System.out.print(\"Enter Last name>\");\n newEmployee.setLastName(sc.nextLine().trim());\n\n while (true) {\n System.out.println(\"Select Job Role:\");\n System.out.println(\"1. System Administrator\");\n System.out.println(\"2. Operation Manager\");\n System.out.println(\"3. Sales Manager\");\n System.out.println(\"4. Guest Officer\\n\");\n\n response = sc.nextInt();\n\n //set job role\n if (response >= 1 && response <= 4) {\n newEmployee.setJobRole(JobRoleEnum.values()[response - 1]);\n break;\n } else {\n System.out.println(\"Invalid option, please try again \\n\");\n }\n }\n sc.nextLine();\n System.out.print(\"Enter Username\");\n newEmployee.setUserName(sc.nextLine().trim());\n System.out.println(\"Enter Password\");\n newEmployee.setPassword(sc.nextLine().trim());\n\n Set<ConstraintViolation<Employee>> constraintViolations = validator.validate(newEmployee);\n\n if (constraintViolations.isEmpty()) {\n newEmployee = employeeControllerRemote.createNewEmployee(newEmployee);\n System.out.println(\"New Staff created successfully, employee ID is: \"+newEmployee.getEmployeeId());\n }else{\n showInputDataValidationErrorsForEmployee(constraintViolations);\n }\n\n }",
"public void validate(DataRecord value) {\n\r\n\t}",
"public Employeedetails checkEmployee(String uid);",
"public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// Employers DATA BASE ----------------------------\n\t\t\n\t\temployee emp1 = new employee();\n\t\temp1.Name = \"John Billa\";\n\t\temp1.employeeCode = 001;\n\t\t\n\t\temployee emp2 = new employee();\n\t\temp2.Name = \"Anthony Woods\";\n\t\temp2.employeeCode = 002;\n\t\t\n\t\temployee emp3 = new employee();\n\t\temp3.Name = \"Jessica Underwood\";\n\t\temp3.employeeCode = 003;\n\t\t\t\t\n\t\t// End of Employers DATA BASE ---------------------\n\t\t\n\t\tSystem.out.println(\"Welcome! Please insert your EmployeeCode:\");\n\t\tint codeEnter = sc.nextInt();\n\t\t\n\t\tif(codeEnter == 001) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 002) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\telse if(codeEnter == 003) {\n\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"ERROR!!! ERROR!!!\");\n\t\t\twhile (codeEnter > 003) {\n\t\t\t\tSystem.out.println(\"=====================================\");\n\t\t\t\tSystem.out.println(\"Insert Again your EmployeeCode\");\n\t\t\t\tcodeEnter = sc.nextInt();\n\t\t\t\t\n\t\t\t\tif(codeEnter == 001) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp1.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 002) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp2.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\telse if(codeEnter == 003) {\n\t\t\t\t\tSystem.out.println(\"======================================================= \");\n\t\t\t\t\tSystem.out.println(\"Welcome \" + emp3.Name + \" we hope you have a nice day of work.\");\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(\"======================================================= \");\n\t\tSystem.out.println(\"\");\n\t\t\n\t\tif (codeEnter == 001) {\n\t\t\tSystem.out.println(emp1.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse if (codeEnter == 002) {\n\t\t\tSystem.out.println(emp2.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println(emp3.Name + \", what would you like to do?\");\n\t\t}\n\t\t\n\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"1. New Delivery\");\n\t\tSystem.out.println(\"2. New Client\");\n\t\tSystem.out.println(\"3. Exit System\");\n\t\t\n\t\tint employeeChoice = sc.nextInt();\n\t\t\n\t\tswitch(employeeChoice){\n\t\t\tcase 1: \n\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 2: \n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"3\");\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tsc.close();\n\t}",
"@Test(groups = {\"All\", \"fixing\"})\n\tpublic void TC89302_OpenEVV_valid_EmpGender_O() throws InterruptedException, IOException, ParseException\n\t{\n\t\t// logger = extent.startTest(\"TC89302_OpenEVV_valid_EmpGender_O\");\n\t\t \n\t\tlogger.log(LogStatus.INFO, \"To validate the 'O' employee gender\");// adding what you are verifing\n\n\t\t\n\t\t//Using Reusable method to load client json\n\t\tJSONArray j=CommonMethods.LoadJSON_OpenEVV(\"employee\");\n\n\t\t//Making json values dynamic\n\t\tJSONObject js = (JSONObject) j.get(0);\n\n\t\tlogger.log(LogStatus.INFO, \"Passing EmployeeGender as 0\");\n logger.log(LogStatus.INFO, \"extracting request send body \" + j.toJSONString());\n\n\t\tjs.put(\"EmployeeGender\", DataGeneratorEmployee.gender[2]);\n\n\t\tCommonMethods.validateResponse(j, CommonMethods.propertyfileReader(globalVariables.openevv_emp_url));\n\t}",
"protected boolean isValidData() {\n return true;\n }",
"@Test\r\n\tpublic void addEmployeeTestCase3() {\n\t\tEmployee employee3 = new Employee();\r\n\t\temployee3.name = \"Lingtan\";\r\n\t\temployee3.role = \"Ui designer\";\r\n\t\temployee3.email = \"lingtan@chainsys.com\";\r\n\t\temployee3.employeeID = \"Ling2655\";\r\n\t\temployee3.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee3.gender = \"Male\";\r\n\t\temployee3.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee3.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tEmployeeOperations.addEmployee(employee3);\t\r\n\t}",
"private boolean employeeNameValid(EmployeeDto newEmpDto) {\n\t\tint nameLen = (newEmpDto.getFirstName().length() + newEmpDto.getLastName().length());\n\t\treturn (nameLen >= 2) ? true : false;\n\t}",
"private boolean isValidEmployeeNames(List<Employee> employees) {\n return employees.stream()\n .filter(e -> e.getName() == null || e.getName().isEmpty())\n .count()==0;\n }",
"public String validate(Data[] data);",
"public boolean validatePersonalData() {\n\t\tif (firstName == null)\n\t\t\treturn false;\n\t\tif (lastName == null)\n\t\t\treturn false;\n\t\tif (phoneNum == null)\n\t\t\treturn false;\n\t\tif (email == null)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"private boolean isValidEmployeeIds(List<Employee> employees) {\n //all employee Ids must be positive integer value\n if (employees.stream().mapToInt(Employee::getEmployeeId)\n .anyMatch(employeeId -> employeeId<=0))\n // if any id is <= 0 then the list is not valid\n return false;\n\n //EmployeeId must be unique\n long idCount = employees.stream()\n .mapToInt(Employee::getEmployeeId)\n .count();\n long idDistinctCount = employees.stream()\n .mapToInt(Employee::getEmployeeId)\n .distinct().count();\n // if both are equal then the ids are already unique\n return idCount == idDistinctCount;\n }",
"private static void validateEntity(AdminOffice entity) throws ValidationException {\n\t\t//Validator.validateStringField(\"officeName\", entity.getOfficeName(), 55, true);\n\t\t//Validator.validateStringField(\"phone\", entity.getPhone(), 12, false);\t\t\n\t}",
"public void validateInput(Information information) {\n information.validateFirstName();\n information.validateLastName();\n information.validateZipcode();\n information.validateEmployeeID();\n }",
"private boolean employeeDobValid(EmployeeDto newEmpDto) {\n\t\treturn (newEmpDto.getDob().compareTo(Calendar.getInstance()) < 0) ? true : false ;\n\t}",
"@Test(groups = {\"All\", \"fixing\"})\n\tpublic void TC89302_OpenEVV_valid_EmpGender_F() throws InterruptedException, IOException, ParseException\n\t{\n\t\t// logger = extent.startTest(\"TC89302_OpenEVV_valid_EmpGender_F\");\n\t\t \n\t\tlogger.log(LogStatus.INFO, \"To validate the 'F' employee gender\");// adding what you are verifing\n\n\t\t\n\t\t//Using Reusable method to load client json\n\t\tJSONArray j=CommonMethods.LoadJSON_OpenEVV(\"employee\");\n\n\t\t//Making json values dynamic\n\t\tJSONObject js = (JSONObject) j.get(0);\n\n\t\tlogger.log(LogStatus.INFO, \"Passing EmployeeGender as F \");\n logger.log(LogStatus.INFO, \"extracting request send body \" + j.toJSONString());\n\n\t\tjs.put(\"EmployeeGender\", DataGeneratorEmployee.gender[1]);\n\n\t\tCommonMethods.validateResponse(j, CommonMethods.propertyfileReader(globalVariables.openevv_emp_url));\n\t}",
"public void loadEmployees(String fileName)\r\n\t{\r\n\t\t//try block to attempt to open the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//declare local variables for the file name and data fields within the employeelist text file\r\n\t\t\t//these will all be Strings when pulled from the file, and then converted to the proper data type when they are assigned to the Employee objects\r\n\t\t\tString empID = \"\";\r\n\t\t\tString empLastName = \"\";\r\n\t\t\tString empFirstName = \"\";\r\n\t\t\tString empType = \"\";\t\r\n\t\t\tString empSalary = \"\"; //will convert to double\r\n\t\t\t\r\n\t\t\t//scan for file\r\n\t\t\tScanner infile = new Scanner(new FileInputStream(fileName));\r\n\t\t\t\r\n\t\t\t//while loop searching file records\r\n\t\t\twhile(infile.hasNext())\r\n\t\t\t{\r\n\t\t\t\t//split the field into segments with the comma (,) being the delimiter (employee ID, Last Name, First Name, employee type, and employee salary)\r\n\t\t\t\tString line = infile.nextLine();\r\n\t\t\t\tString[] fields = line.split(\",\");\r\n\t\t\t\tempID = fields[0];\r\n\t\t\t\tempLastName = fields[1];\r\n\t\t\t\tempFirstName = fields[2];\r\n\t\t\t\tempType = fields[3];\r\n\t\t\t\tempSalary = fields[4];\r\n\t\t\t\t\r\n\t\t\t\t//create a selection structure that creates the type of employee based on the empType\r\n\t\t\t\tif(empType.equalsIgnoreCase(\"H\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an HourlyEmployee and convert empSalary to a double\r\n\t\t\t\t\tHourlyEmployee hourlyEmp = new HourlyEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add hourlyEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(hourlyEmp);\r\n\t\t\t\t}//end create hourly employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create an exempt employee for E\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"E\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an exempt employee (salary) and convert the empSalary to a double\r\n\t\t\t\t\tExemptEmployee salaryEmp = new ExemptEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add salaryEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(salaryEmp);\r\n\t\t\t\t}//end create exempt (salary) employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a contractor \r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"C\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a contract employee and convert the empSalary to a double\r\n\t\t\t\t\tContractEmployee contractEmp = new ContractEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add contractEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(contractEmp);\r\n\t\t\t\t}//end create contractor employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a day laborer\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"d\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a day laborer and convert the empSalary to a double\r\n\t\t\t\t\tDayLaborer laborer = new DayLaborer(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add laborer to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(laborer);\r\n\t\t\t\t}//end create day laborer employee\r\n\t\t\t\t\r\n\t\t\t\t//else ignore the employee (looking at you Greyworm!)\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//save the employee type and id to return as an error\r\n\t\t\t\t\tempTypeError = empType;\r\n\t\t\t\t\tempIDError = empID;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ignore the employee \r\n\t\t\t\t\tempType = null;\r\n\t\t\t\t}//end ignore X employee\r\n\t\t\t}//end while loop cycling the records in the employeelist\r\n\t\t\t\r\n\t\t\t//close infile when done\r\n\t\t\tinfile.close();\r\n\t\t}//end of try block opening employeelist.txt file\r\n\t\t\r\n\t\t//catch block if file not found\r\n\t\tcatch(IOException ex)\r\n\t\t{\r\n\t\t\t//call ex object and display message\r\n\t\t\tex.printStackTrace();\r\n\t\t}//end of catch for file not found\r\n\t}",
"private void updateRecord() {\r\n int empId = -1;\r\n boolean hasError = false;\r\n try {\r\n empId = Integer.parseInt(employeeYearsOfWorkJTextField.getText());\r\n } catch (NumberFormatException e) {\r\n hasError = true;\r\n JOptionPane.showMessageDialog(this, \"Employee id must be integer\");\r\n }\r\n String telephone = employeeNumberJTextField.getText();\r\n String name = employeeNameJTextField.getText();\r\n int years = -1;\r\n try {\r\n years = Integer.parseInt(employeeYearsOfWorkJTextField.getText());\r\n } catch (NumberFormatException e) {\r\n hasError = true;\r\n JOptionPane.showMessageDialog(this, \"Years of works must be an integer\");\r\n }\r\n if (!hasError) {\r\n records.add(new Record(empId, telephone, name, years));\r\n }\r\n }",
"@Test(groups = {\"All\", \"fixing\"})\n\tpublic void TC89302_OpenEVV_invalid_special_char_EmpGender() throws InterruptedException, IOException, ParseException\n\t{\n\t\t// logger = extent.startTest(\"TC89302_OpenEVV_invalid_special_char_EmpGender\");\n\t\t \n\t\tlogger.log(LogStatus.INFO, \"To validate the special char employee gender\");\n\t\t//Using Reusable method to load client json\n\t\tJSONArray j=CommonMethods.LoadJSON_OpenEVV(\"employee\");\n\n\t\t//Making json values dynamic\n\t\tJSONObject js = (JSONObject) j.get(0);\n\t\tjs.put(\"EmployeeGender\", CommonMethods.generateSpecialChar(1));\n\t\tlogger.log(LogStatus.INFO, \"Passing EmployeeGender as special character\");\n\n\t\tString bodyAsString = CommonMethods.capturePostResponse(j, CommonMethods.propertyfileReader(globalVariables.openevv_emp_url));\n\n\t\tlogger.log(LogStatus.INFO, \"Validating Json response \");\n\n\t\t//Using Assert to validate the expected result\n\t\tAssert.assertTrue(bodyAsString.contains(\"\\\"status\\\": \\\"FAILED\\\",\"));\n\t\tAssert.assertTrue(bodyAsString.contains(\"ERROR: The EmployeeGender expected format is not correct.\"));\n\t}",
"@Test\r\n public void validatingEstateWhenEstateIsValidShouldNotThrowException() throws InvalidEstateException {\n estateValidator.validate(estateDto);\r\n\r\n // Then no exception is thrown\r\n }",
"@Test(groups = {\"All\", \"fixing\"})\n\tpublic void TC89302_OpenEVV_valid_EmpGender_M() throws InterruptedException, IOException, ParseException\n\t{\n\t\t// logger = extent.startTest(\"TC89302_OpenEVV_valid_EmpGender_M\");\n\t\t \n\t\tlogger.log(LogStatus.INFO, \"To validate the 'M' employee gender\");\n\t\t//Using Reusable method to load client json\n\t\tJSONArray j=CommonMethods.LoadJSON_OpenEVV(\"employee\");\n\n\t\t//Making json values dynamic\n\t\tJSONObject js = (JSONObject) j.get(0);\n\n\n\t\tlogger.log(LogStatus.INFO, \"Passing EmployeeGender as Male \");\n logger.log(LogStatus.INFO, \"extracting request send body \" + j.toJSONString());\n\n\t\tjs.put(\"EmployeeGender\", DataGeneratorEmployee.gender[0]);\n\n\t\tCommonMethods.validateResponse(j, CommonMethods.propertyfileReader(globalVariables.openevv_emp_url));\n\t}",
"@Test\r\n\tpublic void addEmployeeTestCase5() {\n\t\tEmployee employee5 = new Employee();\r\n\t\temployee5.name = \"JosephKuruvila\";\r\n\t\temployee5.role = \"Software Developer\";\r\n\t\temployee5.employeeID = \"Jose2455\";\r\n\t\temployee5.email = \"joseph@chainsys.com\";\r\n\t\temployee5.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee5.gender = \"Male\";\r\n\t\temployee5.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee5.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tboolean isAddedEmployee = EmployeeOperations.addEmployee(employee5);\r\n\t\tassertTrue(isAddedEmployee);\r\n\t}",
"public static void main(String[] args) {\n System.out.println(\"How many employees would you like to type numbers for?\");\n Scanner emp_id_in = new Scanner(System.in);\n int emp_in = emp_id_in.nextInt();\n Employee EmployeeArr[] = new Employee[emp_in]; // should be size of the scanned input\n for (int i = 0; i < EmployeeArr.length; i++) {\n // Employee number\n System.out.println(\"Please enter the employees ID number(Enter a number from 0 to 999999)\");\n Scanner emp_id_scanner = new Scanner(System.in);\n int emp_id = emp_id_scanner.nextInt();\n // First\n System.out.println(\"Please enter the employees first name:\");\n Scanner first_name_scanner = new Scanner(System.in);\n String first_name = first_name_scanner.nextLine();\n // Last\n System.out.println(\"Please enter the employees last name:\");\n Scanner last_name_scanner = new Scanner(System.in);\n String last_name = last_name_scanner.nextLine();\n // Push entries into Name class\n Name name_obj = new Name();\n name_obj.get_employee_name(emp_id, first_name, last_name);\n //Street\n System.out.println(\"Please enter the employee's street name: \");\n Scanner street_name_scanner = new Scanner(System.in);\n String street_name = street_name_scanner.nextLine();\n // City\n System.out.println(\"Please enter the employee's city: \");\n Scanner city_name_scanner = new Scanner(System.in);\n String city_name = city_name_scanner.nextLine();\n // State\n System.out.println(\"Please enter the employee's state: \");\n Scanner state_name_scanner = new Scanner(System.in);\n String state_name = state_name_scanner.nextLine();\n System.out.println(\">>>>>>>>>>\" + state_name.split(\"\").length);\n // Zip\n System.out.println(\"Please enter the employee's zip code\");\n Scanner zip_code_scanner = new Scanner(System.in);\n int zip_code = zip_code_scanner.nextInt();\n // Push entries into Address class\n Address address_obj = new Address();\n address_obj.get_address_data(street_name, city_name, state_name, zip_code);\n // hire month\n System.out.println(\"Please enter the month the employee was hired(Eg. 1,2,3,... etc): \");\n Scanner month_scanner = new Scanner(System.in);\n int month = month_scanner.nextInt();\n // hire day\n System.out.println(\"Please enter the day the employee was hired(Eg. 1,2,3,... etc): \");\n Scanner day_scanner = new Scanner(System.in);\n int day = day_scanner.nextInt();\n // hire year\n System.out.println(\"Please enter the year the employee was hired: \");\n Scanner year_scanner = new Scanner(System.in);\n int year = year_scanner.nextInt();\n // Push data into Date class\n Date date_obj = new Date();\n date_obj.get_date_data(month, day, year);\n // Push data into employee class\n EmployeeArr[i] = new Employee();\n EmployeeArr[i].get_employee_information(name_obj.employee_number, name_obj.employee_first, name_obj.employee_last, address_obj.street, address_obj.zip_code,\n address_obj.city, address_obj.state, date_obj.hire_month, date_obj.hire_day, date_obj.hire_year);\n\n }\n // Show the data\n for (int j = 0; j < EmployeeArr.length; j++) {\n EmployeeArr[j].show_dat();\n }\n }",
"@Override\n public boolean validate(List<Shift> shifts, Employee employee , ShiftConfiguration config) {\n if(shifts.isEmpty()) {\n return true;\n }\n int lastIndex = shifts.size() - 1;\n Shift shift = shifts.get(lastIndex);\n int dayNumber = shift.getDayNumber();\n if(dayNumber < timeFrame) {\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean isValid(String value, ConstraintValidatorContext context) {\n\t\treturn value != null && employeeDetailsService.retrieveEmployeeByEmail(value) == null;\n\t}",
"@Override\n public void setEmployees() throws EmployeeCreationException {\n\n }",
"protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validate the following here instead of from within an attribute because\n // we need to make sure that both values are set before we perform the test.\n\n if (endDate != null)\n {\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, whenever comparing jbo\n // Date objects, we have to convert to long values.\n \n long endDateLong = endDate.dateValue().getTime();\n\n // We can assume we have a Start Date or the validation of this \n // value would have thrown an exception.\n \n if (endDateLong < startDate.dateValue().getTime())\n {\n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_END_BAD\"); // Message name\n } \n } \n \n }",
"public void validate() {\n\t\terrors.clear();\n\t\t\n\t\tif(!this.id.isEmpty()) {\n\t\t\ttry {\n\t\t\t\tLong.parseLong(this.id);\n\t\t\t} catch(NumberFormatException ex) {\n\t\t\t\terrors.put(\"id\", \"Id is not valid.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.firstName.isEmpty()) {\n\t\t\terrors.put(\"firstName\", \"First name is obligatory!\");\n\t\t}\n\t\t\n\t\tif(this.lastName.isEmpty()) {\n\t\t\terrors.put(\"lastName\", \"Last name is obligatory!\");\n\t\t}\n\t\t\n\t\tif(this.nick.isEmpty()) {\n\t\t\terrors.put(\"nick\", \"Nick is obligatory!\");\n\t\t}\n\t\t\n\t\tif(DAOProvider.getDAO().doesNickAlreadyExist(nick)) {\n\t\t\terrors.put(\"nick\", \"Nick already exist!\");\n\t\t}\n\n\t\tif(this.email.isEmpty()) {\n\t\t\terrors.put(\"email\", \"EMail is obligatory!\");\n\t\t} else {\n\t\t\tint l = email.length();\n\t\t\tint p = email.indexOf('@');\n\t\t\tif(l<3 || p==-1 || p==0 || p==l-1) {\n\t\t\t\terrors.put(\"email\", \"EMail is not valid.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.password.isEmpty()) {\n\t\t\terrors.put(\"password\", \"Password is obligatory!\");\n\t\t}\n\t}",
"@Override\n public void seedData() throws EmployeeCreationException, DepartmentCreationException {\n\n }",
"boolean hasEmployeelist();",
"public static boolean empidValidate(String emp_id){\n if(emp_id.matches(\"\\\\p{IsAlphabetic}{2}-\\\\d{4}\"))\n return true;\n\n else {\n System.out.println(\"The employee ID must be in the format of AA-1234.\");\n return false;\n }\n\n }",
"@Test\r\n\tpublic void addEmployeeTestCase1() {\n\t\tEmployee employee1 = new Employee();\r\n\t\temployee1.name = \"JosephKuruvila\";\r\n\t\temployee1.role = \"Software Developer\";\r\n\t\temployee1.employeeID = \"Jose2455\";\r\n\t\temployee1.email = \"joseph@chainsys.com\";\r\n\t\temployee1.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee1.gender = \"Male\";\r\n\t\temployee1.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee1.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tboolean isAddedEmployee = EmployeeOperations.addEmployee(employee1);\r\n\t\tassertTrue(isAddedEmployee);\r\n\t}",
"Employee(int id, String name, String birthDate, int eage, double esalary){\r\n ID=id; \r\n NAME=name; \r\n BIRTHDATE=birthDate; \r\n age=eage; \r\n salary=esalary; \r\n }",
"private boolean validateData() {\n if (!mCommon.validateData()) return false;\n\n Core core = new Core(this);\n\n // Due Date is required\n if (TextUtils.isEmpty(getRecurringTransaction().getDueDateString())) {\n core.alert(R.string.due_date_required);\n return false;\n }\n\n if (TextUtils.isEmpty(mCommon.viewHolder.dateTextView.getText().toString())) {\n core.alert(R.string.error_next_occurrence_not_populate);\n\n return false;\n }\n\n // Payments Left must have a value\n if (getRecurringTransaction().getPaymentsLeft() == null) {\n core.alert(R.string.payments_left_required);\n return false;\n }\n return true;\n }",
"public void validate() throws Exception {\n }",
"protected boolean validateData(String [] data) {\n return true;\n }",
"@Test\r\n\tpublic void addEmployeeTestCase2() {\n\t\tEmployee employee2 = new Employee();\r\n\t\temployee2.name = \"JD\";\r\n\t\temployee2.role = \"Technical Consultant\";\r\n\t\temployee2.email = \"jd@chainsys.com\";\r\n\t\temployee2.employeeID = \"Jd2655\";\r\n\t\temployee2.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee2.gender = \"Male\";\r\n\t\temployee2.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee2.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tEmployeeOperations.addEmployee(employee2);\r\n\t}",
"@java.lang.Override\n public boolean hasEmployee() {\n return employee_ != null;\n }",
"@java.lang.Override\n public boolean hasEmployee() {\n return employee_ != null;\n }",
"public static void main (String args[] ){\n\t\tScanner scanner = new Scanner( System.in );\r\n\t\tSystem.out.print ( \" 1. Load Employee (From File) \\n 2. Exit Program \\n Enter Your Selection: \" );\r\n\t\tint input = scanner.nextInt();\r\n\t\t\r\n\t\t//if user inputs 1 read the text file and print employees loaded from the file\r\n\t\tif (input == 1 ){\r\n\t\t\tString[] Data;\r\n\t\t\t/**\r\n\t\t\t**create four arrays each of type StaffPharmacist, PharmacyManager, StaffTechnician, Senior technician\r\n\t\t\t**in order to store the employee objects. create arrays of length 1\r\n\t\t\t**/\r\n\t\t\tStaffPharmacist [] Pharmacist = new StaffPharmacist[1];\t\t\r\n\t\t\tPharmacyManager [] Manager = new PharmacyManager[1];\t\t\t\r\n\t\t\tStaffTechnician [] staffTech = new StaffTechnician[1];\t\t\t\r\n\t\t\tSeniorTechnician [] seniorTech = new SeniorTechnician[1];\r\n\t\t\ttry{\r\n\t\t\t\t//read the text file using scanner\r\n\t\t\t\tFile file = new File(\"employees.txt\");\r\n\t\t\t\t\t\t\r\n\t\t\t\tScanner sc = new Scanner(file);\r\n\t\t\t\t\t\r\n\t\t\t\t//while text file has next line split the text to store all elements in to an array\r\n\t\t\t\twhile (sc.hasNextLine()){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//read the text file and store it in an array called data. split the text file at , and read until we have next line\r\n\t\t\t\t\tData = sc.nextLine().split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t//create 4 employee objects of each employee type \r\n\t\t\t\t\tPharmacyManager pharmacyManager = new PharmacyManager(Data);\r\n\t\t\t\t\tStaffPharmacist staffPharmacist = new StaffPharmacist(Data);\r\n\t\t\t\t\tStaffTechnician staffTechnician = new StaffTechnician(Data);\r\n\t\t\t\t\tSeniorTechnician seniorTechnician = new SeniorTechnician(Data);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tint i;\r\n\t\t\t\t\t/** parse through the text files to check the job id number.\r\n\t\t\t\t\tif the job id is one than the employee is pharmacy manager and there fore store it in an array of type pharmacy manager, else if job id == 2 than it is a staff pharmacist there fore store the staff pharmacist employee in the respective array. else if job id == 3 the employee is a staff technician therefore store the employee object staff technician in array of type staff technician and if the id == 4 than the employee is senior technician so store the employee senior technician in an array of type senior technician\r\n\t\t\t\t\t**/\r\n\t\t\t\t\tfor( i = 0; i < Data.length; i = i + 4){\r\n\t\t\t\t\t\tif( Integer.parseInt(Data[i]) == 1 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tManager[0] = pharmacyManager;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 2 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPharmacist[0] = staffPharmacist;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 3 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tstaffTech[0] = staffTechnician;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else if( Integer.parseInt(Data[i]) == 4 ){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tseniorTech[0] = seniorTechnician;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t//close the file \r\n\t\t\t\tsc.close();\r\n\t\t\t\t\t\r\n\t\t\t\t//print that the file loaded success fully\r\n\t\t\t\tSystem.out.println ( \" \\n File Successfully Loaded! \" );\r\n\t\t\t\t\t\r\n\t\t\t\t//set a boolean variable named keepgoing equal to true.\r\n\t\t\t\tboolean keepGoing = true;\r\n\t\t\t\t//as long as keep going remains true, do the following steps\r\n\t\t\t\twhile(keepGoing){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ask the user what they would like to do next\r\n\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t\t//if user inputs 3 that is tries to print checks prior to entering hours worked than throw an error\r\n\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tSystem.out.println( \" Please enter the hours worked (Option #2) before trying to calculate the paycheck amounts! \" );\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//again ask the user after throwing the exception about what they would like to do\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//do this steps as long as user inputs 1 or 2\r\n\t\t\t\t\t\tdo{\r\n\t\t\t\t\t\t\t//if the user inputs 1 print the employee information described in respective classes of employees\r\n\t\t\t\t\t\t\tif(input == 1){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tManager[0].printPharmacyManager();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tPharmacist[0].printStaffPharmacist();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tseniorTech[0].printSeniorTechnician();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tstaffTech[0].printStaffTechnician();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//if the user inputs 2 prompt the user asking the number of hours worked by employees\r\n\t\t\t\t\t\t\telse if(input == 2){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tSystem.out.print( \" \\n Please enter the hours worked: \" );\r\n\t\t\t\t\t\t\t\tint workingHours = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//than again ask user what they would like to do\r\n\t\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t/**if user inputs 3 after they entered number of hours employees worked than calculate the employee pay checks\r\n\t\t\t\t\t\t\t\tusing the calculate pay method defined in employee class\r\n\t\t\t\t\t\t\t\tget the employees pay rate by using getHourlyRate method defined in employee class\r\n\t\t\t\t\t\t\t\t**/\r\n\t\t\t\t\t\t\t\tif(input == 3){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tManager[0].calculatePay(workingHours, Manager[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tPharmacist[0].calculatePay(workingHours, Pharmacist[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tstaffTech[0].calculatePay(workingHours, seniorTech[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\tseniorTech[0].calculatePay(workingHours, staffTech[0].getHourlyRate() );\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//again show the menu to the user asking them what they would like to do\r\n\t\t\t\t\t\t\t//if user enters one or two or three repeat the above steps else exit the loop\r\n\t\t\t\t\t\t\tSystem.out.print ( \" \\n 1. Print Employee Information \\n 2. Enter Hours Worked \\n 3. Calculate Paychecks \\n 4. Exit Program \\n Enter Your Selection: \" );\r\n\t\t\t\t\t\t\tinput = scanner.nextInt();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}while(input == 1 || input == 2 );\r\n\t\t\t\t\t}while(input == 3);\r\n\t\t\t\t\t//if user enters 4 set keepGoing = false print good bye and exit the loop.\r\n\t\t\t\t\tif(input == 4){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tkeepGoing = false;\r\n\t\t\t\t\t\tSystem.out.println( \" Goodbye! \" );\r\n\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//if the file is not found in the system throw an IO exception printing file not found\t\t\t\t\t\t\t\r\n\t\t\t}catch(FileNotFoundException fnfe){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t//catch the exception if the file is not found\r\n\t\t\t\tSystem.out.println(\" File Load Failed! \\n java.io.FileNotFoundException: employees.txt ( The system cannot find the file specified) \\n Program Exiting..... \");\r\n\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t//if the user inputs 2 in the main menu bar exit the loop and say goodBye!\r\n\t\tif(input == 2){\r\n\t\t\t\t\r\n\t\t\tSystem.out.println ( \"\\n Good Bye! \\n\" );\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n \n String name = jTextField1.getText();\n String email = jTextField2.getText();\n String password = jTextField3.getText();\n \n \n String gender = \"\";\n if (jRadioButton1.isSelected()) {\n gender = gender + jRadioButton1.getText();\n }\n if (jRadioButton2.isSelected()) {\n gender = gender + jRadioButton2.getText();\n }\n String country = (String) jComboBox1.getSelectedItem();\n \n //Phone number Validation\n \n \n //Item Name Validation\n if(name.isEmpty() == true){\n JOptionPane.showMessageDialog(rootPane, \"Please enter your Name\",\"Error\", JOptionPane.WARNING_MESSAGE);\n }\n \n else if (name.matches(\".*\\\\d.*\")){\n JOptionPane.showMessageDialog(rootPane,\"Only Text Value can be entered in name\",\"Error\",JOptionPane.ERROR_MESSAGE);\n }\n \n else if(email.isEmpty() == true){\n JOptionPane.showMessageDialog(rootPane, \"Please enter your email\",\"Error\", JOptionPane.WARNING_MESSAGE);\n }\n \n \n else if(password.isEmpty() == true){\n JOptionPane.showMessageDialog(rootPane, \"Please enter a password\",\"Error\", JOptionPane.WARNING_MESSAGE);\n }\n \n else if (isNumber(jTextField4.getText().trim()) == false){\n JOptionPane.showMessageDialog(rootPane, \"Please Enter correct phone number\",\"Error\", JOptionPane.WARNING_MESSAGE);\n }\n \n else if(jTextField4.getText().toLowerCase().trim().isEmpty() == true){\n JOptionPane.showMessageDialog(rootPane, \"Please enter your phone number\",\"Error\", JOptionPane.WARNING_MESSAGE);\n }\n \n else if(gender.isEmpty() == true){\n JOptionPane.showMessageDialog(rootPane, \"Please select your Gender\",\"Error\", JOptionPane.WARNING_MESSAGE);\n }\n \n else if(country.equals(\"SELECT COUNTRY\")){\n JOptionPane.showMessageDialog(rootPane, \"Please select your Country\",\"Error\", JOptionPane.WARNING_MESSAGE);\n } \n \n else{\n \n long pNumber = Long.parseLong(jTextField4.getText()); \n int exit = 1;\n \n for(EmployeeRecord e: employee){\n \n \n if(e.getName().toLowerCase().compareTo(name) == 0){\n exit = 2;\n break;\n \n }\n else if(e.getPhoneNumber()==pNumber){\n exit = 3;\n break;\n }\n \n }\n \n if(exit == 2){\n JOptionPane.showMessageDialog(rootPane, \"Name already added\",\"Error\" , JOptionPane.ERROR_MESSAGE);\n }\n else if(exit == 3){\n JOptionPane.showMessageDialog(rootPane, \"Phone number already exit\",\"Error\" , JOptionPane.ERROR_MESSAGE);\n }\n else if(exit == 1){\n EmployeeRecord emm = new EmployeeRecord(name, email, password, pNumber, gender, country);\n\n employee.add(emm);\n\n JOptionPane.showMessageDialog(rootPane, \"Employee has been registered\",\"Success\" , JOptionPane.INFORMATION_MESSAGE);\n\n jTextField1.setText(\"\");\n jTextField2.setText(\"\");\n jTextField3.setText(\"\");\n jComboBox1.setSelectedIndex(0);\n jTextField4.setText(\"\");\n buttonGroup1.clearSelection();\n }\n \n \n \n }\n \n\n\n }",
"@Override\n public void validate(StudentiEntity entity){\n List<String> errorMessages = new ArrayList<>();\n if(entity.getID() < 0) errorMessages.add(\"Invalid ID\");\n if(entity.getNume().equals(\"\")) errorMessages.add(\"Invalid name\");\n if(entity.getEmail().equals(\"\")) errorMessages.add(\"Invalid email\");\n if(entity.getGrupa() < 0) errorMessages.add(\"Invalid grupa\");\n\n if(errorMessages.size() > 0) throw new ValidationException(errorMessages);\n }",
"@Test\n void employee_test(){\n Employee test_emp = new Employee();\n test_emp.parseInput(\"Johnson,Eric,77777\");\n assertTrue((test_emp.getLastName().equals(\"Johnson\"))&&(test_emp.getFirstName().equals(\"Eric\"))&&(test_emp.getSalary().equals(\"77777\")));\n }",
"@Test\r\n public void testGetAllEMployees() throws Exception {\r\n try {\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n List<Employee> result = instance.getAllEMployees();\r\n assertTrue(result != null);\r\n assertTrue(result.size() > 0);\r\n } catch (Exception ex) {\r\n assertTrue(ex.getMessage().contains(\"NoDataFromDatabase\"));\r\n }\r\n }",
"private boolean validateData() {\r\n TASKAggInfo agg = null;\r\n int index = aggList.getSelectedIndex();\r\n if (index != 0) {\r\n agg = (TASKAggInfo)aggregators.elementAt(aggList.getSelectedIndex()-1);\r\n }\r\n\r\n if (getArgument1() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 1 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getArgument2() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 2 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getOperand() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Filter value must be of type integer\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }",
"public void validate() {}",
"@Test(groups = {\"All\", \"fixing\"})\n\tpublic void TC89302_OpenEVV_invalid_numeric_Gender() throws InterruptedException, IOException, ParseException\n\t{\n\t\t// logger = extent.startTest(\"TC89302_OpenEVV_invalid_numeric_Gender\");\n\t\t \n\t\tlogger.log(LogStatus.INFO, \"To validate the numeric employee gender\");// adding what you are verifing\n\n\t\t//Using Reusable method to load client json\n\t\tJSONArray j=CommonMethods.LoadJSON_OpenEVV(\"employee\");\n\n\t\t//Making json values dynamic\n\t\tJSONObject js = (JSONObject) j.get(0);\n\t\tjs.put(\"EmployeeGender\",CommonMethods.generateRandomNumberOfFixLength(1));\n\t\tlogger.log(LogStatus.INFO, \"Passing EmployeeGender as number \");\n \n\t\tString bodyAsString = CommonMethods.capturePostResponse(j, CommonMethods.propertyfileReader(globalVariables.openevv_emp_url));\n\n\t\tlogger.log(LogStatus.INFO, \"Validating Json response \");\n\n\n\t\t//Using Assert to validate the expected result\n\t\tAssert.assertTrue(bodyAsString.contains(\"\\\"status\\\": \\\"FAILED\\\",\"));\n\t\tAssert.assertTrue(bodyAsString.contains(\"ERROR: The EmployeeGender expected format is not correct.\"));\n\t}",
"@Test\n\tpublic void testingMultipleEmployees() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tthis.sendingKeys();\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.findElement(By.id(\"sn_staff\")).click();\n\t\tdriver.findElement(By.id(\"act_primary\")).click();\n\t\t\n\t\tint beforeAdd = driver.findElements(By.tagName(\"a\")).size();\n\t\t\n\t\tdriver.findElement(By.id(\"_asf1\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl1\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase1\")).sendKeys(\"jelena@myaddress.com\");\n\t\t\n\t\tdriver.findElement(By.id(\"_asf2\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl2\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase2\")).sendKeys(\"dusan@myaddress.com\");\n\t\t\n\t\tdriver.findElement(By.id(\"_as_save_multiple\")).click();\n\t\t\n\t\tint afterAdd = driver.findElements(By.tagName(\"a\")).size();\n\t\t\n\t\tint newAdded = beforeAdd - afterAdd;\n\t\t\n\t\tassertEquals(2, newAdded);\n\t\t\n\t}",
"public boolean hasEmployee() {\n return employeeBuilder_ != null || employee_ != null;\n }",
"public boolean hasEmployee() {\n return employeeBuilder_ != null || employee_ != null;\n }",
"public Employee(String employeeFirstName, String employeeLastName, \r\n String employeeEmail, long employeePhoneNumber, \r\n String employeeStatus, double employeeSalary) {\r\n this.employeeFirstName = employeeFirstName;\r\n this.employeeLastName = employeeLastName;\r\n this.employeeEmail = employeeEmail;\r\n this.employeePhoneNumber = employeePhoneNumber;\r\n this.employeeStatus = employeeStatus;\r\n this.dateHired = new Date();\r\n this.employeeAddress = new Address();\r\n this.employeeSalary = employeeSalary;\r\n }",
"private void validate() {\n for (DBRow row : rows) {\n for (DBColumn column : columns) {\n Cell cell = Cell.at(row, column);\n DBValue value = values.get(cell);\n notNull(value,\"Cell \" + cell);\n }\n }\n }",
"@Override\n\tpublic void validate() {\n\t\tif(name==null||name.trim().equals(\"\")){\n\t\t\taddActionError(\"用户必须填写!\");\n\t\t}\n\t\t\n\t\tList l=new ArrayList();\n\t\tl=userService.QueryByTabId(\"Xxuser\", \"id\", id);\n\t\t//判断是否修改\n\t\tif(l.size()!=0){\n\t\t\t\n\t\t\tfor(int i=0;i<l.size();i++){\n\t\t\t\tXxuser xxuser=new Xxuser();\n\t\t\t\txxuser=(Xxuser)l.get(i);\n\t\t\t\tif(xxuser.getName().equals(name.trim())){\n\t\t\t\t\tSystem.out.println(\"mei gai\");\n\t\t\t\t}else{\n\t\t\t\t\tList n=new ArrayList();\n\t\t\t\t\tn=userService.QueryByTab(\"Xxuser\", \"name\", name);\n\t\t\t\t\tif(n.size()!=0){\n\t\t\t\t\t\taddActionError(\"该用户已经存在!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\n\t\t\t\n\t\t}\n\t}",
"public Employee(String employeeName, PositionTitle position, boolean salary, double payRate, int employeeShift,\n String startDate, double hrsIn) {\n // ////////////// construct Employees\n this.employeeName = employeeName;\n this.position = position;\n this.salary = salary;\n this.payRate = payRate;\n this.employeeShift = employeeShift;\n this.startDate = startDate;\n this.hrsIn = hrsIn;\n\n }",
"public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"Lucas_Smith@TechCompany.org\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"Jane_Charlotte@TechCompany.org\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }",
"void validate();",
"void validate();",
"private synchronized void validateData(Quote q) throws DataValidationException, InvalidDataException {\n\t\tif (q == null) throw new InvalidDataException(\"Quote cannot be null.\");\n\t\tif (q.getQuoteSide(BookSide.SELL).getPrice().lessOrEqual(q.getQuoteSide(BookSide.BUY).getPrice())) {\n\t\t\tthrow new DataValidationException(\"Sell price: \" + q.getQuoteSide(BookSide.SELL).getPrice() +\n\t\t\t\t\t\" cannot be less than or equal to the buy price: \" + q.getQuoteSide(BookSide.BUY).getPrice());\n\t\t}\n\t\tif (q.getQuoteSide(BookSide.BUY).getPrice().lessOrEqual(PriceFactory.makeLimitPrice(0)) || \n\t\t\t\tq.getQuoteSide(BookSide.SELL).getPrice().lessOrEqual(PriceFactory.makeLimitPrice(0))) {\n\t\t\tthrow new DataValidationException(\"The buy and sell prices cannot be less than or equal to 0. \"\n\t\t\t\t\t+ \"Your buy price: \" + q.getQuoteSide(BookSide.BUY).getPrice() \n\t\t\t\t\t+ \". Your sell price: \" + q.getQuoteSide(BookSide.SELL).getPrice());\n\t\t}\n\t\tif (q.getQuoteSide(BookSide.BUY).getOriginalVolume() <= 0 || \n\t\t\t\tq.getQuoteSide(BookSide.SELL).getOriginalVolume() <= 0) {\n\t\t\tthrow new DataValidationException(\"The original volume of the BUY or SELL side cannot be less than or equal to 0. \"\n\t\t\t\t\t+ \"Your BUY volume: \" + q.getQuoteSide(BookSide.BUY).getOriginalVolume()\n\t\t\t\t\t+ \". Your SELL volume: \" + q.getQuoteSide(BookSide.SELL).getOriginalVolume());\n\t\t}\n\t}",
"public void setEmployeeId(String employeeId) {\n this.employeeId = employeeId;\n }",
"public static void EmployeeTest()\r\n\t{\n\t\t\tScanner getVar = new Scanner(System.in);\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\r\n\t\t\t//Arrays to hold final values.\r\n\t\t\tString[] employeeNameArr = new String[100];\r\n\t\t\tdouble[] employeeSalArr = new double[100];\r\n\t\t\t\r\n\t\t\t//Variable for user choice.\r\n\t\t\tint choice;\r\n\t\t\t\r\n\t\t\t//Loop the menu until exit.\r\n\t\t\twhile(true)\r\n\t\t\t{\r\n\t\t\t\t//Creating the menu.\r\n\t\t\t\tSystem.out.println(\"1. Create employee\\n2. Give Employee 10% Raise\\n3. Display Employees\\n4. Exit\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.print(\"Enter a choice: \");\r\n\t\t\t\tchoice = input.nextInt();\r\n\t\t\t\t\r\n\t\t\t\tswitch(choice)\r\n\t\t\t\t{\r\n\t\t\t\t/*CREATE EMPLOYEE: ASKS FOR USERS NAME AND MONTHLY SALARY\r\n\t\t\t\t \t\t\t\tCONVERTS THE MONTHLY SALARY TO YEARLY SALARY\r\n\t\t\t\t \t\t\t\tENSURES THAT THE EMPLOYEE IS PAYED.*/\r\n\t\t\t\tcase 1:\r\n\t\t\t\t{\r\n\t\t\t\t\t//Setting Employee's First Name\r\n\t\t\t\t\tSystem.out.print(\"Enter Employee's First Name: \");\r\n\t\t\t\t\tString fName = getVar.next();\r\n\t\t\t\t\tsetFirstName(fName);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Setting Employee's Last Name\r\n\t\t\t\t\tSystem.out.print(\"Enter Employee's Last Name: \");\r\n\t\t\t\t\tString lName = getVar.next();\r\n\t\t\t\t\tsetLastName(lName);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Setting Employee's Monthly Salary\r\n\t\t\t\t\twhile(true) {\r\n\t\t\t\t\t\tSystem.out.print(\"Enter the Employee's MONTHLY Salary: \");\r\n\t\t\t\t\t\tdouble createSal = getVar.nextDouble()*12;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t//Making Sure the Employee is Paid Properly\r\n\t\t\t\t\t\tif(createSal<=0) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Invalid Salary\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tsetMonthlySalary(createSal);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//Pushes the names and values into an array.\r\n\t\t\t\t\t\t\tfor(int i = 0; i <= employeeNameArr.length; i++)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(employeeNameArr[i] == null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\temployeeNameArr[i] = getFirstName() + \" \" + getLastName();\r\n\t\t\t\t\t\t\t\t\temployeeSalArr[i] = getMonthlySalary();\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t/*GIVE EMPLOYES 10% RAISE: ADDS 10% TO THE MONTHLY SALARY\r\n\t\t\t\t \t\t\t\t\t\tALLOWS USER TO CHOOSE EMPLOYEE FROM LIST\r\n\t\t\t\t \t\t\t\t\t\tMAKES SURE THERE IS AT LEAST ONE EMPLOYEE*/\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Confirming that there is at least one employee\r\n\t\t\t\t\tif(employeeNameArr[0] == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"There are currently no employees.\\n\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Listing each employee and their yearly salary (i+1 to avoid displaying 0)\r\n\t\t\t\t\tfor(int i = 0; employeeNameArr[i] != null; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println((i+1)+\". \"+employeeNameArr[i]);\r\n\t\t\t\t\t\tSystem.out.println(\"$\"+employeeSalArr[i]+\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//User inputs which employee gets the raise.\r\n\t\t\t\t\tSystem.out.print(\"Which employee should receive the raise? : \");\r\n\t\t\t\t\tint salChoice = getVar.nextInt();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Calculating the raise to the monthly salary\r\n\t\t\t\t\temployeeSalArr[salChoice-1] = (employeeSalArr[salChoice-1]/12) * .10 + employeeSalArr[salChoice-1]/12;\r\n\t\t\t\t\t//Converting monthly salary to yearly salary\r\n\t\t\t\t\temployeeSalArr[salChoice-1] = employeeSalArr[salChoice-1]*12;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Outputting new information.\r\n\t\t\t\t\tSystem.out.println(\"New yearly salary for \" + employeeNameArr[salChoice-1] + \": \" + employeeSalArr[salChoice-1] + \"\\n\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t/*DISPLAY EMPLOYEES: MAKES SURE THERE IS AT LEAST ONE EMPLOYEE\r\n\t\t\t\t * \t\t\t\t\tLISTS ALL AVAILABLE EMPLOYEES IN ORDER OF CREATION*/\r\n\t\t\t\tcase 3:\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(employeeNameArr[0] == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"There are currently no employees.\\n\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Displaying the employees \r\n\t\t\t\t\tfor(int i = 0; employeeNameArr[i] != null; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(employeeNameArr[i]);\r\n\t\t\t\t\t\tSystem.out.println(\"$\"+employeeSalArr[i]+\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t/*EXIT: EXITS THE PROGRAM\r\n\t\t\t\t * \t\tFREES THE SCANNERS FROM MEMORY*/\r\n\t\t\t\tcase 4:\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Logging out...\");\r\n\t\t\t\t\tinput.close();\r\n\t\t\t\t\tgetVar.close();\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void testingAddNewEmployee() {\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tthis.sendingKeys();\n\t\t\n\t\tdriver.findElement(By.id(\"sn_staff\")).click();\n\t\tdriver.findElement(By.id(\"act_primary\")).click();\n\t\t\n\t\tdriver.findElement(By.id(\"_asf1\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl1\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase1\")).sendKeys(\"emailAddress\");\n\t\t\n\t\tdriver.findElement(By.id(\"_as_save_multiple\")).click();\n\t\t\n\t\tWebElement newEmployee = driver.findElement(By.linkText(\"FirstName LastName\"));\n\t\tassertNotNull(newEmployee);\n\t\t\n\t}",
"private void preProcessData() {\n\n // Group employees by department\n if (employeesByDepartments == null) {\n\n employeesByDepartments = new HashMap<>();\n\n dataSet.stream().forEach(employee -> {\n\n if (!employeesByDepartments.containsKey(employee.getDepartment()))\n employeesByDepartments.put(employee.getDepartment(), new HashSet<>());\n Set<EmployeeAggregate> employees = employeesByDepartments.get(employee.getDepartment());\n employees.add(employee);\n });\n }\n\n // Find out minimum, and maximum age of the employees\n if (minAge == 0) minAge = dataSet.stream().map(EmployeeAggregate::getAge).min(Integer::compare).get();\n if (maxAge == 0) maxAge = dataSet.stream().map(EmployeeAggregate::getAge).max(Integer::compare).get();\n\n // Group employees by age\n if (employeesByAgeRange == null) {\n\n employeesByAgeRange = new HashMap<>();\n\n // Work out age ranges\n Set<Range> ranges = new HashSet<>();\n int currTopBoundary = (int) Math.ceil((double) maxAge / (double) AGE_RANGE_INCREMENT) * AGE_RANGE_INCREMENT;\n\n while (currTopBoundary >= minAge) {\n Range range = new Range(currTopBoundary - AGE_RANGE_INCREMENT, currTopBoundary);\n ranges.add(range);\n employeesByAgeRange.put(range, new HashSet<>());\n currTopBoundary -= AGE_RANGE_INCREMENT;\n }\n\n // Group employees\n dataSet.stream().forEach(employee -> {\n for (Range range : ranges) {\n if (range.inRange(employee.getAge())) {\n\n employeesByAgeRange.get(range).add(employee);\n\n break;\n }\n }\n });\n }\n }",
"private boolean isValidManagerIds(List<Employee> employees) {\n // if an employee's manager id refers to his own employee id, then this is invalid\n if (employees.stream().filter(e -> e.getEmployeeId().equals(e.getManagerId())).count()!=0)\n return false;\n\n List<Integer> employeeIds = employees.stream()\n .mapToInt(Employee::getEmployeeId)\n .boxed().collect(Collectors.toList());\n List<Integer> managerIds = employees.stream()\n .filter(Employee::hasManager)\n .mapToInt(Employee::getManagerId).distinct()\n .boxed().collect(Collectors.toList());\n //check if there's a manager id that is not one of the employees\n return employeeIds.containsAll(managerIds);\n }",
"@Override\r\n\tpublic Collection<ETLException> validate() {\n\t\treturn null;\r\n\t}",
"public int insertData(Employee employee) {\n\t\ttry {\n\t\t\tString query = \"insert into employeedbaddress values(?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setInt(1, employee.getEno());\n\t\t\tps.setString(2, employee.getEname());\n\t\t\tps.setString(3, employee.getEdesignation());\n\t\t\tps.setString(4, employee.getEgender());\n\t\t\tps.setDouble(5, employee.getEsalary());\n\t\t\tps.setString(6, employee.getEusername());\n\t\t\tps.setString(7, employee.getEpassword());\n\t\t\tps.setString(8, employee.getStreet());\n\t\t\tps.setString(9, employee.getCity());\n\t\t\tps.setString(10, employee.getState());\n\t\t\tps.setInt(11, employee.getPincode());\n\t\t\tps.setString(12, employee.getContact());\n\t\t\tps.setString(13, employee.getEmail());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"----------------HR representatives Log in----------------\");\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter your USERNAME: \");\n\t\tString username = input.nextLine();\n\t\tSystem.out.println(\"Please enter your PASSWORD: \");\n\t\tString password = input.nextLine();\n\t\tSystem.out.println();\n\t\t\n\t\t//test public static int getEmployeeID (String user, String password) method\n\t\tint empID = DAManager.getEmployeeID(username, password);\n\t\t\n\t\tif (empID == 0) {\n\t\t\tSystem.out.println(\"You are an unauthorized user.\");\n\t\t\tSystem.exit(0);\n\t\t}else {\n\t\t\tSystem.out.println(\"You have passed the credential check.\\n\");\n\t\t\tSystem.out.println(\"Your information is : \");\n\t\t\t//test public static Employee getEmployeeByID(int empid) method \n\t\t\tEmployee HR_emp = DAManager.getEmployeeByID(empID);\n\t\t\tHR_emp.display();\n\t\t\t\n\t\t\t//test public static void addEmployee (Employe emp) method\n\t\t\tSystem.out.println(\"\\nAdd one employee inte EMPLOYEE table\");\n\t\t Employee added_emp = new Employee(207, \"Yuhang\", \"Zhao\", \"yzhao248@myseneca.ca\", \"111-222-3333\", java.sql.Date.valueOf(\"2020-09-01\"), \"IT_PROG\", 30000, 0.0,102,60);\n\t\t\tDAManager.addEmployee(added_emp);\n\t\t\t\n\t\t\t//test public static ArrayList<Employe> getAllEmployees() method\n\t\t\tSystem.out.println(\"\\nGet an ArrayList including all employee info\");\n\t\t\tArrayList<Employee> empList = DAManager.getAllEmployees();\n\t\t\tSystem.out.println(\"The 1st employee info within this arrayList is:\");\n\t\t\t(empList.get(0)).display();\n\t\t\tSystem.out.println(\"The number of employees in EMPLOYEES table is: \"+ empList.size());\n\t\t\t\n\t\t\t//test public static ArrayList<Employe> getEmployeesByDepartmentID (int depid) method \n\t\t\tSystem.out.println(\"\\nGet an ArrayList including all employee info in the department_ID 60: \");\n\t\t\tArrayList<Employee> empListByDep = DAManager.getEmployeesByDepartmentID(60);\n\t\t\tSystem.out.println(\"The 1st employee info within this arrayList is:\");\n\t\t\t(empListByDep.get(0)).display();\n\t\t\tSystem.out.println(\"The number of employees in deaprtment ID 60 is: \"+empListByDep.size());\n\t\t\t\n\t\t\t//test public static int updateEmployee (Employee emp) method\n\t\t\tSystem.out.println(\"\\nUpdate the employee#99 info\");\n\t\t\tEmployee updated_emp = new Employee(207, \"James\", \"Bob\", \"1111@gmail.com\", \"123-345-1111\", java.sql.Date.valueOf(\"2019-11-01\"), \"FI_ACCOUNT\", 24000, 0.0, 108, 100);\n\t\t\tDAManager.updateEmployee(updated_emp);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//test public static boolean batchUpdate(String[] SQLs) method\n\t\t\tSystem.out.println(\"\\nTest batchUpdate method: \");\n\t\t\tString batchSQL1 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(208, 'Lebron', 'James', 'aaa@aaa.com', '111-111-2222', TO_DATE('01-Jan-2017', 'DD-MM-YYYY','NLS_DATE_LANGUAGE = American'), 'IT_PROG')\";\n\t\t\tString batchSQL2 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(209, 'Kevin', 'Durant', 'bbb@aaa.com', '111-222-3333', SYSDATE, 'AD_VP')\";\n\t\t\tString batchSQL3 = \"INSERT INTO EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, hire_date, job_id) \" + \n\t\t\t\t\t\"VALUES(210, 'Kris', 'Smith', 'ccc@aaa.com', '111-333-4444', SYSDATE, 'ST_MAN')\";\n\t\t\tString[] SQLs = new String[3];\n\t\t\tSQLs[0] = batchSQL1;\n\t\t\tSQLs[1] = batchSQL2;\n\t\t\tSQLs[2] = batchSQL3;\n\t\t\tif(DAManager.batchUpdate(SQLs)) {\n\t\t\t\tSystem.out.println(\"Success. This transaction is successfully executed!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Failed. All SQL statements are rolled back.\");\n\t\t\t};\n\t\t\t\n\t\t\t//test public static int deleteEmployeeByID (int empid) method\n\t\t\tSystem.out.println(\"\\nDelete the employee#210\");\n\t\t\tDAManager.deleteEmployeeByID(210);\n\t\t}\n\n\t}",
"public static void addEmployee(Scanner input, ArrayList<Employee> newEmployee){\n Employee newEmp = new Employee();\n String empNumber, empHireDate;\n System.out.print(\"Please enter the employee's first and last name: \");\n newEmp.setName(input.nextLine());\n System.out.print(\"Please enter the new employee's Employee Number.\\nThe Employee Number must match XXX-L including the dash where X is a digit and L is a letter A-M: \");\n empNumber = input.nextLine();\n newEmp.setNumber(verifyEmpNum(input, empNumber));\n System.out.print(\"Please enter the new employee's hire date.\\nMake sure the date you enter matches IX/JX/KXXX including the slashes\"\n + \"\\nwhere I is a 0 or 1,J is 0-3, K is a 1 or 2, and X is a digit 0-9: \");\n empHireDate = input.nextLine();\n newEmp.setDate(verifyHireDate(input, empHireDate));\n \n newEmployee.add(newEmp);\n \n }",
"public Large_Employee(\n String txtMobile,\n String txtEmail,\n String emailPassword,\n String corpPhoneType,\n String corpPhoneNumber,\n int employeeID){\n this.txtMobile = txtMobile;\n this.txtEmail = txtEmail;\n this.emailPassword = emailPassword;\n this.corpPhoneType = corpPhoneType;\n this.corpPhoneNumber = corpPhoneNumber;\n this.employeeID = employeeID;\n }",
"public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}",
"public void checkInputEmployee(TextField nameTF, TextField cprNo, TextField phoneNo, KeyEvent event) {\n if (event.getSource() == nameTF) {\n checkIfRedName(nameTF, event);\n } else if (event.getSource() == phoneNo) {\n redFieldNumber(phoneNo, event);\n } else if (event.getSource() == cprNo) {\n redFieldCPRNoAndZip(cprNo, event);\n }\n }",
"public void setEmployees(Employee[] employees) {\n\t\tthis.employees = employees;\n\t}",
"Employee(String employeeName, double employeeSalary, int employeeAge) {\n\t\tthis.employeeName = employeeName;\n\t\tthis.employeeSalary = employeeSalary;\n\t\tthis.employeeAge = employeeAge;\n\t}",
"public interface EmployeeRequestValidator {\n\n\t/**\n\t * \n\t * \n\t * @param Employee\n\t * control to be validated.\n\t * @param locale\n\t * the request locale.\n\t * @return set of ExceptionDetail.\n\t */\n\tValidateMessage validate(Employee employee);\n}",
"public boolean Validate() {\n String[] testArr = {titleTxf.getText(), fNameTxf.getText(), sNameTxf.getText(),\n initialTxf.getText(), hNumTxf.getText(), cNumTxf.getText(), emailTxf.getText(), idNumTxf.getText(),\n (String) maritalCbx.getSelectedItem(), \n resTxf1.getText() + \"\" + resTxf2.getText(), zipResTxf.getText(),postTxf1.getText() + \"\" + postTxf2.getText(),\n zipPostTxf.getText() };\n\n // verify user has entered data into required fields\n String inputTest = \"\";\n\n for (int i = 0; i < testArr.length; i++) {\n if (testArr[i].equals(inputTest)) {\n\n JOptionPane.showMessageDialog(rootPane, \"please fill in all required fields\", \"ERROR\", ERROR_MESSAGE);\n \n return false;\n \n\n }\n \n \n }\n //verify Home number\n if(hNumTxf.getText().length()!=10){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild Home number\", \"ERROR\", ERROR_MESSAGE);\n errHNum.setText(\"!\");\n \n return false;\n }\n else{\n errHNum.setText(\"\");\n }\n //verify CellNo\n if(cNumTxf.getText().length()!=10){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild Cellphone number\", \"ERROR\", ERROR_MESSAGE);\n errCNum.setText(\"!\");\n \n return false;\n \n }\n else{\n errCNum.setText(\"\");\n }\n //verify email\n String email =emailTxf.getText(); \n if(!email.contains(\"@\")|| !email.contains(\".\")){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild email address\", \"ERROR\", ERROR_MESSAGE);\n errEmail.setText(\"!\");\n return false;\n }\n else{\n errEmail.setText(\"\");\n }\n \n //verify ID No. (Local)\n String ID = idNumTxf.getText();\n if(ID.length()!=13){\n \n JOptionPane.showMessageDialog(rootPane, \"Invaild ID number\", \"ERROR\", ERROR_MESSAGE);\n errID.setText(\"!\");\n return false;\n }\n else{\n errID.setText(\"\");\n }\n \n if(zipResTxf.getText().length()!=4){\n JOptionPane.showMessageDialog(rootPane, \"Invaild Zip Code\", \"ERROR\", ERROR_MESSAGE);\n errZipRes.setText(\"!\");\n return false;\n \n }\n else{\n \n errZipRes.setText(\"\");\n }\n if(zipPostTxf.getText().length()!=4){\n JOptionPane.showMessageDialog(rootPane, \"Invaild Zip Code\", \"ERROR\", ERROR_MESSAGE);\n errZipPost.setText(\"!\");\n return false;\n \n }\n else{\n \n errZipPost.setText(\"\");\n }\n \n \n return true;\n\n }",
"public static void registerEmployee(RequestHandler handler) {\n\n\t\tEmployee e = new Employee();\n\t\te.setId(-1);\n\n\t\tStringBuilder sb;\n\t\tsb = new StringBuilder();\n\t\tsb.append(\"\\nPlease enter employee email: \");\n\t\thandler.sendMessage(sb);\n\t\tString eEmail = handler.getMessage();\n\n\t\tif (eEmail != null) {\n\t\t\thandler.sendMessage(\"RECEIVED: \" + eEmail);\n\t\t\tif (Utils.isValidEmailAddress(eEmail)) {\n\t\t\t\tif (!EmployeeData.emailExists(eEmail)) {\n\t\t\t\t\t// we have a valid, unique email address\n\t\t\t\t\te.setEmail(eEmail);\n\t\t\t\t\thandler.sendMessage(\"Please enter employee name: \");\n\t\t\t\t\teEmail = null;\n\n\t\t\t\t\tString eName = handler.getMessage();\n\t\t\t\t\tif (eName != null && eName.length() > 0) {\n\n\t\t\t\t\t\te.setName(eName);\n\t\t\t\t\t\thandler.sendMessage(\"Please enter department name: \");\n\t\t\t\t\t\teName = null;\n\n\t\t\t\t\t\tString eDept = handler.getMessage();\n\t\t\t\t\t\tif (eDept != null && eDept.length() > 0) {\n\t\t\t\t\t\t\te.setDepartment(eDept);\n\n\t\t\t\t\t\t\tif (EmployeeData.addEmployee(e)) {\n\t\t\t\t\t\t\t\thandler.sendMessage(\"Employee \" + e.getEmail() + \" successfully added with ID \" + e.getId());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\thandler.sendMessage(\"Failed to add employee \" + e.getEmail() + \", reason unknown\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thandler.sendMessage(\"User with email \" + eEmail + \" already exists on system - ABORTING\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandler.sendMessage(\"Invalid email address format for: \" + eEmail + \" - ABORTING\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void test() {\n\t \n String obj1 = \"EMP201\"; \n String obj3 = \"Jackson\";\n String obj5 = \"Bond\";\n String obj7 = \"01/21/1989\";\n String obj9 = \"Male\";\n String obj11= \"jackson@yahoo.com\";\n String obj13 = \"Male\";\n String obj16= \"0172345658\";\n String obj17= \"H.N0 34,Jack Street,Malaysia\";\n String obj19= \"Developer\";\n String obj21= \"ICT\";\n String obj23= \"6000\";\n String obj25=\"02/21/2004\";\n\n /* Error When User enter some other form of value or \n * submit page without any parameter*/\n\n String obj2 = \"EMP201\";\n String obj4 = \"Jackson\";\n String obj6 = \"Bond\";\n String obj8 = \"01/21/1989\";\n String obj10 = \"Male\";\n String obj12= \"jackson@yahoo.com\";\n /*String obj12= \"jackso.com\";*/\n String obj14 = \"Male\";\n String obj15= \"0172345658\";\n /* String obj15= \"\";*/\n String obj18 = \"H.N0 34,Jack Street,Malaysia\";\n String obj20= \"Developer\";\n String obj22 = \"ICT\";\n /*int obj22 = 22;*/\n String obj24= \"6000\";\n String obj26=\"02/21/2004\";\n \n /*Testing paramter when entering values are in correct form*/\n /*assertEquals(obj1, obj2);*/\n assertEquals(obj3, obj4);\n assertEquals(obj5, obj6);\n assertEquals(obj7, obj8);\n assertEquals(obj9, obj10);\n assertEquals(obj11, obj12);\n assertEquals(obj13, obj14);\n assertEquals(obj15, obj16);\n assertEquals(obj17, obj18);\n assertEquals(obj19, obj20);\n assertEquals(obj21, obj22);\n assertEquals(obj23, obj24);\n assertEquals(obj25, obj26); \n \n /*assertNull(obj15);*/\n \n \n \n\n }",
"public Employee(String username,String password,String firstname,String lastname,Date DoB,\n String contactNamber,String email,float salary,String positionStatus,String name,\n String buildingName, String street, Integer buildingNo, String area,\n String city, String country, String postcode){\n\n super(username, password,firstname, lastname,DoB, contactNamber, email,\n name, buildingName, street, buildingNo, area, city, country, postcode);\n setSalary(salary);\n setPositionStatus(positionStatus);\n }",
"@Ignore\n @Test\n public void testEmployees() {\n Map<String, Object> map = new HashMap<>();\n map.put(\"uid\", \"jjcale\");\n map.put(\"uhUuid\", \"10000004\");\n\n AttributePrincipal principal = new AttributePrincipalImpl(\"jjcale\", map);\n Assertion assertion = new AssertionImpl(principal);\n CasUserDetailsServiceImplj userDetailsService = new CasUserDetailsServiceImplj(userBuilder);\n User user = (User) userDetailsService.loadUserDetails(assertion);\n\n // Basics.\n assertThat(user.getUsername(), is(\"jjcale\"));\n assertThat(user.getUid(), is(\"jjcale\"));\n assertThat(user.getUhUuid(), is(\"10000004\"));\n\n // Granted Authorities.\n assertThat(user.getAuthorities().size(), is(3));\n assertTrue(user.hasRole(Role.ANONYMOUS));\n assertTrue(user.hasRole(Role.UH));\n assertTrue(user.hasRole(Role.EMPLOYEE));\n\n assertFalse(user.hasRole(Role.ADMIN));\n }",
"@PostMapping(value = {\"\", \"/\"})\n public ResponseEntity<Employee> saveEmployee(@Valid @RequestBody CreateEmployeeRequest inputData){\n Employee employee = employeeService.saveEmployee(inputData);\n return new ResponseEntity<>(employee, HttpStatus.OK);\n }",
"public void setEmployeeID(int employeeID)\n {\n if(employeeID<=9999&&employeeID>=1000)\n {\n this.employeeID = employeeID;\n }else\n {\n System.out.println(\"The Employee ID should be of 4 digits only.\");\n \n }\n }",
"public void setEmployeeNum(String employeeNum) {\n this.employeeNum = employeeNum == null ? null : employeeNum.trim();\n }",
"@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}",
"public boolean addEmp(Employee e) {\n\t\treturn edao.create(e);\n\t\t\n\t}",
"private boolean checkEpisodeInputData(HttpServletRequest request, HttpServletResponse response) {\n return request.getParameter(\"episodeTitle\") != null && request.getParameter(\"episodeTitle\").length() > 0\n && request.getParameter(\"episodeDescription\") != null && request.getParameter(\"episodeDescription\").length() > 0\n && request.getParameter(\"episodeNumber\") != null && request.getParameter(\"episodeNumber\").length() > 0\n && request.getParameter(\"episodeSeason\") != null && request.getParameter(\"episodeSeason\").length() > 0\n && request.getParameter(\"series\") != null && request.getParameter(\"series\").length() > 0;\n }",
"private void validate() {\n\t\t// just in case;\n\t\tfor (int i=0;i<NR_OF_FIELDS; i++) {\n\t\t\tvalid[i] = \"0\";\n\t\t}\n\t\t//\n\t\t// Validate name and surname:\n\t\t//\n\t\tif ( ! this.isUpperAlpha(nume)) {\n\t\t\tfields[0] = \"1\";\n\t\t}\n\t\t\n\t\tif ( ! this.isUpperAlphaWithSpace(nume)) {\n\t\t\tfields[1] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate seria\n\t\t//\n\t\tvalid[2] = \"1\";\t\t\t\t\t\t\t// presupun ca seria este invalida, si incerc sa o validez\n\t\tfor (int i=0; i<seriiBuletin.length; i++) {\n\t\t\tif (seriiBuletin[i].equals(seria)) {\n\t\t\t\tvalid[2] = \"0\";\n\t\t\t}\n\t\t}\n\t\t//\n\t\t// validate numarul\n\t\t//\n\t\ttry {\n\t\t\tvalid[3] = \"1\";\n\t\t\tint nr = Integer.valueOf(numarul);\n\t\t\tif ( nr >= 100000 && nr <= 999999 ) {\n\t\t\t\tvalid[3] = \"0\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(TAG, \"Error validating seria.\");\n\t\t}\n\n\t\t//\n\t\t// validate sex\n\t\t//\n\t\tif ( ! (sex == 'M' || sex == 'F')) {\n\t\t\tvalid[6] = \"1\";\n\t\t}\n\t\t//\n\t\t// Validate valabilitate\n\t\t//\n\t\tif ( ! isNumber(this.valabilitate)) {\n\t\t\tvalid[7] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate CNP\n\t\t//\n\t\tif ( ! (isNumber(CNP) && isValidCNP(CNP))) {\n\t\t\tvalid[8] = \"1\";\n\t\t}\n\t\t\n\t}",
"public void validate() throws org.apache.thrift.TException {\n if (emailId == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'emailId' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n }"
] | [
"0.69547",
"0.6939943",
"0.68840605",
"0.68132186",
"0.6760784",
"0.67521137",
"0.6629106",
"0.6576908",
"0.6529794",
"0.6417282",
"0.63920194",
"0.6182638",
"0.61780983",
"0.61163557",
"0.60891175",
"0.6070678",
"0.60449964",
"0.5992763",
"0.59564215",
"0.5926435",
"0.5909841",
"0.58959687",
"0.58445096",
"0.58079034",
"0.57987666",
"0.57954",
"0.579105",
"0.578766",
"0.5773388",
"0.5769978",
"0.5768101",
"0.57511246",
"0.5737802",
"0.57195324",
"0.5710476",
"0.57099664",
"0.569317",
"0.5688958",
"0.56751895",
"0.5673308",
"0.5656767",
"0.5656596",
"0.5654352",
"0.56327826",
"0.56034935",
"0.55954844",
"0.5594016",
"0.5576773",
"0.5576281",
"0.55728114",
"0.55604655",
"0.5556048",
"0.5556048",
"0.55469227",
"0.5538618",
"0.5533436",
"0.5516431",
"0.5512867",
"0.55107725",
"0.550959",
"0.550887",
"0.5504274",
"0.5503998",
"0.5503998",
"0.550048",
"0.5495625",
"0.5491912",
"0.5491311",
"0.5485494",
"0.5484295",
"0.5484295",
"0.5482349",
"0.5480668",
"0.5480276",
"0.54743385",
"0.5465565",
"0.5465347",
"0.5461027",
"0.54574114",
"0.5448173",
"0.5442945",
"0.5442631",
"0.54423386",
"0.54376763",
"0.5429377",
"0.54142",
"0.5409897",
"0.5408349",
"0.54076004",
"0.5406058",
"0.53966904",
"0.53958464",
"0.5394635",
"0.5394018",
"0.5390813",
"0.53904086",
"0.5387914",
"0.5387327",
"0.5387169",
"0.5382293"
] | 0.65630704 | 8 |
/ Check that the salary is above min salary and below max salary. | public boolean employeeSalaryInTheCorrectRange(RoleAndSeniority ras, BigDecimal salary) {
Seniority s = rasRepo.findSeniority(ras.getRasId());
return (salary.compareTo(s.getSalaryMin()) >= 0) ? (salary.compareTo(s.getSalaryMax()) <= 0) ? true : false : false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean checkPlayerSalary(double playerSalary){\r\n return maxPlayerSalary >= playerSalary && playerSalary >= minPlayerSalary;\r\n }",
"public static boolean checkRefereeSalary(double playerSalary){\r\n return maxRefereeSalary >= playerSalary && playerSalary >= minRefereeSalary;\r\n }",
"public static void checkMinMax() {\r\n\t\tSystem.out.println(\"Beginning min/max test (should be -6 and 17)\");\r\n\t\tSortedIntList list = new SortedIntList();\r\n\t\tlist.add(5);\r\n\t\tlist.add(-6);\r\n\t\tlist.add(17);\r\n\t\tlist.add(2);\r\n\t\tSystem.out.println(\" min = \" + list.min());\r\n\t\tSystem.out.println(\" max = \" + list.max());\r\n\t\tSystem.out.println();\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Please Enter your salary:\");\n\t\tint num1 = sc.nextInt();\n\t\t\n\t\tSystem.out.println(\"salary offered:\");\n\t\tint num2 = sc.nextInt();\n\t\t\n\t\tSystem.out.println(\" Current Leavs : \");\n\t\tint num3 = sc.nextInt();\n\t\t\n\t\tSystem.out.println(\"Leavs Offered:\");\n\t\tint num4 = sc.nextInt();\n\t\t\n\t\tif (num1 < num2) {\n\t\t\t\n\t\t\tSystem.out.println(\"Join the company\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\tSystem.out.println(\" DO not join.\");\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println((num1 < num2 ) || (num3 < num4));\n\t\tSystem.out.println((num1 < num2 ) && (num3 < num4));\n\t}",
"private void checkValues(int yMin2, int yMax2, List<XYValue> listOfValues2) {\n\t\tif(yMin2 < 0) {\n\t\t\tthrow new IllegalArgumentException(\"Number can not be negative!\");\n\t\t}\n\t\tif(yMax2 <= yMin2) {\n\t\t\tthrow new IllegalArgumentException(\"Max has to be greater than min!\");\n\t\t}\n\t\tfor(XYValue value : listOfValues2) {\n\t\t\tif(value.getY() < yMin2) {\n\t\t\t\tthrow new IllegalArgumentException(\"Found smaller y than minimum!\");\n\t\t\t}\n\t\t}\n\t}",
"public void calculateSalary() {\n if (hours < 0 || hourlyRate < 0) {\r\n salary = -1;\r\n }\r\n else if (hours > 40) {\r\n salary = 40 * hourlyRate;\r\n }\r\n else {\r\n salary = hours * hourlyRate;\r\n }\r\n }",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter basic salary of an employee\");\r\n\t\tint Basic_salary=sc.nextInt();\r\n\t\tif(Basic_salary<=10000) {\r\n\t\t\tdouble HRA=Basic_salary*0.2;\r\n\t\t\tdouble DA=Basic_salary*0.8;\r\n\t\t\tdouble Gross_salary=(Basic_salary+HRA+DA);\r\n\t\t\tSystem.out.println(\"HRA= \"+HRA);\r\n\t\t\tSystem.out.println(\"DA= \"+DA);\r\n\t\t\tSystem.out.println(\"Gross Salary= \"+Gross_salary);\r\n\t\t\t}\r\n\t\telse if(Basic_salary<=20000) {\r\n\t\t\tdouble HRA=Basic_salary*0.25;\r\n\t\t\tdouble DA=Basic_salary*0.9;\r\n\t\t\tdouble Gross_salary=(Basic_salary+HRA+DA);\r\n\t\t\tSystem.out.println(\"HRA= \"+HRA);\r\n\t\t\tSystem.out.println(\"DA= \"+DA);\r\n\t\t\tSystem.out.println(\"Gross Salary= \"+Gross_salary);\r\n\t\t\t}\r\n\t\telse if(Basic_salary>20000) {\r\n\t\t\tdouble HRA=Basic_salary*0.4;\r\n\t\t\tdouble DA=Basic_salary*0.95;\r\n\t\t\tdouble Gross_salary=(Basic_salary+HRA+DA);\r\n\t\t\tSystem.out.println(\"HRA= \"+HRA);\r\n\t\t\tSystem.out.println(\"DA= \"+DA);\r\n\t\t\tSystem.out.println(\"Gross Salary= \"+Gross_salary);\r\n\t\t\t}\r\n\t\tsc.close();\r\n\t}",
"private boolean minValid(int min, int max) {\n\n boolean isValid = true;\n\n if (min <= 0 || min >= max) {\n isValid = false;\n AlartMessage.displayAlertAdd(3);\n }\n\n return isValid;\n }",
"@Test\n public void testIsInLimitLower() {\n Assertions.assertTrue(saab.isInLimit(.3, .9, .6));\n }",
"public static ArrayList<Employee> updateSalary(List<Employee> emp , int salaryRangeFrom, int salaryRangeTo, double changeMultiplier){\n final int lessThan = 3000;\n double salaryIncrease;\n\n ArrayList<Employee> filtered = new ArrayList<Employee>();\n for(Employee e : emp){\n\n if( (e.getSalary()>salaryRangeFrom && e.getSalary()<salaryRangeTo) && e.getTaxableSalary()<lessThan){\n\n salaryIncrease = e.getSalary() * changeMultiplier - e.getSalary();\n\n e.setSalary((int)checkTheMultiplier(salaryIncrease, Double.valueOf(e.getTax()), e.getSalary(), changeMultiplier));\n filtered.add(e);\n }\n }\n\n return filtered;\n }",
"private boolean minVerify(int min, int max) {\r\n\r\n boolean minLess = true;\r\n\r\n if (min <= 0 || min >= max) {\r\n minLess = false;\r\n //LOGICAL ERROR: Min value error\r\n errorLabel.setVisible(true);\r\n errorTxtLabel.setText(\"Min must be less than Max.\");\r\n errorTxtLabel.setVisible(true);\r\n }\r\n\r\n return minLess;\r\n }",
"public void boundsCheck(BigDecimal d) throws InvalidDatatypeValueException {\n boolean minOk = false;\n boolean maxOk = false;\n String upperBound = (fMaxExclusive != null )? ( fMaxExclusive.toString() ):\n ( ( fMaxInclusive != null )?fMaxInclusive.toString():\"\");\n \n String lowerBound = (fMinExclusive != null )? ( fMinExclusive.toString() ):\n (( fMinInclusive != null )?fMinInclusive.toString():\"\"); \n String lowerBoundIndicator = \"\";\n String upperBoundIndicator = \"\";\n \n \n if ( isMaxInclusiveDefined){\n maxOk = (d.compareTo(fMaxInclusive) <= 0);\n upperBound = fMaxInclusive.toString();\n if ( upperBound != null ){\n upperBoundIndicator = \"<=\"; \n } else {\n upperBound=\"\";\n }\n } else if ( isMaxExclusiveDefined){\n maxOk = (d.compareTo(fMaxExclusive) < 0);\n upperBound = fMaxExclusive.toString();\n if ( upperBound != null ){\n upperBoundIndicator = \"<\";\n } else {\n upperBound = \"\";\n }\n } else{\n maxOk = (!isMaxInclusiveDefined && ! isMaxExclusiveDefined);\n }\n \n \n if ( isMinInclusiveDefined){\n minOk = (d.compareTo(fMinInclusive) >= 0);\n lowerBound = fMinInclusive.toString();\n if( lowerBound != null ){\n lowerBoundIndicator = \"<=\";\n }else {\n lowerBound = \"\";\n }\n } else if ( isMinExclusiveDefined){\n minOk = (d.compareTo(fMinExclusive) > 0);\n lowerBound = fMinExclusive.toString();\n if( lowerBound != null ){\n lowerBoundIndicator = \"<\";\n } else {\n lowerBound = \"\";\n }\n } else{\n minOk = (!isMinInclusiveDefined && !isMinExclusiveDefined);\n }\n \n if (!(minOk && maxOk))\n throw new InvalidDatatypeValueException (\n getErrorString(DatatypeMessageProvider.OutOfBounds,\n DatatypeMessageProvider.MSG_NONE,\n new Object [] { d.toString() , lowerBound ,\n upperBound, lowerBoundIndicator, upperBoundIndicator}));\n \n }",
"public static void main(String[] args) {\n long[] salaries= {120000, 85000, 95000, 145000};\n\n for(long eachSalary : salaries){\n System.out.println(eachSalary);\n }\n\n long max=salaries[0];\n for (int i = 0; i <salaries.length ; i++) {\n if(salaries[i]>max);\n max=salaries[i];\n }\n System.out.println(\"max = \" + max);\n\n\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(20>10&&20<30);\n\t\tint a=10;\n\t\tint b=20;\n\t\tint max=a>b?a:b;\n\t\tSystem.out.println(max);\n\n\n\n\n\t}",
"public void setSalaryRange(String salaryRange) {\r\n this.salaryRange = salaryRange;\r\n }",
"static void compareEmployeeSalary(EmployeeQ7 e1, EmployeeQ7 e2) {\n\t\tif (e1.getSalary() > e2.getSalary()) {\n\t\t\te1.display();\n\t\t} else {\n\t\t\te2.display();\n\t\t}\n\n\t}",
"private boolean validMin(int min, int max) {\r\n\r\n boolean isTrue = true;\r\n\r\n if (min <= 0 || min >= max) {\r\n isTrue = false;\r\n alertDisplay(3);\r\n }\r\n\r\n return isTrue;\r\n }",
"public static void main(String[] args) {\n Scanner num = new Scanner(System.in);\n int x = num.nextInt();\n if (x > -15 && x <= 12 || x > 14 && x < 17 || x >= 19 && x < Integer.MAX_VALUE) {\n System.out.println(\"True\");\n } else {\n System.out.println(\"False\");\n }\n }",
"public boolean isValid(int courseTuition, int courseSalary, int maxStudents) {\n if ((courseTuition < 0) || (courseSalary < 0) || (maxStudents < 0)) {\n return false;\n }\n return true;\n }",
"private static double checkTheMultiplier(double salaryIncrease, double tax, int salary, double multiplier){\n\n while(salaryIncrease > tax){\n salaryIncrease= salary*multiplier - salary;\n multiplier -= 0.01;\n }\n return salary+salaryIncrease;\n }",
"static Predicate<Beer> priceRangeQuery(Float priceLowest, Float priceHighest) {\n return b -> b.getPrice() >= priceLowest && b.getPrice() <= priceHighest;\n }",
"public static void main(String[] args) {\n double a=100;\n double b=200;\n double c=400.5;\n boolean aMin=a<b && a<c; //if a is less than both b and c,then is the minimum\n boolean bMin=b<a && b<c;//if b is less then booth a and c, then b is the minimum\n boolean cMin=c<a && c<b;//if\n if(aMin){\n System.out.println(a+\"is the minimum number\");}\n if(bMin){\n System.out.println(b+\"is the minimum number\");}\n if(cMin){\n System.out.println(c+\"is the minimum number\");}\n\n }",
"public static void main(String[] args) {\n\n int grade = 100;\n\n if (grade >= 90 && grade <= 100){\n System.out.println(\"Excellent\");\n }\n if (grade >= 70 && grade < 90 ){\n System.out.println(\"Good\");\n }\n if (grade >= 60 && grade < 70){\n System.out.println(\"Pass\");\n }\n if (grade < 60 && grade >= 0){\n System.out.println(\"Fail\");\n }\n if (grade > 100 || grade < 0){\n System.out.println(\"Invalid grade. Please write your grade between 1-100\");\n }\n\n\n\n\n\n\n }",
"public boolean inRange(Number n) {\n return n.compareTo(min) >= 0 && n.compareTo(max) <= 0;\n }",
"public Double calculateMatchingSalary(Long candidateSalaryFrom,\n Long candidateSalaryTo,\n Long compSalaryFrom,\n Long compSalaryTo) {\n\n try {\n if (Objects.equals(compSalaryFrom, candidateSalaryFrom)\n ||(candidateSalaryTo != null && candidateSalaryTo <= compSalaryFrom)){\n return (double) 100;\n } else if (compSalaryTo != null && Objects.equals(candidateSalaryFrom, compSalaryTo)) {\n return (double) 50;\n } else return (double) 0;\n } catch (Exception ex) {\n logger.error(\"Candidate Salary from or Company Salary from cannot be null || \" + ex.getMessage());\n throw new IllegalArgumentException(\"Wrong Arguments\");\n\n\n }\n }",
"private boolean inventoryVerify(int min, int max, int stock) {\r\n\r\n boolean invBetween = true;\r\n\r\n if (stock < min || stock > max) {\r\n invBetween = false;\r\n //LOGICAL ERROR: Inventory value error\r\n errorLabel.setVisible(true);\r\n errorTxtLabel.setText(\"Inventory must be less than Max and greater than Min.\");\r\n errorTxtLabel.setVisible(true);\r\n }\r\n\r\n return invBetween;\r\n }",
"public boolean not3TimesHigher() {\n\t\tArrayList<Double> temp=averageSalaries();\n\t\tfor(int i=0;i<temp.size();i++) {\n\t\t\tdouble selectOne= temp.get(i);//choose the select employee\n\t\t\ttemp.remove(i);//remove the select one's salary\n\t\t\tdouble[] otherEmployees=new double[temp.size()];\n\t\t\tfor(int j=0;j<otherEmployees.length;j++) {\n\t\t\t\totherEmployees[j]=temp.get(j);\n\t\t\t}\n\t\t\ttemp.add(i,selectOne);//add the salary whose selected last time.\n\t\t\ttry{\n\t\t\t\tif(selectOne>(average(otherEmployees)*3)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t}catch(IllegalArgumentException e) {\n\t\t\t\tSystem.out.println(\"There is something wrong with input\");\n\t\t\t}\n\t\t}\n\t return true;\n\t}",
"@Test\n\tpublic void testMinMinMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( max, MaxDiTre.max(min, min, max) );\n\t}",
"public static void findMinMax(Student[] student){\n int minMidterm=student[0].getExamGrade().getMidtermExamGrade();//this is first step to find min value of midterm because I describe first index of midterm value in array\n int maxMidterm=student[0].getExamGrade().getMidtermExamGrade();//this is first step to find max value of midterm because I describe first index of midterm value in array\n int minFinal=student[0].getExamGrade().getFinalExamGrade();//this is first step to find min value of final because I describe first index of final value in array\n int maxFinal=student[0].getExamGrade().getFinalExamGrade();//this is first step to find max value of final because I describe first index of final value in array\n\n for(int i=0;i<student.length;i++){\n if(student[i].getExamGrade().getMidtermExamGrade()<minMidterm){ // this condution find min value of midterm until this step \n minMidterm=student[i].getExamGrade().getMidtermExamGrade();\n }\n if(student[i].getExamGrade().getMidtermExamGrade()>maxMidterm){// this condution find max value of midterm until this step \n maxMidterm=student[i].getExamGrade().getMidtermExamGrade();\n }\n if(student[i].getExamGrade().getFinalExamGrade()<minFinal){// this condution find min value of final until this step \n minFinal=student[i].getExamGrade().getFinalExamGrade();\n }\n if(student[i].getExamGrade().getFinalExamGrade()>maxFinal){// this condution find max value of final until this step \n maxFinal=student[i].getExamGrade().getFinalExamGrade();\n }\n }\n\n System.out.println(\"Maximum Midterm Exam Grade: \"+maxMidterm+\" Minumum Midterm Exam Grade: \"+minMidterm);\n System.out.println(\"Maximum Final Exam Grade: \"+maxFinal+\" Minumum Final Exam Grade: \"+minFinal);\n }",
"@Test\n\tpublic void testMinMinMin(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( min, MaxDiTre.max(min, min, min) );\n\t}",
"public String getSalaryRange() {\r\n return salaryRange;\r\n }",
"private boolean isInsideBounderies(double value, Double min, Double max) {\r\n \tif (min == null && max == null) {\r\n \t\treturn true;\r\n \t}\r\n \telse if (min != null && max == null) {\r\n \t\treturn min <= value;\r\n \t}\r\n \telse if (min == null && max != null) {\r\n \t\treturn value <= max;\r\n \t}\r\n \treturn min <= value && value <= max;\r\n }",
"public void salary() {\n System.out.print(\"Wage: \");\n double wage = in.nextDouble();\n System.out.print(\"Hours: \");\n double hours = in.nextDouble();\n final double REG_HOURS = 40;\n final double OVERTIME_MULTIPLIER = 0.5;\n\n double salary = wage * hours;\n if (hours > REG_HOURS) {\n salary += (hours - REG_HOURS) * wage * OVERTIME_MULTIPLIER;\n }\n\n System.out.printf(\"\\nYou'll make $%,.2f this week.\\n\\n\", salary);\n }",
"@Test\n public void testMinMaxNumber() {\n NumberValue minNumber = factory.getMinNumber();\n NumberValue maxNumber = factory.getMaxNumber();\n MatcherAssert.assertThat(minNumber + \" < \" + maxNumber, minNumber.compareTo(maxNumber), lessThan(0));\n }",
"protected void calcMinMax() {\n }",
"public final void setSalary(float salary){\n if(salary>=0){\n this.salary=salary;\n }\n else{\n JOptionPane.showMessageDialog(null,\"Incorrect amount of salary \");\n }\n }",
"@Test\n\tpublic void testBiggerMaxSmaller(){\n\t int min=3, mid=5, max=10, bigger=Integer.MAX_VALUE, smaller=Integer.MIN_VALUE;\n\t assertEquals( bigger, MaxDiTre.max(bigger, max, smaller) );\n\t}",
"public boolean nearMaxMin() {\n double water = this.levelMessage.getDoubleParameter();\n double no = (this.configuration.getMaximalLimitLevel()\n - this.configuration.getMaximalNormalLevel()) / 4;\n if (water > this.configuration.getMaximalLimitLevel()\n || water > this.configuration.getMaximalLimitLevel() - no) {\n return true;\n } else if (water < this.configuration.getMinimalLimitLevel()\n || water < this.configuration.getMinimalLimitLevel() + no) {\n\n return true;\n }\n return false;\n }",
"@Override\n public double between(double min, double max) {\n return super.between(min, max);\n }",
"private static int buyLowSellHigh(int[] prices) {\n int minPrice = Integer.MAX_VALUE;\n int maxProfit = Integer.MIN_VALUE;\n\n for (int v : prices) {\n if (minPrice == Integer.MAX_VALUE) {\n // update min price for the first time\n minPrice = v;\n } else if (v > minPrice) {\n // calculate profit since the stock price is > minPrice\n int profit = v - minPrice;\n maxProfit = Math.max(maxProfit, profit);\n } else {\n // either v is equal to or smaller than minPrice, then update it\n minPrice = v;\n }\n }\n System.out.printf(\"minPrice: %d\\n\", minPrice);\n return maxProfit;\n }",
"public boolean check(int[] arr){\n\t\t\n\t\tint i,max=Integer.MIN_VALUE,min=Integer.MAX_VALUE;\n\t\tfor(i=0;i< arr.length;i++){\n\t\t\tif(arr[i]>max){\n\t\t\t\tmax=arr[i];\n\t\t\t}\n\t\t\tif(arr[i] < min){\n\t\t\t\tmin = arr[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(max-min+1 != arr.length){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor(i=0;i<arr.length;i++){\n\t\t\tif(arr[Math.abs(arr[i])-min] < 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(arr[Math.abs(arr[i])-min] > 0){\n\t\t\t\tarr[Math.abs(arr[i])-min]= -arr[Math.abs(arr[i])-min]; \n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean in3050(int a, int b) {\n return ((a >= 30 && a <= 40) && (b >= 30 && b <= 40)) ||\n ((a >= 40 && a <= 50) && (b >= 40 && b <= 50));\n}",
"@Test\r\n\tpublic void calculLostPointsByOneRuleBetweenMaxMinTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByOneRule(new ModelValue(1f, 0.5f, 4f), new Integer(3)),\r\n\t\t\t\tnew Float(1.5));\r\n\t}",
"@Test\n\tpublic void testSmallerBiggerMax(){\n\t int min=3, mid=5, max=10, bigger=Integer.MAX_VALUE, smaller=Integer.MIN_VALUE;\n\t assertEquals( bigger, MaxDiTre.max(smaller, bigger, max) );\n\t}",
"private void validateParameter(){\n\t\tif(hrNum > upperBound){\n\t\t\thrNum = upperBound;\n\t\t}\n\t\telse if(hrNum < lowerBound){\n\t\t\thrNum = lowerBound;\n\t\t}\n\t}",
"@Test\n public void testIsInLimitUpper() {\n Assertions.assertFalse(saab.isInLimit(.5, 1.5, 2.0));\n }",
"public static void main(String[] args) {\n\t\tScanner scnr = new Scanner(System.in);\n\t\tint firstNum;\n\t\tint secondNum;\n\t\tint thirdNum;\n\t\tint lowEnd;\n\t\tint highEnd;\n\t\t\n\t\tSystem.out.println(\"Enter a number: \");\n\t\tfirstNum = scnr.nextInt();\n\t\t\n\t\tSystem.out.println(\"Enter another number: \");\n\t\tsecondNum = scnr.nextInt();\n\t\tif (firstNum < secondNum) {\n\t\t\tlowEnd = firstNum;\n\t\t\thighEnd = secondNum;\n\t\t} else {\n\t\t\tlowEnd = secondNum;\n\t\t\thighEnd = firstNum;\n\t\t}\n\t\tSystem.out.println(\"Your range is \" + lowEnd + \"-\" + highEnd + \".\");\n\t\tSystem.out.println(\"Enter a number for verification: \");\n\t\tthirdNum = scnr.nextInt();\n\t\t\n\t\tif (thirdNum >= lowEnd && thirdNum <= highEnd) {\n\t\t\tSystem.out.println(thirdNum + \" is in the range.\");\n\t\t} else {\n\t\t\tSystem.out.println(thirdNum + \" is outside the range.\");\n\t\t}\n\t\t\n\t\tscnr.close();\n\t}",
"boolean hasAgeRange();",
"boolean hasIncomeRange();",
"public static boolean almost_leq(double a, double b, long maxUlps) {\n return a <= b || almost_equals(a, b, maxUlps);\n }",
"@Test\n\tpublic void testMaxSmallerBigger(){\n\t int min=3, mid=5, max=10, bigger=Integer.MAX_VALUE, smaller=Integer.MIN_VALUE;\n\t assertEquals( bigger, MaxDiTre.max(max, smaller, bigger) );\n\t}",
"private boolean exceedRange(int year) {\n\t\tboolean exceeds = false;\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint upperRange = currentYear + RANGE_LIMIT;\n\t\tint lowerRange = currentYear - RANGE_LIMIT;\n\t\t\n\t\tif(year < lowerRange || year > upperRange){\n\t\t\texceeds = true;\n\t\t}\n\t\treturn exceeds;\n\t}",
"public int bookInputRangeChecker(String input, int min, int max)\n {\n int num = bookInputIntChecker(input);\n while (num < min || num > max){\n System.out.println(num + \" is not in the allowed range, \" + min + \" - \" + max);\n num = bookInputIntChecker(input);\n }\n \n return num;\n }",
"private void findMinandMaxValues(SparklineValues values) {\n minY = values.getValues().stream().filter(value -> value.getValue() != null).mapToDouble(SparklineValues.SparklineValue::getValue).min().orElse(0.0);\n maxY = values.getValues().stream().filter(value -> value.getValue() != null).mapToDouble(SparklineValues.SparklineValue::getValue).max().orElse(0.0);\n\n if (Math.abs(minY) > 1E30 || Math.abs(maxY) > 1E30) {\n // something is probably wrong\n System.out.println(\"Unexpectedly small/large min or max: \");\n values.getValues().forEach(value -> {\n System.out.print(value.getValue() + \" \");\n });\n System.out.println();\n minY = -1.0;\n maxY = 1.0;\n }\n\n if (minY.equals(maxY)) {\n if (minY.equals(0.0)) {\n minY = -1.0;\n maxY = 1.0;\n } else {\n minY = minY - 0.1 * Math.abs(minY);\n maxY = maxY + 0.1 * Math.abs(maxY);\n }\n }\n }",
"@Test\n public void assertTaxBracketBoundariesWithPrecisions() {\n String minimumSalaryString = \"60000.555555555555555555555555555555555555555555555555555555555555\";\n String maximumSalaryString = \"130000.555555555555555555555555555555555555555555555555555555555555\";\n\n BigDecimal minimumSalary = new BigDecimal(minimumSalaryString).setScale(DEFAULT_DECIMAL_SCALE, DEFAULT_ROUNDING);\n BigDecimal maximumSalary = new BigDecimal(maximumSalaryString).setScale(DEFAULT_DECIMAL_SCALE, DEFAULT_ROUNDING);\n TaxBracket sixtyTo130k = createTaxBracket(minimumSalary, maximumSalary);\n validateSalaryFitsWithinBracket(sixtyTo130k, minimumSalary);\n validateSalaryFitsWithinBracket(sixtyTo130k, maximumSalary);\n // Since we expect the rounding to make the last digit of the decimal a \"6\", we can change scales directly\n // Increase the minimum salary scale\n validateSalaryFitsWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(minimumSalary.toString(), \"6\") + \"61\"));\n // Same for the max salary\n validateSalaryFitsWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(maximumSalary.toString(), \"6\" + \"59\")));\n // Now do the reverse, reduce the scale so that it falls outside the range\n validateSalaryDoesNotFitWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(minimumSalary.toString(), \"6\") + \"59\"));\n validateSalaryDoesNotFitWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(maximumSalary.toString(), \"6\") + \"61\"));\n }",
"public void increaseSalary(double hIncrease,double hThreshold,double wIncrease,double wThreshold){\n ObjectListNode p=payroll.getFirstNode();\n Employee e;\n System.out.print(\"\\nIncreased Salaries:\\n\");\n pw.print(\"\\nIncreased Salaries:\\n\");\n while(p!=null){\n e=(Employee)p.getInfo();\n if(e.getRate()=='H'&&e.getSalary()<hThreshold){\n e.setSalary(e.getSalary()+hIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n else if(e.getRate()=='W'&&e.getSalary()<wThreshold){\n e.setSalary(e.getSalary()+wIncrease);\n System.out.printf(\"%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n pw.printf(\"\\n%s %s %.2f\\n\",e.getLastName(),e.getFirstName(),e.getSalary());\n }\n p=p.getNext();\n }\n }",
"public static void main(String[] args) {\nint x=100;\r\nint y = 60;\r\nint z= 20;\r\nint w= 50;\r\nif (x>y && x>z&& x>w) {\r\n\tSystem.out.println(\"x is the largest\");\r\n}\r\nelse if (y>z && y>w) {\r\n\tSystem.out.println(\"y is the largest\");\r\n}\r\nelse if (z>w) {\r\n\tSystem.out.println(\"z is the largest\");\r\n}\r\nelse\r\n{\r\nSystem.out.println(\"w is the largest\");\t\r\n}\r\n}",
"void validateGreaterThanOrEqualTo(Number x, Number y, String failureMessage, String successMessage) throws ValidationException, IllegalArgumentException;",
"private boolean inRange(double num, double low, double high) {\n if (num >= low && num <= high)\n return true;\n\n return false;\n }",
"public void validateMaximum() {\n/* */ double newMax;\n/* */ try {\n/* 392 */ newMax = Double.parseDouble(this.maximumRangeValue.getText());\n/* 393 */ if (newMax <= this.minimumValue) {\n/* 394 */ newMax = this.maximumValue;\n/* */ }\n/* */ }\n/* 397 */ catch (NumberFormatException e) {\n/* 398 */ newMax = this.maximumValue;\n/* */ } \n/* */ \n/* 401 */ this.maximumValue = newMax;\n/* 402 */ this.maximumRangeValue.setText(Double.toString(this.maximumValue));\n/* */ }",
"@Test\n\tpublic void testMidMaxMin(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( max, MaxDiTre.max(mid, max, min) );\n\t}",
"public List<Employe> findByEsalBetween(float startSal,float endSal);",
"private boolean inventoryValid(int min, int max, int stock) {\n\n boolean isValid = true;\n\n if (stock < min || stock > max) {\n isValid = false;\n AlartMessage.displayAlertAdd(4);\n }\n\n return isValid;\n }",
"public static void isGreaterThanMinAmount(double userInput, double minAmount) {\n\t\tif (userInput < minAmount) {\n\t\t\tthrow new IllegalArgumentException(\"You must enter at least $\" + minAmount + \". Please try again:\");\n\t\t}\n\t}",
"public void validateMinimum() {\n/* */ double newMin;\n/* */ try {\n/* 373 */ newMin = Double.parseDouble(this.minimumRangeValue.getText());\n/* 374 */ if (newMin >= this.maximumValue) {\n/* 375 */ newMin = this.minimumValue;\n/* */ }\n/* */ }\n/* 378 */ catch (NumberFormatException e) {\n/* 379 */ newMin = this.minimumValue;\n/* */ } \n/* */ \n/* 382 */ this.minimumValue = newMin;\n/* 383 */ this.minimumRangeValue.setText(Double.toString(this.minimumValue));\n/* */ }",
"@Override\n\tpublic boolean checkBoundary(float x) {\n\t\tif (!(x >= MINRANGE && x <= MAXRANGE)) {\n\t\t\treturn false;\n\t\t}\n\t\t// if in the range [-512.03, 511.97]\n\t\treturn true;\n\t}",
"public static boolean almost_less(double a, double b, long maxUlps) {\n if (almost_equals(a, b, maxUlps)) {\n return false;\n }\n return a < b;\n }",
"public static void main(String[] args)\n\t{\n\t\tint sum, max = Integer.MIN_VALUE, maxId = Integer.MIN_VALUE, min = Integer.MAX_VALUE, minId = Integer.MAX_VALUE;\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tSystem.out.print(\"How many entries are there? \");\n\t\tint enteries = scan.nextInt();\n\t\tint[] sales = new int[enteries];\n\n\t\tfor (int i = 0; i < enteries; i++)\n\t\t{\n\t\t\tSystem.out.print(\"Enter sales for salesperson \" + (i + 1) + \": \");\n\t\t\tsales[i] = scan.nextInt();\n\t\t\t// max if\n\t\t\tif (sales[i] > max)\n\t\t\t{\n\t\t\t\tmax = sales[i];\n\t\t\t\tmaxId = i;\n\t\t\t}\n\t\t\t// min if\n\t\t\tif (sales[i] < min)\n\t\t\t{\n\t\t\t\tmin = sales[i];\n\t\t\t\tminId = i;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\nSalesperson Sales\");\n\t\tSystem.out.println(\" ------------------ \");\n\t\tsum = 0;\n\t\tfor (int i = 0; i < sales.length; i++)\n\t\t{\n\t\t\tSystem.out.println(\" \" + (i + 1) + \" \" + sales[i]);\n\t\t\tsum += sales[i];\n\t\t}\n\t\tSystem.out.println(\"\\nTotal sales: \" + sum);\n\t\tSystem.out.println(\"Average sales: \" + (double) sum / 5);\n\t\tSystem.out.println(\"Salesperson \" + maxId + \" had the highest sale with \" + max);\n\t\tSystem.out.println(\"Salesperson \" + minId + \" had the lowest sale with \" + min);\n\t\tSystem.out.println(\"Enter a number: \");\n\t\tint excede = scan.nextInt();\n\t\tint peopleExceded = 0;\n\t\tfor (int i = 0; i < sales.length; i++)\n\t\t{\n\t\t\tif (sales[i] > excede)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Salesperson \" + (i + 1) + \" exceded \" + excede + \" by selling \" + sales[i]);\n\t\t\t\tpeopleExceded++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"A total of \" + peopleExceded + \" exceded \" + excede + \" sales.\");\n\t\tscan.close();\n\t}",
"public static boolean between( int value, int min, int max ) {\n return value >= min && value <= max;\n }",
"public void testLevelPlannedWhenExceeded() throws Exception {\n checkLevelPlannedWhenExceed(new int[]{100},\n new double[]{300},\n new double[]{100},\n new double[]{300});\n\n // -- One account: no levelling possible\n checkLevelPlannedWhenExceed(new int[]{100},\n new double[]{300},\n new double[]{400},\n new double[]{300});\n\n // -- Two accounts: no levelling needed\n checkLevelPlannedWhenExceed(new int[]{100, 101},\n new double[]{300, 500},\n new double[]{100, 200},\n new double[]{300, 500});\n\n // -- Two accounts: extra pushed to second account\n checkLevelPlannedWhenExceed(new int[]{100, 101},\n new double[]{300, 500},\n new double[]{400, 200},\n new double[]{400, 400});\n\n // -- Two accounts: extra pushed to first account\n checkLevelPlannedWhenExceed(new int[]{100, 101},\n new double[]{300, 500},\n new double[]{100, 600},\n new double[]{200, 600});\n\n // -- Two accounts: part of extra pushed to second account\n checkLevelPlannedWhenExceed(new int[]{100, 101},\n new double[]{300, 500},\n new double[]{400, 450},\n new double[]{400, 450});\n\n // -- Two accounts: total actual exceeds the total planned\n checkLevelPlannedWhenExceed(new int[]{100, 101},\n new double[]{300, 500},\n new double[]{250, 600},\n new double[]{250, 600});\n\n // -- Three accounts: extra taken from first account available\n checkLevelPlannedWhenExceed(new int[]{100, 101, 102},\n new double[]{300, 500, 200},\n new double[]{200, 600, 100},\n new double[]{200, 600, 200});\n\n // -- Three accounts: no planned for first one\n checkLevelPlannedWhenExceed(new int[]{100, 101, 102},\n new double[]{0, 500, 300},\n new double[]{0, 600, 100},\n new double[]{0, 600, 200});\n }",
"@Test\n\tpublic void testNegMaxNegMaxNegMin(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( -min, MaxDiTre.max(-max, -max, -min) );\n\t}",
"@Test\n\tpublic void testMaxMinMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( max, MaxDiTre.max(max, min, max) );\n\t}",
"public int compare(Employee a, Employee b)\n\t{\n\t\treturn a.Salary - b.Salary;\n\t}",
"private boolean isNumberinRange(double needle, double haystack, double range) {\n return (((haystack - range) < needle) // greater than low bounds\n && (needle < (haystack + range))); // less than upper bounds\n }",
"public static double constrain(double value, double min, double max) {\n if(value > max) value = max;\n else if(value < min) value = min;\n return value;\n }",
"public static void main(String[] args) {\n\t\tint a[]= {3,64,24,15,20};\r\n\t\tint max=a[0],min=a[0];\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tif(max<a[i])\r\n\t\t\t{\r\n\t\t\t\tmax=a[i];\r\n\t\t\t}\r\n\t\t\tif(min>a[i])\r\n\t\t\t{\r\n\t\t\t\tmin=a[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Minimum is:\"+min);\r\n\t\tSystem.out.println(\"Maximum is:\"+max);\r\n\r\n\t}",
"public static boolean isBetween(double value, double min, double max) {\n // if out of order, swap\n if(min > max) {\n double tmp_min = min;\n min = max;\n max = tmp_min;\n }\n return (value >= min && value <= max);\n }",
"Boolean CheckForLimit(float xVal, float yVal) {\n double xCalc = Math.pow(xVal - this.oval.centerX(), 2) / Math.pow((this.oval.width() / 2), 2);\n double yCalc = Math.pow(yVal - this.oval.centerY(), 2) / Math.pow((this.oval.height() / 2), 2);\n xCalc += yCalc;\n if (xCalc <= 1) {\n return true;\n } else {\n return false;\n }\n }",
"public static float validate(float min, float max){\n int valid = 0;\n Scanner sc = new Scanner(System.in);\n float temp = sc.nextFloat();\n while (valid != 1){\n if(temp < min || temp > max){\n System.out.println(\"Invalid reading, enter valid reading:\");\n temp = sc.nextFloat();\n }\n else{\n valid = 1;\n }\n }\n return temp;\n }",
"private static boolean checkOccurrenceRange(int min1, int max1, int min2, int max2) {\n/* 1159 */ if (min1 >= min2 && (max2 == -1 || (max1 != -1 && max1 <= max2)))\n/* */ {\n/* */ \n/* 1162 */ return true;\n/* */ }\n/* 1164 */ return false;\n/* */ }",
"public static void setMaxPlayerSalary(double maxPlayerSalary) {\r\n BudgetRegulations.maxPlayerSalary = maxPlayerSalary;\r\n }",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n scan.useLocale(Locale.ENGLISH);\n System.out.print(\"Enter A: \");\n double A = scan.nextDouble();\n System.out.print(\"Enter B: \");\n double B = scan.nextDouble();\n System.out.print(\"Enter x: \");\n double x = scan.nextDouble();\n System.out.print(\"Enter y: \");\n double y = scan.nextDouble();\n System.out.print(\"Enter z: \");\n double z = scan.nextDouble();\n\n double minSize = Math.min(A,B);\n double maxSize = Math.max(A,B);\n double minBrick = Math.min(Math.min(x,y),z);\n double midBrick = Math.min(Math.max(x,y),z);\n\n if (A*B>=minBrick*midBrick) {\n if (minSize>=minBrick || maxSize>=midBrick) {\n System.out.println(\"True\");\n }\n } else {\n System.out.println(\"False\");\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint firstValue = 24, secondValue = 32, thirdValue = 11;\n\t\tint mostLargestValue, secondLargeValue, minimumValue;\n\t\tint temporary; // 임시로 사용할 저장 공간\n\n//\t\tSystem.out.print(\"첫번째 수 = \");\n//\t\tfirstValue = in.nextInt();\n//\n//\t\tSystem.out.print(\"두번째 수 = \");\n//\t\tsecondValue = in.nextInt();\n//\n//\t\tSystem.out.print(\"세번째 수 = \");\n//\t\tthirdValue = in.nextInt();\n \n\t\t// and\n//\t\tif (secondValue >= firstValue && secondValue >= thirdValue) {\n//\t\t\ttemporary = firstValue;\n//\t\t\tfirstValue = secondValue;\n//\t\t\tsecondValue = temporary;\n//\t\t} else if (thirdValue >= firstValue && thirdValue >= secondValue) {\n//\t\t\ttemporary = firstValue;\n//\t\t\tfirstValue = thirdValue;\n//\t\t\tthirdValue = temporary;\n//\t\t}\n//\n//\t\tif (thirdValue >= secondValue) {\n//\t\t\ttemporary = secondValue;\n//\t\t\tsecondValue = thirdValue;\n//\t\t\tthirdValue = temporary;\n//\t\t}\n\t\t\n\t\tif (secondValue >= firstValue && secondValue >= thirdValue) {\n\t\t\tmostLargestValue = secondValue;\n\t\t} \n\n\t\tSystem.out.println();\n\t\tSystem.out.println(firstValue + \" >= \" + secondValue + \" >= \" + thirdValue);\n\n//\t\tin.close();\n\t}",
"public static void main(String[] args) {\n \r\n int x;\r\n int y;\r\n x= 40;\r\n y= 60;\r\n if(x<y) {\r\n\t System.out.println(\"y is bigger\");\t\r\n\t\r\n\t} \r\n\t}",
"public void setLethalRange(double lethal_range)\n {\n this.lethal_range = lethal_range;\n }",
"public static void main(String[] args) {\n\n int a = 34;\n int b = 45;\n int c = 78;\n\n if (a >= b && a >= c)\n System.out.println(a + \" is a largest number\");\n else if (b >= a && b >= c)\n System.out.println(b + \" is a largest number\");\n else\n System.out.println(c + \" is a largest number\");\n}",
"@Test\n\tpublic void testMinMaxMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( max, MaxDiTre.max(min, max, max) );\n\t}",
"@Test\n\tpublic void testNegMaxNegMinNegMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( -min, MaxDiTre.max(-max, -min, -max) );\n\t}",
"@Test\n\tpublic void testNegMinNegMaxNegMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( -min, MaxDiTre.max(-min, -max, -min) );\n\t}",
"public static void verifyInterval(double lower, double upper)\r\n/* 145: */ {\r\n/* 146:336 */ if (lower >= upper) {\r\n/* 147:337 */ throw new NumberIsTooLargeException(LocalizedFormats.ENDPOINTS_NOT_AN_INTERVAL, Double.valueOf(lower), Double.valueOf(upper), false);\r\n/* 148: */ }\r\n/* 149: */ }",
"@Override\n public int between(int min, int max) {\n return super.between(min, max);\n }",
"void validateLessThanOrEqualTo(Number x, Number y, String failureMessage, String successMessage) throws ValidationException, IllegalArgumentException;",
"public void setMinMax(double min, double max)\n {\n if (max == min)\n throw new IllegalArgumentException(\"Max value must be bigger than Min value!\");\n\n this.min = min;\n this.max = max;\n if (max < min)\n {\n this.max = min;\n this.min = max;\n }\n }",
"private boolean partIsValid(){\r\n int min = Integer.parseInt(partMin.getText());\r\n int max = Integer.parseInt(partMax.getText());\r\n int inventory = Integer.parseInt(partInv.getText());\r\n if(max < min || min >= max){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"Error: Change Max and Min Values\");\r\n alert.setContentText(\"Change Max value to be greater than min\");\r\n alert.showAndWait();\r\n return false;\r\n } else if(max < inventory || min > inventory){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"Error: Invalid Inventory number\");\r\n alert.setContentText(\"Inventory must be less than max and more than min\");\r\n alert.showAndWait();\r\n return false;\r\n }\r\n return true;\r\n }",
"public static void between(double arg, double min, double max, String argName) {\r\n lessThan(arg, max, argName);\r\n greaterThan(arg, min, argName);\r\n }",
"public void setSalary(double salary) {\r\n\t\tthis.salary = salary;\r\n\t}",
"public void setSalary(double salary) {\n this.salary = salary;\n }",
"public void setSalary(double salary) {\n this.salary = salary;\n }",
"public static void main(String[] args) {\n int minIntValue = Integer.MIN_VALUE;\n int maxIntValue = Integer.MAX_VALUE;\n System.out.println(\"Int min val: \" + minIntValue);\n System.out.println(\"Int max val: \" + maxIntValue);\n System.out.println(\"Busted MAX value = \" + maxIntValue + 1);\n // if you try and put a value larger than the max value in java, or a value smaller than\n // minimum value in java, then you will get and overflow in the case of the max value\n // or an underflow in the case of the minimum\n\n // in this case, we are using the MIN_VALUE and MAX_VALUE to get Java to tell us the\n // minimum and maximum ranges of numbers that can be stored.\n\n\n }",
"@Test\n public void getHourlySalaryTest() {\n double expected = 16.0;\n\n assertEquals(\"The expected value of the hourly salary does not match the actual: \"\n , expected, e1.getHourlySalary(), .01);\n }"
] | [
"0.7350722",
"0.70286596",
"0.6098469",
"0.57731235",
"0.5748972",
"0.568298",
"0.5678547",
"0.56683904",
"0.56274635",
"0.56203693",
"0.5613473",
"0.5609708",
"0.5597532",
"0.55970246",
"0.5593428",
"0.55907905",
"0.55682933",
"0.554323",
"0.55286014",
"0.5507718",
"0.54774815",
"0.5471314",
"0.5442649",
"0.5441064",
"0.53986835",
"0.53986764",
"0.5386189",
"0.53740203",
"0.5362824",
"0.53615636",
"0.53575194",
"0.5356393",
"0.5309454",
"0.527818",
"0.5278109",
"0.52773756",
"0.5273824",
"0.5247785",
"0.52370286",
"0.52321887",
"0.5228635",
"0.5223066",
"0.5213765",
"0.5210282",
"0.51981175",
"0.519371",
"0.5190666",
"0.51824635",
"0.5181953",
"0.5180999",
"0.5175181",
"0.5163035",
"0.51546305",
"0.5149385",
"0.5128305",
"0.5128065",
"0.51276445",
"0.5124993",
"0.5123581",
"0.5114402",
"0.51138705",
"0.5105471",
"0.5101334",
"0.5095775",
"0.50904024",
"0.50873715",
"0.50852174",
"0.5078567",
"0.50767404",
"0.50761515",
"0.5075634",
"0.50712264",
"0.5058832",
"0.5048003",
"0.50453985",
"0.50407535",
"0.503749",
"0.50324756",
"0.50257915",
"0.5024494",
"0.502417",
"0.50234914",
"0.50211215",
"0.50197375",
"0.5016098",
"0.5014155",
"0.5006581",
"0.499856",
"0.4994128",
"0.4992174",
"0.49896258",
"0.49835256",
"0.4975093",
"0.49625656",
"0.49607325",
"0.49577898",
"0.4950377",
"0.4950377",
"0.49349147",
"0.49341324"
] | 0.6854404 | 2 |
/ Basic check to see if there is some sort of name. | private boolean employeeNameValid(EmployeeDto newEmpDto) {
int nameLen = (newEmpDto.getFirstName().length() + newEmpDto.getLastName().length());
return (nameLen >= 2) ? true : false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"boolean hasName();",
"public boolean checkName(String name)\n {\n return true;\n }",
"private boolean isNameValid(String name) {\n\n }",
"boolean isNameRequired();",
"private static boolean validName(String name) {\n return name != null && !name.strip().isBlank();\n }",
"public static boolean isName( String name )\n {\n return isOs( null, name, null, null );\n }",
"private boolean checkName(String name) {\n if (!name.equals(\"\")) {\n //Check si le nom est déjà utilisé\n return myDbA.checkName(name);\n }\n return false;\n }",
"public boolean isNamed(String n) {\n return name.equals(n);\n }",
"public boolean nameValidation(String name) {\n\t char[] chars = name.toCharArray();\n\t int tempNum = 0;\n\t for (char c : chars) {\n\t tempNum += 1;\n\t \tif(!Character.isLetter(c)) {\n\t return false;\n\t }\n\t }\n\t if (tempNum == 0)\n\t \treturn false;\n\n\t return true;\n\t}",
"public static boolean checkName(String name) {\n\t\tMatcher matcher = NAME_PATTERN.matcher(name);\n\t\treturn matcher.find();\n\t}",
"public boolean isValidName(String proposedName);",
"public boolean checkName(String name)\n\t{\n\t\treturn (robotHM.containsKey(name));\n\t}",
"public void testGetName() {\n String name = mb.getName();\n assertNotNull(name);\n assertTrue(name.length() > 0);\n }",
"public boolean isValidName(String name)\r\n {\r\n // check for illegal combinations of characters\r\n // this is probably not a complete check, but hopefully it is good enough\r\n if ( (name == null) ||\r\n (name.equals(\"\")) ||\r\n Character.isUpperCase(name.charAt(0)) ||\r\n containsSubString(name, TIGHT_BINDING) ||\r\n containsSubString(name, LOOSE_BINDING) ||\r\n containsSubString(name, SINGLE_MATCH) ||\r\n containsSubString(name, \"/\") ||\r\n containsSubString(name, \" \") ||\r\n containsSubString(name, \"\\t\") ||\r\n containsSubString(name, \"\\n\") ||\r\n name.equals(UNIQUE_NAME) )\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"boolean hasDataName();",
"private boolean name() {\r\n return (\r\n (letter() && alphas()) ||\r\n (CHAR('`') && nobquotes() && MARK(QUOTE) && CHAR('`'))\r\n );\r\n }",
"boolean hasHangmogName();",
"private boolean isValidName(String name)\n {\n String reg = \"^[a-zA-Z]+$\";\n return name.matches(reg);\n }",
"public static boolean isNameValid(Context context, String name) {\n if (name.isEmpty()) {\n Toast.makeText(context, \"Name field cannot be empty\", Toast.LENGTH_LONG);\n return false;\n }\n return true;\n }",
"public boolean checkName(String name)\n {\n boolean value = true;\n if(name.length() < 3 || name.length() > 15)\n {\n System.out.println(\"Name must be between 3 and 15 characters\");\n value = false;\n }\n return value;\n }",
"public boolean nameIsValid() {\n return bikeName.length() > 0 && bikeName.length() < MAX_TITLE_LENGTH;\n }",
"static public boolean isSanitaryName(String name) {\n return sanitizeName(name).equals(name);\n }",
"private boolean isName() throws IOException\n\t{\n\t\tboolean isValid = false;\n\t\t\n\t\tif(theNextToken.TokenType == TokenType.LEFT_BRACKET)\n\t\t{\n\t\t\tupdateToken();\n\t\t\tupdateToken();\n\t\t\tif(isExpression())\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t\tif(theCurrentToken.TokenType == TokenType.RIGHT_BRACKET)\n\t\t\t\t{\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(theCurrentToken.TokenType == TokenType.IDENTITY)\n\t\t{\n\t\t\tisValid = true;\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}",
"boolean isSetName();",
"public static boolean checkName(String name) {\r\n\t\tboolean result = false;\r\n\t\tif (check(name) && name.matches(CommandParameter.REG_EXP_NAME)) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"private void checkNameValidation(String name) throws noStudentNameException{\n\t\tif (name.isEmpty()){\n\t\t\tthrow new noStudentNameException(\"Student Name Cannot be Empty!\");\n\t\t}\n\t}",
"private boolean checkNameChar(String name) {\n\t\tString patternStr = \"[a-zA-Z]+\";\n\t\tPattern pattern = Pattern.compile(patternStr);\n\t\tMatcher matcher = pattern.matcher(name);\n\t\tboolean matchFound = matcher.matches();\n\t\treturn matchFound;\n\t}",
"@Override\n\tpublic boolean isExist(String name) {\n\t\treturn false;\n\t}",
"public static boolean isValidName(String name) {\n if (name.length() == 0)\n return false;\n char ch = name.charAt(0);\n if( isNameStart(ch) == false)\n return false;\n for (int i = 1; i < name.length(); i++ ) {\n ch = name.charAt(i);\n if( isName( ch ) == false ){\n return false;\n }\n }\n return true;\n }",
"public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$8) != 0;\n }\n }",
"@Test\r\n\tpublic void testNameInvalid() {\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"*\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"-\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"0-\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"324tggs\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"-feioj\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"/\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"@\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\" \"));\r\n\t}",
"public static boolean validateName(String name){\n return name.matches(NAME_PATTERN);\n }",
"public boolean validateName(String name)\n\t{\n\n\t\tif (name.matches(\"[a-zA-Z]+\"))\n\n\t\t\treturn true;\n\n\t\tmyName = DEFAULT_NAME;\n\t\treturn false;\n\t}",
"boolean hasOriginName();",
"public static boolean isValidName(String name) {\r\n\t\treturn (name != null && name.matches(\"[a-zA-Z_0-9.-]+\"));\r\n\t}",
"public boolean checkName(final String name) {\n\t\treturn channelName.equals(name);\n\t}",
"public static boolean isGoodTypeName(String candidate) {\n return isUsable(candidate) && candidate.matches(OSGI_SYMBOLIC_NAME_REGEX);\n }",
"public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }",
"public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }",
"public final boolean isSimpleName() {\n return (_names.length == 1);\n }",
"public boolean nameValidation(String username){\n return !(username.isEmpty() || !username.matches(\"[a-zA-Z0-9_-]+\"));\n }",
"private static boolean isValidRegattaName(String name) {\n\t\tif(name.length() == 0) {\n\t\t\tSystem.out.println(\"\\nRegatta names must be atleast one character!\"); \n\t\t\treturn false;\n\t\t}\n\n\t\tif(name.indexOf('.') == -1 && name.length() != 0) return true;\n\t\telse {\n\t\t\tSystem.out.println(\"\\nRegatta names cannot have \\'.\\' in them!\"); \n\t\t\treturn false;\n\t\t}\n\t}",
"public static boolean isValidName(String name) {\n\t\tif (name == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn name.length() > 3;\n\t}",
"private boolean checkDeviceName(String name) {\n switch (name) {\n case \"LAPTOP\" :\n case \"PRINTER\" :\n case \"ROUTER\" :\n return true;\n default:\n return false;\n }\n }",
"private boolean examineName(String name) {\r\n resourceName = null;\r\n resourceIsClass = false;\r\n\r\n if (name.endsWith(\".java\")) {\r\n return false;\r\n }\r\n\r\n if (name.endsWith(\".class\")) {\r\n name = name.substring(0, name.length() - 6);\r\n if (classMap.containsKey(name)) {\r\n return false;\r\n }\r\n resourceIsClass = true;\r\n } else {\r\n if (resourceMap.containsKey(name)) {\r\n return false;\r\n }\r\n }\r\n\r\n resourceName = name;\r\n return true;\r\n }",
"public boolean hasName() {\n return this.hasName;\n }",
"private static void checkTokenName(String namedOutput) {\r\n\t\tif (namedOutput == null || namedOutput.length() == 0) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Name cannot be NULL or emtpy\");\r\n\t\t}\r\n\t\tfor (char ch : namedOutput.toCharArray()) {\r\n\t\t\tif ((ch >= 'A') && (ch <= 'Z')) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ((ch >= 'a') && (ch <= 'z')) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ((ch >= '0') && (ch <= '9')) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Name cannot be have a '\" + ch + \"' char\");\r\n\t\t}\r\n\t}",
"public boolean isSetName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(NAME$0) != 0;\r\n }\r\n }",
"@Test\n\tpublic void IscaseNameExist(){\n\t\tString caseName = \"leather case\";\n\t\tboolean isExist;\n\t\ttry {\n\t\t\tisExist = CaseManagerValidator.isCaseNameExist(caseName);\n\t\t\tassertTrue(isExist);\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\t\n\t}",
"public abstract boolean isNameAvailable(String readerName);",
"public boolean hasName() {\n return result.hasName();\n }",
"public boolean isSetName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(NAME$2) != null;\r\n }\r\n }",
"boolean checkName (String name){\r\n \r\n // Use for loop to check each character\r\n for (int i = 0; i < name.length(); i++) {\r\n // If character is below 'A' in Unicode table then return false\r\n if (name.charAt(i) < 65 && name.charAt(i) != 32 && name.charAt(i) != 10){\r\n return false;\r\n }\r\n // Else if character is between 'Z' and 'a' in unicode table,\r\n // then return false\r\n else if (name.charAt(i) > 90 && name.charAt(i) < 97){\r\n return false;\r\n }\r\n else if (name.charAt(i) > 122)\r\n return false;\r\n }\r\n return true;\r\n }",
"private static boolean nameIsValid(String name) {\n if (name.length() < 4 || name.length() > 11)\n return false;\n\n for (int i = 0; i < name.length(); i++) {\n int charIndex = name.charAt(i);\n\n // Each character can only be a letter or number\n if (charIndex < 48 || (charIndex > 57 && charIndex < 65) || (charIndex > 90 && charIndex < 97) || charIndex > 122)\n return false;\n }\n\n return true;\n }",
"@Test\r\n\tpublic void testNameValid() {\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"JANE\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"John\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"Mary\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\" Kurisu\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"Bond \"));\r\n\t}",
"@Test\n\tpublic void IscaseNameNotExist(){\n\t\tString caseName = \"Real 3D Cases\";\n\t\tboolean isExist;\n\t\ttry {\n\t\t\tisExist = CaseManagerValidator.isCaseNameExist(caseName);\n\t\t\tassertFalse(isExist);\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\t\n\t}",
"public boolean checkName(String name,JTextField t)\n\t{\n\t\tboolean number=true;\t\t \n\t\tboolean result=true;\n\t\ttry \n\t\t{\n\t\t\tDouble num=Double.parseDouble(name); //if s contains sting then it will not be parse and it will throw exception\t\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tnumber=false;\n\t\t}\t\n\t\tif(number==true)\n\t\t{\n\t\t\t//it is a number\n\t\t\tresult=false;\n\t\t}\n\t\telse if(number==false) //it is a String\n\t\t{\n\t\t\tif(name.length()>2)\n\t\t\t{\n\t\t\t\tchar[] chars=name.toCharArray();\n\t\t\t\tfor(char c : chars)\n\t\t\t\t{\n\t\t\t\t\tif(Character.isLetter(c))\n\t\t\t\t\t{\tresult=true;\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\tresult=false;\n\t\t\t\t\t\tbreak;\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(name.length()<=2)\n\t\t\t{\t\tresult=false;\t\t}\t\n\t\t}\n\t\treturn result;\n}",
"public static boolean isNameValid(String name) {\r\n return name.matches(\"^[a-zA-Z ]+$\");\r\n }",
"public static boolean isName(Item item, String name) {\r\n \t\tif(item == null)\r\n \t\t\treturn false;\r\n \t\tString itemName = item.getUnlocalizedName().toLowerCase();\r\n \t\tif(itemName.contains(name))\r\n \t\t\treturn true;\r\n \t\treturn false;\r\n \t}",
"public boolean isValidName(String name) {\n\t\tif (name == null)\n\t\t\treturn false;\n\t\tif (name.matches(\".*[A-Z].*[a-zA-Z0-9]\"))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"@Override\n public boolean hasCustomName() {\n return this.customName != null && !this.customName.isEmpty();\n }",
"public static boolean isValidNameFormat( String source )\n {\n int minNameLength = 3;\n\n return (source != null) && (source.length() >= minNameLength);\n }",
"@Test\n public void testIsValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = \"toto\";\n boolean result = service.isValidName(name);\n assertEquals(true, result);\n }",
"boolean hasCodeName();",
"private void ensureNameExists(String name) throws BadFileException {\n\t\tif (name.equals(\"OuterWalls\") || boardItemMap.containsKey(name)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthrow new BadFileException(name + \" name does not exist yet\");\r\n\t}",
"public boolean hasName() {\n return fieldSetFlags()[1];\n }",
"boolean hasVName();",
"@Override\r\n public boolean isNameProperty() throws Exception\r\n {\n return false;\r\n }",
"public static boolean isValid(String name) {\n\t\tif ((name == null) || name.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"private static boolean isValidFileName(String name) {\n\t\tif(name.indexOf('.') != -1 && name.length() != 0) return true;\n\t\telse System.out.println(\"\\nFilenames must include the file's extension.\"); return false;\n\t}",
"public boolean hasName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"private boolean validNames(String whiteName, String blackName){\n return whiteName.length() > 0 && blackName.length() > 0 &&\n !whiteName.equalsIgnoreCase(blackName);\n }",
"boolean hasBusinessName();",
"@Override\n public String nameAndType() {\n\t String n = \"noname\";\n\t if (name != null) {\n\t\t n=name;\n\t }\n\t return \"if \"+n+\":\";\n }",
"public boolean hasName() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }"
] | [
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.7877861",
"0.78156644",
"0.7662774",
"0.7530776",
"0.7246101",
"0.71675307",
"0.7167392",
"0.71028465",
"0.71023333",
"0.7025469",
"0.7020642",
"0.6977131",
"0.6936274",
"0.6927751",
"0.6900095",
"0.68986976",
"0.6864242",
"0.6845465",
"0.68329173",
"0.683007",
"0.681291",
"0.6809075",
"0.6796304",
"0.6773306",
"0.67730343",
"0.6757596",
"0.6689696",
"0.66708374",
"0.66659397",
"0.6656208",
"0.6650988",
"0.6637541",
"0.6634625",
"0.66198844",
"0.6612726",
"0.6601727",
"0.6598814",
"0.6587765",
"0.6587765",
"0.6583171",
"0.65662766",
"0.6564065",
"0.65389985",
"0.65174234",
"0.65156615",
"0.65128744",
"0.65065813",
"0.6504551",
"0.65018094",
"0.6487292",
"0.64756805",
"0.6475493",
"0.64708775",
"0.64674735",
"0.6463659",
"0.64434606",
"0.6428979",
"0.6428585",
"0.6426991",
"0.6396426",
"0.63714504",
"0.6363013",
"0.6361403",
"0.6347748",
"0.63474435",
"0.63417447",
"0.6340164",
"0.6338706",
"0.6335263",
"0.6328549",
"0.63239425",
"0.63239425",
"0.63239425",
"0.63223296",
"0.63223296",
"0.6316877",
"0.6315969",
"0.6312482",
"0.6302101"
] | 0.0 | -1 |
/ Basic check to see if DOB is less than the current date. | private boolean employeeDobValid(EmployeeDto newEmpDto) {
return (newEmpDto.getDob().compareTo(Calendar.getInstance()) < 0) ? true : false ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean checkDate(LocalDate birthDate, LocalDate currentDate) {\n if(birthDate.isBefore(currentDate)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }",
"public boolean isBefore(Date b) {\r\n\t\treturn compareTo(b) < 0;\r\n\t}",
"public boolean isBefore(Date that) {\n return compareTo(that) < 0;\n }",
"public boolean checkBirthDay(java.util.Date birthdate) {\r\n\r\n Calendar calendar = GregorianCalendar.getInstance();\r\n calendar.setTime(new java.util.Date());\r\n int currentYear = calendar.get(Calendar.YEAR);\r\n\r\n calendar.setTime(birthdate);\r\n int birthYear = calendar.get(Calendar.YEAR);\r\n if ((currentYear - birthYear) < 18) {\r\n return false;\r\n }\r\n return true;\r\n\r\n }",
"public boolean lessThan(MyDate other){\t\n \t\tif (other.year > year){\n \t\t\treturn true;\n \t\t}\n \t\telse if (other.year == year){\n \t\t\tif (other.month > month){\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\telse if (other.month == month){\n \t\t\t\tif (other.day > day){\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\n \t\treturn false;\n\t}",
"public boolean isBefore(Date d2)\r\n\t{\r\n\t\tint ret = this.compareTo(d2);\r\n\t\treturn ret < 0;\r\n\t}",
"public boolean isTooOld(){\n\t\tgetOlder();\n\t\treturn age >= maxAge;\n\t}",
"public void date_not_before_createdAt_date(FacesContext context, UIComponent comp, Object value) {\n if (charge.getCreatedAt() != null) {\n Date paidAt = (Date) value;\n\n if (paidAt != null) {\n if (paidAt.before(charge.getCreatedAt())) {\n FacesMessage FMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, message.translate(\"msg.error\"), message.translate(\"msg.validation.notBeforeCreatedAt\"));\n throw new ValidatorException(FMessage);\n }\n }\n }\n }",
"public boolean calcAge() {\n int age;\n boolean oldEnough = false;\n Calendar c = Calendar.getInstance();\n \n //getting todays date\n int thisYear = c.get(Calendar.YEAR);\n int thisMonth = c.get(Calendar.MONTH) + 1;\n int thisDay = c.get(Calendar.DAY_OF_MONTH);\n\n age = thisYear - yearDOB;\n if (age == 18 && thisMonth == monthDOB && thisDay < dayDOB) {\n age = 17;\n oldEnough = true;\n } else if (age < 18) {\n oldEnough = false;\n }\n return oldEnough;\n }",
"public boolean isBefore(Date date2)\n {\n if (year < date2.year)\n return true;\n else if (year == date2.year && month < date2.month)\n return true;\n else if (year == date2.year && month == date2.month && day < date2.day)\n return true;\n else if (year == date2.year && month == date2.month && day == date2.day\n && hour < date2.hour)\n return true;\n else if (year == date2.year && month == date2.month && day == date2.day\n && hour == date2.hour && minute < date2.minute)\n return true;\n else\n return false;\n }",
"public boolean isBeforeNow() {\r\n return isBefore(DateTimeUtils.currentTimeMillis());\r\n }",
"public boolean checkCurrentDate()\n {\n boolean valid = this.check();\n if(!valid) return valid;\n\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n\n if (date != null\n &&\n (date.after(currentDate) || date.equals(currentDate)))\n {\n super.clearMessage();\n super.setMessage(FacesHelper.getBundleMessage(\"date_after_current\"));\n\n return valid && false;\n }\n return valid;\n }",
"public boolean checkPastDate(boolean said)\n {\n try\n {\n if( date==null ){\n if(this.getDateString()!=null) date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n } }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n if(date==null)\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n }\n if(!date.before(currentDate))\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n\n }\n else\n {\n return true;\n }\n }",
"public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"public void checkDate() throws InvalidDateException {\n Date todayDate = new Date();\n if (!todayDate.after(date)) {\n throw new InvalidDateException(\"Date is from the future!\");\n }\n }",
"public boolean checkFutureOrCurrentDate()\n {\n boolean valid = this.check();\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n if (date != null\n &&\n (date.before(currentDate)))\n {\n super.clearMessage();\n super.setMessage(\"Date should be in future or in present date!\");\n\n return valid && false;\n }\n return valid;\n\n }",
"public boolean pastDueDate(Date d){\r\n if(dueDate.after(d)){\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean checkDate(Date dateNow, Date maxAccess) {\n return dateNow.after(maxAccess);\n }",
"private void checksOldExpense() {\n DateUtils dateUtils = new DateUtils();\n\n // Breaking date string from date base\n String[] expenseDate = dateDue.getText().toString().split(\"-\");\n\n if((Integer.parseInt(expenseDate[GET_MONTH]) < Integer.parseInt(dateUtils.currentMonth))\n && (Integer.parseInt(expenseDate[GET_YEAR]) <= Integer.parseInt(dateUtils.currentYear))){\n\n }\n }",
"public boolean isLower(DateTime dt) {\n return Long.parseLong(this.vStamp) < Long.parseLong(dt.getStamp());\r\n }",
"private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean isBefore(@NonNull final CalendarDay other) {\n return date.isBefore(other.getDate());\n }",
"protected boolean isOldEnough(EYSDate restrictedDOB, int itemRestrictiveAge)\n {\n int yearOfRestrictedDOB = restrictedDOB.getYear();\n if (yearOfRestrictedDOB < 1000)\n {\n // old enough if the skipped age is not less\n return yearOfRestrictedDOB >= itemRestrictiveAge;\n }\n\n // old enough if customer's age is larger than item's restricted age\n int customerAge = restrictedDOB.yearsBetween(new EYSDate());\n return customerAge >= itemRestrictiveAge;\n }",
"public static boolean before(Date target, Date date){\n Calendar cal1 = Calendar.getInstance();\n cal1.setTime(target);\n\n Calendar cal2 = Calendar.getInstance();\n cal2.setTime(date);\n\n if(cal1.compareTo(cal2) == -1) return true;\n return false;\n }",
"public static void birthdateValidation(Date birthdate) throws Exception {\n if (birthdate.after(new Date())) {\n throw new Exception(\"Your birth date cannot be in the future\");\n }\n }",
"public static void isValid(GregorianCalendar gc, boolean beforeNow,\n\t boolean afterNow) {\n\t\n\t//create a calendar for today's date\n\tGregorianCalendar now = new GregorianCalendar();\n\t\n\t//null validation\n\tif(gc != null) {\n\t //if the date is not allowed to be before today\n\t if(!beforeNow) {\n\t\t//validate that it is not before today\n\t\tif(gc.get(gc.YEAR) < now.get(now.YEAR))\n\t\t throw new IllegalArgumentException();\n\n\t\t//only check the month if it is also the current year\n\t\tif(gc.get(gc.YEAR) == now.get(now.YEAR) &&\n\t\t\tgc.get(gc.MONTH) < now.get(now.MONTH))\n\t\t throw new IllegalArgumentException();\n\n\t\t//only check the day if it is also the current year and month\n\t\tif(gc.get(gc.YEAR) == now.get(now.YEAR) &&\n\t\t\tgc.get(gc.MONTH) == now.get(now.MONTH) &&\n\t\t\tgc.get(gc.DAY_OF_MONTH) < now.get(now.DAY_OF_MONTH))\n\t\t throw new IllegalArgumentException();\n\t }\n\n\t //if the date is not allowed to be after today\n\t if(!afterNow) {\n\t\t//validate that it is not after today\n\t\tif(gc.get(gc.YEAR) > now.get(now.YEAR))\n\t\t throw new IllegalArgumentException();\n\n\t\t//only check the month if it is also the current year\n\t\tif(gc.get(gc.YEAR) == now.get(now.YEAR) &&\n\t\t\tgc.get(gc.MONTH) > now.get(now.MONTH))\n\t\t throw new IllegalArgumentException();\n\n\t\t//only check the day if it is also the current year and month\n\t\tif(gc.get(gc.YEAR) == now.get(now.YEAR) &&\n\t\t\tgc.get(gc.MONTH) == now.get(now.MONTH) &&\n\t\t\tgc.get(gc.DAY_OF_MONTH) > now.get(now.DAY_OF_MONTH))\n\t\t throw new IllegalArgumentException();\n\t }\n\t} else throw new IllegalArgumentException();\n }",
"public static void playgroundForTime(){\n\t\tLocalDate localDate = LocalDate.of(2013, 4, 25);\r\n\t\tSystem.out.println(localDate.now().isBefore(localDate));\r\n\t\t\r\n\t}",
"public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}",
"public boolean isBefore(Date date)\n {\n return isBefore(new SpentOn(date));\n }",
"public boolean validateDate(String date) {\n\n\t\tDate enteredDate = null;\n\t\ttry {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\tenteredDate = format.parse(date);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDate currentDate = new Date();\n\t\treturn enteredDate.before(currentDate);\n\t}",
"public boolean isBefore(Group3Date b) {\n\t\t\treturn compareTo(b) < 0;\n\t\t}",
"private boolean isDOBValid(String DOB) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n dateFormat.setLenient(false);\n try {\n dateFormat.parse(DOB.trim());\n } catch (ParseException pe) {\n return false;\n }\n return true;\n }",
"public Boolean comprovaAge(Date date) {\n\t\treturn (rv.validateAge(date));\n\t}",
"@SuppressWarnings(\"static-access\")\r\n\tpublic boolean isBirthday()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tboolean isBirthday = false;\r\n\t\tif (now.MONTH == bDate.MONTH && now.DATE == bDate.DATE)\r\n\t\t{\r\n\t\t\tisBirthday = true;\r\n\t\t}\r\n\t\treturn isBirthday;\r\n\t}",
"public boolean isDate(Date date){\r\n if((new Date()).getTime() < date.getTime()) return false;\r\n return true;\r\n }",
"public boolean olderThan(Person compared) {\n \n if(this.birthday.earlier(compared.birthday)){\n return true;\n }\n return false;\n }",
"public boolean isPartialBefore(Date b) {\r\n\t\treturn comparePartialTo(b) < 0;\r\n\t}",
"boolean hasDeliveryDateBefore();",
"protected boolean isOverdue() {\n\t\t// this might be backwards, go back and check later\n\t\t/*int i = todaysDate.compareTo(returnDate);// returns 0, a positive num, or a negative num\n\t\tif (i == 0) { return false;}\t\t// the dates are equal, not overdue\n\t\telse if (i > 0) { return true; }\t// positive value if the invoking object is later than date\n\t\telse { return false; } */\t\t\t// negative value if the invoking object is earlier than date\n\t\t\n\t\t// can also do\n\t\tif (todaysDate.getTime() > returnDate.getTime() ) { return true; }\n\t\telse { return false; }\t// if the difference in time is less than or equal\n\t}",
"public Boolean isExpired() {\n\t\tCalendar today = Calendar.getInstance();\n\t\treturn today.get(Calendar.DAY_OF_YEAR) != date.get(Calendar.DAY_OF_YEAR);\n\t}",
"public static void main(String[] args) {\n \n int myAge = 16;\n int myBirthday = 901; // input date as 901 or 1021 putting a 0 infront results in an error.\n int todaysDate = 923;\n\n if (todaysDate == myBirthday) {\n myAge++; // adds 1\n System.out.println(\"I am \" + myAge + \" years old now.\");\n } else {\n System.out.println(\"I am still \" + myAge + \" years old.\");\n }\n }",
"public boolean validarFecha(LocalDate fecha) { \n // se comprueba que la fecha sea anterior o igual a la actual\n return fecha.isBefore(LocalDate.now()) || fecha.isEqual(LocalDate.now());\n }",
"private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}",
"private boolean isToday(Date lectureDate){\n Date now = new Date();\n if(lectureDate.getYear()<now.getYear()|| lectureDate.getYear()>now.getYear()){\n return false;\n }else{\n if(lectureDate.getMonth()<now.getMonth()||(lectureDate.getMonth()>now.getMonth())){\n return false;\n }else{\n if(lectureDate.getDate()<now.getDate()|| lectureDate.getDate()>now.getDate()){\n return false;\n }else{\n return true;\n }\n }\n }\n }",
"public boolean isValidDate() {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(mDate.getDate());\n int yearNow = cal.get(Calendar.YEAR);\n int monthNow = cal.get(Calendar.MONTH);\n int dayNow = cal.get(Calendar.DAY_OF_MONTH);\n cal.setTimeInMillis(selectedDate.getTimeInMillis());\n int yearSelected = cal.get(Calendar.YEAR);\n int monthSelected = cal.get(Calendar.MONTH);\n int daySelected = cal.get(Calendar.DAY_OF_MONTH);\n if (yearSelected <= yearNow) {\n if (monthSelected <= monthNow) {\n return daySelected >= dayNow;\n }\n }\n return true;\n }",
"public void olderOne(Person p)\n\t{\n\t\tint [] dateDiff=new int[3];\n\t\tif(dob.isSmaller(p.dob)) {\n\t\t\tdateDiff=dob.diff(p.dob);\n\t\t\tSystem.out.println(p.name+\" is older than \"+name+\" by \"+dateDiff[2]+\" years, \"+dateDiff[1]+\" months and \"+dateDiff[0]+\" Days \");\n\t\t}\n\t\telse {\n\t\t\tdateDiff=p.dob.diff(dob);\n\t\t\tSystem.out.println(name+\" is older than \"+p.name+\" by \"+dateDiff[2]+\" years, \"+dateDiff[1]+\" months and \"+dateDiff[0]+\" Days \");\n\t\t}\n\t}",
"public boolean isBabyBoomer() {\n // Unnecessary allocation of expensive object\n Calendar gmtCal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n gmtCal.set(1946, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomStart = gmtCal.getTime();\n gmtCal.set(1965, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomEnd = gmtCal.getTime();\n return birthDate.compareTo(boomStart) >= 0 && birthDate.compareTo(boomEnd) < 0;\n }",
"public boolean isBefore(final String date1, final String date2) {\n return compare(date1, date2) < 0;\n }",
"public boolean isBefore(SpentOn spentOn)\n {\n return ( (calendar.get(Calendar.YEAR) < spentOn.calendar.get(Calendar.YEAR))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) < spentOn.calendar.get(Calendar.MONTH))\n )\n || ( (calendar.get(Calendar.YEAR) == spentOn.calendar.get(Calendar.YEAR))\n && (calendar.get(Calendar.MONTH) == spentOn.calendar.get(Calendar.MONTH))\n && (calendar.get(Calendar.DAY_OF_MONTH) < spentOn.calendar.get(Calendar.DAY_OF_MONTH))\n );\n }",
"public boolean validateDate(TradeModel tradeModel)\n {\n int i = tradeModel.getMaturityDate().compareTo(LocalDate.now());\n if (i<0)\n return false;\n else\n return true;\n }",
"public boolean isBabyBoomer() {\n // Unnecessary allocation of expensive object\n Calendar gmtCal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n gmtCal.set(1946, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomStart = gmtCal.getTime();\n gmtCal.set(1965, Calendar.JANUARY, 1, 0, 0, 0);\n Date boomEnd = gmtCal.getTime();\n\n return birthDate.compareTo(boomStart) >= 0 &&\n birthDate.compareTo(boomEnd) < 0;\n }",
"public boolean isBefore(MonthDay other) {\n if(month < other.month) {\n return true;\n } else if(month == other.month && day < other.day) {\n return true;\n } else {\n return false;\n }\n }",
"public static boolean lessThan(DateTime d1, DateTime d2)\n\t{\n\t\treturn Date.lessThan(d1.date,d2.date) || ( Date.equal(d1.date,d2.date) && Time12.lessThan(d1.time,d2.time)) ;\n\t}",
"private boolean compareWithCurrentDate(LocalDateTime deadline, LocalDateTime assignDate, boolean isLessThanDay) {\n boolean isReadyToNotify=false;\n if(isLessThanDay){\n if(deadline.until(LocalDateTime.now(),HOURS)==HALF_A_DAY){\n isReadyToNotify=true;\n }\n }else{\n // if this time is the mean of deadline and assign date\n if(deadline.until(LocalDateTime.now(),HOURS) == deadline.until(assignDate,HOURS)/2){\n isReadyToNotify=true;\n }\n }\n return isReadyToNotify;\n }",
"public boolean isDeviceOverdue() throws DateFormatException {\r\n \tString today = Helper.getCurrentDate();\r\n \tString due = this.rentSettings.getDueDate();\r\n \tSystem.out.println(\"Duedate \" + due);\r\n \tboolean good = Helper.isValidDate(due);\r\n \tif(good) {\r\n \t\tif(Helper.timeDifference(today, due) < 0) {\r\n \t\t\tSystem.out.println(\"Device \" + this + \" is Overdue\");\r\n \t\t\treturn true;\r\n \t\t}\r\n \t\telse \r\n \t\t\tSystem.out.println(\"Device \" + this + \" is NOT overdue yet\");\r\n \t}\r\n return false;\r\n }",
"public static Boolean isAdult(long dob_millis) {\n Calendar calendar_dob = Calendar.getInstance();\n calendar_dob.setTimeInMillis(dob_millis);\n\n Calendar calendar_min_adult = Calendar.getInstance();\n calendar_min_adult.set(Calendar.MINUTE, 0);\n calendar_min_adult.set(Calendar.SECOND, 0);\n calendar_min_adult.set(Calendar.HOUR, 0);\n calendar_min_adult.add(Calendar.YEAR, -18);\n\n // //// //Log.e(\"recc_compcal\", \"==\"+calendar_dob.getTimeInMillis()+\"==\"+calendar_min_adult.getTimeInMillis());\n\n return (calendar_dob.getTimeInMillis() < calendar_min_adult.getTimeInMillis());\n }",
"boolean IFbefore(Date day1, int ID1, Date day2, int ID2){\n if (day1.compareTo(day2) < 0) return true;\n if (day1.compareTo(day2) > 0) return false;\n if (ID1 < ID2) return true;\n return false;\n }",
"public boolean isAdult( String dob ){\n StringTokenizer tokenizer = new StringTokenizer( dob, \"/\" );\n String bmonth = tokenizer.nextToken(); \n String bdate = tokenizer.nextToken();\n String byear = tokenizer.nextToken();\n \n int month = Integer.parseInt(bmonth);\n int date = Integer.parseInt(bdate);\n int year = Integer.parseInt(byear);\n\n // Test for age limit of 19 or older\n Calendar c = Calendar.getInstance();\n int curYear = c.get( Calendar.YEAR );\n \n // Get cut off date\n c.set( Calendar.YEAR, curYear - 19 );\n Date cutOffDate = c.getTime();\n \n // Get birth date\n c.set( year, month-1, date );\n Date birthDate = c.getTime();\n \n if ( birthDate.compareTo(cutOffDate) <= 0 ) return true;\n else return false;\n }",
"public static boolean dueDateHasPassed(String currentDate, String dueDate){\n if(getYear(currentDate)>getYear(dueDate)){\n return true;\n }\n else if(getYear(currentDate) == getYear(dueDate)){\n if(getMonth(currentDate)>getMonth(dueDate)){\n return true;\n }\n else if(getMonth(currentDate) == getMonth(dueDate)){\n if(getDay(currentDate)>getDay(dueDate)){\n return true;\n }\n }\n }\n return false;\n }",
"@Test\n public void test0() {\n chkDate(\"> '2013'\", true);\n\n }",
"public static boolean isPastDue(Date date) {\n\t\tthrow new IllegalStateException(\"no database connection\");\r\n\t}",
"@SuppressWarnings(\"deprecation\")\r\n public static final boolean compareTwoDateSpecificToEndDay(Date expiredDate, Date dateNow) {\r\n\r\n int hoursNow = dateNow.getHours();\r\n int minuteNow = dateNow.getMinutes();\r\n\r\n return ((expiredDate.compareTo(dateNow) < 0)\r\n || ((expiredDate.compareTo(dateNow) == 0) && (hoursNow > 22 && minuteNow > 58)));\r\n\r\n }",
"public boolean isBefore(People p){\n\t\t//If P is higher age\n\t\tif( this.age==7 && p.age!=7)\n\t\t\treturn true;\n\t\t//If current is professor\n\t\tif(this.age!=7 && this.age!=8){\n\t\t\treturn p.age ==8;\n\t\t}\n\t\t//If p is professor\n\t\tif(p.age!=7 && p.age!=8){\n\t\t\treturn this.age ==7;\n\t\t}\n\t\t//If current is 8\n\t\tif(this.age==8 && p.age==7){\n\t\t\treturn false;\n\t\t}\n\t\t//Same age - age 7\n\t\tif(this.age== p.age && this.age==7){\n\t\t\treturn this.height <= p.height;\n\t\t}\n\t\tif(this.age== p.age && this.age==8){\n\t\t\treturn this.height >= p.height;\n\t\t}\n\t\tSystem.out.println(\"Some Error!!\"+this.age+\" \"+this.height+\" \"+p.age+\" \"+p.height);\n\t\treturn false;\n\t}",
"public void validateStartDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long startDate = value.dateValue().getTime();\n\n if (startDate < sysdate)\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"StartDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_DATE_PAST\"); // Message name\n } \n }\n \n }",
"public boolean isDate (int year, int doy)\n {\n return ((year >= FIRST_YEAR)\n && (1 <= doy && doy <= getLengthOfYear (year)));\n }",
"public static void isValidDate(LocalDate date) throws ValidationException {\n\t\tLocalDate today = LocalDate.now();\n\t\tif (date.isBefore(today)) {\n\t\t\tthrow new ValidationException(\"Date cannot be past date\");\n\t\t}\n\t}",
"public boolean validDateRange() {\n\t\treturn dateEnd.compareTo(dateStart) > 0;\n\t}",
"public Event validateBooking(RequestContext context) {\n\tBooking booking = (Booking) context.getFlowScope().get(\"booking\");\n\tCalendar calendar = Calendar.getInstance();\n\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\tif (booking.getCheckinDate().before(calendar.getTime())) {\n\t context.getMessageContext().addMessage(\n\t\t Messages.text(\"checkinDate\", \"Check in date must be a future date\", Severity.ERROR));\n\t return error();\n\t} else if (!booking.getCheckinDate().before(booking.getCheckoutDate())) {\n\t context.getMessageContext().addMessage(\n\t\t Messages.text(\"checkoutDate\", \"Check out date must be later than check in date\", Severity.ERROR));\n\t return error();\n\t}\n\treturn success();\n }",
"public static boolean isValidDOB(String userInput) {\n \n return Pattern.matches(Constants.DATE_VALIDATION, userInput);\n }",
"Date getPriorDate();",
"@Test\n public void compareToWithMainDateInThePast(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.compareTo(new Date(31,Month.december,1970)),-1);\n }",
"public boolean isAfter(Date b) {\r\n\t\treturn compareTo(b) > 0;\r\n\t}",
"public Date getValidFrom();",
"public boolean checkTimeInPast() throws ParseException {\n LocalTime ltnow = LocalTime.now();\n if(b_startTime != null && checkDateIsToday()){\n LocalTime ltstart = b_startTime.toInstant().atZone(ZoneId.systemDefault()).toLocalTime();\n return ltstart.isBefore(ltnow);\n }else{\n return false;\n }\n }",
"public boolean isLate(){\n Date d = givenBack != null ? givenBack : new Date();\n return expirationDate.before(d);\n }",
"public boolean checkFutureDate(String message)\n {\n boolean valid = this.check();\n if(!valid) return valid;\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n if (date != null\n &&\n (date.before(currentDate)|| date.equals(currentDate)))\n {\n super.clearMessage();\n super.setMessage(\"Date should be in future!\");\n\n return valid && false;\n }\n return valid;\n }",
"public Boolean validateDate(String date_of_birth) {\n DateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n try {\n format.parse(date_of_birth);\n } catch (ParseException exception) {\n System.out.println(\"Invalid Input!\");\n return true;\n }\n return false;\n }",
"private boolean checkDate(PoliceObject po, LocalDate start, LocalDate end) {\n LocalDate formattedEvent = LocalDate.parse(po.getDate());\n boolean isAfter = formattedEvent.isAfter(start) || formattedEvent.isEqual(start);\n boolean isBefore = formattedEvent.isBefore(end) || formattedEvent.isEqual(end);\n return (isAfter && isBefore);\n }",
"public static void main(String[] args) {\nDate d1 = new Date( 2019, 02, 22);\nSystem.out.println(d1);\n\n\nDate d2= new Date();\nSystem.out.println(d2);\nDate d3 = new Date(2000,11,11);\nSystem.out.println(d3);\nint a = d1.compareTo(d3);\nSystem.out.println(a);\nboolean b = d1.after(d2);\n\tSystem.out.println(b);\n\t}",
"private boolean isPast(Calendar currentCal){\n Calendar presentCal = Calendar.getInstance();\n presentCal.set(Calendar.SECOND,59);\n return currentCal.before(presentCal);\n }",
"public void setBirthdate(LocalDate birthdate) throws IllegalArgumentException {\n LocalDate todayDate = LocalDate.now();\n\n if(birthdate.isAfter(todayDate) || birthdate.isEqual(todayDate)) {\n throw new IllegalArgumentException(\"Birthdate cannot be later than today's date\");\n } else {\n this.birthdate = birthdate;\n this.age = birthdate.until(todayDate).getYears(); // we set the age, if the birthdate is correct\n }\n }",
"public boolean wasToday() {\n\t\tlong endInMillis = endTime.getTime();\n\t\tCalendar endTimeDate = Calendar.getInstance();\n\t\tendTimeDate.setTimeInMillis(endInMillis);\n\t\tCalendar today = Calendar.getInstance();\n\t\tif (today.get(Calendar.YEAR) == endTimeDate.get(Calendar.YEAR) && today.get(Calendar.DAY_OF_YEAR) == endTimeDate.get(Calendar.DAY_OF_YEAR)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (range check)\n else if (!validator.checkDateAfterMin(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter from \" + researchDetails.MIN_DATE + \" and afterwards. This is when the research period began.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is not in the future (range check / logic check)\n else if (!validator.checkDateNotInFuture(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter a date from today or before. Sighting date cannot be in the future.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n }",
"public Date getValidTill() {\n\t\treturn validTill;\n\t}",
"public Boolean getMinimumAge() {\n return this.minimumAge;\n }",
"public static void main(String[] args) {\r\n\t\tDate today = new Date(2, 26, 2012);\r\n\t\tSystem.out.println(\"Input date is \" + today);\r\n\t\tSystem.out.println(\"Printing the next 10 days after \" + today);\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\ttoday = today.next();\r\n\t\t\tSystem.out.println(today);\r\n\t\t}\r\n\t\tDate expiry = new Date(2011);\r\n\t\tSystem.out.println(\"testing year 2011 as input:\" + expiry);\r\n\r\n\t\tDate todayDate = new Date();\r\n\t\tSystem.out.println(\"todays date: \" + todayDate);\r\n\t\tSystem.out.println(\"current month:\" + todayDate.month);\r\n\r\n\t\t// testing isValidMonth function\r\n\t\tDate start = new Date(\"08-01-2010\");\r\n\t\tDate end1 = new Date(\"09-01-2010\");\r\n\t\tboolean param1 = start.isValidMonth(4, end1);\r\n\t\tSystem.out.println(\"is April valid between: \" + start + \" and \" + end1\r\n\t\t\t\t+ \": \" + param1);\r\n\t\tDate end2 = new Date(\"02-01-2011\");\r\n\t\tboolean param2 = start.isValidMonth(2, end2);\r\n\t\tSystem.out.println(\"is feb valid between: \" + start + \" and \" + end2\r\n\t\t\t\t+ \": \" + param2);\r\n\t\tboolean param3 = start.isValidMonth(8, start);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tparam3 = start.isValidMonth(4, start);\r\n\t\tSystem.out.println(\"is april valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tDate end3 = new Date(\"02-01-2010\");\r\n\t\tboolean param4 = start.isValidMonth(8, end3);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + end3\r\n\t\t\t\t+ \": \" + param4);\r\n\t\t \r\n\t\tDate lease = new Date(\"1-01-2012\");\r\n\t\tDate expiry1 = new Date(\"12-31-2012\");\r\n\r\n\t\t// testing daysBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING daysBetween method\\n------------------------------\");\r\n\t\tint count = lease.daysBetween(expiry);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry + \"is: \"\r\n\t\t\t\t+ count);\r\n count = new Date(\"1-01-2011\").daysBetween(new Date(\"12-31-2011\"));\r\n\t\tSystem.out.println(\"Days between [1-01-2011] and [12-31-2011]\" + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tcount = lease.daysBetween(expiry1);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry1 + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tDate testDate = new Date(\"12-31-2013\");\r\n\t\tcount = lease.daysBetween(testDate);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [12-31-2013] \"\r\n\t\t\t\t+ \"is: \" + count);\r\n\t\tcount = lease.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n count = lease.daysBetween(new Date(\"1-10-2012\"));\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [1-10-2012\" + \"is: \"\r\n\t\t\t\t+ count);\r\n \r\n\t\tcount = testDate.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + testDate + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n\r\n\t\t// testin isBefore\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING isBefore method\\n------------------------------\");\r\n\t\tboolean isBefore = today.isBefore(today.next());\r\n\t\tSystem.out.println(today + \"is before \" + today.next() + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.next().isBefore(today);\r\n\t\tSystem.out.println(today.next() + \"is before \" + today + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.isBefore(today);\r\n\t\tSystem.out.println(today + \"is before \" + today + \": \" + isBefore);\r\n isBefore = today.isBefore(today.addMonths(12));\r\n\t\tSystem.out.println(today + \"is before \" + today.addMonths(12) + \": \" + isBefore);\r\n\r\n\t\t// testing addMonths\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING addMonths method\\n------------------------------\");\r\n\t\ttoday = new Date(\"1-31-2011\");\r\n\t\tDate newDate = today.addMonths(1);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 1 months to \" + today + \" gives: \" + newDate);\r\n\t\tnewDate = today.addMonths(13);\r\n\t\tSystem.out.println(\"adding 13 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\ttoday = new Date(\"3-31-2010\");\r\n\t\tnewDate = today.addMonths(15);\r\n\t\tSystem.out.println(\"adding 15 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(23);\r\n\t\tSystem.out.println(\"adding 23 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(49);\r\n\t\tSystem.out.println(\"adding 49 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(0);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 0 months to \" + today + \" gives: \" + newDate);\r\n\t\t\r\n\t\t// testing monthsBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING monthsBetween method\\n------------------------------\");\r\n\t\tint monthDiff = today.monthsBetween(today.addMonths(1));\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + today.addMonths(1)\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\tmonthDiff = today.next().monthsBetween(today);\r\n\t\tSystem.out.println(\"months between \" + today.next() + \" and \" + today\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date(\"09-30-2011\");\r\n\t\tDate endDate = new Date(\"2-29-2012\");\r\n\t\tmonthDiff = today.monthsBetween(endDate);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate + \": \"\r\n\t\t\t\t+ monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate1 = new Date(\"12-04-2011\");\r\n\t\tmonthDiff = today.monthsBetween(endDate1);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate1\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate2 = new Date(\"12-22-2010\");\r\n\t\tmonthDiff = today.monthsBetween(endDate2);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate2\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\t\r\n\t\t// following should generate exception as date is invalid!\r\n\t\t// today = new Date(13, 13, 2010);\r\n\r\n\t\t// expiry = new Date(\"2-29-2009\");\r\n // newDate = today.addMonths(-11);\r\n\r\n\t}",
"private boolean checkStartDateBeforeEndDate(String startDate, String endDate) {\n SimpleDateFormat date = new SimpleDateFormat(\"ddMMyy\");\n Date startingDate = null;\n try {\n startingDate = date.parse(startDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Date endingDate = null;\n try {\n endingDate = date.parse(endDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (startingDate.before(endingDate)) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean isOverdue(int today);",
"public boolean hasBegDate() {\n return fieldSetFlags()[1];\n }",
"public boolean isAfter(Date that) {\n return compareTo(that) > 0;\n }",
"@Test(expected = IllegalDateException.class)\n\tpublic void testBookStartDateInPast() throws Exception {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, -2);\n\t\t// start is current date - 2\n\t\tDate invalidStartDate = cal.getTime();\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), invalidStartDate, validEndDate);\n\t}",
"@SuppressWarnings(\"static-access\")\r\n\tprivate int calculateAge()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tnow = new GregorianCalendar(now.YEAR, now.MONTH, now.DATE);//simplifys the date so there is no problem with times\r\n\t\tGregorianCalendar birthDay = new GregorianCalendar(now.YEAR, bDate.MONTH, bDate.DATE);\r\n\t\tint age = 0;\r\n\t\tif(now.before(birthDay) || now.equals(birthDay))\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t\tage--;\r\n\t\t}\r\n\t\treturn age;\r\n\t}",
"public static boolean notInFuture(Date data) {\r\n if (data != null) {\r\n return data.before(new Date());\r\n }\r\n return false;\r\n }",
"@Test\r\n public void testIsExpiredToday_ExpirationDateToday_ExpirationDateEarlierTime() {\r\n doTest(TEST_DATE_2_TODAY, TEST_DATE_1_TODAY, false);\r\n }",
"public int checkExpiryDate(LocalDate today) {\n\n final int limit = 100;\n long expirationDate = Duration.between(\n this.food.getCreateDate().atTime(0, 0), this.food.getExpiryDate().atTime(0, 0)\n ).toDays();\n long goneDate = Duration.between(\n this.food.getCreateDate().atTime(0, 0), today.atTime(0, 0)\n ).toDays();\n\n return (int) (limit * goneDate / expirationDate);\n\n }",
"public static boolean isBeforeDay(Date date1, Date date2) {\n if (date1 == null || date2 == null) {\n throw new IllegalArgumentException(\"The dates must not be null\");\n }\n Calendar cal1 = Calendar.getInstance();\n cal1.setTime(date1);\n Calendar cal2 = Calendar.getInstance();\n cal2.setTime(date2);\n return isBeforeDay(cal1, cal2);\n }",
"private boolean isOutdatedDate(LocalDate date) {\n return date.isBefore(LocalDate.now());\n }",
"public boolean expired(){\n return !Period.between(dateOfPurchase.plusYears(1), LocalDate.now()).isNegative();\n }",
"@Test\r\n public void testCompareTo1() {\r\n SimpleDate d1 = new SimpleDate(\"3/1/2013\");\r\n SimpleDate d2 = new SimpleDate(\"8/21/2000\");\r\n assertTrue(d1.compareTo(d2) > 0);\r\n }"
] | [
"0.69384867",
"0.69097245",
"0.6697705",
"0.65930706",
"0.6565833",
"0.6481176",
"0.64679927",
"0.6269142",
"0.6192289",
"0.61524606",
"0.6097031",
"0.6043087",
"0.6029816",
"0.6020692",
"0.59966105",
"0.5990284",
"0.59748584",
"0.59565383",
"0.5941219",
"0.5939367",
"0.59022427",
"0.58564335",
"0.5853849",
"0.58454347",
"0.5843511",
"0.58420664",
"0.5810734",
"0.5764111",
"0.5763734",
"0.56971353",
"0.5691867",
"0.56873244",
"0.5684544",
"0.56765956",
"0.56444144",
"0.5640512",
"0.563188",
"0.56293744",
"0.55952746",
"0.5586293",
"0.55804586",
"0.55514437",
"0.55496675",
"0.554353",
"0.55427593",
"0.5538653",
"0.55354",
"0.5527318",
"0.55136526",
"0.55114794",
"0.54979837",
"0.54878956",
"0.5472055",
"0.5464146",
"0.54621714",
"0.5460641",
"0.54597807",
"0.54555833",
"0.5454968",
"0.5450825",
"0.5442407",
"0.5423334",
"0.54196",
"0.540773",
"0.53777844",
"0.5354811",
"0.5346172",
"0.53344315",
"0.53318995",
"0.53242224",
"0.53104186",
"0.5308403",
"0.5293575",
"0.5273153",
"0.5270198",
"0.52697605",
"0.5268736",
"0.52679473",
"0.5262982",
"0.5250783",
"0.524515",
"0.52443135",
"0.5227471",
"0.5226342",
"0.522253",
"0.52144206",
"0.5209945",
"0.52013624",
"0.51991224",
"0.519832",
"0.51970494",
"0.5184833",
"0.51825297",
"0.51757747",
"0.5159189",
"0.51583254",
"0.51564443",
"0.51524115",
"0.51355755",
"0.51246315"
] | 0.56771314 | 33 |
/ Check that the ssn doesn't already exist. A null result indicates that the ssn doesn't exist so it's ok to insert. | private boolean employeeSsnValid(EmployeeDto newEmpDto) {
return (empRepo.findEmployeeBySsn(newEmpDto.getSsn()) == null) ? true : false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasSsn();",
"@Override\n\tpublic void validateAndPersistSSN(String ssn) throws InvalidSSNException {\n\t\tSSNValidatorData validatorData = SSNValidatorHelper.parseSSN(ssn);\n\t\tvalidateSSN(validatorData);\n\t\t// Step-2: validate ssn against stored SSN values.\n\t\tvalidateWithStoredSSN(validatorData);\n\t\tLOG.debug(\"SSN Validation Successful \" + ssn);\n\t\t// System.out.println(\"INFO: SSN Validation Successful\" + ssn);\n\t}",
"private static void checkRegistration(int SLN, HtmlPage page) {\n\t\tif (page.asText().indexOf(String.valueOf(SLN))!=-1) {\n\t\t\tthrow new IllegalArgumentException(\"The course with the given SLN is seemingly already registered.\");\n\t\t}\n\t}",
"private static boolean checkSsidNameExists(String name, Object value) {\r\n\t\tList<?> boIds = QueryUtil.executeQuery(\r\n\t\t\t\t\"select bo.id from \" + SsidProfile.class.getSimpleName() + \" bo\", null, new FilterParams(\r\n\t\t\t\t\t\tname, value), AhRestoreNewMapTools.getonlyDomain().getId());\r\n\t\treturn !boIds.isEmpty();\r\n\t}",
"@Test\n void testNothingExists() throws Exception {\n doCheckTest(\n create(true, \"ns1.example.tld\", null),\n create(true, \"ns2.example.tld\", null),\n create(true, \"ns3.example.tld\", null));\n }",
"public boolean checkIfExisting(ServiceRequest sr) throws SQLException\r\n {\r\n \tSystem.out.println(\"Entered checkIfExisting service request...\");\r\n \t\r\n \tSession session = sessionFactory.getCurrentSession();\r\n \tServiceRequest existingSR = null;\r\n \tboolean existing = false;\r\n \t\r\n \tint serviceId = 0;\r\n \tString preferredDate = null;\r\n \t\r\n \tQuery query = null;\r\n \t\r\n \tif (sr != null)\r\n \t{\r\n \t\tserviceId = sr.getServiceId();\r\n \t\tpreferredDate = sr.getPreferredDate();\r\n \t\t\r\n \t\tSystem.out.println(\"===================== serviceId: \" + serviceId);\r\n \t\tSystem.out.println(\"===================== preferredDate: \" + preferredDate);\r\n \t\t\r\n \t\t\r\n \t\ttry\r\n \t\t{\r\n \t\t\tquery = session.createQuery(GET_DUPLICATE_SERVICE_REQUEST_HQL);\r\n \t\t\r\n \t\tquery.setParameter(\"serviceId\", serviceId);\r\n \t\t\tquery.setParameter(\"preferredDate\", preferredDate);\r\n \t\t\t\r\n \t\t\tif (query.list() != null && query.list().size() > 0)\r\n \t\t\t{\r\n \t\t\t\texistingSR = (ServiceRequest) query.list().get(0);\r\n \t\t\t\t\r\n \t\t\t\tif (existingSR != null)\r\n \t \t{\r\n \t \t\tSystem.out.println(\"=========== existingSR ID: \" + existingSR.getId());\r\n \t \t\texisting = true;\r\n \t \t}\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"=========== NO DUPLICATE! \");\r\n \t\t\t}\r\n \t\t\t\r\n \t\t}\r\n \t\tcatch (Exception ex)\r\n \t\t{\r\n \t\t\tthrow new SQLException(\"Error in validating the request \" + ex.getMessage(), ex);\r\n \t\t}\t\r\n }\r\n \t\r\n \treturn existing;\r\n }",
"public void registerPatient(String firstName, String lastName, String ssn, String generalPractitioner) throws IllegalArgumentException {\n if (patients.stream().anyMatch(c -> c.getSsn().equals(ssn))) {\n throw new IllegalArgumentException(\"Patient already exists\");\n } else {\n patients.add(new Patient(firstName, lastName, ssn, generalPractitioner));\n }\n }",
"int insert(SsSocialSecurityAccount record);",
"public Employe findBySsn(String ssn) {\n\t\treturn null;\n\t}",
"public void registerPatient(String firstName, String lastName, String ssn, String generalPractitioner, String diagnosis) throws IllegalArgumentException {\n if (patients.stream().anyMatch(c -> c.getSsn().equals(ssn))) {\n throw new IllegalArgumentException(\"Patient already exists\");\n } else {\n patients.add(new Patient(firstName, lastName, ssn, generalPractitioner, diagnosis));\n }\n }",
"void checkStationUIExists() {\n\n int recordCount = 9999;\n int duplicateCount = 0;\n\n String where = MrnStation.DATE_START + \"=\" +\n Tables.getDateFormat(station.getDateStart()) +\n \" and \" + MrnStation.LATITUDE +\n \" between \" + (station.getLatitude()-areaRangeVal) +\n \" and \" + (station.getLatitude()+areaRangeVal) +\n \" and \" + MrnStation.LONGITUDE +\n \" between \" + (station.getLongitude()-areaRangeVal) +\n \" and \" + (station.getLongitude()+areaRangeVal) ;\n if (dbg) System.out.println(\"<br>checkStationUIExists: where = \" + where);\n //outputDebug(\"checkStationUIExists: where = \" + where);\n\n MrnStation[] stns = new MrnStation().get(where);\n if (dbg) System.out.println(\"<br>checkStationUIExists: stns.length = \" + stns.length);\n //outputDebug(\"checkStationUIExists: number of stations found = \" + stns.length);\n\n String debugMessage = \"\\ncheckStationUIExists: duplicate UI check \\n \" +\n station.getDateStart(\"\").substring(0,10) +\n \", \" + ec.frm(station.getLatitude(),10,5) +\n \", \" + ec.frm(station.getLongitude(),10,5) +\n \", \" + station.getStnnam(\"\") +\n \" (\" + station.getStationId(\"\") + \")\";\n\n if (stns.length == 0) {\n outputDebug(debugMessage + \": duplicate UI not found\");\n } else {\n\n outputDebug(debugMessage);\n\n // check for duplicate station names (stnnam)\n while (recordCount > 0) {\n\n // count station names the same\n recordCount = 0;\n for (int i = 0; i < stns.length; i++) {\n if (stns[i].getStnnam(\"\").equals(station.getStnnam(\"\"))) {\n recordCount++;\n } // if (stns[i].getStnnam(\"\").equals(station.getStnnam(\"\")))\n } // for (int i = 0; i < stns.length; i++)\n\n if (dbg) System.out.println(\"<br>checkStationUIExists: recordCount = \" +\n recordCount + \", stnnam = \" + station.getStnnam(\"\"));\n\n debugMessage = \" \" + station.getStnnam(\"\") +\n \", recordCount (same stnnam) = \" + recordCount;\n\n if (recordCount > 0) {\n duplicateCount++;\n\n station.setStnnam(station.getStnnam(\"\") + duplicateCount);\n\n debugMessage += \" - new stnnam = \" +\n station.getStnnam(\"\");\n //outputDebug(debugMessage);\n if (dbg) System.out.println(\"checkStationUIExists: new stnnam = \" +\n station.getStnnam(\"\"));\n }// if (recordCount > 0)\n\n outputDebug(debugMessage);\n\n } // while (recordCount > 0)\n\n } // if (stns.length == 0)\n\n }",
"boolean existsById(String accountNumber) throws AccountException;",
"@Override\r\n\tpublic boolean isAccountExist(Account account) {\n\t\treturn false;\r\n\t}",
"private void checkID(int ID)\r\n {\r\n if(student_IDs.contains(ID))\r\n {\r\n throw new IllegalArgumentException(\"There is already a student that exists with this ID: \" + ID);\r\n }\r\n }",
"boolean hasSysID();",
"public boolean isNotNullSredCode() {\n return genClient.cacheValueIsNotNull(CacheKey.sredCode);\n }",
"private void validateSeriesId(SystemMetadata sysMeta, SystemMetadata previousSysMeta) throws NotAuthorized, UnrecoverableException, RetryableException {\n\n logger.debug(task.taskLabel() + \" entering validateSeriesId...\");\n \n // return early in cases where the seriesId value isn't changing \n // or there's no sid to check\n Identifier sid = sysMeta.getSeriesId();\n Identifier prevSid = previousSysMeta == null ? null : previousSysMeta.getSeriesId(); \n \n if (D1TypeUtils.emptyEquals(sid, prevSid)) {\n \t// nothing changed\n return;\n }\n \n if (D1TypeUtils.emptyEquals(sid, null)) {\n \t// seriesId not being set, so nothing to validate.\n return;\n }\n \n\n // note, we don't check for the validity of removing a seriesId during a\n // systemMetadata update. Those types of mutability rules are checked by \n // SystemMetadataValidator.\n \n try { // resolving the SID\n\n Identifier headPid = resolve(sid,\"SID\");\n\n if (logger.isDebugEnabled()) \n logger.debug(task.taskLabel() + \" SeriesId is in use by \" + headPid.getValue());\n\n SystemMetadata sidHeadSysMeta = this.hzSystemMetaMap.get(headPid);\n if (sysMeta != null && sidHeadSysMeta != null) {\n //Come from the same node, we trust them\n if(sysMeta.getAuthoritativeMemberNode() != null && sidHeadSysMeta.getAuthoritativeMemberNode() != null && \n D1TypeUtils.equals(sysMeta.getAuthoritativeMemberNode(), sidHeadSysMeta.getAuthoritativeMemberNode())) {\n return;\n }\n //If rights holders are still same, we trust it\n if(sysMeta.getRightsHolder() != null && sidHeadSysMeta.getRightsHolder() != null && D1TypeUtils.equals(sysMeta.getRightsHolder(), sidHeadSysMeta.getRightsHolder())) {\n return;\n }\n //If submitters are still same, we trust it\n if (sysMeta.getSubmitter() != null && sidHeadSysMeta.getSubmitter() != null && D1TypeUtils.equals(sysMeta.getSubmitter(), sidHeadSysMeta.getSubmitter())) {\n return;\n }\n \n // checking that the new object's submitter is authorized via SID head's accessPolicy\n //Get submitter's all subjects - groups and equivalent subjects.\n CNode cn = D1Client.getCN(); // TODO We should use the LDAP calls to get the identity service in order to get rid of API calls.\n SubjectInfo submitterInfo = cn.getSubjectInfo(null, sysMeta.getSubmitter());\n HashSet<Subject> submitterAllSubjects = new HashSet<Subject>();\n AuthUtils.findPersonsSubjects(submitterAllSubjects, submitterInfo, sysMeta.getSubmitter());\n if (!AuthUtils.isAuthorized(\n submitterAllSubjects,\n Permission.CHANGE_PERMISSION,\n sidHeadSysMeta)) {\n \n if (logger.isDebugEnabled()) \n logger.debug(\"Submitter doesn't have the change permission on the pid \"\n + headPid.getValue() + \". We will try if the rights holder has the permission.\");\n \n if(!sysMeta.getSubmitter().equals(sysMeta.getRightsHolder())) {\n SubjectInfo rightsHolderInfo = cn.getSubjectInfo(null, sysMeta.getRightsHolder());\n Set<Subject> rightsHolderAllSubjects = findEquivalentSubjects(rightsHolderInfo, sysMeta.getRightsHolder());\n if(!AuthUtils.isAuthorized(\n rightsHolderAllSubjects,\n Permission.CHANGE_PERMISSION,\n sidHeadSysMeta)) {\n throw new NotAuthorized(\"0000\", \"Neither the submitter nor rightsHolder have CHANGE rights on the SeriesId as determined by\"\n + \" the current head of the Sid collection, whose pid is: \" + headPid.getValue());\n }\n } else {\n throw new NotAuthorized(\"0000\", \"Neither the submitter nor rightsHolder have CHANGE rights on the SeriesId as determined by\"\n + \" the current head of the Sid collection, whose pid is: \" + headPid.getValue());\n }\n }\n }\n // Note: we don't check to see that if the current head of the series\n // is obsoleted, that it is not obsoleted by a PID with a different SID,\n // because we leave this to the CN.storage component.\n } catch (ServiceFailure e) {\n extractRetryableException(e);\n String message = \" couldn't access the CN /meta endpoint to check seriesId!! Reason: \" + e.getDescription();\n\n logger.error(buildStandardLogMessage(e, message), e);\n throw new UnrecoverableException(message, e);\n \n } catch (InvalidToken | NotImplemented e) {\n String message = \" couldn't access the CN /meta endpoint to check seriesId!! Reason: \" + e.getDescription();\n logger.error(buildStandardLogMessage(e, message), e);\n throw new UnrecoverableException(message, e);\n \n } catch (NotFound e) {\n if (logger.isDebugEnabled()) \n logger.debug(task.taskLabel() + String.format(\n \" SeriesId (%s) doesn't exist for any object on the CN, checking reservation service...\", \n sid.getValue()));\n \n try { \n Session verifySubmitter = new Session();\n verifySubmitter.setSubject(sysMeta.getSubmitter());\n if (!identifierReservationService.hasReservation(verifySubmitter, sysMeta.getSubmitter(), sid)) {\n throw new NotAuthorized(\"0000\", \"someone else (other than submitter) holds the reservation on the seriesId! \" \n + sid.getValue());\n }\n logger.debug(task.taskLabel() + \" OK. SeriesId is reserved by this object's submitter or equivalent ID\");\n return;\n } catch (NotFound e1) {\n logger.debug(task.taskLabel() + \" OK. SeriesId is not reserved.\");\n } catch (InvalidRequest e1) {\n String message = \" Identifier Reservation Service threw unexpected InvalidRequest!! Reason: \" + e1.getDescription();\n\n logger.error(buildStandardLogMessage(e, message), e1);\n throw new UnrecoverableException(message, e1);\n } catch (ServiceFailure e1) {\n extractRetryableException(e1);\n String message = \" Identifier Reservation Service threw unexpected ServiceFailure!! Reason: \" + e1.getDescription();\n logger.error(buildStandardLogMessage(e, message), e1);\n throw new UnrecoverableException(message, e1);\n }\n }\n }",
"public boolean exist(String scholl_node){\n boolean it_exist = false;\n String sql = \"SELECT * FROM \" + Value.TABLE_SCHOLLS + \" WHERE \" + Value.COLUMN_NODE + \" = '\" + scholl_node + \"'\";\n\n Cursor c = db.rawQuery(sql, null);\n int count = c.getCount();\n c.close();\n if(count > 0){\n it_exist = true;\n }\n return it_exist;\n }",
"public boolean addNew(Student st){\n for(Student stItem : listStudents){\r\n // check for duplicate id\r\n if(stItem.getId() == st.getId()) return false;\r\n \r\n// if(checkRule(stItem, st)) break;\r\n// else return false;\r\n \r\n }\r\n this.listStudents.add(st);\r\n return true;\r\n }",
"public void setSsn(String ssn) {\n this.ssn = ssn;\n }",
"int insertSelective(SsSocialSecurityAccount record);",
"public boolean existSpaseport(Spaceport spaceport) throws SQLException {\r\n connection();\r\n String select = \"select * from spaceport where name='\" + spaceport.getName() + \"'\";\r\n Statement st = conexion.createStatement();\r\n ResultSet rs = st.executeQuery(select);\r\n boolean existe = false;\r\n if (rs.next()) {\r\n existe = true;\r\n }\r\n rs.close();\r\n st.close();\r\n disconnect();\r\n return existe;\r\n }",
"public boolean isExisting() throws Exception\r\n\t\t{\r\n\t\tRouteGroup myR = (RouteGroup) myRouteGroup.get();\r\n\t\tthis.UUID = myR.getUUID();\r\n\t\t\r\n\t\tVariables.getLogger().debug(\"Item \"+this.name+\" already exist in the CUCM\");\r\n\t\treturn true;\r\n\t\t}",
"boolean hasSecId();",
"@Test\n public void testSsnValidator(){\n assertTrue(register.ssnValidator(\"16019135954\"));\n }",
"public boolean hasSsn() {\n return ((bitField0_ & 0x00000001) != 0);\n }",
"public boolean hasSsn() {\n return ((bitField0_ & 0x00000001) != 0);\n }",
"@Override\r\n\tpublic boolean isExist() {\n\t\treturn false;\r\n\t}",
"@Override\n public void createOnlineAccount(String name, \n String ssn, String id, String psw)\n {\n final String url = \n \"jdbc:mysql://mis-sql.uhcl.edu/<username>?useSSL=false\";\n \n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n \n try\n {\n \n //connect to the databse\n connection = DriverManager.getConnection(url, \n db_id, db_password);\n connection.setAutoCommit(false);\n //crate the statement\n statement = connection.createStatement();\n \n //do a query\n resultSet = statement.executeQuery(\"Select * from onlineAccount \"\n + \"where id = '\" + id + \"' or ssn = '\"\n + ssn + \"'\");\n \n if(resultSet.next())\n {\n //either the ssn is used or the id is used\n System.out.println(\"Account creation failed\");\n }\n else\n {\n //insert a record into onlineAccount\n int r = statement.executeUpdate(\"insert into onlineAccount values\"\n + \"('\" + name + \"', '\" + id + \"', '\" + ssn + \"', '\"\n + psw +\"')\");\n System.out.println(\"Account creation successful!\");\n System.out.println();\n }\n connection.commit();\n connection.setAutoCommit(true);\n \n }\n catch (SQLException e)\n {\n System.out.println(\"Something wrong during the creation process!\");\n e.printStackTrace();\n }\n finally\n {\n //close the database\n try\n {\n resultSet.close();\n statement.close();\n connection.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n }",
"private void foundNonExistent() {\n\t\tstate = BridgeState.NON_EXISTENT;\n\t}",
"@SuppressWarnings(\"ConstantConditions\")\n @Override\n public Boolean isNameAlreadyExist(Dress dress) {\n LOGGER.debug(\"is name exists - {}\", dress);\n MapSqlParameterSource parameterSource = new MapSqlParameterSource();\n if (dress.getDressId() == null) {\n parameterSource.addValue(DRESS_ID, 0);\n } else {\n parameterSource.addValue(DRESS_ID, dress.getDressId());\n }\n parameterSource.addValue(DRESS_NAME, dress.getDressName());\n return jdbcTemplate.queryForObject(uniqueNameSql, parameterSource,\n Integer.class) != 0;\n }",
"public boolean register(int SLN) throws FailingHttpStatusCodeException, MalformedURLException, IOException {\n\t\tHtmlPage page=client.getPage(REGISTER_URL);\n\t\tcheckRegistration(SLN, page);\n\t\tint index=prework(page);\n\t\tHtmlForm form=page.getFormByName(\"regform\");\n\t\tinputSln(form, index, SLN);\n\t\treturn submitAndCheck(form);\n\t}",
"public boolean numberExists(String number) throws SQLException {\r\n\t\tint entryCount = 0;\r\n\t\tConnection connection = dbAdministration.getConnection();\r\n\t\tStatement statement = connection.createStatement();\r\n\t\t// Auf der Datenbank wird abgefragt, wie viele Datensätze diese\r\n\t\t// Kontonummer haben. Der Wert kann 0 oder 1 sein.\r\n\t\tString sql = \"SELECT count(*) FROM account WHERE number = '\" + number + \"'\";\r\n\t\tResultSet resultSet = statement.executeQuery(sql);\r\n\t\tlogger.info(\"SQL-Statement ausgeführt: \" + sql);\r\n\t\tif (resultSet.next()) {\r\n\t\t\tentryCount = resultSet.getInt(1);\r\n\t\t}\r\n\t\tresultSet.close();\r\n\t\tstatement.close();\r\n\t\tconnection.close();\r\n\t\tif (entryCount == 0) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"private boolean studentExists(int student) throws SQLException {\n\t\tString sql = \"SELECT * FROM student WHERE student_num ==?\";\n\n\t\ttry (PreparedStatement ps = c.prepareStatement(sql)) {\n\t\t\tps.setInt(1, student);\n\t\t\tResultSet results = ps.executeQuery();\n\t\t\treturn results.next();\n\n\t\t}\n\t}",
"private void CourseExists(int courseCode) {\n\n if (courseDAO.findCourseByCourseCode(courseCode).isPresent()) {\n throw new CourseIsAlreadyExistException(\"Course Is Already Exist!\");\n }\n }",
"@Test\n public void testInsertDataWSFail() {\n try {\n \tProviderDAO providerDAO = new ProviderDAOImpl();\n \tString retVal = providerDAO.insertDataWS(null);\n \t\n \tif (retVal != null) {\n \t\tAssert.assertTrue(true);\n \t} else {\n \t\tAssert.assertFalse(false);\n \t\tSystem.out.println(\"[testInsertDataWSFail] - FAIL (No data found)\");\n \t}\n\n } catch (Exception e) {\n Assert.assertFalse(false);\n }\n }",
"@Test\n public void testSsnvalidatorNull(){\n assertFalse(register.ssnValidator(\"\")); // a date can`t start with 70\n }",
"public int getSsn() {\n\t\treturn ssn;\n\t}",
"public boolean isExisted(String addressId) {\n //check if this address is already existed.\n return true;\n }",
"private int getSSN (){\n return ssn;\n }",
"public boolean register(int[] SLNs) throws FailingHttpStatusCodeException, MalformedURLException, IOException {\n\t\tHtmlPage page=client.getPage(REGISTER_URL);\n\t\tint index=prework(page);\n\t\tHtmlForm form=page.getFormByName(\"regform\");\n\t\tfor (int SLN : SLNs) {\n\t\t\tcheckRegistration(SLN, page);\n\t\t\tinputSln(form, index, SLN);\n\t\t\tindex++;\n\t\t}\n\t\treturn submitAndCheck(form);\n\t}",
"public boolean checkExistPushrssByPortlet( int nPortletId )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_EXIST_RSS_FILE );\n daoUtil.setInt( 1, nPortletId );\n daoUtil.executeQuery( );\n\n if ( !daoUtil.next( ) )\n {\n daoUtil.free( );\n\n return false;\n }\n\n daoUtil.free( );\n\n return true;\n }",
"@Override\n\tpublic boolean isExist(String name) {\n\t\treturn false;\n\t}",
"@Test\n public void testCheckExists()\n throws SQLException, ClassNotFoundException, InstantiationException,\n IllegalAccessException\n {\n int existingQuizId = 2;\n int unexistingQuizId = 945273;\n try {\n QuizModel.checkExists(existingQuizId);\n }\n catch (NoQuizFoundException e) {\n fail(\"A quiz should have been found.\");\n }\n try {\n QuizModel.checkExists(unexistingQuizId);\n fail(\"NO quiz should have been found.\");\n }\n catch (NoQuizFoundException e) {\n \n }\n }",
"@Test\n @Ignore\n public void testSaveFailureWhenTryToSaveExistingUrl(){\n\n SocialScoreDBO socialScore = new SocialScoreDBO();\n socialScore.setUrl(\"http://www.google.com/search?query=something\");\n socialScore.setDomainName(\"www.google.com\");\n socialScore.setScore(10);\n Assertions.assertThatExceptionOfType(DuplicateKeyException.class).isThrownBy(()-> socialScoreRepository.save(socialScore));\n\n }",
"@Override\r\n\tpublic void add(snstatus sns) {\n\t\tsuper.getHibernateTemplate().save(sns); \r\n\t}",
"public boolean registerCourse(Integer indexGroupID, Scanner sc) {\r\n\t\tboolean success = false;\r\n\t\tboolean validInput = false;\r\n\t\tint confirmation = 0;\r\n\t\tStudent s1 = new Student();\r\n\t\ts1 = s1.retrieveStudentObject(this.getStudentID());\r\n\t\tCourse c1 = new Course();\r\n\t\tc1 = c1.retrieveCourseObjectByIndexGroup(indexGroupID);\r\n\t\tCourse c2 = new Course();\r\n\t\tIndexGroup g1 = new IndexGroup();\r\n\t\tg1 = g1.retrieveIndexGroupObject(indexGroupID);\r\n\t\tWaitlist wl1 = new Waitlist();\r\n\t\twl1 = wl1.retrieveWaitListObjectByIndexGroup(indexGroupID);\r\n\t\tWaitlist wl2 = new Waitlist();\r\n\r\n\t\ttry {\r\n\t\t\tif (s1 == null) {\r\n\t\t\t\tSystem.out.println(\"No user has been logged in.\\n\");\r\n\t\t\t} else {\r\n\t\t\t\tif (c1 != null) {\r\n\t\t\t\t\tint temp = s1.getCourseList().size();\r\n\t\t\t\t\tint temp2 = s1.getWaitListIDList().size();\r\n\r\n\t\t\t\t\tif (temp == 0) {\r\n\t\t\t\t\t\tif (schedule.checkScheduleClash(indexGroupID)) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Period of lesson clash with current schedule\\n\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (!(g1.checkVacancies())) {\r\n\t\t\t\t\t\t\t\tint flag = 0;\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < temp2; i++) {\r\n\t\t\t\t\t\t\t\t\tc2 = c2.retrieveCourseObjectByWaitList(s1.getWaitListIDList().get(i));\r\n\t\t\t\t\t\t\t\t\tif (s1.getWaitListIDList().get(i).equals(wl1.getWaitListID())) {\r\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"You are already in waitlist\\n\");\r\n\t\t\t\t\t\t\t\t\t\tflag = 1;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t} else if (c2.getCourseID().equals(c1.getCourseID())) {\r\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"You already in waitlist of another index group of the same course\\n\");\r\n\t\t\t\t\t\t\t\t\t\tflag = 1;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (flag == 0) {\r\n\t\t\t\t\t\t\t\t\tg1.printGroupDetailsConfirmation();\r\n\t\t\t\t\t\t\t\t\tSystem.out.print(\r\n\t\t\t\t\t\t\t\t\t\t\t\"Confirm to join the waitlist of this group? 1 = Yes, Any other number = No: \");\r\n\t\t\t\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\tconfirmation = sc.nextInt();\r\n\t\t\t\t\t\t\t\t\t\t\tif (confirmation >= 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tvalidInput = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\tsc.nextLine();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} catch (InputMismatchException e) {\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Enter a valid integer!\");\r\n\t\t\t\t\t\t\t\t\t\t\tsc.nextLine();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} while (!validInput);\r\n\t\t\t\t\t\t\t\t\tvalidInput = false;\r\n\r\n\t\t\t\t\t\t\t\t\tif (confirmation == 1) {\r\n\t\t\t\t\t\t\t\t\t\twl1.enqueueToWaitList(s1.getStudentID());\r\n\t\t\t\t\t\t\t\t\t\ts1.getWaitListIDList().add(wl1.getWaitListID());\r\n\t\t\t\t\t\t\t\t\t\tg1.printGroupDetailsConfirmation();\r\n\t\t\t\t\t\t\t\t\t\twl1.updateWaitListObject(wl1);\r\n\t\t\t\t\t\t\t\t\t\ts1.updateStudentObject(s1);\r\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"You have been added to the waitlist\\n\");\r\n\t\t\t\t\t\t\t\t\t\tsuccess = true;\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"You are not added to the waitlist\\n\");\r\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Returning to main menu...\\n\");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Course: \" + c1.getCourseID());\r\n\t\t\t\t\t\t\t\tg1.printGroupDetailsConfirmation();\r\n\t\t\t\t\t\t\t\tSystem.out.print(\r\n\t\t\t\t\t\t\t\t\t\t\"Confirm to register course under this index group? 1 = Yes, Any other number = No: \");\r\n\t\t\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tconfirmation = sc.nextInt();\r\n\t\t\t\t\t\t\t\t\t\tif (confirmation >= 0) {\r\n\t\t\t\t\t\t\t\t\t\t\tvalidInput = true;\r\n\t\t\t\t\t\t\t\t\t\t\tsc.nextLine();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} catch (InputMismatchException e) {\r\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Enter a valid integer!\");\r\n\t\t\t\t\t\t\t\t\t\tsc.nextLine();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} while (!validInput);\r\n\t\t\t\t\t\t\t\tvalidInput = false;\r\n\r\n\t\t\t\t\t\t\t\tif (confirmation == 1) {\r\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < temp2; i++) {\r\n\t\t\t\t\t\t\t\t\t\tc2 = c2.retrieveCourseObjectByWaitList(s1.getWaitListIDList().get(i));\r\n\t\t\t\t\t\t\t\t\t\tif (c2.getCourseID().equals(c1.getCourseID())) {\r\n\t\t\t\t\t\t\t\t\t\t\twl2 = wl2.retrieveWaitListObject(s1.getWaitListIDList().get(i));\r\n\t\t\t\t\t\t\t\t\t\t\twl2.dequeueFromWaitList(s1.getStudentID());\r\n\t\t\t\t\t\t\t\t\t\t\ts1.getWaitListIDList().remove(i);\r\n\t\t\t\t\t\t\t\t\t\t\twl2.updateWaitListObject(wl2);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\ts1.getCourseList().add(c1.getCourseID());\r\n\t\t\t\t\t\t\t\t\ts1.getIndexGroupList().add(indexGroupID);\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Course: \" + c1.getCourseID());\r\n\t\t\t\t\t\t\t\t\tg1.printGroupDetailsConfirmation();\r\n\t\t\t\t\t\t\t\t\tg1.updateVacancies('-');\r\n\t\t\t\t\t\t\t\t\t// Add schedule\r\n\t\t\t\t\t\t\t\t\ts1.getSchedule().AddSchedule(indexGroupID);\r\n\t\t\t\t\t\t\t\t\tg1.updateIndexGroupObject(g1);\r\n\t\t\t\t\t\t\t\t\ts1.updateStudentObject(s1);\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Course successfully registered!\");\r\n\t\t\t\t\t\t\t\t\tsuccess = true;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Course has not been registered.\");\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Returning to main menu...\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int j = 0; j < temp; j++) {\r\n\t\t\t\t\t\t\tif (s1.getCourseList().get(j).equals(c1.getCourseID())) {\r\n\t\t\t\t\t\t\t\tSystem.out\r\n\t\t\t\t\t\t\t\t\t\t.println(\"You are already registered in this course in another index group\\n\");\r\n\t\t\t\t\t\t\t} else if (j == (temp - 1)) {\r\n\t\t\t\t\t\t\t\tif (schedule.checkScheduleClash(indexGroupID)) {\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Period of lesson clash with current schedule\\n\");\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tif (!(g1.checkVacancies())) {\r\n\t\t\t\t\t\t\t\t\t\tint flag = 0;\r\n\t\t\t\t\t\t\t\t\t\tfor (int i = 0; i < temp2; i++) {\r\n\t\t\t\t\t\t\t\t\t\t\tc2 = c2.retrieveCourseObjectByWaitList(s1.getWaitListIDList().get(i));\r\n\t\t\t\t\t\t\t\t\t\t\tif (s1.getWaitListIDList().get(i).equals(wl1.getWaitListID())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"You are already in waitlist\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tflag = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t} else if (c2.getCourseID().equals(c1.getCourseID())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"You are already in waitlist of another index group of the same course\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tflag = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (flag == 0) {\r\n\t\t\t\t\t\t\t\t\t\t\tg1.printGroupDetailsConfirmation();\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.print(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Confirm to join the waitlist of this group? 1 = Yes, Any other number = No: \");\r\n\t\t\t\t\t\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconfirmation = sc.nextInt();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (confirmation >= 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidInput = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsc.nextLine();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (InputMismatchException e) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Enter a valid integer!\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsc.nextLine();\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t} while (!validInput);\r\n\t\t\t\t\t\t\t\t\t\t\tvalidInput = false;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tif (confirmation == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\twl1.enqueueToWaitList(s1.getStudentID());\r\n\t\t\t\t\t\t\t\t\t\t\t\ts1.getWaitListIDList().add(wl1.getWaitListID());\r\n\t\t\t\t\t\t\t\t\t\t\t\tg1.printGroupDetailsConfirmation();\r\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"You have been added to waitlist\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\twl1.updateWaitListObject(wl1);\r\n\t\t\t\t\t\t\t\t\t\t\t\ts1.updateStudentObject(s1);\r\n\t\t\t\t\t\t\t\t\t\t\t\tsuccess = true;\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"You have not been added to waitlist\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Returning to main menu...\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Course: \" + c1.getCourseID());\r\n\t\t\t\t\t\t\t\t\t\tg1.printGroupDetailsConfirmation();\r\n\t\t\t\t\t\t\t\t\t\tSystem.out.print(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"Confirm to register course under this index group? 1 = Yes, Any other number = No: \");\r\n\t\t\t\t\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\t\tconfirmation = sc.nextInt();\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (confirmation >= 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidInput = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsc.nextLine();\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t} catch (InputMismatchException e) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Enter a valid integer!\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tsc.nextLine();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} while (!validInput);\r\n\t\t\t\t\t\t\t\t\t\tvalidInput = false;\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (confirmation == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\tfor (int i = 0; i < temp2; i++) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tc2 = c2.retrieveCourseObjectByWaitList(s1.getWaitListIDList().get(i));\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (c2.getCourseID().equals(c1.getCourseID())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\twl2 = wl2.retrieveWaitListObject(s1.getWaitListIDList().get(i));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\twl2.dequeueFromWaitList(s1.getStudentID());\r\n\t\t\t\t\t\t\t\t\t\t\t\t\ts1.getWaitListIDList().remove(i);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\twl2.updateWaitListObject(wl2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\ts1.getCourseList().add(c1.getCourseID());\r\n\t\t\t\t\t\t\t\t\t\t\ts1.getIndexGroupList().add(indexGroupID);\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Course: \" + c1.getCourseID());\r\n\t\t\t\t\t\t\t\t\t\t\tg1.printGroupDetailsConfirmation();\r\n\t\t\t\t\t\t\t\t\t\t\tg1.updateVacancies('-');\r\n\t\t\t\t\t\t\t\t\t\t\ts1.getSchedule().AddSchedule(indexGroupID);\r\n\t\t\t\t\t\t\t\t\t\t\tg1.updateIndexGroupObject(g1);\r\n\t\t\t\t\t\t\t\t\t\t\ts1.updateStudentObject(s1);\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Course successfully registered!\");\r\n\t\t\t\t\t\t\t\t\t\t\tsuccess = true;\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Course has not been registered.\");\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Returning to main menu...\");\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn success;\r\n\t}",
"public boolean hasSystemID()\n {\n \treturn getSiteID() != null;\n }",
"@Override\n\tpublic int snsInsert(SnsVO vo) {\n\t\treturn map.snsInsert(vo);\n\t}",
"private boolean personAlreadyExists(AddPeopleRequest addPeopleRequest) {\n // query db for this user\n AddPeopleRequest matchingEntry =\n this.addPersonRequestMongoRepository\n .findPersonByFirstAndLastName(\n addPeopleRequest.getFirstName(),\n addPeopleRequest.getLastName());\n // if the value returned is null.. the value did not exist..\n if (matchingEntry == null) {\n return false;\n } else {\n return true;\n }\n }",
"public boolean checkInsert(int key){\n\n // Returns false if the key is present.\n for (int curr : getAllKeys()) if(curr == key) return false;\n // Returns true if the key is not found.\n return true;\n\n }",
"boolean exists(Curso curso) throws BusinessException;",
"public Boolean CreateStoreAdmin(String a, String b, Store s) {\n for (int i = 0 ; i <= SAlist.getStoreAdmins().size() -1 ; i++)\n {\n if (SAlist.getStoreAdmins().get(i).getID().equals(a))\n {\n System.out.println(\"ID alreday exists\");\n return false;\n }\n }\n StoreAdmin admin = new StoreAdmin(a, b, s);\n SAlist.getStoreAdmins().add(admin);\n try {\n SerialiseList();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n return true;\n }",
"void checkStationExists() {\n\n stationExists = false;\n dataExists = false;\n stationExistsCount = 0;\n thisSubdesCount = 0;\n// stationIgnore = false;\n\n for (int i = 0; i < MAX_STATIONS; i++) {\n stationExistsArray[i] = false;\n loadedDepthMin[i] = 9999;\n loadedDepthMax[i] = -9999;\n spldattimArray[i] = \"\";\n currentsRecordCountArray[i] = 0;\n watphyRecordCountArray[i] = 0;\n stationStatusDB[i] = \"\";\n subdesCount[i] = 0;\n for (int j = 0; j < MAX_SUBDES; j++) {\n subdesArray[i][j] = \"\";\n } // for (int j = 0; j < MAX_SUBDES; j++)\n\n } // for (int i = 0; i < MAX_STATIONS; i++)\n\n // true if station with same station Id (first select) or\n // station with same date_start & latitude & longitude &\n // <data>.spltim & <data>.subdes (second select)\n String where = MrnStation.STATION_ID + \"='\" + station.getStationId() + \"'\";\n if (dbg) System.out.println(\"<br>checkStationExists: station: where = \" +\n where);\n\n // Is there already a station record with the same station-id?\n MrnStation[] tStation2 = new MrnStation().get(where);\n if (dbg) System.out.println(\"<br>checkStationExists: tStation2.length = \" +\n tStation2.length);\n if (tStation2.length > 0) {\n //stationStatusLD = \"di\"; // == duplicate station-id\n outputDebug(\"checkStationExists: station Id found: \" +\n station.getStationId(\"\"));\n stationExists = true;\n stationExistsArray[0] = true;\n } else {\n //stationStatusLD = \"ds\"; // == duplicate station (lat/lon/date/time)\n outputDebug(\"checkStationExists: station Id not found: \" +\n station.getStationId(\"\"));\n } // if (tStation2.length > 0)\n\n // are there any other stations around the same day that fall within the\n // latitude range? (it could include the station found above)\n\n // get the previous and next day for the select, in case the\n // spldattim is just before or after midnight\n java.text.SimpleDateFormat formatter =\n new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n java.util.GregorianCalendar calDate = new java.util.GregorianCalendar();\n calDate.setTime(station.getDateStart());\n calDate.add(java.util.Calendar.DATE, -1);\n String dateStartMin = formatter.format(calDate.getTime());\n\n calDate.setTime(station.getDateEnd());\n calDate.add(java.util.Calendar.DATE, +1);\n String dateEndMax = formatter.format(calDate.getTime());\n\n where =\n MrnStation.DATE_START + \">=\" +\n Tables.getDateFormat(dateStartMin) + \" and \" +\n MrnStation.DATE_END + \"<=\" +\n Tables.getDateFormat(dateEndMax) + \" and \" +\n MrnStation.LATITUDE + \" between \" +\n (station.getLatitude()-areaRangeVal) + \" and \" +\n (station.getLatitude()+areaRangeVal) + \" and \" +\n MrnStation.LONGITUDE + \" between \" +\n (station.getLongitude()-areaRangeVal) + \" and \" +\n (station.getLongitude()+areaRangeVal);\n if (dbg) System.out.println(\"<br><br>checkStationExists: station: \" +\n \"where = \" + where);\n\n // get the records\n MrnStation[] tStation3 = new MrnStation().get(\n \"*\", where, MrnStation.STATION_ID);\n if (dbg) System.out.println(\"<br><br>checkStationExists: \" +\n \"tStation3.length = \" + tStation3.length);\n\n // put both sets of stations found in one array for processing\n tStation = new MrnStation[tStation2.length + tStation3.length];\n if (dbg) System.out.println(\"<br><br>checkStationExists: \" +\n \"tStation.length = \" + tStation.length);\n int ii = 0;\n for (int i = 0; i < tStation2.length; i++) { // same station_id\n tStation[ii] = tStation2[i];\n ii++;\n } // for (int i = 0; i < tStation2.length; i++)\n for (int i = 0; i < tStation3.length; i++) { // satem lat/lon/date/time\n tStation[ii] = tStation3[i];\n ii++;\n } // for (int i = 0; i < tStation3.length; i++)\n\n // process the records\n stationUpdated = false;\n for (int i = 0; i < tStation.length; i++) {\n\n // same station id already done\n if ((i == 0) ||\n !tStation[i].getStationId().equals(station.getStationId())) {\n\n if (tStation[i].getStationId().equals(station.getStationId())) {\n stationStatusTmp = \"di\"; // == duplicate station-id\n } else {\n stationStatusTmp = \"ds\"; // == duplicate station (lat/lon/date/time)\n } // if (tStation[i].getStationId().equals(station.getStationId()))\n\n String dbgMess = \"checkStationExists: station found in area: \" +\n i + \" \" + station.getStationId(\"\") + \" \" +\n tStation[i].getStationId(\"\");\n\n getExistingStationDetails(tStation[i], i);\n\n if (stationExistsArray[i]) {\n stationExistsCount++;\n\n outputDebug(dbgMess + \": within time range\");\n\n// if (loadFlag) {\n// updateStationDetails(i);\n// } else {\n // d == Duplicate stationId/station only\n // s == Subdes: duplicate Station (lat/lon/date/time) && subdes\n stationStatusDB[i] = stationStatusTmp;\n if (subdesCount[i] == 0) {\n // d == Duplicate stationId/station only (lat/lon/date/time)\n stationStatusDB[i] += \"d\";\n if (\"did\".equals(stationStatusDB[i])) {\n didCount++;\n } else {\n dsdCount++;\n } // if (\"did\".equals(stationStatusDB))\n } else { // if (subdesCount == 0)\n // s == Subdes: duplicate Station (lat/lon/date/time) && subdes\n stationStatusDB[i] += \"s\";\n if (\"dis\".equals(stationStatusDB[i])) {\n disCount++;\n } else {\n dssCount++;\n } // if (\"dia\".equals(stationStatusDB))\n\n thisSubdesCount += subdesCount[i];\n\n } // if (subdesCount == 0)\n// } // if (loadFlag)\n } else {\n outputDebug(dbgMess + \": NOT within time range\");\n } // if (stationExistsArray[i]) {\n\n } // if (!tStation.getStationId().equals(station.getStationId())\n\n } // for (int i = 0; i < tStation.length; i++)\n\n if (dbg) System.out.println(\"checkStationExists: stationStatusTmo = \" + stationStatusTmp);\n\n // either stations with same station Id or within same\n // area & date-time range found\n if (stationExists) {\n duplicateStations = true;\n if (dataExists) {\n stationStatusLD = \"dup\";\n } else {\n stationStatusLD = \"new\";\n newStationCount++;\n } // if (dataExists)\n } else {\n stationStatusLD = \"new\";\n newStationCount++;\n } // if (stationExists)\n\n if (dbg) System.out.println(\"checkStationExists: stationStatusLD = \" + stationStatusLD);\n if (dbg) System.out.println(\"checkStationExists: stationStatusTmo = \" + stationStatusTmp);\n for (int i = 0; i < tStation.length; i++) {\n if (dbg) System.out.println(\"checkStationExists: stationStatusDB[i] = \" +\n i + \" \" + stationStatusDB[i]);\n } // for (int i = 0; i < tStation.length; i++)\n\n }",
"public synchronized String insert(MtssCosting mtssCosting) {\n //MtssCosting checkRole = exists(mtssCosting.getAdmin_segment(), mtssCosting.getEconomic_segment());\n MtssCosting checkRole = exists(mtssCosting.getAdminSegment(), mtssCosting.getEconomicSegment(), mtssCosting.getProgrammeSegment(), \n mtssCosting.getFunctionalSegment(), mtssCosting.getFundSegment(), mtssCosting.getGeoSegment(), mtssCosting.getBudgetYearId());\n if (checkRole == null) {\n final Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n Transaction tx = null;\n try {\n //final Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n tx = session.beginTransaction();\n //session.beginTransaction();\n session.save(mtssCosting);\n //session.getTransaction().commit();\n\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) {\n tx.rollback();\n }\n e.printStackTrace();\n return \"\";\n } finally {\n //session.close();\n }\n return Utility.ActionResponse.INSERTED.toString()+\"_\"+mtssCosting.getProgrammeSegment();\n } else {\n return Utility.ActionResponse.RECORD_EXISTS.toString();\n }\n }",
"@Test\n @Ignore\n public void testExists() throws Exception {\n System.out.println(\"exists\");\n Identifier identifier = null;\n IndexDaoImpl instance = null;\n boolean expResult = false;\n boolean result = instance.exists(identifier);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"boolean hasResMineInstanceID();",
"public static boolean exist(String login) throws Exception {\n\t\t\n\t\tif (Record2.getNode(\"U[\"+login+\"]\")==null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}",
"private static boolean studentExists(int studentId){\n\t\ttry{\n\t\t\tALL_STUDENTS.get(studentId);\n\t\t\treturn true;\n\t\t}\n\t\tcatch(IndexOutOfBoundsException e){\n\t\t\treturn false;\n\t\t}\n\t}",
"Boolean exists(Session session, IRI identifier);",
"private void addSNP(String option) {\r\n //System.out.println(option);\r\n //System.out.println(currentSNP == null);\r\n \r\n option = option.trim();\r\n\r\n //System.out.println(\"addSNP(): \" + option);\r\n \r\n SNP currentSNP = getController().getActiveSNP();\r\n if (option.equals(\"null\") || option.equals(\"\") || (currentSNP != null && option.equals(currentSNP.getID()))\r\n || option.contains(\"(not found)\") || option.matches(\".*?\\\\[.*?\\\\]$\")) {\r\n return;\r\n }\r\n //System.out.println(option);\r\n searchSNP(option);\r\n if (getController().getActiveSNP() instanceof VerifiedSNP) {\r\n SNPOptions.add(option + \" [your input]\");\r\n SNPInput.setValue(option);\r\n }\r\n else {\r\n if (!SNPOptions.contains(option + \" (not found)\") && !SNPOptions.contains(option)) {\r\n SNPOptions.add(option + \" (not found)\");\r\n } \r\n SNPInput.setValue(option + \" (not found)\");\r\n currentSNPInputValue = option + \" (not found)\";\r\n System.out.println(\"Setting 'not found'.\");\r\n } \r\n }",
"int insert(SysOrganization record);",
"boolean hasExists();",
"public void removePatient(String ssn) throws RemoveException {\n boolean success = false;\n for (int i = 0; i < patients.size(); i++) {\n if (patients.get(i).getSsn().equals(ssn)) {\n patients.remove(i);\n success = true;\n }\n }\n if (!success) {\n throw new RemoveException(\"Unable to remove patient. Patient not found\");\n }\n }",
"private void insertEntry() {\n String desiredId = idField.getText();\n String desiredName = nameField.getText();\n String desiredMajor = majorField.getText();\n\n if (studentHashMap.containsKey(desiredId)) {\n this.displayStatusPanel(\n \"Error: A student with this information already exists.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n } else {\n studentHashMap.put(desiredId, new Student(desiredName, desiredMajor));\n\n this.displayStatusPanel(\n \"Success: \" + desiredName + \" has been added.\",\n \"Success\",\n JOptionPane.INFORMATION_MESSAGE\n );\n }\n }",
"public String getSsn() {\n return ssn;\n }",
"public boolean registercheck(Consumer consumerdetails) throws SQLException {\n\tboolean registerflag = false;\n\tSystem.out.println(\"Email==>\"+consumerdetails.getEmailId());\n\n\ttry {\n\t\tConnection con = AccessDBConnection.getDbCon();\n\t\tPreparedStatement H = con.prepareStatement(\"select * FROM Consumers WHERE EmailId='\"+consumerdetails.getEmailId()+\"'\");\n\t\t ResultSet rs = H.executeQuery();\n\t\t if (!rs.next())\n\t\t\t{\n\t\t\t\tregisterflag = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tregisterflag = false;\n\t\t\t}\n\t}\n\t\t\tcatch(Exception e){\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\treturn registerflag;\n}",
"public boolean existsInstance(String name)\r\n\t{\r\n\t\treturn obtainOntResource(name) != null;\r\n\t}",
"public boolean checkHistoryItemCSExist(HistoryItemCS historyCS) {\n String[] input_column = new String[]{KEY_ADDRESS, KEY_DISTRICT, KEY_DESCRIPTION, KEY_TYPE, KEY_SOCKET, KEY_QUANTITY};\n String[] input_data = new String[]{historyCS.getAddress(), historyCS.getDistrict(), historyCS.getDescription(), historyCS.getType(), historyCS.getSocket(), Integer.toString(historyCS.getQuantity())};\n\n Log.d(\"addhistoryCS\", \"Exist? = \" + checkRecordExist(TABLE_NAME, input_column, input_data));\n\n return (checkRecordExist(TABLE_NAME, input_column, input_data));\n }",
"public static boolean registrazione(Studente s) {\n\t\tif(s.getUsername()==null || s.getNome()==null || s.getEmail()==null || s.getCognome()==null || \n\t\t\t\ts.getPassword()==null) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tString passwordCriptata = PasswordUtils.generateSecurePassword(s.getPassword());\n\t\t\ts.setPassword(passwordCriptata);\n\t\t\tStudenteDao dao = new StudenteDao();\n\t\t\tif(dao.add(s)) {\n\t\t\t\tdao.close();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse \n\t\t\t\treturn false;\n\t\t}\n\t}",
"public void testInexistentNumber() {\n\t\t// Arrange\n\t\tString exceptionNumber = null;\n\t\tPhoneNumberDTO dto = new PhoneNumberDTO(NON_EXISTING_NUMBER);\n\t\tGetLastMadeCommunicationService service\n\t\t\t= new GetLastMadeCommunicationService(dto);\n\t\t\n\t\t// Act\n\t\ttry {\n\t\t\tservice.execute();\n\t\t\tfail(\"Should have thrown PhoneNotExists\");\n\t\t} catch(PhoneNotExists pne) {\n\t\t\texceptionNumber = pne.getNumber();\n\t\t}\n\t\t\n\t\t// Assert\n\t\tassertEquals(\"The number in the exception should be \"\n\t\t\t\t+ NON_EXISTING_NUMBER + \" but it was \" + exceptionNumber,\n\t\t\t\tNON_EXISTING_NUMBER, exceptionNumber);\n\t}",
"public boolean isTransactionExist(String sID){\n\t\treturn hmTransaction.containsKey(sID);\n\t}",
"public boolean isExist(int conId) throws AppException;",
"public static boolean isValidSSN(String s) {\r\n\r\n\t\t// Provjeravamo duzinu SSN broja.\r\n\t\tif (s.length() != 11) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\t// Provjerava da li su brojevi na pozicijama.\r\n\t\t\tif (i >= 0 && i <= 2 || i == 4 || i == 5 || i >= 7 && i <= 10) {\r\n\t\t\t\t// Ako nije broj vrati false.\r\n\t\t\t\tif (!isNumber(s.charAt(i))) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Provjerava da li su unijete povlake (-) na poziciji 4 i 7.\r\n\t\t\tif (i == 3 || i == 6) {\r\n\t\t\t\t// Ako nisu povlake vrati false.\r\n\t\t\t\tif (s.charAt(i) != '-') {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Ako je sve proslo bez greske vraca true;\r\n\t\treturn true;\r\n\t}",
"private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public long addStudent(String studentname, String rollno, String ssg) {\n ContentValues initialValues=new ContentValues();\n initialValues.put(KEY_STUDENT_NAME,studentname);\n initialValues.put(KEY_STUDENT_ROLL,rollno);\n initialValues.put(KEY_FOREIGN,ssg);\n return liteDatabase.insert(DATABASE_TABLE2,null,initialValues);\n }",
"@Override\n\tpublic boolean resourceExist(URI uri) throws StorageSecuirtyException {\n\t\treturn false;\n\t}",
"public void insertBySName(String name, String sname, String no){\n\t\troot = insertBySName(root, name, sname, no);\n\t}",
"public boolean spacingExist(Spacing s) {\n for (Spacing spac : spacings) {\n if (spac.getGame1() == s.getGame1() && spac.getGame2() == s.getGame2())\n return true;\n }\n return false;\n }",
"private void validateDuplicateDocuments(Noc noc) {\n\t\tif (!ObjectUtils.isEmpty(noc.getDocuments())) {\n\t\t\tList<String> documentFileStoreIds = new LinkedList<String>();\n\t\t\tnoc.getDocuments().forEach(document -> {\n\t\t\t\tif (documentFileStoreIds.contains(document.getFileStoreId()))\n\t\t\t\t\tthrow new CustomException(\"NOC_DUPLICATE_DOCUMENT\", \"Same document cannot be used multiple times\");\n\t\t\t\telse\n\t\t\t\t\tdocumentFileStoreIds.add(document.getFileStoreId());\n\t\t\t});\n\t\t}\n\t}",
"public boolean addRemoteSite (String url) {\r\n\t\ttry {\r\n\t\t\tif (isInDatabase(url)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tpstmt = conn.prepareStatement(\"INSERT INTO RemoteSite (url) Values (?)\");\r\n\t\t\tpstmt.setString(1, url);\r\n\t\t\tint numRows = pstmt.executeUpdate();\r\n\t\t\treturn (numRows == 1);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\tDatabaseConnection.closeStmt(pstmt, rset);\r\n\t\t}\r\n\t}",
"public int addStorageplace (Storageplace pStorageplace){\r\n\t List<Storageplace> storageplaceList = getAll();\r\n\t boolean storageplaceExists = false;\r\n\t for(Storageplace storageplace: storageplaceList){\r\n\t if(storageplace.getStorageplaceName() == pStorageplace.getStorageplaceName()){\r\n\t \t storageplaceExists = true;\r\n\t break;\r\n\t }\r\n\t }\t\t\r\n\t if(!storageplaceExists){\r\n\t \t storageplaceList.add(pStorageplace);\r\n\t // Setup query\r\n\t String query = \"INSERT INTO storageplace(storageplace_name) VALUE(?);\";\r\n\t Connection conn = Database.connectMariaDb();\r\n\t try {\r\n\t\t\t\t// Setup statement\r\n\t\t\t\t PreparedStatement stmt = conn.prepareStatement(query);\r\n\t\t\t\t // Set values\r\n\t\t\t\tstmt.setString(1, pStorageplace.getStorageplaceName());\t\t\t\t\t\t\r\n\t\t\t\t// Execute statement\r\n\t\t\t\tstmt.executeUpdate();\t\t\t\t\r\n\t\t\t\t// Closing statement and connection\r\n\t\t\t\tstmt.close();\r\n\t\t\t\tDatabase.mariaDbClose();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tSystem.err.println(\"An SQL exception occured when trying to add a record to storageplace \" + e.getMessage());\r\n\t\t\t\treturn 0;\r\n\t\t\t}\t\t \r\n\t return 1;\r\n\t }\r\n\t return 0;\r\n\t }",
"@Override\r\n\tpublic boolean insert(Account account) {\n\t\tint i= iInsert.insert(account);\r\n\t\tif(1==i){\r\n\t\t\tflag=true;\r\n\t\t}\r\n\t\treturn flag;\r\n\t}",
"private void checkDuplicateEntry(Long userId, String email, Boolean isBeneficiary, Boolean isFiduciary) {\n\t\tList<Contact> contactOpt = contactRepository.findByUserIdAndEmailAndIsFiduciaryAndIsBeneficiaryAndDeletedFalse(\n\t\t\t\tuserId, email, isBeneficiary, isFiduciary);\n\t\tif (!contactOpt.isEmpty()) {\n\t\t\tthrow DataAlreadyExistException.of(MessageConstant.EMAIL_ALREADY_EXISTED);\n\t\t}\n\t}",
"public boolean checkThisEmailAlreadyExist(String email) {\n\t\tquery = \"select id from guru where email=?\";\n\t\tList<GuruModel> list = this.jdbcTemplate.query(query,new Object[]{email},BeanPropertyRowMapper.newInstance(GuruModel.class));\n\t\t\n\t\tif(list.size() == 0)\n\t\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}",
"private void chkSTMST()\n\t{\n\t\ttry\n\t\t{\n\t\t\tM_strSQLQRY = \"Select count(*) from fg_stmst\";\n\t\t\tM_strSQLQRY += \" where st_CMPCD = '\"+cl_dat.M_strCMPCD_pbst+\"' and st_wrhtp = '\"+strWRHTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_prdtp = '\"+strPRDTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_lotno = '\"+strLOTNO+\"'\";\n\t\t\tM_strSQLQRY += \" and st_rclno = '\"+strRCLNO+\"'\";\n\t\t\tM_strSQLQRY += \" and st_pkgtp = '\"+strPKGTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_mnlcd = '\"+strMNLCD+\"'\";\n\t\t\tif(cl_dat.getRECCNT(M_strSQLQRY) > 0)\n\t\t\t\tupdSTMST();\n\t\t\telse{\n\t\t\t\tsetMSG(\"Record does not exist in FG_STMST\",'E');\n\t\t\t\tcl_dat.M_flgLCUPD_pbst = false;\n\t\t\t\t}\n\t\t}\n\t\tcatch(Exception L_EX)\n\t\t{\n\t\t\tsetMSG(L_EX,\"chkSTMST\");\n\t\t}\n\t}",
"private boolean shardExistsInNode(final NodeGatewayStartedShards response) {\n return response.storeException() != null || response.allocationId() != null;\n }",
"Boolean checkUserExists(String userName) throws AppException;",
"@Override\r\n\tpublic boolean isExisting() {\n\t\treturn false;\r\n\t}",
"public void addCertainRow(String username, String num, String ISBN)\n {\n String insertStr;\n int tempt= (int) (Math.random()*500);\n String random=Integer.toString(tempt);\n try{\n\n insertStr=\"INSERT IGNORE INTO borrowlist (username, num, random, ISBN) VALUES(\"\n +quotate(username)+\",\"\n +quotate(num)+\",\"\n +quotate(random)+\",\"\n +quotate(ISBN)\n +\")\";\n\n stmt.executeUpdate(insertStr);\n\n } catch(Exception e){\n System.out.println(\"Error occurred in inserting data\");\n }\n return;\n }",
"private void createCNAEIsNotFull() {\r\n createStudentList(new Student(\"Vasile Ana\", 10), new Student(\"Marin Alina\", 6), new Student(\"Ilie David\", 8), new Student(\"Gheorghe Alex\", 9));\r\n createSchoolList(new School(\"C.N.S.H.\", 0), new School(\"C.N.C.H.\", 0), new School(\"C.N.A.E.\", 10));\r\n createStudentPreferences(new LinkedList<>(Arrays.asList(schools[0], schools[1], schools[2])), new LinkedList<>(Arrays.asList(schools[0], schools[1], schools[2])), new LinkedList<>(Arrays.asList(schools[0], schools[1])), new LinkedList<>(Arrays.asList(schools[0], schools[2])));\r\n createSchoolPreferences(new LinkedList<>(Arrays.asList(students[3], students[0], students[1], students[2])), new LinkedList<>(Arrays.asList(students[0], students[2], students[1])), new LinkedList<>(Arrays.asList(students[0], students[1], students[3])));\r\n }",
"public boolean defIsSheetExist(String sSheetName){\n\t\tint iIndex=workbook.getSheetIndex(sSheetName.toUpperCase());\n\t\t\n\t\t//checking whether sheet is exits\n\t\t\tif(iIndex==-1){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse{\n\t\t\treturn true;\n\t\t\t}\n\t}",
"public boolean isLiquidationRecordExist(String sKey){\n\t\treturn hmLiquidationRecord.containsKey(sKey);\n\t}",
"public boolean addStudent(Student student) throws DocumentException, IOException {\n String name = student.getName();\n if(getUser(name)==null){//hasn't got a user called the same name\n String password = student.getPassword();\n Student.Speciality speciality = student.getSpeciality();\n String mail = student.getMail();\n root = document.getRootElement();\n Element root2 = root.addElement(\"student\");\n int nb = root.elements().size()-1;\n root2.addAttribute(\"id\", String.valueOf(nb));\n Element usernameElement = root2.addElement(\"username\");\n Element passwordElement = root2.addElement(\"password\");\n Element mailElement = root2.addElement(\"mail\");\n Element specialityElement = root2.addElement(\"speciality\");\n usernameElement.setText(name);\n passwordElement.setText(password);\n mailElement.setText(mail);\n specialityElement.setText(speciality.name());\n writeXML();\n return true;\n }\n else{//the same name already in the list\n return false;\n }\n }",
"public EANAlreadyExists(String msg) {\n super(msg);\n }",
"@Test\n public void testIdDoesNotExist() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // generate ID not assigned to any transaction in the shop\n int nonExistentId = generateId(shop.getCreditsAndDebits(null, null).stream()\n .map(BalanceOperation::getBalanceId)\n .collect(Collectors.toList()));\n\n // if ID does not exist -1 is returned\n assertEquals(-1, shop.receiveCashPayment(nonExistentId, 10), 0.001);\n }",
"public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter a SSN: \");\n String ssn = input.next(); \n \n //checks to see if ssn is a valid social security number\n if(ssn.length() == 11 && ValidSSC.areNumbers(ssn)) {\n System.out.println(ssn + \" is a valid social security number\");\n } else {\n System.out.println(ssn + \" is not a valid social security number\");\n }\n }",
"public int addSavingsAccount(long pNr) throws SQLException {\r\n\t\tint accountId = -1;\r\n\r\n\t\t_db.connect();\r\n\r\n\t\tCustomer _cust = _db.findCustomer(pNr);\r\n\t\tif (_cust != null) {\r\n\t\t\tAccount _ac = new SavingsAccount(0, 1);\r\n\t\t\taccountId = _db.addAccount(_ac, pNr);\r\n\t\t}\r\n\r\n\t\t_db.disconnect();\r\n\r\n\t\treturn accountId;\r\n\t}",
"@Test\n public void testSsnvalidatorFalse(){\n assertFalse(register.ssnValidator(\"70091212345\")); // a date can`t start with 70\n }",
"public boolean checkScriptInstanceKeyExists(String scriptIdentifier) {\n\t\tLOGGER.info(\"Checking if the script instance identifier [\"\n\t\t\t\t+ scriptIdentifier + \"] exists.\");\n\t\treturn scriptInstanceMap.containsKey(scriptIdentifier);\n\t}"
] | [
"0.6335213",
"0.6169005",
"0.61523664",
"0.58761376",
"0.5680606",
"0.56579584",
"0.56442815",
"0.55775833",
"0.54398245",
"0.54081446",
"0.53687423",
"0.5339488",
"0.53013045",
"0.5230796",
"0.52056366",
"0.52032787",
"0.51827854",
"0.51790816",
"0.51710117",
"0.51642376",
"0.513836",
"0.51371557",
"0.51180893",
"0.5115508",
"0.5091723",
"0.5088317",
"0.5060942",
"0.50558907",
"0.5048664",
"0.5045694",
"0.5033243",
"0.502647",
"0.50161064",
"0.5009518",
"0.5005864",
"0.49965796",
"0.49814123",
"0.4968043",
"0.4967554",
"0.49553877",
"0.4944368",
"0.49425125",
"0.49369255",
"0.49336174",
"0.49256858",
"0.49238133",
"0.49129373",
"0.49076635",
"0.49028572",
"0.48989725",
"0.48981297",
"0.48980388",
"0.48875457",
"0.48807803",
"0.48721844",
"0.48661175",
"0.4860803",
"0.48534945",
"0.48428348",
"0.48410204",
"0.48397565",
"0.48294327",
"0.48241606",
"0.48204657",
"0.48124075",
"0.48054793",
"0.4805016",
"0.48038244",
"0.47952682",
"0.47921678",
"0.47886312",
"0.4786365",
"0.47851565",
"0.47821495",
"0.47820798",
"0.47811285",
"0.47765782",
"0.4772343",
"0.47596517",
"0.4756103",
"0.4753167",
"0.47522154",
"0.47513038",
"0.475096",
"0.4748451",
"0.47383788",
"0.4737157",
"0.47363824",
"0.4731934",
"0.47316864",
"0.47315097",
"0.47302327",
"0.47267526",
"0.47235775",
"0.47235376",
"0.4719805",
"0.47179934",
"0.47154358",
"0.47072726",
"0.4704532"
] | 0.5919981 | 3 |
/ Record an employee's absenteeism. | public EmployeeAbsent recordEmployeeAbsent(Employee emp, LocalDate startDate, LocalDate endDate, String reason) {
EmployeeAbsent empAbs = null;
AbsentYear absYear = findAbsentYear(emp, startDate);
long numDays = calculateNumberOfDaysAbsentInclusive(startDate, endDate);
if(numDays > 0 ) {
if(checksForAnnualLeaveAreOk(reason, absYear, numDays, emp.getEmpId())) {
empAbs = GenericBuilder.of(EmployeeAbsent::new)
.with(EmployeeAbsent::setAbsentStartDate, startDate)
.with(EmployeeAbsent::setAbsentEndDate, endDate)
.with(EmployeeAbsent::setAbsentYear, absYear)
.with(EmployeeAbsent::setNumDays, numDays)
.with(EmployeeAbsent::setReason, reason)
.build();
em.persist(empAbs);
}
}
return empAbs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}",
"public double getDayAbsent() {\n return dayAbsent;\n }",
"public void setDayAbsent(double dayAbsent) {\n this.dayAbsent = dayAbsent;\n }",
"public boolean addEmp(Employee e) {\n\t\treturn edao.create(e);\n\t\t\n\t}",
"public void saveEmployee(Employe employee) {\n\t\t\n\t}",
"public static void addEmployee(Employee employee) {\n try {\n if (employeeRepository.insert(dataSource, employee) == 1) {\n LOGGER.warn(\"The employee \" + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" is already in the list\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"in-list\") + \"\\n\");\n } else {\n LOGGER.info(\"The employee \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" was successfully added to the list of employees\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + \" \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"success.add\") + \"\\n\");\n }\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n }",
"public void empDetails() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}",
"public void updateemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}",
"public long getEmployeeId() {\n\t\treturn employeeId;\n\t}",
"public void sauverEmploye(Employe employe) {\n\n\t}",
"public int getEmployeeId() {\n\t\treturn employeeId;\n\t}",
"public int getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}",
"public int getEmployeeId() {\r\n\t\r\n\t\treturn employeeId;\r\n\t}",
"public Employee() {\n this.isActivated = false;\n this.salt = CryptographicHelper.getInstance().generateRandomString(32);\n\n this.address = new Address();\n this.reports = new ArrayList<>();\n }",
"public int getEmployeeId() {\n return employeeId_;\n }",
"public String getEmployeeId() {\n return employeeId;\n }",
"public String getEmployeeId() {\n return employeeId;\n }",
"@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}",
"@Override\n\tpublic int saveEmployee() {\n\t\tEmployeeDao dao= new EmployeeDao();\n\t\tint result=dao.saveEmployee(new Employee(101349, \"Deevanshu\", 50000));\n\t\treturn result;\n\t}",
"public HourlyEmployee getEmployee() {\n\t\treturn employee;\n\t}",
"public void createEmployee(Employee newEmployee) {\n\t\tif(false == this.employee.contains(newEmployee)) {\n\t\t\tthis.employee.add(newEmployee);\n\t\t}\n\t}",
"public Long getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}",
"public void saveEmployee(Employee emp){\n System.out.println(\"saved\" + emp);\n\n }",
"public int getEmployeeId() {\n return employeeId_;\n }",
"public void addEmployee(Employee emp) {\n\t\t\r\n\t}",
"private void saveEmployee()\n {\n Employee tempEmployee = new Employee();\n String line = \"\";\n try\n {\n PrintWriter out = new PrintWriter(fileName);\n for(int i = 0; i < employees.size(); i++)\n {\n tempEmployee = (Employee) employees.get(i);\n line = tempEmployee.getName() + \",\" + tempEmployee.getHours() + \",\" +\n tempEmployee.getRate();\n out.println(line);\n }\n out.close(); \n }\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }",
"public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n }",
"public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }",
"public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }",
"@Override\n\tpublic void addEmployee(Employee employee) {\n\t\tem.getTransaction().begin();\n\t\tem.persist(employee);\n\t\tem.getTransaction().commit();\n\t\tSystem.out.println(\"Data Added successfully\");\n\t\tlogger.log(Level.INFO, \"Data Added successfully\");\n\n\t}",
"@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }",
"@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }",
"private static void newEmployee(UserType employeeType) {\n\n\t\tString username = null, password;\n\n\t\tboolean valid = false;\n\n\t\t// make sure that the username is not already taken\n\t\twhile (!valid) {\n\t\t\tSystem.out.print(\"What username would you like for your account? \");\n\t\t\tusername = input.nextLine();\n\t\t\tif (nameIsTaken(username, customerList)) {\n\t\t\t\tSystem.out.println(\"Sorry but that username has already been taken.\");\n\t\t\t} else\n\t\t\t\tvalid = true;\n\t\t}\n\t\t// set valid to false after each entry\n\t\tvalid = false;\n\n\t\tSystem.out.print(\"What password would you like for your account? \");\n\t\tpassword = input.nextLine();\n\n\t\tEmployee e = new Employee(username, password);\n\n\t\te.setType(employeeType);\n\t\temployeeList.add(e);\n\t\tcurrentUser = e;\n\t\twriteObject(employeeFile, employeeList);\n\t\temployeeDao.create(e);\n\t}",
"public long getEmployeeId() {\n return employeeId;\n }",
"public boolean addReport(SoftwareEngineer e){\n if(this.curHeadCount < this.maxHeadCount){\n employee[this.curHeadCount] = e;\n this.curHeadCount++;\n return true;\n }\n else\n return false;\n }",
"public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n if (employeelistBuilder_ == null) {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n } else {\n return employeelistBuilder_.getMessage();\n }\n }",
"@Override\n\tpublic boolean ifEmp(int eid, String passwd) {\n\t\treturn eb.ifEmp(eid, passwd);\n\t}",
"private void saveEmployee(Employee employee) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_KEY, employee.getKey());\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_VALUE, employee.getValue());\n\n getContext().getContentResolver().insert(\n ReportContract.EmployeeEntry.CONTENT_URI,\n contentValues\n );\n\n }",
"public void setEmployeeid(long employeeid)\n {\n this.employeeid = employeeid;\n }",
"public String getEmployeeNum() {\n return employeeNum;\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic static void itreator(HashSet<Employee> employeDetails) {\n\t\tIterator itr = employeDetails.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tEmployee emps = (Employee) itr.next();\n\t\t\tSystem.out.println(emps.getEmpId() + emps.getEmpName() + emps.getEmpAge() + emps.getEmpSalary());\n\t\t}\n\n\t}",
"Employee(String id, Kitchen kitchen) {\r\n this.id = id;\r\n this.kitchen = kitchen;\r\n this.attendance = \"Present\";\r\n this.password = \"password\";\r\n }",
"public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }",
"@Override\n\tpublic long getEmployeeId() {\n\t\treturn _userSync.getEmployeeId();\n\t}",
"public int getEmpId() {\n\t\treturn 0;\n\t}",
"private void meetDepartmentStaff() {\n if(metWithHr) {\n metDeptStaff = true;\n } else {\n System.out.println(\"Sorry, you cannot meet with \"\n + \"department staff until you have met with HR.\");\n }\n }",
"public String getEmployeeName() {\r\n\t\treturn employeeName;\r\n\t}",
"public boolean createEmployeeInfo(Employee employee) {\n\t\treturn dao.createEmployeeInfo(employee);\n\t}",
"@Override\r\n\tpublic String AddEmployeeDetails(EmployeeEntity employee) throws CustomException {\n\t\tString strMessage=\"\";\r\n\t\trepository.save(employee);\r\n\t\tstrMessage=\"Employee data has been saved\";\r\n\t\treturn strMessage;\r\n\t}",
"public String getEid() {\n return eid;\n }",
"@Override\n\tpublic List<Employee> getEmpInfo() {\n\t\treturn null;\n\t}",
"public int getEid() {\r\n\treturn eid;\r\n\t}",
"public void setEmployeId(String employeId) {\n this.employeId = employeId;\n }",
"@Override\n public void setEmployees() throws EmployeeCreationException {\n\n }",
"@Override\n\tpublic Integer insertEmp(Employee e) {\n\t\treturn null;\n\t}",
"public EmployeeTransition() {\n this.id = new UUID(0, 0);\n this.f_name = StringUtils.EMPTY;\n this.l_name = StringUtils.EMPTY;\n this.employeeid = \"-1\";\n this.active = StringUtils.EMPTY;\n this.role = StringUtils.EMPTY;\n this.manager = StringUtils.EMPTY;\n this.password = StringUtils.EMPTY;\n this.createdOn = new Date();\n }",
"public void setEmployeeID(int employeeID) { this.employeeID = employeeID; }",
"public String getIdee() {\r\n\t\treturn idee;\r\n\t}",
"@Override\r\n\tpublic void saveEmployee(Employee employee) {\n\t\t\r\n\t}",
"@Override\n\tString toString(Employee obj) {\n\t\treturn null;\n\t}",
"public static Value makeAbsent() {\n return theAbsent;\n }",
"public String getEmployeeName() {\r\n\t\r\n\t\treturn employeeName;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Employee [id=\" + id + \", name=\" + name + \", salary=\" + salary + \", designation=\" + designation\r\n\t\t\t\t+ \", department=\" + department + \", address=\" + address + \"]\";\r\n\t}",
"@Override\n\tpublic void create(Empleado e) {\n\t\tSystem.out.println(\"Graba el empleado \" + e + \" en la BBDD.\");\n\t}",
"public void addEmployee(int noOfEmployee) {\r\n\t\tint id = 0;\r\n\t\tString name = null;\r\n\t\tString address = null;\r\n\t\t\r\n\t\tfor (int index = 0; index < noOfEmployee; index++) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee id :\");\r\n\t\t\tid = input.nextInt();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee name : \");\r\n\t\t\tinput.nextLine();\r\n\t\t\tname = input.nextLine();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Enter employee address :\");\r\n\t\t\taddress = input.nextLine();\r\n\t\t\t\r\n\t\t\tif (empId.contains(id)) {\r\n\t\t\t\tSystem.out.println(\"Emp ID : \"+ id +\" employee ID already exists !!!!!\");\r\n\t\t\t} else {\r\n\t\t\t\tempId.add(id);\r\n\t\t\t\temp.add(addEmployee(id, name, address));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public SalesEmployee(){\n\t\tfirstName = \"unassigned\";\n\t\tlastName = \"unassigned\";\n\t\tppsNumber = \"unassigned\";\n\t\tbikeEmployeeNumber++;\n\t}",
"public String getempID() {\n\t\treturn _empID;\n\t}",
"@Override\n\tpublic void save(Employee theEmployee) {\n\t\t\n\t}",
"@Override\n\tpublic int updateOrgEmployee(Org_employee orgEmloyee) {\n\t\treturn 0;\n\t}",
"public String getEmployeeName() {\n return employeeName;\n }",
"public void setAbsenceReason(AbsenceReason absenceReason) {\n\tthis.absenceReason = absenceReason;\n }",
"public Long getEid() {\n return eid;\n }",
"public Long getEid() {\n return eid;\n }",
"public void setEpDeletetime(Date epDeletetime) {\n this.epDeletetime = epDeletetime;\n }",
"public String addEmployee() {\n\t\t\t//logger.info(\"addEmployee method called\");\n\t\t\t//userGroupBO.save(userGroup);;\n\t\t\treturn SUCCESS;\n\t\t}",
"public void checkEmployeeEvents(Employee e){\r\n int choice;\r\n for (Event ev: e.eventsArray)\r\n {\r\n System.out.println((e.eventsArray.indexOf(ev)+1)+ \" \" + ev.getEventName());\r\n }\r\n if((e.eventsArray.size()==0))\r\n System.out.println(e.getName() + \" has no events\");\r\n else {\r\n System.out.println(\"Which event do you want to check? Input number!\");\r\n choice = kbd.nextInt();\r\n System.out.println(e.eventsArray.get(choice - 1).toString());\r\n }\r\n }",
"@Override\n\tpublic long getEmployeeProofId() {\n\t\treturn _candidate.getEmployeeProofId();\n\t}",
"public String getEadid() {\n return this.eadid;\n }",
"public void setEmployee (jkt.hms.masters.business.MasEmployee employee) {\n\t\tthis.employee = employee;\n\t}",
"public List<Employee> getEmployeesOnly() {\n\t\treturn edao.listEmployeOnly();\n\t}",
"public void setEmployeeId(String employeeId) {\n this.employeeId = employeeId;\n }",
"public static void main(String[] args) {\n\r\n System.out.println(\"* * * * * Welcome to the employee inform * * * * * \");\r\n\r\n Employee_Company Jane = new Employee_Company();\r\n Employee_Company Lucas = new Employee_Company();\r\n Employee_Company Intern_Sophia = new Employee_Company();\r\n Employee_Company Intern_Ava = new Employee_Company();\r\n Employee_Company Intern_James = new Employee_Company();\r\n Employee_Company Intern_Nicholas = new Employee_Company();\r\n\r\n\r\n Lucas.Set_name_employee(\"Lucas Smith\");\r\n Lucas.Set_Email_employee(\"Lucas_Smith@TechCompany.org\");\r\n Lucas.Set_role_employee(\"Software Engineer\");\r\n Lucas.setSalary_employee(103438);\r\n\r\n\r\n Jane.Set_name_employee(\"Jane charlotte\");\r\n Jane.Set_Email_employee(\"Jane_Charlotte@TechCompany.org\");\r\n Jane.setSalary_employee(623100);\r\n Jane.Set_role_employee(\"CEO Tech Company\");\r\n\r\n\r\n Intern_Sophia.Set_name_employee(\"Sophia Wood\");\r\n Intern_Sophia.Set_Intern_application('A');\r\n Intern_Sophia.Set_role_employee(\"Intern Artificial Intelligence \");\r\n\r\n\r\n Intern_Ava.Set_name_employee(\"Ava Richardson\");\r\n Intern_Ava.Set_Intern_application('B');\r\n Intern_Ava.Set_role_employee(\"Intern Computer Science\");\r\n\r\n\r\n Intern_James.Set_name_employee(\"James Benjamin\");\r\n Intern_James.Set_Intern_application('B');\r\n Intern_James.Set_role_employee(\"Intern Business Analyst\");\r\n\r\n\r\n Intern_Nicholas.Set_name_employee(\"Nicholas Miller\");\r\n Intern_Nicholas.Set_Intern_application('C');\r\n Intern_Nicholas.Set_role_employee(\"Intern Systems Integration Engineering\");\r\n\r\n\r\n\r\n System.out.println(\"\\n\\t*** Tech Company employee information ***\");\r\n System.out.println(\"1. View Salary\");\r\n System.out.println(\"2. View Name of the Employee\");\r\n System.out.println(\"3. View Email Address\");\r\n System.out.println(\"4. View Employee Role\");\r\n System.out.println(\"5. View Intern Application grade\");\r\n\r\n\r\n\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"Direction: Input the number is addressed in Tech Company employee information\");\r\n int input_user = input.nextInt();\r\n\r\n switch (input_user){\r\n case 1 -> {\r\n System.out.println(\"Here is the salary of the employee of Tech Company\");\r\n System.out.println(\"Salary of Software engineering: \"+Lucas.getSalary_employee());\r\n System.out.println(\"Salary of CEO: \"+Jane.getSalary_employee());\r\n }\r\n case 2 ->{\r\n System.out.println(\"Here is the name of the employee of Tech Company\");\r\n System.out.println(\"The software engineering of Tech Company name of the employee is: \"+Jane.Get_name_employee());\r\n System.out.println(\"The CEO Tech Company name of the employee is: \"+Lucas.Get_name_employee());\r\n }\r\n case 3 ->{\r\n System.out.println(\"Here is the Email Address of employee of Tech Company\");\r\n System.out.println(\"Jane Charlotte is CEO of Tech company Email Address its : \"+Jane.Get_Email_employee());\r\n System.out.println(\"Lucas Smith is Software Engineering of Tech Company Email Address its: \"+Lucas.Get_Email_employee());\r\n }\r\n case 4 ->{\r\n System.out.println(\"Here is the Employee Role of Tech Company\");\r\n System.out.println(Jane.Get_role_employee());\r\n System.out.println(Lucas.Get_role_employee());\r\n }\r\n case 5 ->{\r\n System.out.println(\"Here is all the Intern get accepted to Tech Company \");\r\n System.out.println(\"1.\"+Intern_Ava.Get_name_employee()+\" GPA college: \"+Intern_Ava.Get_Intern_application()+\"- \"+\" Application: Accepted \"+Intern_Ava.Get_role_employee());\r\n System.out.println(\"2.\"+Intern_Sophia.Get_name_employee()+\" GPA college: \"+Intern_Sophia.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Sophia.Get_role_employee());\r\n System.out.println(\"3.\"+Intern_James.Get_name_employee()+\" GPA college: \"+Intern_James.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_James.Get_role_employee());\r\n System.out.println(\"4.\"+Intern_Nicholas.Get_name_employee()+\"GPA college: \"+Intern_Nicholas.Get_Intern_application()+\"+ \"+\" Application: Accepted \"+Intern_Nicholas.Get_role_employee());\r\n }\r\n }\r\n\r\n\r\n\r\n }",
"public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}",
"private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void addReportingEmployee(Employee employee) {\n\t\tthrow new IllegalStateException(\"Cannot add \" + employee.getClass().getSimpleName() + \" to \" + this.getClass().getSimpleName());\n\t}",
"public Builder setEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employee_ = value;\n onChanged();\n } else {\n employeeBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public Builder setEmployee(grpc.messages.Messages.Employee value) {\n if (employeeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n employee_ = value;\n onChanged();\n } else {\n employeeBuilder_.setMessage(value);\n }\n\n return this;\n }",
"@Override\n\tpublic void deleteEmployee() {\n\n\t}",
"public void setEmployeeId(long employeeId) {\n this.employeeId = employeeId;\n }",
"public String getAssociatedEE() {\n return associatedEE;\n }",
"public void setEmployeeId(long employeeId);",
"public static void getEmployeeInformation(Employee [] employee) {\n\t\tif (Employee.getEmployeeQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no employee!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Employee.getEmployeeQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Employees-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \": \"+ employee[i+1].getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}",
"public void setAbsentDays(Integer absentDays)\r\n/* 63: */ {\r\n/* 64:63 */ this.absentDays = absentDays;\r\n/* 65: */ }",
"public SummitEntityImpl getEmpEO() {\r\n return (SummitEntityImpl)getEntity(1);\r\n }",
"@Override\n public Employee addNewEmployee(Employee employee) {\n return null;\n }",
"public int getEmployeeID() {\r\n return employeeID;\r\n }",
"private void writeData(Employee[] employees, DataOutput out) throws IOException {\n // write number of employees\n out.writeInt(employees.length);\n\n for (Employee e : employees) {\n out.writeInt(e.getName().length());\n out.writeChars(e.getName());\n out.writeInt(e.getHireDay().toString().length());\n out.writeChars(e.getHireDay().toString());\n out.writeDouble(e.getSalary());\n }\n }",
"public Employe(String nomEmploye) {\r\n\t\tsuper();\r\n\t\tthis.nomEmploye = nomEmploye;\r\n\t}",
"public AbsenceReason getAbsenceReason() {\n\treturn absenceReason;\n }",
"@Override\r\n\tpublic String save(Emp e) {\n\t\treturn \"JPA :Emp saved with ID \" + e.getEmpId(); \r\n\t}"
] | [
"0.59655267",
"0.5828149",
"0.57795507",
"0.5716831",
"0.5702289",
"0.55770355",
"0.55539036",
"0.55532086",
"0.5547574",
"0.5540602",
"0.547454",
"0.5468894",
"0.5452636",
"0.5449464",
"0.5438027",
"0.54360294",
"0.54360294",
"0.54273987",
"0.5413949",
"0.54137033",
"0.5410811",
"0.5410744",
"0.5392596",
"0.5378373",
"0.53713936",
"0.5366808",
"0.53612655",
"0.535298",
"0.535298",
"0.5338875",
"0.5335213",
"0.5335213",
"0.53342277",
"0.53264654",
"0.53198975",
"0.53190434",
"0.531309",
"0.5312345",
"0.53075",
"0.53064215",
"0.5300992",
"0.5285802",
"0.5284935",
"0.5282763",
"0.5281158",
"0.5279816",
"0.52794546",
"0.5278765",
"0.52726847",
"0.5270591",
"0.5260634",
"0.5254229",
"0.52536714",
"0.5250196",
"0.5249052",
"0.5244656",
"0.5241714",
"0.5238745",
"0.5233307",
"0.52293384",
"0.5228354",
"0.52272004",
"0.52183276",
"0.52116716",
"0.52081275",
"0.5201491",
"0.518517",
"0.5183906",
"0.5177187",
"0.5175938",
"0.5173994",
"0.5170398",
"0.5170398",
"0.5169606",
"0.5167709",
"0.5160284",
"0.51570815",
"0.5155895",
"0.515497",
"0.51508296",
"0.514986",
"0.5147251",
"0.5144863",
"0.51446635",
"0.51417965",
"0.5132934",
"0.5132934",
"0.5127778",
"0.5126943",
"0.512608",
"0.5123194",
"0.5120477",
"0.5120213",
"0.5108754",
"0.5105547",
"0.51043487",
"0.5102632",
"0.51010215",
"0.5100466",
"0.50952154"
] | 0.6839533 | 0 |
Find the year for an employee's absenteeism. | private AbsentYear findAbsentYear(Employee emp, LocalDate startDate) {
AbsentYear absentYear = absYearRepo.findByEmployeeAndYear(emp, (short)startDate.getYear());
if(absentYear == null) {
absentYear = createAbsentYear(emp, startDate);
}
return absentYear;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic int fetchYearOfAnEmployee(int clockNum) {\n\t\treturn exemptTeamMemberDAO.fetchYearOfAnEmployee(clockNum);\r\n\t}",
"public Date getEyear() {\n return eyear;\n }",
"public int getEndingYear()\n {\n return -1;\n }",
"public int getUpperYear()\r\n {\r\n return getInt(UpperYear_, 0);\r\n }",
"int getExpYear(String bookingRef);",
"private AbsentYear createAbsentYear(Employee emp, LocalDate startDate) {\n\t\tAbsentYear absentYear = new AbsentYear();\n\t\tabsentYear.setEmployee(emp);\n\t\tabsentYear.setYear((short)startDate.getYear());\n\t\tabsYearRepo.save(absentYear);\n\t\treturn absentYear;\n\t}",
"int getYear();",
"public Integer getEdad() {\n Calendar fechaNac_ = Calendar.getInstance();\n fechaNac_.setTime(fechaNac);\n try {\n return Math.abs(Calendar.getInstance().get(Calendar.YEAR) - fechaNac_.get(Calendar.YEAR));\n } catch (ArithmeticException e) {\n return -1;\n }\n }",
"public int getEndYear()\n {\n return indicators[indicators.length - 1].getYear();\n }",
"public int getIndepYear() {\n\n return indepYear;\n }",
"public int getEdad() {\n\t\treturn (new Date()).getYear()- fechanac.getYear();\n\t}",
"public int getYear() {\n return endDate.getYear();\n }",
"private int actualYear() throws IOException{\r\n try {\r\n return Integer.parseInt(getActualSheet().getName());\r\n } catch (NumberFormatException e) {\r\n System.err.println(\"You have to start year first\");\r\n return 0;\r\n }\r\n }",
"@Override\n\tpublic int getYear() {\n\t\treturn _esfShooterAffiliationChrono.getYear();\n\t}",
"public static int getYear(byte[] edid) {\n // Byte 17 is manufacture year-1990\n byte temp = edid[17];\n Logger.debug(\"Year-1990: {}\", temp);\n return temp + 1990;\n }",
"private int getYear(TemporalAccessor partialValue) {\n int year = ISearchObjectConstants.DEFAULT_NOT_FOUND_YEAR;\r\n try {\r\n /*\r\n * It is not entirely clear which of the following fields should be used when extracting the year\r\n * from this TemporalAccessor object: ChronoField.YEAR_OF_ERA or ChronoField.YEAR\r\n * Currently in Java 8 YEAR_OF_ERA works. Previously on java 7 it seemed to be YEAR\r\n * but I'm not entirely sure.\r\n */\r\n year = partialValue.get(ChronoField.YEAR_OF_ERA);\r\n } catch (DateTimeException e) {\r\n // these errors may be common do not print them\r\n }\r\n return year;\r\n }",
"public final int getISOYear()\n {\n\n final int W = getISOWeekNumber();\n\n if ((W > 50) && (getMonth() == 1)) {\n return (getYear() - 1);\n }\n else if ((W < 10) && (getMonth() == 12)) {\n return (getYear() + 1);\n }\n else {\n return getYear();\n }\n }",
"public Integer getLastYearAttended() {\n return lastYearAttended;\n }",
"public int getYear() {\n return DateUtil.YearFromString(rel);\n }",
"@Override\n public int getYear() {\n return this.deadline.getYear();\n }",
"public int getYear() {\n\n return this.cyear;\n\n }",
"public int getYear()\n {\n return yr;\n }",
"public int getYear() \n\t{\n\t\treturn year;\n\t}",
"public int getYear() {\r\n\t\treturn (this.year);\r\n\t}",
"public int getYearFounded() {\n\t\treturn yearFounded;\n\t}",
"public int getEndYear()\n\t{\n\t\treturn this.mEndYear;\n\t}",
"public String asYear() {\n \treturn new SimpleDateFormat(\"yyyy\").format(expiredAfter);\n }",
"public int getYear() {\r\n return year;\r\n }",
"public static int getTodaysYear() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.year;\t\r\n\t\t\r\n\t}",
"public int getYear() \n\t{\n\t\treturn m_calendar.get(Calendar.YEAR);\n\n\t}",
"public int getYear() {\r\n return year;\r\n }",
"public int getYear()\n {\n return year;\n }",
"public int getYear() {\n return year;\n }",
"public Calendar calculateEasterForYear(int year) {\n int a = year % 4;\n int b = year % 7;\n int c = year % 19;\n int d = (19 * c + 15) % 30;\n int e = (2 * a + 4 * b - d + 34) % 7;\n int month = (int) Math.floor((d + e + 114) / 31);\n int day = ((d + e + 144) % 31) + 1;\n day++;\n\n Calendar instance = Calendar.getInstance();\n instance.set(Calendar.YEAR, year);\n instance.set(Calendar.MONTH, month);\n instance.set(Calendar.DAY_OF_MONTH, day);\n\n instance.add(Calendar.DAY_OF_MONTH, 13);\n\n return instance;\n }",
"public int getYear() {\n return year;\n }",
"public int getYear() {\n\treturn year;\n }",
"public int getEndYear() {\n\t\treturn endYear;\n\t}",
"public int getYear(){\n\t\treturn year; \n\t}",
"public int getYear() {\n return year;\n }",
"public int getYear() {\n\t\treturn year;\n\t}",
"public int getYear(){\r\n\t\treturn year;\r\n\t}",
"public int getYear() {\r\n\t\treturn year;\r\n\t}",
"java.lang.String getEndDateYYYY();",
"int getYears();",
"public int getYear() {\r\n return this.year;\r\n }",
"public int getYear() {\n\t\treturn year; \n\t}",
"@Override\n\tpublic int getYear() {\n\t\treturn year;\n\t}",
"public static String getPastYearDate() {\n String dateStr = null;\n if (getLeapYear()) {\n dateStr = decDays(-366);\n } else {\n dateStr = decDays(-365);\n }\n return dateStr;\n }",
"public int getYear(){\n\t\treturn year;\n\t}",
"private Calendar getEasterDate(final int year) {\n\n double g = year % 19;\n\n int c = year / 100;\n int c4 = c / 4;\n int e = (8 * c + 13) / 25;\n\n int h = (int) (19 * g + c - c4 - e + 15) % 30;\n int k = h / 28;\n int p = 29 / (h + 1);\n int q = (int) (21 - g) / 11;\n int i = (k * p * q - 1) * k + h;\n int b = year / 4 + year;\n int j1 = b + i + 2 + c4 - c;\n int j2 = j1 % 7;\n int r = 28 + i - j2;\n\n int monthNumber = 4;\n int dayNumber = r - 31;\n boolean negativeDayNumber = dayNumber <= 0;\n\n if (negativeDayNumber) {\n monthNumber = 3;\n dayNumber = r;\n }\n\n Calendar paques = Calendar.getInstance();\n paques.set(year, monthNumber - 1, dayNumber);\n return paques;\n }",
"public Integer getYear() {\r\n return year;\r\n }",
"public Integer getYear() {\r\n return year;\r\n }",
"Integer getTHunYear();",
"public int getYear() {\n\t return year;\n\t}",
"public int getYear() {\n\t\treturn this.year;\n\t}",
"public int getYear() {\n\t\treturn year;\n\t}",
"public int getYear() {\n\t\treturn year;\n\t}",
"public int getYear() {\n\t\treturn year;\n\t}",
"public int getYear () {\n return year;\n }",
"public int getStartYear()\n {\n return indicators[0].getYear();\n }",
"public int absoluteNumberOfDays() {\n\t\tint thisYear, priorYears;\n\t\t\n\t\tthisYear = (month - 1) * 31 + day;\n\t\t if (month > 2) {\n\t\t\t thisYear = thisYear - ((4*month+23) / 10);\n\t\t if ((((year % 4) == 0) && ((year % 100) != 0)) || ((year % 400) == 0))\n\t\t\t thisYear = thisYear + 1;\n\t\t }\n\t\t priorYears = 365*(year-1)+(year-1)/4-(year-1)/100+(year-1)/400;\n\t\t return thisYear + priorYears;\n\t}",
"public int getDocumentYear();",
"public int getAuthorBirthYear(){\r\n return author.getBirthYear();\r\n }",
"public String endYear() throws IOException {\r\n File file = new File(\"evidence.ods\");\r\n SpreadSheet spreadSheet = SpreadSheet.createFromFile(file);\r\n int year = actualYear();\r\n if (!checkIfYearExist(spreadSheet, year)) {\r\n return \"NOTSTARTED\";\r\n }\r\n \r\n Sheet sheet = spreadSheet.getSheet(String.valueOf(year));\r\n \r\n BigDecimal income = (BigDecimal) sheet.getCellAt(\"B1\").getValue();\r\n BigDecimal expense = (BigDecimal) sheet.getCellAt(\"B2\").getValue();\r\n BigDecimal sum = (BigDecimal) sheet.getCellAt(\"B3\").getValue();\r\n\r\n \r\n String string =\"year: \" + year + \"\\nsum of income: \" + income + \"\\nsum of expenses: \" + expense\r\n + \"\\nbilance: \" + sum; \r\n int row = sheet.getRowCount() + 1;\r\n sheet.ensureRowCount(row);\r\n sheet.getCellAt(\"A\" + row).setValue(\"end\");\r\n \r\n saveFile(sheet);\r\n return string;\r\n }",
"public int getYear() { return year; }",
"public int getYear() { return year; }",
"public Integer getYear() {\n return year;\n }",
"public Integer getYear() {\n return year;\n }",
"public Integer getYear() {\n return year;\n }",
"public int getYear()\n\t{\n\t\treturn m_year;\n\t}",
"public int getYear() {\r\n return FormatUtils.uint16ToInt(mYear);\r\n }",
"public int getStartingYear()\n {\n return 2013;\n }",
"public int getLowerYear()\r\n {\r\n return getInt(LowerYear_, 0);\r\n }",
"Integer getTenYear();",
"public void setEyear(Date eyear) {\n this.eyear = eyear;\n }",
"public Object getYearInt() {\n\t\treturn null;\n\t}",
"@Override\n public String getWorkBeginYear() {\n Calendar calendar = Calendar.getInstance();\n if (!work_beginyear.equals(\"\") && work_beginyear != null) {\n return String.valueOf(calendar.get(Calendar.YEAR) - Integer.parseInt(work_beginyear));\n }\n return \"\";\n }",
"static int getYear(byte[] bytes) {\n return readBits(bytes, YEAR_POS, YEAR_BITS) - YEAR_EXCESS;\n }",
"static String dayOfProgrammer(int year) {\n\t\tHashMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n\t\tmap.put(1984, 12);\n\t\tmap.put(1783, 13);\n\t\tmap.put(1800, 12);\n\t\tmap.put(1918, 26);\n\t\tmap.put(2400, 12);\n\t\tmap.put(2000, 12);\n\t\tmap.put(2016, 12);\n\t\tmap.put(2017, 13);\n\t\tmap.put(2700, 13);\n\t\tmap.put(2600, 13);\n\t\tmap.put(2100, 13);\n\n\t\tint div = 4;\n\t\tint hundred = 100;\n\t\tint d = 0;\n\n\t\tSystem.out.println(year % div);\n\t\tSystem.out.println(year % hundred);\n\n\t\tString result = \"\";\n\n\t\tif (year > 1918) {\n\n\t\t\tif (year % div == 0 && year % hundred != 0) {\n\t\t\t\td = 12;\n\t\t\t\tresult = \"12.09.\".concat(new Integer(year).toString());\n\t\t\t} else {\n\t\t\t\td = 13;\n\t\t\t\tresult = \"13.09.\".concat(new Integer(year).toString());\n\t\t\t}\n\t\t} else {\n\n\t\t\tif (year <= 1918 && year % div != 0) {\n\t\t\t\td = 26;\n\t\t\t\tresult = \"26.09.\".concat(new Integer(year).toString());\n\t\t\t} else {\n\n\t\t\t\tif (year % div == 0) {\n\t\t\t\t\td = 12;\n\t\t\t\t\tresult = \"12.09.\".concat(new Integer(year).toString());\n\t\t\t\t} else {\n\t\t\t\t\td = 13;\n\t\t\t\t\tresult = \"13.09.\".concat(new Integer(year).toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (map.get(year) == d) {\n\t\t\tSystem.out.println(\"SUCCESS\");\n\t\t\tSystem.out.println(\"EXPECTED \" + map.get(year) + \" GOT: \" + d);\n\t\t\tSystem.out.println(\"Year: \" + year + \" = \" + result);\n\t\t} else {\n\t\t\tSystem.out.println(\"ERROR\");\n\t\t\tSystem.out.println(\"EXPECTED \" + map.get(year) + \" GOT: \" + d);\n\t\t\tSystem.out.println(\"Year: \" + year + \" = \" + result);\n\t\t}\n\t\treturn result;\n\t}",
"public static int getYearByDate(Date val) {\n\t\tif (val != null) {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy\");\n\t\t\treturn parseInt(format.format(val));\n\t\t} else {\n\n\t\t\treturn 0;\n\n\t\t}\n\t}",
"public abstract String reportLeapYear(int year);",
"public double getYear() {\n return year;\n }",
"public int getYear() {\n\treturn year;\n}",
"public void findEasterDay()\n {\n while(year <= endYear)\n {\n EasterMath(year);\n for(int j = 0; j < 11; j++)\n {\n for(int k = 0; k < 30; k++)\n {\n if(month == j && day == k)\n {\n dates[j][k]++;\n }\n }\n }\n year++;\n }\n }",
"public String getYear() {\n return year.getText();\n }",
"public void EasterMath(int year)\n {\n a = year%19;\n b = Math.floor(year/100);\n c = year%100;\n d = Math.floor((b/4));\n e = b%4;\n f = Math.floor((b+8)/25);\n g = Math.floor((b-f+1)/3);\n h = (19*a+b-d-g+15)%30;\n i = Math.floor(c/4);\n k = c%4;\n l = (32 + 2* e + 2 * i - h - k)%7;\n m = Math.floor((a+11*h+22*l)/451);\n month = (int) Math.floor((h+l-7*m+114)/31);\n day = (int) (((h+l-7*m+114)%31)+1);\n }",
"public int getCalendarYear() {\r\n\t\treturn calendar.getCalendarYear();\r\n\t}",
"public String getYear()\r\n {\r\n return year;\r\n }",
"public int lengthOfYear() {\n\n return this.isLeapYear() ? 366 : 365;\n\n }",
"private String getYear(String date) {\n String year = \"N/A\";\n if (date != null && !date.equals(\"\")) {\n SimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date movieDate = null;\n try {\n movieDate = parser.parse(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Calendar cal = Calendar.getInstance();\n cal.setTime(movieDate);\n year = \"\" + cal.get(Calendar.YEAR);\n }\n return year;\n }",
"private static int getDaysInYear(final int year) {\n return LocalDate.ofYearDay(year, 1).lengthOfYear();\n }",
"public static int getDifferenceDateOnlyYear(Long val) {\n\n Long date_current = Calendar.getInstance().getTimeInMillis();\n Long years_difference = date_current - val;\n\n Calendar c = Calendar.getInstance();\n c.setTimeInMillis(years_difference);\n return c.get(Calendar.YEAR) - 1970;\n\n }",
"public final int getYear() {\n return yearMonthProperty().get().getYear();\n }",
"private String getYear(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tInteger yearAsInt = localDate.getYear();\n\n\t\treturn String.valueOf(yearAsInt);\n\t}",
"public int getYearmade()\n {\n return yearmade;\n }",
"public final int getYYYY()\n {\n return yyyy;\n }",
"public int getCycleYearsForComponent(Record record);",
"public int getDayOfYear() {\n\n return this.get(DAY_OF_YEAR).intValue();\n\n }",
"public String getYear()\n {\n return year;\n }",
"public Integer getFirstYearAttended() {\n return firstYearAttended;\n }"
] | [
"0.6955972",
"0.6601619",
"0.648026",
"0.64592457",
"0.6448192",
"0.64356667",
"0.63486373",
"0.62450004",
"0.623225",
"0.6186267",
"0.61789507",
"0.61093986",
"0.609798",
"0.60654193",
"0.6051711",
"0.60332155",
"0.60042053",
"0.5947552",
"0.59316456",
"0.5899441",
"0.5896306",
"0.58860576",
"0.58505636",
"0.58463776",
"0.58447516",
"0.58283573",
"0.5827375",
"0.5819597",
"0.5819121",
"0.58102065",
"0.58089674",
"0.5797102",
"0.5774733",
"0.576436",
"0.5763154",
"0.5761601",
"0.5761164",
"0.57491845",
"0.5748773",
"0.5748389",
"0.57478106",
"0.5746266",
"0.5744818",
"0.57402545",
"0.57341677",
"0.57311815",
"0.57297367",
"0.5720028",
"0.5718451",
"0.57105535",
"0.5709515",
"0.5709515",
"0.57014155",
"0.5696383",
"0.5695199",
"0.56907904",
"0.56907904",
"0.56907904",
"0.5686389",
"0.568478",
"0.5672948",
"0.56691426",
"0.56683403",
"0.566778",
"0.5667154",
"0.5667154",
"0.5664437",
"0.5664437",
"0.5664437",
"0.565742",
"0.5642378",
"0.5640647",
"0.5640144",
"0.56380343",
"0.5633874",
"0.56210995",
"0.56196284",
"0.55772036",
"0.55714047",
"0.55705386",
"0.5567962",
"0.5560356",
"0.5559246",
"0.5554316",
"0.5546395",
"0.55408335",
"0.5540788",
"0.55224156",
"0.5512828",
"0.5494927",
"0.5489269",
"0.5481261",
"0.54801315",
"0.5476774",
"0.5473685",
"0.54644346",
"0.5464021",
"0.5458146",
"0.5452162",
"0.54499185"
] | 0.7275158 | 0 |
/ There's not a record for the employee, for this year so create one. | private AbsentYear createAbsentYear(Employee emp, LocalDate startDate) {
AbsentYear absentYear = new AbsentYear();
absentYear.setEmployee(emp);
absentYear.setYear((short)startDate.getYear());
absYearRepo.save(absentYear);
return absentYear;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createEmployee(Employee newEmployee) {\n\t\tif(false == this.employee.contains(newEmployee)) {\n\t\t\tthis.employee.add(newEmployee);\n\t\t}\n\t}",
"@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}",
"public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}",
"private void updateRecord() {\r\n int empId = -1;\r\n boolean hasError = false;\r\n try {\r\n empId = Integer.parseInt(employeeYearsOfWorkJTextField.getText());\r\n } catch (NumberFormatException e) {\r\n hasError = true;\r\n JOptionPane.showMessageDialog(this, \"Employee id must be integer\");\r\n }\r\n String telephone = employeeNumberJTextField.getText();\r\n String name = employeeNameJTextField.getText();\r\n int years = -1;\r\n try {\r\n years = Integer.parseInt(employeeYearsOfWorkJTextField.getText());\r\n } catch (NumberFormatException e) {\r\n hasError = true;\r\n JOptionPane.showMessageDialog(this, \"Years of works must be an integer\");\r\n }\r\n if (!hasError) {\r\n records.add(new Record(empId, telephone, name, years));\r\n }\r\n }",
"public void create(Employee employee, Company company, IncomingReport incoming_report) throws IllegalArgumentException, DAOException;",
"int insert(TCpyYearCheck record);",
"@Override\n public Employee addNewEmployee(Employee employee) {\n return null;\n }",
"@Override\n\tpublic Employee createEmployee(Employee employee) {\n\t\tSession sess = sessionFactory.openSession();\n\t\tTransaction tx = sess.beginTransaction();\n\t\tsess.save(employee);\n\t\ttx.commit();\n\t\tsess.close();\n\n\t\treturn employee;\n\t}",
"public boolean addEmp(Employee e) {\n\t\treturn edao.create(e);\n\t\t\n\t}",
"private AbsentYear findAbsentYear(Employee emp, LocalDate startDate) {\n\t\tAbsentYear absentYear = absYearRepo.findByEmployeeAndYear(emp, (short)startDate.getYear());\n\t\tif(absentYear == null) {\n\t\t\tabsentYear = createAbsentYear(emp, startDate);\n\t\t}\n\t\treturn absentYear;\n\t}",
"Year createYear();",
"public Employee() {\n employeeID = genID.incrementAndGet();\n }",
"public andrewNamespace.xsdconfig.EmployeeDocument.Employee addNewEmployee()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().add_element_user(EMPLOYEE$0);\r\n return target;\r\n }\r\n }",
"int insertSelective(TCpyYearCheck record);",
"public Employee createNewEmployee(String name) {\n Employee newEmployee = new Employee(DumbDB.employeeCounter++, name, NO_DEPARTMENT_ID);\n getAllEmployees().add(newEmployee);\n return newEmployee;\n }",
"public boolean createEmployeeInfo(Employee employee) {\n\t\treturn dao.createEmployeeInfo(employee);\n\t}",
"public Employee createOne(Employee employee) {\n return employeeRepository.save(employee);\n }",
"@Override\r\n\tpublic int insertEmployee(Employee employee) {\n\t\treturn employeedao.insertEmployee(employee);\r\n\t}",
"@Test\r\n\tpublic void addEmployeeTestCase3() {\n\t\tEmployee employee3 = new Employee();\r\n\t\temployee3.name = \"Lingtan\";\r\n\t\temployee3.role = \"Ui designer\";\r\n\t\temployee3.email = \"lingtan@chainsys.com\";\r\n\t\temployee3.employeeID = \"Ling2655\";\r\n\t\temployee3.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee3.gender = \"Male\";\r\n\t\temployee3.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee3.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tEmployeeOperations.addEmployee(employee3);\t\r\n\t}",
"public EmployeeRecord(){}",
"@Override\n\tpublic Integer insertEmp(Employee e) {\n\t\treturn null;\n\t}",
"int insert(Employee record);",
"public SalesEmployee(){\n\t\tfirstName = \"unassigned\";\n\t\tlastName = \"unassigned\";\n\t\tppsNumber = \"unassigned\";\n\t\tbikeEmployeeNumber++;\n\t}",
"private boolean createEmployeeAvailability(String name) {\n int empID;\n empID = findEmployee(name);\n\n String employeeAvailablitySQL = \"INSERT INTO empAvailability(empID, availability) values(\" +\n \"'\" + empID + \"'\" + \",\" +\n \"'000,000,000,000,000,000,000')\";\n return (database.updateDatabase(employeeAvailablitySQL));\n }",
"@Override\n\tpublic int create(Semester sem) {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic int addEmployee(Employee employee) {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\t}",
"public int createEmployee(Employee emp) {\n\tStudentDAO studentDAO=new StudentDAO();\n\treturn studentDAO. createEmployee(emp);\n}",
"@Override\n public ResponseEntity createEmployee(@Valid Employee employeeRequest) {\n Employee savedemployee = employeeService.create(employeeRequest);\n URI location= ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\").buildAndExpand(savedemployee.getId()).toUri();\n return ResponseEntity.created(location).build();\n\n }",
"int insertSelective(Employee record);",
"int insert(ProEmployee record);",
"int insertSelective(ProEmployee record);",
"@Override\n\tpublic Employee createEmployee() {\n\t\treturn new Manager(name, age);\n\t}",
"@Test\r\n\tpublic void addEmployeeTestCase2() {\n\t\tEmployee employee2 = new Employee();\r\n\t\temployee2.name = \"JD\";\r\n\t\temployee2.role = \"Technical Consultant\";\r\n\t\temployee2.email = \"jd@chainsys.com\";\r\n\t\temployee2.employeeID = \"Jd2655\";\r\n\t\temployee2.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee2.gender = \"Male\";\r\n\t\temployee2.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee2.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tEmployeeOperations.addEmployee(employee2);\r\n\t}",
"private static void newEmployee(UserType employeeType) {\n\n\t\tString username = null, password;\n\n\t\tboolean valid = false;\n\n\t\t// make sure that the username is not already taken\n\t\twhile (!valid) {\n\t\t\tSystem.out.print(\"What username would you like for your account? \");\n\t\t\tusername = input.nextLine();\n\t\t\tif (nameIsTaken(username, customerList)) {\n\t\t\t\tSystem.out.println(\"Sorry but that username has already been taken.\");\n\t\t\t} else\n\t\t\t\tvalid = true;\n\t\t}\n\t\t// set valid to false after each entry\n\t\tvalid = false;\n\n\t\tSystem.out.print(\"What password would you like for your account? \");\n\t\tpassword = input.nextLine();\n\n\t\tEmployee e = new Employee(username, password);\n\n\t\te.setType(employeeType);\n\t\temployeeList.add(e);\n\t\tcurrentUser = e;\n\t\twriteObject(employeeFile, employeeList);\n\t\temployeeDao.create(e);\n\t}",
"public andrewNamespace.xsdconfig.EmployeeDocument.Employee insertNewEmployee(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee target = null;\r\n target = (andrewNamespace.xsdconfig.EmployeeDocument.Employee)get_store().insert_element_user(EMPLOYEE$0, i);\r\n return target;\r\n }\r\n }",
"@Override\r\n\tpublic int addEmployee1(Employee employee) throws SQLException {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\t\treturn added;\r\n\t}",
"public static void addEmployee(Employee employee) {\n try {\n if (employeeRepository.insert(dataSource, employee) == 1) {\n LOGGER.warn(\"The employee \" + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" is already in the list\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"in-list\") + \"\\n\");\n } else {\n LOGGER.info(\"The employee \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" was successfully added to the list of employees\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + \" \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"success.add\") + \"\\n\");\n }\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n }",
"public boolean addReport(SoftwareEngineer e){\n if(this.curHeadCount < this.maxHeadCount){\n employee[this.curHeadCount] = e;\n this.curHeadCount++;\n return true;\n }\n else\n return false;\n }",
"@Test\n public void createEmployeeCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n assertFalse(employeeResource.createEmployee(new Employee(\"notdummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 1)));\n\n //removing test data after tests to avoid clutter in database\n employeeDAO.removeEmployee(\"dummy\");\n userDAO.removeUser(\"dummy\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy\"));\n }",
"public Diploma createDiploma(final String name, final String yearOfResult) {\n\t\tif (this.diplomaRepository.findByNameAndYearOfResult(name, yearOfResult).isPresent()) {\n\t\t\tthrow new ConflictException();\n\t\t}\n\t\tDiploma newDiploma = new Diploma();\n\t\tnewDiploma.setName(name);\n\t\tnewDiploma.setYearOfResult(yearOfResult);\n\t\ttry {\n\t\t\tnewDiploma = this.diplomaRepository.save(newDiploma);\n\t\t} catch (final DuplicateKeyException dke) {\n\t\t\tthrow new ConflictException();\n\t\t} catch (final Exception e) {\n\t\t\tLoggerFactory.getLogger(DiplomaEntityController.class).info(e.getStackTrace().toString());\n\t\t\tthrow new InternalServerErrorException();\n\t\t}\n\t\treturn newDiploma;\n\t}",
"private boolean employeeDoesNotHaveAnAbsentRecordForThisYear(AbsentYear absYear, int empId) {\n\t\tList<EmployeeAbsent> empAbs = empAbsentRepo.findEmployeeAbsentRecordsForYear(absYear.getYear(), empId);\n\t\treturn (empAbs.isEmpty()) ? true : false;\n\t}",
"private void saveEmployee(Employee employee) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_KEY, employee.getKey());\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_VALUE, employee.getValue());\n\n getContext().getContentResolver().insert(\n ReportContract.EmployeeEntry.CONTENT_URI,\n contentValues\n );\n\n }",
"public Employee(int empID, String firstName, String lastName, int ssNum,\n Date hireDate, double salary) {\n if (Employee.setOfIDs.contains(empID) || !Employee.isPositive(empID)) {\n this.empID = Employee.generateID();\n } else {\n this.empID = empID;\n }\n Employee.sortType = SortType.SORT_BY_ID;\n Employee.setOfIDs.add(this.empID);\n this.firstName = firstName;\n this.lastName = lastName;\n this.ssNum = ssNum;\n this.hireDate = hireDate;\n this.salary = salary;\n }",
"public EmployeeDTO createEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;",
"@Override\r\n\tpublic Employee addEmployeeData(Employee emp) {\n\t\treturn employeeDAO.addEmployee(emp);\r\n\t}",
"public abstract ExternalRecord createExternalRecord()\r\n\t\t\tthrows Exception;",
"@Test\n public void getEmployeesForDate(){\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n //creating dummy employee\n employeeDAO.createEmployee(new Employee(\"dummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 1));\n\n assertNotNull(employeeResource.getEMployeesForDate(\"2017-01-01\"));\n\n //clean up\n employeeDAO.removeEmployee(\"dummy\");\n userDAO.removeUser(\"dummy\");\n }",
"@PostMapping(\"/school-years\")\n @Timed\n public ResponseEntity<SchoolYearDTO> createSchoolYear(@Valid @RequestBody SchoolYearDTO schoolYearDTO) throws URISyntaxException {\n log.debug(\"REST request to save SchoolYear : {}\", schoolYearDTO);\n if (schoolYearDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new schoolYear cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n SchoolYearDTO result = schoolYearService.save(schoolYearDTO);\n return ResponseEntity.created(new URI(\"/api/school-years/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@Override\r\n\tpublic int insertEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}",
"public boolean createPersonalDetails(Integer staffID, String surname, String name, Date dob, String address, String town, String county,\n String postCode, String telNo, String mobileNo, String emergencyContact, String emergencyContactNo){\n\n\n hrDB.addPDRecord(staffID, surname, name, dob, address, town, county,\n postCode, telNo, mobileNo, emergencyContact, emergencyContactNo);\n return true;\n\n\n }",
"@POST\n @Consumes( { \"application/xml\", \"text/xml\", \"application/json\" })\n public Response createEmployee(Employee employee) {\n final int staffNo = this.employeeMgr.createEmployee(employee);\n final URI location = createdLocation(staffNo);\n return Response.created(location).build();\n }",
"int insert(Emp record);",
"@Override\n\tpublic int saveEmployee() {\n\t\tEmployeeDao dao= new EmployeeDao();\n\t\tint result=dao.saveEmployee(new Employee(101349, \"Deevanshu\", 50000));\n\t\treturn result;\n\t}",
"public Employee hireEmployee(int GasStationID, String Name, String SSN, Double salary, String department, EmployeePosition employeePosition, Date startDate) throws SQLException {\n Employee newHire = new Employee(GasStationID, Name, SSN, salary, department, employeePosition, startDate);\n newHire.create();\n return newHire;\n }",
"public void newRecord() {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tdateTxt.setText(dateFormat.format(new Date()));\n\t\t//mark all students enrolled as attendant\n\t\tif (courseTable.getSelectedRow() != -1) {\n\t\t\tsetWarningMsg(\"\");\n\t\t\tupdateStudent(currentCourse);\n\t\t\tfor (int i = 0; i < studentTable.getRowCount(); i++) {\n\t\t\t\tstudentTable.setValueAt(new Boolean(true), i, 0);\n\t\t\t}\t\t\t\n\t\t}\n\t\telse {\n\t\t\t//show message: choose course first\n\t\t\tsetWarningMsg(\"please select course first\");\n\t\t}\n\t}",
"int insert(NeeqCompanyAccountingFirmOnline record);",
"@Override\n\tpublic int addNewEmployee(String firstName, String lastName, String email, String designation, String location,\n\t\t\tint salary) {\n\t\treturn template.update(\n\t\t\t\t\"insert into employee(fname, lname, email, desig, location, salary) values(?, ?, ?, ?, ?, ?)\",\n\t\t\t\tfirstName, lastName, email, designation, location, salary);\n\t}",
"public EmployerRecord() {\n super(Employer.EMPLOYER);\n }",
"@Test\n\tpublic void testCreatePastCarYear() {\n\t\tCarFactory _carFactory = new CarFactory();\n\n\t\tCarType _carType = CarType.valueOf((\"coupe\".toUpperCase()));\n\t\tString _make = \"BMW\";\n\t\tString _model = \"Z4\";\n\t\tString _color = \"black\";\n\t\tint _year = 1800;\n\n\t\t// ---------------------------------------------\n\t\t// Creating past year.\n\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tAbstractCar _unknown = _carFactory.buildCar(_carType, _make, _model, _color, _year);\n\t\t\tfail(\"Successfully created an invalid car (should not work).\");\n\t\t} catch (Exception expected_) {\n\n\t\t}\n\t}",
"int insertSelective(CalendarDate record);",
"@Test\r\n\tpublic void addEmployeeTestCase5() {\n\t\tEmployee employee5 = new Employee();\r\n\t\temployee5.name = \"JosephKuruvila\";\r\n\t\temployee5.role = \"Software Developer\";\r\n\t\temployee5.employeeID = \"Jose2455\";\r\n\t\temployee5.email = \"joseph@chainsys.com\";\r\n\t\temployee5.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee5.gender = \"Male\";\r\n\t\temployee5.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee5.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tboolean isAddedEmployee = EmployeeOperations.addEmployee(employee5);\r\n\t\tassertTrue(isAddedEmployee);\r\n\t}",
"@Test\r\n\tpublic void addEmployeeTestCase1() {\n\t\tEmployee employee1 = new Employee();\r\n\t\temployee1.name = \"JosephKuruvila\";\r\n\t\temployee1.role = \"Software Developer\";\r\n\t\temployee1.employeeID = \"Jose2455\";\r\n\t\temployee1.email = \"joseph@chainsys.com\";\r\n\t\temployee1.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee1.gender = \"Male\";\r\n\t\temployee1.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee1.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tboolean isAddedEmployee = EmployeeOperations.addEmployee(employee1);\r\n\t\tassertTrue(isAddedEmployee);\r\n\t}",
"public void addEmployee(EmployeeInfo theEmployee) {\n int targetBucket = calcBucket(theEmployee.getEmployeeNum());\n buckets[targetBucket].add(theEmployee);\n numInTable++;\n }",
"public Large_Employee(int employeeID,\n String hireDate,\n String arrivalDate,\n String departureDate,\n String pay_rate,\n String still_active) {\n this.employeeID = employeeID;\n this.hireDate = hireDate;\n this.pay_rate = pay_rate;\n this.still_active = still_active;\n this.arrivalDate = arrivalDate;\n this.departureDate = departureDate;\n }",
"@Override\n\tprotected Employee factoryMethod() {\n\t\treturn new Developer();\n\t}",
"public EmployeeRecord(String newLastName, String newFirstName, char newType)\n {\n if ((Character.toLowerCase(newType) != 'h' && Character.toLowerCase(newType) != 'p' && Character.toLowerCase(newType) != 's') || !newLastName.matches(\"[a-zA-Z]+\") || !newFirstName.matches(\"[a-zA-Z]+\")) return;\n else \n {\n this.lastName = newLastName;\n this.firstName = newFirstName;\n this.type = newType;\n this.grossPay = this.taxAmt = this.netPay = 0.00;\n }\n }",
"@Override\n\tpublic EmploieType creer(EmploieType entity) throws InvalideTogetException {\n\t\treturn emploieTypeRepository.save(entity);\n\t}",
"@Test\r\n public void testCreate() {\r\n ActivityRecord record = setActivityRecord();\r\n recordDao.create(record);\r\n assertNotNull(record.getId());\r\n }",
"@Override\n\tpublic void save(Employee theEmployee) {\n\t\t\n\t}",
"@Override\n\tpublic Employee create(Employee emp) {\n\t\tlog.debug(\"Welcome to logging\");\n\t\tSystem.out.println(\"Server logs \");\n\t\temployeeDAO.create(emp);\n\t\treturn null;\n\t}",
"public void registhourly_employee(Hourly_employee form) throws UserException, ClassNotFoundException, InstantiationException, IllegalAccessException{\n\t\tHourly_employee hrs = hourly_employeeDao.findByHourly_ssn(form.gethourly_ssn());\r\n\t\tString hrsID = hrs.gethourly_ssn();\r\n\t\tString formID = form.gethourly_ssn();\r\n\t\t\r\n\t\tif(hrsID == formID)\r\n\t\t\tthrow new UserException(\"This Employee ID has already been in your Database!\");\r\n\t\t\r\n\t\thourly_employeeDao.add(form);\r\n\t}",
"@PostMapping(\"/employees\")\n\tpublic Employee addEmployee(@RequestBody Employee theEmployee) {\n\t\t theEmployee.setId(0);\n\t\t employeeService.save(theEmployee);\n\t\t \n\t return theEmployee;\n\t}",
"public TimeInformation createEmployeeTimeInformation(TimeInformation entity) {\r\n\t\tOptional<TimeInformation> employeeTime = repository.findById(entity.getEmployee_ID_Number());\r\n\r\n\t\tif(employeeTime.isPresent()) {\r\n\t\t\treturn this.updateEmployeeTimeInformation( entity);\r\n\t\t} else {\r\n\t\t\tentity = repository.save(entity);\r\n\t\t\treturn entity;\r\n\t\t}\r\n\t}",
"@Override\n public Employee process(Employee employee) throws Exception {\n try {\n if (employee.getId() % 13 == 0) {\n throw new Exception(\"unable to create account for employee with id \" + employee.getId());\n }\n employee.setUserId(\"userId\" + employee.getId());\n } catch (Exception e) {\n // otherwise the job halts!\n LOG.error(\"error \", e);\n }\n return employee;\n }",
"private void generateNewEmploymentPeriod(EmploymentPeriod newEP, EmploymentPeriod oldEP) {\r\n EmploymentPeriod epToPersist = new EmploymentPeriod();\r\n epToPersist.setActive(true);\r\n epToPersist.setDailyWorkingHours(newEP.getDailyWorkingHours());\r\n epToPersist.setEmploymentLevelPercent(newEP.getEmploymentLevelPercent());\r\n epToPersist.setMaxOvertime(newEP.getMaxOvertime());\r\n epToPersist.setYearlyVacationDays(newEP.getYearlyVacationDays());\r\n\r\n epToPersist.setEmployee(oldEP.getEmployee());\r\n epToPersist.setValidFrom(Calendar.getInstance().getTime());\r\n\r\n EmploymentPeriodPersistence mepp = new EmploymentPeriodPersistence();\r\n mepp.persistEmploymentPeriod(epToPersist);\r\n }",
"public EmployerRecord(Integer id, Integer personId, String name, Date startDate, Date endDate) {\n super(Employer.EMPLOYER);\n\n set(0, id);\n set(1, personId);\n set(2, name);\n set(3, startDate);\n set(4, endDate);\n }",
"@PostMapping(\"/addEmployee\")\n\tpublic ResponseEntity<EmployeeMon> createEmployee(@RequestBody EmployeeMon employee)\n\t{\n\t\ttry {\n\t\t\tEmployeeMon stud = repository.save(\n\t\t\t\t\tnew EmployeeMon(employee.getId(),employee.getName(),employee.getAddress(), employee.getEmail(),\n\t\t\t\t\t\t\temployee.getSalary()));\n\t\t\tLOGGER.info(\"Inserted data into Table\");\n\t\t\treturn new ResponseEntity<>(stud, HttpStatus.CREATED);\n\t\t} catch(Exception e) {\n\t\t\treturn new ResponseEntity<>(null, HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}",
"Employee(int id, String name, String birthDate, int eage, double esalary){\r\n ID=id; \r\n NAME=name; \r\n BIRTHDATE=birthDate; \r\n age=eage; \r\n salary=esalary; \r\n }",
"@Override\n\tpublic void add(Employee employee) {\n\t\temployeeDao.save(employee);\t\t\n\t}",
"RentalAgency createRentalAgency();",
"int insertSelective(Emp record);",
"@PostMapping(\"/save\")\n\tpublic ResponseEntity<String> createEmployee(@RequestBody Employee employee) {\n\t\tInteger id = service.saveEmployee(employee);\n\t\tString message = \"Employee '\" + id + \"' Created!\";\n\t\treturn new ResponseEntity<String>(message, HttpStatus.CREATED); // 201\n\t}",
"public PayrollRecord(String employee, double pay) {\n employeeName = employee;\n currentPay = pay;\n }",
"@Override\r\n\tpublic int insertSelective(Emp record) {\n\t\treturn 0;\r\n\t}",
"private Employee addEmployee(int id, String name, String address) {\r\n\t\treturn new Employee(id, name, address);\r\n\t}",
"public static com.hrms.model.EmployeeProof create(long employeeproofNo) {\n\t\treturn getPersistence().create(employeeproofNo);\n\t}",
"public Employee saveNewEmployee(EmployeeDto newEmpDto) {\n\t\tEmployee newEmp = null;\n\t\tDepartment d = deptRepo.findByDeptName(newEmpDto.getDeptName());\n\t\tRoleAndSeniority ras = rasRepo.findRoleAndSeniority(newEmpDto.getRoleName(), newEmpDto.getSeniority());\n\t\t\n\t\tif(employeeDataIsOk(ras, newEmpDto)) {\n\t\t\tnewEmp = GenericBuilder.of(Employee::new)\n\t\t\t\t\t.with(Employee::setDepartment, d)\n\t\t\t\t\t.with(Employee::setRas, ras)\n\t\t\t\t\t.with(Employee::setFirstName, newEmpDto.getFirstName())\n\t\t\t\t\t.with(Employee::setLastName, newEmpDto.getLastName())\n\t\t\t\t\t.with(Employee::setDob, newEmpDto.getDob())\n\t\t\t\t\t.with(Employee::setHireDate, newEmpDto.getHireDate())\n\t\t\t\t\t.with(Employee::setSalary, newEmpDto.getSalary())\n\t\t\t\t\t.with(Employee::setSsn, newEmpDto.getSsn())\n\t\t\t\t\t.with(Employee::setAnnualLeave, ras.getSeniority().getHolidayEntitlement())\n\t\t\t\t\t.build();\n\t\t\tem.persist(newEmp);\n\t\t}\t\t\n\t\treturn newEmp;\n\t}",
"public String addEmployee(EmployeeDetails employeeDetails) throws NullPointerException;",
"@PostMapping(\"/employees\")\n public Mono<ResponseEntity> addEmployee(@Valid @RequestBody Employee theEmployee) {\n theEmployee.setId(0);\n\n return this.employeeService.save(theEmployee).map(employee -> new ResponseEntity<>(new DataResponse<>(HttpStatus.CREATED.value(), \"Employee added successfully\", employee), HttpStatus.CREATED));\n }",
"public String insertSelective(Emp record) {\n BEGIN();\n INSERT_INTO(\"emp\");\n \n if (record.getId() != null) {\n VALUES(\"id\", \"#{id,jdbcType=INTEGER}\");\n }\n \n if (record.getName() != null) {\n VALUES(\"name\", \"#{name,jdbcType=VARCHAR}\");\n }\n \n if (record.getSex() != null) {\n VALUES(\"sex\", \"#{sex,jdbcType=CHAR}\");\n }\n \n if (record.getJob() != null) {\n VALUES(\"job\", \"#{job,jdbcType=VARCHAR}\");\n }\n \n if (record.getSalary() != null) {\n VALUES(\"salary\", \"#{salary,jdbcType=DECIMAL}\");\n }\n \n if (record.getHiredate() != null) {\n VALUES(\"hiredate\", \"#{hiredate,jdbcType=DATE}\");\n }\n \n if (record.getDeptno() != null) {\n VALUES(\"deptno\", \"#{deptno,jdbcType=INTEGER}\");\n }\n \n return SQL();\n }",
"int insert(FinancialManagement record);",
"public static void createEmployees() {\n Connection con = getConnection();\n\n String createString;\n createString = \"create table Employees (\" +\n \"Employee_ID INTEGER, \" +\n \"Name VARCHAR(30))\";\n try {\n stmt = con.createStatement();\n stmt.executeUpdate(createString);\n stmt.close();\n con.close();\n\n } catch (SQLException ex) {\n System.err.println(\"SQLException: \" + ex.getMessage());\n }\n JOptionPane.showMessageDialog(null, \"Employees Table Created\");\n }",
"public String startYear(int year) throws IOException {\r\n File file = new File(\"evidence.ods\");\r\n SpreadSheet spreadSheet = SpreadSheet.createFromFile(file);\r\n \r\n if (checkIfYearExist(spreadSheet, year)) {\r\n System.err.println(\"Evidence for year: \" + year + \" already started\");\r\n return \"STARTED\";\r\n }\r\n if(checkIfYearContinue(spreadSheet.getSheet(spreadSheet.getSheetCount()-1))){\r\n return \"PREVIOUS\";\r\n }\r\n \r\n Sheet newSheet = spreadSheet.addSheet(year + \"\");\r\n addHeading(newSheet);\r\n saveFile(newSheet);\r\n createXmlYear(year);\r\n return \"OK\";\r\n }",
"@Override\n\tpublic EmployeeComplaint create(long employeeComplaintId) {\n\t\tEmployeeComplaint employeeComplaint = new EmployeeComplaintImpl();\n\n\t\temployeeComplaint.setNew(true);\n\t\temployeeComplaint.setPrimaryKey(employeeComplaintId);\n\n\t\treturn employeeComplaint;\n\t}",
"@Override\n public void seedData() throws EmployeeCreationException, DepartmentCreationException {\n\n }",
"@Test\r\n\tpublic void testAddObstetricsRecord() {\r\n\t\t\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.add(Calendar.MONTH, -1);\r\n\t\tString lmp = dateFormat.format(c.getTime());\t\r\n\t\t\r\n\t\toic.setLmp(lmp);\r\n\t\t\r\n\t\toic.setMultiplicity(\"1\");\r\n\t\tAssert.assertTrue(oic.getMultiplicity().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setWeightGain(\"1\");\r\n\t\tAssert.assertTrue(oic.getWeightGain().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setNumHoursInLabor(\"1\");\r\n\t\tAssert.assertTrue(oic.getNumHoursInLabor().equals(\"1\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setNumWeeksPregnant(\"39\");\r\n\t\tAssert.assertTrue(oic.getNumWeeksPregnant().equals(\"39\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setYearOfConception(\"2005\");\r\n\t\tAssert.assertTrue(oic.getYearOfConception().equals(\"2005\"));\r\n\t\toic.addObstetricsRecord();\r\n\t\t//LMP wasn't cleared, therefore it errored\r\n\t\tAssert.assertTrue(oic.getLmp().equals(lmp));\r\n\t\t\r\n\t\toic.setDeliveryType(\"Vaginal Delivery\");\t\t\r\n\t\toic.addPregnancyRecord();\r\n\t\t\r\n\t\toic.setYearOfConception(null);\r\n\t\toic.setNumWeeksPregnant(null);\r\n\t\toic.setNumHoursInLabor(null);\r\n\t\toic.setWeightGain(null);\r\n\t\toic.setMultiplicity(null);\r\n\t\toic.setLmp(\"\");\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"\"));\r\n\t\t\r\n\t\toic.setLmp(null);\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp() == null);\r\n\t\t\r\n\t\toic.setLmp(\"a\");\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"a\"));\r\n\t\t\r\n\t\toic.setLmp(lmp);\r\n\t\toic.addObstetricsRecord();\r\n\t\tAssert.assertTrue(oic.getLmp().equals(\"\"));\r\n\t}",
"private void addEmployeeInfo(Section catPart) throws SQLException, IOException{\r\n PdfPTable employee = new PdfPTable(1);\r\n \r\n Paragraph empId = new Paragraph(\"Medarbejdernummer: \"+model.getTimeSheet(0).getEmployeeId());\r\n PdfPCell empIdCell = new PdfPCell(empId);\r\n empIdCell.setBorderColor(BaseColor.WHITE);\r\n String name = fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getFirstName() +\" \"+ fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getLastName();\r\n Paragraph empName = new Paragraph(\"Navn: \" + name);\r\n PdfPCell empNameCell = new PdfPCell(empName);\r\n empNameCell.setBorderColor(BaseColor.WHITE);\r\n \r\n employee.setHeaderRows(0);\r\n employee.addCell(empIdCell);\r\n employee.addCell(empNameCell);\r\n employee.setWidthPercentage(80.0f);\r\n \r\n catPart.add(employee);\r\n }",
"public EmployeeAbsent recordEmployeeAbsent(Employee emp, LocalDate startDate, LocalDate endDate, String reason) {\n\t\tEmployeeAbsent empAbs = null;\n\t\tAbsentYear absYear = findAbsentYear(emp, startDate);\n\t\tlong numDays = calculateNumberOfDaysAbsentInclusive(startDate, endDate);\n\t\tif(numDays > 0 ) {\n\t\t\tif(checksForAnnualLeaveAreOk(reason, absYear, numDays, emp.getEmpId())) {\n\t\t\t\tempAbs = GenericBuilder.of(EmployeeAbsent::new)\n\t\t\t\t\t\t.with(EmployeeAbsent::setAbsentStartDate, startDate)\n\t\t\t\t\t\t.with(EmployeeAbsent::setAbsentEndDate, endDate)\n\t\t\t\t\t\t.with(EmployeeAbsent::setAbsentYear, absYear)\n\t\t\t\t\t\t.with(EmployeeAbsent::setNumDays, numDays)\n\t\t\t\t\t\t.with(EmployeeAbsent::setReason, reason)\n\t\t\t\t\t\t.build();\n\t\t\t\tem.persist(empAbs);\n\t\t\t}\n\t\t}\n\t\treturn empAbs;\n\t}",
"public Employee(int emp_no, Date birth_date, String first_name, String last_name, String gender, Date hire_date) {\n this.emp_no = emp_no;\n this.birth_date = birth_date;\n this.first_name = first_name;\n this.last_name = last_name;\n this.gender = gender.equals(\"M\")?Gender.M:Gender.F;\n this.hire_date = hire_date;\n }",
"int insertSelective(NeeqCompanyAccountingFirmOnline record);"
] | [
"0.64258236",
"0.62532836",
"0.60133016",
"0.5993771",
"0.5980154",
"0.59607375",
"0.58467764",
"0.58455145",
"0.58429474",
"0.5830485",
"0.5829694",
"0.57945186",
"0.576561",
"0.57488227",
"0.5723109",
"0.5719238",
"0.5703909",
"0.5695705",
"0.568018",
"0.564806",
"0.5602308",
"0.5589583",
"0.5585038",
"0.5576562",
"0.55496156",
"0.5542893",
"0.5528616",
"0.55275637",
"0.550541",
"0.5503096",
"0.5491103",
"0.5483761",
"0.5465351",
"0.5455918",
"0.5444634",
"0.5438839",
"0.54325885",
"0.54312205",
"0.5426087",
"0.5406314",
"0.5403406",
"0.53945357",
"0.5381111",
"0.5375805",
"0.53704333",
"0.5361214",
"0.53491735",
"0.53346074",
"0.5324614",
"0.53210163",
"0.5317414",
"0.52859056",
"0.52793294",
"0.52700424",
"0.52607286",
"0.52532756",
"0.52511454",
"0.52295744",
"0.5222396",
"0.5221942",
"0.5220552",
"0.5218689",
"0.52148837",
"0.52129626",
"0.52101004",
"0.52081674",
"0.5207277",
"0.5203443",
"0.5201731",
"0.52008283",
"0.5199473",
"0.51956165",
"0.5192846",
"0.5189742",
"0.5182952",
"0.51820505",
"0.51800555",
"0.51768297",
"0.5168683",
"0.5163585",
"0.5162633",
"0.5161388",
"0.5161026",
"0.5159752",
"0.5148443",
"0.51454955",
"0.51376003",
"0.5137232",
"0.51370287",
"0.5133039",
"0.5132222",
"0.5131347",
"0.5130512",
"0.51288134",
"0.51271427",
"0.51246804",
"0.51214707",
"0.51203924",
"0.51192385",
"0.5113087"
] | 0.7186221 | 0 |
/ Calculates the number of business days between 2 dates (inclusive). Doesn't work for public holidays. | public long calculateNumberOfDaysAbsentInclusive(LocalDate startDate, LocalDate endDate) {
long businessDays = 0;
long numDaysBetween = ChronoUnit.DAYS.between(startDate, endDate);
if(numDaysBetween > 0) {
businessDays = IntStream.iterate(0, i -> i + 1).limit(numDaysBetween).mapToObj(startDate::plusDays)
.filter(d -> Stream.of(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY)
.anyMatch(d.getDayOfWeek()::equals)).count() + 1;
}
return businessDays;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test \n\tpublic void testDaysBetween2() {\n\t\tDaysBetween d = new DaysBetween();\n\t\tLocalDate currentDate = LocalDate.now();\n\t\tLocalDate eventDate = LocalDate.of(2020, Month.OCTOBER, 20);\n\t\tlong days = d.CountDaysBetween(currentDate, eventDate);\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic Integer getDateDiffWorkingDays(Date dateFrom, Date dateTo) {\n\t\tString sql = dateFrom.after(dateTo)\n\t\t\t\t? \"select count(*) * -1 from calendar where id_date >= :dateTo and id_date < :dateFrom and holiday = 0\"\n\t\t\t\t\t\t: \"select count(*) from calendar where id_date > :dateFrom and id_date <= :dateTo and holiday = 0\";\n\t\tQuery query = entityManager.createNativeQuery(sql);\n\t\tquery.setParameter(\"dateFrom\", dateFrom);\n\t\tquery.setParameter(\"dateTo\", dateTo);\n\t\treturn Utils.isNull(Utils.first(query.getResultList()), (Integer) null);\n\t}",
"private long getDaysBetween(LocalDateTime d1, LocalDateTime d2) {\n return d1.until(d2,DAYS);\n }",
"public static int numOfWorkingDays(PublicHolidayRepository phRep, LocalDate start, LocalDate end) {\r\n\t\t\r\n\t\tint count = 0;\r\n\t\tArrayList<Date> phDates1 = phRep.findAllPublicHolidayDates();\r\n\t\tArrayList<LocalDate> phDates=new ArrayList<LocalDate>();\r\n\t\tfor(Date d:phDates1)\r\n\t\t{\r\n\t\t\tphDates.add(d.toLocalDate());\r\n\t\t}\r\n\t\tfor(LocalDate date = start; date.isBefore(end.plusDays(1)); date = date.plusDays(1)) {\r\n\t\t\tSystem.out.println(date.getDayOfWeek());\r\n\t\t\tif(date.getDayOfWeek() == DayOfWeek.SATURDAY)\r\n\t\t\t\tcontinue;\r\n\t\t\tif(date.getDayOfWeek() == DayOfWeek.SUNDAY)\r\n\t\t\t\tcontinue;\r\n\t\t\tif(phDates.contains(date))\r\n\t\t\t\tcontinue;\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\treturn count;\r\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.O)\n public int daysBetweenDates(LocalDate date1, LocalDate date2) {\n Period period = Period.between(date1, date2);\n int diff = period.getDays();\n return diff;\n }",
"public int daysBetweenDates(String date1, String date2) {\n\n return 0;\n }",
"private long dateDiffInNumberOfDays(LocalDate startDate, LocalDate endDate) {\n\n return ChronoUnit.DAYS.between(startDate, endDate);\n }",
"public static int getNoOfDaysBetweenDates(Date fromDate, Date toDate) {\n\t\tint noOfDays = 0;\n\t\tif(fromDate.compareTo(toDate)>0){\n\t\tnoOfDays = fromDate.subtract(toDate);\n\t\tnoOfDays = -(noOfDays + 1);\n\t\t}else if(fromDate.compareTo(toDate)==0){\n\t\t\tnoOfDays = fromDate.subtract(toDate);\n\t\t\tnoOfDays = noOfDays + 1;\n\t\t}else{\n\t\t\tnoOfDays = toDate.subtract(fromDate);\n\t\t\tnoOfDays = noOfDays + 1;\n\t\t}\n\t\treturn noOfDays;\n\t}",
"public int daysBetween(Date endDate) {\r\n\r\n\t\tif (this.isAfter(endDate))\r\n\t\t\treturn -1;\r\n\t\tint totDays = 0;\r\n\t\tfor (int y = this.year; y < endDate.year; y++)\r\n\t\t\ttotDays += (isLeapYear(y) ? LEAP_YEAR : NON_LEAP_YEAR);\r\n\r\n\t\tint daysBeforeFirst = 0;\r\n\t\tfor (int m = 1; m < this.month; m++)\r\n\t\t\tdaysBeforeFirst += (m == 2 && !isLeapMonth(m, this.year)) ? DAYS[m] - 1\r\n\t\t\t\t\t: DAYS[m];\r\n\t\tdaysBeforeFirst += this.day;\r\n\r\n\t\tint daysInSecond = 0;\r\n\t\tfor (int me = 1; me < endDate.month; me++)\r\n\t\t\tdaysInSecond += (me == 2 && !isLeapMonth(me, endDate.year) ? DAYS[me] - 1\r\n\t\t\t\t\t: DAYS[me]);\r\n\t\tdaysInSecond += endDate.day;\r\n\r\n\t\treturn totDays - daysBeforeFirst + daysInSecond;\r\n\t}",
"private int calculateNumberOfDaysOfWeek (DayOfWeek dayOfWeek) {\n LocalDate dateIterator = startDate.with(nextOrSame(dayOfWeek));\n if (dateIterator.isAfter(endDate)) {\n return 0;\n }\n\n int numberOfDayOfWeek = 1;\n\n while (dateIterator.isBefore(endDate)) {\n dateIterator = dateIterator.with(next(dayOfWeek));\n if (dateIterator.isBefore(endDate) || dateIterator.isEqual(endDate)) {\n numberOfDayOfWeek++;\n }\n }\n\n return numberOfDayOfWeek;\n }",
"public static int getNumberOfDays(Date first, Date second)\n {\n Calendar c = Calendar.getInstance();\n int result = 0;\n int compare = first.compareTo(second);\n if (compare > 0) return 0;\n if (compare == 0) return 1;\n\n c.setTime(first);\n int firstDay = c.get(Calendar.DAY_OF_YEAR);\n int firstYear = c.get(Calendar.YEAR);\n int firstDays = c.getActualMaximum(Calendar.DAY_OF_YEAR);\n\n c.setTime(second);\n int secondDay = c.get(Calendar.DAY_OF_YEAR);\n int secondYear = c.get(Calendar.YEAR);\n\n // if dates in the same year\n if (firstYear == secondYear)\n {\n result = secondDay-firstDay+1;\n }\n\n // different years\n else\n {\n // days from the first year\n result += firstDays - firstDay + 1;\n\n // add days from all years between the two dates years\n for (int i = firstYear+1; i< secondYear; i++)\n {\n c.set(i,0,0);\n result += c.getActualMaximum(Calendar.DAY_OF_YEAR);\n }\n\n // days from last year\n result += secondDay;\n }\n\n return result;\n }",
"public static long daysBetween(Date startDate, Date endDate) {\r\n\t Calendar sDate = getDatePart(startDate);\r\n\t Calendar eDate = getDatePart(endDate);\r\n\r\n\t long daysBetween = 0;\r\n\t while (sDate.before(eDate)) {\r\n\t sDate.add(Calendar.DAY_OF_MONTH, 1);\r\n\t daysBetween++;\r\n\t }\r\n\t return daysBetween;\r\n\t}",
"public static long CountDaysBetween(String D1, String D2) {\n\t\tfinal DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy/MM/dd\");\n\t\tfinal LocalDate firstDate = LocalDate.parse(D1, formatter);\n\t\tfinal LocalDate secondDate = LocalDate.parse(D2, formatter);\n\t\tfinal long days = ChronoUnit.DAYS.between(firstDate, secondDate);\n\t\t// System.out.println(\"Days between: \" + days);\n\t\treturn days;\n\t}",
"public static long daysBetween(Calendar startDate, Calendar endDate) {\n Calendar date = (Calendar) startDate.clone();\n long daysBetween = 0;\n while (date.before(endDate)) {\n date.add(Calendar.DAY_OF_MONTH, 1);\n daysBetween++;\n }\n return daysBetween;\n }",
"public long days(Date date2) {\n\t\tlong getDaysDiff =0;\n\t\t DateFormat simpleDateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n\t\t Date currentDate = new Date();\n\t\t Date date1 = null;\n\t\t Date date3 = null;\n\n\t\t\n\n\t\t try {\n\t\t String startDate = simpleDateFormat.format(date2);\n\t\t String endDate = simpleDateFormat.format(currentDate);\n\n\t\t date1 = simpleDateFormat.parse(startDate);\n\t\t date3 = simpleDateFormat.parse(endDate);\n\n\t\t long getDiff = date3.getTime() - date1.getTime();\n\n\t\t getDaysDiff = getDiff / (24 * 60 * 60 * 1000);\n\t\t \n\t\t \n\t\t \n\t\t } catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t }\n\t\t return getDaysDiff;\n\n}",
"public static int diasQADescanso(LocalDate start, LocalDate end) {\r\n List<DayOfWeek> ignore = new ArrayList<>();\r\n ignore.add(DayOfWeek.SATURDAY);\r\n ignore.add(DayOfWeek.SUNDAY);\r\n int r = 0;\r\n while (end.isAfter(start) || end.equals(start)) {\r\n if (ignore.contains(start.getDayOfWeek())) {\r\n r++;\r\n }\r\n // TODO faltan los asueto\r\n start = start.plusDays(1);\r\n }\r\n return r;\r\n }",
"private int getDifferenceDays(Date d1, Date d2) {\n int daysdiff = 0;\n long diff = d2.getTime() - d1.getTime();\n long diffDays = diff / (24 * 60 * 60 * 1000) + 1;\n daysdiff = (int) diffDays;\n return daysdiff;\n }",
"public int getTotalNumberOfWorkingDays(List<LocalDate> dateList) {\n\n int cont = 0;\n for (LocalDate date : dateList) {\n\n if (dateDiffOfWeekend(date)) {\n\n cont++;\n }\n }\n\n return cont;\n }",
"public static void dateDifference(){\r\n\t\t\r\n\t\tLocalDate firstDate = LocalDate.of(2013, 3, 20);\r\n\t\tLocalDate secondDate = LocalDate.of(2015, 8, 12);\r\n\t\t\r\n\t\tPeriod diff = Period.between(firstDate, secondDate);\r\n\t\tSystem.out.println(\"The Difference is ::\"+diff.getDays());\r\n\t}",
"public static long daysBetween(long start, long end) {\r\n long result = 1l;\r\n if (end > start) {\r\n Long diff = end - start;\r\n Double days = diff / DTConstants.MILLSECS_PER_DAY;\r\n Integer wholeDays = days.intValue();\r\n if (0 == wholeDays) {\r\n wholeDays = 1;\r\n } else {\r\n if (0 != (days - wholeDays)) {\r\n wholeDays++;\r\n }\r\n }\r\n result = wholeDays.longValue();\r\n }\r\n return result;\r\n }",
"public int betweenDates() {\n return Period.between(arrivalDate, departureDate).getDays();\n }",
"public static long getDiffDays(Date date1,Date date2) {\n Calendar calendar1= Calendar.getInstance();\n Calendar calendar2 = Calendar.getInstance();\n\n calendar1.setTime(date1);\n calendar2.setTime(date2);\n\n long msDiff = calendar1.getTimeInMillis()-calendar2.getTimeInMillis();\n long daysDiff = TimeUnit.MILLISECONDS.toDays(msDiff);\n Log.e(\"Amarneh\",\"diffDays>>\"+daysDiff);\n return daysDiff;\n }",
"public int getDaysBetween(Calendar d1, Calendar d2) {\n if (d1.after(d2)) {\n java.util.Calendar swap = d1;\n d1 = d2;\n d2 = swap;\n }\n int days = d2.get(Calendar.DAY_OF_YEAR) - d1.get(Calendar.DAY_OF_YEAR);\n int y2 = d2.get(Calendar.YEAR);\n if (d1.get(Calendar.YEAR) != y2) {\n d1 = (Calendar) d1.clone();\n do {\n days += d1.getActualMaximum(Calendar.DAY_OF_YEAR);//得到当年的实际天数\n d1.add(Calendar.YEAR, 1);\n } while (d1.get(Calendar.YEAR) != y2);\n }\n return days;\n }",
"public static int countDiffDay(Calendar c1, Calendar c2) {\n int returnInt = 0;\n while (!c1.after(c2)) {\n c1.add(Calendar.DAY_OF_MONTH, 1);\n returnInt++;\n }\n\n if (returnInt > 0) {\n returnInt = returnInt - 1;\n }\n\n return (returnInt);\n }",
"public static void main(String[] args){\n\n\n DateTimeFormatter formatter1 = DateTimeFormat.forPattern(\"yyyy-MM-dd\");\n DateTime d1 = DateTime.parse(\"2018-05-02\",formatter1);\n DateTime d2 = DateTime.parse(\"2018-05-01\",formatter1);\n System.out.println(Days.daysIn(new Interval(d2,d1)).getDays());\n }",
"int getNumberDays();",
"public static void main(String[] args) {\n DateMidnight start = new DateMidnight(\"2019-07-01\");\n DateMidnight end = new DateMidnight(\"2019-07-22\");\n\n // Get days between the start date and end date.\n int days = Days.daysBetween(start, end).getDays();\n\n // Print the result.\n System.out.println(\"Days between \" +\n start.toString(\"yyyy-MM-dd\") + \" and \" +\n end.toString(\"yyyy-MM-dd\") + \" = \" +\n days + \" day(s)\");\n\n // Using LocalDate object.\n LocalDate date1 = LocalDate.parse(\"2019-07-01\");\n LocalDate date2 = LocalDate.now();\n days = Days.daysBetween(date1, date2).getDays();\n\n // Print the result.\n System.out.println(\"Days between \" +\n date1.toString(\"yyyy-MM-dd\") + \" and \" +\n date2.toString(\"yyyy-MM-dd\") + \" = \" +\n days + \" day(s)\");\n }",
"public int getDifference(DaysBetween dt1, DaysBetween dt2)\n {\n // COUNT TOTAL NUMBER OF DAYS BEFORE FIRST DATE 'dt1'\n \n // initialize count using years and day\n int n1 = dt1.y * 365 + dt1.d;\n \n // Add days for months in given date\n for (int i = 0; i < dt1.m - 1; i++) \n {\n n1 += monthDays[i];\n }\n \n // Since every leap year is of 366 days,\n // Add a day for every leap year\n n1 += countLeapYears(dt1);\n \n // SIMILARLY, COUNT TOTAL NUMBER OF DAYS BEFORE 'dt2'\n int n2 = dt2.y * 365 + dt2.d;\n for (int i = 0; i < dt2.m - 1; i++)\n {\n n2 += monthDays[i];\n }\n n2 += countLeapYears(dt2);\n \n // return difference between two counts\n return (n2 - n1);\n }",
"private int getDays() {\n\t\tlong arrival = arrivalDate.toEpochDay();\n\t\tlong departure = departureDate.toEpochDay();\n\t\tint days = (int) Math.abs(arrival - departure);\n\n\t\treturn days;\n\t}",
"public int calcDays() {\n\t\tint days = day-1;\r\n\t\tdays += ((month-1)*30);\r\n\t\tdays += ((year -2000) * (12*30));\r\n\t\treturn days;\r\n\t}",
"public int daysOverdue(int today);",
"public int getLBR_ProtestDays();",
"public static int diff(Date date1, Date date2) {\n Calendar c1 = Calendar.getInstance();\n Calendar c2 = Calendar.getInstance();\n\n c1.setTime(date1);\n c2.setTime(date2);\n int diffDay = 0;\n\n if (c1.before(c2)) {\n diffDay = countDiffDay(c1, c2);\n } else {\n diffDay = countDiffDay(c2, c1);\n }\n\n return diffDay;\n }",
"public long dayDiffCalculator(String a, String b){\n\n long dateDiff = 0;\n\n Date d1 = null;\n Date d2 = null;\n\n try{\n d1 = sdf.parse(a);\n d2 = sdf.parse(b);\n\n long diff = d2.getTime() - d1.getTime();\n\n long diffSeconds = diff / 1000 % 60;\n long diffMinutes = diff / (60 * 1000) % 60;\n long diffHours = diff / (60 * 60 * 1000) % 24;\n long diffDays = diff / (24 * 60 * 60 * 1000);\n\n dateDiff = diffDays;\n\n } catch (Exception e){}\n\n return dateDiff;\n }",
"@Test\n\tpublic void testNumberOfDays() {\n\t\tint thirtyExpected = 30;\n\t\tint thirtyResult = Main.numberOfDays(9, 2015);\n\t\tassertTrue(thirtyExpected == thirtyResult);\n\n\t\t// Test regular 31 day month\n\t\tint thirtyOneExpected = 31;\n\t\tint thirtyOneResult = Main.numberOfDays(1, 2016);\n\t\tassertTrue(thirtyOneExpected == thirtyOneResult);\n\n\t\t// Test 'Feb 2016' - regular leap year\n\t\tint regularLeapExpected = 29;\n\t\tint regularLeapResult = Main.numberOfDays(2, 2016);\n\t\tassertTrue(regularLeapExpected == regularLeapResult);\n\n\t\t// Test 'February 2300' - century but not a leap year\n\t\tint notCenturyLeapExpected = 28;\n\t\tint notCenturyLeapResult = Main.numberOfDays(2, 2300);\n\t\tassertTrue(notCenturyLeapExpected == notCenturyLeapResult);\n\n\t\t// Test 'February 2400' - century and a leap year\n\t\tint centuryLeapExpected = 29;\n\t\tint centuryLeapResult = Main.numberOfDays(2, 2400);\n\t\tassertTrue(centuryLeapExpected == centuryLeapResult);\n\n\t}",
"public static int daysBetween(final Date start, final Date end) {\n return Dates.dateDiff(start, end, Calendar.DAY_OF_MONTH);\n }",
"@Test\n public void nbDaysBetweenSameYear(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.nbDaysBetween(new Date(31,Month.december,1970)),364);\n }",
"public static String calculateFeedbackDays(String dataPublicare, String dataFeedback){\n DateTimeFormatter fmt = DateTimeFormatter.ofPattern(\"dd.MM.yyyy\");\n try {\n LocalDate startDate = LocalDate.parse(dataPublicare, fmt);\n LocalDate endDate = LocalDate.parse(dataFeedback, fmt);\n // Range = End date - Start date\n Long range = ChronoUnit.DAYS.between(startDate, endDate);\n\n return range.toString();\n }catch (Exception e){\n e.printStackTrace();\n }\n return \"0\";\n }",
"@Override\n public final long daysInEffect(final LocalDate comparison) {\n return ChronoUnit.DAYS.between(this.getStartDate(), comparison);\n }",
"public void calculateVacationDays(){\n }",
"public int numberOfAvailableDays(List<Vacation> employeeList, Vacation formVacation) {\n\n int numberOfDays = 0;\n List<Vacation> formVacationDays = new ArrayList<>();\n formVacationDays.add(formVacation);\n List<LocalDate> employeelistToCheck = getDaysBetweenDates(employeeList);\n List<LocalDate> formVacations = getDaysBetweenDates(formVacationDays);\n numberOfDays = maxDaysVacations - getTotalNumberOfWorkingDays(employeelistToCheck);\n numberOfDays = numberOfDays - getTotalNumberOfWorkingDays(formVacations);\n\n if (numberOfDays < 0) {\n\n return -1;\n\n } else {\n\n return numberOfDays;\n }\n }",
"public static int getDayBetweenDates(HISDate dBeginn, HISDate dEnde) {\r\n return HISDate.getDayBetweenDates(dBeginn.toSQLDate(), dEnde.toSQLDate());\r\n }",
"public Long calculateAging(LocalDateTime endDateParam, LocalDateTime startDateParam, KPITicketResponTime sourceData,\n\t\t\tList<KPIServiceHourRest> ticketRests, List<ITSMTicketHolidayDate> ticketHolidays) {\n\t\tboolean validStart = false;\n\t\tLong totalAging=new Long(0L);\n\t\tdo {\n\t\t\tswitch (startDateParam.getDayOfWeek()) {\n\t\t\t\tcase DateTimeConstants.MONDAY: {\n\t\t\t\t\t\t\t\t\t\t\t\tif (sourceData.getMondayFlag().intValue() == 1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// // if working\n\t\t\t\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParam,endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t Date startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// will get next day with time 00:00:00\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp).plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t\t * @ Compare Only Time in date\n\t\t\t\t\t\t\t\t\t\t\t\t\t * @ start < start work\n\t\t\t\t\t\t\t\t\t\t\t\t\t * */\n\t\t\t\t\t\t\t\t\t\t\t\t\t if(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(sourceData.getMondayFromTime()))<0){\n\t\t\t\t\t \t\t // set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t /** menghilangkan menit dan detik, jika tidak \n\t\t\t\t\t \t\t maka hanya tgl saja yang berubah, jam tidak \n\t\t\t\t\t \t\t contoh 01/01/2017 17:20:00 plus(1) --> 01/02/2017 17:20:00 */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusHours(sourceData.getMondayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusMinutes(sourceData.getMondayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusSeconds(sourceData.getMondayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localReponStart;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t }else if(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(sourceData.getMondayToTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// add to next day \n\t\t\t\t\t \t\t // if start >= work end\n\t\t\t\t\t\t \t // ubah jam ke 00:00:00 \n\t\t\t\t\t\t \t // +1 -> netx day with 00:00:00\n\t\t\t\t\t\t \t // move 00:00:00 ke jam mulai bekerja\n\t\t\t\t\t\t \t Date startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 start work (PINDAHKAN JAM 00:00:00 ke jam mulai bekerja)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(sourceData.getMondayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(sourceData.getMondayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(sourceData.getMondayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * if start >=work start dan start <= work end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * check rest break\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean isStartOnRest=false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.MONDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 && CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if response start >= rest start AND response start < rest end\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// means response start is within rest time\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move response start to rest end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam setelah istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(restEnd.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(restEnd.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(restEnd.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//startDateParam=endRest\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisStartOnRest=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(isStartOnRest)break;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}else{ \n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t/**jika tidak ada ini maka akan loop terus menerus di hari berikutnya jika hari ini libur\n\t\t\t\t\t\t\t\t\t\t\t\t\t * jika tidak masuk add ke hari berikutnya\n\t\t\t\t\t\t\t\t\t\t\t\t\t * SUNDAY\n\t\t\t\t\t\t\t\t\t\t\t\t\t * move to next day ke hari senin */\n\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t} // end cast monday\n\t\t\t\tcase DateTimeConstants.TUESDAY: {\n\t\t\t\t\t // untuk hari selasa \n\t\t\t\t\t if(sourceData.getTuesdayFlag().intValue()==1){\n\t\t\t\t\t \t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParam,endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t Date startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// will get next day with time 00:00:00\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp).plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t \t //start < start work\n\t\t\t\t\t \t// @@ jika dari LocalDateTime di masukan ke new DateTime, maka variabel LocalDateTime harus ke toDateTime\n\t\t\t\t\t\t\t\t\t\t\t\t\t// @@ jika dari Date di masukan ke new DateTime, maka variabel tidak dirubah jadi apa2\n\t\t\t\t\t \t \n\t\t\t\t\t \t if(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(sourceData.getTuesdayFromTime()))<0){\n\t\t\t\t \t\t // set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusHours(sourceData.getTuesdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusMinutes(sourceData.getTuesdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusSeconds(sourceData.getTuesdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localReponStart;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t \t }else if(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(sourceData.getTuesdayToTime()))>0){\n\t\t\t\t\t \t\t//if start>work end, pindahkan ke besoknya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//move to next day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(sourceData.getTuesdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(sourceData.getTuesdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(sourceData.getTuesdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t \t }else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * if start >work start dan start < work end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * check rest break\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean isStartOnRest=false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.TUESDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 && CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if response start >= rest start AND response start < rest end\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// means response start is within rest time\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move response start to rest end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam setelah istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(restEnd.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(restEnd.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(restEnd.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//startDateParam=endRest\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisStartOnRest=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(isStartOnRest)break;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \t \n\t\t\t\t\t }else{// end flag tuesday\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**jika tidak ada ini maka akan loop terus menerus di hari berikutnya jika hari ini libur\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * jika tidak masuk add ke hari berikutnya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * SUNDAY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * move to next day ke hari senin */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\tbreak;} // end cast TUESDAY\n\t\t\t\tcase DateTimeConstants.WEDNESDAY: {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(sourceData.getWednesdayFlag().intValue()==1){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParam,endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t Date startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// will get next day with time 00:00:00\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp).plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// start< start work\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDate().getTime()), new DateTime(sourceData.getWednesdayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusHours(sourceData.getWednesdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusMinutes(sourceData.getWednesdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusSeconds(sourceData.getWednesdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localReponStart;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(sourceData.getWednesdayToTime().getTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if start>work end, pindahkan ke besoknya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//move to next day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(sourceData.getWednesdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(sourceData.getWednesdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(sourceData.getWednesdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * if start >work start dan start < work end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * check rest break\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean isStartOnRest=false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.WEDNESDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 && CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if response start >= rest start AND response start < rest end\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// means response start is within rest time\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move response start to rest end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam setelah istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(restEnd.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(restEnd.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(restEnd.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//startDateParam=endRest\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisStartOnRest=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(isStartOnRest)break;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}//end flag wednesday\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**jika tidak ada ini maka akan loop terus menerus di hari berikutnya jika hari ini libur\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * jika tidak masuk add ke hari berikutnya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * SUNDAY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * move to next day ke hari senin */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t// besok \n\t\t\t\tbreak;} // end cast WEDNESDAY\n\t\t\t\tcase DateTimeConstants.THURSDAY: {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(sourceData.getThursdayFlag().intValue()==1){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParam,endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Date startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// will get next day with time 00:00:00\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp).plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// start< work start\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDate().getTime()), new DateTime(sourceData.getThursdayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusHours(sourceData.getThursdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusMinutes(sourceData.getThursdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusSeconds(sourceData.getThursdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localReponStart;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(startDateParam.toDate().getTime()), new DateTime(sourceData.getThursdayToTime().getTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if start>work end, pindahkan ke besoknya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//move to next day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(sourceData.getThursdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(sourceData.getThursdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(sourceData.getThursdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * if start >work start dan start < work end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * check rest break\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean isStartOnRest=false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.THURSDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 && CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if response start >= rest start AND response start < rest end\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// means response start is within rest time\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move response start to rest end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam setelah istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(restEnd.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(restEnd.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(restEnd.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//startDateParam=endRest\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisStartOnRest=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(isStartOnRest)break;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**jika tidak ada ini maka akan loop terus menerus di hari berikutnya jika hari ini libur\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * jika tidak masuk add ke hari berikutnya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * SUNDAY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * move to next day ke hari senin */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t break;} // end cast THURSDAY\n\t\t\t\tcase DateTimeConstants.FRIDAY: {\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(sourceData.getFridayFlag().intValue()==1){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParam,endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Date startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// will get next day with time 00:00:00\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp).plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// start< work start\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDate().getTime()), new DateTime(sourceData.getFridayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusHours(sourceData.getFridayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusMinutes(sourceData.getFridayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusSeconds(sourceData.getFridayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localReponStart;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(startDateParam.toDate().getTime()), new DateTime(sourceData.getFridayToTime().getTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if start>work end, pindahkan ke besoknya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//move to next day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(sourceData.getFridayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(sourceData.getFridayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(sourceData.getFridayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * if start >work start dan start < work end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * check rest break\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean isStartOnRest=false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.FRIDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 && CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if response start >= rest start AND response start < rest end\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// means response start is within rest time\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move response start to rest end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam setelah istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(restEnd.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(restEnd.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(restEnd.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//startDateParam=endRest\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisStartOnRest=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(isStartOnRest)break;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}// end if flag\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**jika tidak ada ini maka akan loop terus menerus di hari berikutnya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * jika tidak masuk add ke hari berikutnya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * SUNDAY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * move to next day ke hari senin */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;} // end cast FRIDAY\n\t\t\t\tcase DateTimeConstants.SATURDAY: {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(sourceData.getSaturdayFlag().intValue()==1){\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParam,endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Date startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// will get next day with time 00:00:00\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp).plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// start< work start\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDate().getTime()), new DateTime(sourceData.getSaturdayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusHours(sourceData.getSaturdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusMinutes(sourceData.getSaturdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusSeconds(sourceData.getSaturdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localReponStart;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(startDateParam.toDate().getTime()), new DateTime(sourceData.getSaturdayToTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if start>work end, pindahkan ke besoknya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//move to next day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(sourceData.getSaturdayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(sourceData.getSaturdayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(sourceData.getSaturdayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * if start >work start dan start < work end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * check rest break\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean isStartOnRest=false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.SATURDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 && CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if response start >= rest start AND response start < rest end\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// means response start is within rest time\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move response start to rest end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam setelah istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(restEnd.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(restEnd.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(restEnd.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//startDateParam=endRest\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisStartOnRest=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(isStartOnRest)break;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jika tidak masuk add ke hari berikutnya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SUNDAY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//move to next day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;} // end cast SATURDAY\n\t\t\t\tcase DateTimeConstants.SUNDAY: {\n\t\t\t\t\t if(sourceData.getSundayFlag().intValue()==1){\n\n\t\t\t\t\t \t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParam,endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t Date startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// will get next day with time 00:00:00\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp).plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t \t// start< work start\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDate().getTime()), new DateTime(sourceData.getSaturdayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusHours(sourceData.getSaturdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusMinutes(sourceData.getSaturdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponStart=localReponStart.plusSeconds(sourceData.getSaturdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localReponStart;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(startDateParam.toDate().getTime()), new DateTime(sourceData.getSaturdayToTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if start>work end, pindahkan ke besoknya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//move to next day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(sourceData.getSaturdayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(sourceData.getSaturdayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(sourceData.getSaturdayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * if start >work start dan start < work end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * check rest break\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t * */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidStart=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tboolean isStartOnRest=false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.SUNDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 && CustomDateUtils.compareTime(new DateTime(startDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if response start >= rest start AND response start < rest end\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// means response start is within rest time\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move response start to rest end \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam setelah istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusHours(restEnd.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusMinutes(restEnd.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusSeconds(restEnd.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//startDateParam=endRest\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisStartOnRest=true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(isStartOnRest)break;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}// end else\n\t\t\t\t\t \t \n\t\t\t\t\t }// end if flag\n\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jika tidak masuk add ke hari berikutnya\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SUNDAY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//move to next day ke hari senin\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate startDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localstartDateParam=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//+1 day\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalstartDateParam=localstartDateParam.plusDays(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartDateParam=localstartDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\tbreak;} // end cast SUNDAY\n\t\t\t}// END SWITCH\n\t\t\t\n\t\t\tif(startDateParam.compareTo(endDateParam) > 0){\n\t\t\t\t// current response start > response end\n\t\t\t\t// then out of loop, no need further check (aging should be 0)\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!validStart);\n\t\t/**\n\t\t * \n\t\t * Memindahkan End ke tempat yang benar\n\t\t * Jika end di jam istirahat, maka pindahkan end ke sebelum istirahat\n\t\t * Jika end setelah istirahat, maka \n\t\t * untuk perhitungan hari itu di awal mulai bekerja hitung waktu detiknya sampai istirahat\n\t\t * \n\t\t * */\n\t\t\n\t\tSystem.out.println(\" Start Respon : \"+startDateParam);\n\t\tboolean validEnd=false;\n\t\tdo{\n\t\t\tswitch (endDateParam.getDayOfWeek()) {\n\t\t\tcase DateTimeConstants.MONDAY: { \n\t\t\t\t\t\t\t\t\t\t\t//respon end < start work\n\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getMondayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getMondayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getMondayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getMondayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getMondayToTime().getTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t//respon end > end work\t\n\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getMondayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getMondayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getMondayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t// CHECK RESPON END IN REST\n\t\t\t\t\t\t\t\t\t\t\t\t/*** Lojik **\n\t\t\t\t\t\t\t\t\t\t\t\t * respondEnd=11:30\n\t\t\t\t\t\t\t\t\t\t\t\t * restStart=11:30 AM, restEnd=1:00:00 PM\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(endDateParam>restStart && endDateParam<restEnd){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t1. \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 11:30> ? N, Y\n\t\t\t\t\t\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.MONDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<=0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localendDateParam=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam mulai istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusHours(restStart.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusMinutes(restStart.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusSeconds(restStart.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localendDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;}\n\t\t\tcase DateTimeConstants.TUESDAY: {\n\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getTuesdayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getTuesdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getTuesdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getTuesdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getTuesdayToTime().getTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t//respon end > end work\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getTuesdayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getTuesdayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getTuesdayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t// CHECK RESPON END IN REST\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.TUESDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<=0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localendDateParam=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam mulai istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusHours(restStart.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusMinutes(restStart.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusSeconds(restStart.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localendDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;}\n\t\t\tcase DateTimeConstants.WEDNESDAY: {\n\t\t\t\t // END RESPON < END WORK\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getWednesdayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getWednesdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getWednesdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getWednesdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getWednesdayToTime().getTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t//respon end > end work\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getWednesdayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getWednesdayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getWednesdayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t// CHECK RESPON END IN REST\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.WEDNESDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<=0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localendDateParam=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// RESPON EDN DI MOVE KE JAM MULAI ISTIRAHAT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam mulai istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusHours(restStart.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusMinutes(restStart.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusSeconds(restStart.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localendDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\tbreak;}\n\t\t\tcase DateTimeConstants.THURSDAY: {\n\t\t\t\t // END RESPON < END WORK\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getThursdayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getThursdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getThursdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getThursdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getThursdayToTime().getTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t//respon end > end work\t\n\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getThursdayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getThursdayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getThursdayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t// CHECK RESPON END IN REST\n\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.THURSDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<=0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localendDateParam=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// RESPON EDN DI MOVE KE JAM MULAI ISTIRAHAT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam mulai istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusHours(restStart.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusMinutes(restStart.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusSeconds(restStart.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localendDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;}\n\t\t\tcase DateTimeConstants.FRIDAY: {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t// END RESPON < END WORK\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getFridayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getFridayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getFridayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getFridayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getFridayToTime().getTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t//respon end > end work\t\n\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getFridayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getFridayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getFridayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t// CHECK RESPON END IN REST\n\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.FRIDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<=0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localendDateParam=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// RESPON EDN DI MOVE KE JAM MULAI ISTIRAHAT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam mulai istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusHours(restStart.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusMinutes(restStart.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusSeconds(restStart.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localendDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tbreak;}\n\t\t\tcase DateTimeConstants.SATURDAY: {\n\t\t\t\t\t\t\t\t\t\t\t\t// END RESPON < END WORK\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getSaturdayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getSaturdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getSaturdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getSaturdayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getSaturdayToTime().getTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t//respon end > end work\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getSaturdayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getSaturdayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getSaturdayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\t// CHECK RESPON END IN REST\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.SATURDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0 \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<=0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localendDateParam=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// RESPON EDN DI MOVE KE JAM MULAI ISTIRAHAT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam mulai istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusHours(restStart.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusMinutes(restStart.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusSeconds(restStart.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localendDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;}\n\t\t\tcase DateTimeConstants.SUNDAY: {\n\t\t\t\t\t\t\t\t\t\t\t// END RESPON < END WORK\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getSundayFromTime().getTime()))<0){\n\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getSundayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getSundayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getSundayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}else if(CustomDateUtils.compareTime(new DateTime(endDateParam.toDate().getTime()), new DateTime(sourceData.getSundayToTime().getTime()))>0){\n\t\t\t\t\t\t\t\t\t\t\t\t//respon end > end work\t\n\t\t\t\t\t\t\t\t\t\t\t\t// set hour date startDateParam, to hour :00:00:00 {datestartDateParam 00:00:00}\n\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusHours(sourceData.getSundayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusMinutes(sourceData.getSundayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\tlocalReponEnd=localReponEnd.plusSeconds(sourceData.getSundayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localReponEnd;\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t// CHECK RESPON END IN REST\n\t\t\t\t\t\t\t\t\t\t\t\tfor(KPIServiceHourRest ticketRest:ticketRests){\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(DateTimeConstants.SUNDAY==ticketRest.getDay()){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restStart=LocalDateTime.fromDateFields(ticketRest.getFromTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime restEnd=LocalDateTime.fromDateFields(ticketRest.getToTimeRest());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restStart.toDateTime()))>=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& CustomDateUtils.compareTime(new DateTime(endDateParam.toDateTime()), new DateTime(restEnd.toDateTime()))<=0){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate endDateParamTemp=Utils.removeTime(endDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDateTime localendDateParam=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// RESPON EDN DI MOVE KE JAM MULAI ISTIRAHAT \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// jam :00:00:00 move ke jam mulai istirahat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusHours(restStart.toDate().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusMinutes(restStart.toDate().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalendDateParam=localendDateParam.plusSeconds(restStart.toDate().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tendDateParam=localendDateParam;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tvalidEnd=true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;}\n\t\t\t}\n\t\t}while(!validEnd);\n\t\t\n\t\t\n\t\tLong totalAgingInSameDays=new Long(0L);\n\t\tLong totalAgingFirstDays=new Long(0L);\n\t\tLong totalAgingBetweenDays=new Long(0L);\n\t\tLong totalAgingLastDays=new Long(0L);\n\t\tif(startDateParam.compareTo(endDateParam)<0){\n long diff =(Utils.removeTime(endDateParam.toDate()).getTime() - Utils.removeTime(startDateParam.toDate()).getTime());\n Long days = TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS);\n // check apakah ada rentang hari antara startDateParam dan endDateParam\n if(days.intValue()==0){\n\t\t // Jika selisih hari adalah 0, berarti start dan respon ada pada hari yang sama, hitung pada hari yang sama \n\t\t // it's mean end - start secara langsung \n\t\t // karena jam istirahat berpengaruh pada aging, memperhatikan, apakah end setelah istirahat, past istirahat atau sebelum istirahat\n \t // sedangkan start sudah otomatis di atur di if paling atas\n \t // jadi tidak memperhatikan start\n\t\t // KASUS 1\n \t\t switch (endDateParam.getDayOfWeek()) {\n \t\t \t\tcase DateTimeConstants.MONDAY: { \n\t\t \t\t \t\t\tif(sourceData.getMondayFlag()==1){\n\t\t\t \t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t \t //cek holiday\n\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isEndDateParamIsHolidayDate(endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t totalAgingInSameDays=0L;\n\t\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t\t\t Integer day=DateTimeConstants.MONDAY;\n\t\t\t\t\t\t\t\t\t\t\t\t Integer totalSecondRest=sourceData.getSecondMondayRest();\n\t\t\t\t\t\t\t\t\t\t\t\t totalAgingInSameDays=getTotalAgingFromSameDay(day,endDateParam,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t \t\t \t\t\t}else{\n\t\t \t\t \t\t\t\ttotalAgingInSameDays=0L;\n\t\t \t\t \t\t\t}\n\t\t break;\n\t\t }\n \t\t \t\t case DateTimeConstants.TUESDAY: {\n \t\t \t\t\t \n\t \t\t \t\t\tif(sourceData.getTuesdayFlag()==1){\n\t \t\t \t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isEndDateParamIsHolidayDate(endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t totalAgingInSameDays=0L;\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t \t\t \t\t\t Integer day=DateTimeConstants.TUESDAY;\n\t\t Integer totalSecondRest=sourceData.getSecondTuesdayRest();\n\t\t totalAgingInSameDays=getTotalAgingFromSameDay(day,endDateParam,startDateParam,totalSecondRest,ticketRests);\n\t \t\t \t\t\t }\n\t \t\t \t\t\t}else{\n\t \t\t \t\t\t\ttotalAgingInSameDays=0L;\n\t \t\t \t\t\t}\n \t\t \t\t\t break;}\n \t\t \t\t case DateTimeConstants.WEDNESDAY: {\n\t\t \t\t \t\t\tif(sourceData.getWednesdayFlag()==1){\n\t\t \t\t \t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isEndDateParamIsHolidayDate(endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t totalAgingInSameDays=0L;\n\t\t\t\t\t\t\t\t\t\t\t }else{\n\t\t \t\t \t\t\t\t\t Integer day=DateTimeConstants.WEDNESDAY;\n\t\t \t\t \t\t\t\t\t Integer totalSecondRest=sourceData.getSecondWednesdayRest();\n\t\t \t\t \t\t\t\t\t totalAgingInSameDays=getTotalAgingFromSameDay(day,endDateParam,startDateParam,totalSecondRest,ticketRests);\n\t\t \t\t \t\t\t\t }\n\t\t \t\t \t\t\t}else{\n\t\t \t\t \t\t\t\ttotalAgingInSameDays=0L;\n\t\t \t\t \t\t\t}\n break;}\n \t\t \t\t case DateTimeConstants.THURSDAY: {\n\t\t\t \t\t \t\t\tif(sourceData.getThursdayFlag()==1){\n\t\t\t \t\t \t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isEndDateParamIsHolidayDate(endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t\t totalAgingInSameDays=0L;\n\t\t\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t \t\t \t\t\t\t\t Integer day=DateTimeConstants.THURSDAY;\n\t\t\t Integer totalSecondRest=sourceData.getSecondThursdayRest();\n\t\t\t totalAgingInSameDays=getTotalAgingFromSameDay(day,endDateParam,startDateParam,totalSecondRest,ticketRests);\n\t\t\t \t\t \t\t\t\t }\n\t\t\t \t\t \t\t\t}else{\n\t\t\t \t\t \t\t\t\ttotalAgingInSameDays=0L;\n\t\t\t \t\t \t\t\t}\n break;}\n \t\t \t\t \n \t\t \t\t case DateTimeConstants.FRIDAY: {\n\t\t \t\t \t\t\tif(sourceData.getFridayFlag()==1){\n\t\t \t\t \t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isEndDateParamIsHolidayDate(endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t totalAgingInSameDays=0L;\n\t\t\t\t\t\t\t\t\t\t\t }else{\n\t\t \t\t \t\t\t\t\t Integer day=DateTimeConstants.FRIDAY;\n\t\t Integer totalSecondRest=sourceData.getSecondFridayRest();\n\t\t totalAgingInSameDays=getTotalAgingFromSameDay(day,endDateParam,startDateParam,totalSecondRest,ticketRests);\n\t\t \t\t \t\t\t\t }\n\t\t \t\t \t\t\t}else{\n\t\t \t\t \t\t\t\ttotalAgingInSameDays=0L;\n\t\t \t\t \t\t\t}\n \t\t \t\t\t break;}\n \t\t \t\t case DateTimeConstants.SATURDAY: {\n \t\t \t\t\t \n\t\t \t\t \t\t\tif(sourceData.getSaturdayFlag()==1){\n\t\t \t\t \t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isEndDateParamIsHolidayDate(endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t totalAgingInSameDays=0L;\n\t\t\t\t\t\t\t\t\t\t\t }else{\n\t\t \t\t \t\t\t\t\t Integer day=DateTimeConstants.SATURDAY;\n\t\t Integer totalSecondRest=sourceData.getSecondSaturdayRest();\n\t\t totalAgingInSameDays=getTotalAgingFromSameDay(day,endDateParam,startDateParam,totalSecondRest,ticketRests);\n\t\t \t\t \t\t\t\t }\n\t\t \t\t \t\t\t}else{\n\t\t \t\t \t\t\t\ttotalAgingInSameDays=0L;\n\t\t \t\t \t\t\t}\n \t\t \t\t\t \n \t\t \t\t\t break;}\n \t\t \t\tcase DateTimeConstants.SUNDAY: {\n \t\t \t\t\t\n \t\t \t\t\tif(sourceData.getSundayFlag()==1){\n \t\t \t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t boolean isHoliday=isEndDateParamIsHolidayDate(endDateParam,includeHoliday,ticketHolidays);\n\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t totalAgingInSameDays=0L;\n\t\t\t\t\t\t\t\t\t }else{\n \t\t \t\t\t\t\t Integer day=DateTimeConstants.SUNDAY;\n Integer totalSecondRest=sourceData.getSecondSundayRest();\n totalAgingInSameDays=getTotalAgingFromSameDay(day,endDateParam,startDateParam,totalSecondRest,ticketRests);\n \t\t \t\t\t\t }\n\t \t\t \t\t\t}else{\n\t \t\t \t\t\t\ttotalAgingInSameDays=0L;\n\t \t\t \t\t\t}\n \t\t \t\t\t\n \t\t \t\t\t break;}\n \t\t\n \t\t }\n \t\t \n\n \t\tLong detik=totalAgingInSameDays;\n \t Long menit=detik/60;\n \t Long jam=menit/60;\n \t \n \t\tSystem.out.println(\" Detik in Same Days \"+detik+\" Menit \"+menit+\" Jam \"+jam);\n }else{\n \t // Jika rentang hari >0 \n\t\t\t \t // Menghitung Hari Pertama \n\t\t\t \t // Memperhatikan Start - Sampai End. Respon End nya di isi end kerja\n\t\t\t \t // JIKA HARI YANG BERBEDA , MAKA PISAHKAN PERHITUNGAN \n\t\t\t \t\n \t \t\t\t // PERHITUNGAN HARI PERTAMA\n\t\t\t \t LocalDateTime endDateParamForLastDay=LocalDateTime.fromDateFields(endDateParam.toDate());\n\t\t\t \t LocalDateTime endDateParamForFirstDay=LocalDateTime.fromDateFields(endDateParam.toDate());\n\t\t\t \t LocalDateTime startDateParamForFirstDay=LocalDateTime.fromDateFields(startDateParam.toDate());\n\t\t\t \t \n\t\t \t\t switch (startDateParam.getDayOfWeek()) {\n\t\t\t \t\t \t\tcase DateTimeConstants.MONDAY: { \n\t\t\t\t Integer day=DateTimeConstants.MONDAY;\n\t\t\t\t Integer totalSecondRest=sourceData.getSecondMondayRest();\n\t\t\t\t // End di isi respon start\n\t\t\t\t // karena tgl akhir bekerja terkadang tidak sesuai dengan \n\t\t\t\t // database , jadi untuk mendapatkan hari yang sama, tgl yang sama \n\t\t\t\t // dan diisi work end pada respon start\n\t\t\t\t //Start berbeda2, work end sama\n\t\t\t\t if(sourceData.getMondayFlag()==1){\n\t\t\t\t\t\t \t\t \t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParamForFirstDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t \ttotalAgingFirstDays=0L;\n\t\t\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t \t\t\t Date endDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t LocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusHours(sourceData.getMondayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusMinutes(sourceData.getMondayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusSeconds(sourceData.getMondayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t endDateParamForFirstDay=localReponEnd;\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t totalAgingFirstDays=calculateTotalAgingForFirstDay(day,endDateParamForFirstDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t \t\ttotalAgingFirstDays=0L;\n\t\t\t\t \t}\n\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t \t\t \t\tcase DateTimeConstants.TUESDAY: { \n\t\t\t\t\t\t\t \t\t if(sourceData.getTuesdayFlag()==1){\n\t\t\t\t\t\t\t \t\t \tInteger includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParamForFirstDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t \t totalAgingFirstDays=0L;\n\t\t\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t \t\t \t\t\t Integer day=DateTimeConstants.TUESDAY;\n\t\t\t\t\t\t\t Integer totalSecondRest=sourceData.getSecondTuesdayRest();\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t Date endDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t LocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour end work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusHours(sourceData.getTuesdayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusMinutes(sourceData.getTuesdayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusSeconds(sourceData.getTuesdayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t endDateParamForFirstDay=localReponEnd;\n\t\t\t\t\t\t\t totalAgingFirstDays=calculateTotalAgingForFirstDay(day,endDateParamForFirstDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t \t\t \t\ttotalAgingFirstDays=0L;\n\t\t\t\t\t\t\t \t\t \t}\n\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t \t\t \t\t\n\t\t\t \t\t \t\tcase DateTimeConstants.WEDNESDAY: { \n\t\t\t \t\t \t\t\t\n\t\t\t\t \t\t \t\t if(sourceData.getWednesdayFlag()==1){\n\t\t\t\t \t\t \t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParamForFirstDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t \t totalAgingFirstDays=0L;\n\t\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \t\t \t\t\t Integer day=DateTimeConstants.WEDNESDAY;\n\t\t\t\t\t\t Integer totalSecondRest=sourceData.getSecondWednesdayRest();\n\t\t\t\t\t\t \n\t\t\t\t\t\t Date endDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t LocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour end work \n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusHours(sourceData.getWednesdayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusMinutes(sourceData.getWednesdayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusSeconds(sourceData.getWednesdayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t endDateParamForFirstDay=localReponEnd;\n\t\t\t\t\t\t totalAgingFirstDays=calculateTotalAgingForFirstDay(day,endDateParamForFirstDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \t\t \t\ttotalAgingFirstDays=0L;\n\t\t\t\t\t\t \t\t \t}\n\t\t\t break;\n\t\t\t\t }\n\t\t\t\t \t\t \tcase DateTimeConstants.THURSDAY: { \n\t\t\t\t\t\t\t \t\tif(sourceData.getThursdayFlag()==1){\n\t\t\t\t\t\t\t \t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParamForFirstDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t\t \t totalAgingFirstDays=0L;\n\t\t\t\t\t\t\t\t\t\t\t\t }else{\t \n\t\t\t\t\t\t\t \t\t\t\t\t Integer day=DateTimeConstants.THURSDAY;\n\t\t\t\t\t\t\t Integer totalSecondRest=sourceData.getSecondThursdayRest();\n\t\t\t\t\t\t\t Date endDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t LocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour end work \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusHours(sourceData.getThursdayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusMinutes(sourceData.getThursdayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusSeconds(sourceData.getThursdayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t endDateParamForFirstDay=localReponEnd;\n\t\t\t\t\t\t\t totalAgingFirstDays=calculateTotalAgingForFirstDay(day,endDateParamForFirstDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t \t\t\ttotalAgingFirstDays=0L;\n\t\t\t\t\t\t\t \t\t}\n\t\t\t\t \t\t \t\t\n\t\t\t break;\n\t\t\t\t }\n\t\t\t\t \t\t \t\n\t\t\t\t\t \t\t case DateTimeConstants.FRIDAY: { \n\t\t\t\t\t\t\t\t if(sourceData.getFridayFlag()==1){\n\t\t\t\t\t\t\t\t \tInteger includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParamForFirstDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t \t totalAgingFirstDays=0L;\n\t\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t \t\t Integer day=DateTimeConstants.FRIDAY;\n\t\t\t\t\t\t Integer totalSecondRest=sourceData.getSecondFridayRest();\n\t\t\t\t\t\t \n\t\t\t\t\t\t Date endDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t LocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour end work \n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusHours(sourceData.getFridayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusMinutes(sourceData.getFridayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusSeconds(sourceData.getFridayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t endDateParamForFirstDay=localReponEnd;\n\t\t\t\t\t\t totalAgingFirstDays=calculateTotalAgingForFirstDay(day,endDateParamForFirstDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t \t\ttotalAgingFirstDays=0L;\n\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t \t\t\t break;\n\t\t\t\t }\n\t\t\t\t\t \t\t \n\t\t\t\t\t \t\t case DateTimeConstants.SATURDAY: { \n\t\t\t\t\t \t\t\t \n\t\t\t\t\t \t\t\t if(sourceData.getSaturdayFlag()==1){\n\t\t\t\t\t \t\t\t \tInteger includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParamForFirstDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t \t totalAgingFirstDays=0L;\n\t\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t \t\t Integer day=DateTimeConstants.SATURDAY;\n\t\t\t\t\t\t Integer totalSecondRest=sourceData.getSecondSaturdayRest();\n\t\t\t\t\t\t Date endDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t\t LocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour end work \n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusHours(sourceData.getSaturdayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusMinutes(sourceData.getSaturdayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusSeconds(sourceData.getSaturdayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t\t endDateParamForFirstDay=localReponEnd;\n\t\t\t\t\t\t totalAgingFirstDays=calculateTotalAgingForFirstDay(day,endDateParamForFirstDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t \t\ttotalAgingFirstDays=0L;\n\t\t\t\t\t\t\t\t \t}\n\t\t\t break;\n\t\t\t\t }\n\t\t\t\t\t \t\t case DateTimeConstants.SUNDAY: { \n\t\t\t\t\t \t\t\t if(sourceData.getSundayFlag()==1){\n\t\t\t\t\t \t\t\t\tInteger includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(startDateParamForFirstDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t \t totalAgingFirstDays=0L;\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t \t\t\t\t\t Integer day=DateTimeConstants.SUNDAY;\n\t\t\t\t\t Integer totalSecondRest=sourceData.getSecondSundayRest();\n\t\t\t\t\t Date endDateParamTemp=Utils.removeTime(startDateParam.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t LocalDateTime localReponEnd=LocalDateTime.fromDateFields(endDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour end work \n\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusHours(sourceData.getSundayToTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusMinutes(sourceData.getSundayToTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t localReponEnd=localReponEnd.plusSeconds(sourceData.getSundayToTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t\t\t endDateParamForFirstDay=localReponEnd;\n\t\t\t\t\t totalAgingFirstDays=calculateTotalAgingForFirstDay(day,endDateParamForFirstDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t \t\t\t\t\ttotalAgingFirstDays=0L;\n\t\t\t\t \t\t\t\t}\n\t\t\t break;\n\t\t\t\t }\n\t\t \t\t }\n\t\t \t\t Long detikAgingFisrtDay=totalAgingFirstDays;\n\t\t \t\t Long menitAgingFisrtDay=detikAgingFisrtDay/60;\n\t\t \t\t Long jamAgingFisrtDay=menitAgingFisrtDay/60;\n\t\t \t\t \n\t\t \t\t System.out.println(\"\\n First Day : Detik \"+detikAgingFisrtDay +\"Menit : \"+menitAgingFisrtDay+\" Jam : \"+jamAgingFisrtDay);\n\t\t \t\t //=========================================\n\t\t \t\t //END HARI PERTAMA\n\t\t \t\t //==========================================\n \t\t \n\t\t\t \t // START CALCULATE BETWEEN DAYS \n\t\t\t \t // cek jika diantara tanggal tengah ada yang libur atau \n\t\t \t\t System.out.println(\"Rentang Hari \"+days);\n\t\t \t\t System.out.println(\"======================\");\n\t\t \t\t System.out.println(\"Start Between Days\");\n\t\t \t\t Long tempBetweenDays=new Long(0L);\n\t\t\t \t for (int i=1; i<days; i++) {\n\t\t\t\t\t\t\t\t LocalDateTime curentStartWork=startDateParam.plusDays(i);\n\t\t\t\t\t\t\t\t if(curentStartWork.getDayOfWeek()==DateTimeConstants.MONDAY){\n\t\t\t\t\t\t\t\t\t if(sourceData.getMondayFlag()==1){\n\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(curentStartWork, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=Long.valueOf(sourceData.getMondayWorkSec());\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }else if(curentStartWork.getDayOfWeek()==DateTimeConstants.TUESDAY){\n\t\t\t\t\t\t\t\t\t if(sourceData.getTuesdayFlag()==1){\n\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(curentStartWork, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=Long.valueOf(sourceData.getTuesdayWorkSec());\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }else if(curentStartWork.getDayOfWeek()==DateTimeConstants.WEDNESDAY){\n\t\t\t\t\t\t\t\t\t if(sourceData.getWednesdayFlag()==1){\n\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(curentStartWork, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=Long.valueOf(sourceData.getWednesdayWorkSec());\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }else if(curentStartWork.getDayOfWeek()==DateTimeConstants.THURSDAY){\n\t\t\t\t\t\t\t\t\t if(sourceData.getThursdayFlag()==1){\n\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(curentStartWork, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=Long.valueOf(sourceData.getThursdayWorkSec());\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }else if(curentStartWork.getDayOfWeek()==DateTimeConstants.FRIDAY){\n\t\t\t\t\t\t\t\t\t if(sourceData.getFridayFlag()==1){\n\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(curentStartWork, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=Long.valueOf(sourceData.getFridayWorkSec());\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }else if(curentStartWork.getDayOfWeek()==DateTimeConstants.SATURDAY){\n\t\t\t\t\t\t\t\t\t if(sourceData.getSaturdayFlag()==1){\n\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(curentStartWork, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=Long.valueOf(sourceData.getSaturdayWorkSec());\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }else if(curentStartWork.getDayOfWeek()==DateTimeConstants.SUNDAY){\n\t\t\t\t\t\t\t\t\t if(sourceData.getSundayFlag()==1){\n\t\t\t\t\t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(curentStartWork, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=Long.valueOf(sourceData.getSundayWorkSec());\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t System.out.println(\"Hari Ke \"+i+\" \"+tempBetweenDays);\n\t\t\t\t\t\t\t\t totalAgingBetweenDays=totalAgingBetweenDays+tempBetweenDays;\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t }\n\t\t\t \t \n\t\t\t \tSystem.out.println(\"End Between Days.... \");\n\t\t\t \t // END CALCULATE BETWEEN DAYS \n\t\t\t \t \n\t\t\t \t Long detikBetweenDays=totalAgingBetweenDays;\n\t\t\t \t\t\tLong menitBetweenDay=detikBetweenDays/60;\n\t\t\t \t\t\tLong jamBetweenDay=menitBetweenDay/60;\n\t\t\t \t\t\t\n\t\t\t \t\tSystem.out.println(\"\\n Detik between days :\"+detikBetweenDays+\" Menit : \"+menitBetweenDay+\" Jam : \"+jamBetweenDay);\n \t \n\t\t\t \t \n\t\t\t // CALCULATE LAST DAYS\n \t\t // yang harus di ke defaul adalah hari starnya\n \t\t // karena akan mengambil waktu dari end - start, waktu pada hari itu\n \t\t \n \t\t // RESPON_START=REMOVE_TGL(RESPON_END)+JAM,MENIT,DETIK START WORK (untuk memastikan tanggal sama)\n \t\t // TERKADANG TANGGAL START WORK DI DATABASE TANGGALNYA BERBEDA , MISAL TANGGAL 2016-02-02, padahal ticket 2017\n \t\t switch (endDateParamForLastDay.getDayOfWeek()) {\n \t\t \t\tcase DateTimeConstants.MONDAY: { \n \n \t\t \t\t\t\t\tif(sourceData.getMondayFlag()==1){\n \t\t \t\t\t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(endDateParamForLastDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t Integer day=DateTimeConstants.MONDAY;\n\t\t\t\t\t\t\t\t\t\t Integer totalSecondRest=sourceData.getSecondMondayRest();\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t Date startDateParamTemp=Utils.removeTime(endDateParamForLastDay.toDate());\n\t\t\t\t\t\t\t\t\t\t LocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t // move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusHours(sourceData.getMondayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusMinutes(sourceData.getMondayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusSeconds(sourceData.getMondayFromTime().getSeconds());\n\t\t\t\t\t\t\t\t\t\t startDateParam=localReponStart;\n\t\t\t\t\t\t\t\t\t\t totalAgingLastDays=getTotalAgingFromLastDay(day,endDateParamForLastDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t }\n \t\t \t\t\t\t\t}else{\n \t\t \t\t\t\t\t\ttotalAgingLastDays=0L;\n \t\t \t\t\t\t\t}\n\t break;\n\t }\n \t\t \t\tcase DateTimeConstants.TUESDAY: { \n \t\t \t\t\tif(sourceData.getTuesdayFlag()==1){\n \t\t \t\t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(endDateParamForLastDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t }else{\n\t \t\t \t\t\t Integer day=DateTimeConstants.TUESDAY;\n\t Integer totalSecondRest=sourceData.getSecondTuesdayRest();\n\t\n\t Date startDateParamTemp=Utils.removeTime(endDateParamForLastDay.toDate());\n\t\t\t\t\t\t\t\t LocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusHours(sourceData.getTuesdayFromTime().getHours());\n\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusMinutes(sourceData.getTuesdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusSeconds(sourceData.getTuesdayFromTime().getSeconds());\n\t startDateParam=localReponStart;\n\t \n\t totalAgingLastDays=getTotalAgingFromLastDay(day,endDateParamForLastDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t }\n\t\t\t\t\t }else{\n\t \t\t\t\t\t\ttotalAgingLastDays=0L;\n\t \t\t\t\t\t}\n\t break;\n\t }\n \t\t \t\t\n \t\t \t\tcase DateTimeConstants.WEDNESDAY: { \n \t\t \t\t\tif(sourceData.getWednesdayFlag()==1){\n \t\t \t\t\t \n \t\t \t\t\t\tboolean isIncludeHoliday=false;\n \t\t \t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(endDateParamForLastDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t }else{\n \t\t \t\t\t\t Integer day=DateTimeConstants.WEDNESDAY;\n\t Integer totalSecondRest=sourceData.getSecondWednesdayRest();\n\t\n\t Date startDateParamTemp=Utils.removeTime(endDateParamForLastDay.toDate());\n\t\t\t\t\t\t\t\t LocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusHours(sourceData.getWednesdayFromTime().getHours());\n\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusMinutes(sourceData.getWednesdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusSeconds(sourceData.getWednesdayFromTime().getSeconds());\n\t startDateParam=localReponStart;\n\t \n totalAgingLastDays=getTotalAgingFromLastDay(day,endDateParamForLastDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t }\n \t\t \t\t\t }else{\n\t\t \t\t\t\t\t\ttotalAgingLastDays=0L;\n\t\t \t\t\t\t\t}\n break;\n }\n \t\t \tcase DateTimeConstants.THURSDAY: {\n\t\t\t\t\t \t\t if(sourceData.getThursdayFlag()==1){\n\t\t\t\t\t \t\t\tboolean isIncludeHoliday=false;\n\t\t\t \t\t \t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(endDateParamForLastDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t }else{\t\t\n\t\t\t\t\t\t \t\t \t Integer day=DateTimeConstants.THURSDAY;\n\t\t\t\t\t Integer totalSecondRest=sourceData.getSecondThursdayRest();\n\t\t\t\t\t\n\t\t\t\t\t Date startDateParamTemp=Utils.removeTime(endDateParamForLastDay.toDate());\n\t\t\t\t\t\t\t\t\t\t\t LocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusHours(sourceData.getThursdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusMinutes(sourceData.getThursdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusSeconds(sourceData.getThursdayFromTime().getSeconds());\n\t\t\t\t\t startDateParam=localReponStart;\n\t\t\t\t \n\t\t\t\t\t totalAgingLastDays=getTotalAgingFromLastDay(day,endDateParamForLastDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t}else{\n\t\t \t\t \t\t\t\t\t\ttotalAgingLastDays=0L;\n\t\t \t\t \t\t\t\t\t}\n\t\t break;\n\t\t }\n \t\t \t\n\t\t\t\t \t\t case DateTimeConstants.FRIDAY: { \n\t\t\t\t \t\t\tif(sourceData.getFridayFlag()==1){\n\t\t\t\t \t\t\t\tboolean isIncludeHoliday=false;\n\t\t\t \t\t \t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(endDateParamForLastDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t }else{\t\n\t\t\t\t\t\t \t\t\t Integer day=DateTimeConstants.FRIDAY;\n\t\t\t\t\t Integer totalSecondRest=sourceData.getSecondFridayRest();\n\t\t\t\t\t\n\t\t\t\t\t Date startDateParamTemp=Utils.removeTime(endDateParamForLastDay.toDate());\n\t\t\t\t\t\t\t\t\t\t\t LocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusHours(sourceData.getFridayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusMinutes(sourceData.getFridayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusSeconds(sourceData.getFridayFromTime().getSeconds());\n\t\t\t\t\t startDateParam=localReponStart;\n\t\t\t\t\t \n\t\t\t\t\t totalAgingLastDays=getTotalAgingFromLastDay(day,endDateParamForLastDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }else{\n\t\t \t\t \t\t\t\t\t\ttotalAgingLastDays=0L;\n\t\t \t\t \t\t\t\t\t}\n\t\t\t break;\n\t\t\t }\n\t \t\t \n\t\t\t \t\t case DateTimeConstants.SATURDAY: { \n\t\t\t \t\t\t if(sourceData.getSaturdayFlag()==1){\n\t\t\t\t \t\t\t \tboolean isIncludeHoliday=false;\n\t\t\t\t \t\t \t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(endDateParamForLastDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t \t\t\t Integer day=DateTimeConstants.SATURDAY;\n\t\t\t\t\t\t Integer totalSecondRest=sourceData.getSecondSaturdayRest();\n\t\t\t\t\t\t\n\t\t\t\t\t\t Date startDateParamTemp=Utils.removeTime(endDateParamForLastDay.toDate());\n\t\t\t\t\t\t\t\t\t\t\t\t LocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusHours(sourceData.getSaturdayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusMinutes(sourceData.getSaturdayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusSeconds(sourceData.getSaturdayFromTime().getSeconds());\n\t\t\t\t\t\t startDateParam=localReponStart;\n\t\t\t\t\t\t \n\t\t\t\t\t\t totalAgingLastDays=getTotalAgingFromLastDay(day,endDateParamForLastDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t }else{\n\t\t \t\t \t\t\t\t\t\ttotalAgingLastDays=0L;\n\t\t \t\t \t\t\t\t\t}\n\t\t break;\n\t\t }\n\t\t \t\t case DateTimeConstants.SUNDAY: { \n\t\t \t\t\t if(sourceData.getSaturdayFlag()==1){\n\t\t \t\t\t\tboolean isIncludeHoliday=false;\n\t \t\t \t\t\t Integer includeHoliday=sourceData.getIncludeHoliday();\n\t\t\t\t\t\t\t boolean isHoliday=isTheDateIsHolidayDate(endDateParamForLastDay, endDateParamForFirstDay, includeHoliday, ticketHolidays);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t if(isHoliday){\n\t\t\t\t\t\t\t\t tempBetweenDays=0L;\n\t\t\t\t\t\t\t }else{\n\t\t\t\t \t\t\t Integer day=DateTimeConstants.SUNDAY;\n\t\t\t Integer totalSecondRest=sourceData.getSecondSundayRest();\n\t\t\t\n\t\t\t Date startDateParamTemp=Utils.removeTime(endDateParamForLastDay.toDate());\n\t\t\t\t\t\t\t\t\t LocalDateTime localReponStart=LocalDateTime.fromDateFields(startDateParamTemp);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// move Date with hour 00:00:00 to hour start work \n\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusHours(sourceData.getSundayFromTime().getHours());\n\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusMinutes(sourceData.getSundayFromTime().getMinutes());\n\t\t\t\t\t\t\t\t\t localReponStart=localReponStart.plusSeconds(sourceData.getSundayFromTime().getSeconds());\n\t\t\t startDateParam=localReponStart;\n\t\t\t \n\t\t\t totalAgingLastDays=getTotalAgingFromLastDay(day,endDateParamForLastDay,startDateParam,totalSecondRest,ticketRests);\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t }else{\n \t\t \t\t\t\t\t\ttotalAgingLastDays=0L;\n \t\t \t\t\t\t\t }\n\t break;\n\t }\n \t\t }\n \t\t \n\t \t\t//END CALCULATE LAST DAYS\n\t \t\t//END CALCULATE LAST DAYS\n\t \t\t//END CALCULATE LAST DAYS\n \t\t \n } // END IF DAYS>0\n\t\t}else{\n\t\t\t//Jika end>start \n\t\t\ttotalAging=0L;\n\t\t}\n\t\t\n\t\tLong detik=totalAgingLastDays;\n\t\tLong menit=detik/60;\n\t\tSystem.out.println(\" \\n ============================== \\n Last Day : \"+detik+\" Menit Last day : \"+menit+\" Jam : \"+menit/60);\n\t\tSystem.out.println(\"=================================\\n\");\n\t\tSystem.out.println(\" \\n Respon End : \"+endDateParam+\" \\n\\n totalAgingInSameDays :\"+totalAgingInSameDays+\" totalAgingFirstDays :\"+totalAgingFirstDays+\" totalAgingBetweenDays :\"+totalAgingBetweenDays+\" totalAgingLastDays :\"+totalAgingLastDays);\n\t\t\n\t\t\n\t\ttotalAging=totalAgingInSameDays+totalAgingFirstDays+totalAgingBetweenDays+totalAgingLastDays;\n\t\treturn totalAging;\n\t}",
"public int getLBR_CollectionReturnDays();",
"public static int diferenciaFechas(Date f1, Date f2){\n \n long difMili = f1.getTime() - f2.getTime();\n long dif = (difMili / (1000*60*60*24));\n return (int) dif;\n }",
"public static int CalcularDiferenciaDiasFechas(Date fecha1, Date fecha2){\n Calendar cal1 = Calendar.getInstance();\r\n Calendar cal2 = Calendar.getInstance();\r\n cal1.setTime(fecha1);\r\n cal2.setTime(fecha2);\r\n // conseguir la representacion de la fecha en milisegundos\r\n long milis1 = cal1.getTimeInMillis();\r\n long milis2 = cal2.getTimeInMillis();\r\n // calcular la diferencia en milisengundos\r\n long diff = milis2 - milis1;\r\n // calcular la diferencia en horas\r\n Long diffHours = diff / (24 * 60 * 60 * 1000);\r\n return diffHours.intValue();\r\n }",
"public static int getNumberOfDays() {\n\t\treturn numberOfDays;\n\t}",
"public static int diasParaFecha(Date fechafin) {\n try {\n System.out.println(\"Fecha = \" + fechafin + \" / \");\n GregorianCalendar fin = new GregorianCalendar();\n fin.setTime(fechafin);\n System.out.println(\"fin=\" + CalendarToString(fin, \"dd/MM/yyyy\"));\n GregorianCalendar hoy = new GregorianCalendar();\n System.out.println(\"hoy=\" + CalendarToString(hoy, \"dd/MM/yyyy\"));\n\n if (fin.get(Calendar.YEAR) == hoy.get(Calendar.YEAR)) {\n System.out.println(\"Valor de Resta simple: \"\n + String.valueOf(fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR)));\n return fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR);\n } else {\n int diasAnyo = hoy.isLeapYear(hoy.get(Calendar.YEAR)) ? 366\n : 365;\n int rangoAnyos = fin.get(Calendar.YEAR)\n - hoy.get(Calendar.YEAR);\n int rango = (rangoAnyos * diasAnyo)\n + (fin.get(Calendar.DAY_OF_YEAR) - hoy\n .get(Calendar.DAY_OF_YEAR));\n System.out.println(\"dias restantes: \" + rango);\n return rango;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return 0;\n }",
"@SuppressLint(\"SimpleDateFormat\")\n public static List<String> getDaysBetweenDates(String startDate, String endDate)\n throws ParseException {\n List<String> dates = new ArrayList<>();\n\n DateFormat df = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(new SimpleDateFormat(\"dd.MM.yyyy\").parse(startDate));\n\n while (calendar.getTime().before(new SimpleDateFormat(\"dd.MM.yyyy\").parse(endDate)))\n {\n Date result = calendar.getTime();\n dates.add(df.format(result));\n calendar.add(Calendar.DATE, 1);\n }\n dates.add(endDate);\n return dates;\n }",
"Integer getDaysSpanned();",
"@Test\n public void shouldDisplayDaysExcludingWeekEndsSubday() {\n LocalDate date = LocalDate.of(2018,11,25);\n LocalDate newDate = LocalDate.of(2018,11,21);\n int offset = 2;\n int direction = -1;\n System.out.println(calcDate(date,offset,direction));\n\n assertEquals(newDate,calcDate(date,offset,direction),\"Should be equal\");\n\n }",
"private long getWorkingDayOfEmployeeByStartDateAndEndDate(final Date startDate, final Date endDate,\n final int emp_code) {\n Long result = this.dailyRepo.getWorkingDaysOfEmployeeByStartDateAndEndDate(emp_code, startDate, endDate)\n .getAnyResult();\n return (null != result) ? result : 0;\n }",
"private ArrayList<DateData> getDaysBetweenDates(Date startDate, Date endDate) {\n\n String language = UserDTO.getUserDTO().getLanguage();\n ArrayList<DateData> dataArrayList = new ArrayList<>();\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(startDate);\n\n while (calendar.getTime().before(endDate)) {\n Date result = calendar.getTime();\n try {\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", result));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", result));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", result));\n dataArrayList.add(new DateData(day, month, year, \"middle\"));\n calendar.add(Calendar.DATE, 1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", endDate));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", endDate));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", endDate));\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dataArrayList.add(new DateData(day, month, year, \"right\"));\n } else {\n dataArrayList.add(new DateData(day, month, year, \"left\"));\n }\n\n DateData dateData = dataArrayList.get(0);\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dateData.setBackground(\"left\");\n\n } else {\n dateData.setBackground(\"right\");\n }\n dataArrayList.set(0, dateData);\n return dataArrayList;\n }",
"public static int getFridayCountByDate(Date val) {\n\t\tint NumberOfFriday=0;\n\t\t Date StartDate=Utilities.getStartDateByDate(val);\n\t\t Date EndDate=Utilities.getEndDateByDate(val);\n\t\t \n\t\t Date CurrentDate = StartDate;\n\t\t \n\t\t while(true){\n\t\t\t if(Utilities.getDayOfWeekByDate(CurrentDate)==6){ //if it is Friday\n\t\t\t\t NumberOfFriday++;\n\t\t\t }\n\t\t\t \n\t\t\t if(DateUtils.isSameDay(CurrentDate, EndDate)){\n\t\t\t\t break;\n\t\t\t }\n\t\n\t\t\t CurrentDate = Utilities.getDateByDays(CurrentDate, 1);\n\t\t }\n\t \n\t\t return NumberOfFriday;\n\t}",
"public static int getDayBetweenDates(Date dBeginn, Date dEnde) {\r\n int iReturn = -1;\r\n\r\n long lngBetween = dEnde.getTime() - dBeginn.getTime();\r\n lngBetween = ((lngBetween / 1000) / 3600) / 24;\r\n\r\n iReturn = (int) lngBetween;\r\n\r\n return (iReturn);\r\n }",
"private long daysBetween() throws ParseException {\n Scanner input = new Scanner(System.in);\n System.out.println(\"Enter the date of when you rented the game dd/MM/yyyy:\");\n String dateReturn = input.nextLine();\n Date date = new SimpleDateFormat(\"dd/MM/yyyy\").parse(dateReturn);\n long interval = new Date().getTime() - date.getTime();\n return TimeUnit.DAYS.convert(interval, TimeUnit.MILLISECONDS);\n }",
"@ApiOperation(\n value = \"Calculate the work days for a certain period and person\",\n notes = \"The calculation depends on the working time of the person.\"\n )\n @GetMapping(\"/workdays\")\n @PreAuthorize(SecurityRules.IS_OFFICE)\n public ResponseWrapper<WorkDayResponse> workDays(\n @ApiParam(value = \"Start date with pattern yyyy-MM-dd\", defaultValue = RestApiDateFormat.EXAMPLE_YEAR + \"-01-01\")\n @RequestParam(\"from\")\n String from,\n @ApiParam(value = \"End date with pattern yyyy-MM-dd\", defaultValue = RestApiDateFormat.EXAMPLE_YEAR + \"-01-08\")\n @RequestParam(\"to\")\n String to,\n @ApiParam(value = \"Day Length\", defaultValue = \"FULL\", allowableValues = \"FULL, MORNING, NOON\")\n @RequestParam(\"length\")\n String length,\n @ApiParam(value = \"ID of the person\")\n @RequestParam(\"person\")\n Integer personId) {\n\n final LocalDate startDate;\n final LocalDate endDate;\n try{\n DateTimeFormatter fmt = DateTimeFormatter.ofPattern(RestApiDateFormat.DATE_PATTERN);\n startDate = LocalDate.parse(from, fmt);\n endDate = LocalDate.parse(to, fmt);\n } catch (DateTimeParseException exception) {\n throw new IllegalArgumentException(exception.getMessage());\n }\n\n if (startDate.isAfter(endDate)) {\n throw new IllegalArgumentException(\"Parameter 'from' must be before or equals to 'to' parameter\");\n }\n\n final Optional<Person> person = personService.getPersonByID(personId);\n\n if (!person.isPresent()) {\n throw new IllegalArgumentException(\"No person found for ID=\" + personId);\n }\n\n final DayLength howLong = DayLength.valueOf(length);\n final BigDecimal days = workDaysService.getWorkDays(howLong, startDate, endDate, person.get());\n\n return new ResponseWrapper<>(new WorkDayResponse(days.toString()));\n }",
"public long daysToDeadline() {\n return DateWrapper.getTimeBetween(Clock.now().getDateWrapper(), getDate(), ChronoUnit.DAYS);\n }",
"public int numberOfAvailableDays(List<Vacation> employeeVacationList) {\n\n int numberOfDays = 0;\n List<LocalDate> employeelistToCheck = getDaysBetweenDates(employeeVacationList);\n numberOfDays = maxDaysVacations - getTotalNumberOfWorkingDays(employeelistToCheck);\n\n if (numberOfDays < 0) {\n\n return -1;\n\n } else {\n\n return numberOfDays;\n }\n }",
"public static int getSubsequentFridayCountByDate(Date val) {\n\t\tint NumberOfFriday=0;\n\t\tDate StartDate=val;\n\t\tDate EndDate=Utilities.getEndDateByDate(val);\n\t\t \n\t\tDate CurrentDate = StartDate;\n\t\t \n\t\twhile(true){\n\t\t\t if(Utilities.getDayOfWeekByDate(CurrentDate)==6){ //if it is Friday\n\t\t\t\t NumberOfFriday++;\n\t\t\t }\n\t\t\t \n\t\t\t if(DateUtils.isSameDay(CurrentDate, EndDate)){\n\t\t\t\t break;\n\t\t\t }\n\t\n\t\t\t CurrentDate = Utilities.getDateByDays(CurrentDate, 1);\n\t\t}\n\t \n\t\t return NumberOfFriday;\n\t}",
"public static void main(String[] args) {\r\n\t Scanner in = new Scanner(System.in);\r\n\t int d1 = in.nextInt();\r\n\t int m1 = in.nextInt();\r\n\t int y1 = in.nextInt();\r\n\t int d2 = in.nextInt();\r\n\t int m2 = in.nextInt();\r\n\t int y2 = in.nextInt();\r\n\t LocalDate returnDate=LocalDate.of(y1,m1,d1);\r\n\t LocalDate dueDate=LocalDate.of(y2,m2,d2);\r\n\t long fine=0;\r\n\t if(returnDate.isBefore(dueDate)||returnDate.equals(dueDate))fine=0;\r\n\t else if(returnDate.isAfter(dueDate)){\r\n\t \tif(returnDate.getYear()==dueDate.getYear()){\r\n\t \t\tif(returnDate.getMonth()==dueDate.getMonth()){\r\n\t \t\t\tfine=(returnDate.getDayOfYear()-dueDate.getDayOfYear())*15;\r\n\t \t\t}else{\r\n\t \t\t\t\tfine=(returnDate.getMonthValue()-dueDate.getMonthValue())*500;\r\n\t \t\t\r\n\t \t}\r\n\t \t\t\r\n\t \t\t\r\n\t } else fine=10000;\r\n\t }else fine=10000;\r\n\t System.out.println(fine);\r\n\t }",
"public int getNumberOfDays()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1 || mn == 3 || mn == 5 || mn == 7 || mn == 8 || mn == 10 || mn == 12)\r\n {return 31;}\r\n if (mn == 4 || mn == 6 || mn == 9 || mn == 11)\r\n {return 30;}\r\n else\r\n {return 28;}\r\n }",
"@Test\n public void getBetweenDaysTest(){\n\n Date bDate = DateUtil.parse(\"2021-03-01\", DatePattern.NORM_DATE_PATTERN);//yyyy-MM-dd\n System.out.println(\"bDate = \" + bDate);\n Date eDate = DateUtil.parse(\"2021-03-15\", DatePattern.NORM_DATE_PATTERN);\n System.out.println(\"eDate = \" + eDate);\n List<DateTime> dateList = DateUtil.rangeToList(bDate, eDate, DateField.DAY_OF_YEAR);//创建日期范围生成器\n List<String> collect = dateList.stream().map(e -> e.toString(\"yyyy-MM-dd\")).collect(Collectors.toList());\n System.out.println(\"collect = \" + collect);\n\n }",
"static int countLeapYears(DaysBetween d) \n {\n int years = d.y;\n \n // Check if the current year needs to be considered\n // for the count of leap years or not\n if (d.m <= 2) \n {\n years--;\n }\n \n // An year is a leap year if it is a multiple of 4,\n // multiple of 400 and not a multiple of 100.\n return years / 4 - years / 100 + years / 400;\n }",
"public int daysBetween(Day day)\n\t{\n\t\tlong millisBetween = Math.abs(this.getDayStart(TimeZoneEx.GMT).getTime() - day.getDayStart(TimeZoneEx.GMT).getTime());\n\t\treturn (int) Math.round((float) millisBetween / (1000F * 60F * 60F * 24F));\n\t}",
"public abstract int daysInMonth(DMYcount DMYcount);",
"KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar);",
"public int monthsBetween(Date endDate) {\r\n\t\t// int monthDiff = 0;\r\n\t\t// if (month <= endDate.month) {\r\n\t\t// if (day <= endDate.day) {\r\n\t\t// monthDiff = (endDate.month - month)\r\n\t\t// + (endDate.year - year) * 12;\r\n\t\t// } else {\r\n\t\t// monthDiff = (endDate.month - month - 1)\r\n\t\t// + (endDate.year - year) * 12;\r\n\t\t// }\r\n\t\t// } else {\r\n\t\t// if (day <= endDate.day) {\r\n\t\t// monthDiff = (12 - month + endDate.month)\r\n\t\t// + (endDate.year - year - 1) * 12;\r\n\t\t// } else {\r\n\t\t// monthDiff = (11 - month + endDate.month)\r\n\t\t// + (endDate.year - year - 1) * 12;\r\n\t\t// }\r\n\t\t// }\r\n\t\t// return monthDiff;\r\n\r\n\t\t// Yuanzhe Begin:\r\n\t\tint monthsBetween = 0;\r\n\r\n\t\tif (compareTo(endDate) <= 0) {\r\n\t\t\tint tmpMonths = 0;\r\n\t\t\twhile (true) {\r\n\t\t\t\ttmpMonths++;\r\n\t\t\t\tDate tmpDate = this.addMonths(tmpMonths);\r\n\t\t\t\tif (tmpDate.compareTo(endDate) <= 0) {\r\n\t\t\t\t\tmonthsBetween++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn monthsBetween;\r\n\t\t} else {\r\n\t\t\tint tmpMonths = 0;\r\n\t\t\twhile (true) {\r\n\t\t\t\ttmpMonths++;\r\n\t\t\t\tDate tmpDate = endDate.addMonths(tmpMonths);\r\n\t\t\t\tif (tmpDate.compareTo(this) <= 0) {\r\n\t\t\t\t\tmonthsBetween++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn -monthsBetween;\r\n\t\t}\r\n\t\t// Yuanzhe End:\r\n\t}",
"public int days() {\n if (isInfinite()) {\n return 0;\n }\n Period p = new Period(asInterval(), PeriodType.days());\n return p.getDays();\n }",
"private static int dateDiff(final Date startDate, final Date endDate, final int field) {\n if (startDate == null) {\n throw new NullPointerException(\"start\");\n }\n\n if (endDate == null) {\n throw new NullPointerException(\"end\");\n }\n\n final Calendar start = Dates.toUTCCalendarWithoutTime(startDate);\n final Calendar end = Dates.toUTCCalendarWithoutTime(endDate);\n int elapsed = 0;\n\n if (start.before(end)) {\n while (start.before(end)) {\n start.add(field, 1);\n elapsed++;\n }\n } else if (start.after(end)) {\n while (start.after(end)) {\n start.add(field, -1);\n elapsed--;\n }\n }\n\n return elapsed;\n }",
"public int getTotalDays() {\r\n int totalDays = 0;\r\n for (int d = 0; d < 5; d++) {\r\n for (int h = 0; h < 13; h++) {\r\n if (weekData[d][h] != 0) {\r\n totalDays += 1;\r\n break;\r\n }\r\n }\r\n }\r\n return totalDays;\r\n }",
"@Test\r\n public void testifHoliday() {\r\n LocalDate date1 = LocalDate.parse(\"2018-01-12\");\r\n assertTrue(DateUtil.ifHoliday(date1));\r\n\r\n date1 = LocalDate.parse(\"2018-01-14\");\r\n assertFalse(DateUtil.ifHoliday(date1));\r\n }",
"@Test\n public void shouldDisplayDaysExcludingWeekEndsSaturday() {\n LocalDate date = LocalDate.of(2018,11,17);\n LocalDate newDate = LocalDate.of(2018,11,26);\n int offset = 5;\n int direction = 1;\n System.out.println(calcDate(date,offset,direction));\n\n assertEquals(newDate,calcDate(date,offset,direction),\"Should be equal\");\n\n }",
"public static int weeksBetween(final Date start, final Date end) {\n return Dates.dateDiff(start, end, Calendar.WEEK_OF_YEAR);\n }",
"public int getNumDaysForComponent(Record record);",
"public int between(\n CopticCalendar start,\n CopticCalendar end\n ) {\n\n return (int) start.until(end, this); // safe\n\n }",
"@Override\n protected void populateHolidays() {\n holidays.put(beginDate(), new Holiday(\"Christmas\", beginDate(), calendar, \"Matthew 1:18-25, Luke 2:1-20\"));\n Calendar holyInnocents = new GregorianCalendar(calendar.getYear() - 1, Calendar.DECEMBER, 28);\n holidays.put(holyInnocents, new Holiday(\"Holy Innocents\", holyInnocents, calendar, \"Matthew 2:13-23\"));\n Calendar epiphany = new GregorianCalendar(calendar.getYear(), Calendar.JANUARY, 6);\n holidays.put(epiphany, new Holiday(\"Epiphany\", epiphany, calendar, \"Matthew 2:1-12\"));\n Calendar presentation = new GregorianCalendar(calendar.getYear(), Calendar.FEBRUARY, 2);\n holidays.put(presentation, new Holiday(\"Presentation\", presentation, calendar, \"Luke 2:21-25\"));\n Calendar annunciation = new GregorianCalendar(calendar.getYear(), Calendar.MARCH, 25);\n if (endDate().compareTo(annunciation) < 0) holidays.put(annunciation, new Holiday(\"Annunciation\", annunciation, calendar, \"Luke 1:26-38\"));\n\n Calendar ashWednesday = (Calendar)holyWeek.beginDate().clone();\n ashWednesday.add(Calendar.DATE, -39);\n holidays.put(ashWednesday, new Holiday(\"Ash Wednesday\", ashWednesday, calendar,\n \"Matthew 3:13-4:11\", \"Mark 1:9-13\", \"Luke 3:21,22, 4:1-13\"));\n\n }",
"public static long daysTillNow(Date from) { \n \tDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \tDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n \tLocalDate dateBefore = LocalDate.parse(df.format(from), formatter);\n \treturn ChronoUnit.DAYS.between( dateBefore , LocalDate.now()); \t\n }",
"long getTermDays();",
"@Test\n\tpublic void shouldCountNumberOfHolidaysIn2014() throws Exception {\n\t\t//given\n\t\tfinal Stream<LocalDate> holidaysIn2014 =\n Stream.iterate(LocalDate.of(2014, 1, 1), d -> d.plusDays(1))\n .limit(Year.of(2014).length())\n .filter(d -> holidays.isHoliday(d));\n\n\t\t//when\n\t\tfinal long numberOfHolidays = holidaysIn2014.count();\n\n\t\t//then\n\t\tassertThat(numberOfHolidays).isEqualTo(113);\n\t}",
"@Test\n public void nbDaysAfterTestOk(){\n Date date = new Date(1,Month.january,1970);\n Date dateAfter = date.nbDaysAfter(10);\n assertEquals(dateAfter,new Date(11,Month.january,1970));\n assertEquals(date.nbDaysAfter(365),new Date(1,Month.january,1971));\n assertEquals(date.nbDaysAfter(31),new Date(1,Month.february,1970));\n }",
"public long difference() {\n long differenceBetweenDate = ChronoUnit.DAYS.between(startDate.toInstant(), endDate.toInstant());\n\n return differenceBetweenDate;\n\n }",
"public int getLBR_LatePaymentPenaltyDays();",
"public List<LocalDate> getDaysBetweenDates(List<Vacation> vacationList) {\n\n List<LocalDate> dateList = new ArrayList<>();\n for (Vacation vacation : vacationList) {\n\n long days = dateDiffInNumberOfDays(vacation.getVacationStartDay(), vacation.getVacationEndDay());\n for (int i = 0; i <= days; i++) {\n\n LocalDate d = vacation.getVacationStartDay().plus(i, ChronoUnit.DAYS);\n dateList.add(d);\n }\n }\n\n return dateList;\n }",
"public int getNumberOfDays() {\n return numberOfDays;\n }",
"public static int daysUntil(String dateString) throws ParseException {\r\n\t\t\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.UK);\t\t\t\r\n\t\tDate itemDate = (Date) sdf.parse(dateString);\r\n\t\tDate nowDate = (Date) sdf.parse(getTodaysDate());\r\n\t\treturn Days.daysBetween(new DateTime(nowDate), new DateTime(itemDate)).getDays();\r\n\t\t\r\n\t}",
"public static int GetDayOfWeek(int[] dateTime){\n int yr = dateTime[0];\n int mo = dateTime[1];\n int da = dateTime[2];\n int addon = 0; /* number of days that have advanced */\n boolean leap; /* is this year a leap year? */\n yr %= 400;\n if (yr < 0) yr += 400;\n /* is the current year a leap year? */\n if (((((yr % 4) == 0) && ((yr % 100) != 0)) || ((yr % 400) == 0))) {\n leap = true;\n } else leap = false;\n if ((mo < 1) || (mo > 12)) return 0; /* validate the month */\n if (da < 1) return 0; /* and day of month */\n if (leap && (mo == 2)) {\n if (da > (numdays[mo - 1] + 1)) return 0;\n } else if (da > numdays[mo - 1]) return 0;\n addon += yr; /* The day advances by one day every year */\n addon += yr / 4; /* An additional day if it is divisible bay 4 */\n addon -= yr / 100; /* Unless it is divisible by 100 */\n /* However, we should not count that\n extra day if the current year is a leap\n year and we haven't gone past 29th February */\n if (leap && (mo <= 2)) addon--;\n addon += totdays[mo - 1]; /* The day of the week increases by\n the number of days in all the months\n up till now */\n addon += da; /* the day of week advances for each day */\n /* Now as we all know, 2000-01-01 is a Saturday. Using this\n as our reference point, and the knowledge that we want to\n return 0..6 for Sunday..Saturday,\n we find out that we need to compensate by adding 6. */\n addon += 6;\n return (addon % 7); /* the remainder after dividing by 7\n gives the day of week */\n }",
"public int getHolidayDaysCountForWorkerAndYear(Worker wWorker, int year)\n {\n int holiday = 0;\n try\n {\n Query queryDeleteByDSId = getNamedQuery(Holiday.NQ_FIND_HOLIDAY_BY_WORKER_AND_YEAR);\n // set Worker\n queryDeleteByDSId.setParameter(Holiday.PARAMETER_WORKER, wWorker);\n // set Month\n queryDeleteByDSId.setParameter(Holiday.PARAMETER_YEAR, year);\n // execute and return result\n Object objResult = queryDeleteByDSId.getSingleResult();\n if (objResult != null)\n {\n holiday = (int) objResult;\n }\n\n }\n catch (Exception e)\n {\n Log.error(this, e, \"namedQuery getHolidayDaysCountForWorkerAndYear error\");\n }\n\n return holiday;\n }",
"DateDiff(Datum date1, Datum date2)\r\n\t{\r\n\t\t// Return when equal\r\n\t\tif (date1.equals(date2))\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Switch Min / Max\r\n\t\tDatum Maxdate = date1.kleinerDan(date2) ? date2 : date1;\r\n\t\tDatum minDate = date1.kleinerDan(date2) ? date1 : date2;\r\n\t\tminDate = new Datum(minDate); //Cloned for calculations\r\n\r\n\t\t// Not in same month or year? -> Add 1 month\r\n\t\twhile (minDate.getMonth() != Maxdate.getMonth()\r\n\t\t\t\t|| minDate.getYear() != Maxdate.getYear())\r\n\t\t{\r\n\t\t\t//Get the days of the month being processed.\r\n\t\t\tint dim = Maanden.get(minDate.getMonth()).GetLength(minDate.getYear());\r\n\t\t\tminDate.veranderDatum(dim); // Add 1 month\r\n\t\t\tdays += dim; //add days\r\n\t\t\tmonths++; // add one month\r\n\t\t}\r\n\t\t// Add or subtract remaining days (in same month)\r\n\t\tdays += Maxdate.getDay() - minDate.getDay();\r\n\t\t//Subtract one month if the MaxDay is bigger then MinDay\r\n\t\tmonths -= (Maxdate.getDay() < minDate.getDay() ? 1 : 0);\r\n\t}",
"double getAgeDays();",
"public int computeFine(int today);",
"public double fineAsToHours(int numOfDays,int h1,int h2,int m1, int m2){\n double fine=0.0;\n int y=0;\n\n //if overdue is minus there is no need to calculate a fine\n if(numOfDays<0){\n fine=0.0;\n }\n\n //if it is 0 if the reader returns book on or before the due hour, again no fine\n //if reader returns book after due hour minutes will be taken in to count\n else if(numOfDays==0){\n if(h2<=h1){\n fine=0.0;\n }\n else{\n //ex:if due=10.30, returnTime=12.20, fine will be charged only for 10.30 to 11.30 period\n //which is returnTime-1-due\n if(m2<m1){\n y=(h2-h1)-1;\n fine=y*0.2;\n }\n //if returnTime=12.45 fine will be charged for 10.30 to 12.45 period\n //which is returnTime-due\n else if(m2>=m1){\n y=h2-h1;\n fine=y*0.2;\n }\n }\n }\n\n //if over due is 3days or less\n else if(numOfDays<=3){\n //ex: due=7th 10.30, returned=9th 9.30\n //finr will be charged for 24h and the extra hours from 8th, and extra hours from 9th\n if(h2<=h1){\n y=((numOfDays-1)*24)+((24-h1)+h2);\n fine=y*0.2;\n }\n else{\n //ex: due=7th 10.30, returned= 9th 12.15\n //total 2*24h will be added. plus, time period frm 9th 10.30 to 11.30\n if(m2<m1){\n y=(numOfDays*24)+((h2-h1)-1);\n fine=y*0.2;\n }\n else if(m2>=m1){\n //returned=9th 12.45\n //total 2*24h, plus 2hours difference from 10.30 to 12.30\n y=(numOfDays*24)+(h2-h1);\n fine=y*0.2;\n }\n }\n\n }\n\n\n //same logic and will multiply the 1st 3 days form 0.2 as to the requirement\n\n else if(numOfDays>3){\n if(h2<=h1){\n y=((numOfDays-4)*24)+((24-h1)+h2);\n fine=(y*0.5)+(24*3*0.2);\n }\n\n else{\n if(m2<m1){\n y=((numOfDays-3)*24)+((h2-h1)-1);\n fine=(y*0.5)+(3*24*0.2);\n }\n\n else if(m2>m1){\n y=((numOfDays-3)*24)+(h2-h1);\n fine=(y*0.5)+(3*24*0.2);\n }\n }\n\n\n }\n\n return fine;\n\n }",
"private static int getNumDates() {\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Enter number of dates (1 or 2): \");\n\n int numDates = input.nextInt();\n while (numDates != 1 && numDates != 2) {\n System.out.print(\"Enter number of dates (1 or 2): \");\n numDates = input.nextInt();\n }\n return numDates;\n }",
"@Test\n public void shouldDisplayDaysExcludingWeekEndsSaturdayPlus5Days() {\n LocalDate date = LocalDate.of(2018,11,24);\n LocalDate newDate = LocalDate.of(2018,11,16);\n int offset = 5;\n int direction = -1;\n System.out.println(calcDate(date,offset,direction));\n\n assertEquals(newDate,calcDate(date,offset,direction),\"Should be equal\");\n\n }",
"public abstract double getLateFee(int daysLate);",
"public List<LocalDate> getWorkingDaysVacations(List<Vacation> vacationList) {\n\n List<LocalDate> listToReturn = new ArrayList<>();\n\n for (LocalDate date : getDaysBetweenDates(vacationList)) {\n\n if (dateDiffOfWeekend(date)) {\n\n listToReturn.add(date);\n }\n }\n return listToReturn;\n }",
"public static int getDaysFromNow(Date date) throws Exception{\n\n if(date != null) {\n Days daysbetween = Days.daysBetween(new DateTime(date.getTime()), new DateTime().now());\n return daysbetween.getDays();\n }\n else\n throw new Exception();\n }",
"public Integer getTotalDays()\r\n/* 68: */ {\r\n/* 69:67 */ return this.totalDays;\r\n/* 70: */ }",
"public static int countDaysLeft(String currentDate, String dueDate){\n // Part 1. In the case where the current date has passed the due date, the dueDateHasPassed method is called with the currentDate and dueDate arguments \n // as inputs. \n if(dueDateHasPassed(currentDate, dueDate)){\n return 0;\n }\n // Part 2. In the case where the current date and the due date share the same month and year, the remaining days is calculated.\n else if((getMonth(currentDate) == getMonth(dueDate)) && (getYear(currentDate) == getYear(dueDate))){\n int numofDays = getDay(dueDate) - getDay(currentDate);\n return numofDays;\n }\n // Part 3. In the case where the current date and the due date share only the same year, the remaining days is calculated. \n else if(getYear(currentDate) == getYear(dueDate)){\n int i = getMonth(currentDate);\n int j = getMonth(dueDate);\n int totalDaysFromMonths = 0;\n while(i<j){\n totalDaysFromMonths += getDaysInAMonth(i,getYear(currentDate));\n i++;\n }\n int totalDaysOfSameYear = totalDaysFromMonths - getDay(currentDate) + getDay(dueDate);\n return totalDaysOfSameYear;\n }\n // Part 4. All other cases will result in the due date being in the futre of a different year, that of the current date. The remaining days will be \n // calculated. \n else{\n int b = getYear(dueDate);\n int a = getYear(currentDate);\n int totalDaysFromYears = 0;\n while(a<b){\n if(isLeapYear(a)){\n totalDaysFromYears += 366;\n }\n else{ \n totalDaysFromYears += 365;\n }\n a++;\n }\n int i = 1;\n int totalDaysFromMonthsOfcurrentDateYear = 0;\n while(i<getMonth(currentDate)){\n totalDaysFromMonthsOfcurrentDateYear += getDaysInAMonth(i, getYear(currentDate));\n i++;\n }\n int j = 1;\n int totalDaysFromMonthsOfdueDateYear = 0;\n while(j<getMonth(dueDate)){\n totalDaysFromMonthsOfdueDateYear +=getDaysInAMonth(j, getYear(dueDate));\n j++;\n }\n int totalDays = totalDaysFromYears - totalDaysFromMonthsOfcurrentDateYear - getDay(currentDate) + totalDaysFromMonthsOfdueDateYear + getDay(dueDate);\n return totalDays;\n }\n }",
"@Override\n protected String serializeDaysBetween(ImmutableList<? extends ImmutableTerm> terms,\n Function<ImmutableTerm, String> termConverter, TermFactory termFactory) {\n return String.format(\"DATEDIFF(DAY, %s, %s) - IIF(CAST(%s AS TIME) > CAST(%s AS TIME), 1, 0)\",\n termConverter.apply(terms.get(1)),\n termConverter.apply(terms.get(0)),\n termConverter.apply(terms.get(1)),\n termConverter.apply(terms.get(0)));\n }"
] | [
"0.6983989",
"0.69461745",
"0.686179",
"0.68577135",
"0.65874076",
"0.64883614",
"0.6473815",
"0.6348795",
"0.634873",
"0.63160247",
"0.6278746",
"0.6277451",
"0.62307864",
"0.6193914",
"0.618769",
"0.61434686",
"0.61391836",
"0.60739475",
"0.60301363",
"0.60250366",
"0.59897375",
"0.59777415",
"0.5948764",
"0.593658",
"0.5922433",
"0.5894874",
"0.5885054",
"0.58785313",
"0.5849167",
"0.58176196",
"0.5815079",
"0.58076507",
"0.5802332",
"0.5755086",
"0.57517755",
"0.5736175",
"0.5707289",
"0.56863385",
"0.56626606",
"0.5656825",
"0.56384796",
"0.5576667",
"0.5560382",
"0.55445874",
"0.5515784",
"0.55109435",
"0.5506381",
"0.5498929",
"0.54975563",
"0.54886705",
"0.54681545",
"0.5459501",
"0.54457086",
"0.5419535",
"0.54164803",
"0.5406218",
"0.5401862",
"0.5401585",
"0.53883004",
"0.5369257",
"0.5364934",
"0.5364586",
"0.53553075",
"0.5353679",
"0.5343705",
"0.53192574",
"0.5286949",
"0.5274128",
"0.5272624",
"0.52678746",
"0.52665365",
"0.52656114",
"0.5254566",
"0.5234869",
"0.5210708",
"0.51997733",
"0.51673985",
"0.51623213",
"0.51600784",
"0.51596063",
"0.51585716",
"0.5146158",
"0.5134771",
"0.5106866",
"0.510193",
"0.50897694",
"0.5083223",
"0.50640106",
"0.5057398",
"0.5053976",
"0.5053342",
"0.50521344",
"0.50348943",
"0.5020658",
"0.50184584",
"0.50110066",
"0.50075674",
"0.49997365",
"0.49977237",
"0.4990363"
] | 0.76024675 | 0 |
/ Is the reason for being absent annual leave. | private boolean checksForAnnualLeaveAreOk(String reason, AbsentYear absYear, long numDaysRequested, int empId) {
if(reason.compareTo("Annual Leave") == 0) {
return (checkAnnualLeaveRequest(absYear, numDaysRequested, empId)) ? true : false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkEmployeesAnnualLeaveRecordForYear(AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tlong numDaysAbsent = empAbsentRepo.numDaysEmployeeHasBeenAbsent(absYear.getYear(), empId, \"Annual Leave\");\n\t\tlong annualLeave = rasRepo.findSeniority(empId).getHolidayEntitlement();\n\t\tlong diff = (annualLeave - numDaysAbsent) - numDaysRequested;\n\t\treturn (numDaysRequested <= (diff)) ? true : false;\n\t}",
"boolean hasRemainDays();",
"public boolean verifyLeaveDate(Date date){\t\t\n\t\tLocale en = new Locale(\"en\");\t\t\n\t\tString lDate = String.format(en, \"%1$ta, %1$tb %1$te, %1$tY\", date);\n\t\treturn leaveDate.getText().equals(lDate);\n\t}",
"public boolean isOverDue() {\n\t\treturn state == loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\r\n\t}",
"public boolean isLeave()\r\n { return type == LEAVE; }",
"public boolean isLate(){\n Date d = givenBack != null ? givenBack : new Date();\n return expirationDate.before(d);\n }",
"public AbsenceReason getAbsenceReason() {\n\treturn absenceReason;\n }",
"public boolean checkAnnualLeaveRequest(AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tif(employeeDoesNotHaveAnAbsentRecordForThisYear(absYear, empId)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn checkEmployeesAnnualLeaveRecordForYear(absYear, numDaysRequested, empId);\n\t}",
"public double getDayAbsent() {\n return dayAbsent;\n }",
"public boolean hasExam(int period, ExExam exclude) {\n return (iTable[period]!=null && !iTable[period].variable().equals(exclude));\n }",
"private boolean employeeDoesNotHaveAnAbsentRecordForThisYear(AbsentYear absYear, int empId) {\n\t\tList<EmployeeAbsent> empAbs = empAbsentRepo.findEmployeeAbsentRecordsForYear(absYear.getYear(), empId);\n\t\treturn (empAbs.isEmpty()) ? true : false;\n\t}",
"boolean hasLeaveGameReqeuest();",
"public boolean accrualEOMAdjustment()\n\t{\n\t\treturn _lsPeriod.get (0).periods().get (0).accrualEOMAdjustment();\n\t}",
"public EmployeeAbsent recordEmployeeAbsent(Employee emp, LocalDate startDate, LocalDate endDate, String reason) {\n\t\tEmployeeAbsent empAbs = null;\n\t\tAbsentYear absYear = findAbsentYear(emp, startDate);\n\t\tlong numDays = calculateNumberOfDaysAbsentInclusive(startDate, endDate);\n\t\tif(numDays > 0 ) {\n\t\t\tif(checksForAnnualLeaveAreOk(reason, absYear, numDays, emp.getEmpId())) {\n\t\t\t\tempAbs = GenericBuilder.of(EmployeeAbsent::new)\n\t\t\t\t\t\t.with(EmployeeAbsent::setAbsentStartDate, startDate)\n\t\t\t\t\t\t.with(EmployeeAbsent::setAbsentEndDate, endDate)\n\t\t\t\t\t\t.with(EmployeeAbsent::setAbsentYear, absYear)\n\t\t\t\t\t\t.with(EmployeeAbsent::setNumDays, numDays)\n\t\t\t\t\t\t.with(EmployeeAbsent::setReason, reason)\n\t\t\t\t\t\t.build();\n\t\t\t\tem.persist(empAbs);\n\t\t\t}\n\t\t}\n\t\treturn empAbs;\n\t}",
"public boolean isMaybeAbsent() {\n checkNotUnknown();\n return (flags & ABSENT) != 0;\n }",
"public boolean isNotAbsent() {\n return !isMaybeAbsent() && isMaybePresent();\n }",
"public Village getLeave() {\n\t\treturn leave;\n\t}",
"boolean hasEndDate();",
"boolean hasDepositEndTime();",
"public void setAbsenceReason(AbsenceReason absenceReason) {\n\tthis.absenceReason = absenceReason;\n }",
"public boolean twentyeightDays() {\n return this.month.equals(\"February\");\n }",
"public boolean experired() {\n\t\tint month = Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\tString[] parts = this.experiation.split(\"/\");\n\t\tString originalMonth = parts[0];\n\t\tint oM = Integer.parseInt(originalMonth);\n\t\tString originalYear = parts[1];\n\t\tint oY = Integer.parseInt(originalYear);\n\t\t\n\t\tif(oY < year) {\n\t\t\treturn true;\n\t\t}\n\t\tif(oY == year && oM < month) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasPast();",
"public boolean isReserved() {\n return target.searchLink(ParentLinkName.ENTERPRISE) != null;\n }",
"private boolean isPeriodEndOnInDocGeneratorResponse(DocumentGeneratorResponse response) {\n\n if (response.getDescriptionValues() == null ||\n !response.getDescriptionValues().containsKey(PERIOD_END_ON) ||\n StringUtils.isBlank(response.getDescriptionValues().get(PERIOD_END_ON))) {\n\n Map<String, Object> logMap = new HashMap<>();\n logMap.put(LOG_MESSAGE_KEY,\n \"Period end on has not been set within the description_values in the Document Generator Response\");\n\n LOGGER.error(LOG_DOC_GENERATOR_RESPONSE_INVALID_MESSAGE_KEY, logMap);\n return false;\n }\n\n return true;\n }",
"public void checkOverDue() {\n\t\tif (state == loanState.current && //changed 'StAtE' to 'state' and ' lOaN_sTaTe.CURRENT to loanState.current\r\n\t\t\tCalendar.getInstance().getDate().after(date)) { //changed Calendar.gEtInStAnCe to Calender.getInstance and gEt_DaTe to getDate and DaTe to date\r\n\t\t\tthis.state = loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\t\t\t\r\n\t\t} //added curly brackets\r\n\t}",
"public boolean tournamentNotEnded(int id) throws Exception {\n\t\tLocalDate today=LocalDate.now();\n\t\tLocalDate endDate;\n\t\tConnection con=ConnectionManager.getConnection();\n\t\tPreparedStatement pstmt = con.prepareStatement(\"select end_date from tournament where id=\"+id);\n\t\tResultSet rs = pstmt.executeQuery();\n\t\trs.next();\n\t\tendDate=rs.getDate(\"end_date\").toLocalDate();\n\t\tcon.close();\n\t\treturn (today.compareTo(endDate) <= 0); \n\t\t\n\t}",
"public Integer getAbsentDays()\r\n/* 58: */ {\r\n/* 59:59 */ return this.absentDays;\r\n/* 60: */ }",
"public boolean isNotPresentNotAbsent() {\n checkNotUnknown();\n return !isMaybeAbsent() && !isMaybePresent();\n }",
"public boolean expired(){\n return !Period.between(dateOfPurchase.plusYears(1), LocalDate.now()).isNegative();\n }",
"public String getLeavingDate();",
"public boolean isExpired() {\n\t\treturn this.maturityDt.before(Calendar.getInstance().getTime());\n\t}",
"boolean hasEndingHadithNo();",
"boolean bookingListIsNotFull(Book book);",
"@Override\n\tpublic boolean identifiesOffense() {\n\t\treturn false;\n\t}",
"public static String apply_for_leave(int empId,String start_date, String end_date, int no_ldays,String leave_type, String leave_reason)\r\n throws ParseException {\r\n String s=null;\r\n Employee e = Employee.listById(empId);\r\n if (e != null) {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date leave_from = sdf.parse(start_date);\r\n Date leave_to = sdf.parse(end_date);\r\n Calendar start = Calendar.getInstance();\r\n start.setTime(leave_from);\r\n Calendar end = Calendar.getInstance();\r\n end.setTime(leave_to);\r\n int count = 0;\r\n for (Date date = start.getTime(); start.before(end); start.add(Calendar.DATE, 1), date = start.getTime()) {\r\n Calendar c = Calendar.getInstance();\r\n c.setTime(date);\r\n int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n if (dayOfWeek == 1 || dayOfWeek == 7) {\r\n count++;\r\n }\r\n }\r\n System.out.println(count);\r\n long diff = leave_to.getTime() - leave_from.getTime();\r\n System.out.println(diff);\r\n long days = diff / (1000 * 60 * 60 * 24);\r\n Date today = new Date();\r\n String appliedOn = sdf.format(today);\r\n days = days + 1;\r\n long availBal = 0;\r\n long dif = 0;\r\n long updLeave = 0;\r\n String leaveStatus = null;\r\n // int overl = Leave.countNo(empId, start_date, end_date);\r\n availBal = e.getavailleaves();\r\n dif = availBal - days;\r\n updLeave = days - count;\r\n int bal = (int) updLeave;\r\n if (days <= 0) {\r\n s=\"Start Date Must be Greater than EndDate...\";\r\n } else if (dif < 0) {\r\n s=\"insufficient leav balance\";\r\n } else if (no_ldays != days) {\r\n s=\"NO Of Days Should be right\";\r\n } else if (leave_from.compareTo(sdf.parse(appliedOn)) < 0) {\r\n s=\"Start should be greater or equal to current date\";\r\n // } else if (overl > 0) {\r\n // s=\"already applied on given date\";\r\n } else {\r\n if (e.getMgr_id() == 0) {\r\n leaveStatus = \"APPROVED\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal, leave_type, leaveStatus, leave_reason, appliedOn);\r\n s=\"Leave Applied Successfully...\";\r\n } else {\r\n leaveStatus = \"PENDING\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, appliedOn);\r\n edao().decrement(empId, bal);\r\n s = \"Leave Applied Successfully For \" + (days - count) + \" Days.\";\r\n }\r\n }\r\n } else {\r\n s=\"invalid employee\";\r\n }\r\n return s;\r\n }",
"boolean hasIncomeRange();",
"public boolean hasExam(int period) {\n return (iTable[period]!=null);\n }",
"public boolean isPastSubmissionDeadline() {\r\n\t\tCalendar currentTime = Calendar.getInstance();\r\n\t\tif(currentTime.after(getConference().getManuscriptDueDate())) {\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\treturn false;\r\n\t}",
"public Boolean isExpired() {\n\t\tCalendar today = Calendar.getInstance();\n\t\treturn today.get(Calendar.DAY_OF_YEAR) != date.get(Calendar.DAY_OF_YEAR);\n\t}",
"public boolean esMayorDeEdad(){\r\n \t\tboolean mayor=false;\r\n \t\tif (obtenerAnios()>=18){\r\n\t\t\tmayor=true;\r\n\t\t}\r\n\t\treturn mayor;\r\n\t}",
"public boolean isAdjustedPunchOutsideShiftLunch() {\n \n verify_AdjustedTimeIsSet();\n return (adjustedLunchStatus == LunchStatus.NOT_OCCURRING);\n \n }",
"private boolean askToLeave(){\n\t\tint ask_leave_prompt = JOptionPane.YES_NO_OPTION;\n\t\tint ask_leave_result = JOptionPane.showConfirmDialog(this, \"Would you like to return to main menu?\\nYou will lose all progress\", \"Return To Main Menu\", ask_leave_prompt);\n\t\tif (ask_leave_result == JOptionPane.YES_OPTION){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Test\r\n\tpublic void testCancelAuctionOnAuctionDoesntExistForNonProfit(){\r\n\t\tCalendar c = new Calendar();\t\r\n\t\tassertFalse(c.cancelAuction(myNonProfit, myAuctDateMoreThan2Days, myCurrDate));\t\t\r\n\t}",
"public boolean hasEndDate() {\n return fieldSetFlags()[2];\n }",
"private void checksOldExpense() {\n DateUtils dateUtils = new DateUtils();\n\n // Breaking date string from date base\n String[] expenseDate = dateDue.getText().toString().split(\"-\");\n\n if((Integer.parseInt(expenseDate[GET_MONTH]) < Integer.parseInt(dateUtils.currentMonth))\n && (Integer.parseInt(expenseDate[GET_YEAR]) <= Integer.parseInt(dateUtils.currentYear))){\n\n }\n }",
"public boolean isNonLivrer() {\n\t\treturn getStatut().equals(StatusBonPreparation.NON_LIVRER);\n\t}",
"public boolean isUnproved() {\n\t\treturn proveState == UNPROVED;\n\t}",
"public boolean isUnsetAge() {\r\n\t\treturn age == -1;\r\n\t}",
"public boolean isOverdue(int today);",
"public static boolean isDead(Entity e) {\r\n return e.getAttribute(\"state:death\", false);\r\n }",
"public boolean isAccountNonExpired() {\n\t\treturn true;\r\n\t}",
"@Test\n public void isWarning_does_not_warn_if_project_is_closed() {\n when(expirationBefore.getExpirationPercent()).thenReturn(Optional.of(89));\n when(expirationAfter.getExpirationPercent()).thenReturn(Optional.of(96));\n when(project.isClosed()).thenReturn(true);\n\n // when\n boolean completionWarning = expirationThresholdViolationIndicator.isWarning(\"some-uuid\");\n\n // then\n assertFalse(completionWarning);\n }",
"boolean hasVisitEndtime();",
"boolean hasVisitEndtime();",
"boolean hasHasInjury();",
"public boolean isExpired() {\n\t\t// Return whether the exipred after time has passed in American Samoa\n\t\treturn getSamoaNow().after(this.expiredAfter);\n\t}",
"public boolean isActiveOrAbsent() {\n return !isInactive();\n }",
"public CodeableConcept dataAbsentReason() {\n return getObject(CodeableConcept.class, FhirPropertyNames.PROPERTY_DATA_ABSENT_REASON);\n }",
"boolean isAccountNonExpired();",
"boolean isAccountNonExpired();",
"private boolean isValidFinalExam(double finalExam)\n\t{\n\t\treturn finalExam >= 0 && finalExam <= 100;\n\t}",
"public boolean isFallSemester() {\n return semesterNum % 2 == 1;\n }",
"public void setDayAbsent(double dayAbsent) {\n this.dayAbsent = dayAbsent;\n }",
"public boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"public boolean isAccountNonExpired() {\n\t\treturn false;\r\n\t}",
"public static String approveDeny(int leave_id,int empId,EnumLeaveStatus l_status) {\r\n Leave ld = Leave.listById(leave_id);\r\n String s=null;\r\n if (ld != null) {\r\n int noOfDays = ld.getNoLeaveDays();\r\n int emplId = ld.getEmployeeId();\r\n int empdId = Leave.showManager(leave_id);\r\n String dbStatus = null;\r\n System.out.println(l_status);\r\n System.out.println(ld.getLeaveStatus());\r\n if (empId != empdId) {\r\n s=\"You are not authorised to access this employee.\";\r\n return s;\r\n }\r\n if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n \r\n } else if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.approved)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.denied)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment(dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n } else {\r\n if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else {\r\n s=\"Already on given status\";\r\n }\r\n }\r\n } else {\r\n s=\"Invalid LeaveId\";\r\n }\r\n return s;\r\n }",
"boolean hasAcquireDate();",
"public boolean isEnd() { return (_dateExpiration - System.currentTimeMillis()) <= 0; }",
"public boolean isExpired()\n\t{\n\t\tif (TimeRemaining == 0) \n\t\t\treturn true;\n\t\telse return false;\n\t}",
"public boolean isVacant() {\r\n\treturn !isOccupied() || !isAvailable();\r\n }",
"public boolean leaveVehicle ( ) {\n\t\treturn invokeSafe ( \"leaveVehicle\" );\n\t}",
"public boolean isOutstanding() {\n return !cancelled && !invitationSent;\n }",
"boolean getNegated();",
"public boolean isAccountNonExpired() {\n\t\treturn false;\n\t}",
"public boolean isAccountNonExpired() {\n\t\treturn false;\n\t}",
"public void yearEndNotification() {\n\t\tif ((this.isActive()) && (!this.hasInfiniteAge())) {\n\t\t\tage++;\n\n\t\t\tif (age >= maximum_age)\n\t\t\t\tactive_status = false;\n\t\t}\n\t}",
"public boolean isAccountNonExpired() {\n\t\t// TODO Auto-generated method stub\n\t\treturn true;\n\t}",
"public void setLeave(Village leave) {\n\t\tthis.leave = leave;\n\t}",
"public boolean aMonthPasses()\n\t{\n\t\tdecreaseHealth();\n\t\tage++;\n\t\treturn false;\n\t}",
"public boolean checkAccountClosed() {\n return this.accountStatus == \"Closed\";\n }",
"boolean hasAgeRange();",
"private boolean hasInfiniteAge() {\n\t\treturn (maximum_age < 0);\n\t}",
"boolean hasExpiry();",
"public boolean isTooOld(){\n\t\tgetOlder();\n\t\treturn age >= maxAge;\n\t}",
"public boolean couponEOMAdjustment()\n\t{\n\t\treturn _lsPeriod.get (0).periods().get (0).couponEOMAdjustment();\n\t}",
"public void testUpdateRejectReason_NotExistRejectReasonAccuracy() {\r\n ExpenseEntryRejectReason reason = new ExpenseEntryRejectReason(1);\r\n\r\n assertFalse(\"The reject reason should not be updated.\", entry.updateRejectReason(reason));\r\n }",
"private boolean isDeadline(TaskDate taskEndDate) {\n return taskEndDate != null;\n }",
"boolean hasResidentYn();",
"private boolean isValidPeriod(int period) {\r\n\t\treturn (period > 0 && period < 366); \r\n\t}",
"private static boolean checkIfYearContinue(Sheet sheet) {\r\n String last = sheet.getCellAt(\"A\" + sheet.getRowCount()).getTextValue(); \r\n return !last.equals(\"end\");\r\n }",
"public int getLBR_LatePaymentPenaltyDays();",
"@Test\r\n\tpublic void testCancelAuctionOnAuctionExsistsForNonProfitPastAuctionDate(){\r\n\t\t\r\n\t\tCalendar c = new Calendar();\t\t\r\n\t\tc.addAuction(new AuctionRequest(d1, t1, myNonProfit.getOrgName()));\t\t\r\n\t\tassertFalse(c.cancelAuction(myNonProfit, myAuctDateAfterAuctionDate, myCurrDate));\r\n\t\t\r\n\t}",
"private boolean m20208e() {\n return !m20207d();\n }",
"public boolean checkDiary() {\n if (this.activities.size() % 2 == 0) return false; //we have to end with an stay! so the number must be odd!\n for (int i = 0; i < this.activities.size(); i++) {\n if (((i % 2) == 0 && !this.activities.get(i).stay) || //even and not a stay: bad!\n ((i % 2) == 1 && this.activities.get(i).stay) // odd and not a trip: bad!\n ) {\n return false;\n }\n if (this.activities.get(i).getDurtation() <= 0) {\n if (this.activities.get(i).start_min == 0 && this.activities.get(i).end_min == 0)\n continue;//starts at midnight are ok!\n System.out.println(\"Error in diary!\");\n this.activities.get(i).printElement();\n return false;\n }\n }\n //now check if the first and last stays are home\n return this.activities.size() > 0 && this.activities.get(0).home && this.activities.get(\n this.activities.size() - 1).home;\n }",
"public boolean Lost()\n {\n return this.numLives <= 0;\n }",
"public boolean isLeapYear() {\n\n return ((this.cyear % 4) == 3);\n\n }",
"public boolean isExpired() {\n final LocalDateTime now = LocalDateTime.now().minusSeconds(10L);\n return now.isAfter(startTime.plusMinutes(exam.getExamTime())) || endTime != null;\n }",
"public boolean isDeletable() {\n \t\t\n \t\tlong currentAge = (new Date()).getTime() - timestamp;\n \t\t\n \t\tboolean retval = Math.abs(lat) > 89 || Math.abs(lon) > 179 || !inService || currentAge >= 1000*60*10;\n \t\t\n \t\t/*if (retval) {\n \t\t\tSystem.out.println(\"[\"+uid+\"] \"+\n \t\t\t\t\t\" Math.abs(lat) > 89:\"+(Math.abs(lat) > 89)+\n \t\t\t\t\t\" Math.abs(lon) > 179:\"+(Math.abs(lon) > 179) +\n \t\t\t\t\t\" !inService:\"+!inService+\n \t\t\t\t\t\" age >= 1000*60*10:\"+(age >= 1000*60*10));\n \t\t}*/\n \t\t\n \t\treturn retval;\n \t}",
"public boolean isHiddenValue(long millis) { return !this.timeline.containsDomainValue(new Date(millis)); }"
] | [
"0.6387893",
"0.6347486",
"0.6101597",
"0.607877",
"0.6072421",
"0.606245",
"0.60065615",
"0.58402663",
"0.581347",
"0.57953715",
"0.5767579",
"0.57498145",
"0.5735196",
"0.57159644",
"0.57034844",
"0.5698867",
"0.56587565",
"0.56423736",
"0.56396663",
"0.55858135",
"0.55825734",
"0.55722976",
"0.5565384",
"0.5534635",
"0.54855573",
"0.54379904",
"0.5394915",
"0.5388138",
"0.5377117",
"0.5372569",
"0.5368056",
"0.5365034",
"0.53373826",
"0.5337079",
"0.53214717",
"0.52832663",
"0.52815497",
"0.52628803",
"0.5249322",
"0.52470946",
"0.5240939",
"0.5228314",
"0.52274245",
"0.5211936",
"0.5209888",
"0.52025515",
"0.5202147",
"0.5201138",
"0.5199518",
"0.5192001",
"0.51909125",
"0.51601905",
"0.5159059",
"0.5157344",
"0.5157344",
"0.51528406",
"0.51528394",
"0.5152394",
"0.51508343",
"0.51473814",
"0.51473814",
"0.5147253",
"0.5147214",
"0.5145033",
"0.51423424",
"0.5141929",
"0.5133821",
"0.51316667",
"0.5130874",
"0.5124809",
"0.51233965",
"0.51201874",
"0.5117938",
"0.5113423",
"0.51107484",
"0.51107484",
"0.510702",
"0.509816",
"0.50961137",
"0.50919425",
"0.5081674",
"0.50778615",
"0.50771016",
"0.5062832",
"0.5053714",
"0.5035137",
"0.5033981",
"0.5031937",
"0.5009653",
"0.50080615",
"0.5006765",
"0.5005264",
"0.5003451",
"0.50032556",
"0.5002837",
"0.5000653",
"0.5000415",
"0.49864176",
"0.49836805",
"0.49652293"
] | 0.66806203 | 0 |
/ Calculate if the requested amount of annual leave exceeds allowance. Return true if request OK. | public boolean checkAnnualLeaveRequest(AbsentYear absYear, long numDaysRequested, int empId) {
if(employeeDoesNotHaveAnAbsentRecordForThisYear(absYear, empId)) {
return true;
}
return checkEmployeesAnnualLeaveRecordForYear(absYear, numDaysRequested, empId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkEmployeesAnnualLeaveRecordForYear(AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tlong numDaysAbsent = empAbsentRepo.numDaysEmployeeHasBeenAbsent(absYear.getYear(), empId, \"Annual Leave\");\n\t\tlong annualLeave = rasRepo.findSeniority(empId).getHolidayEntitlement();\n\t\tlong diff = (annualLeave - numDaysAbsent) - numDaysRequested;\n\t\treturn (numDaysRequested <= (diff)) ? true : false;\n\t}",
"private boolean checksForAnnualLeaveAreOk(String reason, AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tif(reason.compareTo(\"Annual Leave\") == 0) {\n\t\t\treturn (checkAnnualLeaveRequest(absYear, numDaysRequested, empId)) ? true : false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean isValidFinalExam(double finalExam)\n\t{\n\t\treturn finalExam >= 0 && finalExam <= 100;\n\t}",
"boolean hasLeaveGameReqeuest();",
"private boolean exceedRange(int year) {\n\t\tboolean exceeds = false;\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint upperRange = currentYear + RANGE_LIMIT;\n\t\tint lowerRange = currentYear - RANGE_LIMIT;\n\t\t\n\t\tif(year < lowerRange || year > upperRange){\n\t\t\texceeds = true;\n\t\t}\n\t\treturn exceeds;\n\t}",
"public boolean considerExit() {\n\t\tboolean testing=false; \n//\t\ttesting=world.gui.retailerDetail_table2c.retailer==this;\n\t\tdouble aSumPayRate=0; // the sum of the earnings per effective labor unit, calculated for all the retailer's friends\n\t\tint aFriends=0; // the total number of the agent's friends who are non-retailers\n\t\tfor (Agent friend: owner.friends) {\n\t\t\tif (friend.enterprises.size()==0) {\n\t\t\t\taFriends++;\n\t\t\t\tDouble earnings=0.0;\n\t\t\t\tDouble marketLabor=0.0;\n\t\t\t\tif (friend.earned!=null) {\n\t\t\t\t\tfor (int i=0; i<friend.earned.length; i++) {\n\t\t\t\t\t\tif (friend.earned[i]>0) {\n\t\t\t\t\t\t\tearnings=earnings+friend.earned[i]; // Add up everything the friend earned\n\t\t\t\t\t\t\tmarketLabor=marketLabor+Math.max(0, friend.labor.labor[i]-friend.cons.used[i]); // Add up market labor, i.e., labor on goods he sold, minus the amounts he consumed\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (marketLabor>0) aSumPayRate=aSumPayRate+earnings/marketLabor;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tDouble aAvgPayRate=aSumPayRate/aFriends;\n\t\tif (testing==true) System.out.println(\"TESTING Retailer.considerExit(). Retailer id=\"+id+\". aAvgPayRate=\"+aAvgPayRate);\n\t\tif (dividendHistory.size()>3) {\n\t\t\tdouble ownEarnings3Turns=0;\n\t\t\tfor (int i=0; i<3; i++) {\n\t\t\t\tint turn=dividendHistory.size()-1-i;\n\t\t\t\tdouble dividend=dividendHistory.get(turn);\n\t\t\t\tdouble capValue=cashHistory.get(turn)+basePrice*inventoryHistory.get(turn);\n\t\t\t\tdouble prevCapValue=cashHistory.get(turn-1)+basePrice*inventoryHistory.get(turn-1);\n\t\t\t\tdouble earnings=dividend+capValue-prevCapValue;\n\t\t\t\townEarnings3Turns=ownEarnings3Turns+earnings;\n\t\t\t}\n\t\t\tDouble ownPayRate=ownEarnings3Turns/3;\n\t\t\tDouble logOwnPayRate=Double.NEGATIVE_INFINITY;\n\t\t\tif (ownPayRate>0) logOwnPayRate=Math.log(ownPayRate);\n\t\t\tDouble logAvgPayRate=Math.log(aAvgPayRate);\n\t\t\tDouble increment=0.5+0.5*logAvgPayRate-0.5*logOwnPayRate;\n\t\t\tif (increment.isNaN()) increment=0.0;\n\t\t\tif (increment>world.MAX_RETAILER_EXIT_PROB_INCREMENT_DUE_TO_LOW_PAY) \n\t\t\t\tincrement=world.MAX_RETAILER_EXIT_PROB_INCREMENT_DUE_TO_LOW_PAY;\n\t\t\tif (increment<world.MIN_RETAILER_EXIT_PROB_INCREMENT_DUE_TO_HIGH_PAY) \n\t\t\t\tincrement=world.MIN_RETAILER_EXIT_PROB_INCREMENT_DUE_TO_HIGH_PAY;\n\t\t\toddsOfExit=oddsOfExit+increment;\n\t\t\tif (testing==true) System.out.println(\"TESTING Retailer.considerExit(). Retailer id=\"+id+\". ownPayRate=\"+ownPayRate);\n\t\t}\n\t\t// If the retailer has been out of inventory for three turns or more, \n\t\t// the likelihood of the retailer quitting rises by RETAILER_EXIT_PROB_INCREMENT_DUE_TO_NO_SALES\n\t\tif (incomeHistory.size()>3) {\n\t\t\tboolean threeTurnsNegligibleSales=true;\n\t\t\tfor (int i=0; i<3; i++) {\n\t\t\t\tDouble income=incomeHistory.get(incomeHistory.size()-1-i);\n\t\t\t\tif (income>0.0001) threeTurnsNegligibleSales=false;\n\t\t\t}\n\t\t\tif (threeTurnsNegligibleSales) oddsOfExit=oddsOfExit+world.RETAILER_EXIT_PROB_INCREMENT_DUE_TO_NO_SALES;\t\t\t\n\t\t}\n\t\tif (testing) System.out.println(\"oddsOfExit=\"+oddsOfExit);\n\t\tif (oddsOfExit<world.MIN_RETAILER_EXIT_PROB) oddsOfExit=world.MIN_RETAILER_EXIT_PROB;\n\t\tif (oddsOfExit>world.MAX_RETAILER_EXIT_PROB) oddsOfExit=world.MAX_RETAILER_EXIT_PROB; // Maximum 50% odds of exit based on lower earnings\n\t\tboolean exit=Math.random()<oddsOfExit;\n\t\tif (exit) exit();\n\t\treturn exit;\n\t}",
"public boolean isWithinLimit() {\n return assumptionsFailed.get() < assumptionLimit;\n }",
"protected boolean isOldEnough(EYSDate restrictedDOB, int itemRestrictiveAge)\n {\n int yearOfRestrictedDOB = restrictedDOB.getYear();\n if (yearOfRestrictedDOB < 1000)\n {\n // old enough if the skipped age is not less\n return yearOfRestrictedDOB >= itemRestrictiveAge;\n }\n\n // old enough if customer's age is larger than item's restricted age\n int customerAge = restrictedDOB.yearsBetween(new EYSDate());\n return customerAge >= itemRestrictiveAge;\n }",
"boolean check(double amount) {\n\t\treturn (balance >= amount);\n\t}",
"private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }",
"public boolean couldBeProfitable(){\n return this.priceBought < this.maximumMachineProfit;\n }",
"private boolean isValidTransaction(double remainingCreditLimit, double transactionAmount){\n return transactionAmount <= remainingCreditLimit;\n }",
"private boolean askToLeave(){\n\t\tint ask_leave_prompt = JOptionPane.YES_NO_OPTION;\n\t\tint ask_leave_result = JOptionPane.showConfirmDialog(this, \"Would you like to return to main menu?\\nYou will lose all progress\", \"Return To Main Menu\", ask_leave_prompt);\n\t\tif (ask_leave_result == JOptionPane.YES_OPTION){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public int checkNoOfExplosivesPlayerHolds () { return noOfExplosives; }",
"boolean hasIncomeRange();",
"public static String apply_for_leave(int empId,String start_date, String end_date, int no_ldays,String leave_type, String leave_reason)\r\n throws ParseException {\r\n String s=null;\r\n Employee e = Employee.listById(empId);\r\n if (e != null) {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date leave_from = sdf.parse(start_date);\r\n Date leave_to = sdf.parse(end_date);\r\n Calendar start = Calendar.getInstance();\r\n start.setTime(leave_from);\r\n Calendar end = Calendar.getInstance();\r\n end.setTime(leave_to);\r\n int count = 0;\r\n for (Date date = start.getTime(); start.before(end); start.add(Calendar.DATE, 1), date = start.getTime()) {\r\n Calendar c = Calendar.getInstance();\r\n c.setTime(date);\r\n int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n if (dayOfWeek == 1 || dayOfWeek == 7) {\r\n count++;\r\n }\r\n }\r\n System.out.println(count);\r\n long diff = leave_to.getTime() - leave_from.getTime();\r\n System.out.println(diff);\r\n long days = diff / (1000 * 60 * 60 * 24);\r\n Date today = new Date();\r\n String appliedOn = sdf.format(today);\r\n days = days + 1;\r\n long availBal = 0;\r\n long dif = 0;\r\n long updLeave = 0;\r\n String leaveStatus = null;\r\n // int overl = Leave.countNo(empId, start_date, end_date);\r\n availBal = e.getavailleaves();\r\n dif = availBal - days;\r\n updLeave = days - count;\r\n int bal = (int) updLeave;\r\n if (days <= 0) {\r\n s=\"Start Date Must be Greater than EndDate...\";\r\n } else if (dif < 0) {\r\n s=\"insufficient leav balance\";\r\n } else if (no_ldays != days) {\r\n s=\"NO Of Days Should be right\";\r\n } else if (leave_from.compareTo(sdf.parse(appliedOn)) < 0) {\r\n s=\"Start should be greater or equal to current date\";\r\n // } else if (overl > 0) {\r\n // s=\"already applied on given date\";\r\n } else {\r\n if (e.getMgr_id() == 0) {\r\n leaveStatus = \"APPROVED\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal, leave_type, leaveStatus, leave_reason, appliedOn);\r\n s=\"Leave Applied Successfully...\";\r\n } else {\r\n leaveStatus = \"PENDING\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, appliedOn);\r\n edao().decrement(empId, bal);\r\n s = \"Leave Applied Successfully For \" + (days - count) + \" Days.\";\r\n }\r\n }\r\n } else {\r\n s=\"invalid employee\";\r\n }\r\n return s;\r\n }",
"public boolean isLoyal()\r\n \t{\r\n \t\treturn loyalty > LOYAL_STEP;\r\n \t}",
"private Boolean calculateTotalEmission() {\n\t\ttry {\n\n\t\t\tfoodCO2E = Double.valueOf(JTFFood.getText().isEmpty() ? \"0.0\" : JTFFood.getText())\n\t\t\t\t\t* energySourceDetail.get(FoodIntake).get(JCBFoodUnit.getSelectedItem().toString());\n\n\t\t\tlandfillingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFLandfillingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFLandfillingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(LandfillingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBLandfillingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t\tcompostingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFCompostingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFCompostingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(CompostingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBCompostingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t} catch (NumberFormatException ne) {\n\t\t\tSystem.out.println(\"Number Format Exception while calculating House Hold Emission\" + ne);\n\t\t\treturn false;\n\t\t}\n\t\t//\n\t\ttotalFoodCO2E = foodCO2E + landfillingFoodWasteCO2E + compostingFoodWasteCO2E;\n\t\ttotalFoodCO2E = Math.round(totalFoodCO2E * 100D) / 100D;\n\t\treturn true;\n\t}",
"public int checkExpiryDate(LocalDate today) {\n\n final int limit = 100;\n long expirationDate = Duration.between(\n this.food.getCreateDate().atTime(0, 0), this.food.getExpiryDate().atTime(0, 0)\n ).toDays();\n long goneDate = Duration.between(\n this.food.getCreateDate().atTime(0, 0), today.atTime(0, 0)\n ).toDays();\n\n return (int) (limit * goneDate / expirationDate);\n\n }",
"public boolean passed(){\n if (totalMark() == -1) {\n throw new IllegalArgumentException(\"Not enough marks to evaluate student\"); \n } else if (totalMark() >= 50){\n return true;\n }else{\n return false;\n }\n }",
"public boolean isRechargeTotalWithinLimit(MaintenanceRequest mrq) throws MalBusinessException{\t\n\t\tBigDecimal rechargeTotal;\n\t\tBigDecimal limit;\n\t\tBigDecimal rechargeTotalInDB;\n\t\tboolean isWithinLimit = true;\n\t\tMaintenanceRequest mrqInDB;\n\t\t\n\t\tContractLine contractLine = contractService.getLastActiveContractLine(mrq.getFleetMaster(), Calendar.getInstance().getTime());\t\n\t\tif(contractLine != null){\n\t\t\tlimit = quotationService.getMafsAuthorizationLimit(contractLine.getContract().getExternalAccount().getExternalAccountPK().getCId(), \n\t\t\t\t\t\tcontractLine.getContract().getExternalAccount().getExternalAccountPK().getAccountType(), \n\t\t\t\t\t\tcontractLine.getContract().getExternalAccount().getExternalAccountPK().getAccountCode(), \n\t\t\t\t\t\tmrq.getFleetMaster().getUnitNo());\n\t\t\n\t\t\tif(mrq.getMaintenanceRequestTasks() != null && limit != null){\n\t\t\t\trechargeTotal = sumRechargeTotal(mrq);\n\t\t\t\tif(MALUtilities.isEmptyString(mrq.getAuthReference())){\n\t\t\t\t\tif(rechargeTotal.compareTo(limit) > 0){\n\t\t\t\t\t\tisWithinLimit = false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t//Check if passed in maintenance Request has been approved but recharge total has increased since last save.\n\t\t\t\t\tif(mrq.getMrqId() != null){\n\t\t\t\t\t\tmrqInDB = maintenanceRequestDAO.findById(mrq.getMrqId()).orElse(null);\n\t\t\t\t\t\trechargeTotalInDB = sumRechargeTotal(mrqInDB);\n\t\t\t\t\t\tif(rechargeTotal.compareTo(rechargeTotalInDB) > 0 && rechargeTotal.compareTo(limit) > 0){\n\t\t\t\t\t\t\tisWithinLimit = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isWithinLimit;\n\t}",
"private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }",
"public boolean checkDate(Date dateNow, Date maxAccess) {\n return dateNow.after(maxAccess);\n }",
"public boolean expired(){\n return !Period.between(dateOfPurchase.plusYears(1), LocalDate.now()).isNegative();\n }",
"boolean hasMaxExperience();",
"public boolean isExpired(){\r\n float empty = 0.0f;\r\n return empty == getAmount();\r\n \r\n }",
"public int computeStatus() {\n\t\tif(isOutcomeExceeded()) return 0;\r\n\t\t\r\n\t\t//the new loan is too expensive\r\n\t\tif(isOutcomeExceeded(mMonthlyLoan)) return 0;\r\n\t\t\r\n\t\tint domainCoeff = DBOperations.getDomainCoeffById(mDomainId); // (0, 10] \r\n\t\tint expCoeff = DBOperations.getExperienceCoeffById(mExperienceId); // (0, 5]\r\n\t\t\r\n\t\tint backgroundCoeff = domainCoeff * expCoeff; // (0, 50]\r\n\t\tif(isIncomeRaising) backgroundCoeff *= 2; // (0, 100]\r\n\t\t\r\n\t\tint incomeCoeff = getIncomeWeight(mMonthlyIncome); // (0, 100]\r\n\t\t\r\n\t\tint coeff = (int) ((backgroundCoeff * 0.20) + (incomeCoeff * 0.55)); // (0, 75]\r\n\t\tif(mHadOtherLoans) coeff += 5; // (0, 80]\r\n\t\tif(mHasDelayedPays) coeff -= 10; // (0, 80]\r\n\t\t\r\n\t\tif((mMonthlyIncome - mMonthlyOutcome) * MAXIMUM_SURE_OUTCOME_PERCENTAGE / 100 >= mMonthlyLoan) {\r\n\t\t\tcoeff += 20; // (0, 100]\r\n\t\t}\r\n\t\t\r\n\t\tif(coeff <= 25) return 0;\r\n\t\treturn coeff < 55 ? 1 : 2;\r\n\t}",
"public boolean isLate(){\n Date d = givenBack != null ? givenBack : new Date();\n return expirationDate.before(d);\n }",
"public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }",
"protected boolean leaveService()\n\t{\n\t\tboolean result;\n\n\t\tsynchronized(enterMutex)\n\t\t{\n\t\t\tenterRequests--;\n\t\t\tresult = (enterRequests > 0);\n\n\t\t\t//!: clear the requests number\n\t\t\tenterRequests = 0;\n\t\t}\n\n\t\treturn result;\n\t}",
"boolean hasRemainDays();",
"public static boolean checkRequestAmountLimit(String requestType, int clientID, double maxAmount, int range) throws SQLException\r\n {\r\n // calculate begginning date of range to check within\r\n LocalDate searchStart = LocalDate.now().minusMonths(range);\r\n \r\n Connection connection = DBConnection.getConnection();\r\n String query = \"select sum(amount) as total from scm.tcf_requestassist where \" +\r\n \"clientid = ? and datedisbursed > ? and assistanceid in \" +\r\n \"(select assistanceid from scm.tcf_assistance where description = ?)\";\r\n\r\n \r\n PreparedStatement ps = connection.prepareStatement(query); \r\n \r\n ps.setInt(1, clientID); \r\n \r\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\r\n ps.setString(2, searchStart.format(dtf));\r\n \r\n mapDbNames(); \r\n String desc = dbMap.get(requestType);\r\n ps.setString(3, desc); \r\n \r\n ResultSet rs = ps.executeQuery();\r\n\r\n if (rs.next()) \r\n {\r\n double total = rs.getDouble(\"total\"); \r\n closeResources(ps, rs, connection);\r\n return total < maxAmount;\r\n }\r\n else \r\n {\r\n closeResources(ps, rs, connection);\r\n throw new SQLException();\r\n }\r\n }",
"private double checkCabProfitMargin(BookingRequest bookingRequest, Cab cabDetail) {\n\t\tInteger distanceFromCabToPickUpPoint = Utils.calculateDistance(cabDetail.getInitialLocation(), bookingRequest.getPickUpArea());\n\t\tInteger distanceFromPickUpToDropPoint = Utils.calculateDistance(bookingRequest.getPickUpArea(), bookingRequest.getDropArea());\n\t\tint totalCostIncurredByCompany = (distanceFromCabToPickUpPoint + distanceFromPickUpToDropPoint) * Constants.COMPANY_COST_PER_KM;\n\t\tint tripCostCharged = distanceFromPickUpToDropPoint * Constants.CHARGED_COST_PER_KM;\n\t\tdouble profitMargin = (tripCostCharged - totalCostIncurredByCompany)*100 / tripCostCharged ;\n\t\tif (profitMargin >= 20) {\n\t\t\treturn profitMargin;\n\t\t}\n\t\treturn -1;\n\t}",
"public boolean isOverdrawn() {\n return balance < 0;\n }",
"public boolean checkIfEnough(Account account, float amount) {\n float remaining = account.getBalance() - amount;\n if (remaining >= 0) {\n return true;\n }\n return false;\n }",
"@Override\r\n\tpublic boolean IsSatisfiedBy(Member member) {\n\t\tboolean res=member.getLoans().stream().filter(Loan::hasNotBeenReturned).count()<3;\r\n\t\treturn res;\r\n\t}",
"public boolean aMonthPasses()\n\t{\n\t\tdecreaseHealth();\n\t\tage++;\n\t\treturn false;\n\t}",
"public static boolean checkRefereeSalary(double playerSalary){\r\n return maxRefereeSalary >= playerSalary && playerSalary >= minRefereeSalary;\r\n }",
"public boolean calcAge() {\n int age;\n boolean oldEnough = false;\n Calendar c = Calendar.getInstance();\n \n //getting todays date\n int thisYear = c.get(Calendar.YEAR);\n int thisMonth = c.get(Calendar.MONTH) + 1;\n int thisDay = c.get(Calendar.DAY_OF_MONTH);\n\n age = thisYear - yearDOB;\n if (age == 18 && thisMonth == monthDOB && thisDay < dayDOB) {\n age = 17;\n oldEnough = true;\n } else if (age < 18) {\n oldEnough = false;\n }\n return oldEnough;\n }",
"private boolean checkIsValid(BankClient client, Message message) {\n int lastDigit = message.getMessageContent() % BASE_TEN;\n int amount = message.getMessageContent() / BASE_TEN;\n if (lastDigit <= DEPOSIT_WITHDRAWAL_FLAG) {\n return amount <= client.getDepositLimit();\n } else {\n return amount <= client.getWithdrawalLimit();\n }\n }",
"private boolean hasInfiniteAge() {\n\t\treturn (maximum_age < 0);\n\t}",
"public boolean isLeave()\r\n { return type == LEAVE; }",
"boolean updateDeathsTillForget() {\n\t\tdeathsTillForget -= 1;\n\t\treturn (deathsTillForget < 1);\n\t}",
"private boolean isAppropriated(int[] arr) {\n boolean is_correct = false;\n for (int i : arr) {\n if (i > 9999) {\n is_correct = true;\n } else\n is_correct = false;\n }\n return is_correct;\n }",
"private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }",
"public void checkAvaliableElevators()\r\n\t{\r\n\t\tSystem.out.println(\"--------- Checking Elevators Current Status ------\");\t\r\n\t\t\r\n\t\tif(availableElevadors.isEmpty())\r\n\t\t{\r\n\t\t\tfor(int i=0; i <numberOfElevators-3; i++) {\r\n\t\t\t\tavailableElevadors.add(occupiedElevadors.remove(i));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"--------- Elevators are available again ------\");\r\n\t\t\r\n\t\t}else {\r\n\t\t\tfor(int i=0;i<availableElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + availableElevadors.get(i).getElevatorNumber() +\" ready for Requests\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<occupiedElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + occupiedElevadors.get(i).getElevatorNumber() +\" is Occupied\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t}\r\n\r\n\t}",
"public boolean isOverdrawn() {\n return this.getBalance().compareTo(new BigDecimal(\"0\")) < 0;\n }",
"Boolean CheckForLimit(float xVal, float yVal) {\n double xCalc = Math.pow(xVal - this.oval.centerX(), 2) / Math.pow((this.oval.width() / 2), 2);\n double yCalc = Math.pow(yVal - this.oval.centerY(), 2) / Math.pow((this.oval.height() / 2), 2);\n xCalc += yCalc;\n if (xCalc <= 1) {\n return true;\n } else {\n return false;\n }\n }",
"private boolean checkBudgetAvailability(Company company, double bonusForDevelopers) {\n\n double requiredBudget = 0;\n\n for (Employee employee : company.getEmployees()) {\n\n double employeeSalary = 0;\n\n if (employee instanceof Developer) {\n employeeSalary = ((Developer) employee).getSalary(bonusForDevelopers);\n } else {\n employeeSalary = employee.getSalary();\n }\n requiredBudget += employeeSalary;\n }\n\n return requiredBudget >= company.getBudget();\n }",
"boolean expendEnergy(double amount) {\r\n if (amount <= energy) {\r\n energy -= amount;\r\n return true;\r\n }\r\n else\r\n return false;\r\n }",
"public boolean hasWon(){\n boolean winStatus = false;\n if(balance >= 3000){\n winStatus = true;\n }\n return winStatus;\n }",
"public boolean not3TimesHigher() {\n\t\tArrayList<Double> temp=averageSalaries();\n\t\tfor(int i=0;i<temp.size();i++) {\n\t\t\tdouble selectOne= temp.get(i);//choose the select employee\n\t\t\ttemp.remove(i);//remove the select one's salary\n\t\t\tdouble[] otherEmployees=new double[temp.size()];\n\t\t\tfor(int j=0;j<otherEmployees.length;j++) {\n\t\t\t\totherEmployees[j]=temp.get(j);\n\t\t\t}\n\t\t\ttemp.add(i,selectOne);//add the salary whose selected last time.\n\t\t\ttry{\n\t\t\t\tif(selectOne>(average(otherEmployees)*3)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t}catch(IllegalArgumentException e) {\n\t\t\t\tSystem.out.println(\"There is something wrong with input\");\n\t\t\t}\n\t\t}\n\t return true;\n\t}",
"public boolean isOverdue(int today);",
"boolean checkForExpiration() {\n boolean expired = false;\n\n // check if lease exists and lease expire is not MAX_VALUE\n if (leaseId > -1 && leaseExpireTime < Long.MAX_VALUE) {\n\n long currentTime = getCurrentTime();\n if (currentTime > leaseExpireTime) {\n if (logger.isTraceEnabled(LogMarker.DLS_VERBOSE)) {\n logger.trace(LogMarker.DLS_VERBOSE, \"[checkForExpiration] Expiring token at {}: {}\",\n currentTime, this);\n }\n noteExpiredLease();\n basicReleaseLock();\n expired = true;\n }\n }\n\n return expired;\n }",
"public void testLevelPlannedWhenExceeded() throws Exception {\n checkLevelPlannedWhenExceed(new int[]{100},\n new double[]{300},\n new double[]{100},\n new double[]{300});\n\n // -- One account: no levelling possible\n checkLevelPlannedWhenExceed(new int[]{100},\n new double[]{300},\n new double[]{400},\n new double[]{300});\n\n // -- Two accounts: no levelling needed\n checkLevelPlannedWhenExceed(new int[]{100, 101},\n new double[]{300, 500},\n new double[]{100, 200},\n new double[]{300, 500});\n\n // -- Two accounts: extra pushed to second account\n checkLevelPlannedWhenExceed(new int[]{100, 101},\n new double[]{300, 500},\n new double[]{400, 200},\n new double[]{400, 400});\n\n // -- Two accounts: extra pushed to first account\n checkLevelPlannedWhenExceed(new int[]{100, 101},\n new double[]{300, 500},\n new double[]{100, 600},\n new double[]{200, 600});\n\n // -- Two accounts: part of extra pushed to second account\n checkLevelPlannedWhenExceed(new int[]{100, 101},\n new double[]{300, 500},\n new double[]{400, 450},\n new double[]{400, 450});\n\n // -- Two accounts: total actual exceeds the total planned\n checkLevelPlannedWhenExceed(new int[]{100, 101},\n new double[]{300, 500},\n new double[]{250, 600},\n new double[]{250, 600});\n\n // -- Three accounts: extra taken from first account available\n checkLevelPlannedWhenExceed(new int[]{100, 101, 102},\n new double[]{300, 500, 200},\n new double[]{200, 600, 100},\n new double[]{200, 600, 200});\n\n // -- Three accounts: no planned for first one\n checkLevelPlannedWhenExceed(new int[]{100, 101, 102},\n new double[]{0, 500, 300},\n new double[]{0, 600, 100},\n new double[]{0, 600, 200});\n }",
"@RequestMapping(\"/leaveAccept\")\npublic String calculation(@RequestParam int leaveWish, @RequestParam int id,@RequestParam int leavePresent, HttpServletRequest request)\n{\n\tSystem.out.println(id);\n\tSystem.out.println(leaveWish);\n\tSystem.out.println(leavePresent);\n\t\n\tEmployeeRegmodel obj = ergserv.findOne(id);\n\t\n\tif(leavePresent>leaveWish)\n\t{\n\t\tint a = leavePresent-leaveWish;\n\t\tSystem.out.println(a);\n\t\tobj.setLeaveCount(a);\n\t\trequest.setAttribute(\"Yes\", \"Leave Granted.\");\n\t\t\n\t}\n\telse\n\t{\n\t\trequest.setAttribute(\"No\", \"No LEAVE LEFT, CONTACT WITH Employee\");\n\t}\n\tergserv.addEmployeeRegmodel(obj);\n\treturn \"buttons.jsp\";\n\n}",
"public boolean validDeclineCodeAndAmount() {\n\t\tint amount, declineCode;\n\t\ttry {\n\t\t\tamount = Integer.parseInt(txtApprovalAmount.getText());\n\t\t\tdeclineCode = Integer.parseInt(txtDeclineCode.getText());\n\t\t\tif (declineCode < 0 || declineCode > Integer.parseInt(Initializer.getBaseVariables().bitfield39UpperLimit)\n\t\t\t\t\t|| txtDeclineCode.getText().length() > Initializer.getBitfieldData().bitfieldLength\n\t\t\t\t\t\t\t.get(Initializer.getBaseConstants().nameOfbitfield39)) {\n\t\t\t\tlogger.error(\"Entered decline code is invalid. Valid range is 0 - \"\n\t\t\t\t\t\t+ Initializer.getBaseVariables().bitfield39UpperLimit);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Entered decline code is invalid. Valid range is 0 - \"\n\t\t\t\t\t\t+ Initializer.getBaseVariables().bitfield39UpperLimit);\n\t\t\t\treturn false;\n\t\t\t} else if (txtApprovalAmount.getText().length() > Initializer.getBitfieldData().bitfieldLength\n\t\t\t\t\t.get(Initializer.getBaseConstants().nameOfbitfield4)) {\n\t\t\t\tlogger.error(\"Entered amount is invalid.\");\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Entered amount is invalid.\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\tlogger.error(\"Only valid range of numbers should be entered for decline code and Amount\");\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Only valid range of numbers should be entered for decline code and Amount\");\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean steamFailure() {\n double steam = this.steamMessage.getDoubleParameter();\n if (steam < 0) {\n return true;\n }\n if (steam > this.configuration.getMaximualSteamRate()) {\n return true;\n }\n return false;\n }",
"public static Boolean isAdult(long dob_millis) {\n Calendar calendar_dob = Calendar.getInstance();\n calendar_dob.setTimeInMillis(dob_millis);\n\n Calendar calendar_min_adult = Calendar.getInstance();\n calendar_min_adult.set(Calendar.MINUTE, 0);\n calendar_min_adult.set(Calendar.SECOND, 0);\n calendar_min_adult.set(Calendar.HOUR, 0);\n calendar_min_adult.add(Calendar.YEAR, -18);\n\n // //// //Log.e(\"recc_compcal\", \"==\"+calendar_dob.getTimeInMillis()+\"==\"+calendar_min_adult.getTimeInMillis());\n\n return (calendar_dob.getTimeInMillis() < calendar_min_adult.getTimeInMillis());\n }",
"public boolean nearMaxRescue() {\n double water = this.waterLevel;\n double no = (this.configuration.getMaximalLimitLevel()\n - this.configuration.getMaximalNormalLevel()) / 2;\n if (water > this.configuration.getMaximalLimitLevel()\n || water > this.configuration.getMaximalLimitLevel() - no) {\n return true;\n } else if (water < this.configuration.getMinimalLimitLevel()\n || water < this.configuration.getMinimalLimitLevel() + no) {\n\n return true;\n }\n return false;\n }",
"private boolean tryPay() {\n return new Random().nextInt(100) + 1 <= 50;\n }",
"private boolean requestLimitReached() {\n\t\treturn (requestCount >= maximumRequests);\n\t}",
"public int checkEND(int amount, boolean burnStun);",
"public boolean withdrawl(double withdrawAmount) {\n\t\tif (balance-withdrawAmount < 0 || withdrawAmount < 0) return false; // Special cases: can't withdraw more than your balance; can't withdraw negative money\n\t\tbalance -= withdrawAmount;\n\t\treturn true;\n\t}",
"private boolean validateAmountSize(double amount, HttpServletRequest req, HttpServletResponse resp) throws IOException {\n if(amount > maxAmount\n || amount <= 0){\n page.redirectTo(\"/account\", resp, req,\n \"errorMessage\", \"Transactions of that size are not permitted!\");\n return false;\n }\n return true;\n }",
"public boolean isActiveLoan();",
"boolean hasTotalBet();",
"boolean hasTotalBet();",
"public int remainingFees()\r\n\t{\r\n\t\treturn feesTotal-feesPaid;\t\t\r\n\t}",
"public boolean verifyLeaveDate(Date date){\t\t\n\t\tLocale en = new Locale(\"en\");\t\t\n\t\tString lDate = String.format(en, \"%1$ta, %1$tb %1$te, %1$tY\", date);\n\t\treturn leaveDate.getText().equals(lDate);\n\t}",
"public boolean feasibilityTest(int candidateValue, int amount, int changeGenerated ){\n\n\t\t//-----------------------------\n\t\t//Output Variable --> InitialValue\n\t\t//-----------------------------\n\n\t\tif (candidateValue + changeGenerated <= amount) {\n\t\t\treturn true;\n\t\t}\n\t\t//-----------------------------\n\t\t//Output Variable --> Return FinalValue\n\t\t//-----------------------------\t\t\n\t\treturn false;\t\t\n\t}",
"@org.junit.Test\r\n public void testPayBackSumShouldBeSameOrHigher() {\r\n Prospect p = new Prospect(\"Doris\", 1000, 5, 2);\r\n MortgageCalculation m = new MortgageCalculation(p);\r\n double result = m.getFixedMonthlyPayment();\r\n double payBackSum = result * p.getYears() * 12;\r\n\r\n assertTrue(payBackSum >= p.getTotalLoan());\r\n }",
"@Override\n \tpublic boolean canLeave(ArenaPlayer p) {\n \t\treturn true;\n \t}",
"public boolean checkAndFreezeFunds (int secretKey, double proposedFreeze) {\n\n int theBankAccountNumber;\n // use AccountLink and secret key to get actual Bank Account number\n AccountLink theAccountLink = hashMapOfSecretKeys.get(secretKey);\n if ( theAccountLink != null ) {\n theBankAccountNumber = theAccountLink.getAGENT_ACCOUNT_NUMBER();\n } else {\n return false;\n }\n // use account number to get full BankAccount\n BankAccount theBankAccount =\n hashMapOfAllAccts.get(theBankAccountNumber);\n\n // ask BankAccount to check and (if possible) freeze the amount\n boolean fundsFrozen = theBankAccount.checkAndFreeze(proposedFreeze);\n\n if (fundsFrozen) {\n updateBankDisplay();\n }\n\n return fundsFrozen;\n }",
"public boolean calculateEncashAmount(String noOfEncashLeave,\r\n\t\t\tString empCode, LeaveEncashmentProcess leaveEncashProcess) {\n\t\tboolean result = false;\r\n\t\ttry {\r\n\r\n\t\t\tObject encashQueryObj[][] = null;\r\n\t\t\tArrayList list = new ArrayList();\r\n\t\t\tObject empIdsObj[][] = getEmpIdsAndPolicyCodes(leaveEncashProcess);\r\n\r\n\t\t\tif (empIdsObj != null && empIdsObj.length > 0) {\r\n\t\t\t\tfor (int j = 0; j < empIdsObj.length; j++) {\r\n\t\t\t\t\tString policyCode = \" SELECT LEAVE_POLICY_CODE FROM HRMS_LEAVE_POLICY_TEMP \"\r\n\t\t\t\t\t\t\t+ \" WHERE EMP_ID=\"\r\n\t\t\t\t\t\t\t+ String.valueOf(empIdsObj[j][0]);\r\n\t\t\t\t\tObject policy_CodeObj[][] = getSqlModel().getSingleResult(\r\n\t\t\t\t\t\t\tpolicyCode);\r\n\r\n\t\t\t\t\tif (policy_CodeObj != null && policy_CodeObj.length > 0) {\r\n\t\t\t\t\t\tfor (int k = 0; k < policy_CodeObj.length; k++) {\r\n\t\t\t\t\t\t\tString encashQuery = \" SELECT NVL(HRMS_EMP_OFFC.EMP_TOKEN,' '),NVL(HRMS_EMP_OFFC.EMP_FNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_MNAME,' ')||' '||NVL(HRMS_EMP_OFFC.EMP_LNAME,' ') NAME,TO_CHAR(LEAVE_NAME) ,NVL(LEAVE_CLOSING_BALANCE,0) AS AVAILABLE_BALANCE, \"\r\n\t\t\t\t\t\t\t\t\t+ \" NVL(LEAVE_CLOSING_BALANCE,0)-\"\r\n\t\t\t\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t\t\t\t+ \" ENCASH_BAL,HRMS_LEAVE.LEAVE_ID, \"\r\n\t\t\t\t\t\t\t\t\t+ \" HRMS_LEAVE_POLICY_DTL.LEAVE_ENC_FORMULA ,HRMS_EMP_OFFC.EMP_ID \"\r\n\t\t\t\t\t\t\t\t\t+ \" FROM HRMS_LEAVE \"\r\n\t\t\t\t\t\t\t\t\t+ \" LEFT JOIN HRMS_LEAVE_BALANCE ON(HRMS_LEAVE.LEAVE_ID=HRMS_LEAVE_BALANCE.LEAVE_CODE AND EMP_ID =\"\r\n\t\t\t\t\t\t\t\t\t+ String.valueOf(empIdsObj[j][0])\r\n\t\t\t\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t\t\t\t+ \" LEFT JOIN HRMS_EMP_OFFC ON(HRMS_LEAVE_BALANCE.EMP_ID=HRMS_EMP_OFFC.EMP_ID) \"\r\n\t\t\t\t\t\t\t\t\t+ \" INNER JOIN HRMS_LEAVE_POLICY_DTL ON(HRMS_LEAVE_POLICY_DTL.LEAVE_CODE=HRMS_LEAVE_BALANCE.LEAVE_CODE \"\r\n\t\t\t\t\t\t\t\t\t+ \" AND LEAVE_APPLICABLE='Y' AND LEAVE_ENC_FLAG='Y'AND HRMS_LEAVE_POLICY_DTL.LEAVE_POLICY_CODE=\"\r\n\t\t\t\t\t\t\t\t\t+ String.valueOf(policy_CodeObj[k][0])\r\n\t\t\t\t\t\t\t\t\t+ \") \"\r\n\t\t\t\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CLOSING_BALANCE >\"\r\n\t\t\t\t\t\t\t\t\t+ leaveEncashProcess.getGreaterEncashBal()\r\n\t\t\t\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t\t\t\t+ \" AND HRMS_LEAVE_BALANCE.LEAVE_CODE=\"\r\n\t\t\t\t\t\t\t\t\t+ leaveEncashProcess.getLevCode()\r\n\t\t\t\t\t\t\t\t\t+ \" AND LEAVE_ENC_FORMULA IS NOT NULL ORDER BY LEAVE_ID \";\r\n\r\n\t\t\t\t\t\t\tencashQueryObj = getSqlModel().getSingleResult(\r\n\t\t\t\t\t\t\t\t\tencashQuery);\r\n\r\n\t\t\t\t\t\t\tif (encashQueryObj != null\r\n\t\t\t\t\t\t\t\t\t&& encashQueryObj.length > 0) {\r\n\t\t\t\t\t\t\t\tfor (int e = 0; e < encashQueryObj.length; e++) {\r\n\r\n\t\t\t\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t\t\t\t\tLeaveEncashmentProcess bean = new LeaveEncashmentProcess();\r\n\r\n\t\t\t\t\t\t\t\t\tbean.setEmpToken(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][0])));\r\n\t\t\t\t\t\t\t\t\tbean.setEmpName(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][1])));\r\n\t\t\t\t\t\t\t\t\tbean.setLeaveName(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][2])));\r\n\t\t\t\t\t\t\t\t\tbean.setAvailableBal(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][3])));\r\n\t\t\t\t\t\t\t\t\tbean.setNoOfencashLeave(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][4]));\r\n\t\t\t\t\t\t\t\t\tbean.setLeaveCode(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][5])));\r\n\t\t\t\t\t\t\t\t\tbean.setEncashFormula(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6])));\r\n\t\t\t\t\t\t\t\t\tbean.setEmployeeId(checkNull(String\r\n\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][7])));\r\n\r\n\t\t\t\t\t\t\t\t\tdouble amount = 0;\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tamount = Utility\r\n\t\t\t\t\t\t\t\t\t\t\t\t.expressionEvaluate(new Utility()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.generateFormula(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][7]),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.valueOf(encashQueryObj[e][6]),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsession));\r\n\t\t\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tlogger\r\n\t\t\t\t\t\t\t\t\t\t\t.info(\"Value of amount \"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ amount);\r\n\t\t\t\t\t\t\t\t\tbean.setAmtPerDay(String.valueOf((amount)));\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tString delTempQueryAfter = \" DELETE FROM HRMS_LEAVE_POLICY_TEMP \";\r\n\t\t\tgetSqlModel().singleExecute(delTempQueryAfter);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public boolean isValidTransfer(double amount) {\n boolean amt = amount >= 0;\n boolean bal = false;\n if (amount <= this.balance + 100 && this.balance > 0) {\n bal = true;\n }\n return amt && bal && !isFreeze();\n }",
"public boolean isValid_ToBuyTicket() {\n if (this.tktSold < this.museum.getMaxVisit() && isNowTime_in_period()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public static String update_leave(int empId,int leave_id,String start_date,String end_date,int no_ldays,String leave_type,String leave_reason )\r\n throws ParseException {\r\n Employee emp = Employee.listById(empId);\r\n Leave leavedetails = Leave.listById(leave_id);\r\n String s=null;\r\n int prevDays = leavedetails.getNoLeaveDays();\r\n if (emp != null) {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date leave_from = sdf.parse(start_date);\r\n Date leave_to = sdf.parse(end_date);\r\n Calendar start = Calendar.getInstance();\r\n start.setTime(leave_from);\r\n Calendar end = Calendar.getInstance();\r\n end.setTime(leave_to);\r\n int counts = 0;\r\n for (Date date = start.getTime(); start.before(end); start.add(Calendar.DATE, 1), date = start.getTime()) {\r\n Calendar c = Calendar.getInstance();\r\n c.setTime(date);\r\n int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n if (dayOfWeek == 1 || dayOfWeek == 7) {\r\n counts++;\r\n}\r\n }\r\n System.out.println(counts);\r\n long diff1 = leave_to.getTime() - leave_from.getTime();\r\n System.out.println(diff1);\r\n long day1 = diff1 / (1000 * 60 * 60 * 24);\r\n Date today = new Date();\r\n String appliedOn = sdf.format(today);\r\n day1 = day1 + 1;\r\n long availBalance = 0;\r\n long diff = 0;\r\n long updLeave = 0;\r\n String leaveStatus = null;\r\n // int overl = Leave.countNo(empId,start_date,end_date);\r\n availBalance = emp.getavailleaves();\r\n diff = availBalance - day1;\r\n updLeave = day1 - counts;\r\n int bal = (int) updLeave;\r\n if (empId != Leave.listById(leave_id).getEmployeeId()) {\r\n s=\"You are not authorised to update this leave.\";\r\n } else if (day1 <= 0) {\r\n s=\"Start Date Must be Greater than EndDate...\";\r\n } else if (diff < 0) {\r\n s=\"insufficient leave balance\";\r\n } else if (no_ldays != day1) {\r\n s=\"NO Of day Should be right\";\r\n } else if (leave_from.compareTo(sdf.parse(appliedOn)) < 0) {\r\n s=\"Start should be greater or equal to current date\";\r\n } else {\r\n if (emp.getMgr_id() == 0) {\r\n leaveStatus = \"APPROVED\";\r\n dao().update_leave(start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, leave_id);\r\n s=\"Leave updated Successfully...\";\r\n } else {\r\n leaveStatus = \"PENDING\";\r\n dao().update_leave(start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, leave_id);\r\n if (bal - prevDays > 0) {\r\n bal = bal - prevDays;\r\n edao().decrement(empId, bal);\r\n } else if (bal - prevDays < 0) {\r\n bal = prevDays - bal;\r\n edao().increment(empId, bal);\r\n } else {\r\n bal = bal - prevDays;\r\n edao().decrement(empId, bal);\r\n }\r\n System.out.println(\"Leave updated Successfully For \" + (day1 - counts) + \" day.\");\r\n }\r\n }\r\n } else {\r\n s=\"invalid employee\";\r\n }\r\n return s;\r\n }",
"protected boolean isAcceptableAfter(double offeredutil, Bid lnextBid)\n\t\t\tthrows Exception {\n\t\treturn offeredutil >= utilitySpace.getUtility(lnextBid);\n\t}",
"public Boolean endLoan(Loan loan) {\n\t\tif (loans.contains(loan)) {\n\t\t\tif (loan.isOverdue()) {\n\t\t\t\tSystem.out.println(name.toUpperCase() + \" is returning the book after the return date limit.\");\n\t\t\t}\n\t\t\tloans.remove(loan);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSystem.out.println(\"Error: the choosen book couldn't be found in the person's current books.\");\n\t\t\treturn false;\n\t\t}\n\t}",
"public static String approveDeny(int leave_id,int empId,EnumLeaveStatus l_status) {\r\n Leave ld = Leave.listById(leave_id);\r\n String s=null;\r\n if (ld != null) {\r\n int noOfDays = ld.getNoLeaveDays();\r\n int emplId = ld.getEmployeeId();\r\n int empdId = Leave.showManager(leave_id);\r\n String dbStatus = null;\r\n System.out.println(l_status);\r\n System.out.println(ld.getLeaveStatus());\r\n if (empId != empdId) {\r\n s=\"You are not authorised to access this employee.\";\r\n return s;\r\n }\r\n if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n \r\n } else if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.approved)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.denied)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment(dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n } else {\r\n if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else {\r\n s=\"Already on given status\";\r\n }\r\n }\r\n } else {\r\n s=\"Invalid LeaveId\";\r\n }\r\n return s;\r\n }",
"static void getLargestWalkedAway(long amount) {\n if (amount > largestWalkedAway) {\n largestWalkedAway = amount;\n }\n }",
"private void checkAnnoRateo() {\n\t\tif(req.getRateo().getAnno()>=primaNota.getBilancio().getAnno()){\n\t\t\tthrow new BusinessException(ErroreCore.OPERAZIONE_NON_CONSENTITA.getErrore(\"L'anno del Rateo deve essere minore dell'anno della prima nota di partenza.\"));\n\t\t}\n\t}",
"public void wagesTillCondition() {\n\t\twhile (true) {\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t\ttotalHrs = totalHrs + workingHrs;\n\t\t\ttotalDays = totalDays + 1;\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\tif (totalHrs == 100 || totalDays == 20) {\n\t\t\t\tSystem.out.println(totalSalary);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public void loanAmount_Validation() {\n\t\thelper.assertString(usrLoanAmount_AftrLogin(), payOffOffer.usrLoanAmount_BfrLogin());\n\t\tSystem.out.print(\"The loan amount is: \" + usrLoanAmount_AftrLogin());\n\n\t}",
"public void checkOverDue() {\n\t\tif (state == loanState.current && //changed 'StAtE' to 'state' and ' lOaN_sTaTe.CURRENT to loanState.current\r\n\t\t\tCalendar.getInstance().getDate().after(date)) { //changed Calendar.gEtInStAnCe to Calender.getInstance and gEt_DaTe to getDate and DaTe to date\r\n\t\t\tthis.state = loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\t\t\t\r\n\t\t} //added curly brackets\r\n\t}",
"private static boolean hasFunds(double cost)\n {\n if (Clock.getRoundNum() < 200) { //TODO edit this out if necessary\n return rc.getTeamOre() > cost;\n } else {\n return rc.getTeamOre() > cost*2;\n }\n }",
"public boolean isStudentBanned(long reservationTime, long currentTime){\n return (currentTime - reservationTime > 5*60000);\n }",
"public static void atmCheckDepositValid(String accNum, int amount) {\n\t\ttry {\n\t\t\tif (amount >= 0 && amount <= 200000) {\n\t\t\t\tif (AccMgr.checkDailyDepositLimit(accNum, amount)) {\n\t\t\t\t\tAccMgr.performDailyDeposit(amount, accNum);\n\t\t\t\t\tTransactionFileMgr.addDepTransaction(accNum, Integer.toString(amount));\n\t\t\t\t\tSystem.out.println(\"Deposit successfully!\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"You have exceeded the daily limit.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Please enter a number between 0 - 200000:\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"public int checkEND(BattleEvent be, int amount, boolean burnStun);",
"private boolean isValidOption(int choice, int maxChoice)\n {\n return choice > 0 && choice <= maxChoice;\n }",
"private boolean riskComputation(ExposureSummary exposureSummary){\n\n double duration_close = exposureSummary.getAttenuationDurationsInMinutes()[0];\n double duration_medium = exposureSummary.getAttenuationDurationsInMinutes()[1];\n\n double risk_duration = duration_close + (duration_medium * 0.5);\n\n if (risk_duration * 60 >= BuildConfig.ATTENUATION_THRESHOLD){\n new ExposureNotificationSharedPreferences(getApplicationContext()).setPossibleExposureFound(true);\n return true;\n }\n new ExposureNotificationSharedPreferences(getApplicationContext()).setPossibleExposureFound(false);\n if ((risk_duration > 0) && (risk_duration < BuildConfig.ATTENUATION_THRESHOLD)) {\n CustomUtility.customLogger(\"A_CW_91009_\" + (int)risk_duration);\n }\n return false;\n }",
"private void checksOldExpense() {\n DateUtils dateUtils = new DateUtils();\n\n // Breaking date string from date base\n String[] expenseDate = dateDue.getText().toString().split(\"-\");\n\n if((Integer.parseInt(expenseDate[GET_MONTH]) < Integer.parseInt(dateUtils.currentMonth))\n && (Integer.parseInt(expenseDate[GET_YEAR]) <= Integer.parseInt(dateUtils.currentYear))){\n\n }\n }",
"private boolean hasCoolOffPeriodExpired(Jwt jwt) {\n\n Date issuedAtTime = jwt.getClaimsSet().getIssuedAtTime();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.set(Calendar.MILLISECOND, 0);\n calendar.add(Calendar.MINUTE, -1);\n\n return calendar.getTime().compareTo(issuedAtTime) > 0;\n }",
"public boolean Student_StudentLoanLessThanEqualTwelve() {\n\t\t\n\t\tfor (Student stu : ((List<Student>)EntityManager.getAllInstancesOf(\"Student\"))) {\n\t\t\tif (!(stu.getLoanedNumber() <= 12)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"boolean hasExpiryTimeSecs();",
"protected boolean shouldHoldEncumbrance() {\n if (getTripEnd() == null) {\n return false; // we won't hold encumbrances if we don't know when the trip is ending\n }\n final java.sql.Date tripEnd = new java.sql.Date(getTripEnd().getTime());\n return getTravelEncumbranceService().shouldHoldEntries(tripEnd);\n\n }",
"public double calculateExpectedDisagreement();",
"boolean hasAgeRange();",
"boolean hasExpiry();"
] | [
"0.69880086",
"0.6900238",
"0.60956454",
"0.6008511",
"0.5889435",
"0.5861255",
"0.57449114",
"0.5718201",
"0.5703148",
"0.564089",
"0.55983335",
"0.5596105",
"0.5535848",
"0.5524403",
"0.5513108",
"0.54748076",
"0.5462105",
"0.54602623",
"0.5454861",
"0.54527897",
"0.5422936",
"0.5392717",
"0.5380899",
"0.53746986",
"0.53708994",
"0.53636163",
"0.535431",
"0.535216",
"0.5345671",
"0.534071",
"0.53374034",
"0.5333561",
"0.53252226",
"0.5302057",
"0.52938706",
"0.52880317",
"0.5276593",
"0.5270543",
"0.5269943",
"0.52638185",
"0.5263612",
"0.52497697",
"0.52483463",
"0.5243681",
"0.5220817",
"0.5206506",
"0.5194461",
"0.5191351",
"0.5189034",
"0.51861435",
"0.5185585",
"0.5185474",
"0.5177708",
"0.51759",
"0.5171899",
"0.51683307",
"0.51668227",
"0.51665294",
"0.5152842",
"0.51496696",
"0.5144702",
"0.5143727",
"0.51371515",
"0.5126198",
"0.5125216",
"0.51159215",
"0.51099694",
"0.51099694",
"0.51014555",
"0.50997186",
"0.50891787",
"0.508705",
"0.50845975",
"0.5083711",
"0.5075476",
"0.50745624",
"0.5072226",
"0.507087",
"0.5062282",
"0.5060967",
"0.50579274",
"0.5054691",
"0.5054515",
"0.50530565",
"0.50484765",
"0.5044897",
"0.5041225",
"0.50374687",
"0.50343037",
"0.5030328",
"0.502572",
"0.5025263",
"0.50182974",
"0.5006256",
"0.50033885",
"0.50032175",
"0.50016975",
"0.49982467",
"0.49971116",
"0.4991587"
] | 0.64524335 | 2 |
/ Check to see if the employee has a record for this year. If the employee does not have a record the annual leave request can be granted. | private boolean employeeDoesNotHaveAnAbsentRecordForThisYear(AbsentYear absYear, int empId) {
List<EmployeeAbsent> empAbs = empAbsentRepo.findEmployeeAbsentRecordsForYear(absYear.getYear(), empId);
return (empAbs.isEmpty()) ? true : false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkEmployeesAnnualLeaveRecordForYear(AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tlong numDaysAbsent = empAbsentRepo.numDaysEmployeeHasBeenAbsent(absYear.getYear(), empId, \"Annual Leave\");\n\t\tlong annualLeave = rasRepo.findSeniority(empId).getHolidayEntitlement();\n\t\tlong diff = (annualLeave - numDaysAbsent) - numDaysRequested;\n\t\treturn (numDaysRequested <= (diff)) ? true : false;\n\t}",
"public boolean checkAnnualLeaveRequest(AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tif(employeeDoesNotHaveAnAbsentRecordForThisYear(absYear, empId)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn checkEmployeesAnnualLeaveRecordForYear(absYear, numDaysRequested, empId);\n\t}",
"private boolean checksForAnnualLeaveAreOk(String reason, AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tif(reason.compareTo(\"Annual Leave\") == 0) {\n\t\t\treturn (checkAnnualLeaveRequest(absYear, numDaysRequested, empId)) ? true : false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean hasEmployee() {\n return employeeBuilder_ != null || employee_ != null;\n }",
"public boolean hasEmployee() {\n return employeeBuilder_ != null || employee_ != null;\n }",
"@java.lang.Override\n public boolean hasEmployee() {\n return employee_ != null;\n }",
"@java.lang.Override\n public boolean hasEmployee() {\n return employee_ != null;\n }",
"private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }",
"public boolean approveCheckIn(SoftwareEngineer e){\n int i;\n\n for(i=0;i<this.curHeadCount;i++){\n if(employee[i].equals(e)) break;\n }\n\n return (i<this.curHeadCount && e.access);\n }",
"@java.lang.Override\n public boolean hasAcademicYear() {\n return academicYear_ != null;\n }",
"private AbsentYear findAbsentYear(Employee emp, LocalDate startDate) {\n\t\tAbsentYear absentYear = absYearRepo.findByEmployeeAndYear(emp, (short)startDate.getYear());\n\t\tif(absentYear == null) {\n\t\t\tabsentYear = createAbsentYear(emp, startDate);\n\t\t}\n\t\treturn absentYear;\n\t}",
"public boolean hasAcademicYear() {\n return academicYearBuilder_ != null || academicYear_ != null;\n }",
"boolean hasEmployee();",
"boolean hasEmployee();",
"public boolean isALeapYear(int year){\n\n if (((year%4 == 0) && (year%100!=0)) || (year%400==0)){\n return true;\n }\n return false;\n }",
"boolean hasEmployeelist();",
"public boolean hasEmployeelist() {\n return employeelist_ != null;\n }",
"@Override\r\n\tpublic boolean updateReviewOfPastYearDetails(ExemptTeamMember exemptTeamMember, int year) {\n\t\treturn exemptTeamMemberDAO.updateReviewOfPastYearDetails(exemptTeamMember,year);\r\n\t}",
"private AbsentYear createAbsentYear(Employee emp, LocalDate startDate) {\n\t\tAbsentYear absentYear = new AbsentYear();\n\t\tabsentYear.setEmployee(emp);\n\t\tabsentYear.setYear((short)startDate.getYear());\n\t\tabsYearRepo.save(absentYear);\n\t\treturn absentYear;\n\t}",
"public boolean hasEmployeelist() {\n return employeelistBuilder_ != null || employeelist_ != null;\n }",
"public boolean isSetExam_records() {\n return this.exam_records != null;\n }",
"public boolean accrualEOMAdjustment()\n\t{\n\t\treturn _lsPeriod.get (0).periods().get (0).accrualEOMAdjustment();\n\t}",
"private static boolean checkIfYearExist(SpreadSheet spreadSheet, int year) {\r\n Sheet sheet = spreadSheet.getSheet(String.valueOf(year));\r\n return sheet != null;\r\n }",
"@Override\r\n\tpublic int fetchYearOfAnEmployee(int clockNum) {\n\t\treturn exemptTeamMemberDAO.fetchYearOfAnEmployee(clockNum);\r\n\t}",
"public void yearEndNotification() {\n\t\tif ((this.isActive()) && (!this.hasInfiniteAge())) {\n\t\t\tage++;\n\n\t\t\tif (age >= maximum_age)\n\t\t\t\tactive_status = false;\n\t\t}\n\t}",
"public boolean hasExam(int period) {\n return (iTable[period]!=null);\n }",
"public boolean approveCheckIn(SoftwareEngineer e) {\n for(SoftwareEngineer se : this.directReports) {\n if(se.getEmployeeID() == e.getEmployeeID() && e.codeAccess) {\n // found!\n return true;\n }\n }\n return false;\n }",
"private boolean isExactlyOneCEO(List<Employee> employees) {\n //check if exactly one employee doesn't have a manager (The CEO)\n return employees.stream().filter(e -> e.getManagerId() == null).count() == 1;\n }",
"public boolean experired() {\n\t\tint month = Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\tString[] parts = this.experiation.split(\"/\");\n\t\tString originalMonth = parts[0];\n\t\tint oM = Integer.parseInt(originalMonth);\n\t\tString originalYear = parts[1];\n\t\tint oY = Integer.parseInt(originalYear);\n\t\t\n\t\tif(oY < year) {\n\t\t\treturn true;\n\t\t}\n\t\tif(oY == year && oM < month) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean leapyear(int yr){\n if(yr%4 == 0 && yr%100 != 0){ //If year is divisible by 4 but not by 100\r\n days[1] = 29; //Set February's days to 29\r\n return true; //Retrn true.\r\n }\r\n return false; //Otherwise, return false.\r\n }",
"private void updateRecord() {\r\n int empId = -1;\r\n boolean hasError = false;\r\n try {\r\n empId = Integer.parseInt(employeeYearsOfWorkJTextField.getText());\r\n } catch (NumberFormatException e) {\r\n hasError = true;\r\n JOptionPane.showMessageDialog(this, \"Employee id must be integer\");\r\n }\r\n String telephone = employeeNumberJTextField.getText();\r\n String name = employeeNameJTextField.getText();\r\n int years = -1;\r\n try {\r\n years = Integer.parseInt(employeeYearsOfWorkJTextField.getText());\r\n } catch (NumberFormatException e) {\r\n hasError = true;\r\n JOptionPane.showMessageDialog(this, \"Years of works must be an integer\");\r\n }\r\n if (!hasError) {\r\n records.add(new Record(empId, telephone, name, years));\r\n }\r\n }",
"public boolean LeapYearValidation(int year) {\r\n\t\tif (year >= 1582 && year <= 9999)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\r\n\t}",
"public EmployeeAbsent recordEmployeeAbsent(Employee emp, LocalDate startDate, LocalDate endDate, String reason) {\n\t\tEmployeeAbsent empAbs = null;\n\t\tAbsentYear absYear = findAbsentYear(emp, startDate);\n\t\tlong numDays = calculateNumberOfDaysAbsentInclusive(startDate, endDate);\n\t\tif(numDays > 0 ) {\n\t\t\tif(checksForAnnualLeaveAreOk(reason, absYear, numDays, emp.getEmpId())) {\n\t\t\t\tempAbs = GenericBuilder.of(EmployeeAbsent::new)\n\t\t\t\t\t\t.with(EmployeeAbsent::setAbsentStartDate, startDate)\n\t\t\t\t\t\t.with(EmployeeAbsent::setAbsentEndDate, endDate)\n\t\t\t\t\t\t.with(EmployeeAbsent::setAbsentYear, absYear)\n\t\t\t\t\t\t.with(EmployeeAbsent::setNumDays, numDays)\n\t\t\t\t\t\t.with(EmployeeAbsent::setReason, reason)\n\t\t\t\t\t\t.build();\n\t\t\t\tem.persist(empAbs);\n\t\t\t}\n\t\t}\n\t\treturn empAbs;\n\t}",
"public boolean checkForAbsenceInDB(Absence absence) throws SQLException {\n int studentKey = absence.getStudentKey();\n java.sql.Date sqlDate = java.sql.Date.valueOf(absence.getDate()); // converts LocalDate date to sqlDate\n try(Connection con = dbc.getConnection()){\n String SQLStmt = \"SELECT * FROM ABSENCE WHERE StudentKey = '\" + studentKey + \"' AND DATE = '\" + sqlDate+\"';\";\n Statement stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(SQLStmt);\n while(rs.next())\n {\n return true; // Absence found\n }\n }\n return false; // No Absence found\n }",
"protected void checkMappingReleaseYear(RecordUrlData record) {\n checkMainMapping(record, RECORD_FACTORY.getMappingReleaseYear(record));\n }",
"private static boolean checkIfYearContinue(Sheet sheet) {\r\n String last = sheet.getCellAt(\"A\" + sheet.getRowCount()).getTextValue(); \r\n return !last.equals(\"end\");\r\n }",
"boolean hasAcquireDate();",
"public boolean employeeExists() {\n\t\tResultSet r = super.query(\"SELECT \" + C.COLUMN_ID + \" FROM \" + C.TABLE_EMPLOYEE\n\t\t\t\t+ \" WHERE \" + C.COLUMN_ID + \"=\" + this.getID() + \" LIMIT 1\");\n\t\tif (r == null)\n\t\t\treturn false;\n\t\ttry {\n\t\t\tsuper.setRecentError(null);\n\t\t\treturn r.first();\n\t\t} catch (SQLException e) {\n\t\t\tsuper.setRecentError(e);\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isSetYearPay() {\n return EncodingUtils.testBit(__isset_bitfield, __YEARPAY_ISSET_ID);\n }",
"public boolean validateEmployeePackage() {\n\t\treturn this.validateID() && this.validateFirstName() && this.validateLastName();\n\t}",
"boolean hasLeaveGameReqeuest();",
"private boolean validityChecker(TextField employeeId) {\n\t\tString empid = employeeId.getValue();\n\t\tint length = empid.length();\n\t\tif (empid.matches(\".*[A-Za-z].*\") || length < minLength || length> maxLength)\n\t\t\treturn false;\n\t\tif(!isNew){\n\t\tif (EmployeeDAO.getEmployee(empid) == null)\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }",
"public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }",
"public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }",
"public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }",
"public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }",
"public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }",
"public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }",
"public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }",
"public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }",
"public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }",
"public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }",
"public boolean hasExam(int period, ExExam exclude) {\n return (iTable[period]!=null && !iTable[period].variable().equals(exclude));\n }",
"public boolean verifyLeaveDate(Date date){\t\t\n\t\tLocale en = new Locale(\"en\");\t\t\n\t\tString lDate = String.format(en, \"%1$ta, %1$tb %1$te, %1$tY\", date);\n\t\treturn leaveDate.getText().equals(lDate);\n\t}",
"private boolean isDivisibleBy400(int year) {\n\t\treturn checkDivisibility(year, 400);\n\t}",
"boolean hasDoctorInAppointmentSchedule(Doctor doctor);",
"private boolean createEmployeeAvailability(String name) {\n int empID;\n empID = findEmployee(name);\n\n String employeeAvailablitySQL = \"INSERT INTO empAvailability(empID, availability) values(\" +\n \"'\" + empID + \"'\" + \",\" +\n \"'000,000,000,000,000,000,000')\";\n return (database.updateDatabase(employeeAvailablitySQL));\n }",
"private boolean employeeDobValid(EmployeeDto newEmpDto) {\n\t\treturn (newEmpDto.getDob().compareTo(Calendar.getInstance()) < 0) ? true : false ;\n\t}",
"private boolean isDivisibleBy100(int year) {\n\t\treturn checkDivisibility(year, 100);\n\t}",
"public boolean employeeIdPresent(int employeeId) {\n\n \tif (employeeService.employeeIdPresent(employeeId)) {\n return true;\n } else {\n \t return false;\n \t}\n }",
"private boolean isValidManagerIds(List<Employee> employees) {\n // if an employee's manager id refers to his own employee id, then this is invalid\n if (employees.stream().filter(e -> e.getEmployeeId().equals(e.getManagerId())).count()!=0)\n return false;\n\n List<Integer> employeeIds = employees.stream()\n .mapToInt(Employee::getEmployeeId)\n .boxed().collect(Collectors.toList());\n List<Integer> managerIds = employees.stream()\n .filter(Employee::hasManager)\n .mapToInt(Employee::getManagerId).distinct()\n .boxed().collect(Collectors.toList());\n //check if there's a manager id that is not one of the employees\n return employeeIds.containsAll(managerIds);\n }",
"@Override\n public boolean hasWriteAccess() {\n if (this.employmentDate.isAfter(LocalDate.now().minusMonths(6))) {\n return false;\n } else {\n return true;\n }\n }",
"private void givenExchangeRatesExistsForEightMonths() {\n }",
"private int restrictYear(Message msg, String parameter, int section) {\n int[] years = setYearRestriction(msg, parameter, section);\n\n if (years[0] == ERROR_CODE[0]) {\n return -1;\n }\n\n yearRestriction = true;\n lowerYear = years[0];\n upperYear = years[1];\n return 0;\n }",
"public boolean isSetBirthplace()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BIRTHPLACE$24) != 0;\n }\n }",
"public void getBlankLeaveRecord(LeaveApproval leaveApp) {\n\t\t\tObject empObject[] = new Object[1];\r\n\t\t\tempObject[0] = leaveApp.getUserEmpId();\r\n\t\t\tObject[][] data = getSqlModel().getSingleResult(getQuery(2),empObject);\r\n\t\t\t\r\n\t\t\tlogger.info(\"data----------: \"+String.valueOf(empObject[0]));\r\n\t\t\t\r\n\t\t\tArrayList<Object> appList = new ArrayList<Object>();\r\n\t\t\t\r\n\t\t\tfor(int i=0; i<data.length; i++) {\t\r\n\t\t\tLeaveApproval bean1= new LeaveApproval();\r\n\t\t\tLeaveApplication appBean = new LeaveApplication();\r\n\t\t\t\tbean1.setAppCode(String.valueOf(data[i][0]));\r\n\t\r\n\t\t\t\tbean1.setEmpId(String.valueOf(data[i][1]));\r\n\t\t\t\tbean1.setEmpName(String.valueOf(data[i][2]));\r\n\t\t\t\tbean1.setAppDate(String.valueOf(data[i][3]));\r\n\t\t\t\tbean1.setFromDate(String.valueOf(data[i][4]));\r\n\t\t\t\tbean1.setToDate(String.valueOf(data[i][5]));\r\n\t\t\t\tbean1.setTotalDays(String.valueOf(data[i][6]));\r\n\t\t\t\t\r\n\t\t\tappList.add(bean1);\r\n\t\t}\r\n\t\t\tleaveApp.setAppList(appList);\r\n\t\t\t\r\n\t}",
"private void givenExchangeRateExistsForABaseAndDate() {\n }",
"private boolean exceedRange(int year) {\n\t\tboolean exceeds = false;\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint upperRange = currentYear + RANGE_LIMIT;\n\t\tint lowerRange = currentYear - RANGE_LIMIT;\n\t\t\n\t\tif(year < lowerRange || year > upperRange){\n\t\t\texceeds = true;\n\t\t}\n\t\treturn exceeds;\n\t}",
"boolean validateEmployeeId(String employeeId);",
"@Override\r\n\tpublic void reviewOfPastYear(ExemptTeamMember exemptTeamMember) {\n\t\t\r\n\t\t\r\n\t}",
"public boolean expired(){\n return !Period.between(dateOfPurchase.plusYears(1), LocalDate.now()).isNegative();\n }",
"public boolean isValidList(List<Employee> employees) {\n return isValidEmployeeNames(employees)\n && isValidEmployeeIds(employees)\n && isExactlyOneCEO(employees)\n && isValidManagerIds(employees);\n }",
"private void userHasBooking() throws SQLException {\n BookingModel bookingModel2 = new BookingModel();\n if (bookingModel2.checkUserBooking(employeeID)) {\n hasBooking = true;\n } else {\n hasBooking = false;\n }\n\n }",
"public void checkAttendance() {\n\t\tRandom random = new Random();\n\t\trandomCheck = random.nextInt(3);\n\t\tif (randomCheck == isFullTimePresent) {\n\t\t\tSystem.out.println(\"Employee is Full Time Present \");\n\t\t\tworkingHrs = 8;\n\t\t} else if (randomCheck == isPartTimePresent) {\n\t\t\tSystem.out.println(\"Employee is Part time Present \");\n\t\t\tworkingHrs = 4;\n\t\t} else {\n\t\t\tSystem.out.println(\"Employee is Absent \");\n\t\t\tworkingHrs = 0;\n\t\t}\n\t}",
"boolean hasEndDate();",
"public boolean unlockRecord(LeaveEncashmentProcess leaveEncashProcess, String empCode[]) {\n\t\tboolean result = false;\r\n\t\ttry {\r\n\t\t\tString query = \" UPDATE HRMS_ENCASHMENT_PROCESS_HDR \"\r\n\t\t\t\t\t+ \" SET ENCASHMENT_PROCESS_FLAG='N' WHERE ENCASHMENT_PROCESS_CODE=\"\r\n\t\t\t\t\t+ leaveEncashProcess.getProcessCode();\r\n\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t\r\n\t\t\tif (empCode != null && empCode.length > 0\r\n\t\t\t\t\t&& !leaveEncashProcess.getSalarymonth().equals(\"\") \r\n\t\t\t\t\t&& !leaveEncashProcess.getSalaryyear().equals(\"\")) {\r\n\t\t\t\t\r\n\t\t\t\tquery = \"DELETE FROM HRMS_MISC_SALARY_UPLOAD WHERE APPL_CODE = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getProcessCode()\r\n\t\t\t\t\t\t+ \" AND APPL_TYPE = 'L'\"\r\n\t\t\t\t\t\t+ \" AND MONTH = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getSalarymonth()\r\n\t\t\t\t\t\t+ \" AND YEAR = \"\r\n\t\t\t\t\t\t+ leaveEncashProcess.getSalaryyear();\r\n\r\n\t\t\t\tresult = getSqlModel().singleExecute(query);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"private boolean leap(int year) {\n\t\tif (!(year % 4 == 0)) {\n\t\t\treturn false;\n\t\t} else if (!(year % 100 == 0)) {\n\t\t\treturn true;\n\t\t} else if (!(year % 400 == 0)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public void isEmployee(String username) throws ValidationException {\n\t\ttry {\n\t\t\temployeeService.getEmployeeId(username);\n\t\t} catch (ServiceException e) {\n\t\t\tthrow new ValidationException(INVALIDEMPLOYEE);\n\t\t}\n\t}",
"public boolean IsElectionYear(int Year) {\n\t\tif (Year % 4 == 0 && Year!=0) {\n\t\t\tif(debug) logger.info(\"IsElectionYear: true\");\n\t\t\treturn(true);\n\t\t}\n\t\telse {\n\t\t\tif(debug) logger.info(\"IsElectionYear: false\");\n\t\t\treturn(false);\t\n\t\t}\t\n\t}",
"private boolean employeeDataIsOk(RoleAndSeniority ras, EmployeeDto newEmpDto) {\n\t\tif(employeeSalaryInTheCorrectRange(ras, newEmpDto.getSalary()) && employeeSsnValid(newEmpDto)\n\t\t\t\t&& employeeNameValid(newEmpDto) && employeeDobValid(newEmpDto)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private DataWrapper isEduValid(Long fid, Long eid) {\n Education edu = founderService.getEdu(eid);\n if (edu == null || edu.getFounderId() != fid) {\n return new DataWrapper(\n ErrorCodeEnum.BIZ_DATA_NOT_FOUND,\n String.format(\n \"The founder (ID=%d) has no education experience (ID=%d).\",\n fid, eid));\n }\n return isFounderValid(fid);\n }",
"public boolean checkRecordExistsForToday() {\n ArrayList<Record> todaysRecords = getRecordsForDate(new Date());\n return (todaysRecords != null && todaysRecords.size() > 0);\n }",
"public boolean Leap_Gregorian(double year)\n {\n return ((year % 4) == 0) && (!(((year % 100) == 0) && ((year % 400) != 0)));\n }",
"public boolean isEmployeeActive(Number employeeId) {\n boolean isActive = false;\n EmployeeVVOImpl empVO =\n (EmployeeVVOImpl)findValidationViewObject(\"EmployeeVVO1\");\n empVO.initQuery(employeeId);\n\n // Just doing a simple existence check. If you don't find a\n // match, return false.\n if (empVO.hasNext()) {\n isActive = true;\n }\n return isActive;\n }",
"public boolean isLeapYear(){\n\t if (((this.year % 4 == 0) && (this.year % 100 != 0)) || (this.year %400 == 0))\n\t return true;\n\treturn false;\n }",
"public boolean isLeapYear(int year){\r\n if(year%4 != 0){\r\n return false;\r\n } else if(year%100 == 0){\r\n if(year%400 != 0) return false; \r\n }\r\n return true;\r\n }",
"public void Leapyear(int YearToCheck) {\n\n boolean leapValue = false;\n\n if (((YearToCheck % 4 == 0) && (YearToCheck % 100 != 0)) || (YearToCheck % 400 == 0)){\n leapValue=true;}\n\n if (leapValue)\n System.out.println(YearToCheck + \" is a leap year.\");\n else\n System.out.println(YearToCheck + \" is not a leap year.\");\n }",
"public static boolean esAnoBisiesto(int year) {\r\n\t\t assert year >= 1583; // not valid before this date.\r\n\t\t return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);\r\n\t}",
"public static boolean checkExpiryDate(int year,int month,int day) {\n \tCalendar expirydate=Calendar.getInstance();\n\t\texpirydate.set(year, month-1, day);\n\t\tcal=Calendar.getInstance();\n\t\t\n\t\tif(cal.getTime().compareTo(expirydate.getTime())>0) {\n\t\t\tlogErrPrint(\"checkExpiryDate(): Has expired...\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public static String approveDeny(int leave_id,int empId,EnumLeaveStatus l_status) {\r\n Leave ld = Leave.listById(leave_id);\r\n String s=null;\r\n if (ld != null) {\r\n int noOfDays = ld.getNoLeaveDays();\r\n int emplId = ld.getEmployeeId();\r\n int empdId = Leave.showManager(leave_id);\r\n String dbStatus = null;\r\n System.out.println(l_status);\r\n System.out.println(ld.getLeaveStatus());\r\n if (empId != empdId) {\r\n s=\"You are not authorised to access this employee.\";\r\n return s;\r\n }\r\n if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n \r\n } else if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.approved)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.denied)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment(dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n } else {\r\n if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else {\r\n s=\"Already on given status\";\r\n }\r\n }\r\n } else {\r\n s=\"Invalid LeaveId\";\r\n }\r\n return s;\r\n }",
"@Test\n public void getAvailableEmployeeById() {\n userDAO.createUser(new User(\"dummy3\", \"dummy3\", 1));\n\n //creating dummy shiftlist\n shiftListResource.createShiftlist(new ShiftList(\"dummy3\", 1, false, new Date(2017-01-01), 0, true));\n\n //test\n assertNotNull(availableEmployeeResource.getAvailableEmployees(new AvailableEmployee(2,\"2017-02-02\",3)));\n\n //clean up\n shiftListResource.removeShiftlist(new Date(2017-01-01),1,\"dummy3\");\n userDAO.removeUser(\"dummy3\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy3\"));\n }",
"EmployeeLeaveQuotaVO getEmpPrevYearLeaveQuota(EmployeeLeaveQuotaVO leave, Integer year);",
"public Employeedetails checkEmployee(String uid);",
"@Test\n public void isLeapYear() {\n assertFalse(Deadline.isLeapYear(Integer.parseInt(VALID_YEAR_2018)));\n\n // Valid leap year -> returns true\n assertTrue(Deadline.isLeapYear(Integer.parseInt(LEAP_YEAR_2020)));\n\n // Valid year divisible by 4 but is common year -> returns false\n assertFalse(Deadline.isLeapYear(Integer.parseInt(NON_LEAP_YEAR_2100)));\n\n // Valid year divisible by 100 but is leap year -> returns true\n assertTrue(Deadline.isLeapYear(Integer.parseInt(LEAP_YEAR_2400)));\n }",
"public void calculateEmpWage(int empHrs){\n \tint totalWorkingDays = 1;\n\tint totalWorkingHours = 0;\n\t/*\n\t*varable empAttendance tells if emp is present '0' or absent '1' on that day of the month\n\t*/\n\tint empAttendance;\n\t/*\n\t*variable monthlyWage stores the monthly wage of the employee\n\t*/\n int monthlyWage = 0;\n\t/*\n\t*variable daysPresent keeps count of the no of days present for a month\n\t*/\n\t int daysPresent = 0;\n\t /*\n\t *variable hoursWorked keeps count of the no of hours worked in a month\n\t */\n\t int hoursWorked = 0;\n\n\t while(true){\n\t Random rand = new Random();\n empAttendance = rand.nextInt(2);\n if(empAttendance == 0){\n daysPresent += 1;\n System.out.println(\"Day \"+totalWorkingDays+\": Present\");\n monthlyWage += CompanyEmpWage.getempRate() * empHrs;\n hoursWorked += empHrs;\n }\n else{\n System.out.println(\"Day \"+totalWorkingDays+\": Absent\");\n monthlyWage += 0;\n hoursWorked += 0;\n }\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays() || !(totalWorkingHours < CompanyEmpWage.getmaxHrs())){\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays()){\n System.out.println(CompanyEmpWage.getnumOfDays()+\" days are over!\");\n break;\n }\n else{\n System.out.println(CompanyEmpWage.getmaxHrs()+\" hours reached!\");\n break;\n }\n }\n\ttotalWorkingDays++;\n \ttotalWorkingHours += empHrs;\n }\n System.out.println(\"Company: \"+CompanyEmpWage.getcompName()+\"\\nNo of days worked out of \"+CompanyEmpWage.getnumOfDays()+\" days: \"+daysPresent+\"\\nNo of hours worked out of \"+CompanyEmpWage.getmaxHrs()+\" hours: \"+hoursWorked+\"\\nSalary for the month: \"+monthlyWage);\n }",
"public boolean isPaid () throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\ttry{\n\t\t\t\n\t\t\tString date = this.getDate();\n\t\t\tString query = \"SELECT current_payment_counter FROM loan\"\n\t\t\t\t\t\t+ \" WHERE client_id = '\"+this.client_id+\"' AND start_date = '\"+date+\"';\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(query);\n\t\t\trs.next();\n\t\t\tint counter = rs.getInt(1);\n\t\t\treturn (counter == no_years*no_payments_yearly);\n\t\t\t\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}",
"@RequestMapping(value = \"/getEmployeeAnnualProductivity\", method = RequestMethod.POST)\r\n public @ResponseBody String getEmployeeAnnualProductivity(\r\n @RequestParam(\"employeeId\") int employeeId, @RequestParam(\"year\") int year) {\r\n logger.info(\"inside ReportGenerationController getEmployeeAnnualProductivity()\");\r\n logger.info(\"data received: employee id: \" + employeeId + \" year: \" + year);\r\n\r\n return reportGenerationService.getEmployeeAnnualProductivity(employeeId, year);\r\n\r\n }",
"public boolean clearRegisterEmployee() {\n\t\tboolean retVal = false;\n\t\t\n\t\t//Validate someone is currently signed onto the register\n\t\t//Note: Someone is logged into a register if the employee object isn't null\n\t\tif(null != register[registerSelected].getEmployee()) {\n\t\t\tregister[registerSelected].clearEmployee();\n\t\t\tretVal = true;\n\t\t}\n\t\treturn retVal;\n\t}",
"boolean hasResidentYn();"
] | [
"0.770876",
"0.7208955",
"0.6648866",
"0.6069489",
"0.6069489",
"0.60637677",
"0.60637677",
"0.59506303",
"0.5900087",
"0.57852274",
"0.57540846",
"0.571709",
"0.56844604",
"0.56844604",
"0.56583965",
"0.56515086",
"0.5610875",
"0.5605964",
"0.5597493",
"0.5483247",
"0.5482114",
"0.5469696",
"0.5440403",
"0.5427886",
"0.54182404",
"0.5385229",
"0.5359358",
"0.5358709",
"0.5356517",
"0.5326714",
"0.5319687",
"0.5289792",
"0.52740794",
"0.5260766",
"0.5256204",
"0.5226064",
"0.5219805",
"0.5217139",
"0.5196829",
"0.51909983",
"0.5190993",
"0.51810753",
"0.51704764",
"0.51704764",
"0.51704764",
"0.51704764",
"0.51704764",
"0.51704764",
"0.51704764",
"0.51704764",
"0.51704764",
"0.51704764",
"0.51704764",
"0.51552016",
"0.5152081",
"0.5140168",
"0.5130394",
"0.5112202",
"0.5110696",
"0.51069033",
"0.5085583",
"0.5082984",
"0.5079314",
"0.5068977",
"0.5066315",
"0.5055405",
"0.5052339",
"0.50467926",
"0.50459397",
"0.50394577",
"0.50060654",
"0.50016356",
"0.49952593",
"0.4966683",
"0.4961078",
"0.495606",
"0.49469095",
"0.49429634",
"0.4941629",
"0.49397555",
"0.49308947",
"0.49257654",
"0.4923436",
"0.49150473",
"0.49141893",
"0.49099845",
"0.49051663",
"0.49002036",
"0.48997548",
"0.48967814",
"0.4888497",
"0.48834664",
"0.4879635",
"0.48789215",
"0.48758343",
"0.48701397",
"0.48686975",
"0.48677722",
"0.48675066",
"0.48673552"
] | 0.6954536 | 2 |
/ Find out how many days annual leave the employee has taken for the year. If the number of days requested are greater than those remaining, deny request. | private boolean checkEmployeesAnnualLeaveRecordForYear(AbsentYear absYear, long numDaysRequested, int empId) {
long numDaysAbsent = empAbsentRepo.numDaysEmployeeHasBeenAbsent(absYear.getYear(), empId, "Annual Leave");
long annualLeave = rasRepo.findSeniority(empId).getHolidayEntitlement();
long diff = (annualLeave - numDaysAbsent) - numDaysRequested;
return (numDaysRequested <= (diff)) ? true : false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean checkAnnualLeaveRequest(AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tif(employeeDoesNotHaveAnAbsentRecordForThisYear(absYear, empId)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn checkEmployeesAnnualLeaveRecordForYear(absYear, numDaysRequested, empId);\n\t}",
"private boolean checksForAnnualLeaveAreOk(String reason, AbsentYear absYear, long numDaysRequested, int empId) {\n\t\tif(reason.compareTo(\"Annual Leave\") == 0) {\n\t\t\treturn (checkAnnualLeaveRequest(absYear, numDaysRequested, empId)) ? true : false;\n\t\t}\n\t\treturn true;\n\t}",
"private int calculateDaysLeftOnLicense(Date pNowDate, Date pExpiryDate)\n{\n \n //milliseconds since 1/1/1970, 00:00:00 GMT\n long nowTime = pNowDate.getTime(); \n long expiryTime = pExpiryDate.getTime();\n\n long daysRemaining = expiryTime - nowTime; //time left in milliseconds\n \n daysRemaining /= 1000; //convert to seconds\n daysRemaining /= 60; //convert to minutes\n daysRemaining /= 60; //convert to hours\n daysRemaining /= 24; //convert to days\n \n if (daysRemaining > Integer.MAX_VALUE) {daysRemaining = Integer.MAX_VALUE;}\n if (daysRemaining < Integer.MIN_VALUE) {daysRemaining = Integer.MIN_VALUE;}\n \n return((int)daysRemaining);\n \n}",
"public int numberOfAvailableDays(List<Vacation> employeeVacationList) {\n\n int numberOfDays = 0;\n List<LocalDate> employeelistToCheck = getDaysBetweenDates(employeeVacationList);\n numberOfDays = maxDaysVacations - getTotalNumberOfWorkingDays(employeelistToCheck);\n\n if (numberOfDays < 0) {\n\n return -1;\n\n } else {\n\n return numberOfDays;\n }\n }",
"public static String apply_for_leave(int empId,String start_date, String end_date, int no_ldays,String leave_type, String leave_reason)\r\n throws ParseException {\r\n String s=null;\r\n Employee e = Employee.listById(empId);\r\n if (e != null) {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date leave_from = sdf.parse(start_date);\r\n Date leave_to = sdf.parse(end_date);\r\n Calendar start = Calendar.getInstance();\r\n start.setTime(leave_from);\r\n Calendar end = Calendar.getInstance();\r\n end.setTime(leave_to);\r\n int count = 0;\r\n for (Date date = start.getTime(); start.before(end); start.add(Calendar.DATE, 1), date = start.getTime()) {\r\n Calendar c = Calendar.getInstance();\r\n c.setTime(date);\r\n int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n if (dayOfWeek == 1 || dayOfWeek == 7) {\r\n count++;\r\n }\r\n }\r\n System.out.println(count);\r\n long diff = leave_to.getTime() - leave_from.getTime();\r\n System.out.println(diff);\r\n long days = diff / (1000 * 60 * 60 * 24);\r\n Date today = new Date();\r\n String appliedOn = sdf.format(today);\r\n days = days + 1;\r\n long availBal = 0;\r\n long dif = 0;\r\n long updLeave = 0;\r\n String leaveStatus = null;\r\n // int overl = Leave.countNo(empId, start_date, end_date);\r\n availBal = e.getavailleaves();\r\n dif = availBal - days;\r\n updLeave = days - count;\r\n int bal = (int) updLeave;\r\n if (days <= 0) {\r\n s=\"Start Date Must be Greater than EndDate...\";\r\n } else if (dif < 0) {\r\n s=\"insufficient leav balance\";\r\n } else if (no_ldays != days) {\r\n s=\"NO Of Days Should be right\";\r\n } else if (leave_from.compareTo(sdf.parse(appliedOn)) < 0) {\r\n s=\"Start should be greater or equal to current date\";\r\n // } else if (overl > 0) {\r\n // s=\"already applied on given date\";\r\n } else {\r\n if (e.getMgr_id() == 0) {\r\n leaveStatus = \"APPROVED\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal, leave_type, leaveStatus, leave_reason, appliedOn);\r\n s=\"Leave Applied Successfully...\";\r\n } else {\r\n leaveStatus = \"PENDING\";\r\n dao().apply_for_leave(empId, start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, appliedOn);\r\n edao().decrement(empId, bal);\r\n s = \"Leave Applied Successfully For \" + (days - count) + \" Days.\";\r\n }\r\n }\r\n } else {\r\n s=\"invalid employee\";\r\n }\r\n return s;\r\n }",
"public int absoluteNumberOfDays() {\n\t\tint thisYear, priorYears;\n\t\t\n\t\tthisYear = (month - 1) * 31 + day;\n\t\t if (month > 2) {\n\t\t\t thisYear = thisYear - ((4*month+23) / 10);\n\t\t if ((((year % 4) == 0) && ((year % 100) != 0)) || ((year % 400) == 0))\n\t\t\t thisYear = thisYear + 1;\n\t\t }\n\t\t priorYears = 365*(year-1)+(year-1)/4-(year-1)/100+(year-1)/400;\n\t\t return thisYear + priorYears;\n\t}",
"@Override\r\n\tpublic int yearsTillRetirement() //calculate years until retirement\r\n\t{\n\t\tint retire = (int)Math.round((35 - (super.getYears() + (double)(usedUnpaidVacation + usedVacation* 2 + usedSickDays)/260)));\r\n\t\t\r\n\t\treturn retire;\r\n\t\t\r\n\t\t\r\n\t}",
"public int numberOfAvailableDays(List<Vacation> employeeList, Vacation formVacation) {\n\n int numberOfDays = 0;\n List<Vacation> formVacationDays = new ArrayList<>();\n formVacationDays.add(formVacation);\n List<LocalDate> employeelistToCheck = getDaysBetweenDates(employeeList);\n List<LocalDate> formVacations = getDaysBetweenDates(formVacationDays);\n numberOfDays = maxDaysVacations - getTotalNumberOfWorkingDays(employeelistToCheck);\n numberOfDays = numberOfDays - getTotalNumberOfWorkingDays(formVacations);\n\n if (numberOfDays < 0) {\n\n return -1;\n\n } else {\n\n return numberOfDays;\n }\n }",
"public int checkExpiryDate(LocalDate today) {\n\n final int limit = 100;\n long expirationDate = Duration.between(\n this.food.getCreateDate().atTime(0, 0), this.food.getExpiryDate().atTime(0, 0)\n ).toDays();\n long goneDate = Duration.between(\n this.food.getCreateDate().atTime(0, 0), today.atTime(0, 0)\n ).toDays();\n\n return (int) (limit * goneDate / expirationDate);\n\n }",
"public void yearEndNotification() {\n\t\tif ((this.isActive()) && (!this.hasInfiniteAge())) {\n\t\t\tage++;\n\n\t\t\tif (age >= maximum_age)\n\t\t\t\tactive_status = false;\n\t\t}\n\t}",
"public int getLBR_LatePaymentPenaltyDays();",
"void aDayPasses(){\n\t\t\n\t\t/**\n\t\t * Modify wait time if still exists\n\t\t */\n\t\tif(!daysUntilStarts.equals(0)){\n\t\t\tdaysUntilStarts--;\n\t\t\tif((!hasInstructor() || getSize() == 0) && daysUntilStarts.equals(0)){\n\t\t\t\tif(hasInstructor())\n\t\t\t\t\tinstructor.unassignCourse();\n\t\t\t\tfor(Student student : enrolled){\n\t\t\t\t\tstudent.dropCourse();\n\t\t\t\t}\n\t\t\t\tsubject.unassign();\n\t\t\t\tinstructor = null;\n\t\t\t\tenrolled = new ArrayList<Student>();\n\t\t\t\tcancelled = true;\n\t\t\t} else if (daysUntilStarts.equals(0)) {\n\t\t\t\tsubject.unassign();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t/**\n\t\t * Modify run time if still exists\n\t\t */\n\t\tif(!daysToRun.equals(0)){\n\t\t\tdaysToRun--;\n\t\t}\n\t\t/**\n\t\t * If couse finished un-assigned people from it\n\t\t */\n\t\tif(daysToRun.equals(0) && !finished){\n\t\t\tfor(Student student : enrolled){\n\t\t\t\tstudent.graduate(subject);\n\n\t\t\t}\n\t\t\tinstructor.unassignCourse();\n\t\t\tinstructor = null;\n\t\t\tfinished = true;\n\t\t}\n\t}",
"public int daysOverdue(int today);",
"boolean hasRemainDays();",
"static int countLeapYears(DaysBetween d) \n {\n int years = d.y;\n \n // Check if the current year needs to be considered\n // for the count of leap years or not\n if (d.m <= 2) \n {\n years--;\n }\n \n // An year is a leap year if it is a multiple of 4,\n // multiple of 400 and not a multiple of 100.\n return years / 4 - years / 100 + years / 400;\n }",
"int getEmploymentDurationInMonths();",
"public static double calculateEmployeePension(int employeeSalaryForBenefits) {\n double total = 0;\n try {\n Scanner stdin = new Scanner(System.in);\n\n System.out.println(\"Please enter start date in format (example: May,2015): \");\n String joiningDate = stdin.nextLine();\n System.out.println(\"Please enter today's date in format (example: August,2017): \");\n String todayDate = stdin.nextLine();\n String convertedJoiningDate = DateConversion.convertDate(joiningDate);\n String convertedTodayDate = DateConversion.convertDate(todayDate);\n stdin.close();\n String[] actualDateToday = convertedTodayDate.split(\"/\");\n String[] actualJoiningDate = convertedJoiningDate.split(\"/\");\n\n Integer yearsEmployed = Integer.valueOf(actualDateToday[1]) - Integer.valueOf(actualJoiningDate[1]);\n\n if ( Integer.valueOf(actualJoiningDate[0]) > Integer.valueOf(actualDateToday[0]) ) {\n yearsEmployed--;\n }\n\n total = (((employeeSalaryForBenefits * 12) * 0.05) * yearsEmployed);\n\n\n\n\n System.out.println(\"Total pension to receive by employee based on \" + yearsEmployed + \" years with the company \" +\n \"(5% of yearly salary for each year, based on employee's monthly salary of $\" + employeeSalaryForBenefits + \"): \" + total);\n\n }\n catch (NumberFormatException e) {\n e.printStackTrace();\n }\n return total;\n }",
"public void calculateEmpWage(int empHrs){\n \tint totalWorkingDays = 1;\n\tint totalWorkingHours = 0;\n\t/*\n\t*varable empAttendance tells if emp is present '0' or absent '1' on that day of the month\n\t*/\n\tint empAttendance;\n\t/*\n\t*variable monthlyWage stores the monthly wage of the employee\n\t*/\n int monthlyWage = 0;\n\t/*\n\t*variable daysPresent keeps count of the no of days present for a month\n\t*/\n\t int daysPresent = 0;\n\t /*\n\t *variable hoursWorked keeps count of the no of hours worked in a month\n\t */\n\t int hoursWorked = 0;\n\n\t while(true){\n\t Random rand = new Random();\n empAttendance = rand.nextInt(2);\n if(empAttendance == 0){\n daysPresent += 1;\n System.out.println(\"Day \"+totalWorkingDays+\": Present\");\n monthlyWage += CompanyEmpWage.getempRate() * empHrs;\n hoursWorked += empHrs;\n }\n else{\n System.out.println(\"Day \"+totalWorkingDays+\": Absent\");\n monthlyWage += 0;\n hoursWorked += 0;\n }\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays() || !(totalWorkingHours < CompanyEmpWage.getmaxHrs())){\n if(totalWorkingDays == CompanyEmpWage.getnumOfDays()){\n System.out.println(CompanyEmpWage.getnumOfDays()+\" days are over!\");\n break;\n }\n else{\n System.out.println(CompanyEmpWage.getmaxHrs()+\" hours reached!\");\n break;\n }\n }\n\ttotalWorkingDays++;\n \ttotalWorkingHours += empHrs;\n }\n System.out.println(\"Company: \"+CompanyEmpWage.getcompName()+\"\\nNo of days worked out of \"+CompanyEmpWage.getnumOfDays()+\" days: \"+daysPresent+\"\\nNo of hours worked out of \"+CompanyEmpWage.getmaxHrs()+\" hours: \"+hoursWorked+\"\\nSalary for the month: \"+monthlyWage);\n }",
"double getAgeDays();",
"public int daysRemainingInFreeTrial() {\n\n if (trialExpiration == null) {\n throw new IllegalStateException();\n }\n //use the date at midnight to normalize the time component of the dates\n return Days.daysBetween(new DateTime().toDateMidnight(), new DateTime(trialExpiration).toDateMidnight()).getDays();\n }",
"public int calcDays() {\n\t\tint days = day-1;\r\n\t\tdays += ((month-1)*30);\r\n\t\tdays += ((year -2000) * (12*30));\r\n\t\treturn days;\r\n\t}",
"Integer getDaysSpanned();",
"public static String update_leave(int empId,int leave_id,String start_date,String end_date,int no_ldays,String leave_type,String leave_reason )\r\n throws ParseException {\r\n Employee emp = Employee.listById(empId);\r\n Leave leavedetails = Leave.listById(leave_id);\r\n String s=null;\r\n int prevDays = leavedetails.getNoLeaveDays();\r\n if (emp != null) {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n Date leave_from = sdf.parse(start_date);\r\n Date leave_to = sdf.parse(end_date);\r\n Calendar start = Calendar.getInstance();\r\n start.setTime(leave_from);\r\n Calendar end = Calendar.getInstance();\r\n end.setTime(leave_to);\r\n int counts = 0;\r\n for (Date date = start.getTime(); start.before(end); start.add(Calendar.DATE, 1), date = start.getTime()) {\r\n Calendar c = Calendar.getInstance();\r\n c.setTime(date);\r\n int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\r\n if (dayOfWeek == 1 || dayOfWeek == 7) {\r\n counts++;\r\n}\r\n }\r\n System.out.println(counts);\r\n long diff1 = leave_to.getTime() - leave_from.getTime();\r\n System.out.println(diff1);\r\n long day1 = diff1 / (1000 * 60 * 60 * 24);\r\n Date today = new Date();\r\n String appliedOn = sdf.format(today);\r\n day1 = day1 + 1;\r\n long availBalance = 0;\r\n long diff = 0;\r\n long updLeave = 0;\r\n String leaveStatus = null;\r\n // int overl = Leave.countNo(empId,start_date,end_date);\r\n availBalance = emp.getavailleaves();\r\n diff = availBalance - day1;\r\n updLeave = day1 - counts;\r\n int bal = (int) updLeave;\r\n if (empId != Leave.listById(leave_id).getEmployeeId()) {\r\n s=\"You are not authorised to update this leave.\";\r\n } else if (day1 <= 0) {\r\n s=\"Start Date Must be Greater than EndDate...\";\r\n } else if (diff < 0) {\r\n s=\"insufficient leave balance\";\r\n } else if (no_ldays != day1) {\r\n s=\"NO Of day Should be right\";\r\n } else if (leave_from.compareTo(sdf.parse(appliedOn)) < 0) {\r\n s=\"Start should be greater or equal to current date\";\r\n } else {\r\n if (emp.getMgr_id() == 0) {\r\n leaveStatus = \"APPROVED\";\r\n dao().update_leave(start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, leave_id);\r\n s=\"Leave updated Successfully...\";\r\n } else {\r\n leaveStatus = \"PENDING\";\r\n dao().update_leave(start_date, end_date, bal,\r\n leave_type, leaveStatus, leave_reason, leave_id);\r\n if (bal - prevDays > 0) {\r\n bal = bal - prevDays;\r\n edao().decrement(empId, bal);\r\n } else if (bal - prevDays < 0) {\r\n bal = prevDays - bal;\r\n edao().increment(empId, bal);\r\n } else {\r\n bal = bal - prevDays;\r\n edao().decrement(empId, bal);\r\n }\r\n System.out.println(\"Leave updated Successfully For \" + (day1 - counts) + \" day.\");\r\n }\r\n }\r\n } else {\r\n s=\"invalid employee\";\r\n }\r\n return s;\r\n }",
"private int getDays() {\n\t\tlong arrival = arrivalDate.toEpochDay();\n\t\tlong departure = departureDate.toEpochDay();\n\t\tint days = (int) Math.abs(arrival - departure);\n\n\t\treturn days;\n\t}",
"long getTermDays();",
"EmployeeLeaveQuotaVO getEmpPrevYearLeaveQuota(EmployeeLeaveQuotaVO leave, Integer year);",
"private static int getDaysSinceNewYear() {\n\t\tGregorianCalendar now = new GregorianCalendar();\n\n\t\treturn now.get(GregorianCalendar.DAY_OF_YEAR);\n\t}",
"private int restrictYear(Message msg, String parameter, int section) {\n int[] years = setYearRestriction(msg, parameter, section);\n\n if (years[0] == ERROR_CODE[0]) {\n return -1;\n }\n\n yearRestriction = true;\n lowerYear = years[0];\n upperYear = years[1];\n return 0;\n }",
"public long calculateNumberOfDaysAbsentInclusive(LocalDate startDate, LocalDate endDate) {\n\t\tlong businessDays = 0;\n\t\tlong numDaysBetween = ChronoUnit.DAYS.between(startDate, endDate);\n\t\t\t\t\n\t\tif(numDaysBetween > 0) {\n\t\t\tbusinessDays = IntStream.iterate(0, i -> i + 1).limit(numDaysBetween).mapToObj(startDate::plusDays)\n\t\t\t\t.filter(d -> Stream.of(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY)\n\t\t\t\t.anyMatch(d.getDayOfWeek()::equals)).count() + 1;\n\t\t}\n\t\treturn businessDays;\n\t}",
"public int nrExams(int period, ExExam exclude) {\n return (hasExam(period,exclude)?1:0);\n }",
"public Integer getEdad() {\n Calendar fechaNac_ = Calendar.getInstance();\n fechaNac_.setTime(fechaNac);\n try {\n return Math.abs(Calendar.getInstance().get(Calendar.YEAR) - fechaNac_.get(Calendar.YEAR));\n } catch (ArithmeticException e) {\n return -1;\n }\n }",
"public void yourAgeInSeconds()\n {\n System.out.print( \"Enter your goddamn age in years: \" );\n long years = scan.nextLong();\n long yearDays = 365 * years;\n System.out.print( \"Enter month number: \" );\n long months = scan.nextLong();\n long monthDays = 0;\n if ( months > 0 ) // 1 month\n {\n monthDays = 31;\n {\n if ( months > 1 ) // 2 months\n {\n monthDays = monthDays + 28;\n if ( months > 2 ) // 3 months\n {\n monthDays = monthDays + 31;\n if ( months > 3 )\n {\n monthDays = monthDays + 30;\n if ( months > 4 )\n {\n monthDays = monthDays + 31;\n if ( months > 5 )\n {\n monthDays = monthDays + 30;\n if ( months > 6 )\n {\n monthDays = monthDays + 31;\n if ( months > 7 )\n {\n monthDays = monthDays + 31;\n if ( months > 8 )\n {\n monthDays = monthDays + 30;\n if ( months > 9 )\n {\n monthDays = monthDays + 31;\n if ( months > 10 )\n {\n monthDays \n = monthDays + 30;\n if ( months > 11 )\n {\n monthDays \n = monthDays \n + 31;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n System.out.print( \"Enter the day number: \" );\n long days = scan.nextLong();\n long totalDays = yearDays + monthDays + days;\n long seconds = totalDays * 24 * 60 * 60;\n System.out.println( \"Your are \" + seconds + \" seconds old.\" );\n }",
"@Override\r\n\tpublic void reviewOfPastYear(ExemptTeamMember exemptTeamMember) {\n\t\t\r\n\t\t\r\n\t}",
"public static int getTotalNumberOfDays(int year, int month) { \n int total=0;\n for(int q = 1800; q < year; q++){\n if(isLeapYear(q)){\n total = total + 366; //leap year\n }\n else{\n total = total + 365;//not leap year or regular year\n } \n }\n for(int q = 1; q <= month - 1; q++){\n total = total + getNumberOfDaysInMonth(year, q);\n }\n return total;//returns the total \n }",
"public void calculateVacationDays(){\n }",
"public int getValidityDays() {\r\n return validityDays;\r\n }",
"public static void main(String[] args) {\r\n\t Scanner in = new Scanner(System.in);\r\n\t int d1 = in.nextInt();\r\n\t int m1 = in.nextInt();\r\n\t int y1 = in.nextInt();\r\n\t int d2 = in.nextInt();\r\n\t int m2 = in.nextInt();\r\n\t int y2 = in.nextInt();\r\n\t LocalDate returnDate=LocalDate.of(y1,m1,d1);\r\n\t LocalDate dueDate=LocalDate.of(y2,m2,d2);\r\n\t long fine=0;\r\n\t if(returnDate.isBefore(dueDate)||returnDate.equals(dueDate))fine=0;\r\n\t else if(returnDate.isAfter(dueDate)){\r\n\t \tif(returnDate.getYear()==dueDate.getYear()){\r\n\t \t\tif(returnDate.getMonth()==dueDate.getMonth()){\r\n\t \t\t\tfine=(returnDate.getDayOfYear()-dueDate.getDayOfYear())*15;\r\n\t \t\t}else{\r\n\t \t\t\t\tfine=(returnDate.getMonthValue()-dueDate.getMonthValue())*500;\r\n\t \t\t\r\n\t \t}\r\n\t \t\t\r\n\t \t\t\r\n\t } else fine=10000;\r\n\t }else fine=10000;\r\n\t System.out.println(fine);\r\n\t }",
"public int keptPeriod(int returnedDay,int returendMonth, int returnedYear){\n //following equation can convert georgian date to a julian day number\n int julianDue=((1461*(year + 4800 + (month-14)/12))/4 +(367 * (month - 2 - 12 * ((month- 14)/12)))/12 - (3 * ((year + 4900 + (month - 14)/12)/100))/4 + day - 32075);\n int julianReturned=((1461*(returnedYear + 4800 + (returendMonth-14)/12))/4 +(367 * (returendMonth - 2 - 12 * ((returendMonth- 14)/12)))/12 - (3 * ((returnedYear + 4900 + (returendMonth - 14)/12)/100))/4 + returnedDay - 32075);\n //getting difference between the due date and the returning date by subtracting julian day numbers.\n //this method will also consider leap years, if there is any.\n int duration=julianReturned-julianDue;\n\n return duration;\n }",
"@RequestMapping(\"/leaveAccept\")\npublic String calculation(@RequestParam int leaveWish, @RequestParam int id,@RequestParam int leavePresent, HttpServletRequest request)\n{\n\tSystem.out.println(id);\n\tSystem.out.println(leaveWish);\n\tSystem.out.println(leavePresent);\n\t\n\tEmployeeRegmodel obj = ergserv.findOne(id);\n\t\n\tif(leavePresent>leaveWish)\n\t{\n\t\tint a = leavePresent-leaveWish;\n\t\tSystem.out.println(a);\n\t\tobj.setLeaveCount(a);\n\t\trequest.setAttribute(\"Yes\", \"Leave Granted.\");\n\t\t\n\t}\n\telse\n\t{\n\t\trequest.setAttribute(\"No\", \"No LEAVE LEFT, CONTACT WITH Employee\");\n\t}\n\tergserv.addEmployeeRegmodel(obj);\n\treturn \"buttons.jsp\";\n\n}",
"protected boolean isOldEnough(EYSDate restrictedDOB, int itemRestrictiveAge)\n {\n int yearOfRestrictedDOB = restrictedDOB.getYear();\n if (yearOfRestrictedDOB < 1000)\n {\n // old enough if the skipped age is not less\n return yearOfRestrictedDOB >= itemRestrictiveAge;\n }\n\n // old enough if customer's age is larger than item's restricted age\n int customerAge = restrictedDOB.yearsBetween(new EYSDate());\n return customerAge >= itemRestrictiveAge;\n }",
"public int getHolidayDaysCountForWorkerAndYear(Worker wWorker, int year)\n {\n int holiday = 0;\n try\n {\n Query queryDeleteByDSId = getNamedQuery(Holiday.NQ_FIND_HOLIDAY_BY_WORKER_AND_YEAR);\n // set Worker\n queryDeleteByDSId.setParameter(Holiday.PARAMETER_WORKER, wWorker);\n // set Month\n queryDeleteByDSId.setParameter(Holiday.PARAMETER_YEAR, year);\n // execute and return result\n Object objResult = queryDeleteByDSId.getSingleResult();\n if (objResult != null)\n {\n holiday = (int) objResult;\n }\n\n }\n catch (Exception e)\n {\n Log.error(this, e, \"namedQuery getHolidayDaysCountForWorkerAndYear error\");\n }\n\n return holiday;\n }",
"public static int computeEmpWageForCompany(String company ,int empRate,int numOfDays,int maxHrs) {\n\n int empHrs = 0;\n int totalEmpHrs = 0;\n int totalWorkingDays = 0;\n\n while (totalEmpHrs < maxHrs && totalWorkingDays < numOfDays) {\n totalWorkingDays ++;\n System.out.println(\"Day:\" + totalWorkingDays);\n\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_PART_TIME:\n System.out.println(\"Empcheck is 1 (parttime)\");\n empHrs = 4;\n break;\n case IS_FULL_TIME:\n System.out.println(\"Empcheck is 2 (fulltime)\");\n empHrs = 8;\n break;\n default:\n System.out.println(\"Empcheck is 0\");\n empHrs = 0;\n }\n totalEmpHrs = (totalEmpHrs + empHrs);\n System.out.println(\"Day : \" +totalWorkingDays+ \"Employee hours:\" + empHrs);\n }\n int totalEmpWage =totalEmpHrs * empRate;\n System.out.println(\"Total Employee wage for company : \" +company+ \"is \"+totalEmpWage);\n return totalEmpWage;\n }",
"long getExpirations();",
"private boolean leapyear(int yr){\n if(yr%4 == 0 && yr%100 != 0){ //If year is divisible by 4 but not by 100\r\n days[1] = 29; //Set February's days to 29\r\n return true; //Retrn true.\r\n }\r\n return false; //Otherwise, return false.\r\n }",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int returnDay = scanner.nextInt();\n int returnMonth = scanner.nextInt();\n int returnYear = scanner.nextInt();\n int dueDay = scanner.nextInt();\n int dueMonth = scanner.nextInt();\n int dueYear = scanner.nextInt();\n int fine = 0;\n if(returnYear > dueYear) fine = 10000;\n else if(returnYear < dueYear) fine = 0;\n else if(returnMonth == dueMonth && returnDay > dueDay) {\n fine = 15 * (returnDay - dueDay);\n }\n else if(returnMonth > dueMonth){\n fine = 500 * (returnMonth - dueMonth);\n }\n\n System.out.println(fine);\n\n }",
"public static int countDaysLeft(String currentDate, String dueDate){\n // Part 1. In the case where the current date has passed the due date, the dueDateHasPassed method is called with the currentDate and dueDate arguments \n // as inputs. \n if(dueDateHasPassed(currentDate, dueDate)){\n return 0;\n }\n // Part 2. In the case where the current date and the due date share the same month and year, the remaining days is calculated.\n else if((getMonth(currentDate) == getMonth(dueDate)) && (getYear(currentDate) == getYear(dueDate))){\n int numofDays = getDay(dueDate) - getDay(currentDate);\n return numofDays;\n }\n // Part 3. In the case where the current date and the due date share only the same year, the remaining days is calculated. \n else if(getYear(currentDate) == getYear(dueDate)){\n int i = getMonth(currentDate);\n int j = getMonth(dueDate);\n int totalDaysFromMonths = 0;\n while(i<j){\n totalDaysFromMonths += getDaysInAMonth(i,getYear(currentDate));\n i++;\n }\n int totalDaysOfSameYear = totalDaysFromMonths - getDay(currentDate) + getDay(dueDate);\n return totalDaysOfSameYear;\n }\n // Part 4. All other cases will result in the due date being in the futre of a different year, that of the current date. The remaining days will be \n // calculated. \n else{\n int b = getYear(dueDate);\n int a = getYear(currentDate);\n int totalDaysFromYears = 0;\n while(a<b){\n if(isLeapYear(a)){\n totalDaysFromYears += 366;\n }\n else{ \n totalDaysFromYears += 365;\n }\n a++;\n }\n int i = 1;\n int totalDaysFromMonthsOfcurrentDateYear = 0;\n while(i<getMonth(currentDate)){\n totalDaysFromMonthsOfcurrentDateYear += getDaysInAMonth(i, getYear(currentDate));\n i++;\n }\n int j = 1;\n int totalDaysFromMonthsOfdueDateYear = 0;\n while(j<getMonth(dueDate)){\n totalDaysFromMonthsOfdueDateYear +=getDaysInAMonth(j, getYear(dueDate));\n j++;\n }\n int totalDays = totalDaysFromYears - totalDaysFromMonthsOfcurrentDateYear - getDay(currentDate) + totalDaysFromMonthsOfdueDateYear + getDay(dueDate);\n return totalDays;\n }\n }",
"public int giveRaise() throws EmployeeSalaryException {\n try {\n if (this.yearsWorked % 3 == 0) {\n this.salary = (this.salary + 3000);\n this.yearsWorked++;\n if (this.salary > maxEmployeeSalary) {\n this.salary = maxEmployeeSalary;\n throw new EmployeeSalaryException();\n }\n } else {\n this.yearsWorked++;\n }\n } catch (EmployeeSalaryException ex) {\n ex.printStackTrace();\n System.out.println(\"Sorry maximum salary can only be: \" + maxEmployeeSalary);\n }\n return this.salary;\n }",
"public void checkLeapYear(int year) {\r\n\t int count=1;\r\n\t int temp=year;\r\n\t\twhile(temp>10){\r\n\t\t\tint r= temp%10;\r\n\t\t\tcount++;\r\n\t\t\ttemp=temp/10;\r\n\t\t}\r\n\t\tif(count>=3){\r\n\t\t\tif(year%4==0){\r\n\t\t\t\tSystem.out.println(\"given year is leap year:\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"given year is not leap year:\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"please enter atleast 4 digit no to find leap year\");\r\n\t\t}\r\n}",
"public int remainingFees()\r\n\t{\r\n\t\treturn feesTotal-feesPaid;\t\t\r\n\t}",
"private int calculateAge() {\n\t\treturn LocalDate.now().getYear() - this.birthYear;\n\t}",
"private static int getDaysInYear(final int year) {\n return LocalDate.ofYearDay(year, 1).lengthOfYear();\n }",
"public int getNumberOfDays()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1 || mn == 3 || mn == 5 || mn == 7 || mn == 8 || mn == 10 || mn == 12)\r\n {return 31;}\r\n if (mn == 4 || mn == 6 || mn == 9 || mn == 11)\r\n {return 30;}\r\n else\r\n {return 28;}\r\n }",
"private AbsentYear findAbsentYear(Employee emp, LocalDate startDate) {\n\t\tAbsentYear absentYear = absYearRepo.findByEmployeeAndYear(emp, (short)startDate.getYear());\n\t\tif(absentYear == null) {\n\t\t\tabsentYear = createAbsentYear(emp, startDate);\n\t\t}\n\t\treturn absentYear;\n\t}",
"public boolean calcAge() {\n int age;\n boolean oldEnough = false;\n Calendar c = Calendar.getInstance();\n \n //getting todays date\n int thisYear = c.get(Calendar.YEAR);\n int thisMonth = c.get(Calendar.MONTH) + 1;\n int thisDay = c.get(Calendar.DAY_OF_MONTH);\n\n age = thisYear - yearDOB;\n if (age == 18 && thisMonth == monthDOB && thisDay < dayDOB) {\n age = 17;\n oldEnough = true;\n } else if (age < 18) {\n oldEnough = false;\n }\n return oldEnough;\n }",
"@Test\n\tpublic void testNumberOfDays() {\n\t\tint thirtyExpected = 30;\n\t\tint thirtyResult = Main.numberOfDays(9, 2015);\n\t\tassertTrue(thirtyExpected == thirtyResult);\n\n\t\t// Test regular 31 day month\n\t\tint thirtyOneExpected = 31;\n\t\tint thirtyOneResult = Main.numberOfDays(1, 2016);\n\t\tassertTrue(thirtyOneExpected == thirtyOneResult);\n\n\t\t// Test 'Feb 2016' - regular leap year\n\t\tint regularLeapExpected = 29;\n\t\tint regularLeapResult = Main.numberOfDays(2, 2016);\n\t\tassertTrue(regularLeapExpected == regularLeapResult);\n\n\t\t// Test 'February 2300' - century but not a leap year\n\t\tint notCenturyLeapExpected = 28;\n\t\tint notCenturyLeapResult = Main.numberOfDays(2, 2300);\n\t\tassertTrue(notCenturyLeapExpected == notCenturyLeapResult);\n\n\t\t// Test 'February 2400' - century and a leap year\n\t\tint centuryLeapExpected = 29;\n\t\tint centuryLeapResult = Main.numberOfDays(2, 2400);\n\t\tassertTrue(centuryLeapExpected == centuryLeapResult);\n\n\t}",
"public void findEasterDay()\n {\n while(year <= endYear)\n {\n EasterMath(year);\n for(int j = 0; j < 11; j++)\n {\n for(int k = 0; k < 30; k++)\n {\n if(month == j && day == k)\n {\n dates[j][k]++;\n }\n }\n }\n year++;\n }\n }",
"public int getLBR_CollectionReturnDays();",
"@Override\r\n\tpublic boolean updateReviewOfPastYearDetails(ExemptTeamMember exemptTeamMember, int year) {\n\t\treturn exemptTeamMemberDAO.updateReviewOfPastYearDetails(exemptTeamMember,year);\r\n\t}",
"public Integer getFailureRetentionPeriodInDays() {\n return this.failureRetentionPeriodInDays;\n }",
"@Test\n public void nbDaysBetweenSameYear(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.nbDaysBetween(new Date(31,Month.december,1970)),364);\n }",
"public static void main(String[] args) {\r\n\t\tDate today = new Date(2, 26, 2012);\r\n\t\tSystem.out.println(\"Input date is \" + today);\r\n\t\tSystem.out.println(\"Printing the next 10 days after \" + today);\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\ttoday = today.next();\r\n\t\t\tSystem.out.println(today);\r\n\t\t}\r\n\t\tDate expiry = new Date(2011);\r\n\t\tSystem.out.println(\"testing year 2011 as input:\" + expiry);\r\n\r\n\t\tDate todayDate = new Date();\r\n\t\tSystem.out.println(\"todays date: \" + todayDate);\r\n\t\tSystem.out.println(\"current month:\" + todayDate.month);\r\n\r\n\t\t// testing isValidMonth function\r\n\t\tDate start = new Date(\"08-01-2010\");\r\n\t\tDate end1 = new Date(\"09-01-2010\");\r\n\t\tboolean param1 = start.isValidMonth(4, end1);\r\n\t\tSystem.out.println(\"is April valid between: \" + start + \" and \" + end1\r\n\t\t\t\t+ \": \" + param1);\r\n\t\tDate end2 = new Date(\"02-01-2011\");\r\n\t\tboolean param2 = start.isValidMonth(2, end2);\r\n\t\tSystem.out.println(\"is feb valid between: \" + start + \" and \" + end2\r\n\t\t\t\t+ \": \" + param2);\r\n\t\tboolean param3 = start.isValidMonth(8, start);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tparam3 = start.isValidMonth(4, start);\r\n\t\tSystem.out.println(\"is april valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tDate end3 = new Date(\"02-01-2010\");\r\n\t\tboolean param4 = start.isValidMonth(8, end3);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + end3\r\n\t\t\t\t+ \": \" + param4);\r\n\t\t \r\n\t\tDate lease = new Date(\"1-01-2012\");\r\n\t\tDate expiry1 = new Date(\"12-31-2012\");\r\n\r\n\t\t// testing daysBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING daysBetween method\\n------------------------------\");\r\n\t\tint count = lease.daysBetween(expiry);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry + \"is: \"\r\n\t\t\t\t+ count);\r\n count = new Date(\"1-01-2011\").daysBetween(new Date(\"12-31-2011\"));\r\n\t\tSystem.out.println(\"Days between [1-01-2011] and [12-31-2011]\" + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tcount = lease.daysBetween(expiry1);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry1 + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tDate testDate = new Date(\"12-31-2013\");\r\n\t\tcount = lease.daysBetween(testDate);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [12-31-2013] \"\r\n\t\t\t\t+ \"is: \" + count);\r\n\t\tcount = lease.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n count = lease.daysBetween(new Date(\"1-10-2012\"));\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [1-10-2012\" + \"is: \"\r\n\t\t\t\t+ count);\r\n \r\n\t\tcount = testDate.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + testDate + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n\r\n\t\t// testin isBefore\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING isBefore method\\n------------------------------\");\r\n\t\tboolean isBefore = today.isBefore(today.next());\r\n\t\tSystem.out.println(today + \"is before \" + today.next() + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.next().isBefore(today);\r\n\t\tSystem.out.println(today.next() + \"is before \" + today + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.isBefore(today);\r\n\t\tSystem.out.println(today + \"is before \" + today + \": \" + isBefore);\r\n isBefore = today.isBefore(today.addMonths(12));\r\n\t\tSystem.out.println(today + \"is before \" + today.addMonths(12) + \": \" + isBefore);\r\n\r\n\t\t// testing addMonths\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING addMonths method\\n------------------------------\");\r\n\t\ttoday = new Date(\"1-31-2011\");\r\n\t\tDate newDate = today.addMonths(1);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 1 months to \" + today + \" gives: \" + newDate);\r\n\t\tnewDate = today.addMonths(13);\r\n\t\tSystem.out.println(\"adding 13 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\ttoday = new Date(\"3-31-2010\");\r\n\t\tnewDate = today.addMonths(15);\r\n\t\tSystem.out.println(\"adding 15 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(23);\r\n\t\tSystem.out.println(\"adding 23 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(49);\r\n\t\tSystem.out.println(\"adding 49 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(0);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 0 months to \" + today + \" gives: \" + newDate);\r\n\t\t\r\n\t\t// testing monthsBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING monthsBetween method\\n------------------------------\");\r\n\t\tint monthDiff = today.monthsBetween(today.addMonths(1));\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + today.addMonths(1)\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\tmonthDiff = today.next().monthsBetween(today);\r\n\t\tSystem.out.println(\"months between \" + today.next() + \" and \" + today\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date(\"09-30-2011\");\r\n\t\tDate endDate = new Date(\"2-29-2012\");\r\n\t\tmonthDiff = today.monthsBetween(endDate);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate + \": \"\r\n\t\t\t\t+ monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate1 = new Date(\"12-04-2011\");\r\n\t\tmonthDiff = today.monthsBetween(endDate1);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate1\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate2 = new Date(\"12-22-2010\");\r\n\t\tmonthDiff = today.monthsBetween(endDate2);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate2\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\t\r\n\t\t// following should generate exception as date is invalid!\r\n\t\t// today = new Date(13, 13, 2010);\r\n\r\n\t\t// expiry = new Date(\"2-29-2009\");\r\n // newDate = today.addMonths(-11);\r\n\r\n\t}",
"public int getLBR_ProtestDays();",
"private boolean exceedRange(int year) {\n\t\tboolean exceeds = false;\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint upperRange = currentYear + RANGE_LIMIT;\n\t\tint lowerRange = currentYear - RANGE_LIMIT;\n\t\t\n\t\tif(year < lowerRange || year > upperRange){\n\t\t\texceeds = true;\n\t\t}\n\t\treturn exceeds;\n\t}",
"public static void checkSemester() {\r\n\t\tObject[] a = ReadingAndWritingInFile.read(\"Days.txt\");\r\n\t\tLong days = (Long) a[0]; // days of currents semester.\r\n\t\tLocalDate lastdate = (LocalDate) a[1]; // date of last connection to program.\r\n\t\tif (!(LocalDate.now().equals(lastdate))) {\r\n\t\t\tdays = days + ChronoUnit.DAYS.between(lastdate, LocalDate.now());\r\n\t\t\tif (days > 182) {\r\n\t\t\t\tsetSemester();\r\n\t\t\t\tdays = days - 182;\r\n\t\t\t}\r\n\t\t\tlastdate = LocalDate.now();\r\n\t\t\tReadingAndWritingInFile.write(\"Days.txt\", days, lastdate);\r\n\t\t}\r\n\t}",
"public void calculateWageForMonth() {\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\temployeeAttendanceUsingCase();\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\t// return totalSalary;\n\t\t}\n\t}",
"public int getEdad() {\n\t\treturn (new Date()).getYear()- fechanac.getYear();\n\t}",
"public int getMonthsPast(){\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tint c_month = calendar.get(Calendar.MONTH);\n\t\tint c_day = calendar.get(Calendar.DAY_OF_MONTH);\n\t\tString[] date = start_date.split(\"-\");\n\t\tint month = Integer.parseInt(date[1]);\n\t\tint day = Integer.parseInt(date[2]);\n\t\t\n\t\tint current_count = c_day;\n\t\tint client_count = day;\n\t\t\n\t\tswitch (c_month - 1){\n\t\tcase 11:\n\t\t\tcurrent_count += 31;\n\t\tcase 10: \n\t\t\tcurrent_count += 30;\n\t\tcase 9:\n\t\t\tcurrent_count += 31;\n\t\tcase 8:\n\t\t\tcurrent_count += 30;\n\t\tcase 7:\n\t\t\tcurrent_count += 31;\n\t\tcase 6:\n\t\t\tcurrent_count += 31;\n\t\tcase 5: \n\t\t\tcurrent_count += 30;\n\t\tcase 4: \n\t\t\tcurrent_count += 31;\n\t\tcase 3:\n\t\t\tcurrent_count += 30;\n\t\tcase 2: \n\t\t\tcurrent_count += 31;\n\t\tcase 1: \n\t\t\tcurrent_count += 28;\n\t\tcase 0: \n\t\t\tcurrent_count += 31;\n\t\t\tbreak;\n\t\t\t\n\t}\n\t\n\t\tswitch (month - 2){\n\t\tcase 11:\n\t\t\tclient_count += 31;\n\t\tcase 10: \n\t\t\tclient_count += 30;\n\t\tcase 9:\n\t\t\tclient_count += 31;\n\t\tcase 8:\n\t\t\tclient_count += 30;\n\t\tcase 7:\n\t\t\tclient_count += 31;\n\t\tcase 6:\n\t\t\tclient_count += 31;\n\t\tcase 5: \n\t\t\tclient_count += 30;\n\t\tcase 4: \n\t\t\tclient_count += 31;\n\t\tcase 3:\n\t\t\tclient_count += 30;\n\t\tcase 2: \n\t\t\tclient_count += 31;\n\t\tcase 1: \n\t\t\tclient_count += 28;\n\t\tcase 0: \n\t\t\tclient_count += 31;\n\t\t\tbreak;\n\t}\n\t\t\n\treturn current_count-client_count;\n\t}",
"int getNumberDays();",
"public static void calculateDailyEmpWage()\n {\n\t\tint salary = 0;\n\t\tif(isPresent()){\n\t\t\tint empRatePerHr = 20;\n int PartTimeHrs = 4;\n salary = PartTimeHrs * empRatePerHr;\n\t\t\tSystem.out.println(\"Daily Part time Wage:\" +salary);\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Daily Wage:\" +salary);\n\t\t}\n }",
"private void checkYearDeviation() {\n val yearDeviation = config.getInt(\"year_deviation\");\n\n checkArgument(yearDeviation > 0, \"year_deviation is less than or equal to 0!\");\n }",
"@Given(\"^that the expiry date of Licence is in (\\\\d+) days$\")\n public void that_the_expiry_date_of_Licence_is_in_days(int arg1) throws Throwable {\n driverUser = new DriverUser(LocalDate.now().plusDays(arg1), LocalDate.now(), \"nu;;\", \"null\");\n }",
"private double calculateYearlyLoyaltyPoints(int year){\n \tLoyalty txnLoyalty = compositePOSTransaction.getLoyaltyCard();\n\t\tif (txnLoyalty == null){\n\t\t\treturn 0.0;\n\t\t}else if(!txnLoyalty.isYearlyComputed()){\n\t\t\treturn 0.0;\n\t\t}\n\t\t\n\t\tif(com.chelseasystems.cr.swing.CMSApplet.theAppMgr!=null &&\n \t\t\tcom.chelseasystems.cr.swing.CMSApplet.theAppMgr.getStateObject(\"THE_TXN\") != null){\n \t\t// this is an inquiry\n\t\t\tif (year == 0) {\n\t\t\t\treturn txnLoyalty.getCurrYearBalance();\n\t\t\t} else {\n\t\t\t\treturn txnLoyalty.getLastYearBalance();\n\t\t\t}\n\t\t}\n\t\t\n\t\tdouble loyaltyUsed = compositePOSTransaction.getUsedLoyaltyPoints();\n\t\tdouble points = compositePOSTransaction.getLoyaltyPoints();\n\n\t\tdouble currBal = txnLoyalty.getCurrBalance();\n\t\tdouble currYearBal = txnLoyalty.getCurrYearBalance();\n\t\tdouble lastYearBal = txnLoyalty.getLastYearBalance();\n\t\tif (loyaltyUsed > 0) {\n\t\t\tif (txnLoyalty.getLastYearBalance() < loyaltyUsed) {\n\t\t\t\tcurrYearBal = currYearBal - (loyaltyUsed - lastYearBal);\n\t\t\t\tlastYearBal = 0.0;\n\t\t\t} else {\n\t\t\t\tlastYearBal -= loyaltyUsed;\n\t\t\t}\n\t\t\tcurrBal -= loyaltyUsed;\n\t\t} else {\n\t\t\tcurrBal -= loyaltyUsed;\n\t\t\tcurrYearBal -= loyaltyUsed;\n\t\t}\n\n\t\tif (txnLoyalty.isYearlyComputed()) {\n\t\t\tcurrYearBal += points;\n\t\t} else {\n\t\t\tcurrYearBal = 0.0;\n\t\t\tlastYearBal = 0.0;\n\t\t}\n\n\t\tif (year == 0) {\n\t\t\treturn currYearBal;\n\t\t} else {\n\t\t\treturn lastYearBal;\n\t\t}\n }",
"@Test\n public void isLeapYear() {\n assertFalse(Deadline.isLeapYear(Integer.parseInt(VALID_YEAR_2018)));\n\n // Valid leap year -> returns true\n assertTrue(Deadline.isLeapYear(Integer.parseInt(LEAP_YEAR_2020)));\n\n // Valid year divisible by 4 but is common year -> returns false\n assertFalse(Deadline.isLeapYear(Integer.parseInt(NON_LEAP_YEAR_2100)));\n\n // Valid year divisible by 100 but is leap year -> returns true\n assertTrue(Deadline.isLeapYear(Integer.parseInt(LEAP_YEAR_2400)));\n }",
"@SuppressWarnings(\"static-access\")\r\n\tprivate int calculateAge()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tnow = new GregorianCalendar(now.YEAR, now.MONTH, now.DATE);//simplifys the date so there is no problem with times\r\n\t\tGregorianCalendar birthDay = new GregorianCalendar(now.YEAR, bDate.MONTH, bDate.DATE);\r\n\t\tint age = 0;\r\n\t\tif(now.before(birthDay) || now.equals(birthDay))\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t\tage--;\r\n\t\t}\r\n\t\treturn age;\r\n\t}",
"int getExpYear(String bookingRef);",
"public void setValidityDays(int value) {\r\n this.validityDays = value;\r\n }",
"public boolean checkReservationDateFromToday(String resMonth, String resDay, String resYear){\n int daysDiff,monthDiff,yearDiff; //date difference\n int monthToday,dayToday,yearToday; //date today\n int monthReserved,dayReserved,yearReserved; //date of reservation\n \n //date of reservation\n String sMonth,sDay,sYear;\n sMonth = resMonth;\n sDay = resDay;\n sYear = resYear;\n \n getCurrentDate(); //call to get current date\n \n boolean dateValid = false;\n sMonth = convertMonthToDigit(sMonth); //convert string month to string number\n \n monthToday = parseInt(month);\n dayToday = parseInt(day);\n yearToday = parseInt(year);\n \n //convert to integer\n monthReserved = parseInt(sMonth);\n dayReserved = parseInt(sDay);\n yearReserved = parseInt(sYear);\n \n //get the difference\n monthDiff = monthReserved - monthToday;\n daysDiff = dayReserved - dayToday;\n yearDiff = yearReserved - yearToday;\n \n System.out.println(\"startMonth: \"+ sMonth);\n System.out.println(\"yearDiff: \" + yearDiff);\n System.out.println(\"daysDiff: \" + daysDiff);\n System.out.println(\"monthDiff: \" + monthDiff);\n \n if(yearDiff > 0){ //next year\n return true;\n }\n \n if(yearDiff == 0){ //this year\n if(monthDiff >= 0){\n if(monthDiff == 0 && daysDiff == 0){ //cannot reserve room on the day\n //invalid day, the date is today\n dateValid = false;\n System.out.println(\"reservation day must not today.\");\n }else if(monthDiff==0 && daysDiff < 0){ // same month today, invalid day diff\n dateValid = false; \n System.out.println(\"reservation day must not in the past\");\n }else if(monthDiff>0 && daysDiff < 0){ //not the same month today, accept negative day diff\n dateValid = true;\n }else{ //the same month and valid future day\n dateValid = true;\n }\n }else{\n //invalid month\n System.out.println(\"reservation month must not in the past.\");\n }\n }else{\n //invalid year\n System.out.println(\"reservation year must not in the past.\");\n }\n \n return dateValid;\n }",
"int getAgeYearsRelativeToReferencePoint(Calendar anchorTime, Calendar testTime);",
"private boolean isDivisibleBy100(int year) {\n\t\treturn checkDivisibility(year, 100);\n\t}",
"private boolean isDivisibleBy400(int year) {\n\t\treturn checkDivisibility(year, 400);\n\t}",
"public void wagesTillCondition() {\n\t\twhile (true) {\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t\ttotalHrs = totalHrs + workingHrs;\n\t\t\ttotalDays = totalDays + 1;\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\tif (totalHrs == 100 || totalDays == 20) {\n\t\t\t\tSystem.out.println(totalSalary);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public int avgProhibitedItemsPerDay(){\r\n \r\n int trav=apstate.gettravellers();\r\n\t\tint days=apstate.getdays();\r\n\t\tint items=apstate.getitems();\r\n \r\n int avg_prohibited_items_per_day=items/days;\r\n \r\n return avg_prohibited_items_per_day;\r\n }",
"public int getAgeInDays (Date today) {\n int daysSince1900tillToday = today.day + today.month*daysInMonth(today.month, today.year) +\n (today.year - 1900)*365 + NumberLeapyearsSince1900(today.year);\n return daysSince1900tillToday - daysSince1900();\n }",
"public int getEndingYear()\n {\n return -1;\n }",
"public int betweenDates() {\n return Period.between(arrivalDate, departureDate).getDays();\n }",
"public int yearsSinceDebut(int debutYear)\n {\n int year = Calendar.getInstance().get(Calendar.YEAR);\n return year - debutYear;\n }",
"private long dateDiffInNumberOfDays(LocalDate startDate, LocalDate endDate) {\n\n return ChronoUnit.DAYS.between(startDate, endDate);\n }",
"public Double calcMovieRentalPrice(Integer unitPrice, Integer numOfDays, Integer maxAge);",
"public static int dailyEmpWage()\n {\n\tif(IS_FULL_TIME()){\n\t\twage = WagePerHrs * FullDayHrs;\n\t}\n wage = WagePerHrs * FullDayHrs/2;\n return wage;\n }",
"public static void main(String[] args) {\n int[] months = {31,28,31,30,31,30,31,31,30,31,30,31};\n Calendar now = Calendar.getInstance();\n System.out.println(now.get(Calendar.DAY_OF_YEAR));\n int year = now.get(Calendar.YEAR);\n int month = now.get(Calendar.MONTH) + 1;\n int day = now.get(Calendar.DAY_OF_MONTH);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n System.out.println(\"Please input year: (\" + year + \")\");\n String yearString = br.readLine();\n year = (yearString.length() > 0) ? Integer.parseInt(yearString) : year;\n System.out.println(year);\n System.out.println(\"Please input month: (\" + month + \")\");\n String monthString = br.readLine();\n month = (monthString.length() > 0) ? Integer.parseInt(monthString) : month;\n System.out.println(month);\n System.out.println(\"Please input month: (\" + day + \")\");\n String dayString = br.readLine();\n day = (dayString.length() > 0) ? Integer.parseInt(dayString) : day;\n System.out.println(day);\n int days = 0;\n for (int i = 0; i < month-1; i ++) {\n days += months[i];\n }\n days += day;\n if (year % 400 == 0 || (year % 4 == 0 && year % 100 !=0)) {\n days ++;\n }\n System.out.println(days);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n\n //take input from user and store into year variable\n System.out.printf(\"Enter a year: \");\n int year = input.nextInt();\n\n /*\n Condition:\n The year is evenly divisible by 4;\n If the year can be evenly divided by 100, it is NOT a leap year, unless;\n The year is also evenly divisible by 400. Then it is a leap year.\n */\n\n if( year%4 == 0){\n if (year%100 == 0){\n if (year%400 == 0){\n System.out.println(year + \" is leap year\");\n } else {\n System.out.println(year+\" is not leap year\");\n }\n }\n else {\n System.out.println(year + \" is leap year\");\n }\n } else {\n System.out.println(year+ \" is not leap year\");\n }\n\n\n }",
"public void leapYear() {\n System.out.print(\"\\nEnter a year: \");\n long year = in.nextLong();\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\n System.out.println(\"\\n\" + year + \" is a leap year.\\n\");\n } else {\n System.out.println(\"\\n\" + year + \" is not a leap year.\\n\");\n }\n }",
"public Integer getAbsentDays()\r\n/* 58: */ {\r\n/* 59:59 */ return this.absentDays;\r\n/* 60: */ }",
"protected int getTotalEnrolledEvening() {\n return getEveningRoster().size();\n }",
"public static int getNumberOfDays() {\n\t\treturn numberOfDays;\n\t}",
"private static void wageComputation() {\n Random random = new Random();\n while ( totalEmpHrs < MAX_HRS_IN_MONTHS && totalWorkingDays < numOfWorkingDays ) {\n int empCheck = (int) Math.floor(Math.random() * 10) % 3;\n switch (empCheck) {\n case IS_FULL_TIME:\n empHrs = 8;\n break;\n case IS_PART_TIME:\n empHrs = 4;\n break;\n default:\n }\n totalEmpHrs = totalEmpHrs + empHrs;\n }\n\n int empWage = totalEmpHrs * EMP_RATE_PER_HOUR;\n System.out.println(\"Employee Wage is : \" + empWage);\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter FROM which year you want to check the leap years: \");\r\n\t\tint fromY = Numbers.inputPositiveInteger();\r\n\t\tSystem.out.println(\"Enter TO which year you want to check the leap years: \");\r\n\t\tint ToY = Numbers.inputPositiveInteger();\r\n\t\t\r\n\t\tif(ToY<fromY){ //if the interval is not ok, like from 90 to 20 than print\r\n\t\t\tSystem.out.println(\"The years interval you entered has no sense.\");\r\n\t\t}else{\r\n\t\t\tcountAndPrintLeapYears(fromY, ToY);//else if its ok, than calculate and print\r\n\t\t}\r\n\t}",
"public static String approveDeny(int leave_id,int empId,EnumLeaveStatus l_status) {\r\n Leave ld = Leave.listById(leave_id);\r\n String s=null;\r\n if (ld != null) {\r\n int noOfDays = ld.getNoLeaveDays();\r\n int emplId = ld.getEmployeeId();\r\n int empdId = Leave.showManager(leave_id);\r\n String dbStatus = null;\r\n System.out.println(l_status);\r\n System.out.println(ld.getLeaveStatus());\r\n if (empId != empdId) {\r\n s=\"You are not authorised to access this employee.\";\r\n return s;\r\n }\r\n if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n \r\n } else if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.approved)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else if (l_status.equals(\"approved\") && ld.getLeaveStatus().equals(l_status.denied)) {\r\n dbStatus = \"approved\";\r\n edao().decrement(emplId, noOfDays);\r\n dao().comment(dbStatus, leave_id);\r\n s=\"Leave Approved Successfully\";\r\n } else {\r\n if (l_status.equals(\"denied\") && ld.getLeaveStatus().equals(l_status.pending)) {\r\n dbStatus = \"denied\";\r\n edao().increment(emplId, noOfDays);\r\n dao().comment( dbStatus, leave_id);\r\n s=\"Leave Rejected\";\r\n } else {\r\n s=\"Already on given status\";\r\n }\r\n }\r\n } else {\r\n s=\"Invalid LeaveId\";\r\n }\r\n return s;\r\n }",
"private long countTotalVisitTimesOfEmployeeByStartDateAndEndDate(final int emp_code, final Date startDate,\n final Date endDate) {\n Long result = this.dailyRepo.countTotalDailyReportOfEmployeeByStartDateAndEndDate(emp_code, startDate, endDate)\n .getAnyResult();\n return (null != result) ? result : 0;\n }",
"private static Boolean checkYear(){\r\n try{\r\n int year = Integer.parseInt(yearField.getText().trim());\r\n int now = LocalDate.now().getYear();\r\n \r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) < 0){\r\n now--;\r\n }\r\n //SIS stores the schedule for last 3 years only \r\n if(year <= now && year >= now - 3 ){\r\n return true;\r\n }\r\n }\r\n catch(Exception e){\r\n Logger.getLogger(\"Year checker\").log(Level.WARNING, \"Exception while resolving the year \", e);\r\n }\r\n return false;\r\n }"
] | [
"0.6754973",
"0.6595075",
"0.6221165",
"0.6007309",
"0.59440476",
"0.5868369",
"0.5855765",
"0.58114403",
"0.5755022",
"0.5717272",
"0.5696322",
"0.5692726",
"0.5689371",
"0.5625729",
"0.5614003",
"0.5610303",
"0.56015146",
"0.5572734",
"0.5557366",
"0.55572206",
"0.5535293",
"0.55328524",
"0.55031717",
"0.55005497",
"0.5493509",
"0.54818255",
"0.54796535",
"0.54510206",
"0.5428927",
"0.542463",
"0.53499675",
"0.5344542",
"0.5333052",
"0.5306212",
"0.52921295",
"0.5290511",
"0.5289185",
"0.52819794",
"0.52679515",
"0.5267143",
"0.52557534",
"0.52437216",
"0.5237784",
"0.52292037",
"0.5215894",
"0.52070713",
"0.5192152",
"0.51913667",
"0.5189568",
"0.51871437",
"0.51740015",
"0.51677716",
"0.5164626",
"0.5147145",
"0.514139",
"0.51373225",
"0.5136925",
"0.5112029",
"0.5102453",
"0.5096223",
"0.5095365",
"0.50923866",
"0.50873893",
"0.5087057",
"0.5081747",
"0.50802743",
"0.50761324",
"0.5072115",
"0.50705665",
"0.50672704",
"0.50470996",
"0.5042896",
"0.5036684",
"0.5026262",
"0.5022356",
"0.50048786",
"0.5003201",
"0.499668",
"0.4996651",
"0.49800223",
"0.49780524",
"0.49687237",
"0.49665046",
"0.49635738",
"0.49631453",
"0.49623853",
"0.49620673",
"0.495939",
"0.49554217",
"0.49539876",
"0.49500853",
"0.49464545",
"0.49438637",
"0.49419764",
"0.49342787",
"0.4933368",
"0.49322468",
"0.49266106",
"0.49130166",
"0.4907572"
] | 0.72310954 | 0 |
Calling Student delete method to delete current record using Student ID. | @Override
public void onClick(View view) {
StudentDelete(TempItem);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void deleteStudentById(long id) {\n\t\t\n\t}",
"public void deleteStudent(Student student) {\n\t\t\r\n\t}",
"public void delete(Student student) {\t\t\r\n\t\tdao.deleteStudent(student.getSid());\r\n\t}",
"public void deleteStudent(){\r\n\t\t\r\n\t}",
"@Override\n public void delStudent(Student student)\n {\n sf.getCurrentSession().delete(student);\n }",
"@Override\n\tpublic int delete(Student student) {\n\t\tint code = 0;\n\t\tString sql = \"delete from Tstudent where id=? \";\n\t\tcode = DBUtils2.update(sql, student.getId());\n\n\t\treturn code;\n\t}",
"@Override\n\t public String deleteStudent(BigInteger stdId) throws RecordNotFoundException\n\t {\n\t\t Optional<Student> findById = studentrepo.findById(stdId);\n\t\t\tif (findById.isPresent()) {\n\t\t\t\tstudentrepo.deleteById(stdId);\n\t\t\t\treturn \"deleted\";\n\t\t\t} else {\n\t\t\t\treturn \"!! Id Is Invalid !!\";\n\t\t\t}\n\t }",
"@Override\r\n\tpublic void deleteStudent(Student student) {\n\t\ttry {\r\n\t\t\tClass.forName(DRIVER);\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASSWORD);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tsql = \"delete from student where id=?\";\r\n\t\ttry {\r\n\t\t\tpstmt = conn.prepareStatement(sql);\r\n\t\t\tpstmt.setInt(1, student.getId());\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void deleteStudentById(Long id) {\n\t\tstudentRepository.deleteById(id);\r\n\t}",
"private void deleteStudent() throws FileNotFoundException {\n //Lesen wir die ID\n Scanner sc = new Scanner(System.in);\n System.out.print(\"ID of the student to be deleted: \");\n long ID = sc.nextLong();\n\n //Wir rufen die deleteStudent Funktion vom dem Controller mit den gelesenen Daten auf\n if(ctrl.deleteStudent(ID))\n System.out.println(\"Student deleted with success!\");\n else\n System.out.println(\"Student with this ID doesn't exist!\");\n }",
"int deleteByPrimaryKey(String studentId);",
"public void delete(Student student){\n PresenterStudent presenterStudent = new PresenterStudent(context);\n if( presenterStudent.deleteStudent( student) <= 0 ){\n Toast.makeText(context, context.getString(R.string.tex_error_operation), Toast.LENGTH_LONG).show();\n } else {\n EventBus.getDefault().post(new EventChangeStudent(1, \"delete\"));\n }\n }",
"public void deleteStudent(String theStudentId) {\n\t\tConnection myConn=null;\n\t\tPreparedStatement myStmt=null;\n\t\ttry\n\t\t{\n\t\t\t//convertt student id to int\n\t\t\tint studentId=Integer.parseInt(theStudentId);\n\t\t\t// get connection to database\n\t\t\tmyConn=dataSource.getConnection();\n\t\t\t// create sql statement for the delete\n\t\t\tString sql=\"delete from student where \"+\"id=?\";\n\t\t\t//prepared statement\n\t\t\tmyStmt=myConn.prepareStatement(sql);\n\t\t\t//set the params\n\t\t\tmyStmt.setInt(1, studentId);\n\t\t\t//execute the sql\n\t\t\tmyStmt.execute();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose(myConn,myStmt,null);\n\t\t}\n\t}",
"public void deleteStudent(String rollNo) {\n\t\t\r\n\t}",
"@Override\n\tpublic void deleteStudent(int id) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// find the student\n\t\tStudent student = currentSession.get(Student.class, id);\n\n\t\t// delete student\n\t\tcurrentSession.delete(student);\n\n\t}",
"@Override\n\tpublic void deleteStudent(Integer id) {\n\t\tem.remove(em.find(Student.class, id));\n\t}",
"@Override\n public void deleteStudentByID(Long id) {\n if(studentRepository.findById(id).isPresent()) {\n studentRepository.deleteById(id);\n log.info(\"Student with id:\" + id + \" successfully deleted\");\n } else {\n log.debug(\"Student with id: \" + id + \" not found\");\n throw new ResourceNotFoundException(\"Student with id: \" + id + \" not found\");\n }\n }",
"@Override\n\tpublic void deleteStudent(Student student) {\n\t\tem.remove(em.find(Student.class, student.getId()));\n\t}",
"@Override\n\tpublic String deleteStudent(Integer studentId, Integer classId) {\n\t\tClassInfo classInfo = classMapper.selectByPrimaryKey(classId);\n\t\tif(classInfo == null) return \"fail\";\n\t\tStudent stu = new Student();\n\t\tstu.setId(studentId);\n\t\tstu.setIsDelete(true);\n\t\tint operateResult = studentMapper.updateByPrimaryKeySelective(stu);\n\t\tif(operateResult == 0) {\n\t\t\treturn \"fail\";\n\t\t} else {\n\t\t\tclassInfo.setStudentNum(classInfo.getStudentNum() - 1);\n\t\t\tclassInfo.setUpdateDate(new Date());\n\t\t\tclassMapper.updateByPrimaryKeySelective(classInfo);\n\t\t}\n\t\t\n\t\treturn \"success\";\n\t}",
"@Override\n\tpublic int delete(int student) {\n\n\t\treturn 0;\n\t}",
"@DeleteMapping(\"student-delete/{id}\")\n\tpublic String deleteById(@PathVariable int id) throws SQLException {\n\n\t\treturn studentSerivce.deleteById(id);\n\n\t}",
"@DeleteMapping(\"/students/{id}\")\n @Timed\n public ResponseEntity<Void> deleteStudent(@PathVariable Long id) {\n log.debug(\"REST request to delete Student : {}\", id);\n studentService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"int deleteByPrimaryKey(Integer studentId);",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Studente : {}\", id); studenteRepository.deleteById(id);\n }",
"public Query_DeleteStudent(DataSource ds) {\n\t\t\tsuper.setDataSource(ds);\n\t\t\tsetSql(sql_deleteStudent);\n\t\t\tdeclareParameter(new SqlParameter(\"id\", Types.INTEGER));\n\t\t}",
"public void deleteStudent(Integer studentId) {\n\t\tif (ObjectUtils.isEmpty(studentId))\n\t\t\tthrow new BadRequestException(Constants.genericRequiredFieldsMissingMsg);\n\n\t\tOptional<Student> existingSubject = studentRepository.findById(studentId);\n\t\tif (existingSubject.isPresent())\n\t\t\tstudentRepository.deleteById(studentId);\n\t\telse\n\t\t\tthrow new ResourceNotFoundException(Constants.studentNotFound);\n\t}",
"public void deleteStudent(Integer studentId) {\n\t\tStudent book = entity.find(Student.class, studentId);\n\n\t\t// Call remove method to remove the entity\n\t\tentity.remove(book);\n\n\t}",
"@DeleteMapping(\"/api/students\")\n public void deleteStudentById(@PathVariable(value = \"id\") Long id) {\n this.studentService.deleteStudentById(id);\n }",
"public void deleteStudentData(Student student) {\n sqLiteDatabase.delete(DatabaseHelper.TABLE_NAME, \"id = \" + student.getId(), null);\n }",
"@Override\n\t@Transactional\n\tpublic void delete(int theId) {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t// delete object with primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Student where id=:studentId\");\n\t\ttheQuery.setParameter(\"studentId\", theId);\n\n\t\ttheQuery.executeUpdate();\n\t}",
"public static void deleteStudent(int id) throws Exception {\n\t\tConnection myConn=null;\n\t\tStatement myStmt = null;\n\t\ttry {\n\t\t\tmyConn = dataSource.getConnection();\n\t\t\tmyStmt= myConn.createStatement();\n\t\t\tString sql= \"delete from student where id=\"+id;\n\t\t\tmyStmt.execute(sql);\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} finally{ close(myConn,myStmt,null); }}",
"@GetMapping(\"/students/{id}\")\r\n\tpublic String deleteStudent(@PathVariable Long id) {\r\n\t\tstudentService.deleteStudentById(id);\r\n\t\treturn \"redirect:/students\";\r\n\t}",
"@GetMapping(\"/students/{id}\")\n\tpublic String deleteStudent(@PathVariable long id)\n\t{\n\t\tstudentService.deleteStudentById(id);\n\t\treturn \"redirect:/students\";\n\t}",
"@Override\n\tpublic int deleteOne(StudentVO vo) {\n\t\treturn 0;\n\t}",
"public void deleteStudent(Student s) {\n\t\tstudents.remove(s);\n\t\tisStudentsListChanged = true;\n\t\tdataChangedNotify();\n\t}",
"@Override\n\t//删除数据\n\tpublic void deleteStudent(String id) {\n\t\tConnection conn = null;\n\t\tPreparedStatement pStatment = null;\n\t\t\t\t\n\t\ttry {\n\t\t\tconn = MySQLConnectUtil.getMySQLConnection();\n\t\t\tpStatment = conn.prepareStatement(DELETE);\n\t\t\tpStatment.setString(1, id);\n\t\t\tint i = pStatment.executeUpdate();\n\t\t\tSystem.out.println(\"删除影响行数:\" +i);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\tMySQLConnectUtil.closePreparestatement(pStatment);\n\t\t\tMySQLConnectUtil.closeConnection(conn);\n\t\t}\n\t}",
"@RequestMapping(value = \"/delete/{id}\", method = RequestMethod.GET)\n public String deleteStudent(ModelMap view, @PathVariable int id) {\n if(studentService.delete(id)) {\n view.addAttribute(\"msg\", new String(\"Deleted Successfully!\"));\n } else {\n view.addAttribute(\"msg\", new String(\"Not Deleted!\"));\n }\n return(\"redirect:/list\");\n }",
"int deleteByExample(StudentExample example);",
"public static void delete() throws SQLException{\n\t \n\t\n\t\t String sid = new String();\n\t\t try{\n \t\tSystem.out.println(\"Please enter the sid(Starting with 'B')\\n\"); \n\t\t \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in )); \n\t\t\tsid = br.readLine();\n //Connection to Oracle server\n OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource();\n ds.setURL(\"jdbc:oracle:thin:@grouchoIII.cc.binghamton.edu:1521:ACAD111\");\nConnection conn = ds.getConnection(\"vbobhat1\", \"BingData\");\nCallableStatement cs = conn.prepareCall (\"begin StudRegSys.delete_student(:1); end;\");\n\t \t \n\t \t\tcs.setString(1,sid);\n\t \t\tcs.executeQuery();\n\t \t\tSystem.out.println(\"Student Successfully deleted from student table!\");\n\t\t\tSystem.out.println(\"\\n\\n\");\n\t\t \n\t\t }\n\tcatch (SQLException ex) { System.out.println (\"\\n*** SQLException caught ***\\n\" + ex.getMessage());}\n catch (Exception e) {System.out.println (\"\\n*** other Exception caught ***\\n\");}\n }",
"@Override\n\tpublic boolean delete() {\n\t\tString sql=\"DELETE FROM tc_student where id=\"+id;\n\t\t//`\n\t\t\n\t\tSystem.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t}",
"@CrossOrigin(origins = \"http://localhost:3000\")\n @RequestMapping(value = \"delete\", method = RequestMethod.DELETE) // or use @DeleteMapping\n public void delete(@RequestParam(\"id\")long studentId){\n studentService.delete(studentId);\n }",
"@GetMapping(\"/deleteStudent\")\n\tpublic String deleteStudent(@RequestParam(required = true) int id, Model model)\t{\n\t\t\t\t\n\t\t//Get the student\n\t\tstudentDaoImpl.deleteStudent(id);\n\t\t\n\t\t//Get a list of students from the controller\n\t\tList<Student_gra_84> students = studentDaoImpl.getAllStudents();\n\t\tmodel.addAttribute(\"studentList\", students);\n\t\n\t\tmodel.addAttribute(\"message\", \"Deleted Student: \" + id);\n\t\t\t\n\t\treturn \"showStudents\";\n\t}",
"public int DeleteStudent(Student aStudent) {\n\t\tint updateCount = 0;\n\t\t\n\t\tint aId = aStudent.getId();\n\t\tString afName = aStudent.getfName();\n\t\tString alName = aStudent.getlName();\n\t\tdouble aGpa = aStudent.getGpa();\n\t\tint aSat = aStudent.getSat();\n\t\tint aMajor = aStudent.getMajor();\n\t\t\n\t\tString sql = \"delete from student where id = \" +\n\t\t\t\tString.format(\"(%4d)\", aId);\n\n\t\ttry {\n\t\t\tupdateCount = myDB.execSQLUpdate(sql);\n\t\t} catch (SQLException e) { e.printStackTrace(); }\n\t\t\n\t\treturn updateCount;\n\t}",
"public void deleteStudentHandler(View v) {\n database = new DatabaseSQLiteHelper(this).getWritableDatabase();\n\n String value = studentIdTv.getText().toString();\n\n int numberDeleted = database.delete(Database.Student.TABLE_NAME, Database.Student._ID +\"=?\" ,new String[]{value});\n Toast.makeText(this, Integer.toString(numberDeleted) + \" Deleted\", Toast.LENGTH_SHORT).show();\n\n Student.this.recreate();\n }",
"@RequestMapping(value = \"delete\", method = RequestMethod.POST)\r\n\tpublic String delete(HttpServletRequest request) {\n\t\tint id = Integer.parseInt(request.getParameter(\"id\"));\r\n\t\t// Create the student\r\n\t\tStudent student = studentService.findById(id);\r\n\t\tSystem.out.println(student);\r\n\t\t// insert student to db\r\n\r\n\t\tString res = studentService.delete(student);\r\n\r\n\t\tif (res.equals(\"SUCCESS\"))\r\n\t\t\trequest.setAttribute(\"msg\", \"Record Deleted\");\r\n\t\telse\r\n\t\t\trequest.setAttribute(\"msg\", \"Record Not Deleted\");\r\n\t\treturn \"delete\";\r\n\t}",
"@Override\n\tpublic boolean deleteToeic(int idStudent) {\n\t\tSessionFactory factory = HibernateUtils.getSessionFactory();\n\t\tSession session = factory.getCurrentSession();\n\t\ttry {\n\t\t\tsession.getTransaction().begin();\n\t\t\tTblToeic toeic = session.get(TblToeic.class, idStudent);\n\t\t\ttoeic.setTimeModified(Commons.getCurrentTime());\n\t\t\ttoeic.setStt(Constants.DELETED);\n\t\t\tsession.save(toeic);\n\t\t\tsession.getTransaction().commit();\n\t\t\treturn true;\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Loi: \" + ex.getMessage());\n\t\t}\n\t\treturn false;\n\t}",
"@PutMapping(\"/deleteInstructor/{instructorId}/student/{studentId}\")\n public String deleteInstructor(@PathVariable Integer instructorId,@PathVariable Integer studentId){\n return instructorService.deleteInstructorFromStudents(instructorId,studentId);\n }",
"public void deleteStudentExam(Long studentExamId) {\n log.debug(\"Request to delete the student exam with Id : {}\", studentExamId);\n studentExamRepository.deleteById(studentExamId);\n }",
"@Override\n\t\tpublic void removeStudentById(Integer id) \n\t\t{\n\t\t\tStudent stu=(Student) sessionFactory.getCurrentSession().load(Student.class,id);\n\t if(null!=stu)\n\t {\n\t sessionFactory.getCurrentSession().delete(stu);\n\t }\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void deleteStudentInCourse(Course course, User user) {\n\t\t\r\n\t}",
"public static boolean deleteStudent(int sid) {\n\t\t\n boolean f =false;\n\t\t\n\t\ttry {\n\t\t\t//jdbc code\n\t\t\tConnection connection=Connection_Provider.creatC();\t\t\n\n\t\t\tString q=\"delete from students where sid=?\";\n\t\t\t// Prepared Statement\n\t\t\tPreparedStatement pstmt=connection.prepareStatement(q);\n\t\t\t//set the value of parameters\n\t\t\tpstmt.setInt(1, sid);\n\t\t\t\n\t\t\t//execute\n\t\t\tpstmt.executeUpdate();\n\t\t\tf=true;\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn f;\n\t\t\n\t}",
"@DELETE\n @Path(\"/{id}\")\n public Response deleteStudentGrade(@PathParam(\"id\") int id) {\n // getting student by it's index\n StudentService studentService = new StudentService();\n Student searchedStudent = studentService.getStudent(index);\n\n // checking if student exists\n if (searchedStudent == null)\n return Response.status(Response.Status.NOT_FOUND).entity(\"Student not found\").build();\n\n Grade searchedGrade = searchedStudent.getGradeById(id);\n // checking if grade exists\n if (searchedGrade == null)\n return Response.status(Response.Status.NOT_FOUND).entity(\"Grade not found\").build();\n\n // removing student grade\n searchedStudent.removeStudentGradeById(id);\n studentService.updateStudent(searchedStudent);\n String result = \"Student grade \" + searchedGrade + \" deleted!\";\n\n // creating response\n return Response.status(Response.Status.OK).entity(result).build();\n }",
"@CrossOrigin(origins = \"http://localhost:3000\")\n\t@DeleteMapping(path = \"/removeStudent/{id}\", produces = { MediaType.APPLICATION_XML_VALUE,\n\t\t\tMediaType.APPLICATION_JSON_VALUE })\n\tpublic StudentResponse removeStudent(@PathVariable(name = \"id\") int id) {\n\n\t\tStudentResponse response = new StudentResponse();// Student Response Object\n\n//\t\t deleting Student data from database\n\t\tif (service.deleteStudent(id)) {\n\t\t\tresponse.setStatusCode(200);\n\t\t\tresponse.setMsg(\"Success\");\n\t\t\tresponse.setDescription(\"Data deleted for id \" + id);\n\n\t\t} else {\n\t\t\tresponse.setStatusCode(400);\n\t\t\tresponse.setMsg(\"Failure\");\n\t\t\tresponse.setDescription(\"Could not Delete the data for \" + id);\n\t\t}\n\t\treturn response;// sending response to client\n\t}",
"public void deleteButtonPushed() {\r\n ObservableList<Student> allStudents;\r\n Student selectedRow;\r\n allStudents = tableView.getItems();\r\n \r\n // This gives us the row that was selected\r\n selectedRow = tableView.getSelectionModel().getSelectedItems().get(0);\r\n \r\n\r\n try {\r\n covidMngrService.deleteStudent(selectedRow);\r\n \r\n // Remove the Student object from the table\r\n allStudents.remove(selectedRow);\r\n } catch (RemoteException ex) {\r\n Logger.getLogger(SecretaryStudentsTableCntrl.class.getName()).\r\n log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@DeleteMapping(value = deleteTeacherStudentMapping + \"{studentId}/{teacherId}\")\r\n\tpublic ResponseEntity<HttpResponse> delete(@PathVariable(\"studentId\") String studentId,@PathVariable(\"teacherId\") String teacherId){\r\n\t\tteacherStudentService.delete(teacherId, studentId);\r\n\t\tHttpResponse response = new HttpResponse();\r\n\t\tresponse.setResponseMessage(\"TeacherStudent Deleted with StudentId : \"+ studentId + \" and TeacherId : \" + teacherId);\r\n\t\treturn ResponseEntity.ok().body(response);\r\n\t}",
"@DeleteMapping(value = \"/professor/deleteStudent/{studentId}/{sectionId}\")\n public ResponseEntity<Boolean> deleteStudent(@PathVariable Long studentId, @PathVariable Long sectionId) {\n ResponseEntity<Boolean> body = ResponseEntity.status(HttpStatus.CREATED).body(facade.deleteStudentFromSection(studentId, sectionId));\n return body;\n }",
"int deleteByExample(StudentCriteria example);",
"int deleteByPrimaryKey(String samId);",
"@DELETE\r\n\t@Path(\"/{courseID}/student/{studentID}\")\r\n\tpublic void deleteTAtoCourse(@PathParam(\"studentID\") String studentID, @PathParam(\"courseID\") String courseID) {\r\n\r\n\t\tStudent student = InMemoryDataStore.getStudent(studentID);\r\n\t\tCourse course = InMemoryDataStore.getCourse(courseID);\r\n\r\n\t\tif (student == null || course == null) {\r\n\t\t\tthrow new WebApplicationException(Response.Status.BAD_REQUEST);\r\n\t\t}\r\n\r\n\t\tString currentTA = course.getTaStudentID();\r\n\t\tif (studentID.equals(currentTA)) {\r\n\t\t\tcourse.setTaStudentID(null);\r\n\t\t} else {\r\n\t\t\tthrow new WebApplicationException(Response.Status.BAD_REQUEST);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic boolean ermanentlyDeleteToeic(int idStudent) {\n\t\tSessionFactory factory = HibernateUtils.getSessionFactory();\n\t\tSession session = factory.getCurrentSession();\n\t\ttry {\n\t\t\tsession.getTransaction().begin();\n\t\t\tTblToeic toeic = session.get(TblToeic.class, idStudent);\n\t\t\tsession.delete(toeic);\n\t\t\tsession.getTransaction().commit();\n\t\t\treturn true;\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Loi: \" + ex.getMessage());\n\t\t}\n\t\treturn false;\n\t}",
"public boolean delete(String sid) {\n\t\tStudent student = getStudentByID(sid);\r\n\t\t//If student was found then delete the student\r\n\t\tif(student!=null) {\r\n\t\t\treturn students.remove(student);\r\n\t\t} else {\r\n\t\t\t//if no student is found return false\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void setSql_deleteStudent(String sql_deleteStudent) {\n\t\tthis.sql_deleteStudent = sql_deleteStudent;\n\t}",
"public void deleteRecord(int cid,String studentid) {\n\t\tcomprehensive c=comprehensiveDao.get(comprehensive.class, cid);\r\n\t\tfloat cha=c.getFinal_()-c.getLast();\r\n\t\t\r\n\t\tcomprehensive_record cRecord=comprehensiveRecordDao.findByStudent(studentid);\r\n\t\tcRecord.setScore(cRecord.getScore()-cha);\r\n\t\tcomprehensiveRecordDao.update(cRecord);\r\n\t\t\r\n\t\tcomprehensiveDao.delete(comprehensive.class,cid);\r\n\t}",
"public void removeStudents(String id) {\r\n System.out.println(\"conectado con model ---> metodo removeStudents\");\r\n //TODO \r\n }",
"public void deleteStudent(String MatricNo) {\n\t\tif (checkIfStudentExists(MatricNo)) {\n\t\t\tfor (Student student : StudentList) {\n\t\t\t\tif (MatricNo.equals(student.getMatricNo())) {\n\t\t\t\t\tStudentList.remove(student);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tList<Object> students = new ArrayList<Object>();\n\t\t\tfor (Student s : StudentList)\n\t\t\t\tstudents.add((Object) s);\n\t\t\tFileManager.writeObjectToFile(\"student.dat\", students);\n\t\t\tSystem.out.println(\"Student Has been deleted\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Student Does not Exist\");\n\t\t}\n\t}",
"public String removeStudent (String id){\n studentSkills.deleteOne(new Document(\"_id\", new ObjectId(id)));\n Security.deleteOne(new Document(\"id\", id));\n return \"{\\\"result\\\":\\\"ok\\\"}\";\n}",
"int deleteByExample(SalGradeExample example);",
"@Override\n public void delete(Seq s) {\n // TODO Auto-generated method stub\n \t//Establish cnx\n\t\tConnection conn = null;\n\t\tString url = \"jdbc:sqlite:src\\\\database\\\\AT2_Mobile.db\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t\tPreparedStatement myStmt; \n\t\t\tString query = \"delete from seq where id = ?\";\n\t\t\tmyStmt = conn.prepareStatement(query);\n\t\t\t\n\t\t\t// Set Parameters\n\t myStmt.setInt(1, s.getId());\n\t\t\t// Execute SQL query\n\t int res = myStmt.executeUpdate();\n\t \n\t // Display the record inserted\n\t System.out.println(res + \" seq deleted\");\n\t \n\t // Close the connection\n\t conn.close();\n\t\t}catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());}\n\t\t\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t}\n\t\t\t}\n \t \n }",
"public boolean deleteStudentRecord(String sEmail, String tEmail) {\n\t\treturn new Tutor().removeStudent(sEmail, tEmail);\n\t}",
"@Override\r\n\t@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\r\n\tvoid delete(Long id);",
"void remove(Student entity);",
"public void delete(int id);",
"@Override\r\n\tpublic void delete(int id) {\n\t\t\r\n\t}",
"public void deleteById(int theId);",
"public void DeleteCust(String id);",
"public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }",
"void delete ( int id ) throws DAOException;",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Record : {}\", id);\n recordRepository.deleteById(id);\n }",
"public void delete(int id){\n \n SqlSession session = sqlSessionFactory.openSession();\n \n try {\n session.delete(\"Subject.delete\", id);\n } finally {\n session.commit();\n session.close();\n }\n System.out.println(\"delete(\"+id+\")\");\n\n }",
"@Override\r\n\tpublic void delete(Long id) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void delete(String id) {\n\t\t\r\n\t}",
"public void removeStudent(Student InStudent)\n\t{\n\t\tclassRoll.remove (InStudent);\n\t\tsaveNeed = true;\n\n\t}",
"@Override\n\tpublic void delete(int id) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(int id) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(int id) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(int id) {\n\t\t\n\t}",
"@Override\n\tpublic int delete(StuXK sxk) {\n\t\tString sql=\"delete from T_CourseSchedule where TeachTaskID=?\";\n\t\tObject[] parmas={sxk.getTeachTaskID()};\n\t\tBaseDAO dao=new BaseDAO();\n\t\treturn dao.delete(sql,parmas);\n\t}",
"public void delete(int id) {\n\n\t}",
"void deleteCustomerDDPayById(int id);",
"@RequestMapping(value = \"/schools/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteSchool(@PathVariable Long id) {\n log.debug(\"REST request to delete School : {}\", id);\n schoolService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"school\", id.toString())).build();\n }",
"public void delete(Long id) {\n\r\n\t}",
"@Override\n public void delete(int id) {\n }",
"@RequestMapping(value = \"/semesters/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Semester : {}\", id);\n semesterRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"semester\", id.toString())).build();\n }",
"@Override\n\tpublic void delete(String id) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(String id) {\n\t\t\n\t}",
"public void delete(int id) throws DAOException;",
"public void deleteStudent(Student studentId) {\n // the student is first Node in the LinkedList\n\n if (head.getStudent().getStudentId().equals(studentId.getStudentId())) {\n head = head.getLink();\n System.out.println(\"Delete the Property successfully!!\");\n }\n\n // if the student is not situated first Node\n else {\n Node first = head;\n Node second = head.getLink();\n\n while ((second != null) && !(second.getStudent().getStudentId().equals(studentId.getStudentId()))) {\n first = second;\n second = second.getLink();\n }\n\n\n if (second != null) {\n first.setLink(second.getLink());\n System.out.println(\"Delete the Property successfully!!\");\n }\n else\n System.out.println(\"Your Property is not Found!!\");\n }\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete College : {}\", id);\n collegeRepository.deleteById(id);\n collegeSearchRepository.deleteById(id);\n }",
"@Override\n\tpublic void deleteById(int theId) {\n\t\t\n\t}",
"@Override\r\n\tpublic void delete(String id) {\n\r\n\t}"
] | [
"0.8572016",
"0.8486165",
"0.8367399",
"0.82720816",
"0.8209931",
"0.82081074",
"0.80941236",
"0.8000932",
"0.79250264",
"0.78670007",
"0.78669876",
"0.782822",
"0.78249115",
"0.782414",
"0.78153574",
"0.77909327",
"0.77885234",
"0.77782",
"0.77683115",
"0.7758584",
"0.7726633",
"0.77134985",
"0.7666799",
"0.7655506",
"0.7632999",
"0.7631824",
"0.7608899",
"0.75999546",
"0.75936407",
"0.7473599",
"0.7473053",
"0.74528694",
"0.73443395",
"0.7332297",
"0.73123384",
"0.72755647",
"0.7270756",
"0.72654307",
"0.72612244",
"0.72178423",
"0.7212007",
"0.7207744",
"0.7092059",
"0.7090427",
"0.70395166",
"0.6975683",
"0.688267",
"0.6871703",
"0.6870987",
"0.6870255",
"0.68283296",
"0.67914546",
"0.6790606",
"0.6781722",
"0.67546815",
"0.67265713",
"0.671127",
"0.66602695",
"0.6623113",
"0.6604003",
"0.6594732",
"0.65871745",
"0.6551076",
"0.6522063",
"0.65181",
"0.64975655",
"0.6477718",
"0.6448631",
"0.64354",
"0.6434135",
"0.6410466",
"0.6404911",
"0.63794017",
"0.6370945",
"0.63460815",
"0.63320637",
"0.6325084",
"0.63181245",
"0.63100255",
"0.6307379",
"0.6302712",
"0.630212",
"0.62954223",
"0.62954223",
"0.62954223",
"0.62954223",
"0.6288323",
"0.6286894",
"0.6286576",
"0.62851584",
"0.62799704",
"0.62764204",
"0.6275603",
"0.6273787",
"0.6273787",
"0.62692434",
"0.62692153",
"0.6265512",
"0.62602144",
"0.6255307"
] | 0.6639518 | 58 |
Method to Delete Student Record | public void StudentDelete(final String StudentID) {
class StudentDeleteClass extends AsyncTask<String, Void, String> {
@Override
protected void onPreExecute() {
super.onPreExecute();
progressDialog2 = ProgressDialog.show(ShowSingleRecordActivity.this, "Loading Data", null, true, true);
}
@Override
protected void onPostExecute(String httpResponseMsg) {
super.onPostExecute(httpResponseMsg);
progressDialog2.dismiss();
Toast.makeText(ShowSingleRecordActivity.this, httpResponseMsg.toString(), Toast.LENGTH_LONG).show();
finish();
}
@Override
protected String doInBackground(String... params) {
// Sending STUDENT id.
hashMap.put("StudentID", params[0]);
finalResult = httpParse.postRequest(hashMap, HttpUrlDeleteRecord);
return finalResult;
}
}
StudentDeleteClass studentDeleteClass = new StudentDeleteClass();
studentDeleteClass.execute(StudentID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteStudent(Student student) {\n\t\t\r\n\t}",
"public void deleteStudent(){\r\n\t\t\r\n\t}",
"public void delete(Student student) {\t\t\r\n\t\tdao.deleteStudent(student.getSid());\r\n\t}",
"public void deleteStudent(String rollNo) {\n\t\t\r\n\t}",
"@Override\n public void delStudent(Student student)\n {\n sf.getCurrentSession().delete(student);\n }",
"@Override\n\tpublic int delete(Student student) {\n\t\tint code = 0;\n\t\tString sql = \"delete from Tstudent where id=? \";\n\t\tcode = DBUtils2.update(sql, student.getId());\n\n\t\treturn code;\n\t}",
"@Override\n\tpublic void deleteStudentById(long id) {\n\t\t\n\t}",
"int deleteByPrimaryKey(String studentId);",
"@Override\n\tpublic int delete(int student) {\n\n\t\treturn 0;\n\t}",
"int deleteByPrimaryKey(Integer studentId);",
"@Override\r\n\tpublic void deleteStudent(Student student) {\n\t\ttry {\r\n\t\t\tClass.forName(DRIVER);\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASSWORD);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tsql = \"delete from student where id=?\";\r\n\t\ttry {\r\n\t\t\tpstmt = conn.prepareStatement(sql);\r\n\t\t\tpstmt.setInt(1, student.getId());\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\t public String deleteStudent(BigInteger stdId) throws RecordNotFoundException\n\t {\n\t\t Optional<Student> findById = studentrepo.findById(stdId);\n\t\t\tif (findById.isPresent()) {\n\t\t\t\tstudentrepo.deleteById(stdId);\n\t\t\t\treturn \"deleted\";\n\t\t\t} else {\n\t\t\t\treturn \"!! Id Is Invalid !!\";\n\t\t\t}\n\t }",
"public void delete(Student student){\n PresenterStudent presenterStudent = new PresenterStudent(context);\n if( presenterStudent.deleteStudent( student) <= 0 ){\n Toast.makeText(context, context.getString(R.string.tex_error_operation), Toast.LENGTH_LONG).show();\n } else {\n EventBus.getDefault().post(new EventChangeStudent(1, \"delete\"));\n }\n }",
"public void deleteStudentData(Student student) {\n sqLiteDatabase.delete(DatabaseHelper.TABLE_NAME, \"id = \" + student.getId(), null);\n }",
"@Override\n\tpublic void deleteStudent(Student student) {\n\t\tem.remove(em.find(Student.class, student.getId()));\n\t}",
"int deleteByExample(StudentExample example);",
"public void deleteStudent(String theStudentId) {\n\t\tConnection myConn=null;\n\t\tPreparedStatement myStmt=null;\n\t\ttry\n\t\t{\n\t\t\t//convertt student id to int\n\t\t\tint studentId=Integer.parseInt(theStudentId);\n\t\t\t// get connection to database\n\t\t\tmyConn=dataSource.getConnection();\n\t\t\t// create sql statement for the delete\n\t\t\tString sql=\"delete from student where \"+\"id=?\";\n\t\t\t//prepared statement\n\t\t\tmyStmt=myConn.prepareStatement(sql);\n\t\t\t//set the params\n\t\t\tmyStmt.setInt(1, studentId);\n\t\t\t//execute the sql\n\t\t\tmyStmt.execute();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose(myConn,myStmt,null);\n\t\t}\n\t}",
"private void deleteStudent() throws FileNotFoundException {\n //Lesen wir die ID\n Scanner sc = new Scanner(System.in);\n System.out.print(\"ID of the student to be deleted: \");\n long ID = sc.nextLong();\n\n //Wir rufen die deleteStudent Funktion vom dem Controller mit den gelesenen Daten auf\n if(ctrl.deleteStudent(ID))\n System.out.println(\"Student deleted with success!\");\n else\n System.out.println(\"Student with this ID doesn't exist!\");\n }",
"@Override\n\tpublic String deleteStudent(Integer studentId, Integer classId) {\n\t\tClassInfo classInfo = classMapper.selectByPrimaryKey(classId);\n\t\tif(classInfo == null) return \"fail\";\n\t\tStudent stu = new Student();\n\t\tstu.setId(studentId);\n\t\tstu.setIsDelete(true);\n\t\tint operateResult = studentMapper.updateByPrimaryKeySelective(stu);\n\t\tif(operateResult == 0) {\n\t\t\treturn \"fail\";\n\t\t} else {\n\t\t\tclassInfo.setStudentNum(classInfo.getStudentNum() - 1);\n\t\t\tclassInfo.setUpdateDate(new Date());\n\t\t\tclassMapper.updateByPrimaryKeySelective(classInfo);\n\t\t}\n\t\t\n\t\treturn \"success\";\n\t}",
"public void deleteStudent(Student s) {\n\t\tstudents.remove(s);\n\t\tisStudentsListChanged = true;\n\t\tdataChangedNotify();\n\t}",
"@Override\n\tpublic int deleteOne(StudentVO vo) {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic void deleteStudentById(Long id) {\n\t\tstudentRepository.deleteById(id);\r\n\t}",
"public void deleteStudent(Integer studentId) {\n\t\tStudent book = entity.find(Student.class, studentId);\n\n\t\t// Call remove method to remove the entity\n\t\tentity.remove(book);\n\n\t}",
"public Query_DeleteStudent(DataSource ds) {\n\t\t\tsuper.setDataSource(ds);\n\t\t\tsetSql(sql_deleteStudent);\n\t\t\tdeclareParameter(new SqlParameter(\"id\", Types.INTEGER));\n\t\t}",
"public static void delete() throws SQLException{\n\t \n\t\n\t\t String sid = new String();\n\t\t try{\n \t\tSystem.out.println(\"Please enter the sid(Starting with 'B')\\n\"); \n\t\t \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in )); \n\t\t\tsid = br.readLine();\n //Connection to Oracle server\n OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource();\n ds.setURL(\"jdbc:oracle:thin:@grouchoIII.cc.binghamton.edu:1521:ACAD111\");\nConnection conn = ds.getConnection(\"vbobhat1\", \"BingData\");\nCallableStatement cs = conn.prepareCall (\"begin StudRegSys.delete_student(:1); end;\");\n\t \t \n\t \t\tcs.setString(1,sid);\n\t \t\tcs.executeQuery();\n\t \t\tSystem.out.println(\"Student Successfully deleted from student table!\");\n\t\t\tSystem.out.println(\"\\n\\n\");\n\t\t \n\t\t }\n\tcatch (SQLException ex) { System.out.println (\"\\n*** SQLException caught ***\\n\" + ex.getMessage());}\n catch (Exception e) {System.out.println (\"\\n*** other Exception caught ***\\n\");}\n }",
"public int DeleteStudent(Student aStudent) {\n\t\tint updateCount = 0;\n\t\t\n\t\tint aId = aStudent.getId();\n\t\tString afName = aStudent.getfName();\n\t\tString alName = aStudent.getlName();\n\t\tdouble aGpa = aStudent.getGpa();\n\t\tint aSat = aStudent.getSat();\n\t\tint aMajor = aStudent.getMajor();\n\t\t\n\t\tString sql = \"delete from student where id = \" +\n\t\t\t\tString.format(\"(%4d)\", aId);\n\n\t\ttry {\n\t\t\tupdateCount = myDB.execSQLUpdate(sql);\n\t\t} catch (SQLException e) { e.printStackTrace(); }\n\t\t\n\t\treturn updateCount;\n\t}",
"public void deleteStudent(Integer studentId) {\n\t\tif (ObjectUtils.isEmpty(studentId))\n\t\t\tthrow new BadRequestException(Constants.genericRequiredFieldsMissingMsg);\n\n\t\tOptional<Student> existingSubject = studentRepository.findById(studentId);\n\t\tif (existingSubject.isPresent())\n\t\t\tstudentRepository.deleteById(studentId);\n\t\telse\n\t\t\tthrow new ResourceNotFoundException(Constants.studentNotFound);\n\t}",
"@Override\n\tpublic void deleteStudent(Integer id) {\n\t\tem.remove(em.find(Student.class, id));\n\t}",
"public void deleteStudent(String MatricNo) {\n\t\tif (checkIfStudentExists(MatricNo)) {\n\t\t\tfor (Student student : StudentList) {\n\t\t\t\tif (MatricNo.equals(student.getMatricNo())) {\n\t\t\t\t\tStudentList.remove(student);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tList<Object> students = new ArrayList<Object>();\n\t\t\tfor (Student s : StudentList)\n\t\t\t\tstudents.add((Object) s);\n\t\t\tFileManager.writeObjectToFile(\"student.dat\", students);\n\t\t\tSystem.out.println(\"Student Has been deleted\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Student Does not Exist\");\n\t\t}\n\t}",
"@Override\n\tpublic boolean delete() {\n\t\tString sql=\"DELETE FROM tc_student where id=\"+id;\n\t\t//`\n\t\t\n\t\tSystem.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t}",
"@Override\n\tpublic void deleteStudent(int id) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// find the student\n\t\tStudent student = currentSession.get(Student.class, id);\n\n\t\t// delete student\n\t\tcurrentSession.delete(student);\n\n\t}",
"public void deleteStudentHandler(View v) {\n database = new DatabaseSQLiteHelper(this).getWritableDatabase();\n\n String value = studentIdTv.getText().toString();\n\n int numberDeleted = database.delete(Database.Student.TABLE_NAME, Database.Student._ID +\"=?\" ,new String[]{value});\n Toast.makeText(this, Integer.toString(numberDeleted) + \" Deleted\", Toast.LENGTH_SHORT).show();\n\n Student.this.recreate();\n }",
"int deleteByExample(StudentCriteria example);",
"@DeleteMapping(\"student-delete/{id}\")\n\tpublic String deleteById(@PathVariable int id) throws SQLException {\n\n\t\treturn studentSerivce.deleteById(id);\n\n\t}",
"@DeleteMapping(\"/api/students\")\n public void deleteStudentById(@PathVariable(value = \"id\") Long id) {\n this.studentService.deleteStudentById(id);\n }",
"public boolean deleteStudentRecord(String sEmail, String tEmail) {\n\t\treturn new Tutor().removeStudent(sEmail, tEmail);\n\t}",
"public static void deleteStudent(int id) throws Exception {\n\t\tConnection myConn=null;\n\t\tStatement myStmt = null;\n\t\ttry {\n\t\t\tmyConn = dataSource.getConnection();\n\t\t\tmyStmt= myConn.createStatement();\n\t\t\tString sql= \"delete from student where id=\"+id;\n\t\t\tmyStmt.execute(sql);\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} finally{ close(myConn,myStmt,null); }}",
"@DeleteMapping(\"/students/{id}\")\n @Timed\n public ResponseEntity<Void> deleteStudent(@PathVariable Long id) {\n log.debug(\"REST request to delete Student : {}\", id);\n studentService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@Override\n public void deleteStudentByID(Long id) {\n if(studentRepository.findById(id).isPresent()) {\n studentRepository.deleteById(id);\n log.info(\"Student with id:\" + id + \" successfully deleted\");\n } else {\n log.debug(\"Student with id: \" + id + \" not found\");\n throw new ResourceNotFoundException(\"Student with id: \" + id + \" not found\");\n }\n }",
"int deleteByExample(SalGradeExample example);",
"@RequestMapping(value = \"delete\", method = RequestMethod.POST)\r\n\tpublic String delete(HttpServletRequest request) {\n\t\tint id = Integer.parseInt(request.getParameter(\"id\"));\r\n\t\t// Create the student\r\n\t\tStudent student = studentService.findById(id);\r\n\t\tSystem.out.println(student);\r\n\t\t// insert student to db\r\n\r\n\t\tString res = studentService.delete(student);\r\n\r\n\t\tif (res.equals(\"SUCCESS\"))\r\n\t\t\trequest.setAttribute(\"msg\", \"Record Deleted\");\r\n\t\telse\r\n\t\t\trequest.setAttribute(\"msg\", \"Record Not Deleted\");\r\n\t\treturn \"delete\";\r\n\t}",
"public static boolean deleteStudent(int sid) {\n\t\t\n boolean f =false;\n\t\t\n\t\ttry {\n\t\t\t//jdbc code\n\t\t\tConnection connection=Connection_Provider.creatC();\t\t\n\n\t\t\tString q=\"delete from students where sid=?\";\n\t\t\t// Prepared Statement\n\t\t\tPreparedStatement pstmt=connection.prepareStatement(q);\n\t\t\t//set the value of parameters\n\t\t\tpstmt.setInt(1, sid);\n\t\t\t\n\t\t\t//execute\n\t\t\tpstmt.executeUpdate();\n\t\t\tf=true;\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn f;\n\t\t\n\t}",
"@Override\r\n\tpublic void deleteStudentInCourse(Course course, User user) {\n\t\t\r\n\t}",
"@Override\n\t//删除数据\n\tpublic void deleteStudent(String id) {\n\t\tConnection conn = null;\n\t\tPreparedStatement pStatment = null;\n\t\t\t\t\n\t\ttry {\n\t\t\tconn = MySQLConnectUtil.getMySQLConnection();\n\t\t\tpStatment = conn.prepareStatement(DELETE);\n\t\t\tpStatment.setString(1, id);\n\t\t\tint i = pStatment.executeUpdate();\n\t\t\tSystem.out.println(\"删除影响行数:\" +i);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\tMySQLConnectUtil.closePreparestatement(pStatment);\n\t\t\tMySQLConnectUtil.closeConnection(conn);\n\t\t}\n\t}",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Studente : {}\", id); studenteRepository.deleteById(id);\n }",
"@Override\n\t@Transactional\n\tpublic void delete(int theId) {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t// delete object with primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Student where id=:studentId\");\n\t\ttheQuery.setParameter(\"studentId\", theId);\n\n\t\ttheQuery.executeUpdate();\n\t}",
"@DeleteMapping(value = \"/professor/deleteStudent/{studentId}/{sectionId}\")\n public ResponseEntity<Boolean> deleteStudent(@PathVariable Long studentId, @PathVariable Long sectionId) {\n ResponseEntity<Boolean> body = ResponseEntity.status(HttpStatus.CREATED).body(facade.deleteStudentFromSection(studentId, sectionId));\n return body;\n }",
"@RequestMapping(value = \"/delete/{id}\", method = RequestMethod.GET)\n public String deleteStudent(ModelMap view, @PathVariable int id) {\n if(studentService.delete(id)) {\n view.addAttribute(\"msg\", new String(\"Deleted Successfully!\"));\n } else {\n view.addAttribute(\"msg\", new String(\"Not Deleted!\"));\n }\n return(\"redirect:/list\");\n }",
"@GetMapping(\"/students/{id}\")\r\n\tpublic String deleteStudent(@PathVariable Long id) {\r\n\t\tstudentService.deleteStudentById(id);\r\n\t\treturn \"redirect:/students\";\r\n\t}",
"void remove(Student entity);",
"public void deleteStudentExam(Long studentExamId) {\n log.debug(\"Request to delete the student exam with Id : {}\", studentExamId);\n studentExamRepository.deleteById(studentExamId);\n }",
"boolean deleteUser(SchoolSubject schoolSubject);",
"int deleteByPrimaryKey(String samId);",
"@GetMapping(\"/students/{id}\")\n\tpublic String deleteStudent(@PathVariable long id)\n\t{\n\t\tstudentService.deleteStudentById(id);\n\t\treturn \"redirect:/students\";\n\t}",
"@Override\n\tpublic boolean deleteToeic(int idStudent) {\n\t\tSessionFactory factory = HibernateUtils.getSessionFactory();\n\t\tSession session = factory.getCurrentSession();\n\t\ttry {\n\t\t\tsession.getTransaction().begin();\n\t\t\tTblToeic toeic = session.get(TblToeic.class, idStudent);\n\t\t\ttoeic.setTimeModified(Commons.getCurrentTime());\n\t\t\ttoeic.setStt(Constants.DELETED);\n\t\t\tsession.save(toeic);\n\t\t\tsession.getTransaction().commit();\n\t\t\treturn true;\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Loi: \" + ex.getMessage());\n\t\t}\n\t\treturn false;\n\t}",
"static void unregisterStudent(Connection conn, String student, String course) throws SQLException\n {\n PreparedStatement st =\n conn.prepareStatement(\"DELETE FROM Registrations WHERE student = ? AND course = ?\") ;\n st.setString(1,student);\n st.setString(2,course);\n int deletion = st.executeUpdate();\n if(deletion > 0){\n System.out.println(\"Deleted \"+student+\" from \"+course);\n }else{\n System.out.println(\"Deletion failed\");\n }\n st.close();\n }",
"public boolean delete(String sid) {\n\t\tStudent student = getStudentByID(sid);\r\n\t\t//If student was found then delete the student\r\n\t\tif(student!=null) {\r\n\t\t\treturn students.remove(student);\r\n\t\t} else {\r\n\t\t\t//if no student is found return false\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public void deleteButtonPushed() {\r\n ObservableList<Student> allStudents;\r\n Student selectedRow;\r\n allStudents = tableView.getItems();\r\n \r\n // This gives us the row that was selected\r\n selectedRow = tableView.getSelectionModel().getSelectedItems().get(0);\r\n \r\n\r\n try {\r\n covidMngrService.deleteStudent(selectedRow);\r\n \r\n // Remove the Student object from the table\r\n allStudents.remove(selectedRow);\r\n } catch (RemoteException ex) {\r\n Logger.getLogger(SecretaryStudentsTableCntrl.class.getName()).\r\n log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@CrossOrigin(origins = \"http://localhost:3000\")\n @RequestMapping(value = \"delete\", method = RequestMethod.DELETE) // or use @DeleteMapping\n public void delete(@RequestParam(\"id\")long studentId){\n studentService.delete(studentId);\n }",
"@GetMapping(\"/deleteStudent\")\n\tpublic String deleteStudent(@RequestParam(required = true) int id, Model model)\t{\n\t\t\t\t\n\t\t//Get the student\n\t\tstudentDaoImpl.deleteStudent(id);\n\t\t\n\t\t//Get a list of students from the controller\n\t\tList<Student_gra_84> students = studentDaoImpl.getAllStudents();\n\t\tmodel.addAttribute(\"studentList\", students);\n\t\n\t\tmodel.addAttribute(\"message\", \"Deleted Student: \" + id);\n\t\t\t\n\t\treturn \"showStudents\";\n\t}",
"public static void deletestu(String stuid2) {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"delete from student where ID = ? \");\n\t\t\tps.setString(1, stuid2);\n\t\t\tps.execute();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"学生记录删除成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\n\t\t} catch (Exception e1){\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据删除失败!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te1.printStackTrace();\n\t\t}\n\t}",
"public void removeStudent(Student InStudent)\n\t{\n\t\tclassRoll.remove (InStudent);\n\t\tsaveNeed = true;\n\n\t}",
"private void delete() {\n\t\tConfiguration conf = new Configuration();\n\t\tconf.configure(\"hibernate.cfg.xml\");\n\t\tSessionFactory sf = conf.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\ts.beginTransaction();\n\n\t\tQuery query = s.createQuery(\"delete from OldStudent where name='Michael'\");\n\t\tint count = query.executeUpdate();\n\t\tSystem.out.println(\"Number of Rows Deleted in the oldstudent table=\" + count);\n\n\t\ts.getTransaction().commit();\n\t\ts.clear();// s.evict() on all student objects in session\n\t\tsf.close();\n\n\t}",
"public String removeStudent (String id){\n studentSkills.deleteOne(new Document(\"_id\", new ObjectId(id)));\n Security.deleteOne(new Document(\"id\", id));\n return \"{\\\"result\\\":\\\"ok\\\"}\";\n}",
"public void deleteRecord(int cid,String studentid) {\n\t\tcomprehensive c=comprehensiveDao.get(comprehensive.class, cid);\r\n\t\tfloat cha=c.getFinal_()-c.getLast();\r\n\t\t\r\n\t\tcomprehensive_record cRecord=comprehensiveRecordDao.findByStudent(studentid);\r\n\t\tcRecord.setScore(cRecord.getScore()-cha);\r\n\t\tcomprehensiveRecordDao.update(cRecord);\r\n\t\t\r\n\t\tcomprehensiveDao.delete(comprehensive.class,cid);\r\n\t}",
"int deleteByExample(LoginRecordDOExample example);",
"@PutMapping(\"/deleteInstructor/{instructorId}/student/{studentId}\")\n public String deleteInstructor(@PathVariable Integer instructorId,@PathVariable Integer studentId){\n return instructorService.deleteInstructorFromStudents(instructorId,studentId);\n }",
"@Override\n\t\tpublic void removeStudentById(Integer id) \n\t\t{\n\t\t\tStudent stu=(Student) sessionFactory.getCurrentSession().load(Student.class,id);\n\t if(null!=stu)\n\t {\n\t sessionFactory.getCurrentSession().delete(stu);\n\t }\n\t\t\t\n\t\t}",
"@DeleteMapping(value = deleteTeacherStudentMapping + \"{studentId}/{teacherId}\")\r\n\tpublic ResponseEntity<HttpResponse> delete(@PathVariable(\"studentId\") String studentId,@PathVariable(\"teacherId\") String teacherId){\r\n\t\tteacherStudentService.delete(teacherId, studentId);\r\n\t\tHttpResponse response = new HttpResponse();\r\n\t\tresponse.setResponseMessage(\"TeacherStudent Deleted with StudentId : \"+ studentId + \" and TeacherId : \" + teacherId);\r\n\t\treturn ResponseEntity.ok().body(response);\r\n\t}",
"@Override\n public void delete(Seq s) {\n // TODO Auto-generated method stub\n \t//Establish cnx\n\t\tConnection conn = null;\n\t\tString url = \"jdbc:sqlite:src\\\\database\\\\AT2_Mobile.db\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t\tPreparedStatement myStmt; \n\t\t\tString query = \"delete from seq where id = ?\";\n\t\t\tmyStmt = conn.prepareStatement(query);\n\t\t\t\n\t\t\t// Set Parameters\n\t myStmt.setInt(1, s.getId());\n\t\t\t// Execute SQL query\n\t int res = myStmt.executeUpdate();\n\t \n\t // Display the record inserted\n\t System.out.println(res + \" seq deleted\");\n\t \n\t // Close the connection\n\t conn.close();\n\t\t}catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());}\n\t\t\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t}\n\t\t\t}\n \t \n }",
"int deleteByExample(CourseExample example);",
"int deleteByPrimaryKey(BigDecimal subjectNo);",
"@Override\n\tpublic void deleteAllStudents() {\n\t\t\n\t}",
"public void setSql_deleteStudent(String sql_deleteStudent) {\n\t\tthis.sql_deleteStudent = sql_deleteStudent;\n\t}",
"public int delete(int rollno) {\r\n\t\tint status = 0;\r\n\t\ttry {\r\n\t\t\tConnection con = DatabaseUtility.getCon(inputStream);\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"delete from student where roll_no=?\");\r\n\t\t\tps.setInt(1, rollno);\r\n\t\t\tstatus = ps.executeUpdate();\r\n\t\t\tcon.close();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(ex);\r\n\t\t}\r\n\t\treturn status;\r\n\t}",
"@DELETE\n @Path(\"/{id}\")\n public Response deleteStudentGrade(@PathParam(\"id\") int id) {\n // getting student by it's index\n StudentService studentService = new StudentService();\n Student searchedStudent = studentService.getStudent(index);\n\n // checking if student exists\n if (searchedStudent == null)\n return Response.status(Response.Status.NOT_FOUND).entity(\"Student not found\").build();\n\n Grade searchedGrade = searchedStudent.getGradeById(id);\n // checking if grade exists\n if (searchedGrade == null)\n return Response.status(Response.Status.NOT_FOUND).entity(\"Grade not found\").build();\n\n // removing student grade\n searchedStudent.removeStudentGradeById(id);\n studentService.updateStudent(searchedStudent);\n String result = \"Student grade \" + searchedGrade + \" deleted!\";\n\n // creating response\n return Response.status(Response.Status.OK).entity(result).build();\n }",
"@Override\n\tpublic boolean ermanentlyDeleteToeic(int idStudent) {\n\t\tSessionFactory factory = HibernateUtils.getSessionFactory();\n\t\tSession session = factory.getCurrentSession();\n\t\ttry {\n\t\t\tsession.getTransaction().begin();\n\t\t\tTblToeic toeic = session.get(TblToeic.class, idStudent);\n\t\t\tsession.delete(toeic);\n\t\t\tsession.getTransaction().commit();\n\t\t\treturn true;\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"Loi: \" + ex.getMessage());\n\t\t}\n\t\treturn false;\n\t}",
"int deleteByExample(ProSchoolWareExample example);",
"@Override\n public void onClick(View view) {\n StudentDelete(TempItem);\n\n }",
"@DELETE\r\n\t@Path(\"/{courseID}/student/{studentID}\")\r\n\tpublic void deleteTAtoCourse(@PathParam(\"studentID\") String studentID, @PathParam(\"courseID\") String courseID) {\r\n\r\n\t\tStudent student = InMemoryDataStore.getStudent(studentID);\r\n\t\tCourse course = InMemoryDataStore.getCourse(courseID);\r\n\r\n\t\tif (student == null || course == null) {\r\n\t\t\tthrow new WebApplicationException(Response.Status.BAD_REQUEST);\r\n\t\t}\r\n\r\n\t\tString currentTA = course.getTaStudentID();\r\n\t\tif (studentID.equals(currentTA)) {\r\n\t\t\tcourse.setTaStudentID(null);\r\n\t\t} else {\r\n\t\t\tthrow new WebApplicationException(Response.Status.BAD_REQUEST);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic ResultVo delete(String no) {\n\t\tif (sDao.deleteByNo(no) > 0) {\n\t\t\treturn ResultVo.setOK(\"删除学员成功\");\n\t\t} else {\n\t\t\treturn ResultVo.setERROR(\"删除学员失败\");\n\t\t}\n\t}",
"@Override\n\tpublic void deleteExam(ExamBean exam) {\n\t\t\n\t}",
"void delete(Exam exam);",
"public void delete(String name) {\n db = helper.getWritableDatabase();\n db.delete(\"student\", \"name=?\", new String[]{name});\n Log.i(\"db1\", name + \"정상적으로 삭제 되었습니다.\");\n }",
"public void deleteRecord(Record record, String clientName, String assessmentYear, String taxType, String paymentDate, String paymentAmount) {\n String delete = \"DELETE FROM \" + TABLE_RECORDS + \" WHERE \" + COLUMN_NAME + \"=\\\"\" + clientName + \"\\\" AND \" + COLUMN_ASSESSMENT_YEAR + \"=\\\"\" + assessmentYear + \"\\\" AND \" +\n COLUMN_IT_GST + \"=\\\"\" + taxType + \"\\\" AND \" + COLUMN_PAYMENT_DATE + \"=\\\"\" + paymentDate + \"\\\" AND \" + COLUMN_PAYMENT_AMOUNT + \"=\\\"\" + paymentAmount + \"\\\"\";\n records.remove(record);\n\n try {\n statement = connection.prepareStatement(delete);\n statement.executeUpdate();\n logFile.modifyLogFile(\"Data successfully deleted from database\");\n } catch (SQLException e) {\n logFile.modifyLogFile(\"Error deleting record : \" + e.getMessage());\n e.printStackTrace();\n }\n }",
"int deleteByExample(RegsatUserExample example);",
"int deleteByExample(TrainingCourseExample example);",
"int deleteByPrimaryKey(String courseId);",
"int deleteByExample(WstatTeachingClasshourTeacherExample example);",
"int deleteByExample(ReEducationExample example);",
"public void delete() throws SQLException {\n DatabaseConnector.updateQuery(\"DELETE FROM course \"\n + \"WHERE courseDept='\" + this.courseDept \n + \"' AND courseNum = '\" + this.courseNum + \"'\");\n }",
"int deleteByExample(FinMonthlySnapModelExample example);",
"int deleteByExample(OrgMemberRecordExample example);",
"@CrossOrigin(origins = \"http://localhost:3000\")\n\t@DeleteMapping(path = \"/removeStudent/{id}\", produces = { MediaType.APPLICATION_XML_VALUE,\n\t\t\tMediaType.APPLICATION_JSON_VALUE })\n\tpublic StudentResponse removeStudent(@PathVariable(name = \"id\") int id) {\n\n\t\tStudentResponse response = new StudentResponse();// Student Response Object\n\n//\t\t deleting Student data from database\n\t\tif (service.deleteStudent(id)) {\n\t\t\tresponse.setStatusCode(200);\n\t\t\tresponse.setMsg(\"Success\");\n\t\t\tresponse.setDescription(\"Data deleted for id \" + id);\n\n\t\t} else {\n\t\t\tresponse.setStatusCode(400);\n\t\t\tresponse.setMsg(\"Failure\");\n\t\t\tresponse.setDescription(\"Could not Delete the data for \" + id);\n\t\t}\n\t\treturn response;// sending response to client\n\t}",
"@Override\r\n\tpublic void deletebook(int seq) {\n\t\tsqlSession.delete(ns + \"deletebook\", seq);\r\n\t}",
"boolean deleteSchoolMasterDetail(SchoolMasterVo vo);",
"@Test\n public void testDeleteStudentClassUnpaid() {\n School instance = new School();\n instance.setStudents(students);\n instance.setStudentClass(studentClass);\n instance.setInvoices(invoices);\n instance.setClasses(classes);\n\n instance.deleteStudentClass(sc11);\n\n assertEquals(0, class1.getCurrentNumberOfStudent());\n System.out.println(\"Pass number of current students\");\n\n assertEquals(studentClass.size(), 3);\n assertEquals(student1.getBalance(), 120000);\n assertEquals(invoice1.getTotalFee(), 7000);\n\n System.out.println(\"PASS ALL\");\n }",
"int deleteByPrimaryKey(Integer acTeacherInstrumentId);",
"int deleteByExample(FileRecordAdminExample example);",
"@Test\n public void testDeleteStudentClassPaid() {\n School instance = new School();\n instance.setStudents(students);\n instance.setStudentClass(studentClass);\n instance.setInvoices(invoices);\n instance.setClasses(classes);\n\n sc11.setPaid(true);\n instance.deleteStudentClass(sc11);\n\n assertEquals(0, class1.getCurrentNumberOfStudent());\n System.out.println(\"Pass number of current students\");\n\n assertEquals(studentClass.size(), 3);\n assertEquals(student1.getBalance(), 120000);\n assertEquals(invoice1.getTotalFee(), 7000);\n\n System.out.println(\"PASS ALL\");\n }",
"public void deleteUserRecord() {\n\t\tSystem.out.println(\"Calling deleteUserRecord() Method To Delete User Record\");\n\t\tuserDAO.deleteUser(user);\n\t}"
] | [
"0.87169796",
"0.8594744",
"0.83516455",
"0.833085",
"0.8292515",
"0.81734836",
"0.8170303",
"0.816031",
"0.802532",
"0.7957974",
"0.7953217",
"0.79116225",
"0.7847637",
"0.78341794",
"0.7748315",
"0.7706405",
"0.76984555",
"0.76552266",
"0.76440275",
"0.760089",
"0.7538444",
"0.75285995",
"0.75250494",
"0.7483085",
"0.7465927",
"0.7444473",
"0.74238956",
"0.74183965",
"0.7351569",
"0.7329613",
"0.730923",
"0.72814626",
"0.72521096",
"0.7228161",
"0.7226675",
"0.7182346",
"0.71728456",
"0.71628517",
"0.7161699",
"0.7152822",
"0.7145004",
"0.7128729",
"0.7100876",
"0.70613396",
"0.70393676",
"0.7019889",
"0.699549",
"0.6942577",
"0.6941331",
"0.69355804",
"0.69112206",
"0.690357",
"0.68929225",
"0.68491304",
"0.6848452",
"0.6821669",
"0.68216324",
"0.68171155",
"0.6814312",
"0.6799899",
"0.6779987",
"0.6764202",
"0.6758221",
"0.6735896",
"0.67286056",
"0.66998726",
"0.6656972",
"0.66567695",
"0.6646055",
"0.6621018",
"0.66099286",
"0.6609883",
"0.6605513",
"0.6581714",
"0.6576484",
"0.6565989",
"0.6564816",
"0.65629584",
"0.6562898",
"0.65502",
"0.6546571",
"0.65411097",
"0.65401167",
"0.6534676",
"0.65294325",
"0.6529254",
"0.6518578",
"0.65101755",
"0.650829",
"0.6503584",
"0.64819735",
"0.64777577",
"0.64673144",
"0.6447135",
"0.64380133",
"0.6433121",
"0.64243084",
"0.64168584",
"0.64154005",
"0.6407788",
"0.6391934"
] | 0.0 | -1 |
Method to show current record Current Selected Record | public void HttpWebCall(final String PreviousListViewClickedItem){
class HttpWebCallFunction extends AsyncTask<String,Void,String> {
@Override
protected void onPreExecute() {
super.onPreExecute();
pDialog = ProgressDialog.show(ShowSingleRecordActivity.this,"Loading Data",null,true,true);
}
@Override
protected void onPostExecute(String httpResponseMsg) {
super.onPostExecute(httpResponseMsg);
pDialog.dismiss();
//Storing Complete JSon Object into String Variable.
FinalJSonObject = httpResponseMsg ;
//Parsing the Stored JSOn String to GetHttpResponse Method.
new GetHttpResponse(ShowSingleRecordActivity.this).execute();
}
@Override
protected String doInBackground(String... params) {
ResultHash.put("StudentID",params[0]);
ParseResult = httpParse.postRequest(ResultHash, HttpURL);
return ParseResult;
}
}
HttpWebCallFunction httpWebCallFunction = new HttpWebCallFunction();
httpWebCallFunction.execute(PreviousListViewClickedItem);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void onViewPatient() {\n\t\tint selectedRowIndex = tablePatients.getSelectedRow();\n\n\t\tif (selectedRowIndex < 0)\n\t\t\t// No row has been selected\n\t\t\treturn;\n\n\t\t// Gets the patient ID\n\t\tbyte[] patientId = (byte[]) tablePatients.getValueAt(selectedRowIndex, PatientTable.ID);\n\n\t\t// Sets the patient ID as the current one\n\t\tPatientManager.setCurrentPatientId(patientId);\n\n\t\t// Opens the patient frame\n\t\tGuiManager.openFrame(GuiManager.FRAME_PATIENT);\n\t}",
"public String getSelected()\n\t{\n\t\treturn _current.ID;\n\t}",
"private void selectRecord(final Record temp) {\n\t\tfinal CharSequence[] items = { \"Edit Record\", \"Delete Record\", \"Cancel\" };\n\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tbuilder.setTitle(\"Choose Action\");\n\t\tbuilder.setItems(items, new DialogInterface.OnClickListener() {\n\n\t\t\t/**\n\t\t\t * \n\t\t\t * Goes to next page(userdata), stores values as well as putting this fragment on top of\n\t\t\t * the stack for later popback functionality if Edit Record selected\n\t\t\t * \n\t\t\t * if Delete Record is selected then the delete record method is run\n\t\t\t * \n\t\t\t * otherwise dismiss dialog window.\n\t\t\t * \n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int item) {\n\t\t\t\tif (items[item].equals(\"Edit Record\")) {\n\t\t\t\t\t//mCallback.saveOriginal(temp, item);\n\t\t\t\t\t\n\t\t\t\t\tBundle args1 = new Bundle();\n\t\t\t\t\targs1.putSerializable(\"RECORD\", temp);\n\t\t\t\t\targs1.putString(\"NAME\", name);\n\t\t\t\t\targs1.putString(\"EMAIL\", email);\n\t\t\t\t\targs1.putString(\"PHONE\", phone);\n\t\t\t\t\targs1.putInt(\"ID\", id);\n\n\t\t\t\t\tFragmentManager fm = getFragmentManager();\n\t\t\t\t\tFragmentTransaction transaction = fm.beginTransaction();\n\t\t\t\t\tfragment_userdata.setArguments(args1);\n\t\t\t\t\ttransaction.replace(id, fragment_userdata);\n\t\t\t\t\ttransaction.addToBackStack(null);\n\t\t\t\t\ttransaction.commit();\n\n\t\t\t\t} else if (items[item].equals(\"Delete Record\")) {\n\t\t\t\t\tDeleteRecord(temp);\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t} else if (items[item].equals(\"Cancel\")) {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbuilder.show();\n\t}",
"public void showSelection () {\n checkWidget();\n if( selectedIndex != -1 ) {\n showItem( getSelection() );\n }\n }",
"public void showrecord(View v) {\n\t // Do something in response to button\n\t\tIntent intent = new Intent(this, SelectLevel2.class);\n\t startActivity(intent);\n\t\tLog.d(\"record\",\"clicked\");\n\t}",
"public Record getCurrentRecord() {\n return mCurrentRecord;\n }",
"private void recordTableMouseClicked(MouseEvent e) {\n\n //fetching the index from jtable\n DefaultTableModel df=(DefaultTableModel) recordTable.getModel();\n int index=recordTable.getSelectedRow();\n txtCustNo.setText(df.getValueAt(index,0).toString());\n txtCustName.setText(df.getValueAt(index,1).toString());\n txtCustDeposit.setText(df.getValueAt(index,2).toString());\n txtYears.setText(df.getValueAt(index,3).toString());\n cboSavings.setSelectedItem(df.getValueAt(index,4).toString());\n }",
"public void updateRecordSelector(int activeRecord) {\r\n\t\tChannel activeChannel = this.channels.getActiveChannel();\r\n\t\tif (activeChannel != null) {\r\n\t\t\tString[] recordNames = activeChannel.getRecordSetNames();\r\n\t\t\tif (recordNames != null && recordNames.length > 0 && recordNames[0] != null) {\r\n\t\t\t\tCCombo recordSelect = this.menuToolBar.getRecordSelectCombo();\r\n\t\t\t\trecordSelect.setItems(recordNames); // 1) Datensatz\r\n\t\t\t\trecordSelect.select(activeRecord); // kanalCombo.setText(\"K1: Kanal 1\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public abstract ETreeTableRecord<T> getSelectedRecord();",
"@Override\n\tpublic String Show()\n\t{\n\t\treturn id;\n\t\t\n\t}",
"public void show() {\n\t\tSystem.out.println(getId());\n\t}",
"private void showrecordthroughmodel()\n {\n if(treatmentRequestModel != null)\n {\n tv_right_hand_dia.setText(\"\" + treatmentRequestModel.getSYSBeforeRight());\n tv_right_hand_sys.setText(\"\" + treatmentRequestModel.getDIABeforeRight());\n tv_right_hand_pulse.setText(\"\" + treatmentRequestModel.getPulseBeforeRight());\n\n tv_left_hand_dia.setText(\"\" + treatmentRequestModel.getDIABeforeLeft());\n tv_left_hand_sys.setText(\"\" + treatmentRequestModel.getSYSBeforeLeft());\n tv_left_hand_pulse.setText(\"\" + treatmentRequestModel.getPulseBeforeLeft());\n }\n\n }",
"public static final SourceModel.Expr showRecord(SourceModel.Expr arg_1) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showRecord), arg_1});\n\t\t}",
"public void displayPreviousRecord(){\r\n\r\n // dec in recordNumber to display previous person info, already stored in personsList during search \r\n\trecordNumber--;\r\n\r\n\tif(recordNumber < 0 )\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"You have reached at begining of search results\"); \r\n\r\n\t\t/*if user has reached the begining of results, disable back button*/\r\n\t\tbForward.setEnabled(true);\r\n\t\tbBack.setEnabled(false);\r\n\r\n // inc by one to counter last dec\r\n recordNumber++;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tbForward.setEnabled(true);\r\n\t\tPersonInfo person = (PersonInfo) personsList.get(recordNumber);\r\n\r\n // displaying search record in text fields \r\n\t\ttfName.setText(person.getName());\r\n\t\ttfAddress.setText(person.getAddress());\r\n\t\ttfPhone.setText(\"\"+person.getPhone());\r\n\t\ttfEmail.setText(person.getEmail());\r\n\t}\r\n\r\n }",
"private void info(ActionEvent x) {\n\t\tProject p = this.list.getSelectedValue();\n\t\tif (p != null) {\n\t\t\tcontroller.moreinfo(p.getName());\n\t\t}\n\t}",
"@OnShow\n\tpublic void onShow() {\n\t\tviewForm.setValue(\n\t\t\t\t// load product using the \"id\" parameter\n\t\t\t\tdatastore.query().target(TARGET).filter(ID.eq(id)).findOne(PRODUCT)\n\t\t\t\t\t\t// throw an exception if not found\n\t\t\t\t\t\t.orElseThrow(() -> new DataAccessException(\"Product not found: \" + id)));\n\t}",
"@Override\n public String displayUponBeingSelected() {\n\n StringBuilder sb = new StringBuilder();\n sb.append(String.format(\"Information about '%s'\\n\", foodLabel));\n sb.append(String.format(\"Brand: %s\\n\", brand));\n sb.append(String.format(\"Category: %s\\n\", category));\n sb.append(String.format(\"Item type: %s\\n\", StringUtils.capitalize(categoryLabel)));\n sb.append(String.format(\"Measure(s): %s\\n\", StringUtils.join(measures, \", \")));\n sb.append(String.format(\"Food ID: %s\\n\", foodId));\n sb.append(String.format(\"Food URI: %s\\n\", foodUri));\n sb.append(String.format(\"Image link: %s\\n\", imageLink));\n sb.append(String.format(\"Yielding search term: %s\\n\", yieldingSearchTerm));\n sb.append(formatBasicNutrients());\n\n return sb.toString();\n\n }",
"private void ShowCardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ShowCardActionPerformed\n alert.setText(\"\");\n int selectedRow = Table.getSelectedRow();\n if (selectedRow == -1)\n RowItem.setText(\"Please select an item first\");\n else {\n jTextField1.setText(\"Enter search query\");\n alert.setText(\"\");\n RowItem.setText(\"\");\n displayMgr.CU.cardDetails(id, name, price, discount);\n displayMgr.showCard();\n }\n }",
"public void viewRecord(int pos){\n\n Intent i = new Intent(getApplicationContext(),addExpensesPage.class);\n\n Expenses _e = recordList.getMyRecords().get(pos);\n\n i.putExtra(\"Edit\",pos);\n i.putExtra(\"Date\",_e.getExpenseDate());\n i.putExtra(\"Amount\",_e.getAmount());\n i.putExtra(\"Category\",_e.getCategory());\n i.putExtra(\"Choice\",_e.getCategory_choice());\n i.putExtra(\"Payment\",_e.getpMethod());\n i.putExtra(\"Description\",_e.getDescription());\n\n startActivity(i);\n }",
"public void printCurrentTransaction() {\n\t\tregister[registerSelected].printCurrentTransaction();\n\t}",
"private void showOldAuthorData() {\n try {\n Author author = authorService.getAuthorById(selectedId);\n nameTxt.setText(author.getName());\n surnameTxt.setText(author.getSurname());\n } catch (Exception ex) {\n Logger.getLogger(EditAuthorFrame.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"static void outputCurrentItem(ABCSelectionList list) {\n String cursor = (list.getCount() > 0) ? String.valueOf(list.getCursor() + 1) : \"0\"; //convert from 0 index to 1 for display\n String max = (list.getCount() > 0) ? String.valueOf(list.getCount()) : \"0\";\n\n String type = list.getTypeName();\n System.out.println(\"\\n\\n\" + type);\n System.out.println(\"Current Selection: \" + cursor + \" of \" + max);\n System.out.println(list.prettyCurrentItem());\n }",
"private void viewRecordButtonActionPerformed() {\n String uri = recordURIComboBox.getSelectedItem().toString();\n String recordJSON = \"\";\n\n try {\n if(aspaceClient == null) {\n String host = hostTextField.getText().trim();\n String admin = adminTextField.getText();\n String adminPassword = adminPasswordTextField.getText();\n\n aspaceClient = new ASpaceClient(host, admin, adminPassword);\n aspaceClient.getSession();\n }\n\n recordJSON = aspaceClient.getRecordAsJSON(uri, paramsTextField.getText());\n\n if(recordJSON == null || recordJSON.isEmpty()) {\n recordJSON = aspaceClient.getErrorMessages();\n }\n } catch (Exception e) {\n recordJSON = e.toString();\n }\n\n // see whether to display window with syntax highlighting\n if (mainFrame == null || mainFrame.getAtVersionNumber().contains(\"15\")) {\n CodeViewerDialog codeViewerDialog = new CodeViewerDialog(this, SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT, recordJSON, true, true);\n codeViewerDialog.setTitle(\"REST ENDPOINT URI: \" + uri);\n codeViewerDialog.setASpaceClient(aspaceClient);\n codeViewerDialog.pack();\n codeViewerDialog.setVisible(true);\n } else {\n ImportExportLogDialog logDialog = new ImportExportLogDialog(null, ImportExportLogDialog.DIALOG_TYPE_IMPORT, recordJSON);\n logDialog.setTitle(\"REST ENDPOINT URI: \" + uri);\n logDialog.showDialog();\n }\n }",
"@FXML\n private void btnShowInfoPressed() {\n Tournament t = tblTournaments.getSelectionModel().getSelectedItem();\n\n // Pass in some way the tournament name to the tournament info scene\n stateManager.TournamentName = t.tournamentName.get();\n\n Renderer.getInstance().show(\"tournamentInfoScene\");\n }",
"public void showSelectedRecipe() {\n selected = recipeList.getSelectedValue().toString();\n recipeName.setText(selected);\n recipeInfo.setText(model.getRecipeInformation(selected));\n }",
"private void selectedRowInvoice(){\r\n //numOrdenInv = tb_factura.getSelectionModel().getSelectedIndex();\r\n }",
"public void onShow(IClientContext context, IGroup group) throws Exception \n {\n IDataBrowser browser = group.getBrowser().getData();\n\n context.getDataAccessor().clear();\n browser.search(IRelationSet.LOCAL_NAME);\n if(browser.recordCount()>0)\n context.getGUIBrowser().setSelectedRecordIndex(context,0);\n }",
"@Override\n public void onContactSelected(Contact selected, int rowId)\n {\n contactIndex = rowId;\n selectedContact = selected;\n\n // Visa detaljvyn när en rad i listan klickas\n showDetails();\n }",
"public Integer getCurrentRecord() {\n return this.currentRecord;\n }",
"public void Dbdisplay_For_Edit() {\n String Reg = editAccessionNoText.getText();\n\n try {\n con = DbConnection();\n\n st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n\n ResultSet rs = st.executeQuery(\"select * from bookdetails where AccessionNo ='\" + Reg + \"'\");\n while (rs.next()) {\n editISBNNoText.setText(rs.getString(\"ISBNNo\"));\n editCLAccessiontext.setText(rs.getString(\"CL Accession\"));\n editBookTitletext.setText(rs.getString(\"BookTitle\"));\n editAuthorNametext.setText(rs.getString(\"Author Name\"));\n editEditionText.setText(rs.getString(\"Edition\"));\n editBookshelfNotext.setText(rs.getString(\"Book Self No\"));\n editColumnNotext.setText(rs.getString(\"Row No\"));\n editRowNotext.setText(rs.getString(\"Column No\"));\n\n }\n\n } catch (Exception ex) {\n Logger.getLogger(StudentInformation.class\n .getName()).log(Level.SEVERE, null, ex);\n\n }\n }",
"private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }",
"void display()\n\t {\n\t\t System.out.println(\"Student ID: \"+id);\n\t\t System.out.println(\"Student Name: \"+name);\n\t\t System.out.println();\n\t }",
"public void show() {\r\n\t\tSystem.out.println(\"Id \\t Name \\t Address\");\r\n\t\t\r\n\t\tfor (int index = 0; index < emp.size(); index++) {\r\n\t\t\tSystem.out.println(emp.get(index).empId + \"\\t\" + emp.get(index).name +\"\\t\" + emp.get(index).adress);\r\n\t\t}\r\n\t}",
"void display() {\n System.out.println(id + \" \" + name);\n }",
"public abstract String getCurrentRow();",
"public Axiom getSelected() {\r\n\treturn view.getSelected();\r\n }",
"protected void select() {\n\t\tcleanValues();\n\t\tint row = m_table.getSelectedRow();\n\t\tboolean enabled = row != -1;\n\t\tif (enabled)\n\t\t{\n\t\t\tInteger ID = m_table.getSelectedRowKey();\n\t\t\tif (ID != null)\n\t\t\t{\n\t\t\t\tm_C_Order_ID = ID.intValue();\n\t\t\t}\n\t\t}\n\t\tlog.info(\"ID=\" + m_C_Order_ID); \n\t}",
"private void viewSavedCourseList() {\n boolean detailed = yesNoQuestion(\"Would you like to look at the detailed version? (just names if no)\");\n\n System.out.println(\"The current active courses are:\\n \");\n for (int i = 0; i < courseList.getCourseList().size(); i++) {\n if (detailed) {\n System.out.println((i + 1) + \":\");\n detailedCoursePrint(courseList.getCourseList().get(i));\n } else {\n System.out.println((i + 1) + \": \" + courseList.getCourseList().get(i).getName());\n }\n }\n }",
"public abstract String showDetails();",
"private void selectedRowGuide(){\r\n xy log_guide_rel_inv = tb_guias.getSelectionModel().getSelectedItem(); \r\n loadTables(log_guide_rel_inv.getGuias());\r\n loadCarga(log_guide_rel_inv.getGuias());\r\n \r\n List<Fxp_Archguid_gfc> data = Ln.getList_log_Archguid_gfc(Ln.getInstance().find_Archguid_gfc(log_guide_rel_inv.getGuias()));\r\n\r\n tp_factura.setText(\r\n \"Relación de Guia / Facturas / Clientes \" + \r\n \" - \" + \r\n data.size() + \" / \" + \r\n data.get(0).getNumfact() + \" / \" + \r\n data.get(0).getNumclie());\r\n\r\n tp_factura.setExpanded(true);\r\n \r\n }",
"public String showDetail(){\r\n\t\tuserRole = (Employee) request.getSession().getAttribute(\"user\");\r\n\t\tString id = request.getParameter(\"id\");\r\n\t\tapplication = iad.getApplicationById(Integer.parseInt(id));\r\n\t\tif(application.getStatus().equals(\"unsubmit\")){\r\n\t\t\ttempId = id;\r\n\t\t\trequest.setAttribute(\"tempId\",id);\r\n\t\t\tif(userRole.isAdmin()){\r\n\t\t\t\treturn \"admin_unsubmit\";\r\n\t\t\t}\r\n\t\t\treturn \"unsubmit\";\r\n\t\t}else{\r\n\t\t\treturn \"submit\";\r\n\t\t}\r\n\t}",
"public void display() {\r\n dlgRates.show();\r\n }",
"private void setUserDetailsToView() {\n\t\tdetailDisplay.getFirstName().setValue(currentDetails.getFirstName());\n\t\tdetailDisplay.getLastName().setValue(currentDetails.getLastName());\n\t\tdetailDisplay.getMiddleInitial().setValue(currentDetails.getMiddleInitial());\n\t\tdetailDisplay.getLoginId().setText(currentDetails.getLoginId());\n\t\tdetailDisplay.getTitle().setValue(currentDetails.getTitle());\n\t\tdetailDisplay.getEmailAddress().setValue(currentDetails.getEmailAddress());\n\t\tdetailDisplay.getPhoneNumber().setValue(currentDetails.getPhoneNumber());\n\t\tdetailDisplay.getOrganizationListBox().setValue(currentDetails.getOrganizationId());\n\t\tdetailDisplay.getIsActive().setValue(currentDetails.isActive());\n\t\tif (!currentDetails.isActive()) {\n\t\t\tdetailDisplay.getIsRevoked().setValue(true);\n\t\t} else { // added else to fix default Revoked radio check in Mozilla (User Story 755)\n\t\t\tdetailDisplay.getIsRevoked().setValue(false);\n\t\t}\n\t\t\n\t\tdetailDisplay.setUserLocked(currentDetails.isLocked());\n\t\tif (currentDetails.isExistingUser()) {\n\t\t\tdetailDisplay.setShowRevokedStatus(currentDetails.isCurrentUserCanChangeAccountStatus());\n\t\t\t// detailDisplay.setUserIsDeletable(currentDetails.isCurrentUserCanChangeAccountStatus());\n\t\t} else {\n\t\t\tdetailDisplay.setShowRevokedStatus(false);\n\t\t\t//detailDisplay.setUserIsDeletable(false);\n\t\t}\n\t\tdetailDisplay.setUserIsActiveEditable(currentDetails.isCurrentUserCanChangeAccountStatus());\n\t\tdetailDisplay.setShowUnlockOption(currentDetails.isCurrentUserCanUnlock() && currentDetails.isActive());\n\t\tdetailDisplay.getRole().setValue(currentDetails.getRole());\n\t\tdetailDisplay.getOid().setValue(currentDetails.getOid());\n\t\tdetailDisplay.getOid().setTitle(currentDetails.getOid());\n\t\t//detailDisplay.getRootOid().setValue(currentDetails.getRootOid());\n\t}",
"public String getCustomerContactRecordMenuSelection() {\n return customerContactRecordMenuSelection;\n }",
"private void showCurrentStatus(String header) {\r\n try {\r\n if (curObject != null) {\r\n curClass = curObject.getBClass();\r\n }\r\n if (curClass != null) {\r\n curPackage = curClass.getPackage();\r\n }\r\n\r\n String msg = header;\r\n if (curPackage != null) {\r\n msg += \"\\nCurrent Package = \" + curPackage;\r\n }\r\n if (curClass != null) {\r\n msg += \"\\nCurrent Class = \" + curClass;\r\n }\r\n if (curObject != null) {\r\n msg += \"\\nCurrent Object = \" + curObject;\r\n }\r\n JOptionPane.showMessageDialog(null, msg);\r\n } catch (Exception exc) {\r\n }\r\n }",
"public void show() {\n\t\t// TODO Auto-generated method stub\n\n\t}",
"public void showZonecomm() {\n\t\t\t// sql command to select all records and display them\n\t\t\tparent.removeAll();\n\t\t\tResultSet rs = null;\n\t\t\ttry {\n\t\t\t\t// Register jdbc driver\n\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t// open connection\n\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\tString sql = \"select * from `Zone committee` ;\";\n\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\trs = stmt.executeQuery(sql);\n\t\t\t\t// TO DO:Prepare table to fill values\n\t\t\t\tDefaultTableModel tab = new DefaultTableModel();\n\n\t\t\t\t// get metadata\n\t\t\t\tResultSetMetaData rsmt = rs.getMetaData();\n\n\t\t\t\t// create array of column names\n\t\t\t\tint colCount = rsmt.getColumnCount();// number of columns\n\t\t\t\tString colNames[] = { \"Member ID\", \"Baptismal Name\", \"Other Names\", \"Position\", \"Level\", \"Zone\" };\n\t\t\t\ttab.setColumnIdentifiers(colNames);// set column headings\n\n\t\t\t\t// now populate the data\n\t\t\t\trs.beforeFirst();// make sure to move cursor to beginning\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tString[] rowData = new String[colCount];\n\t\t\t\t\tfor (int i = 1; i <= colCount; i++) {\n\t\t\t\t\t\trowData[i - 1] = rs.getString(i);\n\t\t\t\t\t}\n\t\t\t\t\ttab.addRow(rowData);\n\t\t\t\t}\n\t\t\t\tJTable t = new JTable(tab);\n\t\t\t\tt.setBorder(BorderFactory.createRaisedSoftBevelBorder());\n\t\t\t\tsp = new JScrollPane(t);\n\t\t\t\tsp.setBorder(BorderFactory.createTitledBorder(\"Table Of Committee\" + \" members for selected zone\"));\n\t\t\t\tparent.add(sp, BorderLayout.CENTER);\n\t\t\t\tframe.pack();\n\t\t\t\tframe.repaint();\n\n\t\t\t} catch (SQLException | ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}",
"public ShowStudentInfo() throws SQLException {\n initComponents();\n ShowDetails();\n }",
"public void display() {\r\n System.out.println(\"<<Person>>>\" + this); \r\n }",
"public String show() {\n\t\treturn null;\r\n\t}",
"private void notifySelectedUser() {\n\t\tfinal GHAGridRecord<SSOUser> selectedRecord = grid.getSelectedRecord();\n\t\tif (selectedRecord == null) {\n\t\t\tGHAErrorMessageProcessor.alert(\"record-not-selected\");\n\t\t\treturn;\n\t\t}\n\t\tnotifyUser(selectedRecord.toEntity());\n\t\thide();\n\t}",
"public String show() {\r\n\t\treturn \"show\";\r\n\t}",
"public static void displayStudentRecords() {\n\t\tSystem.out.println(\"Student records in the database are:\");\n\t\tSelectStudentRecords records = new SelectStudentRecords();\n\t\ttry {\n\t\t\tList<Student> studentList = records.selectStudentRecords();\n\t\t\tstudentList.forEach(System.out::println);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public int getCurrentDetailView() {\n return currentDetailView;\n }",
"private void loadCurrentRecord() {\n SharedPreferences recordPreferences = mContext.getSharedPreferences(RECORD_PREFERENCES, Context.MODE_PRIVATE);\n String currentRecordJson = recordPreferences.getString(CURRENT_RECORD_KEY, null);\n if (!TextUtils.isEmpty(currentRecordJson)) {\n mCurrentRecord = mGson.fromJson(currentRecordJson, Record.class);\n }\n }",
"private void selectDetailWithMouse() {\n int selectedRowIndex=jt.convertRowIndexToModel(jt.getSelectedRow());\n String[] choices={\"Update Row\",\"Delete\",\"Cancel\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"Product ID: \"+jtModel.getValueAt(selectedRowIndex, 0).toString()+\"\\n\"+\"Product Name: \"+jtModel.getValueAt(selectedRowIndex,1), \"View Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n tfPaintId.setText(jtModel.getValueAt(selectedRowIndex,0).toString());\n tfName.setText(jtModel.getValueAt(selectedRowIndex, 1).toString());\n tfPrice.setText(jtModel.getValueAt(selectedRowIndex, 2).toString());\n tfColor.setText(jtModel.getValueAt(selectedRowIndex, 3).toString());\n tfQuantity.setText(jtModel.getValueAt(selectedRowIndex, 8).toString());\n rwCombo.setSelectedItem(jtModel.getValueAt(selectedRowIndex, 4));\n typeCombo.setSelectedItem(jtModel.getValueAt(selectedRowIndex, 6));\n bCombo.setSelectedItem(jtModel.getValueAt(selectedRowIndex, 5));\n switch(jtModel.getValueAt(selectedRowIndex, 7).toString()) {\n case \"High\":\n high.setSelected(true);\n break;\n case \"Mild\":\n mild.setSelected(true);\n break;\n case \"Medium\":\n medium.setSelected(true);\n break;\n }\n }\n else if(option==1)\n {\n jtModel.removeRow(selectedRowIndex);\n JOptionPane.showMessageDialog(rootPane,\" Detail successfully deleted\");\n }\n else \n {\n \n } \n }",
"@Override\n\tpublic boolean showInList()\n\t{\n\t\treturn true;\n\t}",
"void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}",
"@Override\r\n\tpublic String detail() {\n\t\tSystem.out.println(\"detailView.\");\r\n\t\t//javax.servlet.http.HttpSession session=request.getSession();\r\n\t\t//javax.servlet.ServletContext application=request.getServletContext();\r\n\t\t\r\n\t\t//String vId=request.getParameter(\"id\");\r\n\t\tif(!SysFun.isNullOrEmpty(id)) {\r\n\t\t\tLong iId=SysFun.parseLong(id);\r\n\t\t\tHeadLine bean=headLineService.load(iId);\r\n\t\t\tif(bean!=null) {\r\n\t\t\t\trequest.put(\"bean\", bean);\r\n\t\t\t\treturn \"detail\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"detail\";\r\n\t}",
"public void showInvoiceNo(){\n\t}",
"String searchBoxUserRecordSelected();",
"@Override\r\n\tpublic void showAccount() {\n\t\t\r\n\t}",
"private void displayCurrentPicture() {\r\n\t\tglobalContainer.setWidget(0, 0, getCurrentPicture());\r\n\t}",
"@FXML\n private void viewSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"View DonorReceiver\");\n } else {\n ViewProfilePaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.VIEW);\n }\n }",
"@Override\n\t\t\tpublic void onClick()\n\t\t\t{\n\t\t\t\tretrieveProjectAndObject(dccdHit);\n\t\t\t\t// Note: could also give selected entity object!\n\t\t\t\tString selectedEntityId = object.getId();\n\n\t\t\t\tsetResponsePage(new ProjectViewPage(project, selectedEntityId));\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick()\n\t\t\t{\n\t\t\t\tretrieveProjectAndObject(dccdHit);\n\t\t\t\t// Note: could also give selected entity object!\n\t\t\t\tString selectedEntityId = object.getId();\n\n\t\t\t\tsetResponsePage(new ProjectViewPage(project, selectedEntityId));\n\t\t\t}",
"public void displayActionItemScreen() throws SQLException, ClassNotFoundException {\n String item = console_actionItemList.getSelectionModel().getSelectedItem();\n all_teams();\n all_members();\n if(item != null && !item.isEmpty())\n getAction_Name().setDisable(true);\n actionItemClass obj = new actionItemClass();\n obj.displayActionItemScreen(this,item);\n }",
"@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}",
"@FXML\n private void editSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"Edit DonorReceiver\");\n } else {\n EditPaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.EDIT);\n }\n }",
"public void consoleSelectItem() throws SQLException{\n System.out.println(\"came here\");\n ConsoleClass obj = new ConsoleClass();\n String item = console_actionItemList.getSelectionModel().getSelectedItem();\n obj.consoleSelectItem(this,item);\n }",
"public void displayNextRecord(){\r\n\r\n // inc in recordNumber to display next person info, already stored in personsList during search \r\n\trecordNumber++;\r\n\r\n\tif(recordNumber >= personsList.size())\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"You have reached at end of search results\"); \r\n\r\n\t\t/*if user has reached the end of results, disable froward button*/\r\n\t\tbForward.setEnabled(false);\r\n\t\tbBack.setEnabled(true);\r\n\r\n // dec by one to counter last inc\r\n recordNumber -- ; \r\n\t}\r\n\telse\r\n\t{\r\n\t\tbBack.setEnabled(true);\r\n\t\tPersonInfo person = (PersonInfo) personsList.get(recordNumber);\r\n\r\n // displaying search record in text fields \r\n\t\ttfName.setText(person.getName());\r\n\t\ttfAddress.setText(person.getAddress());\r\n\t\ttfPhone.setText(\"\"+person.getPhone());\r\n\t\ttfEmail.setText(person.getEmail());\r\n\t}\r\n}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void show() {\n\t\t\r\n\t}",
"public String getRecord() {\n\t\tif (null != this.record) {\n\t\t\treturn this.record;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"record\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tshowNote((Note)v.getTag());//查看这条记录\n\t\t\t\t}",
"@FXML \n public void handleSelected() throws Exception{\n \n TablePosition pos = (TablePosition) table.getSelectionModel().getSelectedCells().get(0);\n int index = pos.getRow();\n String selected = table.getItems().get(index).toString();\n String sn = selected.substring(0, selected.indexOf(\",\"));\n String cc =selected.substring(selected.indexOf(\",\")+1, selected.length());\n \n StudentMarkClick.Activate(sn, cc, lastclicked);\n //switch to detail view\n content.getChildren().clear();\n content.getChildren().add(FXMLLoader.load(getClass().getResource(\"viewMarks.fxml\")));\n \n //selected = selected.substring(1, selected.indexOf(\",\")); //only get username\n System.out.println(sn+\"|\"+cc); \n \n }",
"public void showHistoryAction(boolean selected) {\n\t\tif (selected == true) {\n\t\t\tanimalDetailPanel.showHistoryShiftPane();\n\t\t\tfillAnimalDetailTable();\n\t\t}\n\t}",
"public void showSelectedItemScreen(Item item){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/SelectedItemScreen.fxml\"));\n AnchorPane janela = (AnchorPane) loader.load();\n \n Stage equippedItemsStage = new Stage();\n equippedItemsStage.setTitle(\"Item info\");\n equippedItemsStage.initModality(Modality.WINDOW_MODAL);\n equippedItemsStage.initOwner(primaryStage);\n Scene scene = new Scene(janela);\n equippedItemsStage.setScene(scene);\n \n SelectedItemScreenController controller = loader.getController();\n controller.setGame(this, item);\n \n equippedItemsStage.showAndWait();\n }catch(IOException e){\n }\n }",
"public Ward getSelected() {\n\t\treturn table.getSelectionModel().getSelectedItem();\n\t}",
"public void show() {\r\n\t\ttry {\r\n\t\t\tdisplayTable();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Show Table SQL Exception: \" + e.getMessage());\r\n\t\t}\r\n\t}",
"private void viewActiveCourseList() {\n boolean detailed = yesNoQuestion(\"Would you like to look at the detailed version? (just names if no)\");\n\n System.out.println(\"The current active courses are:\\n \");\n for (int i = 0; i < activeCourseList.size(); i++) {\n if (detailed) {\n System.out.println((i + 1) + \":\");\n detailedCoursePrint(activeCourseList.get(i));\n } else {\n System.out.println((i + 1) + \": \" + activeCourseList.get(i).getName());\n }\n }\n\n }",
"@Override\r\n\tpublic List<SbiBank> DisplayingRecord() {\n\t\tTransaction tx=null;\r\n\t\tSession ses=HBNutility.getSession();\r\n\t\ttx=ses.beginTransaction();\r\n\t\tCriteria ct=ses.createCriteria(SbiBank.class);\r\n\t\tList<SbiBank> sb=ct.list();\r\n\t\treturn sb;\r\n\t}",
"public void show() {\r\n\t\tshowMembers();\r\n\t\tshowFacilities();\r\n\t}",
"void showPatients() {\n\t\t\t\n\t}",
"public void show() {\n numberList.show();\n }",
"private void select(ActionEvent e){\r\n // Mark this client as an existing client since they are in the list\r\n existingClient = true;\r\n // To bring data to Management Screen we will modify the text fields\r\n NAME_FIELD.setText(client.getName());\r\n ADDRESS_1_FIELD.setText(client.getAddress1());\r\n ADDRESS_2_FIELD.setText(client.getAddress2());\r\n CITY_FIELD.setText(client.getCity());\r\n ZIP_FIELD.setText(client.getZip());\r\n COUNTRY_FIELD.setText(client.getCountry());\r\n PHONE_FIELD.setText(client.getPhone());\r\n // client.setAddressID();\r\n client.setClientID(Client.getClientID(client.getName(), client.getAddressID()));\r\n // Pass client information to Client Management Screen\r\n currClient = client;\r\n back(e);\r\n }",
"@Override\n\tvoid showSelectedItemInfo(int selectedIndex) {\n\n\t\tJSONObject nJsonObject = mCurArray.optJSONObject(0).optJSONArray(\"list\").optJSONObject(selectedIndex);\n\t\tmDxCountTextView.setText(nJsonObject.optString(\"data\"));\n\t\tnJsonObject = mCurArray.optJSONObject(1).optJSONArray(\"list\").optJSONObject(selectedIndex);\n\t\tmZyCountTextView.setText(nJsonObject.optString(\"data\"));\n\t\tmTimeTextView.setText(nJsonObject.optString(\"date\") + \" \" + nJsonObject.optString(\"day\"));\n\t}",
"public static void display_student() {\n\t\t\n\n \n\t\n\ttry {\n\t\t//jdbc code\n\t\tConnection connection=Connection_Provider.creatC();\t\t\n\n\t\tString q=\"select * from students\";\n\t\t// Create Statement\n\t\tStatement stmt=connection.createStatement();\n\t\tResultSet result=stmt.executeQuery(q);\n\t\twhile (result.next()) {\n\t\t\tSystem.out.println(\"Student id \"+result.getInt(1));\n\t\t\tSystem.out.println(\"Student Name \"+result.getString(2));\n\t\t\tSystem.out.println(\"Student Phone No \"+result.getInt(3));\n\t\t\tSystem.out.println(\"Student City \"+result.getString(4));\n\t\t\tSystem.out.println(\"=========================================\");\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\t\t\n\t}",
"public void display () {\n super.display ();\n if (joined == true) {\n System.out.println(\"Staff name: \"+staffName+\n \"\\nSalary: \"+salary+\n \"\\nWorking hour: \"+workingHour+\n \"\\nJoining date: \"+joiningDate+\n \"\\nQualification: \"+qualification+\n \"\\nAppointed by: \"+appointedBy);\n }\n }",
"public String getCurrentItem() {\n\t\treturn currentItem;\n\t}",
"private void cbo_iniNameItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbo_iniNameItemStateChanged\n if(listLoaded) {\n String sql = \"select * from item where iName=?\";\n \n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,cbo_iniName.getSelectedItem().toString());\n rs = pst.executeQuery();\n rs.next(); //Move resultset to the first pointer\n\n txt_iniId.setText(rs.getString(1));\n\n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item details cannot be found\");\n }finally {\n try{\n rs.close();\n pst.close();\n }catch(Exception e) {}\n }\n }\n }",
"public void saveCurrentRecord() {\n ThreadUtil.executeOnNewThread(new Runnable() {\n @Override\n public void run() {\n SharedPreferences recordPreferences = mContext.getSharedPreferences(RECORD_PREFERENCES, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = recordPreferences.edit();\n if (mCurrentRecord == null) {\n editor.putString(CURRENT_RECORD_KEY, null);\n } else {\n String recordJson = mGson.toJson(mCurrentRecord);\n editor.putString(CURRENT_RECORD_KEY, recordJson);\n }\n editor.apply();\n\n if (mCurrentRecord != null) {\n saveRecord(mCurrentRecord);\n }\n }\n });\n }",
"public void lectureDetails() {\n\n try {\n String sql = \"SELECT eid as 'Employee ID', lectur_name as 'Lecturer Name', faculty as 'Faculty', department as 'Department', center as 'Center', building as 'Building', lec_level as 'Level', lec_rank as 'Rank' FROM lecturer\";\n pst = con.prepareStatement(sql);\n res = pst.executeQuery();\n\n lectDetails.setModel(DbUtils.resultSetToTableModel(res));\n\n } catch (SQLException ex) {\n Logger.getLogger(lecturers_mgmt.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void Display()\r\n \t{\r\n\t SimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\r\n\t try{\r\n\t\t txtID.setText(rsTution.getString(1));\r\n\t\t txtName.setText(rsTution.getString(2));\r\n\t\t txtYear.setText(rsTution.getString(3));\r\n\t\t txtMonth.setText(rsTution.getString(4));\r\n\t\t txtPDate.setText(sdf.format(rsTution.getDate(5)));\r\n\t\t txtFees.setText(rsTution.getString(6));\r\n\r\n\t }catch(SQLException sqle)\r\n\t {System.out.println(\"Display Error:\"+sqle);\r\n\t }\r\n \t}",
"private void selected(ListSelectionEvent e) {\n\t\tProject project = (Project) list.getSelectedValue();\n\t\tif (project != null) {\n\t\t\tinfo.setText(\"Description: \" + project.getDescription());\n\t\t} else {\n\t\t\tinfo.setText(\"Description: \");\n\t\t}\n\t}",
"public void actionPerformed(boolean showSQL) {\n String selection = (String)this.getSelectedItem();\n\n try {\n String cursorId = \"\";\n \n if (selection.equals(\"MTS Dispatchers\")) { \n cursorId = \"dispatchers.sql\";\n }\n \n if (selection.equals(\"MTS Shared Servers\")) {\n cursorId = \"sharedServers.sql\";\n }\n\n Cursor myCursor = new Cursor(cursorId,true);\n Parameters myPars = new Parameters();\n ExecuteDisplay.executeDisplay(myCursor,myPars, scrollP, statusBar, showSQL, resultCache, true);\n }\n catch (Exception e) {\n ConsoleWindow.displayError(e,this);\n }\n }",
"public IEntry getSelectedEntry()\n {\n return selectedEntry;\n }",
"public frmFanArtist() {\n setTitle(\"Fan Your Artist!\");\n initComponents();\n FanController.updateFormData(slctArtist, jTable1);\n jTable1.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n public void valueChanged(ListSelectionEvent event) {\n // do some actions here, for example\n // print first column value from selected row\n try{\n System.out.println(jTable1.getValueAt(jTable1.getSelectedRow(), 1).toString());\n formArtist = (Artist) jTable1.getValueAt(jTable1.getSelectedRow(), 1);\n \n updateData();\n }\n catch(Exception e){\n \n }\n }\n });\n }"
] | [
"0.6353002",
"0.63041836",
"0.6277208",
"0.6223154",
"0.6172879",
"0.60970414",
"0.60651577",
"0.60206395",
"0.6002706",
"0.5992625",
"0.59198856",
"0.5909685",
"0.58585304",
"0.5856723",
"0.5767907",
"0.57591283",
"0.5757797",
"0.57364017",
"0.5732765",
"0.573127",
"0.5711544",
"0.5694152",
"0.5690398",
"0.5686173",
"0.5680595",
"0.5623585",
"0.5600146",
"0.55983627",
"0.5588595",
"0.55848354",
"0.55738324",
"0.5560273",
"0.55554205",
"0.5537105",
"0.5532409",
"0.55315024",
"0.5526966",
"0.55266416",
"0.5514144",
"0.54986805",
"0.54984146",
"0.5498143",
"0.54944754",
"0.54827976",
"0.5469794",
"0.54687774",
"0.54664075",
"0.54654384",
"0.54576516",
"0.5454768",
"0.54441583",
"0.5435672",
"0.5434817",
"0.5422704",
"0.54210997",
"0.5415751",
"0.5409063",
"0.5401545",
"0.5392951",
"0.5377812",
"0.5369882",
"0.53655577",
"0.53539103",
"0.5350471",
"0.534919",
"0.534919",
"0.53474665",
"0.53474045",
"0.53466094",
"0.5344262",
"0.5335566",
"0.5328931",
"0.5319939",
"0.5319939",
"0.5319939",
"0.5318636",
"0.53142995",
"0.53075325",
"0.5302351",
"0.5299971",
"0.52893883",
"0.5288966",
"0.5287993",
"0.52827156",
"0.5282099",
"0.52790254",
"0.5277021",
"0.5265404",
"0.5257558",
"0.52527916",
"0.5248285",
"0.52460825",
"0.52428293",
"0.5226706",
"0.52259743",
"0.5219522",
"0.5218163",
"0.5217984",
"0.5216821",
"0.5214344",
"0.5207661"
] | 0.0 | -1 |
Setting Student Name, Phone Number, Class into TextView after done all process . | @Override
protected void onPostExecute(Void result)
{
NAME.setText(NameHolder);
PHONE_NUMBER.setText(NumberHolder);
CLASS.setText(ClassHolder);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void fillInCurrentStudentInfo() {\n // Extract info from Student object\n String name = WordUtils.capitalizeFully(mCurrentStudent.getName());\n int sex = mCurrentStudent.getSex();\n mStudentBirthdate = mCurrentStudent.getBirthdate();\n int grade = mCurrentStudent.getGrade();\n mChosenClassesList = (ArrayList<String>) mCurrentStudent.getClasses();\n String classes = TextUtils.join(\", \", mChosenClassesList);\n String photoUrl = mCurrentStudent.getPhotoUrl();\n\n // Populate views with the current student's information\n mStudentNameEditText.setText(name);\n mStudentBirthdateTextView.setText(DateUtils.convertDateLongToString(mStudentBirthdate));\n mStudentGradeEditText.setText(String.valueOf(grade));\n mStudentClassesTextView.setText(classes);\n mStudentClassesTextView.setVisibility(View.VISIBLE);\n\n // Set student photo (if it exists)\n if (!TextUtils.isEmpty(photoUrl)) {\n Glide.with(mAddPhotoView.getContext())\n .load(photoUrl)\n .into(mAddPhotoView);\n studentHasPhoto = true;\n }\n\n // Set student sex spinner\n switch (sex) {\n case SEX_MALE_INT:\n mStudentSexSpinner.setSelection(SEX_MALE_INT);\n break;\n case SEX_FEMALE_INT:\n mStudentSexSpinner.setSelection(SEX_FEMALE_INT);\n break;\n default:\n throw new IllegalArgumentException(\"Invalid sex\");\n }\n }",
"private void populateTextViews() {\n full_name_tv.setText(contact.getFullName());\n school_tv.setText(contact.getSchool());\n department_tv.setText(getDepartmentString());\n email.setText(contact.getEmail());\n number_tv.setText(contact.getNumber());\n }",
"@Override\n public void onClick(View v) {\n Cursor c=myDatabase.queryStudent();\n if (c!=null){\n StringBuilder sb=new StringBuilder();\n //that means there\n while (c.moveToNext()){\n int sno=c.getInt(0);\n String sname=c.getString(1);\n String scourse=c.getString(2);\n sb.append(sno+\":\"+sname+\":\"+scourse+\"\\n\");\n }\n //let us apply on textview\n tv.setText(sb.toString());\n }\n }",
"public void populateDetails() {\n\n txtpn_NameHeading.setText(selStudent.getfName() + \" \" + selStudent.getlName());\n\n txtpn_RacesComplete.setText(String.valueOf(dataCur.countNumberRaces(selStudent.getId())));\n txtpn_DaysAbsent.setText(String.valueOf(selStudent.getAttend()));\n txtpn_AgeGroup.setText(String.valueOf(selStudent.getAge()));\n\n }",
"@Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Student ss = dataSnapshot.getValue(Student.class);\n String name = ss.getName();\n int marks = ss.getMarks();\n\n String displayStr = name + \"|\" + marks;\n txt.setText(displayStr);\n\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == 1) {\n\t\t\tname_of_teacher.setText(data.getStringExtra(\"teacherName\"));\n\t\t\tname_of_teacher.setTag(data.getStringExtra(\"uuid\"));\n\t\t} else if (requestCode == 2) {\n\t\t\tname_of_class.setText(data.getStringExtra(\"className\"));\n\t\t\tname_of_class.setTag(data.getStringExtra(\"uuid\"));\n\t\t}\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}",
"private void fillData() {\n\tparname.setText(UpStudentController.getName());\r\n\tparphone.setText(UpStudentController.getPhone());\r\n\tparmail.setText(UpStudentController.getMail());\r\n\taddres.setText(UpStudentController.getAdr());\r\n\tlocation.setText(UpStudentController.getLoc());\r\n\tkazi.setText(UpStudentController.getOc());\r\n\ttaifa.setText(UpStudentController.getNat());\r\n\t}",
"private void initView() {\n mPhone = (TextView) findViewById(R.id.user_phone_d);\n // mMajor = (TextView) findViewById(R.id.major);\n mYearin= (TextView) findViewById(R.id.year_in);\n mNickname = (TextView) findViewById(R.id.user_name_input);\n sex = (TextView)findViewById(R.id.user_gender);\n mLocal =(TextView)findViewById(R.id.user_local);\n mBirthday =(TextView)findViewById(R.id.user_birthday);\n mLastLogin =(TextView)findViewById(R.id.user_lastlogintime);\n mUserId =(TextView)findViewById(R.id.user_id);\n\n tPhone =(TextView)findViewById(R.id.user_phone);\n tYear =(TextView)findViewById(R.id.user_id_card);\n }",
"private void setUpTextViews() {\n // Find views\n TextView userName0 = (TextView) findViewById(R.id.user_name_0);\n TextView userInfo0 = (TextView) findViewById(R.id.user_info_0);\n TextView userName1 = (TextView) findViewById(R.id.user_name_1);\n TextView userInfo1 = (TextView) findViewById(R.id.user_info_1);\n TextView userName2 = (TextView) findViewById(R.id.user_name_2);\n TextView userInfo2 = (TextView) findViewById(R.id.user_info_2);\n\n // Set text\n userName0.setText(mGroupMembers.get(0).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo0.setText(mGroupMembers.get(0).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(0).getString(ParseConstants.KEY_HOMETOWN)));\n\n userName1.setText(mGroupMembers.get(1).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo1.setText(mGroupMembers.get(1).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(1).getString(ParseConstants.KEY_HOMETOWN)));\n\n userName2.setText(mGroupMembers.get(2).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo2.setText(mGroupMembers.get(2).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(2).getString(ParseConstants.KEY_HOMETOWN)));\n }",
"private void displayContactDetails() {\n bindTextViews();\n populateTextViews();\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n className.add(\"Class\");\n\n sectionName.add(\"Section\");\n\n setContentView(R.layout.student_signup);\n\n LinearLayout activityLayout = (LinearLayout) findViewById(R.id.mLayout);\n\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n activityLayout.setLayoutParams(lp);\n activityLayout.setOrientation(LinearLayout.VERTICAL);\n\n\n ViewGroup.LayoutParams tlp = new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.WRAP_CONTENT);\n\n\n mOutputText = new TextView(this);\n mOutputText.setLayoutParams(tlp);\n mOutputText.setPadding(16, 16, 16, 16);\n mOutputText.setVerticalScrollBarEnabled(true);\n mOutputText.setMovementMethod(new ScrollingMovementMethod());\n mOutputText.setText(\n \" \");\n activityLayout.addView(mOutputText);\n\n mProgress = new ProgressDialog(this);\n mProgress.setMessage(\"Loading ...\");\n mProgress.setCanceledOnTouchOutside(false);\n\n setContentView(activityLayout);\n lastNameEditText = (EditText) findViewById(R.id.Student_LName);\n lastNameEditText.addTextChangedListener(watch);\n\n\n\n\n Spinner spin = (Spinner) findViewById(R.id.spinner_department);\n spin.setOnItemSelectedListener(this);\n\n // Initialize credentials and service object.\n mCredential = GoogleAccountCredential.usingOAuth2(\n getApplicationContext(), Arrays.asList(SCOPES))\n .setBackOff(new ExponentialBackOff());\n\n getResultsFromApi();\n\n }",
"public void setTxtViews(){\n \tupdateTextView(\"Phil Simms\", \"txtPatientName\");\n \tupdateTextView(\"Male\", \"txtPatientGender\");\n \tupdateTextView(\"24\", \"txtPatientAge\");\n \tupdateTextView(\"13\", \"txtPatientRoom\");\n \tupdateTextView(\"Melanoma\", \"txtPatientDiagnosis\");\n \tupdateTextView(\"165\", \"txtPatientWeight\");\n \tupdateTextView(\"10am: Gave tylenol for headache.\", \"txtPatientRecentActions\");\n \tupdateTextView(\"Beach\", \"txtPatientNotes\");\n }",
"public void updateViews() {\n textView.setText(contactName);\n\n }",
"private void SaveStudentInfo() {\n EditText _fullName = (EditText) findViewById(R.id.editTextFullName);\n EditText _birthdate = (EditText) findViewById(R.id.dateBirthday);\n EditText _fullStreetAddress = (EditText) findViewById(R.id.editTextFullAddress);\n EditText _contactPhone = (EditText) findViewById(R.id.editTextContactPhone);\n EditText _contactEmail = (EditText) findViewById(R.id.editTextContactEmail);\n EditText _parentNames = (EditText) findViewById(R.id.editTextParentNames);\n EditText _defaultRate = (EditText) findViewById(R.id.numberRate);\n EditText _notes = (EditText) findViewById(R.id.editTextNotes);\n\n // ***** Create the Student Object\n Student _student = new Student();\n\n // ***** Set the field values\n _student.fullName = String.valueOf(_fullName.getText());\n _student.birthDate = String.valueOf(_birthdate.getText());\n _student.fullAddress = String.valueOf(_fullStreetAddress.getText());\n _student.contactPhone = String.valueOf(_contactPhone.getText());\n _student.contactEmail = String.valueOf(_contactEmail.getText());\n _student.parentNames = String.valueOf(_parentNames.getText());\n\n // ***** Convert to a double to store in database for calulations\n _student.defaultRate = Double.valueOf(String.valueOf(_defaultRate.getText()));\n\n _student.notes = String.valueOf(_notes.getText());\n\n // **** Save the student information\n _myDb.setStudentInfo(_student);\n\n\n }",
"private void PopulateStudentInfo(int Id) {\n Student _student = _myDb.getStudentInfoById(Id);\n\n // ***** Build the fields for the data to update\n EditText _fullName = (EditText) findViewById(R.id.editTextFullName);\n EditText _birthdate = (EditText) findViewById(R.id.dateBirthday);\n EditText _fullStreetAddress = (EditText) findViewById(R.id.editTextFullAddress);\n EditText _contactPhone = (EditText) findViewById(R.id.editTextContactPhone);\n EditText _contactEmail = (EditText) findViewById(R.id.editTextContactEmail);\n EditText _parentNames = (EditText) findViewById(R.id.editTextParentNames);\n EditText _defaultRate = (EditText) findViewById(R.id.numberRate);\n EditText _notes = (EditText) findViewById(R.id.editTextNotes);\n\n // ***** Set the field values\n _fullName.setText(_student.fullName);\n _birthdate.setText(_student.birthDate);\n _fullStreetAddress.setText(_student.fullAddress);\n _contactPhone.setText(_student.contactPhone);\n _contactEmail.setText(_student.contactEmail);\n _parentNames.setText(_student.parentNames);\n\n // ***** Convert to a string from Display\n _defaultRate.setText(String.valueOf(_student.defaultRate));\n _notes.setText(_student.notes);\n\n }",
"private void drawStudentViews() {\n Dimensions dimsNum = dimensionsContainer.findDimensions(KEY_NUM_LEFT);\n Dimensions dimsName = dimensionsContainer.findDimensions(KEY_NAME_LEFT);\n Integer iPref = Integer.valueOf(PrefsManager.getInstance(mainContext).getPrefs()\n .getString(PrefsManager.PREFS_BLANK_NAME_FORMAT,\n \"0\"));\n String str;\n BlankTagHandler tagHandler;\n if ((studentList != null) && (!studentList.isEmpty())) {\n for (int i = 0; i < studentList.size(); i++) {\n //Add LayoutLeft\n LinearLayout layoutLeft = new LinearLayout(mainContext);\n layoutLeft.setOrientation(LinearLayout.HORIZONTAL);\n layoutLeft.setLayoutParams(layoutParams_WC_WC);\n bodyLeftLayout.addView(layoutLeft);\n //Add numBody\n TextView numBody = new TextView(mainContext);\n numBody.setText(String.valueOf(i + 1));\n dimsNum.setStyle(numBody);\n numBody.setTag(\n new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_num_body));\n numBody.setClickable(true);\n numBody.setOnClickListener(generalClickListener);\n layoutLeft.addView(numBody);\n //Add nameBody\n TextView nameBody = new TextView(mainContext);\n int formatId;\n if ((studentList.get(i).getMiddleName() == null)\n || ((studentList.get(i).getMiddleName().equals(\"\")))) {\n if (iPref == 0) { formatId = 4; } else formatId = 3;\n } else { formatId = iPref; }\n switch (formatId) {\n case 0:\n str = String.format(\"%s %c.%c.\",\n studentList.get(i).getLastName(),\n studentList.get(i).getFirstName().charAt(0),\n studentList.get(i).getMiddleName().charAt(0));\n break;\n case 1:\n str = String.format(\"%s %s %s\",\n studentList.get(i).getLastName(),\n studentList.get(i).getFirstName(),\n studentList.get(i).getMiddleName());\n break;\n case 2:\n str = String.format(\"%s %s %c.\", studentList.get(i).getLastName(),\n studentList.get(i).getFirstName(),\n studentList.get(i).getMiddleName().charAt(0));\n break;\n case 3:\n str = String.format(\"%s %s\", studentList.get(i).getLastName(),\n studentList.get(i).getFirstName());\n break;\n case 4:\n str = String.format(\"%s %c.\", studentList.get(i).getLastName(),\n studentList.get(i).getFirstName().charAt(0));\n break;\n default:\n str = \"err\";\n }\n nameBody.setText(str);\n dimsName.setStyle(nameBody);\n setClickableView(nameBody, dimsName.getBgColor());\n //nameBody.setMinHeight(Dimensions.dipToPixels(mainContext,48));\n //Add tagHandler\n tagHandler =\n new BlankTagHandler(BlankTagHandler.CeilType.STUDENT, R.id.blank_name_body);\n tagHandler.setStudentId(studentList.get(i).getId());\n tagHandler.setTextView(nameBody);\n nameBody.setTag(tagHandler);\n //DebugUtils.testStudentCols(nameBody);\n layoutLeft.addView(nameBody);\n\n }\n }\n//Add addRowCeil / Absent Row\n if (studentList == null || studentList.isEmpty() || (classList != null && !classList.isEmpty())\n || (studentList.isEmpty() && summaryEntryList != null &&\n !summaryEntryList.isEmpty())) {\n //Add LayoutLeft\n LinearLayout layoutLeft = new LinearLayout(mainContext);\n layoutLeft.setOrientation(LinearLayout.HORIZONTAL);\n layoutLeft.setLayoutParams(layoutParams_MP_WC);\n //layoutLeft.setX(dims.getViewWidth()+dims.getMarginsLeft()*2);\n layoutLeft.setGravity(Gravity.RIGHT);\n layoutLeft.setBackgroundColor(bgColor_Table);\n bodyLeftLayout.addView(layoutLeft);\n //Add nameBody\n TextView nameBody = new TextView(mainContext);\n //nameBody.setWidth(dims.getViewWidth());\n //nameBody.setGravity(Gravity.CENTER);\n\n Dimensions dimsAbsent = dimensionsContainer.findDimensions(KEY_ABSENT_CEIL);\n dimsAbsent.setStyle(nameBody);\n nameBody.setGravity(Gravity.CENTER);\n int width = 0;\n if (dimsName.getViewWidth() != null) width += dimsName.getViewWidth();\n if (dimsNum.getViewWidth() != null) width += dimsNum.getViewWidth();\n if (width != 0) {\n width += dimsNum.getMarginsLeft() + dimsNum.getMarginsRight();\n nameBody.setWidth(width);\n }\n if (studentList.isEmpty()) {\n nameBody.setText(R.string.symbol_row_add);\n tagHandler = new BlankTagHandler(BlankTagHandler.CeilType.ADD_ROW_CEIL,\n R.id.blank_absent_row);\n setClickableView(nameBody, dimsAbsent.getBgColor());\n } else {\n nameBody.setText(R.string.blank_absent_row);\n tagHandler =\n new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_absent_row);\n nameBody.setClickable(true);\n nameBody.setOnClickListener(generalClickListener);\n }\n tagHandler.setTextView(nameBody);\n nameBody.setTag(tagHandler);\n layoutLeft.addView(nameBody);\n }\n\n }",
"private void updateNameView() {\n String insertedText = getName();\n\n if (seekBar.getProgress() == 0) {\n insertedText = \"\";\n }\n\n String text = String.format(res.getString(R.string.str_tv_firstName_value), insertedText);\n\n nameView.setText(text);\n }",
"private void setEditTextView(person selected_person) {\n\n textView_name = (EditText) findViewById(R.id.edit_name);\n textView_date = (EditText) findViewById(R.id.edit_date);\n textView_neck = (EditText) findViewById(R.id.edit_neck);\n textView_bust = (EditText) findViewById(R.id.edit_bust);\n textView_chest = (EditText) findViewById(R.id.edit_chest);\n textView_waist = (EditText) findViewById(R.id.edit_waist);\n textView_hip = (EditText) findViewById(R.id.edit_hip);\n textView_inseam = (EditText) findViewById(R.id.edit_inseam);\n textView_comment = (EditText) findViewById(R.id.edit_comment);\n\n String neck = selected_person.getNeck() == 0.0 ? \"\" : String.valueOf(selected_person.getNeck());\n String bust = selected_person.getBust() == 0.0 ? \"\" : String.valueOf(selected_person.getBust());\n String chest = selected_person.getChest() == 0.0 ? \"\" : String.valueOf(selected_person.getChest());\n String waist = selected_person.getWaist() == 0.0 ? \"\" : String.valueOf(selected_person.getWaist());\n String hip = selected_person.getHip() == 0.0 ? \"\" : String.valueOf(selected_person.getHip());\n String inseam = selected_person.getInseam() == 0.0 ? \"\" : String.valueOf(selected_person.getInseam());\n\n textView_name.setText(selected_person.getName());\n textView_date.setText(selected_person.getDate());\n textView_neck.setText(String.valueOf(neck));\n textView_bust.setText(String.valueOf(bust));\n textView_chest.setText(String.valueOf(chest));\n textView_waist.setText(String.valueOf(waist));\n textView_hip.setText(String.valueOf(hip));\n textView_inseam.setText(String.valueOf(inseam));\n textView_comment.setText(selected_person.getComment());\n }",
"private void prepareInformation() {\r\n TextView textDate = findViewById(R.id.textDate);\r\n String date = event.getStartDateFormatted() + \" - \" + event.getEndDateFormatted();\r\n textDate.setText(date);\r\n\r\n TextView textNumber = findViewById(R.id.textNumber);\r\n textNumber.setText(event.contactNumber);\r\n\r\n TextView textWebsite = findViewById(R.id.textWebsite);\r\n textWebsite.setText(event.homePage);\r\n\r\n TextView textMail = findViewById(R.id.textMail);\r\n textMail.setText(event.mail);\r\n\r\n TextView textDescription = findViewById(R.id.textDescription);\r\n textDescription.setText(event.description);\r\n }",
"private void initCreateAccountTextView() {\n TextView textViewCreateAccount = (TextView) findViewById(R.id.textViewLogin);\n textViewCreateAccount.setText(fromHtml(\"<font color='#000000'>Sudah Memiliki Akun ? </font><font color='#03A9F4'>Login</font>\"));\n textViewCreateAccount.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(daftar.this, activity_login.class);\n startActivity(intent);\n }\n });\n }",
"public void setUpdateData() {\n if (updateTypestr.equalsIgnoreCase(\"Family\")) {\n addStudentScreenBinding.familyNameLinear.setVisibility(View.GONE);\n addStudentScreenBinding.addStudentTxt.setText(\"Update Family\");\n addStudentScreenBinding.classTypeGroup.setVisibility(View.GONE);\n addStudentScreenBinding.emailEdt.setVisibility(View.VISIBLE);\n addStudentScreenBinding.emailEdt.setText(eAstr);\n addStudentScreenBinding.emailEdt.setEnabled(false);\n addStudentScreenBinding.phoneNoEdt.setVisibility(View.VISIBLE);\n addStudentScreenBinding.phoneNoEdt.setText(pNstr);\n\n } else {\n addStudentScreenBinding.addStudentTxt.setText(\"Update Contact\");\n addStudentScreenBinding.firstNameEdt.setText(fNstr);\n addStudentScreenBinding.lastNameEdt.setText(lNstr);\n addStudentScreenBinding.familynameTxt.setText(familyNameStr);\n addStudentScreenBinding.dateOfBirthEdt.setText(dobstr);\n if (cnIdstr.equalsIgnoreCase(\"Child\")) {\n addStudentScreenBinding.childChk.setChecked(true);\n } else if (cnIdstr.equalsIgnoreCase(\"Spouse\")) {\n addStudentScreenBinding.spouseChk.setChecked(true);\n }\n addStudentScreenBinding.lastNameEdt.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {\n if (i == EditorInfo.IME_ACTION_NEXT) {\n InputMethodManager imm = (InputMethodManager) textView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(textView.getWindowToken(), 0);\n\n addStudentScreenBinding.dateOfBirthEdt.requestFocus();\n }\n return false;\n }\n });\n }\n addStudentScreenBinding.registerBtn.setText(\"Update\");\n addStudentScreenBinding.firstNameEdt.setText(fNstr);\n addStudentScreenBinding.lastNameEdt.setText(lNstr);\n String[] splitdate = dobstr.split(\"\\\\s+\");\n addStudentScreenBinding.dateOfBirthEdt.setText(splitdate[0]);\n\n if (gIdstr.equalsIgnoreCase(\"1\")) {\n addStudentScreenBinding.maleChk.setChecked(true);\n } else {\n addStudentScreenBinding.femaleChk.setChecked(true);\n }\n }",
"public void showFirstName() {\n Cursor cursor = db.firstName();\n if (cursor.getCount() > 0) {\n while (cursor.moveToNext()) {\n firstName.setText(cursor.getString(cursor.getColumnIndex(\"firstName\")));\n }\n } else {\n Toast.makeText(getApplicationContext(), \"NO DATA\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void setView(View row){\n TextView uid = row.findViewById(R.id.user_uid);\n TextView name = row.findViewById(R.id.user_name);\n TextView agender = row.findViewById(R.id.user_agender);\n\n uid.setText(\"UID: \" + this.id);\n name.setText(this.name);\n agender.setText(this.gender + \", DOB: \" + this.dob);\n }",
"private void display() {\n TextView textview = (TextView) findViewById(R.id.textView);\n EditText editText = (EditText) findViewById(R.id.editNumber) ;\n textview.setText(\"TEXT\");\n editText.setText(\"\");\n\n }",
"private void setupUsernameAndFullNameTextView() {\n usernameTextView.setText(prismUser.getUsername());\n userFullNameText.setText(prismUser.getFullName());\n }",
"public void continueOne(View view){\n EditText firstName= (EditText) findViewById(R.id.firstName);\n String firstNameString = firstName.getText().toString();\n EditText lastName= (EditText) findViewById(R.id.lastName);\n String lastNameString= lastName.getText().toString();\n EditText studentID= (EditText) findViewById(R.id.studentId);\n String studentIDString= studentID.getText().toString();\n\n /**Toasts are the things that are like mini notifications that you'll see at the bottom of the screen.*/\n Context context = getApplicationContext();\n CharSequence text = \"Let's do this, \" + firstNameString + \"!\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n /**The following is an intent to start the next activity (mainCodeOne), and carry the key user data with it. MainActivityOne*/\n Intent intentOne = new Intent(this, AndroidBarcodeActivityOne.class);\n intentOne.putExtra(\"firstNameString\", firstNameString);\n intentOne.putExtra(\"lastNameString\", lastNameString);\n intentOne.putExtra(\"studentIDString\", studentIDString);\n startActivity(intentOne);\n\n\n }",
"public void getInsertedValue() {\n firstNameStr = addStudentScreenBinding.firstNameEdt.getText().toString();\n lastNameStr = addStudentScreenBinding.lastNameEdt.getText().toString();\n emailStr = addStudentScreenBinding.emailEdt.getText().toString();\n passwordStr = addStudentScreenBinding.passwordEdt.getText().toString();\n phonenoStr = addStudentScreenBinding.phoneNoEdt.getText().toString();\n dateofbirthStr = addStudentScreenBinding.dateOfBirthEdt.getText().toString();\n\n for (int i = 0; i < classListInfo.getData().size(); i++) {\n if (updateprofilestr.equalsIgnoreCase(\"true\")) {\n if (updateTypestr.equalsIgnoreCase(\"Family\")) {\n contactTypeIDStr = \"1\";\n } else {\n if (classStr.equalsIgnoreCase(classListInfo.getData().get(i).getContactTypeName())) {\n contactTypeIDStr = classListInfo.getData().get(i).getContactTypeID();\n }\n phonenoStr = pNstr;\n }\n } else {\n phonenoStr = pNstr;\n if (classStr.equalsIgnoreCase(classListInfo.getData().get(i).getContactTypeName())) {\n contactTypeIDStr = classListInfo.getData().get(i).getContactTypeID();\n }\n }\n\n }\n }",
"public void setDetails(){\n\n TextView moviename = (TextView) findViewById(R.id.moviename);\n TextView moviedate = (TextView) findViewById(R.id.moviedate);\n TextView theatre = (TextView) findViewById(R.id.theatre);\n\n TextView seats = (TextView) findViewById(R.id.seats);\n\n moviename.setText(ticket.movieName);\n moviedate.setText(ticket.getMovieDate());\n theatre.setText(ticket.theatreDetails);\n\n seats.setText(ticket.seats);\n }",
"public int updateTextView(String toThis, String name) {\n \tString finalString = \"\";\n \tTextView t;\n \t\n \tif(name.equals(\"txtPatientName\")){\n \t\tt = (TextView) this.findViewById(R.id.txtPatientName);\n \t} \t\n \telse if(name.equals(\"txtPatientGender\")){\n \t\tt = (TextView) this.findViewById(R.id.txtPatientGender);\n \t\tfinalString = \"Gender: \";\n \t}\n \telse if(name.equals(\"txtPatientRoom\")){\n \t\tt = (TextView) this.findViewById(R.id.txtPatientRoom);\n \t\tfinalString = \"Room \";\n \t}\n \telse if(name.equals(\"txtPatientDiagnosis\")){\n \t\tt = (TextView) this.findViewById(R.id.txtPatientDiagnosis);\n \t\tfinalString = \"Diagnosis: \";\n \t}\n \telse if(name.equals(\"txtPatientAge\")){\n \t\tt = (TextView) findViewById(R.id.txtPatientAge);\n \t\tfinalString = \"Age: \";\n \t}\n \telse if(name.equals(\"txtPatientWeight\")){\n \t\tt = (TextView) findViewById(R.id.txtPatientWeight);\n \t\tfinalString = \"Weight: \";\n \t}\n \telse if(name.equals(\"txtPatientRecentActions\")){\n \t\tt = (TextView) findViewById(R.id.txtPatientRecentActions);\n \t\tfinalString = \"Recent Activity: \\n\";\n \t}\n \telse if(name.equals(\"txtPatientNotes\")){\n \t\tt = (TextView) findViewById(R.id.txtPatientNotes);\n \t\tfinalString = \"Nurse Notes: \\n\";\n \t}\n \telse{\n \t\t// Didn't find any text view\n \t\treturn -1;\n \t}\n \t\n \tfinalString = finalString + toThis;\n \tLog.d(\"UpdateTextView \", finalString);\n \n \tt.setText(finalString);\n return 1;\n }",
"public final void collectInfo() {\n LinearLayout linearLayout = (LinearLayout) _$_findCachedViewById(R.id.llName);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout, \"llName\");\n boolean z = false;\n if (linearLayout.getVisibility() == 0) {\n EditText editText = (EditText) _$_findCachedViewById(R.id.etName);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etName\");\n CharSequence text = editText.getText();\n if (text == null || text.length() == 0) {\n showMsg(\"请输入姓名\");\n return;\n }\n }\n LinearLayout linearLayout2 = (LinearLayout) _$_findCachedViewById(R.id.llPsptId);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout2, \"llPsptId\");\n if (linearLayout2.getVisibility() == 0) {\n EditText editText2 = (EditText) _$_findCachedViewById(R.id.etPsptId);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPsptId\");\n CharSequence text2 = editText2.getText();\n if (text2 == null || text2.length() == 0) {\n showMsg(\"请输入身份证号\");\n return;\n }\n EditText editText3 = (EditText) _$_findCachedViewById(R.id.etPsptId);\n Intrinsics.checkExpressionValueIsNotNull(editText3, \"etPsptId\");\n if (!IDCardUtil.checkIDCard(editText3.getText().toString())) {\n showMsg(\"请输入正确的身份证号\");\n return;\n }\n }\n if (checkPhoneNum()) {\n EditText editText4 = (EditText) _$_findCachedViewById(R.id.etVerityCode);\n Intrinsics.checkExpressionValueIsNotNull(editText4, \"etVerityCode\");\n CharSequence text3 = editText4.getText();\n if (text3 == null || text3.length() == 0) {\n z = true;\n }\n if (z) {\n showMsg(\"请输入验证码\");\n return;\n }\n AgreementBar agreementBar = (AgreementBar) _$_findCachedViewById(R.id.agreementBar);\n Intrinsics.checkExpressionValueIsNotNull(agreementBar, \"agreementBar\");\n if (!agreementBar.isCheck()) {\n showMsg(\"请同意协议\");\n return;\n }\n DataMap dataMap = new DataMap();\n EditText editText5 = (EditText) _$_findCachedViewById(R.id.etPhoneNum);\n Intrinsics.checkExpressionValueIsNotNull(editText5, \"etPhoneNum\");\n DataMap dataMap2 = dataMap.set(K.phoneNum, editText5.getText().toString());\n EditText editText6 = (EditText) _$_findCachedViewById(R.id.etVerityCode);\n Intrinsics.checkExpressionValueIsNotNull(editText6, \"etVerityCode\");\n dataMap2.set(K.verifyCode, editText6.getText().toString()).set(K.couponId, this.couponId).set(K.campId, this.campId);\n LinearLayout linearLayout3 = (LinearLayout) _$_findCachedViewById(R.id.llPsptId);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout3, \"llPsptId\");\n if (linearLayout3.getVisibility() == 0) {\n EditText editText7 = (EditText) _$_findCachedViewById(R.id.etPsptId);\n Intrinsics.checkExpressionValueIsNotNull(editText7, \"etPsptId\");\n dataMap.set(K.psptId, editText7.getText().toString());\n }\n LinearLayout linearLayout4 = (LinearLayout) _$_findCachedViewById(R.id.llName);\n Intrinsics.checkExpressionValueIsNotNull(linearLayout4, \"llName\");\n if (linearLayout4.getVisibility() == 0) {\n EditText editText8 = (EditText) _$_findCachedViewById(R.id.etName);\n Intrinsics.checkExpressionValueIsNotNull(editText8, \"etName\");\n dataMap.set(K.custName, editText8.getText().toString());\n }\n CouponGetPresenter couponGetPresenter = (CouponGetPresenter) getPresenter();\n if (couponGetPresenter != null) {\n couponGetPresenter.checkVerify(dataMap);\n }\n }\n }",
"public void showText(View view) {\n EditText editText = findViewById(R.id.editText_main);\n TextView textView = findViewById(R.id.text_phonelabel);\n if (editText != null) {\n // Assign to showString both the entered string and mSpinnerLabel.\n String showString = (editText.getText().toString() +\n \" - \" + mSpinnerLabel);\n // Display a Toast message with showString\n Toast.makeText(this, showString, Toast.LENGTH_SHORT).show();\n // Set the TextView to showString.\n textView.setText(showString);\n }\n }",
"@Override\n\tpublic void onCreate(Bundle icicle) {\n\t\tsuper.onCreate(icicle);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.myclasslayout);\n\t\tthis.getWindow().setSoftInputMode(\n\t\t\t\tWindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n\t\tBundle extras = getIntent().getExtras();\n\t\tglob = (global) getApplication();\n\t\tif (extras == null) {\n\t\t\tToast.makeText(this, \"NO Class Info\", Toast.LENGTH_LONG).show();\n\n\t\t} else {\n\t\t\tci = (ClassInfo) (extras.getSerializable(\"ci\"));\n\t\t\ttv = new EditText[5];\n\t\t\ttv[0] = (EditText) findViewById(R.id.class_name);\n\t\t\ttv[1] = (EditText) findViewById(R.id.prof_name);\n\t\t\ttv[2] = (EditText) findViewById(R.id.time_slot);\n\t\t\ttv[3] = (EditText) findViewById(R.id.ed_books);\n\t\t\ttv[4] = (EditText) findViewById(R.id.subject_name);\n\t\t\tbtns = new Button[4];\n\t\t\tbtns[0] = (Button) findViewById(R.id.btn_exam);\n\t\t\tbtns[1] = (Button) findViewById(R.id.btn_assignment);\n\t\t\tbtns[2] = (Button) findViewById(R.id.btn_quizzez);\n\t\t\tbtns[3] = (Button) findViewById(R.id.btn_test);\n\n\t\t\ttv[0].setText(\" \" + ci.getClassName());\n\t\t\ttv[1].setText(\" \" + ci.getProfessor_name());\n\t\t\ttv[3].setText(\" \"\n\t\t\t\t\t+ (ci.getBooks().toString().replace(\"[\", \"\")).replace(\"]\",\n\t\t\t\t\t\t\t\"\"));\n\t\t\tString s = ci.getTime_slot().toString();\n\t\t\ts = s.replace(\",\", \"\\n\");\n\t\t\ttv[2].setText(\" \" + s);\n\t\t\ttv[4].setText(\" \" + AddClassActivity.subjectname);\n\t\t\ttv[2].setKeyListener(null);\n\t\t}\n\n\t}",
"private void displayDetails(){\n Intent intent=getIntent();\n message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);\n\n // The ArrayList that holds the row data\n ArrayList<Object> row;\n // ask the database manager to retrieve the row with the given rowID\n row = dbHelper.getRowAsArray(message);\n Log.w(\"rows\", row.toString());\n try{\n // update the form fields to hold the retrieved data\n String sn = (String)row.get(0);\n String fn = (String)row.get(1);\n String cn = (String)row.get(2);\n String em= (String)row.get(3);\n String ad = (String)row.get(4);\n\n SnameTextView.setText(sn);\n FnameTextView.setText(fn);\n cellnumbTextView.setText(cn);\n emailsTextView.setText(em);\n homeATextView.setText(ad);\n }catch (Exception e){\n Log.e(\"Retrieve Error\", e.toString());\n e.printStackTrace();\n }\n\n\n Cursor cursor = dbHelper.fetchCountriesByName(message);\n\n // The desired columns to be bound\n String[] columns = new String[] {\n ContactsDbAdapter.KEY_SURNAME,\n ContactsDbAdapter.KEY_NAME,\n ContactsDbAdapter.KEY_CELLNUM,\n ContactsDbAdapter.KEY_EMAILADDR,\n ContactsDbAdapter.KEY_HOMEADDR\n };\n\n // the XML defined views which the data will be bound to\n int[] to = new int[] {\n R.id.FNdetails_text_view,\n R.id.LNdetails_text_view,\n R.id.cellDetails_text_view,\n R.id.EmailDetails_text_view,\n R.id.homedetails_text_view,\n };\n\n // create the adapter using the cursor pointing to the desired data\n //as well as the layout information\n dataAdapter = new SimpleCursorAdapter(\n this, R.layout.activity_details,\n cursor,\n columns,\n to,\n 0);\n\n\n\n\n }",
"public void addStudent(View view) {\n String s1 = regNo.getText().toString();\n String s2 = course.getText().toString();\n String s3 = name.getText().toString();\n String s4 = fname.getText().toString();\n String s5 = mname.getText().toString();\n String s6 = address.getText().toString();\n String s7 = district.getText().toString();\n String s8 = city.getText().toString();\n String s9 = state.getText().toString();\n String s10 = pno.getText().toString();\n String s11 = sex.getText().toString();\n String s12 = dob.getText().toString();\n String s13 = email.getText().toString();\n\n if (validate()) {\n new ExecuteTask().execute(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13);\n } else {\n showToast(\"Enter Valid Credentials\");\n }\n }",
"private void updateText() {\n updateDateText();\n\n TextView weightText = findViewById(R.id.tvWeight);\n TextView lowerBPText = findViewById(R.id.tvLowerBP);\n TextView upperBPText = findViewById(R.id.tvUpperBP);\n\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n\n double weight = mUser.weight.getWeightByDate(mDate.getTime());\n int upperBP = mUser.bloodPressure.getUpperBPByDate(mDate.getTime());\n int lowerBP = mUser.bloodPressure.getLowerBPByDate(mDate.getTime());\n\n weightText.setText(String.format(Locale.getDefault(), \"Paino\\n%.1f\", weight));\n lowerBPText.setText(String.format(Locale.getDefault(), \"AlaP\\n%d\", lowerBP));\n upperBPText.setText(String.format(Locale.getDefault(), \"YläP\\n%d\", upperBP));\n\n ((EditText)findViewById(R.id.etWeight)).setText(\"\");\n ((EditText)findViewById(R.id.etLowerBP)).setText(\"\");\n ((EditText)findViewById(R.id.etUpperBP)).setText(\"\");\n }",
"@Override\n\t\t\tpublic void getText(String string) {\n\t\t\t\tif(layout == R.layout.insert_dialog){\n\t\t \tif ((string != null) && (string.length() != 2)){\n\t\t \t\t\tString[] data = string.split(\" \");\n\t\t \t\t\tif (data.length == 3){\n\t\t \t\t\t\tif (personService.find(data[0]) == null) {\n\t\t\t\t\t\t\t\tPerson person = new Person(data[0], data[1], Integer.valueOf(data[2]));\n\t\t\t\t \t\t\tpersonService.add(person);\n\t\t\t\t \t\t\tToast.makeText(DisplayActivity.this, \"Insert \" + data[0] + \" Successful\", Toast.LENGTH_SHORT).show();\n\t\t\t \t\t\t}else{\n\t\t\t \t\t\t\tToast.makeText(DisplayActivity.this, data[0] + \" exist\", Toast.LENGTH_SHORT).show();\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t \t\t}\n\t\t }else if(layout == R.layout.update_dialog){\n\t\t \tif ((string != null) && (string.length() != 2)){\n\t\t \t\t\tString[] data = string.split(\" \");\n\t\t \t\t\tif (data.length == 3){\n\t\t \t\t\t\tif (personService.find(data[0]) != null) {\n\t\t\t\t\t\t\t\tPerson person = new Person(data[0], data[1], Integer.valueOf(data[2]));\n\t\t\t\t \t\t\tpersonService.update(person);\n\t\t\t\t \t\t\tToast.makeText(DisplayActivity.this, \"Update \" + data[0] + \" Successful\", Toast.LENGTH_SHORT).show();\n\t\t\t \t\t\t}else{\n\t\t\t \t\t\t\tToast.makeText(DisplayActivity.this, data[0] + \" no exist\", Toast.LENGTH_SHORT).show();\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t \t\t}\n\t\t }\n\t\t\t}",
"public void addContactDetails() {\n firstNameField.setText(contact.getFirstName());\n middleNameField.setText(contact.getMiddleName());\n lastNameField.setText(contact.getLastName());\n\n homePhoneField.setText(contact.getHomePhone());\n workPhoneField.setText(contact.getWorkPhone());\n\n homeAddressField.setText(contact.getHomeAddress());\n workAddressField.setText(contact.getWorkAddress());\n\n personalEmailField.setText(contact.getPersonalEmail());\n workEmailField.setText(contact.getWorkEmail());\n\n }",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n TextView subcode = (TextView) view.findViewById(R.id.subjectCodeListView);\n TextView subname = (TextView) view.findViewById(R.id.subjectNameListView);\n // Extract properties from cursor\n String subjectcode = cursor.getString(0);\n String subjectname = cursor.getString(1);\n // Populate fields with extracted properties\n subcode.setText(subjectcode);\n subname.setText(subjectname);\n }",
"private void RetrieveEditTextData() {\n\n strFirstName = etFirstName.getText().toString();\n strMiddleName = etMiddleName.getText().toString();\n strLastName = etLastName.getText().toString();\n strEmployId = etEmployId.getText().toString();\n strDesignation = etDesignation.getText().toString();\n strCompName = etCompName.getText().toString();\n strCategory = etCategory.getText().toString();\n strDOB = etDOB.getText().toString();\n\n }",
"private void setInfo(String info) {\n// TextView textView = (TextView) findViewById(R.id.info);\n// textView.setText(info);\n }",
"public void takeAttendance(View view){\n\n if(_id.getText().toString().isEmpty() || _name.getText().toString().isEmpty()){ //Check if all fields are filled\n Toast.makeText(this, \"Enter all Fields\", Toast.LENGTH_LONG).show();\n return;\n }\n if(_id.getText().toString().length() != 9 ) { //checks if the ID is 9 digits (AUB students' IDs are usually 9-digits)\n Toast.makeText(this, \"Enter a valid ID\", Toast.LENGTH_LONG).show();\n return;\n }\n Intent intent = new Intent(this,Take_Attendance.class );\n setResult(RESULT_OK, intent);\n int id = Integer.parseInt(_id.getText().toString());\n String name = _name.getText().toString();\n intent.putExtra(STUDENT_ID, id);\n intent.putExtra(STUDENT_NAME, name);\n finish();\n }",
"@Override\n //nhan ket qua man hinh khac tra ve Main\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if (requestCode == REQUEST_CODE_EDIT && resultCode == RESULT_OK && data != null){\n String name = data.getStringExtra(\"New\");\n txtName.setText(name);\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n \n stuNum.setCellValueFactory(new PropertyValueFactory<> (\"stunum\"));\n course.setCellValueFactory(new PropertyValueFactory<> (\"coursename\"));\n classM.setCellValueFactory(new PropertyValueFactory <>(\"classM\"));\n exam.setCellValueFactory(new PropertyValueFactory <>(\"exam\"));\n finalM.setCellValueFactory(new PropertyValueFactory <>(\"finalM\"));\n \n String user = CurrentUser.getUserName();\n String role = CurrentUser.getUserRole();\n \n System.out.println(role);\n \n //only show marks for particular sudent\n if(role.equals(\"S\")){\n \n SN.setText(user);\n SN.setVisible(false);\n CC.setVisible(false);\n CC.setVisible(false);\n searchSN.setVisible(false);\n searchCC.setVisible(false);\n\n try{\n this.getStudent();\n }\n catch (IOException | SQLException e) {\n \n }\n\n }\n //show only for particular course\n //AS\n else if(CourseClicked.getClicked()==true){ //admin clicked on it\n \n CC.setText(CourseClicked.getCourse());\n SN.setVisible(false);\n CC.setVisible(false);\n CC.setVisible(false);\n searchSN.setVisible(false);\n searchCC.setVisible(false);\n \n try{\n this.getCourse();\n }\n catch (IOException | SQLException e) {\n\n }\n \n \n }\n //CC\n else if (UI.EditCourseController.course !=null){\n \n CC.setText(UI.EditCourseController.course);\n System.out.println(UI.EditCourseController.course);\n SN.setVisible(false);\n CC.setVisible(false);\n CC.setVisible(false);\n searchSN.setVisible(false);\n searchCC.setVisible(false);\n \n try{\n this.getCourse();\n }\n catch (IOException | SQLException e) {\n\n }\n \n }\n //coming back from detail view\n else if(StudentMarkClick.getBack()){\n //searched for student\n if(StudentMarkClick.getLastclick().equals(\"s\")){\n SN.setText(StudentMarkClick.getStunum());\n try{\n this.getStudent();\n }\n catch (IOException | SQLException e) {\n \n }\n }\n //searched for course\n else{\n CC.setText(StudentMarkClick.getCourse());\n try{\n this.getCourse();\n }\n catch (IOException | SQLException e) {\n \n } \n } \n }\n //CC or AS viewing overview\n else if (UI.EditCourseController.course !=null){\n \n CC.setText(UI.EditCourseController.course);\n System.out.println(UI.EditCourseController.course);\n SN.setVisible(false);\n CC.setVisible(false);\n searchSN.setVisible(false);\n searchCC.setVisible(false);\n \n try{\n this.getCourse();\n }\n catch (IOException | SQLException e) {\n\n }\n \n }\n \n }",
"private void init(){\n this.firstNameTF.setText(user.getFirstName());\n this.nameTF.setText(user.getName());\n this.phoneTF.setText(user.getPhone());\n\n this.mailLabel.setText(user.getMail());\n this.roleLabel.setText(user.getFirstName());\n }",
"public void onShowClick(View view) {\n EditText fn = (EditText) findViewById(R.id.editText_FirstName);\n EditText ln = (EditText) findViewById(R.id.editText_LastName);\n AutoCompleteTextView c = (AutoCompleteTextView) findViewById(R.id.autoComplete_Country);\n EditText p = (EditText) findViewById(R.id.editText_Phone);\n EditText a = (EditText) findViewById(R.id.editText_Address);\n EditText e = (EditText) findViewById(R.id.editText_Email);\n\n // Check if the required fields are filled\n if( \"\".equals(fn.getText().toString()) || \"\".equals(c.getText().toString())\n || \"\".equals( p.getText().toString()) || \"\".equals(e.getText().toString())) {\n Toast.makeText(this,getResources().getString(R.string.error_message),Toast.LENGTH_SHORT).show();\n return;\n\n }\n // Set the information on User Object\n user.setFirstName(fn.getText().toString());\n user.setLastName(ln.getText().toString());\n user.setCountry(c.getText().toString());\n user.setPhone(p.getText().toString());\n user.setAddress(a.getText().toString());\n user.setEmail(e.getText().toString());\n\n\n // Show the info into the view\n TextView tv = (TextView) findViewById(R.id.textView_Show);\n tv.setMovementMethod(new ScrollingMovementMethod());\n tv.setText(user.toString());\n\n }",
"public void displayStudentInfo(JTextField studentId, JTextField firstname, JTextField lastName, \n JTextField address, JTextField phoneNum, JTextField email, JTextField birthday){\n \n try {\n Connection con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/Student\", \n \"menaagina\", \"Polynomial5%\");\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"select * from students where Student_id = \"+id);\n rs.next();\n studentId.setText(rs.getString(1));\n firstname.setText(rs.getString(2));\n lastName.setText(rs.getString(3));\n address.setText(rs.getString(4));\n phoneNum.setText(rs.getString(5));\n email.setText(rs.getString(6));\n birthday.setText(rs.getString(7)); \n } catch (SQLException ex) {\n //an exception will never be thrown\n }\n \n }",
"@Override\r\n\t\tpublic void bindView(View v, Context arg1, Cursor arg2) {\n\t\t\t String tv1 = arg2.getString(2);\r\n\t\t\t String tv3 = CommonCode.change_Date_Format(arg2.getString(3), \"yyyy-MM-dd HH:mm:ss\", \"MM-dd-yyyy HH:mm:ss\");\r\n\t\t\t String tv4 = arg2.getString(4);\r\n\t\t\t String tv2 = arg2.getString(1);\r\n\t\t\t String tv6 = arg2.getString(7);\r\n\t\t\t String tv5 = arg2.getString(6);\r\n\t\t\t String tv8 = arg2.getString(8);//randomnumber\r\n\t\t\t String tv7 = arg2.getString(5);\r\n\t\t\t \r\n\t\t\t final TextView text1 = (TextView) v.findViewById(R.id.textView1);\r\n\t\t\t final TextView text2 = (TextView) v.findViewById(R.id.textView2);\r\n\t\t\t final TextView text3 = (TextView) v.findViewById(R.id.textView3);\r\n\t\t\t final TextView text4 = (TextView) v.findViewById(R.id.textView4);\r\n\t\t\t final TextView text5 = (TextView) v.findViewById(R.id.textView5);\r\n\t\t\t final TextView text6 = (TextView) v.findViewById(R.id.textView6);\r\n\t\t\t final TextView text7 = (TextView) v.findViewById(R.id.textView7); \r\n\t\t\t final TextView text8 = (TextView) v.findViewById(R.id.textView8);\r\n\t\t\t \r\n\t\t\t\ttext1.setText(tv1);\r\n\t\t\t\ttext2.setText(tv2);\r\n\t\t\t\ttext3.setText(tv3);\r\n\t\t\t\ttext4.setText(tv4);\r\n\t\t\t\ttext5.setText(tv5);\r\n\t\t\t\ttext6.setText(tv6);\r\n\t\t\t\ttext7.setText(\"\");\r\n\t\t\t\ttext8.setText(\"\");\r\n\t\t}",
"public void setField(StudentThrift studentThrift){\n id = studentThrift.getId();\n setTextID(FIRST_NAME, studentThrift.getFirstName());\n setTextID(LAST_NAME, studentThrift.getLastName());\n if (studentThrift.getMiddleName() != null){\n setTextID(MIDDLE_NAME, studentThrift.getMiddleName());\n }\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date birthDate = null;\n try {\n birthDate = format.parse(studentThrift.getDateOfBirth());\n } catch (ParseException e) {\n MainWindow.logger.error(\"Not valid date\");\n MainWindow.logger.trace(e);\n }\n jDateChooser.setDate(birthDate);\n setTextID(ADDRESS, studentThrift.getHomeAddress());\n group.setSelectedIndex\n (Arrays.asList(studentGroupArray).indexOf(studentThrift.getStudentGroup().getName()));\n }",
"public void bind(Class course) {\n mClass = course;\n mTitleTextView.setText(mClass.getTitle());\n mProfTextView.setText(mClass.getProfessor());\n mCodeTextView.setText(mClass.getCode());\n mTimeTextView.setText(mClass.getStart() + \" - \" + mClass.getEnd());\n mDaysTextView.setText(mClass.getMeetingDays());\n }",
"private void populateResultsUI(){\n\n totalPayTextView.setText(Double.toString(totalPay));\n totalTipTextView.setText(Double.toString(totalTip));\n totalPerPersonTextView.setText(Double.toString(totalPerPerson));\n }",
"public static void updateStudent(String UID){\n if (UID == \"\"){}\n else {\n //Update Student here\n uid_placeholder = UID;\n uid_placeholder = InterfaceCmds.getCurrentUID(UID);\n String y = InterfaceCmds.getCurrentSwipe(UID);\n StudentCall.setText(y);\n // System.out.println(uid_placeholder+ \" \" +y + \" InterfaceCmds.getCurrentSwipe() reached\");\n //System.out.println(\"MAAN LOOK AT ME I'M THE UID WOO! \" + UID);\n }\n }",
"private void setListView() {\n\n ArrayList students = new <String>ArrayList();\n\n SQLiteDatabase database = new DatabaseSQLiteHelper(this).getReadableDatabase();\n\n Cursor cursor = database.rawQuery(\"SELECT * FROM \" + Database.Student.TABLE_NAME,null);\n\n if (cursor.moveToFirst()) {\n while (!cursor.isAfterLast()) {\n String dp = cursor.getString(cursor.getColumnIndex(Database.Student.COL_DP));\n int id = cursor.getInt(cursor.getColumnIndex(Database.Student._ID));\n String fname = cursor.getString(cursor.getColumnIndex(Database.Student.COL_FIRST_NAME));\n String lname = cursor.getString((cursor.getColumnIndex(Database.Student.COL_LAST_NAME)));\n\n String student = Integer.toString(id) +\" \"+fname+\" \"+lname ;\n\n students.add(student);\n cursor.moveToNext();\n }\n }\n\n studentList = (ListView) findViewById(R.id.studentList);\n adapter = new ArrayAdapter<String>(this, R.layout.activity_student_list_view, R.id.textView, students);\n studentList.setAdapter(adapter);\n\n studentList.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n studentList.setVisibility(View.GONE);\n addTable.setVisibility(View.GONE);\n editTable.setVisibility(View.VISIBLE);\n\n\n fillEdit(position);\n }\n });\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v= inflater.inflate(R.layout.fragment_frag_one, container, false);\n et1= (EditText) v.findViewById(R.id.edittext1);\n et2= (EditText) v.findViewById(R.id.edittext2);\n tv= (TextView) v.findViewById(R.id.textview1);\n b1= (Button) v.findViewById(R.id.button1);\n b2= (Button) v.findViewById(R.id.button2);\n b1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //here we will insert data into table(student)\n String name=et1.getText().toString();\n String course=et2.getText().toString();\n myDatabase.insertStudent(name,course);//request for db file for insertion\n et1.setText(\"\");\n et2.setText(\"\");\n et1.requestFocus();\n Toast.makeText(getActivity(), \"inserted a row\", Toast.LENGTH_SHORT).show();\n\n\n }\n });\n b2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //here we will read data from table(student)\n Cursor c=myDatabase.queryStudent();\n if (c!=null){\n StringBuilder sb=new StringBuilder();\n //that means there\n while (c.moveToNext()){\n int sno=c.getInt(0);\n String sname=c.getString(1);\n String scourse=c.getString(2);\n sb.append(sno+\":\"+sname+\":\"+scourse+\"\\n\");\n }\n //let us apply on textview\n tv.setText(sb.toString());\n }\n }\n });\n\n return v;\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tPersonalInfoShow.tv_PIS_UserName.setText(Login.LOGIN_USERNAME);\n\t\t\t\tPersonalInfoShow.tv_PIS_PassWord.setText(PIS_Password);\n\t\t\t\tPersonalInfoShow.tv_PIS_Phone.setText(PIS_Phone);\n\t\t\t\tPersonalInfoShow.tv_PIS_Address.setText(PIS_Address);\n\t\t\t\tPersonalInfoShow.tv_PIS_Sex.setText(PIS_Sex);\n\t\t\t\tPersonalInfoShow.tv_PIS_Balances.setText(PIS_Balances);\n\n\t\t\t}",
"private void bindComponentData() {\n prgresbar.setVisibility(View.GONE);\n if (IISERApp.get_session(IISERApp.SESSION_USER_TYPE).equalsIgnoreCase(\"student\")) {\n lnrlayout_roll_no.setVisibility(View.GONE);\n lnrlayout_degree.setVisibility(View.GONE);\n lnrlayout_designation.setVisibility(View.GONE);\n lnrlayout_research.setVisibility(View.GONE);\n student_data = TABLE_USER_PROFILE.get_student_details();\n if (student_data.size() != 0) {\n IISERApp.log(LOG_TAG, \"student_data:\" + student_data);\n txt_batch_selection.setText(\"Batch Selection for Semester \" + student_data.get(0).get(\"semester_name\").toString());\n set_student_data();\n String sem_name = student_data.get(0).get(\"semester_name\").toString();\n }\n /*if (sem_name.equalsIgnoreCase(\"V\") | sem_name.equalsIgnoreCase(\"VI\") | sem_name.equalsIgnoreCase(\"VII\")\n | sem_name.equalsIgnoreCase(\"VIII\") | sem_name.equalsIgnoreCase(\"XI\") | sem_name.equalsIgnoreCase(\"X\")) {\n fab.setVisibility(View.VISIBLE);\n } else {\n fab.setVisibility(View.GONE);\n }*/\n\n } else if (IISERApp.get_session(IISERApp.SESSION_USER_TYPE).equalsIgnoreCase(\"faculty\")) {\n lnrlayout_roll_no.setVisibility(View.GONE);\n lnrlayout_semester_name.setVisibility(View.GONE);\n fab.setVisibility(View.GONE);\n add_courses.setVisibility(View.GONE);\n lnrlayout_batch_selection.setVisibility(View.GONE);\n faculty_data = TABLE_USER_PROFILE.get_faculty_details();\n IISERApp.log(LOG_TAG, \"faculty_data:\" + faculty_data);\n set_faculty_data();\n } else if (IISERApp.get_session(IISERApp.SESSION_USER_TYPE).equalsIgnoreCase(\"supervisor\")) {\n add_courses.setVisibility(View.GONE);\n lnrlayout_roll_no.setVisibility(View.GONE);\n lnrlayout_semester_name.setVisibility(View.GONE);\n fab.setVisibility(View.GONE);\n lnrlayout_batch_selection.setVisibility(View.GONE);\n supervisor_data = TABLE_USER_PROFILE.get_supervisor_details();\n IISERApp.log(LOG_TAG, \"faculty_data:\" + faculty_data);\n set_supervisor_data();\n }\n }",
"@Override\n public void run() {\n descriptionActivity.mReadingScore.setText(\"Reading: \"+ read);\n descriptionActivity.mMathScore.setText(\"Math: \" + math);\n descriptionActivity.mWritingScore.setText(\"Writing: \" + writing);\n }",
"public void display() {\n\tSystem.out.println(\"student id is \"+studentid+\"\\t\"+\"student name is \"+studentName+\"\\t\"+\"marks is \"+marks);\r\n}",
"private void findView(View view) {\n appBar = (AppBarLayout) view.findViewById(R.id.app_bar_profile);\n toolbar = view.findViewById(R.id.profileToolBar);\n swipeRefreshLayout = view.findViewById(R.id.swipeToRefreshLayout);\n collapsingToolbarLayout = view.findViewById(R.id.profileCollapseToolbar);\n\n errorLayout = (ErrorView) view.findViewById(R.id.errorLayout);\n\n studentDetailsLyt = (CardView) view.findViewById(R.id.studentDetailsLyt);\n\n studentImageView = (CircleImageView) view.findViewById(R.id.circle_profile_image);\n\n studentLocationTV = (TextView) view.findViewById(R.id.studentLocationTV);\n studentRegNoTV = (TextView) view.findViewById(R.id.studentRegNoTV);\n studentClassTV = (TextView) view.findViewById(R.id.studentClassNameTV);\n studentSectionTV = (TextView) view.findViewById(R.id.studentSectionTV);\n studentDOBTV = (TextView) view.findViewById(R.id.studentDOBTV);\n studentAddressTV = (TextView) view.findViewById(R.id.studentAddressTV);\n studentPhoneTV = (TextView) view.findViewById(R.id.studentPhoneTV);\n studentGenderTV = (TextView) view.findViewById(R.id.studentGenderTV);\n studentReligionTV = (TextView) view.findViewById(R.id.studentReligionTV);\n studentCasteTV = (TextView) view.findViewById(R.id.studentCasteTV);\n studentBloodGroupTV = (TextView) view.findViewById(R.id.studentBloodGroupTV);\n\n studentFatherNameTV = (TextView) view.findViewById(R.id.fatherNameTV);\n studentFatherOccupationTV = (TextView) view.findViewById(R.id.fatherOccupationTV);\n studentFatherPhoneTV = (TextView) view.findViewById(R.id.fatherPhoneTV);\n studentFatherOfficeTV = (TextView) view.findViewById(R.id.fatherOfficeTV);\n\n studentMotherNameTV = (TextView) view.findViewById(R.id.motherNameTV);\n studentMotherOccupationTV = (TextView) view.findViewById(R.id.motherOccupationTV);\n studentMotherPhoneTV = (TextView) view.findViewById(R.id.motherPhoneTV);\n studentMotherOfficeTV = (TextView) view.findViewById(R.id.motherOfficeTV);\n\n }",
"@Override\n public void onLoaderReset(Loader<Cursor> loader) {\n xtasyid.setText(\"\");\n name.setText(\"\");\n email.setText(\"\");\n college.setText(\"\");\n contact.setText(\"\");\n gender.setText(\"\");\n extras.setText(\"\");\n }",
"@Override\n\t\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\ttextView_setpsd_info.setText(str);\n\t\t\t\t}",
"public void setStudentClass() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setter method initialized\r\n System.out.println(\"Class : \" +studentClass); }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (save()) {\r\n\t\t\t\t\tfirst_name_text = first_name.getText().toString();\r\n\t\t\t\t\tlast_name_text=last_name.getText().toString();\r\n\t\t\t\t\tpassword_text = password.getText().toString();\r\n\t\t\t\t\temail_text = email.getText().toString();\r\n\t\t\t\t\tusername_text = username.getText().toString();\r\n\t\t\t\t\t//Remove - between Numbers\r\n\t\t\t\t\tphonenumber_text=phonenumber.getText().toString().replaceAll(\"[^0-9]\", \"\");\r\n\t\t\t\t\t// Remove All spaces between Strings\r\n\t\t\t\t\tcollege_name_text = college_name.getSelectedItem()\r\n\t\t\t\t\t\t\t.toString().replaceAll(\"\\\\s+\", \"\");\r\n\t\t\t\t\t// Execute the AsyncTask to Register User\r\n\t\t\t\t\tnew ValidateRegister().execute();\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }",
"@Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n TextView profileName = findViewById(R.id.profileName);\n profileName.setText(dataSnapshot.child(\"name\").getValue(String.class));\n\n//\n// //Show classes that you/others will tutor\n// TextView classesTutored = findViewById(R.id.tvClasses);\n// classesTutored.setText(dataSnapshot.child(\"classes\").getValue(String.class));\n//\n// TextView availability = findViewById(R.id.tvAvailability);\n// availability.setText(dataSnapshot.child(\"availability\").getValue(String.class));\n\n }",
"public void addDetails(View view) {\n\n EditText editText = (EditText) findViewById(R.id.editText4);\n String morningName = editText.getText().toString();\n\n EditText editText1 = (EditText) findViewById(R.id.editText3);\n\n if (editText1.getText().toString().trim().length() == 0 || editText.getText().toString().trim().length() == 0) {\n popUpEmptyTextView();\n } else {\n int timeRequired = Integer.parseInt(editText1.getText().toString());\n count++;\n int progress = count + newUser.getCardCount();\n updateProgress(progress); // updates activity count\n updateTime(timeRequired); // update total time\n name.add(morningName);\n time.add(timeRequired);\n }\n\n /*Intent i = new Intent(getApplicationContext(), AddUserDetailsActivity.class);\n finish();\n startActivity(i);\n */\n }",
"public void onbtnClick(View view){\n EditText edtNum1= (EditText)findViewById(R.id.edtNum1);\n EditText edtNum2= (EditText)findViewById(R.id.edtNum2);\n EditText edtNum3= (EditText)findViewById(R.id.edtNum3);\n\n //get the integer number of string\n int num1=Integer.parseInt(edtNum1.getText().toString());\n int num2=Integer.parseInt(edtNum2.getText().toString());\n int num3=Integer.parseInt(edtNum3.getText().toString());\n\n //calculate the result\n\n //calculate the total of three numbers and assign to TOTAL variable\n int total=num1+num2+num3;\n\n //calculate the average of three numbers and assign to AVERAGE variable\n float average=total/3;\n\n //call getFinalGrade\n char finalGrade=getFinalGrade(average);\n\n //assign the result to the result components\n\n //find txtTotal, txtAverage, txtFinalGrade\n TextView txtTotal=(TextView)findViewById(R.id.txtTotal);\n TextView txtAverage=(TextView)findViewById(R.id.txtAverage);\n TextView txtFinalGrade=\n (TextView)findViewById(R.id.txtFinalGrade);\n\n //assign the total, average, final grade variables to txtTotal, txtAverage, txtFinalGrade\n txtTotal.setText(Integer.toString(total));\n txtAverage.setText(Float.toString(average));\n txtFinalGrade.setText(Character.toString(finalGrade));\n\n}",
"public void updateTextViews() {\n // Set the inputs according to the initial input from the entry.\n //TextView dateTextView = (TextView) findViewById(R.id.date_textview);\n //dateTextView.setText(DateUtils.formatDateTime(getApplicationContext(), mEntry.getStart(), DateUtils.FORMAT_SHOW_DATE));\n\n EditText dateEdit = (EditText) findViewById(R.id.date_text_edit);\n dateEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_NUMERIC_DATE | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_ABBREV_ALL));\n\n EditText startTimeEdit = (EditText) findViewById(R.id.start_time_text_edit);\n startTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_SHOW_TIME));\n\n EditText endTimeEdit = (EditText) findViewById(R.id.end_time_text_edit);\n endTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getEnd(), DateUtils.FORMAT_SHOW_TIME));\n\n\n TextView descriptionView = (TextView) findViewById(R.id.description);\n descriptionView.setText(mEntry.getDescription());\n\n\n enableSendButtonIfPossible();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.new_class_add);\n\t\tcontext = this;\n\t\tIntent intent = getIntent();\n\t\tString type = intent.getStringExtra(\"type\");\n\t\tif(\"1\".equals(type)){\n\t\t\t\n\t\t}\n\t\tname_of_class = (EditText) findViewById(R.id.name_of_class);\n\t\tname_of_class.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(context, ClassListActivity.class);\n\t\t\t\tstartActivityForResult(intent, 2);\n\n\t\t\t}\n\t\t});\n\t\tname_of_teacher = (EditText) findViewById(R.id.name_of_teacher);\n\n\t\tname_of_teacher.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(context, TeacherListActivity.class);\n\t\t\t\tstartActivityForResult(intent, 1);\n\t\t\t}\n\t\t});\n\n\t\tspinner1 = (Spinner) findViewById(R.id.Spinner01);\n\t\tadapter_m = new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_spinner_item, m);\n\t\t// 设置下拉列表的风格\n\t\tadapter_m.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n\t\t// 将adapter 添加到spinner中\n\t\tspinner1.setAdapter(adapter_m);\n\t\t// 设置默认值\n\t\tspinner1.setVisibility(View.VISIBLE);\n\t\t\n\t\tspinner2= (Spinner) findViewById(R.id.Spinner02);\n\t\tadapter_n = new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_spinner_item, n);\n\t\t// 设置下拉列表的风格\n\t\tadapter_n.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n\t\t// 将adapter 添加到spinner中\n\t\tspinner2.setAdapter(adapter_n);\n\t\t// 设置默认值\n\t\tspinner2.setVisibility(View.VISIBLE);\n\t\t\n\t\tspinner3= (Spinner) findViewById(R.id.Spinner03);\n\t\tadapter_address = new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_spinner_item, address);\n\t\t// 设置下拉列表的风格\n\t\tadapter_address.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n\t\t// 将adapter 添加到spinner中\n\t\tspinner3.setAdapter(adapter_address);\n\t\t// 设置默认值\n\t\tspinner3.setVisibility(View.VISIBLE);\n\t\t\n\n\t}",
"private void initCreateAccountTextView() {\n\n TextView textViewCreateAccount = (TextView) findViewById(R.id.textViewCreateAccount);\n // El que hizo esto es un Dios\n textViewCreateAccount.setText(fromHtml(\"<font color='#000'>¿No tienes cuenta? </font><font color='#6dbaf8'>Registrate</font>\"));\n textViewCreateAccount.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);\n startActivity(intent);\n }\n });\n }",
"void populateFrom(Person r) {\n // nombre.setText(r.mail1);\n // apellido.setText(r.apellido1);\n usu.setText(r.nom_usuario1);\n // mail.setText(r.mail1);\n }",
"@Override\n\tpublic String collectDataInView() {\n\t\tif (!TextUtils.isEmpty(attitudeEditText.getText().toString())) {\n\n\t\t\tclassListenTable.score_attitude = attitudeEditText.getText()\n\t\t\t\t\t.toString();\n\n\t\t} else {\n\t\t\treturn \"教学态度未评\";\n\t\t}\n\t\tif (!TextUtils.isEmpty(contentEditText.getText().toString())) {\n\n\t\t\tclassListenTable.score_content = contentEditText.getText()\n\t\t\t\t\t.toString();\n\t\t} else {\n\t\t\treturn \"教内容未评\";\n\t\t}\n\t\tif (!TextUtils.isEmpty(methodEditText.getText().toString())) {\n\n\t\t\tclassListenTable.score_method = methodEditText.getText().toString();\n\n\t\t} else {\n\t\t\treturn \"教学方法未评\";\n\t\t}\n\t\tif (!TextUtils.isEmpty(manageEditText.getText().toString())) {\n\n\t\t\tclassListenTable.score_manage = manageEditText.getText().toString();\n\t\t} else {\n\t\t\treturn \"教学管理未评\";\n\t\t}\n\t\tif (!TextUtils.isEmpty(resultEditText.getText().toString())) {\n\n\t\t\tclassListenTable.score_result = resultEditText.getText().toString();\n\t\t} else {\n\t\t\treturn \"教学效果未评\";\n\t\t}\n\t\treturn super.collectDataInView();\n\t}",
"public void setStudent(Student s) {\n\t\tStudent = s;\n\t\tsetWelcomeText(s.getFirstName() , s.getLastName());//update the \"welcome, name!\" JLabel\n\t}",
"private void initObjects() {\n String emailFromIntent = getIntent().getStringExtra(\"NAMA\");\n textViewName.setText(emailFromIntent);\n }",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n //Find fields to populate in inflated template\n TextView sportClubFirstName = (TextView)view.findViewById(R.id.firstNameTextView);\n TextView sportClubLastName = (TextView)view.findViewById(R.id.lastNameTextView);\n TextView sportClubSport = (TextView)view.findViewById(R.id.sportTextView);\n //Extract properties from cursor\n String firstName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_FIRST_NAME));\n String lastName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_LAST_NAME));\n String sportName = cursor.getString(cursor.getColumnIndexOrThrow(MemberEntry.COLUMN_SPORT));\n //Populate fields with extracted properties\n sportClubFirstName.setText(firstName);\n sportClubLastName.setText(lastName);\n sportClubSport.setText(sportName);\n }",
"public void setupUserInfo(Bundle upUserInfo) {\n // Getting Info\n String name = upUserInfo.getString(\"userName\");\n String email = upUserInfo.getString(\"userEmail\");\n\n\n // Setting local Variables\n this.tutorName = name;\n this.tutorEmail = email;\n\n TextView nameField = (TextView) findViewById(R.id.UserNameField);\n nameField.setText(name);\n\n\n }",
"@SuppressLint(\"ClickableViewAccessibility\")\n private void setTouchListeners() {\n mStudentNameEditText.addTextChangedListener(mTextListener);\n mStudentSexSpinner.setOnTouchListener(mTouchListener);\n mStudentBirthdateRelativeLayout.setOnTouchListener(mTouchListener);\n mStudentGradeEditText.addTextChangedListener(mTextListener);\n mAddPhotoView.setOnTouchListener(mTouchListener);\n mStudentAddClassView.setOnTouchListener(mTouchListener);\n mStudentRemoveClassView.setOnTouchListener(mTouchListener);\n }",
"public static void display_student() {\n\t\t\n\n \n\t\n\ttry {\n\t\t//jdbc code\n\t\tConnection connection=Connection_Provider.creatC();\t\t\n\n\t\tString q=\"select * from students\";\n\t\t// Create Statement\n\t\tStatement stmt=connection.createStatement();\n\t\tResultSet result=stmt.executeQuery(q);\n\t\twhile (result.next()) {\n\t\t\tSystem.out.println(\"Student id \"+result.getInt(1));\n\t\t\tSystem.out.println(\"Student Name \"+result.getString(2));\n\t\t\tSystem.out.println(\"Student Phone No \"+result.getInt(3));\n\t\t\tSystem.out.println(\"Student City \"+result.getString(4));\n\t\t\tSystem.out.println(\"=========================================\");\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\t\t\n\t}",
"public void setStudentName() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// setter method initialized\r\n System.out.println(\"Name Of The Student : \"+studentName);}",
"private void onCreateSuccessStudent(){\n\n // check for if student or teacher\n Intent intent = new Intent(this, ClubHubStudentActivity.class);\n startActivity(intent);\n }",
"@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Selected Text Is...\"+names[arg2]+\":\"+phones[arg2], 5000).show();\n\t\t\t}",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n UserProfile userProfile = dataSnapshot.getValue(UserProfile.class);\n profileName.setText(userProfile.getname());\n profileEmail.setText(userProfile.getemail());\n profilePhone.setText(userProfile.getphone());\n /* profileName.setText(fname);\n profileEmail.setText(cemail);\n profilePhone.setText(cphone);*/\n\n\n\n }",
"public void read() {\r\n\t\tJTextField txtCustomerNo = new JTextField();\r\n\t\ttxtCustomerNo.setText(\"\" + this.getCustomerNo());\r\n\t\tJTextField txtTitle = new JTextField();\r\n\t\ttxtTitle.requestFocus();\r\n\t\tJTextField txtFirstName = new JTextField();\r\n\t\tJTextField txtSurname = new JTextField();\r\n\t\tJTextField txtAddress = new JTextField();\r\n\t\tJTextField txtPhoneNo = new JTextField();\r\n\t\tJTextField txtEmail = new JTextField();\r\n\r\n\t\t\r\n\t\tObject[] message = { \"Customer Number:\", txtCustomerNo, \"Title:\", txtTitle, \"First Name:\", txtFirstName,\r\n\t\t\t\t\"Surname:\", txtSurname, \"Address:\", txtAddress, \"Phone Number:\", txtPhoneNo, \"Email:\", txtEmail, };\r\n\t\t\r\n\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"Enter customer details\",\r\n\t\t\t\tJOptionPane.OK_CANCEL_OPTION);\r\n\t\t\r\n\t\tName txtName = new Name(txtTitle.getText(), txtFirstName.getText(), txtSurname.getText());\r\n\r\n\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\tthis.name = txtName;\r\n\t\t\tthis.address = txtAddress.getText();\r\n\t\t\tthis.phoneNo = txtPhoneNo.getText();\r\n\t\t\tthis.emailAddress = txtEmail.getText();\r\n\t\t}\r\n\t}",
"private void Add() {\n\t\t\tString names2 = StudentNum.getText();\n\t\t\tString names1 = Studentname.getText();\n\t\t\tStudentname.setText(\"\");\n\t\t\tStudentNum.setText(\"\");\n\t\t\tif (!names2.equals(\"Student Number\")) {\n\t\t\t\tFile directory = new File(\"Schools\\\\\" + names2 + \".hi\");\n\t\t\t\tif (!directory.exists()) {\n\t\t\t\t\tif (directory.mkdir()) {\n\t\t\t\t\t\tworklabel.setText(\"Student has been added\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tPrintWriter out;\n\t\t\t\t\t\t\tPrintWriter out2;\n\t\t\t\t\t\t\tout = new PrintWriter(new FileWriter(\"Schools\\\\\"\n\t\t\t\t\t\t\t\t\t+ names2 + \".hi\" + \"\\\\\"\n\t\t\t\t\t\t\t\t\t+ \"Student Information.txt\", true));\n\t\t\t\t\t\t\tout.println(\"Student Name: \" + names1);\n\t\t\t\t\t\t\tout.println(\"Student Number: \" + names2);\n\t\t\t\t\t\t\tout.println(\"Address:\");\n\t\t\t\t\t\t\tout.println(\"Postal Code:\");\n\t\t\t\t\t\t\tout.println(\"Phone Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Name:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #1 Email:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Name:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Number:\");\n\t\t\t\t\t\t\tout.println(\"Contact #2 Email:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #1:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #2:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #3:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #4:\");\n\t\t\t\t\t\t\tout.println(\"Medical Alert #5:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #1:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #2:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #3:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #4:\");\n\t\t\t\t\t\t\tout.println(\"Accomodation #5:\");\n\t\t\t\t\t\t\tout.println(\"Volunteer Hours:\");\n\t\t\t\t\t\t\tout2 = new PrintWriter(new FileWriter(\"Schools\\\\\"+ names2+\".hi\" + \"\\\\\" + \"Transcript.txt\",true));\n\t\t\t\t\t\t\tout2.println(\"Course Code\t\tMark\tPassed\tAbsences\tLate\");\n\t\t\t\t\t\t\tout.close();\n\t\t\t\t\t\t\tout2.close();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tworklabel.setText(\"Invalid\");\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\n public void onTextChanged(CharSequence s, int a, int b, int c) {\n EditText firstNameEditText = (EditText) findViewById(R.id.Student_FName);\n String firstNameEnteredText = String.valueOf(firstNameEditText.getText());\n Log.v(\"output\", String.valueOf(s));\n if(firstNameEnteredText.length()<1)\n {\n String lastNameEnteredText = String.valueOf(lastNameEditText.getText());\n\n\n if(lastNameEnteredText.length()<3)\n generatedUserId\n = lastNameEnteredText +\n timestamp.substring(timestampIndexer - 4 , timestampIndexer);\n else\n generatedUserId\n = lastNameEnteredText.substring(0,3)\n + timestamp.substring(timestampIndexer - 3 , timestampIndexer);\n\n }else\n {\n String lastNameEnteredText = String.valueOf(lastNameEditText.getText());\n if(lastNameEnteredText.length()<3)\n generatedUserId\n = firstNameEnteredText.substring(0,1) + lastNameEnteredText +\n timestamp.substring(timestampIndexer - 4 , timestampIndexer);\n else\n generatedUserId\n = firstNameEnteredText.substring(0,1) + lastNameEnteredText.substring(0,3) +\n timestamp.substring(timestampIndexer - 3 , timestampIndexer);\n\n }\n\n EditText userIdEditText = (EditText) findViewById(R.id.User_id);\n userIdEditText.setText(generatedUserId);\n\n\n\n }",
"public void Limpiar(View view)\r\n {\n\r\n etCaja1.setText(\"\");\r\n etCaja2.setText(\"\");\r\n tvCaja3.setText(\"\");\r\n }",
"public void setStuData() {\n\n System.out.print(\"Enter The Name : \"); \t String Entered_Name = Scan.next();\n\n System.out.print(\"Enter User Name : \");\t String Entered_User = Scan.next();\n\n System.out.print(\"Enter Password : \");\t int Entered_Pass = Scan.nextInt();\n\n System.out.print(\"Enter Feild : \");\t\t String Entered_Feild = Scan.next();\n\n Students_list.add(new Student(Entered_User , Entered_Name , Entered_Pass , Entered_Feild));\n\n System.out.print(\"Data Has been Saved!\");\n\n }",
"public void updateStudent(View v) {\n\n database = new DatabaseSQLiteHelper(this).getWritableDatabase();\n\n int selectedId = radio.getCheckedRadioButtonId();\n RadioButton selectedRadioButton = (RadioButton)findViewById(selectedId);\n\n ContentValues values = new ContentValues();\n\n Log.i(\"The gender is :\"+selectedRadioButton.getText().toString(), \":\");\n\n values.put(Database.Student.COL_FIRST_NAME, fnameEt.getText().toString());\n values.put(Database.Student.COL_LAST_NAME, lnameEt.getText().toString());\n\n values.put(Database.Student.COL_GENDER, selectedRadioButton.getText().toString());\n values.put(Database.Student.COL_COURSE, courseEt.getText().toString());\n values.put(Database.Student.COL_AGE, Integer.parseInt(ageEt.getText().toString()));\n values.put(Database.Student.COL_ADDRESS, addressEt.getText().toString());\n String id = studentIdTv.getText().toString();\n\n\n database.update(Database.Student.TABLE_NAME, values, Database.Student._ID +\"=\"+ id, null);\n Toast.makeText(this, \"Student with id: \" + id +\" updated!\", Toast.LENGTH_SHORT).show();\n\n Student.this.recreate();\n// showLayout(\"studentList\");\n }",
"protected void DisplayVenueAndPitchNames()\n {\n TextView venueName = (TextView) findViewById(R.id.venueName);\n TextView pitchName = (TextView) findViewById(R.id.pitchName);\n venueName.setText(venueNameTitle);\n pitchName.setText(pitch.getPitchName());\n }",
"@Override\n public void onClick(View v) {\n String name=et1.getText().toString();\n String course=et2.getText().toString();\n myDatabase.insertStudent(name,course);//request for db file for insertion\n et1.setText(\"\");\n et2.setText(\"\");\n et1.requestFocus();\n Toast.makeText(getActivity(), \"inserted a row\", Toast.LENGTH_SHORT).show();\n\n\n }",
"@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n TextView txtTitle = (TextView) view.findViewById(R.id.schoolTitle);\n TextView txtSchoolNo = (TextView) view.findViewById(R.id.schoolNo);\n TextView txtMajor = (TextView) view.findViewById(R.id.schoolMajor);\n TextView txtStartDate = (TextView) view.findViewById(R.id.schoolStartDate);\n TextView txtEndDate = (TextView) view.findViewById(R.id.schoolEndDate);\n TextView txtLocation = (TextView) view.findViewById(R.id.schoolLocation);\n TextView txtStatus = (TextView) view.findViewById(R.id.schoolStatus);\n\n // Extract properties from cursor\n String mTitle = cursor.getString(cursor.getColumnIndexOrThrow(\"school_title\"));\n String mSchoolNo = cursor.getString(cursor.getColumnIndexOrThrow(\"school_cardno\"));\n String mMajor = cursor.getString(cursor.getColumnIndexOrThrow(\"school_major\"));\n String mStartDate = cursor.getString(cursor.getColumnIndexOrThrow(\"start_date\"));\n String mEndDate = cursor.getString(cursor.getColumnIndexOrThrow(\"end_date\"));\n String mLocation = cursor.getString(cursor.getColumnIndexOrThrow(\"school_location\"));\n String mStatus = cursor.getString(cursor.getColumnIndexOrThrow(\"status\"));\n // Populate fields with extracted properties\n txtTitle.setText(mTitle);\n txtSchoolNo.setText(mSchoolNo);\n txtMajor.setText(mMajor);\n txtStartDate.setText(mStartDate);\n txtEndDate.setText(mEndDate);\n txtLocation.setText(mLocation);\n txtStatus.setText(mStatus);\n }",
"private void updateStudentProfileInfo() {\n\t\t\n\t\tstudent.setLastName(sLastNameTF.getText());\n\t\tstudent.setFirstName(sFirstNameTF.getText());\n\t\tstudent.setSchoolName(sSchoolNameTF.getText());\n\t\t\n\t\t//Update Student profile information in database\n\t\t\n\t}",
"private void initializeViewAndControls() {\r\n txtEmail.setText(\"Email - \"+ AppConstants.ADMIN_EMAIL);\r\n txtCustomerCarePhone.setText(\"Customer Care - \"+ AppConstants.CUSTOMER_CARE_NUMBER);\r\n txtTollFreePhone.setText(\"Toll Free - \"+ AppConstants.TOLL_FREE_NUMBER);\r\n }",
"void display()\n\t {\n\t\t System.out.println(\"Student ID: \"+id);\n\t\t System.out.println(\"Student Name: \"+name);\n\t\t System.out.println();\n\t }",
"@FXML\n private void getStudent() {\n System.out.println(\"Handling student: \"+handledStudent.toString());\n Student toBeEdited = handledStudent;\n System.out.println(\"Student to be edited:\"+toBeEdited.toString());\n txfID.setText(toBeEdited.getStudentID());\n txfFirstName.setText(toBeEdited.getFirstName());\n txfLastName.setText(toBeEdited.getLastName());\n txfAddress.setText(toBeEdited.getAddress());\n txfZIP.setText(toBeEdited.getZIP());\n txfZIPloc.setText(toBeEdited.getZIPloc());\n txfEmail.setText(toBeEdited.getEmail());\n txfPhone.setText(toBeEdited.getPhone());\n }",
"private void setInfo(int row)\n {\n String ID=table.getModel().getValueAt(row, 0).toString();\n String Name=table.getModel().getValueAt(row, 1).toString(); \n idText.setText(ID);\n nameText.setText(Name);\n }",
"public String DisplayStudents()\n\t{\t\n\t\tString studentList= \"\";\n\t\tint i=1; //the leading number that is interated for each student\n\t\tfor(Student b : classRoll)\n\t\t{\n\t\t\tstudentList += i + \". \" + b.getStrNameFirst ( ) + \" \" + b.getStrNameLast () +\"\\n\";\n\t\t\ti++;\n\t\t}\n\t\treturn studentList= getCourseName() +\"\\n\" + getCourseNumber()+\"\\n\" + getInstructor()+ \"\\n\" + studentList;\n\t}",
"private void setValue() {\n\t\tif (StringUtils.isEmpty(certifyCode)) {\n\t\t\tverifyLayout.setVisibility(View.GONE);\n\t\t} else {\n\t\t\tif (certifyCode.charAt(0) == '0') {\n\t\t\t\tidVerifyLayout.setVisibility(View.GONE);\n\t\t\t}\n\t\t\tif (certifyCode.charAt(1) == '0') {\n\t\t\t\tphoneVerifyLayout.setVisibility(View.GONE);\n\t\t\t}\n\t\t\tif (certifyCode.charAt(2) == '0') {\n\t\t\t\temailVerifyLayout.setVisibility(View.GONE);\n\t\t\t}\n\t\t}\n\t\tif (languagesList!=null&&languagesList.size() > 0) {\n\t\t\tString languages = \"\";\n\t\t\tfor (String str : languagesList) {\n\t\t\t\tlanguages += str + \"、\";\n\t\t\t}\n\t\t\tlanguages = languages.substring(0, languages.length() - 1);\n\t\t\tlanguage.setText(languages);\n\t\t}\n//\t\tTags tag=user.getTag();\n\t\tif(tag!=null&&tag.getServAreas()!=null&&tag.getServAreas().size()>0){\n\t\t\taddFlowView(tag.getServAreas(),serviceArieaFlow);\n\t\t}\n\t\tif(tag!=null&&tag.getClubTypes()!=null&&tag.getClubTypes().size()>0){\n\t\t\taddFlowView(tag.getClubTypes(),serviceContentFlow);\n\t\t}\n\t\tif(!StringUtils.isEmpty(address))\n\t\tadress.setText(address);\n\t}",
"public Student(String name, String gender,String rollNumber,String mobileNumber){\n this.name = name;\n this.gender = gender;\n this.rollNumber = rollNumber;\n this.mobileNumber = mobileNumber;\n }",
"@Override\n\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\n\t\t\t}",
"private void fillTextViewContent(){\n if(mPhotoInfo != null){\n if(mPhotoInfo.getOwner().getRealname()!= null){\n mOwner = mPhotoInfo.getOwner().getRealname();\n }else if(mPhotoInfo.getOwner().getUsername() != null){\n mOwner = mPhotoInfo.getOwner().getUsername();\n }\n\n if(mOwner != null && mOwner.length() > 0){\n mOwnerTv.setText(mOwner);\n }else{\n mOwnerTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getTitle() != null){\n mTitle = mPhotoInfo.getTitle().getContent();\n }\n\n if(mTitle != null && mTitle.length() > 0){\n if(mTitle.length() > 120){\n mTitle = mTitle.substring(0,120) + \"...\";\n }\n mTitleTv.setText(mTitle);\n }else{\n mTitleTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getDescription() != null){\n mDesc = mPhotoInfo.getDescription().getContent();\n }\n\n if(mDesc != null && mDesc.length() > 0){\n if(mDesc.length() > 120){\n mDesc = mDesc.substring(0,120) + \"...\";\n }\n mDescTv.setText(mDesc);\n }else{\n mDescTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getDateuploaded() != null){\n mDates = mPhotoInfo.getDateuploaded();\n }\n\n if(mDates != null && mDates.length() > 0){\n SimpleDateFormat simpleDateFormat =\n new SimpleDateFormat(\"MM/dd/yyyy\", Locale.getDefault());\n Date date = new Date(System.currentTimeMillis() - Long.parseLong(mDates));\n mDatesTv.setText(simpleDateFormat.format(date));\n }else{\n mDatesTv.setText(R.string.info_not_available);\n }\n\n if(mPhotoInfo.getViews() != null){\n mViews = mPhotoInfo.getViews();\n }\n\n if(mViews != null && mViews.length() > 0){\n mViewsTv.setText(mViews);\n }else{\n mViewsTv.setText(R.string.info_not_available);\n }\n }\n }"
] | [
"0.6911725",
"0.68805146",
"0.6758189",
"0.6564742",
"0.65262026",
"0.63850635",
"0.6371538",
"0.6314243",
"0.63141644",
"0.6253381",
"0.6211403",
"0.62070644",
"0.61968964",
"0.60729235",
"0.60540074",
"0.6010791",
"0.59751934",
"0.59569705",
"0.5900244",
"0.5884277",
"0.58359",
"0.5818294",
"0.5798479",
"0.5771531",
"0.576166",
"0.57422376",
"0.5709672",
"0.5707161",
"0.5699086",
"0.569468",
"0.56850797",
"0.5665982",
"0.56635547",
"0.56616443",
"0.5657127",
"0.5655333",
"0.5634436",
"0.56315106",
"0.5619178",
"0.56131136",
"0.56052196",
"0.5594806",
"0.5574869",
"0.5572199",
"0.55594933",
"0.55590415",
"0.5555815",
"0.55458534",
"0.5543337",
"0.5526497",
"0.55217624",
"0.55215",
"0.5518015",
"0.55147403",
"0.5504777",
"0.5502164",
"0.549517",
"0.54924226",
"0.5490035",
"0.5481087",
"0.54785216",
"0.54784703",
"0.54766476",
"0.5467637",
"0.54664177",
"0.5464862",
"0.545513",
"0.5448258",
"0.54445654",
"0.5427296",
"0.5422875",
"0.5422066",
"0.54190826",
"0.5416094",
"0.5407359",
"0.53885597",
"0.53845197",
"0.5372541",
"0.53693116",
"0.53660786",
"0.536012",
"0.53596675",
"0.5354964",
"0.5337699",
"0.5327465",
"0.5327266",
"0.5327026",
"0.53254384",
"0.530836",
"0.5302237",
"0.5297937",
"0.5297383",
"0.5290639",
"0.52867573",
"0.5286684",
"0.5286118",
"0.52858925",
"0.5284281",
"0.52841705",
"0.5281966"
] | 0.6251936 | 10 |
TODO: move this method out to a separate class | private String getMonth(Date date) {
LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
Month month = localDate.getMonth();
return month.name();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override public int describeContents() { return 0; }",
"@Override\n protected void getExras() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"private void poetries() {\n\n\t}",
"private void strin() {\n\n\t}",
"protected boolean func_70814_o() { return true; }",
"private Util() { }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }",
"protected OpinionFinding() {/* intentionally empty block */}",
"private void getStatus() {\n\t\t\n\t}",
"public void method_4270() {}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"protected abstract Set method_1559();",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private void m50366E() {\n }",
"@Override\n public int describeContents()\n {\n return 0;\n }",
"public void identify() {\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic int describeContents() {\n\t\t\t\treturn 0;\n\t\t\t}",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"private OMUtil() { }",
"private FormatUtilities() {}",
"private static void iterator() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"private ProcessorUtils() { }",
"@Override\n void init() {\n }",
"@Override\n\tprotected void parseResult() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"private void kk12() {\n\n\t}",
"private JacobUtils() {}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"private void init() {\n\n\t}"
] | [
"0.5363488",
"0.52307516",
"0.5203955",
"0.51826704",
"0.51699096",
"0.5126624",
"0.5090826",
"0.5071691",
"0.5068145",
"0.5055004",
"0.50507754",
"0.49952278",
"0.49952278",
"0.49952278",
"0.49952278",
"0.49952278",
"0.49952278",
"0.49852672",
"0.4969129",
"0.49511415",
"0.49248382",
"0.49109745",
"0.49063054",
"0.49033642",
"0.48912928",
"0.48876044",
"0.48783913",
"0.48528895",
"0.4845419",
"0.48398775",
"0.48398775",
"0.4826811",
"0.4826811",
"0.48165452",
"0.48154968",
"0.48051283",
"0.48028773",
"0.47897834",
"0.47813833",
"0.47702068",
"0.47683161",
"0.47593206",
"0.47532612",
"0.47513634",
"0.47430554",
"0.47383144",
"0.47339684",
"0.47283265",
"0.47263965",
"0.4723271",
"0.47231522",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47146735",
"0.47021487",
"0.4697025",
"0.46903133",
"0.46818355",
"0.46808934",
"0.46796942",
"0.46744567",
"0.46725765",
"0.46612886",
"0.46607152",
"0.46569696",
"0.4655866",
"0.465449",
"0.46521494",
"0.46470478",
"0.46470478",
"0.46441743",
"0.46430308",
"0.46424633",
"0.4641802"
] | 0.0 | -1 |
TODO: move this method out to a separate class | private String getYear(Date date) {
LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
Integer yearAsInt = localDate.getYear();
return String.valueOf(yearAsInt);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override public int describeContents() { return 0; }",
"@Override\n protected void getExras() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"private void poetries() {\n\n\t}",
"private void strin() {\n\n\t}",
"protected boolean func_70814_o() { return true; }",
"private Util() { }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }",
"protected OpinionFinding() {/* intentionally empty block */}",
"private void getStatus() {\n\t\t\n\t}",
"public void method_4270() {}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n protected void init() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"protected abstract Set method_1559();",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private void m50366E() {\n }",
"@Override\n public int describeContents()\n {\n return 0;\n }",
"public void identify() {\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic int describeContents() {\n\t\t\t\treturn 0;\n\t\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"private OMUtil() { }",
"private FormatUtilities() {}",
"private static void iterator() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"private ProcessorUtils() { }",
"@Override\n void init() {\n }",
"@Override\n\tprotected void parseResult() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"private JacobUtils() {}",
"private void init() {\n\n\t}"
] | [
"0.53625983",
"0.5230878",
"0.52022296",
"0.51815885",
"0.51681226",
"0.5125691",
"0.5090042",
"0.50705045",
"0.5066872",
"0.5055177",
"0.5050123",
"0.49932656",
"0.49932656",
"0.49932656",
"0.49932656",
"0.49932656",
"0.49932656",
"0.49843156",
"0.49685976",
"0.4951069",
"0.4924319",
"0.4910286",
"0.49053317",
"0.4902695",
"0.48919597",
"0.48880965",
"0.4878669",
"0.48515728",
"0.48446915",
"0.48394665",
"0.48394665",
"0.48249927",
"0.48249927",
"0.48154056",
"0.48139596",
"0.48032954",
"0.48012185",
"0.4789263",
"0.47802645",
"0.47686884",
"0.4766619",
"0.47575504",
"0.4753614",
"0.4749997",
"0.47425112",
"0.47386584",
"0.47340333",
"0.47274783",
"0.47257367",
"0.4724258",
"0.47227162",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.4715045",
"0.47017038",
"0.46954733",
"0.46899757",
"0.46806824",
"0.46804327",
"0.46797907",
"0.46725777",
"0.46713623",
"0.4661711",
"0.4660412",
"0.46554157",
"0.46528214",
"0.46525598",
"0.46513873",
"0.4645036",
"0.4645036",
"0.46430328",
"0.46414304",
"0.46409044",
"0.46401307"
] | 0.0 | -1 |
/ compiled from: Proguard | public interface T {
File T(String str);
void T();
boolean T(String str, Bitmap bitmap) throws IOException;
boolean T(String str, InputStream inputStream, Tr.T t) throws IOException;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void a(com.umeng.commonsdk.proguard.f r9) {\n /*\n r8 = this;\n monitor-enter(r8);\n r0 = \"UMSysLocation\";\n r1 = 1;\n r2 = new java.lang.Object[r1];\t Catch:{ all -> 0x00c8 }\n r3 = \"getSystemLocation\";\n r4 = 0;\n r2[r4] = r3;\t Catch:{ all -> 0x00c8 }\n com.umeng.commonsdk.statistics.common.e.a(r0, r2);\t Catch:{ all -> 0x00c8 }\n if (r9 == 0) goto L_0x00c6;\n L_0x0010:\n r0 = r8.d;\t Catch:{ all -> 0x00c8 }\n if (r0 != 0) goto L_0x0016;\n L_0x0014:\n goto L_0x00c6;\n L_0x0016:\n r8.e = r9;\t Catch:{ all -> 0x00c8 }\n r0 = r8.d;\t Catch:{ all -> 0x00c8 }\n r2 = \"android.permission.ACCESS_COARSE_LOCATION\";\n r0 = com.umeng.commonsdk.utils.UMUtils.checkPermission(r0, r2);\t Catch:{ all -> 0x00c8 }\n r2 = r8.d;\t Catch:{ all -> 0x00c8 }\n r3 = \"android.permission.ACCESS_FINE_LOCATION\";\n r2 = com.umeng.commonsdk.utils.UMUtils.checkPermission(r2, r3);\t Catch:{ all -> 0x00c8 }\n r3 = 0;\n if (r0 != 0) goto L_0x0039;\n L_0x002b:\n if (r2 == 0) goto L_0x002e;\n L_0x002d:\n goto L_0x0039;\n L_0x002e:\n r9 = r8.e;\t Catch:{ all -> 0x00c8 }\n if (r9 == 0) goto L_0x0037;\n L_0x0032:\n r9 = r8.e;\t Catch:{ all -> 0x00c8 }\n r9.a(r3);\t Catch:{ all -> 0x00c8 }\n L_0x0037:\n monitor-exit(r8);\n return;\n L_0x0039:\n r5 = r8.b;\t Catch:{ Throwable -> 0x0098 }\n if (r5 == 0) goto L_0x00c4;\n L_0x003d:\n r5 = android.os.Build.VERSION.SDK_INT;\t Catch:{ Throwable -> 0x0098 }\n r6 = 21;\n if (r5 < r6) goto L_0x0054;\n L_0x0043:\n r5 = r8.b;\t Catch:{ Throwable -> 0x0098 }\n r6 = \"gps\";\n r5 = r5.isProviderEnabled(r6);\t Catch:{ Throwable -> 0x0098 }\n r6 = r8.b;\t Catch:{ Throwable -> 0x0098 }\n r7 = \"network\";\n r6 = r6.isProviderEnabled(r7);\t Catch:{ Throwable -> 0x0098 }\n goto L_0x006c;\n L_0x0054:\n if (r2 == 0) goto L_0x005f;\n L_0x0056:\n r5 = r8.b;\t Catch:{ Throwable -> 0x0098 }\n r6 = \"gps\";\n r5 = r5.isProviderEnabled(r6);\t Catch:{ Throwable -> 0x0098 }\n goto L_0x0060;\n L_0x005f:\n r5 = 0;\n L_0x0060:\n if (r0 == 0) goto L_0x006b;\n L_0x0062:\n r6 = r8.b;\t Catch:{ Throwable -> 0x0098 }\n r7 = \"network\";\n r6 = r6.isProviderEnabled(r7);\t Catch:{ Throwable -> 0x0098 }\n goto L_0x006c;\n L_0x006b:\n r6 = 0;\n L_0x006c:\n if (r5 != 0) goto L_0x0070;\n L_0x006e:\n if (r6 == 0) goto L_0x0091;\n L_0x0070:\n r5 = \"UMSysLocation\";\n r6 = new java.lang.Object[r1];\t Catch:{ Throwable -> 0x0098 }\n r7 = \"getLastKnownLocation(LocationManager.PASSIVE_PROVIDER)\";\n r6[r4] = r7;\t Catch:{ Throwable -> 0x0098 }\n com.umeng.commonsdk.statistics.common.e.a(r5, r6);\t Catch:{ Throwable -> 0x0098 }\n if (r2 == 0) goto L_0x0086;\n L_0x007d:\n r0 = r8.b;\t Catch:{ Throwable -> 0x0098 }\n r2 = \"passive\";\n r0 = r0.getLastKnownLocation(r2);\t Catch:{ Throwable -> 0x0098 }\n goto L_0x0092;\n L_0x0086:\n if (r0 == 0) goto L_0x0091;\n L_0x0088:\n r0 = r8.b;\t Catch:{ Throwable -> 0x0098 }\n r2 = \"network\";\n r0 = r0.getLastKnownLocation(r2);\t Catch:{ Throwable -> 0x0098 }\n goto L_0x0092;\n L_0x0091:\n r0 = r3;\n L_0x0092:\n r2 = r8.e;\t Catch:{ Throwable -> 0x0098 }\n r2.a(r0);\t Catch:{ Throwable -> 0x0098 }\n goto L_0x00c4;\n L_0x0098:\n r0 = move-exception;\n r2 = \"UMSysLocation\";\n r1 = new java.lang.Object[r1];\t Catch:{ all -> 0x00c8 }\n r5 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00c8 }\n r5.<init>();\t Catch:{ all -> 0x00c8 }\n r6 = \"e is \";\n r5.append(r6);\t Catch:{ all -> 0x00c8 }\n r5.append(r0);\t Catch:{ all -> 0x00c8 }\n r5 = r5.toString();\t Catch:{ all -> 0x00c8 }\n r1[r4] = r5;\t Catch:{ all -> 0x00c8 }\n com.umeng.commonsdk.statistics.common.e.a(r2, r1);\t Catch:{ all -> 0x00c8 }\n if (r9 == 0) goto L_0x00bf;\n L_0x00b5:\n r9.a(r3);\t Catch:{ Throwable -> 0x00b9 }\n goto L_0x00bf;\n L_0x00b9:\n r9 = move-exception;\n r1 = r8.d;\t Catch:{ all -> 0x00c8 }\n com.umeng.commonsdk.proguard.b.a(r1, r9);\t Catch:{ all -> 0x00c8 }\n L_0x00bf:\n r9 = r8.d;\t Catch:{ all -> 0x00c8 }\n com.umeng.commonsdk.proguard.b.a(r9, r0);\t Catch:{ all -> 0x00c8 }\n L_0x00c4:\n monitor-exit(r8);\n return;\n L_0x00c6:\n monitor-exit(r8);\n return;\n L_0x00c8:\n r9 = move-exception;\n monitor-exit(r8);\n throw r9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.umeng.commonsdk.proguard.d.a(com.umeng.commonsdk.proguard.f):void\");\n }",
"public void run() {\n /*\n r8 = this;\n r1 = com.umeng.commonsdk.proguard.b.b;\t Catch:{ Throwable -> 0x00c9 }\n monitor-enter(r1);\t Catch:{ Throwable -> 0x00c9 }\n r0 = r8.a;\t Catch:{ all -> 0x00c6 }\n if (r0 == 0) goto L_0x00c4;\n L_0x0009:\n r0 = r8.b;\t Catch:{ all -> 0x00c6 }\n if (r0 == 0) goto L_0x00c4;\n L_0x000d:\n r0 = com.umeng.commonsdk.proguard.b.a;\t Catch:{ all -> 0x00c6 }\n if (r0 != 0) goto L_0x00c4;\n L_0x0013:\n r0 = 1;\n com.umeng.commonsdk.proguard.b.a = r0;\t Catch:{ all -> 0x00c6 }\n r0 = \"walle-crash\";\n r2 = 1;\n r2 = new java.lang.Object[r2];\t Catch:{ all -> 0x00c6 }\n r3 = 0;\n r4 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00c6 }\n r4.<init>();\t Catch:{ all -> 0x00c6 }\n r5 = \"report thread is \";\n r4 = r4.append(r5);\t Catch:{ all -> 0x00c6 }\n r5 = com.umeng.commonsdk.proguard.b.a;\t Catch:{ all -> 0x00c6 }\n r4 = r4.append(r5);\t Catch:{ all -> 0x00c6 }\n r4 = r4.toString();\t Catch:{ all -> 0x00c6 }\n r2[r3] = r4;\t Catch:{ all -> 0x00c6 }\n com.umeng.commonsdk.statistics.common.e.a(r0, r2);\t Catch:{ all -> 0x00c6 }\n r0 = r8.b;\t Catch:{ all -> 0x00c6 }\n r0 = com.umeng.commonsdk.proguard.c.a(r0);\t Catch:{ all -> 0x00c6 }\n r2 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x00c6 }\n if (r2 != 0) goto L_0x00c4;\n L_0x0045:\n r2 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00c6 }\n r2.<init>();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r3 = r3.getFilesDir();\t Catch:{ all -> 0x00c6 }\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"/\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"stateless\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"/\";\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r3 = \"umpx_internal\";\n r3 = r3.getBytes();\t Catch:{ all -> 0x00c6 }\n r4 = 0;\n r3 = android.util.Base64.encodeToString(r3, r4);\t Catch:{ all -> 0x00c6 }\n r2 = r2.append(r3);\t Catch:{ all -> 0x00c6 }\n r2 = r2.toString();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r4 = 10;\n com.umeng.commonsdk.stateless.f.a(r3, r2, r4);\t Catch:{ all -> 0x00c6 }\n r2 = new com.umeng.commonsdk.stateless.UMSLEnvelopeBuild;\t Catch:{ all -> 0x00c6 }\n r2.<init>();\t Catch:{ all -> 0x00c6 }\n r3 = r8.a;\t Catch:{ all -> 0x00c6 }\n r3 = r2.buildSLBaseHeader(r3);\t Catch:{ all -> 0x00c6 }\n r4 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r4.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"content\";\n r4.put(r5, r0);\t Catch:{ JSONException -> 0x00cb }\n r0 = \"ts\";\n r6 = java.lang.System.currentTimeMillis();\t Catch:{ JSONException -> 0x00cb }\n r4.put(r0, r6);\t Catch:{ JSONException -> 0x00cb }\n r0 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r0.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"crash\";\n r0.put(r5, r4);\t Catch:{ JSONException -> 0x00cb }\n r4 = new org.json.JSONObject;\t Catch:{ JSONException -> 0x00cb }\n r4.<init>();\t Catch:{ JSONException -> 0x00cb }\n r5 = \"tp\";\n r4.put(r5, r0);\t Catch:{ JSONException -> 0x00cb }\n r0 = r8.a;\t Catch:{ JSONException -> 0x00cb }\n r5 = \"umpx_internal\";\n r0 = r2.buildSLEnvelope(r0, r3, r4, r5);\t Catch:{ JSONException -> 0x00cb }\n if (r0 == 0) goto L_0x00c4;\n L_0x00bc:\n r2 = \"exception\";\n r0 = r0.has(r2);\t Catch:{ JSONException -> 0x00cb }\n if (r0 != 0) goto L_0x00c4;\n L_0x00c4:\n monitor-exit(r1);\t Catch:{ all -> 0x00c6 }\n L_0x00c5:\n return;\n L_0x00c6:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x00c6 }\n throw r0;\t Catch:{ Throwable -> 0x00c9 }\n L_0x00c9:\n r0 = move-exception;\n goto L_0x00c5;\n L_0x00cb:\n r0 = move-exception;\n goto L_0x00c4;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.umeng.commonsdk.proguard.bb.run():void\");\n }",
"private Dex2JarProxy() {\r\n\t}",
"AnonymousClass1() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.telephony.SmsCbCmasInfo.1.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.<init>():void\");\n }",
"public ecDSA512() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA512.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA512.<init>():void\");\n }",
"AnonymousClass1() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.location.GpsClock.1.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.<init>():void\");\n }",
"protected void finalize() throws java.lang.Throwable {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.android.org.conscrypt.OpenSSLBIOSource.finalize():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.conscrypt.OpenSSLBIOSource.finalize():void\");\n }",
"AnonymousClass1(javax.crypto.JarVerifier r1, java.net.URL r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: javax.crypto.JarVerifier.1.<init>(javax.crypto.JarVerifier, java.net.URL):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: javax.crypto.JarVerifier.1.<init>(javax.crypto.JarVerifier, java.net.URL):void\");\n }",
"@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }",
"protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public abstract Object toDexFile();",
"static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }",
"private String get2thDexSHA1(Context context) {\n ApplicationInfo ai = context.getApplicationInfo();\n String source = ai.sourceDir;\n try {\n JarFile jar = new JarFile(source);\n Manifest mf = jar.getManifest();\n Map<String, Attributes> map = mf.getEntries();\n Attributes a = map.get(\"classes2.dex\");\n return a.getValue(\"SHA1-Digest\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public static int m22557b(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = com.google.android.gms.internal.measurement.dr.m11788a(r1);\t Catch:{ zzyn -> 0x0005 }\n goto L_0x000c;\n L_0x0005:\n r0 = com.google.android.gms.internal.measurement.zzvo.f10281a;\n r1 = r1.getBytes(r0);\n r0 = r1.length;\n L_0x000c:\n r1 = m22576g(r0);\n r1 = r1 + r0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzut.b(java.lang.String):int\");\n }",
"private StdDSAEncoder() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.StdDSAEncoder.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.StdDSAEncoder.<init>():void\");\n }",
"public static void m5813a(java.lang.String r2, java.lang.String r3, java.lang.String r4, boolean r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.PurchaseEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r0.putItemId(r2);\n r0.putItemType(r3);\n r2 = java.lang.Long.parseLong(r4);\t Catch:{ Exception -> 0x0021 }\n r2 = java.math.BigDecimal.valueOf(r2);\t Catch:{ Exception -> 0x0021 }\n r0.putItemPrice(r2);\t Catch:{ Exception -> 0x0021 }\n L_0x0021:\n r0.putSuccess(r5);\n r2 = com.crashlytics.android.answers.Answers.getInstance();\n r2.logPurchase(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String, boolean):void\");\n }",
"public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }",
"protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }",
"static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private static void m3301e(Context context) throws C1108a {\n try {\n byte[] d = f3068kj.mo6439d(C1159r.getKey());\n byte[] c = f3068kj.mo6438c(d, C1159r.m3507A());\n File cacheDir = context.getCacheDir();\n if (cacheDir == null) {\n cacheDir = context.getDir(\"dex\", 0);\n if (cacheDir == null) {\n throw new C1108a();\n }\n }\n File createTempFile = File.createTempFile(\"ads\", \".jar\", cacheDir);\n FileOutputStream fileOutputStream = new FileOutputStream(createTempFile);\n fileOutputStream.write(c, 0, c.length);\n fileOutputStream.close();\n DexClassLoader dexClassLoader = new DexClassLoader(createTempFile.getAbsolutePath(), cacheDir.getAbsolutePath(), null, context.getClassLoader());\n Class loadClass = dexClassLoader.loadClass(m3299b(d, C1159r.m3508B()));\n Class loadClass2 = dexClassLoader.loadClass(m3299b(d, C1159r.m3514H()));\n Class loadClass3 = dexClassLoader.loadClass(m3299b(d, C1159r.m3512F()));\n Class loadClass4 = dexClassLoader.loadClass(m3299b(d, C1159r.m3518L()));\n Class loadClass5 = dexClassLoader.loadClass(m3299b(d, C1159r.m3510D()));\n Class loadClass6 = dexClassLoader.loadClass(m3299b(d, C1159r.m3516J()));\n f3061kc = loadClass.getMethod(m3299b(d, C1159r.m3509C()), new Class[0]);\n f3062kd = loadClass2.getMethod(m3299b(d, C1159r.m3515I()), new Class[0]);\n f3063ke = loadClass3.getMethod(m3299b(d, C1159r.m3513G()), new Class[]{Context.class});\n f3064kf = loadClass4.getMethod(m3299b(d, C1159r.m3519M()), new Class[]{MotionEvent.class, DisplayMetrics.class});\n f3065kg = loadClass5.getMethod(m3299b(d, C1159r.m3511E()), new Class[]{Context.class});\n f3066kh = loadClass6.getMethod(m3299b(d, C1159r.m3517K()), new Class[]{Context.class});\n String name = createTempFile.getName();\n createTempFile.delete();\n new File(cacheDir, name.replace(\".jar\", \".dex\")).delete();\n } catch (FileNotFoundException e) {\n throw new C1108a(e);\n } catch (IOException e2) {\n throw new C1108a(e2);\n } catch (ClassNotFoundException e3) {\n throw new C1108a(e3);\n } catch (C1157a e4) {\n throw new C1108a(e4);\n } catch (NoSuchMethodException e5) {\n throw new C1108a(e5);\n } catch (NullPointerException e6) {\n throw new C1108a(e6);\n }\n }",
"private JadTool() { }",
"@javax.annotation.Nullable\n /* renamed from: a */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n private final com.google.android.gms.internal.ads.alc m16975a(@javax.annotation.Nullable android.content.Context r4, boolean r5, boolean r6) {\n /*\n r3 = this;\n com.google.android.gms.internal.ads.ark<java.lang.Boolean> r0 = com.google.android.gms.internal.ads.aru.f11765Q\n com.google.android.gms.internal.ads.ars r1 = com.google.android.gms.internal.ads.aoq.m14620f()\n java.lang.Object r0 = r1.mo14695a(r0)\n java.lang.Boolean r0 = (java.lang.Boolean) r0\n boolean r0 = r0.booleanValue()\n r1 = 0\n if (r0 != 0) goto L_0x0014\n return r1\n L_0x0014:\n boolean r0 = com.google.android.gms.common.util.C3563o.m12763b()\n if (r0 != 0) goto L_0x001b\n return r1\n L_0x001b:\n com.google.android.gms.internal.ads.ark<java.lang.Boolean> r0 = com.google.android.gms.internal.ads.aru.f11773Y\n com.google.android.gms.internal.ads.ars r2 = com.google.android.gms.internal.ads.aoq.m14620f()\n java.lang.Object r0 = r2.mo14695a(r0)\n java.lang.Boolean r0 = (java.lang.Boolean) r0\n boolean r0 = r0.booleanValue()\n if (r0 != 0) goto L_0x0040\n com.google.android.gms.internal.ads.ark<java.lang.Boolean> r0 = com.google.android.gms.internal.ads.aru.f11771W\n com.google.android.gms.internal.ads.ars r2 = com.google.android.gms.internal.ads.aoq.m14620f()\n java.lang.Object r0 = r2.mo14695a(r0)\n java.lang.Boolean r0 = (java.lang.Boolean) r0\n boolean r0 = r0.booleanValue()\n if (r0 != 0) goto L_0x0040\n return r1\n L_0x0040:\n if (r5 == 0) goto L_0x0045\n if (r6 == 0) goto L_0x0045\n return r1\n L_0x0045:\n java.lang.Object r5 = r3.f13322a\n monitor-enter(r5)\n android.os.Looper r6 = android.os.Looper.getMainLooper() // Catch:{ all -> 0x007f }\n if (r6 == 0) goto L_0x007d\n if (r4 != 0) goto L_0x0051\n goto L_0x007d\n L_0x0051:\n com.google.android.gms.internal.ads.akx r6 = r3.f13331j // Catch:{ all -> 0x007f }\n if (r6 != 0) goto L_0x005c\n com.google.android.gms.internal.ads.akx r6 = new com.google.android.gms.internal.ads.akx // Catch:{ all -> 0x007f }\n r6.<init>() // Catch:{ all -> 0x007f }\n r3.f13331j = r6 // Catch:{ all -> 0x007f }\n L_0x005c:\n com.google.android.gms.internal.ads.alc r6 = r3.f13330i // Catch:{ all -> 0x007f }\n if (r6 != 0) goto L_0x006f\n com.google.android.gms.internal.ads.alc r6 = new com.google.android.gms.internal.ads.alc // Catch:{ all -> 0x007f }\n com.google.android.gms.internal.ads.akx r0 = r3.f13331j // Catch:{ all -> 0x007f }\n com.google.android.gms.internal.ads.zzang r1 = r3.f13328g // Catch:{ all -> 0x007f }\n com.google.android.gms.internal.ads.ck r4 = com.google.android.gms.internal.ads.C3712cg.m16480a(r4, r1) // Catch:{ all -> 0x007f }\n r6.<init>(r0, r4) // Catch:{ all -> 0x007f }\n r3.f13330i = r6 // Catch:{ all -> 0x007f }\n L_0x006f:\n com.google.android.gms.internal.ads.alc r4 = r3.f13330i // Catch:{ all -> 0x007f }\n r4.mo14478a() // Catch:{ all -> 0x007f }\n java.lang.String r4 = \"start fetching content...\"\n com.google.android.gms.internal.ads.C3900je.m17433d(r4) // Catch:{ all -> 0x007f }\n com.google.android.gms.internal.ads.alc r4 = r3.f13330i // Catch:{ all -> 0x007f }\n monitor-exit(r5) // Catch:{ all -> 0x007f }\n return r4\n L_0x007d:\n monitor-exit(r5) // Catch:{ all -> 0x007f }\n return r1\n L_0x007f:\n r4 = move-exception\n monitor-exit(r5) // Catch:{ all -> 0x007f }\n throw r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.C3883io.m16975a(android.content.Context, boolean, boolean):com.google.android.gms.internal.ads.alc\");\n }",
"private static com.google.android.gms.dynamite.zzj zzaT(android.content.Context r4) {\n /*\n java.lang.Class<com.google.android.gms.dynamite.DynamiteModule> r0 = com.google.android.gms.dynamite.DynamiteModule.class\n monitor-enter(r0)\n com.google.android.gms.dynamite.zzj r1 = zzaSG // Catch:{ all -> 0x0069 }\n if (r1 == 0) goto L_0x000b\n com.google.android.gms.dynamite.zzj r4 = zzaSG // Catch:{ all -> 0x0069 }\n monitor-exit(r0) // Catch:{ all -> 0x0069 }\n return r4\n L_0x000b:\n com.google.android.gms.common.zze r1 = com.google.android.gms.common.zze.zzoW() // Catch:{ all -> 0x0069 }\n int r1 = r1.isGooglePlayServicesAvailable(r4) // Catch:{ all -> 0x0069 }\n r2 = 0\n if (r1 == 0) goto L_0x0018\n monitor-exit(r0) // Catch:{ all -> 0x0069 }\n return r2\n L_0x0018:\n java.lang.String r1 = \"com.google.android.gms\"\n r3 = 3\n android.content.Context r4 = r4.createPackageContext(r1, r3) // Catch:{ Exception -> 0x004d }\n java.lang.ClassLoader r4 = r4.getClassLoader() // Catch:{ Exception -> 0x004d }\n java.lang.String r1 = \"com.google.android.gms.chimera.container.DynamiteLoaderImpl\"\n java.lang.Class r4 = r4.loadClass(r1) // Catch:{ Exception -> 0x004d }\n java.lang.Object r4 = r4.newInstance() // Catch:{ Exception -> 0x004d }\n android.os.IBinder r4 = (android.os.IBinder) r4 // Catch:{ Exception -> 0x004d }\n if (r4 != 0) goto L_0x0033\n r4 = r2\n goto L_0x0047\n L_0x0033:\n java.lang.String r1 = \"com.google.android.gms.dynamite.IDynamiteLoader\"\n android.os.IInterface r1 = r4.queryLocalInterface(r1) // Catch:{ Exception -> 0x004d }\n boolean r3 = r1 instanceof com.google.android.gms.dynamite.zzj // Catch:{ Exception -> 0x004d }\n if (r3 == 0) goto L_0x0041\n r4 = r1\n com.google.android.gms.dynamite.zzj r4 = (com.google.android.gms.dynamite.zzj) r4 // Catch:{ Exception -> 0x004d }\n goto L_0x0047\n L_0x0041:\n com.google.android.gms.dynamite.zzk r1 = new com.google.android.gms.dynamite.zzk // Catch:{ Exception -> 0x004d }\n r1.<init>(r4) // Catch:{ Exception -> 0x004d }\n r4 = r1\n L_0x0047:\n if (r4 == 0) goto L_0x0067\n zzaSG = r4 // Catch:{ Exception -> 0x004d }\n monitor-exit(r0) // Catch:{ all -> 0x0069 }\n return r4\n L_0x004d:\n r4 = move-exception\n java.lang.String r1 = \"Failed to load IDynamiteLoader from GmsCore: \"\n java.lang.String r4 = r4.getMessage() // Catch:{ all -> 0x0069 }\n java.lang.String r4 = java.lang.String.valueOf(r4) // Catch:{ all -> 0x0069 }\n int r3 = r4.length() // Catch:{ all -> 0x0069 }\n if (r3 == 0) goto L_0x0062\n r1.concat(r4) // Catch:{ all -> 0x0069 }\n goto L_0x0067\n L_0x0062:\n java.lang.String r4 = new java.lang.String // Catch:{ all -> 0x0069 }\n r4.<init>(r1) // Catch:{ all -> 0x0069 }\n L_0x0067:\n monitor-exit(r0) // Catch:{ all -> 0x0069 }\n return r2\n L_0x0069:\n r4 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x0069 }\n throw r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.dynamite.DynamiteModule.zzaT(android.content.Context):com.google.android.gms.dynamite.zzj\");\n }",
"public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }",
"boolean optimizeBundle();",
"static void method_6338() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_1148() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public static com.facebook.ads.internal.p081a.C1714d m6464a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r1);\n if (r0 == 0) goto L_0x0009;\n L_0x0006:\n r1 = NONE;\n return r1;\n L_0x0009:\n r0 = java.util.Locale.US;\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = r1.toUpperCase(r0);\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = com.facebook.ads.internal.p081a.C1714d.valueOf(r1);\t Catch:{ IllegalArgumentException -> 0x0014 }\n return r1;\n L_0x0014:\n r1 = NONE;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.a.d.a(java.lang.String):com.facebook.ads.internal.a.d\");\n }",
"public /* bridge */ /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_2226() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }",
"public ecDSA384() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA384.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA384.<init>():void\");\n }",
"public synchronized void release() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: com.android.org.conscrypt.OpenSSLBIOSource.release():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.conscrypt.OpenSSLBIOSource.release():void\");\n }",
"public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }",
"GpsClock() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.location.GpsClock.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.<init>():void\");\n }",
"private CompressionTools() {}",
"public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }",
"DelegatingX509Certificate(java.security.cert.X509Certificate r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: android.security.keystore.DelegatingX509Certificate.<init>(java.security.cert.X509Certificate):void, dex: in method: android.security.keystore.DelegatingX509Certificate.<init>(java.security.cert.X509Certificate):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.<init>(java.security.cert.X509Certificate):void\");\n }",
"private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }",
"public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }",
"private void m14047a(@javax.annotation.Nullable okhttp3.internal.p155a.C2918d.C2915a r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = this;\n if (r1 == 0) goto L_0x0005;\n L_0x0002:\n r1.m14100c();\t Catch:{ IOException -> 0x0005 }\n L_0x0005:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a(okhttp3.internal.a.d$a):void\");\n }",
"public void method_2046() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private static void zza(java.lang.ClassLoader r3) throws com.google.android.gms.dynamite.DynamiteModule.zzc {\n /*\n r0 = 0\n java.lang.String r1 = \"com.google.android.gms.dynamiteloader.DynamiteLoaderV2\"\n java.lang.Class r3 = r3.loadClass(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1 = 0\n java.lang.Class[] r2 = new java.lang.Class[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.reflect.Constructor r3 = r3.getConstructor(r2) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object[] r1 = new java.lang.Object[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object r3 = r3.newInstance(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n android.os.IBinder r3 = (android.os.IBinder) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r3 != 0) goto L_0x001a\n r3 = r0\n goto L_0x002e\n L_0x001a:\n java.lang.String r1 = \"com.google.android.gms.dynamite.IDynamiteLoaderV2\"\n android.os.IInterface r1 = r3.queryLocalInterface(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n boolean r2 = r1 instanceof com.google.android.gms.dynamite.zzl // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r2 == 0) goto L_0x0028\n r3 = r1\n com.google.android.gms.dynamite.zzl r3 = (com.google.android.gms.dynamite.zzl) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n goto L_0x002e\n L_0x0028:\n com.google.android.gms.dynamite.zzm r1 = new com.google.android.gms.dynamite.zzm // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1.<init>(r3) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r3 = r1\n L_0x002e:\n zzaSH = r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n return\n L_0x0031:\n r3 = move-exception\n com.google.android.gms.dynamite.DynamiteModule$zzc r1 = new com.google.android.gms.dynamite.DynamiteModule$zzc\n java.lang.String r2 = \"Failed to instantiate dynamite loader\"\n r1.<init>(r2, r3, r0)\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.dynamite.DynamiteModule.zza(java.lang.ClassLoader):void\");\n }",
"public OpenSSLBIOSource(com.android.org.conscrypt.OpenSSLBIOInputStream r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.android.org.conscrypt.OpenSSLBIOSource.<init>(com.android.org.conscrypt.OpenSSLBIOInputStream):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.conscrypt.OpenSSLBIOSource.<init>(com.android.org.conscrypt.OpenSSLBIOInputStream):void\");\n }",
"AnonymousClass1(android.widget.ColorListView r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.widget.ColorListView.1.<init>(android.widget.ColorListView):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.ColorListView.1.<init>(android.widget.ColorListView):void\");\n }",
"SmsCbCmasInfo(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.<init>(android.os.Parcel):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.<init>(android.os.Parcel):void\");\n }",
"private static void m13385d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = java.lang.System.currentTimeMillis();\t Catch:{ Exception -> 0x0024 }\n r2 = java.util.concurrent.TimeUnit.DAYS;\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r2 = r2.toMillis(r3);\t Catch:{ Exception -> 0x0024 }\n r4 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = r0 - r2;\t Catch:{ Exception -> 0x0024 }\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x0024 }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x0024 }\n r2 = \"timestamp < ?\";\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r3 = new java.lang.String[r3];\t Catch:{ Exception -> 0x0024 }\n r6 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = java.lang.String.valueOf(r4);\t Catch:{ Exception -> 0x0024 }\n r3[r6] = r4;\t Catch:{ Exception -> 0x0024 }\n r0.delete(r1, r2, r3);\t Catch:{ Exception -> 0x0024 }\n L_0x0024:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.d():void\");\n }",
"public void method_2139() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public final com.google.android.gms.internal.ads.zzafx mo4170d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19705f;\n monitor-enter(r0);\n r1 = r2.f19706g;\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n r1 = r1.m26175a();\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x000b:\n r1 = move-exception;\t Catch:{ all -> 0x000b }\n goto L_0x0010;\t Catch:{ all -> 0x000b }\n L_0x000d:\n r1 = 0;\t Catch:{ all -> 0x000b }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x0010:\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzafn.d():com.google.android.gms.internal.ads.zzafx\");\n }",
"public void method_2113() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public /* bridge */ /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.telephony.SmsCbCmasInfo.1.createFromParcel(android.os.Parcel):java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"public final /* synthetic */ Object zzpq() {\n \n /* JADX ERROR: Method code generation error\n jadx.core.utils.exceptions.CodegenException: Error generate insn: 0x0004: INVOKE (wrap: android.content.Context\n 0x0000: IGET (r0v0 android.content.Context) = (r2v0 'this' com.google.android.gms.internal.ads.zzwo A[THIS]) com.google.android.gms.internal.ads.zzwo.val$context android.content.Context), (wrap: java.lang.String\n 0x0002: CONST_STR (r1v0 java.lang.String) = \"native_ad\") com.google.android.gms.internal.ads.zzwj.zzb(android.content.Context, java.lang.String):void type: STATIC in method: com.google.android.gms.internal.ads.zzwo.zzpq():java.lang.Object, dex: classes2.dex\n \tat jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:245)\n \tat jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:213)\n \tat jadx.core.codegen.RegionGen.makeSimpleBlock(RegionGen.java:109)\n \tat jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:55)\n \tat jadx.core.codegen.RegionGen.makeSimpleRegion(RegionGen.java:92)\n \tat jadx.core.codegen.RegionGen.makeRegion(RegionGen.java:58)\n \tat jadx.core.codegen.MethodGen.addRegionInsns(MethodGen.java:210)\n \tat jadx.core.codegen.MethodGen.addInstructions(MethodGen.java:203)\n \tat jadx.core.codegen.ClassGen.addMethod(ClassGen.java:316)\n \tat jadx.core.codegen.ClassGen.addMethods(ClassGen.java:262)\n \tat jadx.core.codegen.ClassGen.addClassBody(ClassGen.java:225)\n \tat jadx.core.codegen.ClassGen.addClassCode(ClassGen.java:110)\n \tat jadx.core.codegen.ClassGen.makeClass(ClassGen.java:76)\n \tat jadx.core.codegen.CodeGen.wrapCodeGen(CodeGen.java:44)\n \tat jadx.core.codegen.CodeGen.generateJavaCode(CodeGen.java:32)\n \tat jadx.core.codegen.CodeGen.generate(CodeGen.java:20)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:36)\n \tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:311)\n \tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n \tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:217)\n Caused by: java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -2 is negative\n \tat java.base/java.util.ArrayList.shiftTailOverGap(Unknown Source)\n \tat java.base/java.util.ArrayList.removeIf(Unknown Source)\n \tat java.base/java.util.ArrayList.removeIf(Unknown Source)\n \tat jadx.core.dex.instructions.args.SSAVar.removeUse(SSAVar.java:86)\n \tat jadx.core.utils.InsnRemover.unbindArgUsage(InsnRemover.java:90)\n \tat jadx.core.dex.nodes.InsnNode.replaceArg(InsnNode.java:130)\n \tat jadx.core.codegen.InsnGen.inlineMethod(InsnGen.java:892)\n \tat jadx.core.codegen.InsnGen.makeInvoke(InsnGen.java:669)\n \tat jadx.core.codegen.InsnGen.makeInsnBody(InsnGen.java:357)\n \tat jadx.core.codegen.InsnGen.makeInsn(InsnGen.java:239)\n \t... 19 more\n */\n /*\n this = this;\n android.content.Context r0 = r2.val$context\n java.lang.String r1 = \"native_ad\"\n com.google.android.gms.internal.ads.zzwj.zza(r0, r1)\n com.google.android.gms.internal.ads.zzzh r0 = new com.google.android.gms.internal.ads.zzzh\n r0.<init>()\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzwo.zzpq():java.lang.Object\");\n }",
"public ecDSAnone() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSAnone.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSAnone.<init>():void\");\n }",
"static /* synthetic */ void m203-wrap7(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap7(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap7(java.lang.String):void\");\n }",
"AnonymousClass1(android.telecom.ConnectionServiceAdapterServant r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.telecom.ConnectionServiceAdapterServant.1.<init>(android.telecom.ConnectionServiceAdapterServant):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.1.<init>(android.telecom.ConnectionServiceAdapterServant):void\");\n }",
"public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_28() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }",
"public static int PrepareSecurefiles(Context ctx, ZipFile apkzf) {\r\n ZipEntry fileUnzip;\r\n ZipEntry fileUnzip2;\r\n ZipEntry fileUnzip3;\r\n RandomAccessFile raf = null;\r\n FileLock file_lock = null;\r\n RandomAccessFile raf2 = null;\r\n String Appfiledir = new StringBuilder(String.valueOf(ctx.getFilesDir().getAbsolutePath())).append(\"/prodexdir\").toString();\r\n File Appprofiledir = new File(Appfiledir);\r\n if (!Appprofiledir.isDirectory()) {\r\n Appprofiledir.mkdir();\r\n }\r\n String Cookiefilepath = new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(versionname).toString();\r\n String backupfilepath = new StringBuilder(String.valueOf(Appfiledir)).append(\"/backUp\").toString();\r\n String firstloadfilepath = new StringBuilder(String.valueOf(Appfiledir)).append(\"/firstLoad\").toString();\r\n String Cookiefileinzip = \"assets/\" + versionname;\r\n String Libnameinapk = \"libtosprotection.\" + CPUABI + \".so\";\r\n try {\r\n raf = new RandomAccessFile(Cookiefilepath, \"rw\");\r\n try {\r\n raf = raf.getChannel();\r\n file_lock = raf.lock();\r\n File Cookiefile = new File(Cookiefilepath);\r\n try {\r\n if (Cookiefile.length() != 0) {\r\n int compareResult = Comparetxtinzip(apkzf, Cookiefileinzip, Cookiefile);\r\n if (compareResult == 1) {\r\n File secureDataFile = new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename5).toString());\r\n if (!secureDataFile.exists() || secureDataFile.length() == 0) {\r\n SafeUnzipFile(apkzf, \"assets/\" + securename5, secureDataFile, 0);\r\n } else {\r\n SafeUnzipFile(apkzf, \"assets/\" + securename5, secureDataFile, getFileCRC32(secureDataFile));\r\n }\r\n ZipEntry fileUnzip4 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip4 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString(), fileUnzip4.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip5 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip5 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString(), fileUnzip5.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip6 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip6 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString(), fileUnzip6.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip7 = apkzf.getEntry(Cookiefileinzip);\r\n if (fileUnzip7 != null && !isFileValid(Cookiefilepath, fileUnzip7.getSize())) {\r\n File file = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file);\r\n }\r\n if (file_lock != null) {\r\n try {\r\n file_lock.release();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n RandomAccessFile randomAccessFile = raf;\r\n File file2 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e2) {\r\n e2.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e3) {\r\n e3.printStackTrace();\r\n RandomAccessFile randomAccessFile2 = raf;\r\n File file3 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile3 = raf;\r\n File file4 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e4) {\r\n e4.printStackTrace();\r\n RandomAccessFile randomAccessFile4 = raf;\r\n File file5 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n } catch (IOException e5) {\r\n e5.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e6) {\r\n e6.printStackTrace();\r\n RandomAccessFile randomAccessFile5 = raf;\r\n File file6 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e7) {\r\n e7.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e8) {\r\n e8.printStackTrace();\r\n RandomAccessFile randomAccessFile6 = raf;\r\n File file7 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile7 = raf;\r\n File file8 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e9) {\r\n e9.printStackTrace();\r\n RandomAccessFile randomAccessFile8 = raf;\r\n File file9 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n RandomAccessFile randomAccessFile9 = raf;\r\n File file10 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e10) {\r\n e10.printStackTrace();\r\n RandomAccessFile randomAccessFile10 = raf;\r\n File file11 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e11) {\r\n e11.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e12) {\r\n e12.printStackTrace();\r\n RandomAccessFile randomAccessFile11 = raf;\r\n File file12 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile12 = raf;\r\n File file13 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e13) {\r\n e13.printStackTrace();\r\n RandomAccessFile randomAccessFile13 = raf;\r\n File file14 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n RandomAccessFile randomAccessFile14 = raf;\r\n File file15 = Cookiefile;\r\n return 2;\r\n } else if (compareResult != 0) {\r\n Process.killProcess(Process.myPid());\r\n System.exit(0);\r\n }\r\n }\r\n DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString());\r\n DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString());\r\n int file_count = 0;\r\n while (file_count < MAX_DEX_NUM) {\r\n int deletedexresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count)).toString());\r\n int deletejarresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(CreatenewFileName(securename1, \".\", \"_\" + file_count)).toString());\r\n int deleteodexresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count)).toString());\r\n int deleteflagresult = DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count)).toString());\r\n DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(\"oat/arm\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count)).toString());\r\n if (ERROR_FILE_NOT_FOUND == deletedexresult && ERROR_FILE_NOT_FOUND == deletejarresult && ERROR_FILE_NOT_FOUND == deleteodexresult) {\r\n break;\r\n }\r\n if (ERROR_EXCEPTION == deletedexresult || ERROR_EXCEPTION == deletejarresult || ERROR_EXCEPTION == deleteodexresult) {\r\n Process.killProcess(Process.myPid());\r\n System.exit(0);\r\n }\r\n file_count++;\r\n }\r\n DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename9).toString());\r\n DeleteFile(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename5).toString());\r\n UnzipFile(apkzf, \"assets/\" + securename5, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename5).toString()));\r\n UnzipFile(apkzf, \"assets/\" + libname, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n File file16 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file16);\r\n for (int file_count2 = 0; file_count2 < file_count; file_count2++) {\r\n int deletedexresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count2)).toString());\r\n int deletejarresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append(\"/\").append(CreatenewFileName(securename1, \".\", \"_\" + file_count2)).toString());\r\n int deleteodexresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count2)).toString());\r\n int deleteflagresult2 = DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count2)).toString());\r\n DeleteFile(new StringBuilder(String.valueOf(backupfilepath)).append(\"/\").append(\"oat/arm\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count2)).toString());\r\n if (ERROR_FILE_NOT_FOUND == deletedexresult2 && ERROR_FILE_NOT_FOUND == deletejarresult2 && ERROR_FILE_NOT_FOUND == deleteodexresult2) {\r\n break;\r\n }\r\n if (ERROR_EXCEPTION == deletedexresult2 || ERROR_EXCEPTION == deletejarresult2 || ERROR_EXCEPTION == deleteodexresult2) {\r\n Process.killProcess(Process.myPid());\r\n System.exit(0);\r\n }\r\n }\r\n for (int file_count3 = 0; file_count3 < file_count; file_count3++) {\r\n int deletedexresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count3)).toString());\r\n int deletejarresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append(\"/\").append(CreatenewFileName(securename1, \".\", \"_\" + file_count3)).toString());\r\n int deleteodexresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename0, \".\", \"_\" + file_count3)).toString());\r\n int deleteflagresult3 = DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append(\"/\").append(\"odexdir\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count3)).toString());\r\n DeleteFile(new StringBuilder(String.valueOf(firstloadfilepath)).append(\"/\").append(\"oat/arm\").append(\"/\").append(CreatenewFileName(securename8, \".\", \"_\" + file_count3)).toString());\r\n if (ERROR_FILE_NOT_FOUND == deletedexresult3 && ERROR_FILE_NOT_FOUND == deletejarresult3 && ERROR_FILE_NOT_FOUND == deleteodexresult3) {\r\n break;\r\n }\r\n if (ERROR_EXCEPTION == deletedexresult3 || ERROR_EXCEPTION == deletejarresult3 || ERROR_EXCEPTION == deleteodexresult3) {\r\n Process.killProcess(Process.myPid());\r\n System.exit(0);\r\n }\r\n }\r\n ZipEntry fileUnzip8 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip8 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString(), fileUnzip8.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip9 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip9 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString(), fileUnzip9.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip10 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip10 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString(), fileUnzip10.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip11 = apkzf.getEntry(Cookiefileinzip);\r\n if (fileUnzip11 != null && !isFileValid(Cookiefilepath, fileUnzip11.getSize())) {\r\n File file17 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file17);\r\n }\r\n if (file_lock != null) {\r\n try {\r\n file_lock.release();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e14) {\r\n e14.printStackTrace();\r\n RandomAccessFile randomAccessFile15 = raf;\r\n File file18 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e15) {\r\n e15.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e16) {\r\n e16.printStackTrace();\r\n RandomAccessFile randomAccessFile16 = raf;\r\n File file19 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile17 = raf;\r\n File file20 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e17) {\r\n e17.printStackTrace();\r\n RandomAccessFile randomAccessFile18 = raf;\r\n File file21 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n } catch (IOException e18) {\r\n e18.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e19) {\r\n e19.printStackTrace();\r\n RandomAccessFile randomAccessFile19 = raf;\r\n File file22 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e20) {\r\n e20.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e21) {\r\n e21.printStackTrace();\r\n RandomAccessFile randomAccessFile20 = raf;\r\n File file23 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile21 = raf;\r\n File file24 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e22) {\r\n e22.printStackTrace();\r\n RandomAccessFile randomAccessFile22 = raf;\r\n File file25 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n RandomAccessFile randomAccessFile23 = raf;\r\n File file26 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e23) {\r\n e23.printStackTrace();\r\n RandomAccessFile randomAccessFile24 = raf;\r\n File file27 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e24) {\r\n e24.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e25) {\r\n e25.printStackTrace();\r\n RandomAccessFile randomAccessFile25 = raf;\r\n File file28 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n RandomAccessFile randomAccessFile26 = raf;\r\n File file29 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e26) {\r\n e26.printStackTrace();\r\n RandomAccessFile randomAccessFile27 = raf;\r\n File file30 = Cookiefile;\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n RandomAccessFile randomAccessFile28 = raf;\r\n File file31 = Cookiefile;\r\n return 0;\r\n } catch (Exception e27) {\r\n e = e27;\r\n raf2 = raf;\r\n File file32 = Cookiefile;\r\n } catch (Throwable th) {\r\n th = th;\r\n raf2 = raf;\r\n File file33 = Cookiefile;\r\n ZipEntry fileUnzip12 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip12 != null && !isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString(), fileUnzip12.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n }\r\n ZipEntry fileUnzip13 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip13 != null && !isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString(), fileUnzip13.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n }\r\n ZipEntry fileUnzip14 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip14 != null && !isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString(), fileUnzip14.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n }\r\n ZipEntry fileUnzip15 = apkzf.getEntry(Cookiefileinzip);\r\n if (fileUnzip15 != null && !isFileValid(Cookiefilepath, fileUnzip15.getSize())) {\r\n File file34 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file34);\r\n }\r\n if (file_lock != null) {\r\n try {\r\n file_lock.release();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e28) {\r\n e28.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e29) {\r\n e29.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e30) {\r\n e30.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e31) {\r\n e31.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n } catch (IOException e32) {\r\n e32.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e33) {\r\n e33.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e34) {\r\n e34.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e35) {\r\n e35.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e36) {\r\n e36.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e37) {\r\n e37.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e38) {\r\n e38.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e39) {\r\n e39.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e40) {\r\n e40.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n throw th;\r\n }\r\n } catch (Exception e41) {\r\n e = e41;\r\n raf2 = raf;\r\n try {\r\n e.printStackTrace();\r\n fileUnzip = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString(), fileUnzip.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n }\r\n }\r\n fileUnzip2 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip2 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString(), fileUnzip2.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n }\r\n }\r\n fileUnzip3 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip3 != null) {\r\n if (!isFileValid(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString(), fileUnzip3.getSize())) {\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n }\r\n }\r\n ZipEntry fileUnzip16 = apkzf.getEntry(Cookiefileinzip);\r\n if (fileUnzip16 != null && !isFileValid(Cookiefilepath, fileUnzip16.getSize())) {\r\n File file35 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file35);\r\n }\r\n if (file_lock != null) {\r\n try {\r\n file_lock.release();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e42) {\r\n e42.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e43) {\r\n e43.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e44) {\r\n e44.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e45) {\r\n e45.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n } catch (IOException e46) {\r\n e46.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e47) {\r\n e47.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e48) {\r\n e48.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e49) {\r\n e49.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e50) {\r\n e50.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e51) {\r\n e51.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n } catch (IOException e52) {\r\n e52.printStackTrace();\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e53) {\r\n e53.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } finally {\r\n if (raf != null) {\r\n try {\r\n raf.close();\r\n } catch (IOException e54) {\r\n e54.printStackTrace();\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n } catch (Throwable th2) {\r\n th = th2;\r\n ZipEntry fileUnzip122 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n ZipEntry fileUnzip132 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n ZipEntry fileUnzip142 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n ZipEntry fileUnzip152 = apkzf.getEntry(Cookiefileinzip);\r\n File file342 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file342);\r\n if (file_lock != null) {\r\n }\r\n throw th;\r\n }\r\n } catch (Throwable th3) {\r\n th = th3;\r\n raf2 = raf;\r\n ZipEntry fileUnzip1222 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + Libnameinapk, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(libname).toString()));\r\n ZipEntry fileUnzip1322 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + securename6, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename6).toString()));\r\n ZipEntry fileUnzip1422 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n UnzipFile(apkzf, \"assets/\" + securename7, new File(new StringBuilder(String.valueOf(Appfiledir)).append(\"/\").append(securename7).toString()));\r\n ZipEntry fileUnzip1522 = apkzf.getEntry(Cookiefileinzip);\r\n File file3422 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file3422);\r\n if (file_lock != null) {\r\n }\r\n throw th;\r\n }\r\n } catch (Exception e55) {\r\n e = e55;\r\n e.printStackTrace();\r\n fileUnzip = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip != null) {\r\n }\r\n fileUnzip2 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip2 != null) {\r\n }\r\n fileUnzip3 = apkzf.getEntry(\"assets/\" + Libnameinapk);\r\n if (fileUnzip3 != null) {\r\n }\r\n ZipEntry fileUnzip162 = apkzf.getEntry(Cookiefileinzip);\r\n File file352 = new File(Cookiefilepath);\r\n UnzipFile(apkzf, Cookiefileinzip, file352);\r\n if (file_lock != null) {\r\n }\r\n return ERROR_FILE_NOT_FOUND;\r\n }\r\n }",
"private static void check(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.check(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.check(java.lang.String):void\");\n }",
"protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"public abstract java.lang.Object a ( ) {\n/* .annotation system Ldalvik/annotation/Signature; */\n/* value = { */\n/* \"()TT;\" */\n/* } */\n}",
"public boolean mo3969a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f19005h;\n if (r0 != 0) goto L_0x0011;\n L_0x0004:\n r0 = r4.f19004g;\n if (r0 == 0) goto L_0x000f;\n L_0x0008:\n r0 = r4.f19004g;\n r1 = com.facebook.ads.C1700b.f5123e;\n r0.mo1313a(r4, r1);\n L_0x000f:\n r0 = 0;\n return r0;\n L_0x0011:\n r0 = new android.content.Intent;\n r1 = r4.f19002e;\n r2 = com.facebook.ads.AudienceNetworkActivity.class;\n r0.<init>(r1, r2);\n r1 = \"predefinedOrientationKey\";\n r2 = r4.m25306b();\n r0.putExtra(r1, r2);\n r1 = \"uniqueId\";\n r2 = r4.f18999b;\n r0.putExtra(r1, r2);\n r1 = \"placementId\";\n r2 = r4.f19000c;\n r0.putExtra(r1, r2);\n r1 = \"requestTime\";\n r2 = r4.f19001d;\n r0.putExtra(r1, r2);\n r1 = \"viewType\";\n r2 = r4.f19009l;\n r0.putExtra(r1, r2);\n r1 = \"useCache\";\n r2 = r4.f19010m;\n r0.putExtra(r1, r2);\n r1 = r4.f19008k;\n if (r1 == 0) goto L_0x0052;\n L_0x004a:\n r1 = \"ad_data_bundle\";\n r2 = r4.f19008k;\n r0.putExtra(r1, r2);\n goto L_0x005b;\n L_0x0052:\n r1 = r4.f19006i;\n if (r1 == 0) goto L_0x005b;\n L_0x0056:\n r1 = r4.f19006i;\n r1.m18953a(r0);\n L_0x005b:\n r1 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r0.addFlags(r1);\n r1 = r4.f19002e;\t Catch:{ ActivityNotFoundException -> 0x0066 }\n r1.startActivity(r0);\t Catch:{ ActivityNotFoundException -> 0x0066 }\n goto L_0x0072;\n L_0x0066:\n r1 = r4.f19002e;\n r2 = com.facebook.ads.InterstitialAdActivity.class;\n r0.setClass(r1, r2);\n r1 = r4.f19002e;\n r1.startActivity(r0);\n L_0x0072:\n r0 = 1;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.k.a():boolean\");\n }",
"static /* synthetic */ void m200-wrap4(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap4(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap4(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }",
"protected static android.graphics.Bitmap m6543a(int r1, int r2) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.graphics.Bitmap.Config.ARGB_8888;\t Catch:{ OutOfMemoryError -> 0x0007 }\n r0 = android.graphics.Bitmap.createBitmap(r1, r2, r0);\t Catch:{ OutOfMemoryError -> 0x0007 }\n return r0;\n L_0x0007:\n java.lang.System.gc();\n r0 = android.graphics.Bitmap.Config.ARGB_8888;\n r1 = android.graphics.Bitmap.createBitmap(r1, r2, r0);\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.shimmer.ShimmerFrameLayout.a(int, int):android.graphics.Bitmap\");\n }",
"public java.lang.Object run() throws java.lang.Exception {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: javax.crypto.JarVerifier.1.run():java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: javax.crypto.JarVerifier.1.run():java.lang.Object\");\n }",
"protected Throwable doInBackground(final Void... p0) {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 1: astore_2 \n // 2: aload_0 \n // 3: getfield android/support/v4/print/PrintHelperKitkat$2.val$cancellationSignal:Landroid/os/CancellationSignal;\n // 6: invokevirtual android/os/CancellationSignal.isCanceled:()Z\n // 9: ifeq 16\n // 12: aload_2 \n // 13: astore_1 \n // 14: aload_1 \n // 15: areturn \n // 16: new Landroid/print/pdf/PrintedPdfDocument;\n // 19: astore_3 \n // 20: aload_3 \n // 21: aload_0 \n // 22: getfield android/support/v4/print/PrintHelperKitkat$2.this$0:Landroid/support/v4/print/PrintHelperKitkat;\n // 25: getfield android/support/v4/print/PrintHelperKitkat.mContext:Landroid/content/Context;\n // 28: aload_0 \n // 29: getfield android/support/v4/print/PrintHelperKitkat$2.val$pdfAttributes:Landroid/print/PrintAttributes;\n // 32: invokespecial android/print/pdf/PrintedPdfDocument.<init>:(Landroid/content/Context;Landroid/print/PrintAttributes;)V\n // 35: aload_0 \n // 36: getfield android/support/v4/print/PrintHelperKitkat$2.this$0:Landroid/support/v4/print/PrintHelperKitkat;\n // 39: aload_0 \n // 40: getfield android/support/v4/print/PrintHelperKitkat$2.val$bitmap:Landroid/graphics/Bitmap;\n // 43: aload_0 \n // 44: getfield android/support/v4/print/PrintHelperKitkat$2.val$pdfAttributes:Landroid/print/PrintAttributes;\n // 47: invokevirtual android/print/PrintAttributes.getColorMode:()I\n // 50: invokestatic android/support/v4/print/PrintHelperKitkat.access$100:(Landroid/support/v4/print/PrintHelperKitkat;Landroid/graphics/Bitmap;I)Landroid/graphics/Bitmap;\n // 53: astore 4\n // 55: aload_0 \n // 56: getfield android/support/v4/print/PrintHelperKitkat$2.val$cancellationSignal:Landroid/os/CancellationSignal;\n // 59: invokevirtual android/os/CancellationSignal.isCanceled:()Z\n // 62: istore 5\n // 64: aload_2 \n // 65: astore_1 \n // 66: iload 5\n // 68: ifne 14\n // 71: aload_3 \n // 72: iconst_1 \n // 73: invokevirtual android/print/pdf/PrintedPdfDocument.startPage:(I)Landroid/graphics/pdf/PdfDocument$Page;\n // 76: astore 6\n // 78: aload_0 \n // 79: getfield android/support/v4/print/PrintHelperKitkat$2.this$0:Landroid/support/v4/print/PrintHelperKitkat;\n // 82: getfield android/support/v4/print/PrintHelperKitkat.mIsMinMarginsHandlingCorrect:Z\n // 85: ifeq 216\n // 88: new Landroid/graphics/RectF;\n // 91: astore_1 \n // 92: aload_1 \n // 93: aload 6\n // 95: invokevirtual android/graphics/pdf/PdfDocument$Page.getInfo:()Landroid/graphics/pdf/PdfDocument$PageInfo;\n // 98: invokevirtual android/graphics/pdf/PdfDocument$PageInfo.getContentRect:()Landroid/graphics/Rect;\n // 101: invokespecial android/graphics/RectF.<init>:(Landroid/graphics/Rect;)V\n // 104: aload_0 \n // 105: getfield android/support/v4/print/PrintHelperKitkat$2.this$0:Landroid/support/v4/print/PrintHelperKitkat;\n // 108: aload 4\n // 110: invokevirtual android/graphics/Bitmap.getWidth:()I\n // 113: aload 4\n // 115: invokevirtual android/graphics/Bitmap.getHeight:()I\n // 118: aload_1 \n // 119: aload_0 \n // 120: getfield android/support/v4/print/PrintHelperKitkat$2.val$fittingMode:I\n // 123: invokestatic android/support/v4/print/PrintHelperKitkat.access$200:(Landroid/support/v4/print/PrintHelperKitkat;IILandroid/graphics/RectF;I)Landroid/graphics/Matrix;\n // 126: astore 7\n // 128: aload_0 \n // 129: getfield android/support/v4/print/PrintHelperKitkat$2.this$0:Landroid/support/v4/print/PrintHelperKitkat;\n // 132: getfield android/support/v4/print/PrintHelperKitkat.mIsMinMarginsHandlingCorrect:Z\n // 135: ifeq 313\n // 138: aload 6\n // 140: invokevirtual android/graphics/pdf/PdfDocument$Page.getCanvas:()Landroid/graphics/Canvas;\n // 143: aload 4\n // 145: aload 7\n // 147: aconst_null \n // 148: invokevirtual android/graphics/Canvas.drawBitmap:(Landroid/graphics/Bitmap;Landroid/graphics/Matrix;Landroid/graphics/Paint;)V\n // 151: aload_3 \n // 152: aload 6\n // 154: invokevirtual android/print/pdf/PrintedPdfDocument.finishPage:(Landroid/graphics/pdf/PdfDocument$Page;)V\n // 157: aload_0 \n // 158: getfield android/support/v4/print/PrintHelperKitkat$2.val$cancellationSignal:Landroid/os/CancellationSignal;\n // 161: invokevirtual android/os/CancellationSignal.isCanceled:()Z\n // 164: istore 5\n // 166: iload 5\n // 168: ifeq 340\n // 171: aload_3 \n // 172: invokevirtual android/print/pdf/PrintedPdfDocument.close:()V\n // 175: aload_0 \n // 176: getfield android/support/v4/print/PrintHelperKitkat$2.val$fileDescriptor:Landroid/os/ParcelFileDescriptor;\n // 179: astore_1 \n // 180: aload_1 \n // 181: ifnull 191\n // 184: aload_0 \n // 185: getfield android/support/v4/print/PrintHelperKitkat$2.val$fileDescriptor:Landroid/os/ParcelFileDescriptor;\n // 188: invokevirtual android/os/ParcelFileDescriptor.close:()V\n // 191: aload_2 \n // 192: astore_1 \n // 193: aload 4\n // 195: aload_0 \n // 196: getfield android/support/v4/print/PrintHelperKitkat$2.val$bitmap:Landroid/graphics/Bitmap;\n // 199: if_acmpeq 14\n // 202: aload 4\n // 204: invokevirtual android/graphics/Bitmap.recycle:()V\n // 207: aload_2 \n // 208: astore_1 \n // 209: goto 14\n // 212: astore_1 \n // 213: goto 14\n // 216: new Landroid/print/pdf/PrintedPdfDocument;\n // 219: astore 7\n // 221: aload 7\n // 223: aload_0 \n // 224: getfield android/support/v4/print/PrintHelperKitkat$2.this$0:Landroid/support/v4/print/PrintHelperKitkat;\n // 227: getfield android/support/v4/print/PrintHelperKitkat.mContext:Landroid/content/Context;\n // 230: aload_0 \n // 231: getfield android/support/v4/print/PrintHelperKitkat$2.val$attributes:Landroid/print/PrintAttributes;\n // 234: invokespecial android/print/pdf/PrintedPdfDocument.<init>:(Landroid/content/Context;Landroid/print/PrintAttributes;)V\n // 237: aload 7\n // 239: iconst_1 \n // 240: invokevirtual android/print/pdf/PrintedPdfDocument.startPage:(I)Landroid/graphics/pdf/PdfDocument$Page;\n // 243: astore 8\n // 245: new Landroid/graphics/RectF;\n // 248: astore_1 \n // 249: aload_1 \n // 250: aload 8\n // 252: invokevirtual android/graphics/pdf/PdfDocument$Page.getInfo:()Landroid/graphics/pdf/PdfDocument$PageInfo;\n // 255: invokevirtual android/graphics/pdf/PdfDocument$PageInfo.getContentRect:()Landroid/graphics/Rect;\n // 258: invokespecial android/graphics/RectF.<init>:(Landroid/graphics/Rect;)V\n // 261: aload 7\n // 263: aload 8\n // 265: invokevirtual android/print/pdf/PrintedPdfDocument.finishPage:(Landroid/graphics/pdf/PdfDocument$Page;)V\n // 268: aload 7\n // 270: invokevirtual android/print/pdf/PrintedPdfDocument.close:()V\n // 273: goto 104\n // 276: astore_1 \n // 277: aload_3 \n // 278: invokevirtual android/print/pdf/PrintedPdfDocument.close:()V\n // 281: aload_0 \n // 282: getfield android/support/v4/print/PrintHelperKitkat$2.val$fileDescriptor:Landroid/os/ParcelFileDescriptor;\n // 285: astore_2 \n // 286: aload_2 \n // 287: ifnull 297\n // 290: aload_0 \n // 291: getfield android/support/v4/print/PrintHelperKitkat$2.val$fileDescriptor:Landroid/os/ParcelFileDescriptor;\n // 294: invokevirtual android/os/ParcelFileDescriptor.close:()V\n // 297: aload 4\n // 299: aload_0 \n // 300: getfield android/support/v4/print/PrintHelperKitkat$2.val$bitmap:Landroid/graphics/Bitmap;\n // 303: if_acmpeq 311\n // 306: aload 4\n // 308: invokevirtual android/graphics/Bitmap.recycle:()V\n // 311: aload_1 \n // 312: athrow \n // 313: aload 7\n // 315: aload_1 \n // 316: getfield android/graphics/RectF.left:F\n // 319: aload_1 \n // 320: getfield android/graphics/RectF.top:F\n // 323: invokevirtual android/graphics/Matrix.postTranslate:(FF)Z\n // 326: pop \n // 327: aload 6\n // 329: invokevirtual android/graphics/pdf/PdfDocument$Page.getCanvas:()Landroid/graphics/Canvas;\n // 332: aload_1 \n // 333: invokevirtual android/graphics/Canvas.clipRect:(Landroid/graphics/RectF;)Z\n // 336: pop \n // 337: goto 138\n // 340: new Ljava/io/FileOutputStream;\n // 343: astore_1 \n // 344: aload_1 \n // 345: aload_0 \n // 346: getfield android/support/v4/print/PrintHelperKitkat$2.val$fileDescriptor:Landroid/os/ParcelFileDescriptor;\n // 349: invokevirtual android/os/ParcelFileDescriptor.getFileDescriptor:()Ljava/io/FileDescriptor;\n // 352: invokespecial java/io/FileOutputStream.<init>:(Ljava/io/FileDescriptor;)V\n // 355: aload_3 \n // 356: aload_1 \n // 357: invokevirtual android/print/pdf/PrintedPdfDocument.writeTo:(Ljava/io/OutputStream;)V\n // 360: aload_3 \n // 361: invokevirtual android/print/pdf/PrintedPdfDocument.close:()V\n // 364: aload_0 \n // 365: getfield android/support/v4/print/PrintHelperKitkat$2.val$fileDescriptor:Landroid/os/ParcelFileDescriptor;\n // 368: astore_1 \n // 369: aload_1 \n // 370: ifnull 380\n // 373: aload_0 \n // 374: getfield android/support/v4/print/PrintHelperKitkat$2.val$fileDescriptor:Landroid/os/ParcelFileDescriptor;\n // 377: invokevirtual android/os/ParcelFileDescriptor.close:()V\n // 380: aload_2 \n // 381: astore_1 \n // 382: aload 4\n // 384: aload_0 \n // 385: getfield android/support/v4/print/PrintHelperKitkat$2.val$bitmap:Landroid/graphics/Bitmap;\n // 388: if_acmpeq 14\n // 391: aload 4\n // 393: invokevirtual android/graphics/Bitmap.recycle:()V\n // 396: aload_2 \n // 397: astore_1 \n // 398: goto 14\n // 401: astore_2 \n // 402: goto 297\n // 405: astore_1 \n // 406: goto 380\n // 409: astore_1 \n // 410: goto 191\n // Exceptions:\n // Try Handler\n // Start End Start End Type \n // ----- ----- ----- ----- ---------------------\n // 2 12 212 216 Ljava/lang/Throwable;\n // 16 64 212 216 Ljava/lang/Throwable;\n // 71 104 276 313 Any\n // 104 138 276 313 Any\n // 138 166 276 313 Any\n // 171 180 212 216 Ljava/lang/Throwable;\n // 184 191 409 413 Ljava/io/IOException;\n // 184 191 212 216 Ljava/lang/Throwable;\n // 193 207 212 216 Ljava/lang/Throwable;\n // 216 273 276 313 Any\n // 277 286 212 216 Ljava/lang/Throwable;\n // 290 297 401 405 Ljava/io/IOException;\n // 290 297 212 216 Ljava/lang/Throwable;\n // 297 311 212 216 Ljava/lang/Throwable;\n // 311 313 212 216 Ljava/lang/Throwable;\n // 313 337 276 313 Any\n // 340 360 276 313 Any\n // 360 369 212 216 Ljava/lang/Throwable;\n // 373 380 405 409 Ljava/io/IOException;\n // 373 380 212 216 Ljava/lang/Throwable;\n // 382 396 212 216 Ljava/lang/Throwable;\n // \n // The error that occurred was:\n // \n // java.lang.IndexOutOfBoundsException: Index 199 out-of-bounds for length 199\n // at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)\n // at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)\n // at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)\n // at java.base/java.util.Objects.checkIndex(Objects.java:372)\n // at java.base/java.util.ArrayList.get(ArrayList.java:439)\n // at com.strobel.decompiler.ast.AstBuilder.convertToAst(AstBuilder.java:3321)\n // at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:113)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:211)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformCall(AstMethodBodyBuilder.java:1164)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:1009)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:554)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformNode(AstMethodBodyBuilder.java:392)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformBlock(AstMethodBodyBuilder.java:333)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:294)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:330)\n // at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:251)\n // at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:126)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"public int method_7084(String param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"public ecDSA() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA.<init>():void\");\n }",
"public GenObfuscatedString() {\n }",
"static void method_461() {\r\n // $FF: Couldn't be decompiled\r\n }",
"AnonymousClass1(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.1.<init>(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.1.<init>(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }",
"@Override\n public final void run() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 3: invokevirtual cd.I:()V\n // 6: getstatic u.Code:Lbn;\n // 9: invokeinterface bn.p:()Z\n // 14: ifne 43\n // 17: aload_0 \n // 18: monitorenter \n // 19: invokestatic com/opera/mini/android/bf.c:()Z\n // 22: ifne 62\n // 25: aload_0 \n // 26: iconst_0 \n // 27: invokestatic cg.Code:(Ljava/lang/Object;I)V\n // 30: getstatic u.Code:Lbn;\n // 33: invokeinterface bn.p:()Z\n // 38: ifeq 62\n // 41: aload_0 \n // 42: monitorexit \n // 43: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 46: ifnull 55\n // 49: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 52: invokevirtual com/opera/mini/android/k.g:()V\n // 55: invokestatic com/opera/mini/android/bf.B:()Lcd;\n // 58: invokevirtual cd.Z:()V\n // 61: return \n // 62: invokestatic com/opera/mini/android/bf.d:()Z\n // 65: pop \n // 66: invokestatic com/opera/mini/android/bf.e:()I\n // 69: istore_1 \n // 70: invokestatic com/opera/mini/android/bf.f:()I\n // 73: istore_2 \n // 74: invokestatic com/opera/mini/android/bf.g:()I\n // 77: istore_3 \n // 78: invokestatic com/opera/mini/android/bf.h:()I\n // 81: istore 4\n // 83: iconst_0 \n // 84: invokestatic com/opera/mini/android/bf.Code:(I)I\n // 87: pop \n // 88: aload_0 \n // 89: monitorexit \n // 90: aload_0 \n // 91: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 94: invokevirtual com/opera/mini/android/bf.getWidth:()I\n // 97: istore 5\n // 99: aload_0 \n // 100: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 103: invokevirtual com/opera/mini/android/bf.getHeight:()I\n // 106: istore 6\n // 108: iload 5\n // 110: ifle 6\n // 113: iload 6\n // 115: ifle 6\n // 118: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 121: ifnull 146\n // 124: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 127: invokevirtual android/graphics/Bitmap.getWidth:()I\n // 130: iload 5\n // 132: if_icmpne 146\n // 135: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 138: invokevirtual android/graphics/Bitmap.getHeight:()I\n // 141: iload 6\n // 143: if_icmpeq 209\n // 146: aconst_null \n // 147: invokestatic com/opera/mini/android/bf.Code:(Lcom/opera/mini/android/k;)Lcom/opera/mini/android/k;\n // 150: pop \n // 151: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 154: ifnull 168\n // 157: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 160: invokevirtual android/graphics/Bitmap.recycle:()V\n // 163: aconst_null \n // 164: invokestatic com/opera/mini/android/bf.Code:(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;\n // 167: pop \n // 168: iload 5\n // 170: iload 6\n // 172: invokestatic com/opera/mini/android/bg.Code:(II)Landroid/graphics/Bitmap;\n // 175: invokestatic com/opera/mini/android/bf.Code:(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;\n // 178: pop \n // 179: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 182: ifnull 55\n // 185: aload_0 \n // 186: monitorenter \n // 187: invokestatic com/opera/mini/android/bf.j:()I\n // 190: pop \n // 191: invokestatic com/opera/mini/android/bf.k:()I\n // 194: pop \n // 195: iload 5\n // 197: invokestatic com/opera/mini/android/bf.Code:(I)I\n // 200: pop \n // 201: iload 6\n // 203: invokestatic com/opera/mini/android/bf.I:(I)I\n // 206: pop \n // 207: aload_0 \n // 208: monitorexit \n // 209: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 212: ifnonnull 242\n // 215: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 218: invokestatic com/opera/mini/android/k.I:(Landroid/graphics/Bitmap;)Lcom/opera/mini/android/k;\n // 221: invokestatic com/opera/mini/android/bf.Code:(Lcom/opera/mini/android/k;)Lcom/opera/mini/android/k;\n // 224: pop \n // 225: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 228: iconst_1 \n // 229: invokevirtual com/opera/mini/android/k.Code:(Z)V\n // 232: aload_0 \n // 233: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 236: invokestatic com/opera/mini/android/bf.Code:(Lcom/opera/mini/android/bf;)Lcom/opera/mini/android/MiniView;\n // 239: invokevirtual com/opera/mini/android/MiniView.I:()V\n // 242: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 245: invokevirtual com/opera/mini/android/k.a:()Z\n // 248: ifeq 290\n // 251: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 254: iload_1 \n // 255: iload_2 \n // 256: iload_3 \n // 257: iload 4\n // 259: invokevirtual com/opera/mini/android/k.Code:(IIII)V\n // 262: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 265: iload_1 \n // 266: iload_2 \n // 267: iload_3 \n // 268: iload 4\n // 270: ldc 16777215\n // 272: invokevirtual com/opera/mini/android/k.Z:(IIIII)V\n // 275: getstatic com/opera/mini/android/Browser.Code:Lcom/opera/mini/android/a;\n // 278: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 281: invokevirtual com/opera/mini/android/a.Code:(Law;)V\n // 284: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 287: invokevirtual com/opera/mini/android/k.b:()V\n // 290: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 293: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 296: invokevirtual com/opera/mini/android/k.Code:(Landroid/graphics/Bitmap;)V\n // 299: aload_0 \n // 300: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 303: invokestatic com/opera/mini/android/bf.I:(Lcom/opera/mini/android/bf;)Landroid/view/SurfaceHolder;\n // 306: invokeinterface android/view/SurfaceHolder.lockCanvas:()Landroid/graphics/Canvas;\n // 311: astore 7\n // 313: aload 7\n // 315: ifnull 6\n // 318: aload 7\n // 320: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 323: fconst_0 \n // 324: fconst_0 \n // 325: aconst_null \n // 326: invokevirtual android/graphics/Canvas.drawBitmap:(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V\n // 329: aload_0 \n // 330: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 333: invokestatic com/opera/mini/android/bf.I:(Lcom/opera/mini/android/bf;)Landroid/view/SurfaceHolder;\n // 336: aload 7\n // 338: invokeinterface android/view/SurfaceHolder.unlockCanvasAndPost:(Landroid/graphics/Canvas;)V\n // 343: goto 6\n // 346: astore 7\n // 348: invokestatic com/opera/mini/android/bf.B:()Lcd;\n // 351: invokevirtual cd.Z:()V\n // 354: aload 7\n // 356: athrow \n // 357: astore 7\n // 359: aload_0 \n // 360: monitorexit \n // 361: aload 7\n // 363: athrow \n // 364: astore 7\n // 366: aload_0 \n // 367: monitorexit \n // 368: aload 7\n // 370: athrow \n // Exceptions:\n // Try Handler\n // Start End Start End Type\n // ----- ----- ----- ----- ----\n // 6 19 346 357 Any\n // 19 43 357 364 Any\n // 43 55 346 357 Any\n // 62 90 357 364 Any\n // 90 108 346 357 Any\n // 118 146 346 357 Any\n // 146 168 346 357 Any\n // 168 187 346 357 Any\n // 187 209 364 371 Any\n // 209 242 346 357 Any\n // 242 290 346 357 Any\n // 290 313 346 357 Any\n // 318 343 346 357 Any\n // 359 364 346 357 Any\n // 366 371 346 357 Any\n // \n // The error that occurred was:\n // \n // java.lang.IndexOutOfBoundsException: Index: 163, Size: 163\n // at java.util.ArrayList.rangeCheck(ArrayList.java:659)\n // at java.util.ArrayList.get(ArrayList.java:435)\n // at com.strobel.decompiler.ast.AstBuilder.convertToAst(AstBuilder.java:3379)\n // at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:113)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:206)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:94)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:840)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:733)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:610)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:577)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:193)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:160)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:135)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:333)\n // at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:254)\n // at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:144)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"private android.graphics.Bitmap m6555f() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r5 = this;\n r0 = r5.getWidth();\n r1 = r5.getHeight();\n r2 = m6543a(r0, r1);\t Catch:{ OutOfMemoryError -> 0x000d }\n return r2;\n L_0x000d:\n r2 = \"ShimmerFrameLayout failed to create working bitmap\";\n r3 = new java.lang.StringBuilder;\n r3.<init>(r2);\n r2 = \" (width = \";\n r3.append(r2);\n r3.append(r0);\n r0 = \", height = \";\n r3.append(r0);\n r3.append(r1);\n r0 = \")\\n\\n\";\n r3.append(r0);\n r0 = java.lang.Thread.currentThread();\n r0 = r0.getStackTrace();\n r1 = r0.length;\n r2 = 0;\n L_0x0033:\n if (r2 >= r1) goto L_0x0046;\n L_0x0035:\n r4 = r0[r2];\n r4 = r4.toString();\n r3.append(r4);\n r4 = \"\\n\";\n r3.append(r4);\n r2 = r2 + 1;\n goto L_0x0033;\n L_0x0046:\n r0 = r3.toString();\n r1 = \"ShimmerFrameLayout\";\n android.util.Log.d(r1, r0);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.shimmer.ShimmerFrameLayout.f():android.graphics.Bitmap\");\n }",
"protected void method_2246(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"boolean m25333a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = this;\n java.lang.Class.forName(r1);\t Catch:{ ClassNotFoundException -> 0x0005 }\n r1 = 1;\n return r1;\n L_0x0005:\n r1 = 0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mapbox.android.core.location.c.a(java.lang.String):boolean\");\n }",
"private boolean m4b(Context context) {\n if (context == null) {\n return false;\n }\n f3d = context;\n mPKName = getBaseContext().getPackageName();\n ApplicationInfo applicationInfo = null;\n try {\n applicationInfo = context.getPackageManager().getApplicationInfo(mPKName, 128);\n } catch (NameNotFoundException e) {\n }\n if (applicationInfo == null) {\n return false;\n }\n mOldAPPName = applicationInfo.metaData.getString(\"TxAppEntry\");\n mSrcPath = f3d.getApplicationInfo().sourceDir;\n try {\n f6g = f3d.getPackageManager().getPackageInfo(mPKName, 0).versionName;\n } catch (Exception e2) {\n }\n mVerFilePath = \"/data/data/\";\n mVerFilePath += mPKName;\n mVerFilePath += \"/tx_shell/\";\n f0a = mVerFilePath;\n File file = new File(mVerFilePath);\n if (!file.exists()) {\n file.mkdir();\n }\n f4e = mVerFilePath + \"libshella.so\";\n f5f = mVerFilePath + \"libshellb.so\";\n mSocPath = mVerFilePath + \"libshellc.so\";\n mVerFilePath += m11g();\n return true;\n }",
"AnonymousClass3(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.3.<init>(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.3.<init>(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }",
"void optimize(android.icu.text.UnicodeSet r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.icu.impl.coll.CollationDataBuilder.optimize(android.icu.text.UnicodeSet):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.optimize(android.icu.text.UnicodeSet):void\");\n }",
"public void method_2197() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private NativeSupport() {\n\t}",
"public X509V1CertificateGenerator() {\n /*\n // Can't load method instructions: Load method exception: null in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.<init>():void, dex: in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.<init>():void\");\n }",
"AnonymousClass2(android.telecom.ConnectionServiceAdapterServant r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.telecom.ConnectionServiceAdapterServant.2.<init>(android.telecom.ConnectionServiceAdapterServant):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.<init>(android.telecom.ConnectionServiceAdapterServant):void\");\n }",
"public boolean getUsePrecompiled();",
"static com.android.keyguard.KeyguardUpdateMonitor.SimData fromIntent(android.content.Intent r9) {\n /*\n // Method dump skipped, instructions count: 162\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.keyguard.KeyguardUpdateMonitor.SimData.fromIntent(android.content.Intent):com.android.keyguard.KeyguardUpdateMonitor$SimData\");\n }",
"private static String m19532b(Context context) {\n String str = null;\n try {\n ApplicationInfo applicationInfo = context.getApplicationInfo();\n if (applicationInfo == null) {\n return null;\n }\n str = applicationInfo.sourceDir;\n return str;\n } catch (Throwable unused) {\n }\n }",
"static /* synthetic */ void m201-wrap5(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap5(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap5(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }",
"private boolean m2248a(java.lang.String r3, com.onesignal.La.C0596a r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/318857719.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = 0;\n r1 = 1;\n java.lang.Float.parseFloat(r3);\t Catch:{ Throwable -> 0x0007 }\n r3 = 1;\n goto L_0x0008;\n L_0x0007:\n r3 = 0;\n L_0x0008:\n if (r3 != 0) goto L_0x0017;\n L_0x000a:\n r3 = com.onesignal.sa.C0650i.ERROR;\n r1 = \"Missing Google Project number!\\nPlease enter a Google Project number / Sender ID on under App Settings > Android > Configuration on the OneSignal dashboard.\";\n com.onesignal.sa.m1656a(r3, r1);\n r3 = 0;\n r1 = -6;\n r4.mo1392a(r3, r1);\n return r0;\n L_0x0017:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.Pa.a(java.lang.String, com.onesignal.La$a):boolean\");\n }",
"private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }",
"public static void m5812a(java.lang.String r0, java.lang.String r1, java.lang.String r2) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r2 = new com.crashlytics.android.answers.AddToCartEvent;\n r2.<init>();\n r2.putItemType(r0);\n r0 = java.lang.Long.parseLong(r1);\t Catch:{ Exception -> 0x0013 }\n r0 = java.math.BigDecimal.valueOf(r0);\t Catch:{ Exception -> 0x0013 }\n r2.putItemPrice(r0);\t Catch:{ Exception -> 0x0013 }\n L_0x0013:\n r0 = java.util.Locale.getDefault();\n r0 = java.util.Currency.getInstance(r0);\n r2.putCurrency(r0);\n r0 = com.crashlytics.android.answers.Answers.getInstance();\n r0.logAddToCart(r2);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String):void\");\n }",
"@java.lang.Deprecated\n /* renamed from: a */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static synchronized void m13804a(android.content.Context r3, com.facebook.C6787r.C6788a r4) {\n /*\n java.lang.Class<com.facebook.r> r0 = com.facebook.C6787r.class\n monitor-enter(r0)\n java.lang.Boolean r1 = f12487s // Catch:{ all -> 0x0088 }\n boolean r1 = r1.booleanValue() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0012\n if (r4 == 0) goto L_0x0010\n r4.mo20141a() // Catch:{ all -> 0x0088 }\n L_0x0010:\n monitor-exit(r0)\n return\n L_0x0012:\n java.lang.String r1 = \"applicationContext\"\n com.facebook.internal.C6697T.m13461a(r3, r1) // Catch:{ all -> 0x0088 }\n r1 = 0\n com.facebook.internal.C6697T.m13460a(r3, r1) // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6697T.m13466b(r3, r1) // Catch:{ all -> 0x0088 }\n android.content.Context r1 = r3.getApplicationContext() // Catch:{ all -> 0x0088 }\n f12481m = r1 // Catch:{ all -> 0x0088 }\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n m13810b(r1) // Catch:{ all -> 0x0088 }\n java.lang.String r1 = f12472d // Catch:{ all -> 0x0088 }\n boolean r1 = com.facebook.internal.C6694S.m13436b(r1) // Catch:{ all -> 0x0088 }\n if (r1 != 0) goto L_0x0080\n r1 = 1\n java.lang.Boolean r1 = java.lang.Boolean.valueOf(r1) // Catch:{ all -> 0x0088 }\n f12487s = r1 // Catch:{ all -> 0x0088 }\n boolean r1 = m13817g() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0041\n m13812c() // Catch:{ all -> 0x0088 }\n L_0x0041:\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n boolean r1 = r1 instanceof android.app.Application // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0056\n boolean r1 = com.facebook.C6557O.m12974e() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0056\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n android.app.Application r1 = (android.app.Application) r1 // Catch:{ all -> 0x0088 }\n java.lang.String r2 = f12472d // Catch:{ all -> 0x0088 }\n com.facebook.p127a.p130b.C6602h.m13083a(r1, r2) // Catch:{ all -> 0x0088 }\n L_0x0056:\n com.facebook.internal.C6670D.m13313f() // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6678J.m13355d() // Catch:{ all -> 0x0088 }\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6712c.m13522a(r1) // Catch:{ all -> 0x0088 }\n com.facebook.internal.G r1 = new com.facebook.internal.G // Catch:{ all -> 0x0088 }\n com.facebook.o r2 = new com.facebook.o // Catch:{ all -> 0x0088 }\n r2.<init>() // Catch:{ all -> 0x0088 }\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n f12480l = r1 // Catch:{ all -> 0x0088 }\n java.util.concurrent.FutureTask r1 = new java.util.concurrent.FutureTask // Catch:{ all -> 0x0088 }\n com.facebook.p r2 = new com.facebook.p // Catch:{ all -> 0x0088 }\n r2.<init>(r4, r3) // Catch:{ all -> 0x0088 }\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n java.util.concurrent.Executor r2 = m13822l() // Catch:{ all -> 0x0088 }\n r2.execute(r1) // Catch:{ all -> 0x0088 }\n monitor-exit(r0)\n return\n L_0x0080:\n com.facebook.FacebookException r1 = new com.facebook.FacebookException // Catch:{ all -> 0x0088 }\n java.lang.String r2 = \"A valid Facebook app id must be set in the AndroidManifest.xml or set by calling FacebookSdk.setApplicationId before initializing the sdk.\"\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n throw r1 // Catch:{ all -> 0x0088 }\n L_0x0088:\n r3 = move-exception\n monitor-exit(r0)\n throw r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.C6787r.m13804a(android.content.Context, com.facebook.r$a):void\");\n }",
"public ecDSA224() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA224.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA224.<init>():void\");\n }",
"private NavDebug() {\r\n }",
"AnonymousClass2(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.2.<init>(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.2.<init>(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }",
"protected void onCompileInternal() {\r\n\t}"
] | [
"0.55802613",
"0.5539073",
"0.54817873",
"0.5477881",
"0.5476527",
"0.5425943",
"0.53528875",
"0.5347903",
"0.53287023",
"0.5326589",
"0.5322581",
"0.5309605",
"0.5271268",
"0.5259931",
"0.5247718",
"0.52468586",
"0.52427876",
"0.5232762",
"0.52188414",
"0.51883596",
"0.51852155",
"0.5180439",
"0.5180439",
"0.5174916",
"0.5174833",
"0.51384443",
"0.5119401",
"0.51159835",
"0.51142114",
"0.5105206",
"0.51028025",
"0.5095734",
"0.5092511",
"0.5085832",
"0.5081251",
"0.5074133",
"0.5063383",
"0.50629926",
"0.50625455",
"0.50534505",
"0.5051582",
"0.5049857",
"0.50411075",
"0.5035911",
"0.5031182",
"0.50262535",
"0.50201154",
"0.5014461",
"0.5006702",
"0.4992652",
"0.4989184",
"0.49798644",
"0.49682838",
"0.49671575",
"0.49602735",
"0.49423417",
"0.49403253",
"0.49389905",
"0.49295223",
"0.49288046",
"0.49239674",
"0.49107438",
"0.48916182",
"0.48910478",
"0.4887521",
"0.4887205",
"0.48792574",
"0.48785216",
"0.48714536",
"0.48710766",
"0.4868654",
"0.48552573",
"0.4853867",
"0.484958",
"0.4845332",
"0.48422456",
"0.48415855",
"0.48395112",
"0.48362607",
"0.48280925",
"0.48249543",
"0.48168945",
"0.4816864",
"0.4816163",
"0.48056754",
"0.48037198",
"0.4801984",
"0.47995892",
"0.4799004",
"0.47974667",
"0.47797915",
"0.47714645",
"0.47667572",
"0.4766322",
"0.4758874",
"0.4755853",
"0.4754891",
"0.47523156",
"0.47504115",
"0.4746582",
"0.47389776"
] | 0.0 | -1 |
FrmBuscaPrestamo frm = new FrmBuscaPrestamo(); dkpEscritorio.add(frm); frm.setVisible(true); | public void mniBuscarPrestamoActionPerformed(ActionEvent e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showFrmMantenerEmpleado(){\n this.mFrmMantenerEmpleado.setVisible(true);\n }",
"public FrmBusquedas() {\n initComponents();\n jButton3.setVisible(true);\n Dimension desktopSize = VistaPrincipal.jDesktopPane1.getSize();\n Dimension jInternalFrameSize = this.getSize();\n this.setLocation((desktopSize.width - jInternalFrameSize.width) / 2, 4);\n\n ((DesktopConFondo) fonbusqueda).setImagen(\"onda.jpg\");\n\n }",
"private void btnEntrarActionPerformed(java.awt.event.ActionEvent evt) {\n dispose();\n Alumno.Aula = jcbAula.getSelectedItem().toString();\n Alumno.Materia = \"\";\n Info_Computo a1 = new Info_Computo();\n a1.setVisible(true);\n }",
"public Consultar_Cita() {\n initComponents();\n this.setLocationRelativeTo(null);\n mostrartabla(\"\");\n //Llenar();\n }",
"protected void limparCampos() {\n\t\tdispose();\r\n\t\tFrmCadastroMidias f = new FrmCadastroMidias();\r\n\t\tf.setLocationRelativeTo(null);\r\n\t\tf.setVisible(true);\r\n\t}",
"public JFrameFormularioProducto() {\n initComponents();\n }",
"public frmAfiliado() {\n initComponents();\n \n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n pnlMemoria.setBackground(Color.GRAY);\n g = pnlMemoria.getGraphics();\n pnlMemoria.paintComponents(g);\n txtTablaProcesos.setEditable(false);\n listProcesos.setModel(procesos_en_disco);\n Proceso proceso = new Proceso(\"Sistema Operativo\");\n proceso.start();\n }",
"public FORMRECOMP() {\n initComponents();\n this.setLocationRelativeTo(null);\n inicializa_controles();\n cerrar_ventan_recibo();\n }",
"public frmSecundarioInterno() {\n initComponents();\n }",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n if(serializa.CargarTfg().isEmpty()){\n JOptionPane.showMessageDialog(this, \"TODAVÍA NO HAY TFGS REGISTRADOS\", \"INFORMACION\", JOptionPane.INFORMATION_MESSAGE);\n }else{\n InterfazVisualizarTfg lt = new InterfazVisualizarTfg(this.u, this.serializa){\n @Override\n public void dispose(){\n //Hacemos visible la principal\n getFrame().setVisible(true);\n //Cerramos\n super.dispose();\n }\n };\n this.setVisible(false);\n lt.setVisible(true); \n }\n \n }",
"private void initialize() {\r\n\t\tfrmCompraDeInsumos = new JFrame();\r\n\t\tfrmCompraDeInsumos.setTitle(\"Compra de Insumos\");\r\n\t\tfrmCompraDeInsumos.setBounds(100, 100, 1080, 720);\r\n\t\tfrmCompraDeInsumos.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tfrmCompraDeInsumos.setLocationRelativeTo(null);\r\n\t\tfrmCompraDeInsumos.setResizable(false);\r\n\t\t\r\n\t\t compra.setIdFazenda(Principal.fazenda.getIdFazenda());\r\n\t\t\r\n\t\tJLabel lblCompraDeInsumos = new JLabel(\"Compra de Insumos\");\r\n\t\tlblCompraDeInsumos.setForeground(Color.WHITE);\r\n\t\tlblCompraDeInsumos.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblCompraDeInsumos.setFont(new Font(\"Arial\", Font.BOLD, 25));\r\n\t\tlblCompraDeInsumos.setBounds(0, 11, 1074, 39);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(lblCompraDeInsumos);\r\n\t\t\r\n\t\tJLabel lblProduto = new JLabel(\"Produto:\");\r\n\t\tlblProduto.setForeground(Color.WHITE);\r\n\t\tlblProduto.setFont(new Font(\"Arial\", Font.BOLD, 14));\r\n\t\tlblProduto.setBounds(10, 80, 78, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(lblProduto);\r\n\t\t\r\n\t\ttfProduto = new JTextField();\r\n\t\ttfProduto.addKeyListener(new KeyAdapter() {\r\n\t\t\t//EVENTO PARA QUANDO APERTAR \"ENTER\" DAR FOCO EM OUTRA CAIXA DE TEXTO\r\n\t\t\t@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\r\n\t\t\t\tif (arg0.getKeyCode()==arg0.VK_ENTER) {\r\n\t\t\t\t\ttxtFornecedor.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\ttfProduto.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\ttfProduto.setBounds(108, 82, 200, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(tfProduto);\r\n\t\ttfProduto.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblDataDaCompra = new JLabel(\"Data da Compra:\");\r\n\t\tlblDataDaCompra.setForeground(Color.WHITE);\r\n\t\tlblDataDaCompra.setFont(new Font(\"Arial\", Font.BOLD, 14));\r\n\t\tlblDataDaCompra.setBounds(405, 80, 125, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(lblDataDaCompra);\r\n\t\t\r\n\t\t//VARIAVEL PARA PEGAR A DATA DO DIA ATUAL DO SEU COMPUTADOR\r\n\t\tDate data = new Date();\r\n\t\tSimpleDateFormat formato = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n\t\tString formatada = formato.format(data);\r\n\t\t\r\n\t\ttfData = new JTextField();\r\n\t\ttfData.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\ttfData.setToolTipText(\"As datas s\\u00E3o obtidas a partir do seu computador.\\r\\nCorrija se for necess\\u00E1rio.\");\r\n\t\ttfData.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\ttfData.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttfData.setBounds(546, 80, 188, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(tfData);\r\n\t\ttfData.setColumns(10);\r\n\t\ttfData.setText(formatada);\r\n\t\t\r\n\t\tJLabel lblNumeroDaNota = new JLabel(\"Numero da Nota:\");\r\n\t\tlblNumeroDaNota.setForeground(Color.WHITE);\r\n\t\tlblNumeroDaNota.setFont(new Font(\"Arial\", Font.BOLD, 14));\r\n\t\tlblNumeroDaNota.setBounds(405, 111, 131, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(lblNumeroDaNota);\r\n\t\t\r\n\t\ttfNota = new JTextField();\r\n\t\ttfNota.addKeyListener(new KeyAdapter() {\r\n\t\t\t//EVENTO PARA QUANDO APERTAR \"ENTER\" DAR FOCO EM OUTRA CAIXA DE TEXTO\r\n\t\t\t@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tif (e.getKeyCode()==e.VK_ENTER) {\r\n\t\t\t\t\ttfPreco.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttfNota.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\ttfNota.setColumns(10);\r\n\t\ttfNota.setBounds(546, 111, 188, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(tfNota);\r\n\t\t\r\n\t\tJLabel lblPreo = new JLabel(\"Pre\\u00E7o:\");\r\n\t\tlblPreo.setForeground(Color.WHITE);\r\n\t\tlblPreo.setFont(new Font(\"Arial\", Font.BOLD, 14));\r\n\t\tlblPreo.setBounds(787, 80, 57, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(lblPreo);\r\n\t\t\r\n\r\n\t\t\r\n\t\t\r\n\t\ttfPreco = new JTextField();\r\n\t\ttfPreco.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent arg0) {\r\n\t\t\t}\r\n\t\t});\r\n\t\ttfPreco.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\ttfPreco.setBounds(886, 81, 164, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(tfPreco);\r\n\t\ttfPreco.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblFornecedor = new JLabel(\"Fornecedor:\");\r\n\t\tlblFornecedor.setForeground(Color.WHITE);\r\n\t\tlblFornecedor.setFont(new Font(\"Arial\", Font.BOLD, 14));\r\n\t\tlblFornecedor.setBounds(10, 111, 100, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(lblFornecedor);\r\n\t\t\r\n\t\ttxtFornecedor = new JTextField();\r\n\t\ttxtFornecedor.addKeyListener(new KeyAdapter() {\r\n\t\t\t//EVENTO PARA QUANDO APERTAR \"ENTER\" DAR FOCO EM OUTRA CAIXA DE TEXTO\r\n\t\t\t@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tif (e.getKeyCode()==e.VK_ENTER) {\r\n\t\t\t\t\ttfCNPJ.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttxtFornecedor.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\ttxtFornecedor.setBounds(108, 112, 200, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(txtFornecedor);\r\n\t\ttxtFornecedor.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblCnpj = new JLabel(\"CNPJ:\");\r\n\t\tlblCnpj.setForeground(Color.WHITE);\r\n\t\tlblCnpj.setFont(new Font(\"Arial\", Font.BOLD, 14));\r\n\t\tlblCnpj.setBounds(10, 142, 66, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(lblCnpj);\r\n\t\t\r\n\t\ttfCNPJ = new JTextField();\r\n\t\ttfCNPJ.addKeyListener(new KeyAdapter() {\r\n\t\t\t//EVENTO PARA QUANDO APERTAR \"ENTER\" DAR FOCO EM OUTRA CAIXA DE TEXTO\r\n\t\t\t@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tif (e.getKeyCode()==e.VK_ENTER) {\r\n\t\t\t\t\ttfNota.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttfCNPJ.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\ttfCNPJ.setBounds(108, 143, 200, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(tfCNPJ);\r\n\t\ttfCNPJ.setColumns(10);\r\n\t\t\r\n\t\t//BOTÃO SALVAR E ADD OS DADOS NA TABELA DO BD\r\n\t\tJButton btnSalvar = new JButton(\"Salvar\");\r\n\t\tbtnSalvar.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\t//COMEÇO DO TRATAMENTO DE INFORMAÇÃO \r\n\t\t\t\t\tif(tfProduto.getText().trim().equals(\"\")) {\r\n\t\t\t\t\t\ttfProduto.requestFocus();\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Insira um Produto!\", \"ALERTA!\",JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(txtFornecedor.getText().trim().equals(\"\")){\r\n\t\t\t\t\t\ttxtFornecedor.requestFocus();\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Insira um Fornecedor!\", \"ALERTA!\",JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(tfCNPJ.getText().trim().equals(\"\")) {\r\n\t\t\t\t\t\tint x = JOptionPane.showConfirmDialog(null, \"Você deseja deixar o CNPJ nulo?\", \"ALERTA!\",JOptionPane.WARNING_MESSAGE,JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\t\tif (x==0) {\r\n\t\t\t\t\t\t\ttfCNPJ.setText(\"0000\");\r\n\t\t\t\t\t\t\ttfNota.requestFocus();\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\ttfCNPJ.requestFocus();\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\tif(tfNota.getText().trim().equals(\"\")) {\r\n\t\t\t\t\t\tint x = JOptionPane.showConfirmDialog(null, \"Você deseja deixar a nota como nulo?\", \"ALERTA!\",JOptionPane.WARNING_MESSAGE,JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\t\tif (x==0) {\r\n\t\t\t\t\t\t\ttfNota.setText(\"0000\");\r\n\t\t\t\t\t\t\ttfPreco.requestFocus();\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\ttfNota.requestFocus();\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\tif(tfPreco.getText().trim().equals(\"\")) {\r\n\t\t\t\t\t\ttfPreco.requestFocus();\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Insira um valor!\", \"ALERTA!\",JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (spinner.getValue().equals(0)) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Insira uma quantidade!\", \"ALERTA!\",JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\t\tspinner.requestFocus();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}//FIM DOS TESTES DE TRATAMENTO DE INFORMAÇÃO\r\n\t\t\t\t\tx1=0;\r\n\t\t\t\t\tcolocaDadosDAO();\r\n\t\t\t\t\tnew CrudCompras().addCompras(addCompras);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ADD LINHA NA TABELA DEPOIS DE SALVAR OS DADOS\r\n\t\t\t\t\tif (table.getRowCount()<=19) {\r\n\t\t\t\t\t\tint x = (teste*16)+scrollPane.getHeight();\r\n\t\t\t\t\t\tscrollPane.setBounds(26,290 , 1024, x);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcriaTabela(new CrudCompras().selecionaCompras(compra));\r\n\t\t\t\t\tbtnLimpar.doClick();\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Dados salvos com sucesso!\",\"SUCESSO!\",JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t//TESTE DE SALVAR AS ALTERAÇÕES \r\n\t\t\t\t\tif (editar==0) {\r\n\t\t\t\t\t\tint resposta = JOptionPane.showConfirmDialog(null, \"Você deseja alterar os dados já salvos?\",\"ALERTA\",JOptionPane.WARNING_MESSAGE, JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\t\tif (resposta == 0) {\r\n\t\t\t\t\t\t\tupdate();\r\n\t\t\t\t\t\t\tnew CrudCompras().updCompras(addCompras);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSalvar.setBounds(941, 637, 89, 23);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(btnSalvar);\r\n\t\t\r\n\t\t//LIMPAR TODOS OS DADOS \r\n\t\tbtnLimpar = new JButton(\"Limpar\");\r\n\t\tbtnLimpar.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\ttfCNPJ.setText(null);\r\n\t\t\t\tspinner.setValue(0);\r\n\t\t\t\ttfNota.setText(null);\r\n\t\t\t\ttfProduto.setText(null);\r\n\t\t\t\ttfPreco.setText(null);\r\n\t\t\t\ttxtFornecedor.setText(null);\r\n\t\t\t\ttfProduto.requestFocus();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnLimpar.setBounds(840, 637, 89, 23);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(btnLimpar);\r\n\t\t\r\n\t\t//CANCELAR A OPERAÇÃO E VOLTAR PARA A TELA PRINCIPAL\r\n\t\tJButton btnCancelar = new JButton(\"Cancelar\");\r\n\t\tbtnCancelar.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tfrmCompraDeInsumos.dispose();\r\n\t\t\t\tPrincipal.frmPrincipal.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCancelar.setBounds(741, 637, 89, 23);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(btnCancelar);\r\n\t\t\r\n\t\t\r\n\t\tJLabel lblQuantidade = new JLabel(\"Quantidade:\");\r\n\t\tlblQuantidade.setForeground(Color.WHITE);\r\n\t\tlblQuantidade.setFont(new Font(\"Arial\", Font.BOLD, 14));\r\n\t\tlblQuantidade.setBounds(787, 111, 89, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(lblQuantidade);\r\n\t\t\r\n\t\t\r\n\t\tspinner = new JSpinner();\r\n\t\tspinner.setModel(new SpinnerNumberModel(new Integer(0), new Integer(0), null, new Integer(1)));\r\n\t\tspinner.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\r\n\t\tspinner.setBounds(886, 112, 164, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(spinner);\r\n\t\t\r\n\t\t\r\n\t\ttxtProucurarProdutos = new JTextField();\r\n\t\ttxtProucurarProdutos.setToolTipText(\"\");\r\n\t\ttxtProucurarProdutos.setFont(new Font(\"Tahoma\", Font.PLAIN, 13));\r\n\t\ttxtProucurarProdutos.setForeground(Color.BLACK);\r\n\t\ttxtProucurarProdutos.setColumns(10);\r\n\t\ttxtProucurarProdutos.setBounds(26, 259, 369, 20);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(txtProucurarProdutos);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tJButton button = new JButton(\"Proucurar\");\r\n\t\tbutton.addActionListener(new ActionListener() {\r\n\t\t\t//BOTÃO PROUCURAR\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t//VARIAVEL PARA REGULAR O TAMNHO DA TABELA\r\n\t\t\t\tx1=0;\t\r\n\t\t\t\t//CRIAR TABELA COM OS DADOS QUE FORAM PROUCURADOS \r\n\t\t\t\tcriaTabela(new CrudCompras().procurarCompra(txtProucurarProdutos.getText().toString(),idfazenda));\r\n\t\t\t\t//TRATAMENTO PARA AUMENTAR E DIMINUIR TABELA\r\n\t\t\t\tint tabela = table.getRowCount();\r\n\t\t\t\tint linha = tabela*16;\r\n\t\t\t\tint valor = 21+linha;\r\n\t\t\t\tscrollPane.setBounds(26, 290, 1024, valor);\r\n\t\t\t\tif (!(txtProucurarProdutos.getText()).trim().equals(\"\")) {\r\n\t\t\t\t\tif (table.getRowCount()==0) {\r\n\t\t\t\t\t\tint x2 = 21;\r\n\t\t\t\t\t\tscrollPane.setBounds(26, 290, 1024, x2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else {\r\n\t\t\t\t\tcriaTabela(new CrudCompras().selecionaCompras(compra));\r\n\t\t\r\n\t\t\t\t}\r\n\t\t\t\t//FIM DO TRATAMENTO \r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));\r\n\t\tbutton.setForeground(Color.WHITE);\r\n\t\tbutton.setBackground(Color.DARK_GRAY);\r\n\t\tbutton.setFont(new Font(\"Arial\", Font.BOLD, 12));\r\n\t\tbutton.setBounds(405, 258, 118, 23);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(button);\r\n\t\t\r\n\t\tscrollPane = new JScrollPane();\r\n\t\tscrollPane.setFont(new Font(\"Arial\", Font.BOLD, 12));\r\n\t\tscrollPane.setBorder(new CompoundBorder());\r\n\t\tscrollPane.setBounds(26, 290, 1024, 21);\r\n\t\t\r\n\t\tfrmCompraDeInsumos.getContentPane().add(scrollPane);\r\n\t\t\r\n\t\ttable = new JTable();\r\n\t\ttable.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\t\t\t\teditar();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttable.setToolTipText(\"Clique duas vezes para editar os dados\\r\\n\");\r\n\t\ttable.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\r\n\t\ttable.setIgnoreRepaint(true);\r\n\t\ttable.setRowSelectionAllowed(false);\r\n\t\ttable.setFont(new Font(\"Arial\", Font.PLAIN, 12));\r\n\t\ttable.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));\r\n\t\ttable.setForeground(Color.DARK_GRAY);\r\n\t\ttable.setBackground(SystemColor.control);\r\n\t\t\r\n\t\ttable.setModel(new DefaultTableModel(\r\n\t\t\tnew Object[][] {\r\n\t\t\t},\r\n\t\t\tnew String[] {\r\n\t\t\t\t\"Produto\", \"Fornecedor\", \"CNPJ fornecedor\", \"N\\u00FAmero da nota\", \"Quantidade \", \"Pre\\u00E7o\", \"Data da compra\"\r\n\t\t\t}\r\n\t\t) {\r\n\t\t\tboolean[] columnEditables = new boolean[] {\r\n\t\t\t\tfalse, false, false, false, false, false, false\r\n\t\t\t};\r\n\t\t\tpublic boolean isCellEditable(int row, int column) {\r\n\t\t\t\treturn columnEditables[column];\r\n\t\t\t}\r\n\t\t});\r\n\t\ttable.getColumnModel().getColumn(0).setResizable(false);\r\n\t\ttable.getColumnModel().getColumn(1).setResizable(false);\r\n\t\ttable.getColumnModel().getColumn(2).setResizable(false);\r\n\t\ttable.getColumnModel().getColumn(3).setResizable(false);\r\n\t\ttable.getColumnModel().getColumn(4).setResizable(false);\r\n\t\ttable.getColumnModel().getColumn(5).setResizable(false);\r\n\t\ttable.getColumnModel().getColumn(6).setResizable(false);\r\n\t\r\n\t\t\r\n\t\r\n\t\r\n\t\t\r\n\t\tscrollPane.setViewportView(table);\r\n\t\t\r\n\t\t//IMAGEICON PARA COLOCAR IMAGEM NA TELA E REDIMENSIONAR \r\n\t\tImageIcon icon = new ImageIcon(\"src/img/compra1.png\");\r\n\t\ticon.setImage(icon.getImage().getScaledInstance(57, 55, 100));\r\n\t\tJLabel llll = new JLabel(\"\");\r\n\t\tllll.setBounds(941, 11, 57, 55);\r\n\t\tllll.setIcon(icon);\r\n\t\t\r\n\t\t\r\n\t\t//IMAGEICON PARA COLOCAR IMAGEM NA TELA E REDIMENSIONAR \r\n\t\tImageIcon img = new ImageIcon(\"src/img/fundo3.jpg\");\r\n\t\timg.setImage(img.getImage().getScaledInstance(1074, 671, 100));\r\n\t\tfrmCompraDeInsumos.getContentPane().add(llll);\r\n\t\tJLabel label = new JLabel(\"\");\r\n\t\tlabel.setIcon(img);\r\n\t\tlabel.setBounds(0, 0, 1074, 671);\r\n\t\tfrmCompraDeInsumos.getContentPane().add(label);\r\n\t\t\r\n\t\t\r\n\t\t//IF PARA VERIFICAR SE A TABLE ESTIVER VAZIA E DEIXAR VISIBLE.(FALSE)\r\n\t\tif (table.getRowCount()==0) {\r\n\t\t\tscrollPane.setVisible(false);\r\n\t\t}\r\n\t\t\r\n\t\t//CHAMAR MÉTODO\r\n\t\t\r\n\t\tcriaTabela(new CrudCompras().selecionaCompras(compra));\r\n\t\tmenu();\r\n\t}",
"private void initialize(DadosDaBateria bateria) {\n\t\tfrmCadastrarBateria = new JFrame();\n\t\tfrmCadastrarBateria.setIconImage(Toolkit.getDefaultToolkit().getImage(\"C:\\\\Erich\\\\Faculdade\\\\APS\\\\2\\u00BA Semestre\\\\Imagens\\\\Bateria.jpg\"));\n\t\tfrmCadastrarBateria.setTitle(\"Cadastrar Bateria\");\n\t\tfrmCadastrarBateria.setBounds(100, 100, 320, 201);\n\t\tfrmCadastrarBateria.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmCadastrarBateria.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Fabricante da bateria:\");\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblNewLabel.setBounds(10, 11, 128, 14);\n\t\tfrmCadastrarBateria.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblModeloDaBateria = new JLabel(\"Modelo da bateria:\");\n\t\tlblModeloDaBateria.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblModeloDaBateria.setBounds(10, 36, 128, 14);\n\t\tfrmCadastrarBateria.getContentPane().add(lblModeloDaBateria);\n\t\t\n\t\tJLabel lblTensoDaBateria = new JLabel(\"Tens\\u00E3o da bateria:\");\n\t\tlblTensoDaBateria.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblTensoDaBateria.setBounds(10, 61, 128, 14);\n\t\tfrmCadastrarBateria.getContentPane().add(lblTensoDaBateria);\n\t\t\n\t\ttextFieldFabricanteBateria = new JTextField();\n\t\ttextFieldFabricanteBateria.setBounds(148, 8, 129, 20);\n\t\tfrmCadastrarBateria.getContentPane().add(textFieldFabricanteBateria);\n\t\ttextFieldFabricanteBateria.setColumns(10);\n\t\t\n\t\ttextFieldNomeBateria = new JTextField();\n\t\ttextFieldNomeBateria.setColumns(10);\n\t\ttextFieldNomeBateria.setBounds(148, 33, 129, 20);\n\t\tfrmCadastrarBateria.getContentPane().add(textFieldNomeBateria);\n\t\t\n\t\ttextFieldTensaoBateria = new JTextField();\n\t\ttextFieldTensaoBateria.setColumns(10);\n\t\ttextFieldTensaoBateria.setBounds(148, 58, 129, 20);\n\t\tfrmCadastrarBateria.getContentPane().add(textFieldTensaoBateria);\n\t\t\n\t\tbtnCancelar = new JButton(\"Cancelar\");\n\t\tbtnCancelar.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfrmCadastrarBateria.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnCancelar.setBounds(205, 128, 89, 23);\n\t\tfrmCadastrarBateria.getContentPane().add(btnCancelar);\n\t\t\n\t\tbtnOk = new JButton(\"Ok\");\n\t\tbtnOk.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbateria.setFabricanteBateria(textFieldFabricanteBateria.getText());\n\t\t\t\tbateria.setNomeBateria(textFieldNomeBateria.getText());\n\t\t\t\tbateria.setTensaoBateria(Double.parseDouble(textFieldTensaoBateria.getText()));\n\t\t\t\t\n\t\t\t\tfrmCadastrarBateria.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnOk.setBounds(205, 94, 89, 23);\n\t\tfrmCadastrarBateria.getContentPane().add(btnOk);\n\t}",
"public frmVenda() {\n initComponents();\n }",
"public frmTaquilla() {\n initComponents();\n \n objSalaSecundaria.setCapacidad(250);\n objSalaSecundaria.setPrecioEntrada(180.0);//esto equivale a asignar los valores a través de de los metodos set\n libres1.setText(\"LIBRES \" + objSalaCentral.getCapacidad());\n }",
"private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n this.principal.rCliente.setVisible(true);\n this.setVisible(false);\n\n //llenarCombos();\n // TODO add your handling code here:\n }",
"public FormPpal() {\n initComponents();\n setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource(\"Imagenes/icon.png\")));\n setLocationRelativeTo(null);\n setTitle(\"Men\\372 principal\");\n setResizable(false);\n formBackUp = null;\n formBuscador = null;\n fb1 = null;\n fb2 = null;\n formListado = null;\n conn = new Conn();\n pacientesCumpleanos = new LinkedList();\n pacientesControl = new LinkedList();\n cargarCumpleanos();\n cargarControlesHoy();\n }",
"public FrmLeerCodigoBarras(java.awt.Frame parent, boolean modal,String accion) {\n super(parent,\"Codigo de barras\", modal);\n this.parent = parent;\n initComponents();\n this.turno = Main.getInstance().getTurnoActual();\n this.accion = accion;\n this.estacionamiento = Main.getInstance().getEstacionamiento();\n this.getContentPane().setBackground(Color.white);\n pack();\n id =\"\";\n if(accion.equals(\"COBRO\")){\n lblMensaje.setText(\"Coloca el boleto en el sensor\");\n }else if(accion.equals(\"CANCELAR\")){\n lblMensaje.setText(\"Coloca el boleto en el sensor\");\n }else if(accion.equals(\"RECIBO\")){\n lblMensaje.setText(\"Coloca el boleto en el sensor\");\n }else if(accion.equals(\"PERDIDO\")){\n lblMensaje.setText(\"Coloca la contra en el sensor\");\n }else if(accion.equals(\"CONTRA\")){\n lblMensaje.setText(\"Coloca la contra en el sensor\");\n }else if(accion.equals(\"ENTRADA\")){\n lblMensaje.setText(\"Coloca tu gafet contra en el sensor\");\n }else{\n lblMensaje.setText(\"Coloca el codigo\");\n }\n \n\n if(!Configuracion.getInstancia().getTerminal().equals(Configuracion.CLIENTE)){\n this.lblBienvenido.setVisible(false);\n }\n setLocationRelativeTo(parent);\n setVisible(true);\n }",
"public frmTelaVendas() {\n initComponents();\n this.carrinho = new CarrinhoDeCompras();\n listaItens.setModel(this.lista);\n }",
"public FichaDeContactoJFrame() {\n initComponents();\n }",
"private void btndanhsachbandocActionPerformed(java.awt.event.ActionEvent evt) {\n showDuLieu();\n }",
"public Caja_Precios() {\n initComponents();\n this.setExtendedState(MAXIMIZED_BOTH);\n this.getContentPane().setBackground(Color.WHITE);\n LISTAR();\n LISTARFP();\n LISTARNom();\n formato1();\n formato();\n \n FormaP.setLocationRelativeTo(null);//en el centro\n FormaP.getContentPane().setBackground(Color.WHITE);\n Nomenclatura.setLocationRelativeTo(null);//en el centro\n Nomenclatura.getContentPane().setBackground(Color.WHITE);\n btnNuevo.setEnabled(true);\n btnguardar.setEnabled(false);\n btneditar.setEnabled(false);\n btneliminar.setEnabled(false);\n cargareliminar.setVisible(false);\n setIconImage(new ImageIcon(getClass().getResource(\"/imagenes/iconos/icons8-Tarea del sistema-24.png\")).getImage());\n\n }",
"public FormBarangXSupplier() {\n initComponents();\n setKategori();\n //this.setAlwaysOnTop(true);\n this.setLocationRelativeTo(null);\n this.setExtendedState(JFrame.MAXIMIZED_BOTH);\n this.setSize(Toolkit.getDefaultToolkit().getScreenSize());\n this.setVisible(true);\n this.setResizable(false);\n this.jLabel13.setSize(Toolkit.getDefaultToolkit().getScreenSize());\n this.jLabel21.setSize(Toolkit.getDefaultToolkit().getScreenSize());\n this.jPanel1.setVisible(false);\n this.jPanel2.setVisible(false);\n this.InputDataSupplier.setVisible(false);\n this.EditDataSupplier.setVisible(false); \n showTable();\n resetselected();\n \n }",
"public form_utama_kasir() {\n initComponents(); \n koneksi DB = new koneksi(); \n con = DB.getConnection();\n aturtext();\n tampilkan();\n nofakturbaru();\n loadData();\n panelEditDataDiri.setVisible(false);\n txtHapusKodeTransaksi.setVisible(false);\n txtHapusQtyTransaksi.setVisible(false);\n txtHapusStokTersedia.setVisible(false);\n }",
"public FrmCadastro() {\n initComponents();\n\n }",
"public frmOrdenacao() {\n initComponents();\n setResizable(false);\n ordenacaoControle = new OrdenacaoControle();\n }",
"static void abrir() {\n frame = new ModificarPesos();\n //Create and set up the window.\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n //Set up the content pane.\n frame.addComponentsToPane(frame.getContentPane());\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }",
"private void miDespreActionPerformed(java.awt.event.ActionEvent evt) { \n diInfo.setVisible(true);\n }",
"public FrmDepartamentos() {\n initComponents();\n setLocationRelativeTo(this);\n this.jTexCodigo.requestFocus();\n }",
"public ComprarJuego() {\n initComponents();\n setLocationRelativeTo(null);\n try {\n cargarNickJuegos();\n precio.setVisible(false);\n \n } catch (SQLException ex) {\n Logger.getLogger(ComprarJuego.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public KorisnikForma() {\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tsetBounds(100, 100, 629, 613);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\tJLabel lblRegistracija = new JLabel(\"Registracija !!!\");\n\t\tlblRegistracija.setFont(new Font(\"Tahoma\", Font.BOLD, 26));\n\t\tlblRegistracija.setBounds(189, 35, 306, 36);\n\t\tcontentPane.add(lblRegistracija);\n\t\t\n\t\ttfImePrezime = new JTextField();\n\t\ttfImePrezime.setBounds(425, 143, 153, 20);\n\t\tcontentPane.add(tfImePrezime);\n\t\ttfImePrezime.setColumns(10);\n\t\t\n\t\ttfUser = new JTextField();\n\t\ttfUser.setBounds(425, 207, 153, 20);\n\t\tcontentPane.add(tfUser);\n\t\ttfUser.setColumns(10);\n\t\t\n\t\ttfPass = new JTextField();\n\t\ttfPass.setBounds(425, 267, 153, 20);\n\t\tcontentPane.add(tfPass);\n\t\ttfPass.setColumns(10);\n\t\t\n\t\ttfTelefon = new JTextField();\n\t\ttfTelefon.setBounds(425, 382, 153, 20);\n\t\tcontentPane.add(tfTelefon);\n\t\ttfTelefon.setColumns(10);\n\t\tImage img2= new ImageIcon(this.getClass().getResource(\"/download.png\")).getImage();\n\t\t\n\t\tJLabel lblImePrezime = new JLabel(\"Ime i prezime :\");\n\t\tlblImePrezime.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblImePrezime.setBounds(273, 143, 89, 17);\n\t\tcontentPane.add(lblImePrezime);\n\t\t\n\t\tJLabel lblzvezda = new JLabel(\"*\");\n\t\tlblzvezda.setForeground(Color.RED);\n\t\tlblzvezda.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblzvezda.setBounds(396, 144, 19, 14);\n\t\tcontentPane.add(lblzvezda);\n\t\t\n\t\tJLabel label = new JLabel(\"*\");\n\t\tlabel.setForeground(Color.RED);\n\t\tlabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlabel.setBounds(396, 208, 19, 14);\n\t\tcontentPane.add(label);\n\t\t\n\t\tJLabel label_1 = new JLabel(\"*\");\n\t\tlabel_1.setForeground(Color.RED);\n\t\tlabel_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlabel_1.setBounds(396, 268, 19, 14);\n\t\tcontentPane.add(label_1);\n\t\t\n\t\tJLabel label_2 = new JLabel(\"*\");\n\t\tlabel_2.setForeground(Color.RED);\n\t\tlabel_2.setBackground(Color.WHITE);\n\t\tlabel_2.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlabel_2.setBounds(396, 325, 19, 14);\n\t\tcontentPane.add(label_2);\n\t\t\n\t\tJLabel label_3 = new JLabel(\"*\");\n\t\tlabel_3.setForeground(Color.RED);\n\t\tlabel_3.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlabel_3.setBounds(396, 383, 19, 14);\n\t\tcontentPane.add(label_3);\n\t\t\n\t\tJLabel lblUserName = new JLabel(\"Username : \");\n\t\tlblUserName.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblUserName.setBounds(273, 207, 89, 17);\n\t\tcontentPane.add(lblUserName);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"* Obavezna polja za unos ! \");\n\t\tlblNewLabel.setForeground(Color.RED);\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD | Font.ITALIC, 14));\n\t\tlblNewLabel.setBounds(375, 523, 211, 23);\n\t\tcontentPane.add(lblNewLabel);\n\t\t\n\t\tJLabel lblPass = new JLabel(\"Password :\");\n\t\tlblPass.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblPass.setBounds(273, 267, 89, 17);\n\t\tcontentPane.add(lblPass);\n\t\t\n\t\tJLabel lblDate = new JLabel(\"Datum rodjenja : \");\n\t\tlblDate.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblDate.setBounds(273, 324, 113, 17);\n\t\tcontentPane.add(lblDate);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Telefon :\");\n\t\tlblNewLabel_2.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tlblNewLabel_2.setBounds(273, 382, 100, 17);\n\t\tcontentPane.add(lblNewLabel_2);\n\t\t\n\t\tJLabel lblImage = new JLabel(\"\");\n\t\tImage img3 = new ImageIcon(this.getClass().getResource(\"/admin.png\")).getImage();\n\t\tlblImage.setIcon(new ImageIcon(img3));\n\t\tlblImage.setBounds(38, 82, 170, 357);\n\t\tcontentPane.add(lblImage);\n\t\t\n\t\tJButton btnSacuvaj = new JButton(\"Sacuvaj\");\n\t\tbtnSacuvaj.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\n\t\tImage img4 = new ImageIcon(this.getClass().getResource(\"/download.png\")).getImage();\n\t\tbtnSacuvaj.setIcon(new ImageIcon(img4));\n\t\tbtnSacuvaj.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tDateFormat df= new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\n\t\t\t\t if(tfImePrezime.getText().length()==0) // Checking for empty field\n\t\t\t\t JOptionPane.showMessageDialog(null, \"NEKO POLJE JE OSTALO PRAZNO,POPUNITE GA ZA NASTAVAK !\");\n\t\t\t\t else if(tfUser.getText().length ()==0) // Checking for empty field\n\t\t\t\t JOptionPane.showMessageDialog(null, \"NEKO POLJE JE OSTALO PRAZNO,POPUNITE GA ZA NASTAVAK !\");\n\t\t\t\t else if(tfPass.getText().length()==0) // Checking for empty field\n\t\t\t\t JOptionPane.showMessageDialog(null, \"NEKO POLJE JE OSTALO PRAZNO,POPUNITE GA ZA NASTAVAK !\");\n\t\t\t\t else if(dcDatum.getDate() == null) // Checking for empty field\n\t\t\t\t JOptionPane.showMessageDialog(null, \"NEKO POLJE JE OSTALO PRAZNO,POPUNITE GA ZA NASTAVAK !\");\n\t\t\t\t else if(tfTelefon.getText().length ()==0) // Checking for empty field\n\t\t\t\t\t JOptionPane.showMessageDialog(null, \"NEKO POLJE JE OSTALO PRAZNO,POPUNITE GA ZA NASTAVAK !\");\n\t\t\t\t else{\n\t\t\t\ttry {\n\t\t\t\tString imePrezime = tfImePrezime.getText().toString();\n\t\t\t\tString userName = tfUser.getText().toString();\n\t\t\t\tString password = tfPass.getText().toString();\n\t\t\t\tString date =df.format(dcDatum.getDate());\n\t\t\t\tString telefon = tfTelefon.getText().toString();\n\t\t\t\t\n\t\t\t\tKontroler.getInstanca().upisiKorisnika(imePrezime,userName,password,date,telefon);\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Uspesna registracija\");\n\t\t\t\t\n\t\t\t\t}catch(Exception e1) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnSacuvaj.setBounds(450, 451, 128, 23);\n\t\tcontentPane.add(btnSacuvaj);\n\t\t\n\t\tJButton btnNazad = new JButton(\"Nazad\");\n\t\tImage img5 = new ImageIcon(this.getClass().getResource(\"/nazad1.png\")).getImage();\n\t\tbtnNazad.setIcon(new ImageIcon(img5));\n\t\tbtnNazad.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tLogovanje l = new Logovanje();\n\t\t\t\tl.setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tbtnNazad.setBounds(10, 11, 105, 23);\n\t\tcontentPane.add(btnNazad);\n\t\t\n\t\tdcDatum = new JDateChooser();\n\t\tdcDatum.setBounds(425, 319, 153, 20);\n\t\tcontentPane.add(dcDatum);\n\t\t\n\t\n\t\t\n\t}",
"public FrmOdabir(String naslov) {\n \n initComponents();\n setTitle(naslov);\n setLocationRelativeTo(null);\n setVisible(true);\n \n }",
"public FrmFactura() {\n initComponents();\n }",
"public JFrmPagoCuotaAnulacion() {\n setTitle(\"JFrmPagoCuotaAnulacion\");\n initComponents();\n }",
"public Inicio() {\n\n initComponents();\n this.setLocationRelativeTo(null);\n jtNombre.setEnabled(false);\n jtNombre.setVisible(false);\n jpActivos.setVisible(false);\n jpFunActivos.setVisible(false);\n jlista.setModel(modeloLista);\n// \n }",
"public FrameCriarListadeProdutos() {\n initComponents();\n }",
"public CorretorVIEW() {\n initComponents();\n this.setLocationRelativeTo(null);\n modelo_jtl_consultar_cor = (DefaultTableModel) tab_consulta.getModel();\n preencheTabela();\n btnAdd.setVisible(false);\n }",
"public void mostrarTodo() {\n if (formListado != null) {\n formListado.dispose();\n }\n formListado = new FormListado();\n formListado.cargarTodo();\n formListado.setVisible(true);\n }",
"public JFcotiza() {\n initComponents();\n }",
"public frmCliente() {\n initComponents();\n CargarProvinciasRes();\n CargarProvinciasTra();\n ManejadorCliente objCli = new ManejadorCliente();\n }",
"public FRMCadastrarFornecedor() {\n initComponents();\n }",
"private void jButtonBeheerBedrijvenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBeheerBedrijvenActionPerformed\n\n if (bedrijfForm == null) {\n bedrijfForm = new BedrijfForm(this, this.dbFacade);\n bedrijfForm.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n }\n bedrijfForm.setVisible(true);\n \n }",
"public PersonnetForm() {\n initComponents();\n Ancien.setVisible(false);\n AMDP.setVisible(false);\n \n populateJtable();\n \n jTable1.setShowGrid(true);\n jTable1.setGridColor(Color.gray);\n \n JTableHeader th = jTable1.getTableHeader();\n // th.setForeground(Color.blue);\n th.setFont(new Font(\"Tahoma\", Font.BOLD, 12));\n this.setLocationRelativeTo(null);// center form in the screen\n \n jLabelDECONXION.setVisible(false);\n OBcin.setVisible(false);\n OBmessage1.setVisible(false);\n OBnom.setVisible(false);\n OBnum.setVisible(false);\n OBsolde.setVisible(false);\n OBMP.setVisible(false);\n OBMP1.setVisible(false);\n }",
"public vcRecepcion() {\n initComponents();\n setTitle(\"RentCarSystem | Consulta Recepcion\");\n setLocationRelativeTo(null);\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n setExtendedState(MAXIMIZED_BOTH);\n mcr = new mcRecepcion();\n mcr.allRecepciones();\n setVisible(true);\n }",
"public FRM_Estudiantes() {\n initComponents();\n }",
"public FrmInsertar() {\n initComponents();\n }",
"public FrmInicioSesion() {\n initComponents();\n\n }",
"public frmCliente() {\r\n \r\n initComponents();\r\n // Botao do Note_ON brusco que foi retirado ...\r\n //jButton9.setVisible(false);\r\n \r\n // Inicializa o display de desenho\r\n //ImageIcon image=new ImageIcon(\"Hapax4.PNG\");\r\n //setIconImage(image.getImage());\r\n \r\n iniciaDesenho();\r\n // Lista de Dispositivos MIDI\r\n PegaMIDI();\r\n \r\n }",
"public frmPessoa() {\n initComponents();\n }",
"private void agregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_agregarActionPerformed\n boolean salida = true;\n Palabra p; \n p = new Palabra(campo1.getText());\n boolean continua = p.estaBien();\n if (continua) {\n agregarDiccionario(p);\n salida = pregunta();\n setVisible(true);\n }else {\n JOptionPane.showMessageDialog(null,\"#- Palabra mal escrita intente de nuevo -#\");\n }\n \n if (!salida) {\n JOptionPane.showMessageDialog(null,\"Gracias por usar el Corrector Ortográfico\");\n dic.guardarDiccionario();\n dispose(); //setVisible(false);\n }\n }",
"public NewJFrame() {\n initComponents();\n IniciarTabla();\n \n \n // ingreso al githup \n \n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n abaCadastro = new javax.swing.JTabbedPane();\n jPanelCadastro = new javax.swing.JPanel();\n btnBuscar = new javax.swing.JButton();\n txtPront = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel44 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n txtNome = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n txtCPF = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n txtTelefone = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n txtDataNasc = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n txtMae = new javax.swing.JTextField();\n jPanelCirurgia = new javax.swing.JPanel();\n jLabel42 = new javax.swing.JLabel();\n jScrollPane7 = new javax.swing.JScrollPane();\n lstCirurgias = new javax.swing.JList();\n jPanelEvolução = new javax.swing.JPanel();\n jLabel20 = new javax.swing.JLabel();\n jScrollPane9 = new javax.swing.JScrollPane();\n lstEvolucao = new javax.swing.JList();\n jPanelMadMed = new javax.swing.JPanel();\n jLabel21 = new javax.swing.JLabel();\n jScrollPane10 = new javax.swing.JScrollPane();\n lstMedicamento = new javax.swing.JList();\n jScrollPane11 = new javax.swing.JScrollPane();\n lstMaterial = new javax.swing.JList();\n jLabel22 = new javax.swing.JLabel();\n jPanelInternaçãoAlta = new javax.swing.JPanel();\n jLabel23 = new javax.swing.JLabel();\n dataInicio1 = new com.toedter.calendar.JDateChooser();\n jLabel24 = new javax.swing.JLabel();\n jLabel17 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel19 = new javax.swing.JLabel();\n txtDescricaoCID = new javax.swing.JTextField();\n jLabel16 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n jLabel25 = new javax.swing.JLabel();\n dataAlta = new com.toedter.calendar.JDateChooser();\n jLabel26 = new javax.swing.JLabel();\n horaAlta = new javax.swing.JTextField();\n jLabel27 = new javax.swing.JLabel();\n txtMotivoAlta = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n txtMedicoAlta = new javax.swing.JTextField();\n txtDescricaoCIDAlta2 = new javax.swing.JTextField();\n txtMedico = new javax.swing.JTextField();\n txtInt = new javax.swing.JTextField();\n txtHoraInicio1 = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n setTitle(\"Prontuário Virtual\");\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n btnBuscar.setText(\"Buscar\");\n btnBuscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBuscarActionPerformed(evt);\n }\n });\n\n txtPront.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtProntActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setText(\"PRONTUÁRIO:\");\n\n jLabel44.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel44.setText(\"Cadastro:\");\n\n jLabel15.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel15.setText(\"Nome:\");\n\n txtNome.setEditable(false);\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel2.setText(\"CPF:\");\n\n txtCPF.setEditable(false);\n txtCPF.setEnabled(false);\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel5.setText(\"Telefone:\");\n\n txtTelefone.setEditable(false);\n txtTelefone.setEnabled(false);\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setText(\"Data de Nascimento:\");\n\n txtDataNasc.setEditable(false);\n txtDataNasc.setEnabled(false);\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setText(\"Mãe:\");\n\n txtMae.setEditable(false);\n txtMae.setEnabled(false);\n\n javax.swing.GroupLayout jPanelCadastroLayout = new javax.swing.GroupLayout(jPanelCadastro);\n jPanelCadastro.setLayout(jPanelCadastroLayout);\n jPanelCadastroLayout.setHorizontalGroup(\n jPanelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelCadastroLayout.createSequentialGroup()\n .addComponent(jLabel44)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanelCadastroLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelCadastroLayout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtPront, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnBuscar)\n .addGap(265, 265, 265))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelCadastroLayout.createSequentialGroup()\n .addGroup(jPanelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelCadastroLayout.createSequentialGroup()\n .addComponent(jLabel15)\n .addGap(18, 18, 18)\n .addComponent(txtNome))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelCadastroLayout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(28, 28, 28)\n .addComponent(txtCPF, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(12, 12, 12)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtTelefone))\n .addGroup(jPanelCadastroLayout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtMae, javax.swing.GroupLayout.PREFERRED_SIZE, 397, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanelCadastroLayout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtDataNasc)\n .addGap(116, 116, 116)))\n .addContainerGap())))\n );\n jPanelCadastroLayout.setVerticalGroup(\n jPanelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelCadastroLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtPront, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnBuscar))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel44)\n .addGap(18, 18, 18)\n .addGroup(jPanelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel15)\n .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(27, 27, 27)\n .addGroup(jPanelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtCPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)))\n .addGap(17, 17, 17)\n .addGroup(jPanelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtDataNasc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanelCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtMae, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addContainerGap(198, Short.MAX_VALUE))\n );\n\n abaCadastro.addTab(\"Cadastro\", jPanelCadastro);\n\n jLabel42.setText(\"Cirurgias:\");\n\n jScrollPane7.setViewportView(lstCirurgias);\n\n javax.swing.GroupLayout jPanelCirurgiaLayout = new javax.swing.GroupLayout(jPanelCirurgia);\n jPanelCirurgia.setLayout(jPanelCirurgiaLayout);\n jPanelCirurgiaLayout.setHorizontalGroup(\n jPanelCirurgiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelCirurgiaLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelCirurgiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelCirurgiaLayout.createSequentialGroup()\n .addComponent(jLabel42)\n .addGap(0, 441, Short.MAX_VALUE))\n .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 487, Short.MAX_VALUE))\n .addContainerGap())\n );\n jPanelCirurgiaLayout.setVerticalGroup(\n jPanelCirurgiaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelCirurgiaLayout.createSequentialGroup()\n .addGap(61, 61, 61)\n .addComponent(jLabel42)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(204, Short.MAX_VALUE))\n );\n\n abaCadastro.addTab(\"Cirurgias\", jPanelCirurgia);\n jPanelCirurgia.getAccessibleContext().setAccessibleDescription(\"Cirurgias\");\n\n jLabel20.setText(\"Evoluções:\");\n\n jScrollPane9.setViewportView(lstEvolucao);\n\n javax.swing.GroupLayout jPanelEvoluçãoLayout = new javax.swing.GroupLayout(jPanelEvolução);\n jPanelEvolução.setLayout(jPanelEvoluçãoLayout);\n jPanelEvoluçãoLayout.setHorizontalGroup(\n jPanelEvoluçãoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelEvoluçãoLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelEvoluçãoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelEvoluçãoLayout.createSequentialGroup()\n .addComponent(jLabel20)\n .addGap(0, 435, Short.MAX_VALUE))\n .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 487, Short.MAX_VALUE))\n .addContainerGap())\n );\n jPanelEvoluçãoLayout.setVerticalGroup(\n jPanelEvoluçãoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelEvoluçãoLayout.createSequentialGroup()\n .addGap(49, 49, 49)\n .addComponent(jLabel20)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 216, Short.MAX_VALUE))\n );\n\n abaCadastro.addTab(\"Evolução\", jPanelEvolução);\n\n jLabel21.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel21.setText(\"Medicamentos:\");\n\n jScrollPane10.setViewportView(lstMedicamento);\n\n jScrollPane11.setViewportView(lstMaterial);\n\n jLabel22.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel22.setText(\"Materiais:\");\n\n javax.swing.GroupLayout jPanelMadMedLayout = new javax.swing.GroupLayout(jPanelMadMed);\n jPanelMadMed.setLayout(jPanelMadMedLayout);\n jPanelMadMedLayout.setHorizontalGroup(\n jPanelMadMedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelMadMedLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelMadMedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 487, Short.MAX_VALUE)\n .addComponent(jScrollPane11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 487, Short.MAX_VALUE)\n .addGroup(jPanelMadMedLayout.createSequentialGroup()\n .addGroup(jPanelMadMedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel21)\n .addComponent(jLabel22))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanelMadMedLayout.setVerticalGroup(\n jPanelMadMedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelMadMedLayout.createSequentialGroup()\n .addGap(45, 45, 45)\n .addComponent(jLabel21)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)\n .addComponent(jLabel22)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(40, 40, 40))\n );\n\n abaCadastro.addTab(\"Mat. e Med.\", jPanelMadMed);\n\n jLabel23.setText(\"Internação:\");\n\n dataInicio1.setEnabled(false);\n\n jLabel24.setText(\"Data:\");\n\n jLabel17.setText(\"Hora:\");\n\n jLabel7.setText(\"Médico:\");\n\n jLabel19.setText(\"CID:\");\n\n txtDescricaoCID.setEditable(false);\n txtDescricaoCID.setEnabled(false);\n\n jLabel16.setFont(new java.awt.Font(\"Arial\", 1, 14)); // NOI18N\n jLabel16.setText(\"INTERNAÇÃO\");\n\n jLabel8.setFont(new java.awt.Font(\"Arial\", 1, 14)); // NOI18N\n jLabel8.setText(\"ALTA DA INTERNAÇÃO\");\n\n jLabel25.setText(\"Data:\");\n\n dataAlta.setEnabled(false);\n\n jLabel26.setText(\"Hora:\");\n\n horaAlta.setEditable(false);\n\n jLabel27.setText(\"CID:\");\n\n txtMotivoAlta.setEditable(false);\n txtMotivoAlta.setEnabled(false);\n\n jLabel11.setText(\"Médico:\");\n\n jLabel9.setText(\"Motivo da Alta:\");\n\n txtMedicoAlta.setEditable(false);\n txtMedicoAlta.setEnabled(false);\n\n txtDescricaoCIDAlta2.setEditable(false);\n txtDescricaoCIDAlta2.setEnabled(false);\n\n txtMedico.setEditable(false);\n txtMedico.setEnabled(false);\n\n txtInt.setEditable(false);\n txtInt.setEnabled(false);\n txtInt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtIntActionPerformed(evt);\n }\n });\n\n txtHoraInicio1.setEditable(false);\n txtHoraInicio1.setEnabled(false);\n txtHoraInicio1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtHoraInicio1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanelInternaçãoAltaLayout = new javax.swing.GroupLayout(jPanelInternaçãoAlta);\n jPanelInternaçãoAlta.setLayout(jPanelInternaçãoAltaLayout);\n jPanelInternaçãoAltaLayout.setHorizontalGroup(\n jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelInternaçãoAltaLayout.createSequentialGroup()\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel16)\n .addGroup(jPanelInternaçãoAltaLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelInternaçãoAltaLayout.createSequentialGroup()\n .addComponent(jLabel7)\n .addGap(30, 30, 30)\n .addComponent(txtMedico, javax.swing.GroupLayout.PREFERRED_SIZE, 364, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanelInternaçãoAltaLayout.createSequentialGroup()\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel23)\n .addComponent(jLabel19))\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelInternaçãoAltaLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtInt, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(22, 22, 22)\n .addComponent(jLabel24)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(dataInicio1, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel17)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtHoraInicio1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanelInternaçãoAltaLayout.createSequentialGroup()\n .addGap(11, 11, 11)\n .addComponent(txtDescricaoCID, javax.swing.GroupLayout.PREFERRED_SIZE, 363, javax.swing.GroupLayout.PREFERRED_SIZE)))))))\n .addGap(0, 66, Short.MAX_VALUE))\n .addComponent(jSeparator1)\n .addGroup(jPanelInternaçãoAltaLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanelInternaçãoAltaLayout.createSequentialGroup()\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel9)\n .addComponent(jLabel11))\n .addComponent(jLabel27, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(18, 18, 18)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(txtDescricaoCIDAlta2, javax.swing.GroupLayout.DEFAULT_SIZE, 334, Short.MAX_VALUE)\n .addComponent(txtMotivoAlta, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtMedicoAlta, javax.swing.GroupLayout.Alignment.LEADING)))\n .addGroup(jPanelInternaçãoAltaLayout.createSequentialGroup()\n .addGap(46, 46, 46)\n .addComponent(jLabel25)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(dataAlta, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel26)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(horaAlta, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanelInternaçãoAltaLayout.setVerticalGroup(\n jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelInternaçãoAltaLayout.createSequentialGroup()\n .addGap(8, 8, 8)\n .addComponent(jLabel16)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel23)\n .addComponent(txtInt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(dataInicio1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel17)\n .addComponent(txtHoraInicio1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(jLabel24))\n .addGap(14, 14, 14)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(txtMedico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel19)\n .addComponent(txtDescricaoCID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(33, 33, 33)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel8)\n .addGap(18, 18, 18)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel26, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(horaAlta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(dataAlta, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel25, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(18, 18, 18)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(txtMotivoAlta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtMedicoAlta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel11))\n .addGap(18, 18, 18)\n .addGroup(jPanelInternaçãoAltaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtDescricaoCIDAlta2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel27))\n .addContainerGap(74, Short.MAX_VALUE))\n );\n\n abaCadastro.addTab(\"Internação/Alta\", jPanelInternaçãoAlta);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(abaCadastro)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(abaCadastro, javax.swing.GroupLayout.Alignment.TRAILING)\n );\n\n pack();\n }",
"public void mostrar() {\n\t\tlimpiarCampos();\n\t\tthis.setVisible(true);\n\t}",
"public void inicio(){\r\n Ventana v = new Ventana();\r\n v.setVisible(true); //se hace visible la ventana\r\n }",
"public VentanaAltaModifPieza(JFrame padre) {\r\n\t\tsuper(padre, true);\r\n\t\tsetBounds(100, 100, 437, 304);\r\n\t\tsetResizable(false);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\r\n\t\tbtnAlta = new JButton(\"Dar de alta\");\r\n\t\tbtnAlta.setBounds(183, 242, 139, 23);\r\n\t\tcontentPane.add(btnAlta);\r\n\r\n\t\tbtnCancelar = new JButton(\"Cancelar\");\r\n\t\tbtnCancelar.setBounds(332, 242, 89, 23);\r\n\t\tcontentPane.add(btnCancelar);\r\n\r\n\t\tlblDireccin = new JLabel(\"Marca:\");\r\n\t\tlblDireccin.setBounds(27, 102, 99, 14);\r\n\t\tcontentPane.add(lblDireccin);\r\n\r\n\t\tlblLocalidad = new JLabel(\"Descripcion: \");\r\n\t\tlblLocalidad.setBounds(27, 133, 99, 14);\r\n\t\tcontentPane.add(lblLocalidad);\r\n\t\t\r\n\t\tlblBajoStock = new JLabel(\"Bajo stock:\");\r\n\t\tlblBajoStock.setBounds(27, 194, 99, 14);\r\n\t\tcontentPane.add(lblBajoStock);\r\n\r\n\t\tlblProvincia = new JLabel(\"Precio Venta:\");\r\n\t\tlblProvincia.setBounds(27, 164, 99, 14);\r\n\t\tcontentPane.add(lblProvincia);\r\n\r\n\t\ttfDescripcionMarca = new JTextField();\r\n\t\ttfDescripcionMarca.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (!Validador.caracterConEspacioNumero(e.getKeyChar()) || tfDescripcionMarca.getText().length() > 19) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttfDescripcionMarca.setColumns(10);\r\n\t\ttfDescripcionMarca.setBounds(133, 130, 236, 20);\r\n\t\tcontentPane.add(tfDescripcionMarca);\r\n\r\n\t\ttfPrecioVenta = new JTextField();\r\n\t\ttfPrecioVenta.select(tfPrecioVenta.getText().length(), 0);\r\n\t\ttfPrecioVenta.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (!Validador.esNumero(e.getKeyChar()) || tfPrecioVenta.getText().length()>19 ){ \r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t\tif (tfPrecioVenta.getText().length()>=0) {\r\n\t\t\t\t\ttfPrecioVenta.setText(Validador.armarPrecioValido(tfPrecioVenta.getText()));\r\n\t\t\t\t}\r\n\t\t\t\ttfPrecioVenta.select(tfPrecioVenta.getText().length(), 0);\r\n\t\t\t}\r\n\t\t});\r\n\t\ttfPrecioVenta.setColumns(10);\r\n\t\ttfPrecioVenta.setBounds(136, 161, 113, 20);\r\n\t\tcontentPane.add(tfPrecioVenta);\r\n\r\n\t\tcboMarcas = new JComboBox<MarcaDTO>();\r\n\t\tcboMarcas.setBounds(133, 99, 163, 20);\r\n\t\tcontentPane.add(cboMarcas);\r\n\r\n\t\tbtnNuevaMarca = new JButton(\"A\\u00F1adir marca\");\r\n\t\tbtnNuevaMarca.setBounds(306, 98, 115, 23);\r\n\t\tcontentPane.add(btnNuevaMarca);\r\n\t\t\r\n\t\tspinnerBajoStock = new JSpinner();\r\n\t\tspinnerBajoStock.setModel(new SpinnerNumberModel(new Integer(1), new Integer(1), null, new Integer(1)));\r\n\t\tspinnerBajoStock.setBounds(133, 191, 49, 20);\r\n\t\tcontentPane.add(spinnerBajoStock);\r\n\t\t\r\n\t\ttfIdUnico = new JTextField();\r\n\t\ttfIdUnico.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (!Validador.esLetra(e.getKeyChar()) && !Validador.esNumero(e.getKeyChar()) || tfIdUnico.getText().length()>7)\r\n\t\t\t\t\te.consume();\r\n\t\t\t}\r\n\t\t});\r\n\t\ttfIdUnico.setBounds(183, 68, 86, 20);\r\n\t\tcontentPane.add(tfIdUnico);\r\n\t\ttfIdUnico.setColumns(10);\r\n\t\t\r\n\t\tlblIdentificadornico = new JLabel(\"Identificador \\u00FAnico:\");\r\n\t\tlblIdentificadornico.setBounds(27, 71, 113, 14);\r\n\t\tcontentPane.add(lblIdentificadornico);\r\n\t}",
"public frmRectangulo() {\n initComponents();\n }",
"public Gui_lectura_consumo() {\n initComponents();\n centrarform();\n consumo_capturado.setEditable(false);\n limpiarCajas();\n \n \n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n panelBusqueda = new javax.swing.JPanel();\n buscar = new javax.swing.JButton();\n barraBusqueda = new javax.swing.JTextField();\n\n setBackground(new java.awt.Color(102, 102, 102));\n setForeground(new java.awt.Color(255, 255, 255));\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n panelBusqueda.setBackground(new java.awt.Color(102, 102, 102));\n panelBusqueda.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n buscar.setBackground(new java.awt.Color(101, 166, 148));\n buscar.setForeground(new java.awt.Color(255, 255, 255));\n buscar.setText(\"Buscar\");\n buscar.setBorderPainted(false);\n buscar.setOpaque(true);\n buscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buscarActionPerformed(evt);\n }\n });\n panelBusqueda.add(buscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 30, 110, 30));\n\n barraBusqueda.setFont(new java.awt.Font(\"Lucida Grande\", 0, 18)); // NOI18N\n barraBusqueda.setForeground(new java.awt.Color(204, 204, 204));\n barraBusqueda.setText(\"Buscar por nombre o número de documento\");\n barraBusqueda.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n barraBusquedaMouseClicked(evt);\n }\n });\n panelBusqueda.add(barraBusqueda, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 30, 630, -1));\n\n add(panelBusqueda, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 810, 90));\n }",
"public FmrMaestros() {\n initComponents();\n ver_Maestros();\n this.setLocationRelativeTo(null);\n }",
"public Formulario_principal() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public VentanaReglas() {\n\t\tsetDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n\t\tsetBounds(100, 100, 498, 338);\n\t\t_contentPane = new JPanel();\n\t\t_contentPane.setBackground(SystemColor.menu);\n\t\t_contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(_contentPane);\n\t\t_contentPane.setLayout(null);\n\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(\"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel\");\n\t\t} catch (ClassNotFoundException | InstantiationException | IllegalAccessException\n\t\t\t\t| UnsupportedLookAndFeelException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t_btnNewButton = new JButton(\"Entendido\");\n\t\t_btnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsetVisible(false);\n\t\t\t}\n\t\t});\n\t\t_btnNewButton.setBounds(196, 271, 89, 23);\n\t\t_contentPane.add(_btnNewButton);\n\n\t\tJLabel lblcmoJugar = new JLabel(\"\\u00BFC\\u00F3mo jugar 2048?\");\n\t\tlblcmoJugar.setForeground(new Color(255, 51, 0));\n\t\tlblcmoJugar.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tlblcmoJugar.setBounds(152, 0, 155, 20);\n\t\t_contentPane.add(lblcmoJugar);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBounds(10, 23, 462, 247);\n\t\t_contentPane.add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\tTextArea textArea = new TextArea();\n\t\ttextArea.setBounds(0, 0, 462, 247);\n\t\ttextArea.setText(\"El juego es simple, este consiste en desplazar la matriz en cuatro direcciones \\r\\ncos las flechas del cursor (arriba, abajo, derecha e izquierda) la matriz se \\r\\ndesplaza de forma integra sobre los espacios vac\\u00EDos.\\r\\nEn cuanto las baldosas se muevan si hay dos iguales las mismas se suman, \\r\\nel objetivo principal es que producto de la suma una baldosa llegue al valor \\r\\n2048.\\r\\n\\r\\n* Los controles son: Arriba \\u2191 , Abajo \\u2193, Izquierda \\u2190 y Derecha \\u2192.\\r\\n* Para deshacer una jugada presionar la letra (d).\\r\\n* Para reiniciar el juego presionar la tecla escape (Esc) respondiendo a la \\r\\n consulta.\\r\\n* En caso de querer abandonar el juego solamente presiona con el click \\r\\n izquierdo del mouse la caracter\\u00EDstica X que se encuentra en la parte \\r\\n superior derecha de la ventana principal.\\r\\n BUENA SUERTE Y QUE LO DISFRUTES!!!!!!!! {O u O}\\r\\n\");\n\t\ttextArea.setMaximumSize(new Dimension(42767, 42767));\n\t\ttextArea.setEditable(false);\n\t\tpanel.add(textArea);\n\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblTitulo = new javax.swing.JLabel();\n imgBarraTitulo = new javax.swing.JLabel();\n txtNombreGrado = new javax.swing.JTextField();\n jLabel17 = new javax.swing.JLabel();\n btnAtras = new javax.swing.JButton();\n btnRegistrarGrado = new javax.swing.JButton();\n cmbSeccion = new javax.swing.JComboBox();\n jLabel7 = new javax.swing.JLabel();\n cmbNivelGrado = new javax.swing.JComboBox();\n jLabel8 = new javax.swing.JLabel();\n cmbEstadoGrado = new javax.swing.JComboBox();\n jLabel9 = new javax.swing.JLabel();\n imgFondo = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblTitulo.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n lblTitulo.setForeground(new java.awt.Color(255, 255, 255));\n lblTitulo.setText(\"Registrar Grado\");\n getContentPane().add(lblTitulo, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 30, -1, -1));\n\n imgBarraTitulo.setBackground(new java.awt.Color(0, 0, 0));\n imgBarraTitulo.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n imgBarraTitulo.setName(\"\"); // NOI18N\n getContentPane().add(imgBarraTitulo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 20, 630, 40));\n\n txtNombreGrado.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n txtNombreGrado.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNombreGradoActionPerformed(evt);\n }\n });\n txtNombreGrado.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txtNombreGradoKeyTyped(evt);\n }\n });\n getContentPane().add(txtNombreGrado, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 100, 120, 30));\n\n jLabel17.setForeground(new java.awt.Color(102, 102, 102));\n jLabel17.setText(\"Grado\");\n getContentPane().add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 80, 60, 20));\n\n btnAtras.setBackground(new java.awt.Color(255, 255, 255));\n btnAtras.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n btnAtras.setForeground(new java.awt.Color(102, 153, 255));\n btnAtras.setText(\"Atras\");\n btnAtras.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n btnAtras.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAtrasActionPerformed(evt);\n }\n });\n getContentPane().add(btnAtras, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 170, 120, 40));\n\n btnRegistrarGrado.setBackground(new java.awt.Color(255, 255, 255));\n btnRegistrarGrado.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n btnRegistrarGrado.setForeground(new java.awt.Color(102, 153, 255));\n btnRegistrarGrado.setText(\"Registrar\");\n btnRegistrarGrado.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n btnRegistrarGrado.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRegistrarGradoActionPerformed(evt);\n }\n });\n getContentPane().add(btnRegistrarGrado, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 170, 120, 40));\n\n cmbSeccion.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(cmbSeccion, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 100, 100, 30));\n\n jLabel7.setForeground(new java.awt.Color(102, 102, 102));\n jLabel7.setText(\"Nivel\");\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 80, 80, 20));\n\n cmbNivelGrado.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(cmbNivelGrado, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 100, 100, 30));\n\n jLabel8.setForeground(new java.awt.Color(102, 102, 102));\n jLabel8.setText(\"Seccion\");\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 80, 80, 20));\n\n cmbEstadoGrado.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(cmbEstadoGrado, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 100, 100, 30));\n\n jLabel9.setForeground(new java.awt.Color(102, 102, 102));\n jLabel9.setText(\"Estado Grado\");\n getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 80, 80, 20));\n\n imgFondo.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n getContentPane().add(imgFondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 630, 270));\n\n pack();\n }",
"public JF_Inscripcion() {\n initComponents();\n }",
"public AnadirCompra() {\n\t\tsetLayout(null);\n\t\t\n\t\tJPanel pCompra = new JPanel();\n\t\tpCompra.setBackground(SystemColor.text);\n\t\tpCompra.setBounds(0, 0, 772, 643);\n\t\tadd(pCompra);\n\t\tpCompra.setLayout(null);\n\t\t\n\t\tlblNewLabel = new JLabel(\"Compras\");\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tlblNewLabel.setBounds(684, 13, 76, 16);\n\t\tpCompra.add(lblNewLabel);\n\t\t\n\t\tlblNewLabel_1 = new JLabel(\"Personal\");\n\t\tlblNewLabel_1.setBounds(142, 130, 56, 16);\n\t\tpCompra.add(lblNewLabel_1);\n\t\t\n\t\tcmbPersonal = new JComboBox();\n\t\tcmbPersonal.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcargaPersonal();\n\t\t\t}\n\t\t});\n\t\tcmbPersonal.setBounds(291, 127, 409, 22);\n\t\tpCompra.add(cmbPersonal);\n\t\t\n\t\tlblFechaSolicitado = new JLabel(\"Fecha solicitado\");\n\t\tlblFechaSolicitado.setBounds(142, 184, 91, 16);\n\t\tpCompra.add(lblFechaSolicitado);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(291, 181, 409, 22);\n\t\tpCompra.add(textField);\n\t\ttextField.setColumns(10);\n\t\t\n\t\tlblEstado = new JLabel(\"Estado\");\n\t\tlblEstado.setBounds(142, 231, 91, 16);\n\t\tpCompra.add(lblEstado);\n\t\t\n\t\ttextField_1 = new JTextField();\n\t\ttextField_1.setBounds(291, 228, 409, 22);\n\t\tpCompra.add(textField_1);\n\t\ttextField_1.setColumns(10);\n\t\t\n\t\tlblFechaEntrega = new JLabel(\"Fecha entrega\");\n\t\tlblFechaEntrega.setBounds(142, 276, 91, 16);\n\t\tpCompra.add(lblFechaEntrega);\n\t\t\n\t\tlblFechaRequerido = new JLabel(\"Fecha requerido\");\n\t\tlblFechaRequerido.setBounds(142, 318, 108, 16);\n\t\tpCompra.add(lblFechaRequerido);\n\t\t\n\t\ttextField_2 = new JTextField();\n\t\ttextField_2.setColumns(10);\n\t\ttextField_2.setBounds(291, 273, 409, 22);\n\t\tpCompra.add(textField_2);\n\t\t\n\t\ttextField_3 = new JTextField();\n\t\ttextField_3.setColumns(10);\n\t\ttextField_3.setBounds(291, 315, 409, 22);\n\t\tpCompra.add(textField_3);\n\t\t\n\t\tlblFechaAnulado = new JLabel(\"Fecha anulado\");\n\t\tlblFechaAnulado.setBounds(142, 364, 91, 16);\n\t\tpCompra.add(lblFechaAnulado);\n\t\t\n\t\ttextField_4 = new JTextField();\n\t\ttextField_4.setColumns(10);\n\t\ttextField_4.setBounds(291, 361, 409, 22);\n\t\tpCompra.add(textField_4);\n\t\t\n\t\ttextField_5 = new JTextField();\n\t\ttextField_5.setColumns(10);\n\t\ttextField_5.setBounds(291, 405, 409, 22);\n\t\tpCompra.add(textField_5);\n\t\t\n\t\tlblValor = new JLabel(\"Valor\");\n\t\tlblValor.setBounds(142, 408, 91, 16);\n\t\tpCompra.add(lblValor);\n\t\t\n\t\tlabel = new JLabel(\"Productos\");\n\t\tlabel.setBounds(142, 453, 56, 16);\n\t\tpCompra.add(label);\n\t\t\n\t\tbtnAadirCompra = new JButton(\"A\\u00F1adir Compra\");\n\t\tbtnAadirCompra.setBackground(SystemColor.textHighlight);\n\t\tbtnAadirCompra.setBounds(216, 605, 388, 25);\n\t\tpCompra.add(btnAadirCompra);\n\t\t\n\t\tlist = new JList();\n\t\tlist.addListSelectionListener(new ListSelectionListener() {\n\t\t\tpublic void valueChanged(ListSelectionEvent arg0) {\n\t\t\t\tcargaProducto();\n\t\t\t}\n\t\t});\n\t\tlist.setBackground(SystemColor.controlHighlight);\n\t\tlist.setBounds(291, 452, 409, 84);\n\t\tpCompra.add(list);\n\t\tlist.setModel(jList);\n\t\t\n\t\tbutton = new JButton(\"< ATR\\u00C1S\");\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//scrollPaneles.setViewportView(pgCompra);\n\t\t\t\thacerInvisible();\n\t\t\t}\n\t\t});\n\t\tbutton.setBackground(SystemColor.textHighlight);\n\t\tbutton.setBounds(12, 11, 106, 25);\n\t\tpCompra.add(button);\n\t\t\n\t\tscrollPaneles = new JScrollPane();\n\t\tscrollPaneles.setBounds(0, 0, 773, 643);\n\t\tadd(scrollPaneles);\n\n\t}",
"public FrmAbmAfiliado() {\n initComponents();\n }",
"public frmCadastrarEquipamento(Manufatura manft) {\n initComponents();\n mnft = manft;\n }",
"private void createAndShowGUI() throws SQLException\n\t{\n\t\t //Create and set up the window.\n\t\t\n\t\tframe = new JFrame(\"ABM Funcionarios\");\n \n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); \n try {\n\t\t\tDrivers.cargarDrivers();\n\t\t\tconPostgres = Conexiones.obtenerConexion(Conexiones.DBMS_TYPE_POSTGRES);\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\n\t\t\te1.printStackTrace();\n\t\t}\n \n \n panelPrincipal = new JPanel(new FlowLayout());\n //JPANEL\n JPanel panelFormulario = new JPanel(new GridLayout(6,2) );\n JPanel panelBotonera= new JPanel(new GridLayout(1,2) );\n JPanel panelNavegacion = new JPanel(new GridLayout(1,4) );\n \n \t \t \t \t \n // TextBox \n txtLegajo \t\t\t= new JTextField(20);\n \n MaskFormatter mf1;\n\t\ttry \n\t\t{\n\t\t\tmf1 = new MaskFormatter(\"##-##-####\");\n\t\t\tmf1.setPlaceholderCharacter('_');\n\t txtFechaIngreso = new JFormattedTextField(mf1);\n\t\t} \n\t\tcatch (ParseException e1) \n\t\t{\t\t\n\t\t\te1.printStackTrace();\n\t\t} \n txtTitular \t\t\t= new JTextField(20);\n txtDepartamento\t\t= new JTextField(20);\n txtTelefono\t\t\t= new JTextField(20);\n txtActivo\t\t\t= new JTextField(20);\n \n // Labels\n lbLegajo \t\t= new JLabel(\"Legajo\", JLabel.CENTER);\n lbFechaIngreso \t= new JLabel(\"Fecha Ingreso\", JLabel.CENTER);\n lbTitular \t\t= new JLabel(\"Titular\", JLabel.CENTER);\n lbDepartamento \t= new JLabel(\"Departamento\", JLabel.CENTER);\n lbTelefono\t\t= new JLabel(\"Telefono\", JLabel.CENTER);\n lbActivo \t\t= new JLabel(\"Activo\", JLabel.CENTER);\n \n \n \n //Botones\n btnInicio \t = new JButton(\"<<\");\n btnSiguiente = new JButton(\">\");\n btnAnterior = new JButton(\"<\");\n btnFin \t = new JButton(\">>\");\n buttonGuardar = new JButton(\"Agregar\");\n buttonCancelar= new JButton(\"Cancelar\");\n \n // Cargos\n String[] datosActivo= { \"SI\", \"NO\" };\n listaActivo= new JComboBox(datosActivo);\n listaActivo.setSelectedIndex(0);\n \n \n ActionListener listenerNavegacion = new ActionListener() \n {\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tJButton botonListener = (JButton) e.getSource();\n\t\t\t\tif (botonListener.getText().trim().equals(\"<<\") == true)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"INICIO\");\n\t\t\t\t\tnavegarRegistros(cursorDatos.INICIO);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (botonListener.getText().trim().equals(\"<\") == true)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"ANTERIOR\");\n\t\t\t\t\tnavegarRegistros(cursorDatos.ANTERIOR);\n\t\t\t\t}\n\t\t\t\telse if (botonListener.getText().trim().equals(\">\") == true)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"SIGUIENTE\");\n\t\t\t\t\tnavegarRegistros(cursorDatos.SIGUIENTE);\n\t\t\t\t}\n\t\t\t\telse if (botonListener.getText().trim().equals(\">>\") == true)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"FIN\");\n\t\t\t\t\tnavegarRegistros(cursorDatos.FIN);\n\t\t\t\t}\n\t\t\t}\n };\n ActionListener listenerBotones = new ActionListener() \n {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tJButton botonListener = (JButton) e.getSource();\n\t\t\t\tif (botonListener.getText().trim().equals(\"Agregar\") == true)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Agregar funcionario\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tguardarfuncionarios();\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\ttablaDatos.removeAll();\n\t\t\t\t\tcargarTabla();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(botonListener.getText().trim().equals(\"Actualizar\") == true)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Actualizar funcionario\");\n\t\t\t\t\ttry\n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\tactualizarDatos();\n\t\t\t\t\t\tcargarTabla();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception ex)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Error:\" + ex.toString());\n\t\t\t\t\t}\n\t\t\t\t\ttablaDatos.removeAll();\n\t\t\t\t\tcargarTabla();\t\t\n\t\t\t\t}\n\t\t\t\telse if(botonListener.getText().trim().equals(\"Cancelar\") == true)\n\t\t\t\t{\n\t\t\t\t\ttxtLegajo.setText(\"\");\n\t\t\t txtFechaIngreso.setText(\"\");\n\t\t\t txtTitular.setText(\"\");\n\t\t\t txtDepartamento.setText(\"\");\n\t\t\t txtTelefono.setText(\"\");\n\t\t\t txtActivo.setText(\"\");\t\t\t\t\n\t\t\t\t\tbuttonGuardar.setText(\"Agregar\");\n\t\t\t tablaDatos.updateUI();\n\t\t\t cargarTabla();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t\tActionListener listenerLista = new ActionListener() \n\t\t{\n\t\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tJComboBox listaListener = (JComboBox) e.getSource();\n\t\t\t\tcampoCargo = (String) listaListener.getSelectedItem();\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t\t\n\t\tbuttonGuardar.addActionListener(listenerBotones);\n\t\tbuttonCancelar.addActionListener(listenerBotones);\n\t\t\n\t\tbtnInicio.addActionListener(listenerNavegacion);\n\t\tbtnAnterior.addActionListener(listenerNavegacion);\n\t\tbtnSiguiente.addActionListener(listenerNavegacion);\n\t\tbtnFin.addActionListener(listenerNavegacion);\n\t\tmodelo =new DefaultTableModel();\n\t\ttablaDatos = new JTable();\n\t\t\n\t\t\n\t\tconfigurarTabla();\n\t\tcargarTabla();\n\t\ttablaDatos.setModel(modelo);\n\t\ttablaDatos.setFillsViewportHeight(true);\n\t\tJScrollPane scrollPane = new JScrollPane(tablaDatos);\n\t\t\n\t\tpanelFormulario.add(lbLegajo);\n panelFormulario.add(txtLegajo);\n\t\tpanelFormulario.add(lbFechaIngreso);\n panelFormulario.add(txtFechaIngreso);\n panelFormulario.add(lbTitular);\n panelFormulario.add(txtTitular);\n panelFormulario.add(lbDepartamento);\n panelFormulario.add(txtDepartamento);\n panelFormulario.add(lbTelefono);\n panelFormulario.add(txtTelefono);\n panelFormulario.add(lbActivo);\n panelFormulario.add(listaActivo); \n panelPrincipal.add(panelFormulario); \n panelBotonera.add(buttonGuardar);\n panelBotonera.add(buttonCancelar); \n panelPrincipal.add(panelBotonera); \n panelNavegacion.add(btnInicio);\n panelNavegacion.add(btnAnterior);\n panelNavegacion.add(btnSiguiente);\n panelNavegacion.add(btnFin);\n panelPrincipal.add(panelNavegacion);\n panelPrincipal.add(scrollPane); \n frame.add(panelPrincipal);\n \t \t \n \n //frame.getContentPane().add(yellowLabel, BorderLayout.CENTER);\n \n //Display the window.\n frame.pack();\n frame.setSize(500,500);\n //frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n tablaDatos.addMouseListener(new MouseAdapter()\n\t\t{\n\t\t\tpublic void mouseClicked(MouseEvent e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Tabla Click\");\n\t\t\t\tverDatos();\n\t\t\t}\n\t\t});\n \t\n\t}",
"public frmMantEmpresas() {\n initComponents();\n this.presentarDatos();\n ClaseUtil.activarComponente(jPanelDatos, false);\n ClaseUtil.activarComponente(jPanelTabla, true);\n ClaseUtil.activarComponente(jPanelAcciones, false);\n }",
"public Inicio() {\n initComponents();\n setVisible(true);\n \n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jtfEmpresaRFC = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jbtEmpresas = new javax.swing.JButton();\n jtfNombreEmpresa = new javax.swing.JTextField();\n jbtHistorial = new javax.swing.JButton();\n jbtSaldos = new javax.swing.JButton();\n jbtConsultarEmpresa = new javax.swing.JButton();\n jlbSeleccionAño = new javax.swing.JLabel();\n jcbSeleccionAñoIni = new javax.swing.JComboBox();\n jcbSeleccionMesIni = new javax.swing.JComboBox();\n jcbSeleccionInicio = new javax.swing.JComboBox();\n jcbSeleccionFin = new javax.swing.JComboBox();\n jlbSeleccionMes = new javax.swing.JLabel();\n jlbSeleccionInicio = new javax.swing.JLabel();\n jlbSeleccionFin = new javax.swing.JLabel();\n jlbSeleccionDia = new javax.swing.JLabel();\n jcbSeleccionAñoFin = new javax.swing.JComboBox();\n jcbSeleccionMesFin = new javax.swing.JComboBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Consulta de Saldos\");\n setPreferredSize(new java.awt.Dimension(600, 300));\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Seleccione Empresa\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Arial\", 0, 12), java.awt.Color.blue)); // NOI18N\n\n jLabel1.setText(\"Empresa:\");\n\n jtfEmpresaRFC.setEditable(false);\n jtfEmpresaRFC.setBackground(new java.awt.Color(255, 204, 51));\n jtfEmpresaRFC.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jtfEmpresaRFCActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"R.F.C.\");\n\n jbtEmpresas.setText(\"Empresas\");\n jbtEmpresas.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbtEmpresasActionPerformed(evt);\n }\n });\n\n jtfNombreEmpresa.setEditable(false);\n\n jbtHistorial.setText(\"Ver Historial\");\n jbtHistorial.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbtHistorialActionPerformed(evt);\n }\n });\n\n jbtSaldos.setText(\"Saldos en Bancos\");\n jbtSaldos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbtSaldosActionPerformed(evt);\n }\n });\n\n jbtConsultarEmpresa.setText(\"Consultar\");\n jbtConsultarEmpresa.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbtConsultarEmpresaActionPerformed(evt);\n }\n });\n\n jlbSeleccionAño.setText(\"Año:\");\n\n jlbSeleccionMes.setText(\"Mes:\");\n\n jlbSeleccionInicio.setText(\"Inicio:\");\n\n jlbSeleccionFin.setText(\"Fin:\");\n\n jlbSeleccionDia.setText(\"Dia:\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jlbSeleccionInicio)\n .addComponent(jlbSeleccionFin)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jtfEmpresaRFC)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jbtEmpresas))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jcbSeleccionAñoFin, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()\n .addComponent(jlbSeleccionAño)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jcbSeleccionAñoIni, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jlbSeleccionMes)\n .addComponent(jcbSeleccionMesIni, 0, 126, Short.MAX_VALUE)\n .addComponent(jcbSeleccionMesFin, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jlbSeleccionDia)\n .addGap(26, 26, 26))\n .addComponent(jcbSeleccionInicio, javax.swing.GroupLayout.Alignment.TRAILING, 0, 64, Short.MAX_VALUE)\n .addComponent(jcbSeleccionFin, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(14, 14, 14)\n .addComponent(jbtConsultarEmpresa))\n .addComponent(jtfNombreEmpresa)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jbtHistorial, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 103, Short.MAX_VALUE)\n .addComponent(jbtSaldos, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jtfEmpresaRFC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2)\n .addComponent(jbtEmpresas))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jtfNombreEmpresa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jlbSeleccionAño)\n .addComponent(jlbSeleccionMes)\n .addComponent(jlbSeleccionDia))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jcbSeleccionAñoIni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jcbSeleccionMesIni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jcbSeleccionInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jlbSeleccionInicio)\n .addComponent(jbtConsultarEmpresa))\n .addGap(14, 14, 14)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jcbSeleccionMesFin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jcbSeleccionAñoFin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jlbSeleccionFin)\n .addComponent(jcbSeleccionFin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jbtSaldos)\n .addComponent(jbtHistorial))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public BuscarBanda() {\n initComponents();\nthis.setLocationRelativeTo(null);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n txfBuscar = new javax.swing.JTextField();\n btnConsultarPercepcion = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblUM = new javax.swing.JTable();\n btnAgregarPercepcion = new javax.swing.JButton();\n btnEditarPercecion = new javax.swing.JButton();\n btnEliminarPercepcion = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(254, 254, 254));\n setForeground(new java.awt.Color(254, 254, 254));\n setLayout(null);\n\n txfBuscar.setBackground(new java.awt.Color(254, 254, 254));\n txfBuscar.setForeground(new java.awt.Color(1, 1, 1));\n txfBuscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txfBuscarActionPerformed(evt);\n }\n });\n txfBuscar.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n txfBuscarKeyReleased(evt);\n }\n public void keyTyped(java.awt.event.KeyEvent evt) {\n txfBuscarKeyTyped(evt);\n }\n });\n add(txfBuscar);\n txfBuscar.setBounds(190, 30, 330, 30);\n\n btnConsultarPercepcion.setBackground(new java.awt.Color(254, 254, 254));\n btnConsultarPercepcion.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/icon-buscar.png\"))); // NOI18N\n btnConsultarPercepcion.setBorderPainted(false);\n btnConsultarPercepcion.setContentAreaFilled(false);\n btnConsultarPercepcion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnConsultarPercepcionActionPerformed(evt);\n }\n });\n add(btnConsultarPercepcion);\n btnConsultarPercepcion.setBounds(540, 10, 60, 50);\n\n tblUM.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID UNIDAD\", \"NOMBRE\", \"SIGLAS\", \"ESTATUS\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, true\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tblUM.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n tblUM.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tblUMMouseClicked(evt);\n }\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n tblUMMouseEntered(evt);\n }\n });\n jScrollPane1.setViewportView(tblUM);\n\n add(jScrollPane1);\n jScrollPane1.setBounds(30, 80, 789, 311);\n\n btnAgregarPercepcion.setBackground(new java.awt.Color(254, 254, 254));\n btnAgregarPercepcion.setForeground(new java.awt.Color(254, 254, 254));\n btnAgregarPercepcion.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/agregar.png\"))); // NOI18N\n btnAgregarPercepcion.setBorderPainted(false);\n btnAgregarPercepcion.setContentAreaFilled(false);\n btnAgregarPercepcion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAgregarPercepcionActionPerformed(evt);\n }\n });\n add(btnAgregarPercepcion);\n btnAgregarPercepcion.setBounds(760, 430, 81, 57);\n\n btnEditarPercecion.setBackground(new java.awt.Color(254, 254, 254));\n btnEditarPercecion.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/icon-cambiar.png\"))); // NOI18N\n btnEditarPercecion.setBorderPainted(false);\n btnEditarPercecion.setContentAreaFilled(false);\n btnEditarPercecion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEditarPercecionActionPerformed(evt);\n }\n });\n add(btnEditarPercecion);\n btnEditarPercecion.setBounds(580, 430, 81, 57);\n\n btnEliminarPercepcion.setBackground(new java.awt.Color(254, 254, 254));\n btnEliminarPercepcion.setForeground(new java.awt.Color(254, 254, 254));\n btnEliminarPercepcion.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/borar1-icon.png\"))); // NOI18N\n btnEliminarPercepcion.setBorderPainted(false);\n btnEliminarPercepcion.setContentAreaFilled(false);\n btnEliminarPercepcion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEliminarPercepcionActionPerformed(evt);\n }\n });\n add(btnEliminarPercepcion);\n btnEliminarPercepcion.setBounds(690, 420, 52, 67);\n\n jLabel1.setFont(new java.awt.Font(\"Noto Sans\", 1, 12)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(1, 1, 1));\n jLabel1.setText(\"BUSCAR POR NOMBRE\");\n add(jLabel1);\n jLabel1.setBounds(40, 40, 129, 16);\n\n jButton1.setBackground(new java.awt.Color(254, 254, 254));\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/refresh_icon.png\"))); // NOI18N\n jButton1.setBorderPainted(false);\n jButton1.setContentAreaFilled(false);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n add(jButton1);\n jButton1.setBounds(10, 440, 68, 60);\n add(jLabel2);\n jLabel2.setBounds(343, 465, 0, 0);\n }",
"public Frame_Ajouter_Administrateur() {\n initComponents();\n }",
"private void initialize() {\n\t\tfrmCadastrarBateria = new JFrame();\n\t\tfrmCadastrarBateria.setIconImage(Toolkit.getDefaultToolkit().getImage(\"C:\\\\Erich\\\\Faculdade\\\\APS\\\\2\\u00BA Semestre\\\\Imagens\\\\Bateria.jpg\"));\n\t\tfrmCadastrarBateria.setTitle(\"Cadastrar Bateria\");\n\t\tfrmCadastrarBateria.setBounds(100, 100, 320, 201);\n\t\tfrmCadastrarBateria.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmCadastrarBateria.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Fabricante da bateria:\");\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblNewLabel.setBounds(10, 11, 128, 14);\n\t\tfrmCadastrarBateria.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblModeloDaBateria = new JLabel(\"Modelo da bateria:\");\n\t\tlblModeloDaBateria.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblModeloDaBateria.setBounds(10, 36, 128, 14);\n\t\tfrmCadastrarBateria.getContentPane().add(lblModeloDaBateria);\n\t\t\n\t\tJLabel lblTensoDaBateria = new JLabel(\"Tens\\u00E3o da bateria:\");\n\t\tlblTensoDaBateria.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tlblTensoDaBateria.setBounds(10, 61, 128, 14);\n\t\tfrmCadastrarBateria.getContentPane().add(lblTensoDaBateria);\n\t\t\n\t\ttextFieldFabricanteBateria = new JTextField();\n\t\ttextFieldFabricanteBateria.setBounds(148, 8, 129, 20);\n\t\tfrmCadastrarBateria.getContentPane().add(textFieldFabricanteBateria);\n\t\ttextFieldFabricanteBateria.setColumns(10);\n\t\t\n\t\ttextFieldNomeBateria = new JTextField();\n\t\ttextFieldNomeBateria.setColumns(10);\n\t\ttextFieldNomeBateria.setBounds(148, 33, 129, 20);\n\t\tfrmCadastrarBateria.getContentPane().add(textFieldNomeBateria);\n\t\t\n\t\ttextFieldTensaoBateria = new JTextField();\n\t\ttextFieldTensaoBateria.setColumns(10);\n\t\ttextFieldTensaoBateria.setBounds(148, 58, 129, 20);\n\t\tfrmCadastrarBateria.getContentPane().add(textFieldTensaoBateria);\n\t\t\n\t\tbtnCancelar = new JButton(\"Cancelar\");\n\t\tbtnCancelar.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfrmCadastrarBateria.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnCancelar.setBounds(205, 128, 89, 23);\n\t\tfrmCadastrarBateria.getContentPane().add(btnCancelar);\n\t\t\n\t\tbtnOk = new JButton(\"Ok\");\n\t\tbtnOk.setBounds(205, 94, 89, 23);\n\t\tfrmCadastrarBateria.getContentPane().add(btnOk);\n\t}",
"public FormEmpresa() {\n initComponents();\n this.getComboBox();\n this.buscaDadosEmpresa();\n \n }",
"private void jBtn_AjouterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtn_AjouterActionPerformed\n // Si onglet Client\n if(numOnglet() == 0){\n Formulaire_Client creaClient = new Formulaire_Client();\n creaClient.setVisible(true);\n this.setVisible(false);\n \n }\n else{\n Formulaire_Prospect creaProspect = new Formulaire_Prospect();\n creaProspect.setVisible(true);\n this.setVisible(false);\n } \n }",
"public F_Registrasi() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setExtendedState(JFrame.MAXIMIZED_BOTH);\n this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\n kon = new koneksi();\n// btn_ubah.setVisible(false);\n model = new DefaultTableModel ();\n jTable1.setModel(model);\n model.addColumn(\"Id\");\n model.addColumn(\"Nama\");\n model.addColumn(\"Alamat\");\n model.addColumn(\"Nomor\");\n }",
"private void inicioButtonActionPerformed(java.awt.event.ActionEvent evt) {\n this.contenedorPanel.setVisible(false);\n this.contenedorPanel.removeAll();\n this.contenedorPanel.add(mainPanel); \n this.contenedorPanel.setVisible(true);\n }",
"public frmPengembalian() {\n initComponents();\n model = new DefaultTableModel();\n \n //memberi nama header pada tabel\n tblKembali.setModel(model);\n model.addColumn(\"NAMA\");\n model.addColumn(\"ALAMAT\");\n model.addColumn(\"NO. HP\");\n model.addColumn(\"NAMA KAMERA\");\n model.addColumn(\"KODE KAMERA\");\n model.addColumn(\"TANGGAL DISEWAKAN\");\n model.addColumn(\"TANGGAL DIKEMBALIKAN\");\n model.addColumn(\"TERLAMBAT\");\n\n \n //fungsi ambil data\n getDataKategori();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n MenuOpciones = new javax.swing.JPopupMenu();\n ItemActivar = new javax.swing.JMenuItem();\n Itemdesactivar = new javax.swing.JMenuItem();\n jPanel1 = new javax.swing.JPanel();\n btnmini = new javax.swing.JButton();\n btncerrar = new javax.swing.JButton();\n btnregresar = new javax.swing.JButton();\n lblnombrerh = new javax.swing.JLabel();\n lblcargo = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jScrollPane3 = new javax.swing.JScrollPane();\n tbpercep = new javax.swing.JTable();\n panelreginc = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n txtnombre = new javax.swing.JTextField();\n GuardarIn = new javax.swing.JButton();\n txtdias = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n txtBuscar = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n\n ItemActivar.setText(\"Activar\");\n ItemActivar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ItemActivarActionPerformed(evt);\n }\n });\n MenuOpciones.add(ItemActivar);\n\n Itemdesactivar.setText(\"Desactivar\");\n Itemdesactivar.setToolTipText(\"\");\n Itemdesactivar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ItemdesactivarActionPerformed(evt);\n }\n });\n MenuOpciones.add(Itemdesactivar);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setUndecorated(true);\n\n jPanel1.setBackground(new java.awt.Color(229, 230, 234));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n btnmini.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/View/img/minimizar.png\"))); // NOI18N\n btnmini.setBorderPainted(false);\n btnmini.setContentAreaFilled(false);\n btnmini.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnminiActionPerformed(evt);\n }\n });\n jPanel1.add(btnmini, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 0, 32, 30));\n\n btncerrar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/View/img/error.png\"))); // NOI18N\n btncerrar.setBorderPainted(false);\n btncerrar.setContentAreaFilled(false);\n btncerrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btncerrarActionPerformed(evt);\n }\n });\n jPanel1.add(btncerrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 0, 32, 30));\n\n btnregresar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/View/img/regresar.png\"))); // NOI18N\n btnregresar.setBorderPainted(false);\n btnregresar.setContentAreaFilled(false);\n btnregresar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnregresarActionPerformed(evt);\n }\n });\n jPanel1.add(btnregresar, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 0, 32, 30));\n\n lblnombrerh.setFont(new java.awt.Font(\"Century Gothic\", 1, 14)); // NOI18N\n lblnombrerh.setForeground(new java.awt.Color(51, 102, 255));\n lblnombrerh.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(51, 102, 255)));\n jPanel1.add(lblnombrerh, new org.netbeans.lib.awtextra.AbsoluteConstraints(35, 20, 250, 20));\n\n lblcargo.setFont(new java.awt.Font(\"Century Gothic\", 1, 14)); // NOI18N\n lblcargo.setForeground(new java.awt.Color(51, 102, 255));\n lblcargo.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(51, 102, 255)));\n jPanel1.add(lblcargo, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 20, 210, 20));\n\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/View/img/user.png\"))); // NOI18N\n jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 10, -1, 40));\n\n jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/View/img/portafolio.png\"))); // NOI18N\n jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 10, -1, 40));\n\n jLabel2.setFont(new java.awt.Font(\"Century Gothic\", 1, 18)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Registro de percepciones y deducciones\");\n\n tbpercep= new javax.swing.JTable(){\n public boolean isCellEditable(int rowIndex,int conlIndex ){\n return false;\n }\n };\n tbpercep.setAutoCreateRowSorter(true);\n tbpercep.setForeground(new java.awt.Color(51, 51, 51));\n tbpercep.setComponentPopupMenu(MenuOpciones);\n tbpercep.setDropMode(javax.swing.DropMode.INSERT_ROWS);\n tbpercep.setFillsViewportHeight(true);\n tbpercep.setGridColor(new java.awt.Color(255, 255, 255));\n tbpercep.setInheritsPopupMenu(true);\n tbpercep.setIntercellSpacing(new java.awt.Dimension(2, 2));\n tbpercep.setSelectionBackground(new java.awt.Color(108, 180, 221));\n tbpercep.setSelectionForeground(new java.awt.Color(0, 0, 0));\n jScrollPane3.setViewportView(tbpercep);\n\n panelreginc.setBackground(new java.awt.Color(51, 102, 255));\n panelreginc.setForeground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setFont(new java.awt.Font(\"Century Gothic\", 1, 14)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Nombre Incidencia\");\n\n txtnombre.setBackground(new java.awt.Color(51, 102, 255));\n txtnombre.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n txtnombre.setForeground(new java.awt.Color(255, 255, 255));\n txtnombre.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 2, 0, new java.awt.Color(255, 255, 255)));\n txtnombre.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n txtnombreKeyReleased(evt);\n }\n });\n\n GuardarIn.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/View/img/save1.png\"))); // NOI18N\n GuardarIn.setContentAreaFilled(false);\n GuardarIn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n GuardarInActionPerformed(evt);\n }\n });\n\n txtdias.setBackground(new java.awt.Color(51, 102, 255));\n txtdias.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n txtdias.setForeground(new java.awt.Color(255, 255, 255));\n txtdias.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 2, 0, new java.awt.Color(255, 255, 255)));\n txtdias.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n txtdiasKeyReleased(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Century Gothic\", 1, 14)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Numero de dias\");\n\n javax.swing.GroupLayout panelregincLayout = new javax.swing.GroupLayout(panelreginc);\n panelreginc.setLayout(panelregincLayout);\n panelregincLayout.setHorizontalGroup(\n panelregincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelregincLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelregincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtnombre, javax.swing.GroupLayout.PREFERRED_SIZE, 331, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(panelregincLayout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(48, 48, 48)\n .addGroup(panelregincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtdias, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(18, 55, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelregincLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(GuardarIn, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(27, 27, 27))\n );\n panelregincLayout.setVerticalGroup(\n panelregincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelregincLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelregincLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelregincLayout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtnombre, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(panelregincLayout.createSequentialGroup()\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtdias, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(GuardarIn)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n txtBuscar.setBackground(new java.awt.Color(51, 102, 255));\n txtBuscar.setFont(new java.awt.Font(\"Century Gothic\", 0, 14)); // NOI18N\n txtBuscar.setForeground(new java.awt.Color(255, 255, 255));\n txtBuscar.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 2, 0, new java.awt.Color(255, 255, 255)));\n txtBuscar.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n txtBuscarKeyReleased(evt);\n }\n });\n\n jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/View/img/search1.png\"))); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane3)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(txtBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(120, 120, 120)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(panelreginc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(2, 2, 2)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(panelreginc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(txtBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0))\n );\n\n pack();\n }",
"public frm_tutor_subida_prueba() {\n }",
"public frmVerzamelingBeheer() {\n try {\n initComponents();\n \n lblId.setVisible(false);\n\n pnlEdit.setVisible(false);\n\n for (VerzamelingsType type : TypeService.GetAllTypes()) {\n cmbType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n cmbEditType.addItem(new VerzamelingsType(type.getId(), type.getNaam()));\n }\n\n \n for (Categorie categorie : CategorieService.GetAllCategories()) {\n cmbCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n cmbEditCategorie.addItem(new Categorie(categorie.getId(), categorie.getNaam()));\n }\n \n //vertaling voor JOptionpane\n UIManager.put(\"OptionPane.cancelButtonText\", \"Annuleren\");\n UIManager.put(\"OptionPane.noButtonText\", \"Nee\");\n UIManager.put(\"OptionPane.okButtonText\", \"Oke\");\n UIManager.put(\"OptionPane.yesButtonText\", \"Ja\");\n \n this.setTitle(\"Verzamelingen beheren - Verzamelingenbeheer\");\n \n ShowEditItems(false);\n RefreshList();\n }\n catch (ExceptionInInitializerError ex)\n {\n JOptionPane.showMessageDialog(null, \"Er kan geen verbinding worden gemaakt met de database (\" + ex.getMessage() + \").\", \"Fout\", ERROR_MESSAGE);\n System.exit(1);\n }\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n txtCadena = new javax.swing.JTextField();\n btnBuscar = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n lstBusqueda = new javax.swing.JList();\n jLabel2 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setName(\"Form\"); // NOI18N\n setResizable(false);\n\n txtCadena.setName(\"txtCadena\"); // NOI18N\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(kardexarchivo.KardexArchivoApp.class).getContext().getResourceMap(BusquedaJuicio.class);\n btnBuscar.setText(resourceMap.getString(\"btnBuscar.text\")); // NOI18N\n btnBuscar.setActionCommand(resourceMap.getString(\"btnBuscar.actionCommand\")); // NOI18N\n btnBuscar.setName(\"btnBuscar\"); // NOI18N\n btnBuscar.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseEntered(java.awt.event.MouseEvent evt) {\n btnBuscarMouseEntered(evt);\n }\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnBuscarMouseClicked(evt);\n }\n });\n\n jLabel1.setFont(resourceMap.getFont(\"jLabel1.font\")); // NOI18N\n jLabel1.setText(resourceMap.getString(\"jLabel1.text\")); // NOI18N\n jLabel1.setName(\"jLabel1\"); // NOI18N\n\n jScrollPane1.setName(\"jScrollPane1\"); // NOI18N\n\n lstBusqueda.setName(\"lstBusqueda\"); // NOI18N\n lstBusqueda.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n lstBusquedaMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(lstBusqueda);\n\n jLabel2.setText(resourceMap.getString(\"jLabel2.text\")); // NOI18N\n jLabel2.setName(\"jLabel2\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(layout.createSequentialGroup()\n .addComponent(txtCadena, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnBuscar))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(156, 156, 156)\n .addComponent(jLabel1)))\n .addContainerGap(35, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(17, 17, 17)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCadena, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnBuscar))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(29, Short.MAX_VALUE))\n );\n\n pack();\n java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();\n java.awt.Dimension dialogSize = getSize();\n setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n txfNome = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n txfIdade = new javax.swing.JTextField();\n txfSexo = new javax.swing.JTextField();\n txfEstado = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n painel = new javax.swing.JPanel();\n jLabel6 = new javax.swing.JLabel();\n lblNome = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n lblIdade = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n lblSexo = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n lblEstado = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/Pessoa.png\"))); // NOI18N\n jLabel1.setText(\"jLabel1\");\n getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(-170, -20, 320, 362));\n\n txfNome.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txfNomeActionPerformed(evt);\n }\n });\n getContentPane().add(txfNome, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 40, 100, -1));\n\n jLabel2.setText(\"Nome:\");\n getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 40, -1, -1));\n\n jLabel3.setText(\"Idade:\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 80, -1, -1));\n\n jLabel4.setText(\"Sexo:\");\n getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 110, -1, -1));\n\n jLabel5.setText(\"Estado Civíl:\");\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 150, -1, -1));\n getContentPane().add(txfIdade, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 70, 100, -1));\n getContentPane().add(txfSexo, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 110, 100, -1));\n getContentPane().add(txfEstado, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 150, 100, -1));\n\n jButton1.setText(\"Click aqui\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 40, 110, 50));\n\n jLabel6.setText(\"O nome é:\");\n\n lblNome.setText(\"---\");\n\n jLabel8.setText(\"A idade é:\");\n\n lblIdade.setText(\"---\");\n\n jLabel10.setText(\"O sexo é:\");\n\n lblSexo.setText(\"---\");\n\n jLabel12.setText(\"O Estado Ciívl é:\");\n\n lblEstado.setText(\"---\");\n\n javax.swing.GroupLayout painelLayout = new javax.swing.GroupLayout(painel);\n painel.setLayout(painelLayout);\n painelLayout.setHorizontalGroup(\n painelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(painelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(painelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, painelLayout.createSequentialGroup()\n .addGroup(painelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(jLabel8)\n .addComponent(jLabel10))\n .addGroup(painelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(painelLayout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addGroup(painelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(lblNome, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(lblIdade, javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, painelLayout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addComponent(lblSexo, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, painelLayout.createSequentialGroup()\n .addComponent(jLabel12)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(lblEstado, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(48, Short.MAX_VALUE))\n );\n painelLayout.setVerticalGroup(\n painelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(painelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(painelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(lblNome))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(painelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel8)\n .addComponent(lblIdade))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(painelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel10)\n .addComponent(lblSexo))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(painelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel12)\n .addComponent(lblEstado))\n .addContainerGap(20, Short.MAX_VALUE))\n );\n\n getContentPane().add(painel, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 190, 220, 120));\n\n pack();\n }",
"public void mostrarVentanaRegistro() {\r\n\t\tmiVentanaRegistroP.setVisible(true);\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n painel_cadastrar_area3 = new javax.swing.JPanel();\n salvar = new javax.swing.JButton();\n Funcionario_id = new javax.swing.JLabel();\n voltar = new javax.swing.JButton();\n Nivel_id = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n campo_nome = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n campo_endereco = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n campo_numero = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n campo_bairro = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n campo_cidade = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n campo_estado = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n campo_cep = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n campo_ddd = new javax.swing.JTextField();\n campo_telefone = new javax.swing.JTextField();\n msg = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n campo_idt = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n campo_cpf = new javax.swing.JTextField();\n jLabel13 = new javax.swing.JLabel();\n campo_login = new javax.swing.JTextField();\n jLabel14 = new javax.swing.JLabel();\n jLabel15 = new javax.swing.JLabel();\n combo_nivel = new javax.swing.JComboBox();\n campo_senha = new javax.swing.JPasswordField();\n jLabel11 = new javax.swing.JLabel();\n campo_adm_dia = new javax.swing.JTextField();\n campo_adm_mes = new javax.swing.JTextField();\n campo_adm_ano = new javax.swing.JTextField();\n\n setBackground(new java.awt.Color(255, 241, 88));\n\n painel_cadastrar_area3.setBackground(new java.awt.Color(255, 241, 88));\n painel_cadastrar_area3.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n salvar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/salvar.png\"))); // NOI18N\n salvar.setToolTipText(\"Salvar\");\n salvar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n salvarActionPerformed(evt);\n }\n });\n\n Funcionario_id.setForeground(new java.awt.Color(255, 241, 88));\n Funcionario_id.setText(\"0\");\n\n voltar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icones/back.png\"))); // NOI18N\n voltar.setToolTipText(\"Voltar\");\n voltar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n voltarActionPerformed(evt);\n }\n });\n\n Nivel_id.setBackground(new java.awt.Color(255, 241, 88));\n Nivel_id.setForeground(new java.awt.Color(255, 241, 88));\n Nivel_id.setText(\"0\");\n\n org.jdesktop.layout.GroupLayout painel_cadastrar_area3Layout = new org.jdesktop.layout.GroupLayout(painel_cadastrar_area3);\n painel_cadastrar_area3.setLayout(painel_cadastrar_area3Layout);\n painel_cadastrar_area3Layout.setHorizontalGroup(\n painel_cadastrar_area3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(painel_cadastrar_area3Layout.createSequentialGroup()\n .addContainerGap()\n .add(salvar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 57, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(voltar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(142, 142, 142)\n .add(Funcionario_id)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(Nivel_id)\n .addContainerGap(378, Short.MAX_VALUE))\n );\n painel_cadastrar_area3Layout.setVerticalGroup(\n painel_cadastrar_area3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(painel_cadastrar_area3Layout.createSequentialGroup()\n .add(painel_cadastrar_area3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(salvar)\n .add(voltar)\n .add(painel_cadastrar_area3Layout.createSequentialGroup()\n .add(26, 26, 26)\n .add(painel_cadastrar_area3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(Funcionario_id)\n .add(Nivel_id))))\n .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jPanel1.setBackground(new java.awt.Color(255, 241, 88));\n jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jLabel1.setText(\"Nome:\");\n\n jLabel2.setText(\"Rua/Av.:\");\n\n jLabel3.setText(\"Numero:\");\n\n jLabel4.setText(\"Bairro:\");\n\n jLabel5.setText(\"Cidade:\");\n\n jLabel6.setText(\"Estado:\");\n\n jLabel7.setText(\"Cep:\");\n\n jLabel8.setText(\"Telefone:\");\n\n msg.setForeground(new java.awt.Color(255, 102, 0));\n msg.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n\n jLabel9.setText(\"Identidade:\");\n\n jLabel10.setText(\"CPF:\");\n\n jLabel13.setText(\"Login:\");\n\n jLabel14.setText(\"Senha:\");\n\n jLabel15.setText(\"Nível acesso:\");\n\n combo_nivel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n combo_nivel.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n combo_nivelItemStateChanged(evt);\n }\n });\n\n jLabel11.setText(\"D. Admissão:\");\n\n org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .add(21, 21, 21)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)\n .add(jLabel15)\n .add(jLabel13)\n .add(jLabel8)\n .add(jLabel7)\n .add(jLabel5)\n .add(jLabel4)\n .add(jLabel2)\n .add(jLabel1)\n .add(jLabel9))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .add(campo_nome, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 300, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jLabel11)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(campo_adm_dia, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(1, 1, 1)\n .add(campo_adm_mes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 29, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(2, 2, 2)\n .add(campo_adm_ano, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 48, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(jPanel1Layout.createSequentialGroup()\n .add(campo_endereco, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 300, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jLabel3)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(campo_numero, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(campo_bairro, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 300, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jPanel1Layout.createSequentialGroup()\n .add(campo_cidade, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 300, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jLabel6)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(campo_estado, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(campo_cep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 96, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jPanel1Layout.createSequentialGroup()\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)\n .add(org.jdesktop.layout.GroupLayout.LEADING, campo_idt)\n .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1Layout.createSequentialGroup()\n .add(campo_ddd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 47, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(2, 2, 2)\n .add(campo_telefone, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(org.jdesktop.layout.GroupLayout.LEADING, campo_login))\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .add(30, 30, 30)\n .add(jLabel10))\n .add(jPanel1Layout.createSequentialGroup()\n .add(18, 18, 18)\n .add(jLabel14)))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)\n .add(campo_senha)\n .add(campo_cpf, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE))))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(msg))\n .add(combo_nivel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(msg, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jPanel1Layout.createSequentialGroup()\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel1)\n .add(campo_nome, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel11)\n .add(campo_adm_dia, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(campo_adm_mes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(campo_adm_ano, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel2)\n .add(campo_endereco, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel3)\n .add(campo_numero, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel4)\n .add(campo_bairro, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel5)\n .add(campo_cidade, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel6)\n .add(campo_estado, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel7)\n .add(campo_cep, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel8)\n .add(campo_ddd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(campo_telefone, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel9)\n .add(campo_idt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel10)\n .add(campo_cpf, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel13)\n .add(campo_login, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(campo_senha, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel14))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel15)\n .add(combo_nivel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(95, 95, 95))\n );\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(painel_cadastrar_area3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 669, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(painel_cadastrar_area3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 69, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 399, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jButton4 = new javax.swing.JButton();\n txf_Buscar = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n tbl_Datos = new javax.swing.JTable();\n cmb_Opcion = new javax.swing.JComboBox<>();\n lbl_Buscar = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n btn_Eliminar = new javax.swing.JButton();\n btn_Modificar = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"SoftCommodity+ by White Company® \");\n setResizable(false);\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel1.setBackground(new java.awt.Color(0, 0, 0));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/Categoria/Atras.png\"))); // NOI18N\n jButton4.setBorderPainted(false);\n jButton4.setContentAreaFilled(false);\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));\n\n txf_Buscar.setBackground(new java.awt.Color(237, 174, 195));\n txf_Buscar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txf_BuscarActionPerformed(evt);\n }\n });\n txf_Buscar.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n txf_BuscarKeyReleased(evt);\n }\n });\n jPanel1.add(txf_Buscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 100, 240, -1));\n\n tbl_Datos.setAutoCreateRowSorter(true);\n tbl_Datos.setBackground(new java.awt.Color(237, 174, 195));\n tbl_Datos.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null},\n {null, null},\n {null, null},\n {null, null}\n },\n new String [] {\n \"IdCategoria\", \"Nombre\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n true, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tbl_Datos.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbl_DatosMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tbl_Datos);\n\n jPanel1.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 140, 538, 384));\n\n cmb_Opcion.setBackground(new java.awt.Color(237, 174, 195));\n cmb_Opcion.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"IdCategoria\", \"Nombre\" }));\n cmb_Opcion.setSelectedIndex(1);\n cmb_Opcion.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cmb_OpcionActionPerformed(evt);\n }\n });\n jPanel1.add(cmb_Opcion, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 70, -1, -1));\n\n lbl_Buscar.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n lbl_Buscar.setForeground(new java.awt.Color(255, 255, 255));\n lbl_Buscar.setText(\"Buscar:\");\n jPanel1.add(lbl_Buscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 100, -1, -1));\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/Categoria/Añadir.png\"))); // NOI18N\n jButton1.setBorderPainted(false);\n jButton1.setContentAreaFilled(false);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 140, -1, -1));\n\n btn_Eliminar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/Categoria/Eliminar.png\"))); // NOI18N\n btn_Eliminar.setBorderPainted(false);\n btn_Eliminar.setContentAreaFilled(false);\n btn_Eliminar.setEnabled(false);\n btn_Eliminar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_EliminarActionPerformed(evt);\n }\n });\n jPanel1.add(btn_Eliminar, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 340, -1, -1));\n\n btn_Modificar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/Categoria/Modificar.png\"))); // NOI18N\n btn_Modificar.setBorderPainted(false);\n btn_Modificar.setContentAreaFilled(false);\n btn_Modificar.setEnabled(false);\n btn_Modificar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_ModificarActionPerformed(evt);\n }\n });\n jPanel1.add(btn_Modificar, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 240, -1, -1));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Categorias Registradas\");\n jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 20, -1, -1));\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Buscar por:\");\n jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 70, -1, -1));\n\n jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/Fondo5_Med.png\"))); // NOI18N\n jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(-10, 150, -1, -1));\n\n jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Img/Fondo5_Med.png\"))); // NOI18N\n jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(-30, -180, -1, -1));\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 780, 580));\n\n pack();\n }",
"public FGlavna() {\n initComponents();\n pripremiFormu();\n }",
"public JFrameRelatorios() {\n initComponents();\n }",
"private void btnAdaugaActionPerformed(java.awt.event.ActionEvent evt) { \n diAdauga.setVisible(true);\n btnUpdate.setVisible(false);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n panelConsultarVeiculo = new javax.swing.JPanel();\n txtPlaca = new javax.swing.JTextField();\n labelTipo = new javax.swing.JLabel();\n txtNdeIdentificacao = new javax.swing.JTextField();\n labelMarca = new javax.swing.JLabel();\n txtModelo = new javax.swing.JTextField();\n labelModelo = new javax.swing.JLabel();\n txtMarca = new javax.swing.JTextField();\n labelPlaca = new javax.swing.JLabel();\n labelNdeInscricao = new javax.swing.JLabel();\n labelCor = new javax.swing.JLabel();\n txtTipo = new javax.swing.JTextField();\n txtCor = new javax.swing.JTextField();\n jPanelBGConsultarVeiculo1 = new javax.swing.JPanel();\n btnAlterarVeiculo = new javax.swing.JButton();\n btnExcluirVeiculo = new javax.swing.JButton();\n jPanelBGConsultarVeiculo2 = new javax.swing.JPanel();\n btnConsultarVeiculo = new javax.swing.JButton();\n btnNovaConsultarVeiculo = new javax.swing.JButton();\n\n setClosable(true);\n setResizable(true);\n setTitle(\"Consultar Veículo\");\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n panelConsultarVeiculo.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n panelConsultarVeiculo.add(txtPlaca, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 220, 632, 30));\n\n labelTipo.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelTipo.setForeground(new java.awt.Color(72, 61, 139));\n labelTipo.setText(\"Tipo\");\n panelConsultarVeiculo.add(labelTipo, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 330, -1, -1));\n panelConsultarVeiculo.add(txtNdeIdentificacao, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 320, 250, 30));\n\n labelMarca.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelMarca.setForeground(new java.awt.Color(72, 61, 139));\n labelMarca.setText(\"Marca\");\n panelConsultarVeiculo.add(labelMarca, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 280, -1, -1));\n panelConsultarVeiculo.add(txtModelo, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 120, 632, 30));\n\n labelModelo.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelModelo.setForeground(new java.awt.Color(72, 61, 139));\n labelModelo.setText(\"Modelo\");\n panelConsultarVeiculo.add(labelModelo, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 130, -1, -1));\n panelConsultarVeiculo.add(txtMarca, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 270, 632, 30));\n\n labelPlaca.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelPlaca.setForeground(new java.awt.Color(72, 61, 139));\n labelPlaca.setText(\"Placa\");\n panelConsultarVeiculo.add(labelPlaca, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 230, -1, -1));\n\n labelNdeInscricao.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelNdeInscricao.setForeground(new java.awt.Color(72, 61, 139));\n labelNdeInscricao.setText(\"N° de Identificação\");\n panelConsultarVeiculo.add(labelNdeInscricao, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 330, -1, -1));\n\n labelCor.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n labelCor.setForeground(new java.awt.Color(72, 61, 139));\n labelCor.setText(\"Cor\");\n panelConsultarVeiculo.add(labelCor, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 180, -1, -1));\n panelConsultarVeiculo.add(txtTipo, new org.netbeans.lib.awtextra.AbsoluteConstraints(620, 320, 250, 30));\n panelConsultarVeiculo.add(txtCor, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 170, 632, 30));\n\n jPanelBGConsultarVeiculo1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(72, 61, 139), 1, true));\n jPanelBGConsultarVeiculo1.setForeground(new java.awt.Color(72, 61, 139));\n\n btnAlterarVeiculo.setBackground(new java.awt.Color(72, 61, 139));\n btnAlterarVeiculo.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnAlterarVeiculo.setForeground(new java.awt.Color(255, 255, 255));\n btnAlterarVeiculo.setText(\"Alterar\");\n\n btnExcluirVeiculo.setBackground(new java.awt.Color(72, 61, 139));\n btnExcluirVeiculo.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnExcluirVeiculo.setForeground(new java.awt.Color(255, 255, 255));\n btnExcluirVeiculo.setText(\"Excluir\");\n\n javax.swing.GroupLayout jPanelBGConsultarVeiculo1Layout = new javax.swing.GroupLayout(jPanelBGConsultarVeiculo1);\n jPanelBGConsultarVeiculo1.setLayout(jPanelBGConsultarVeiculo1Layout);\n jPanelBGConsultarVeiculo1Layout.setHorizontalGroup(\n jPanelBGConsultarVeiculo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelBGConsultarVeiculo1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanelBGConsultarVeiculo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnAlterarVeiculo, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnExcluirVeiculo, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n jPanelBGConsultarVeiculo1Layout.setVerticalGroup(\n jPanelBGConsultarVeiculo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelBGConsultarVeiculo1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnAlterarVeiculo)\n .addGap(17, 17, 17)\n .addComponent(btnExcluirVeiculo)\n .addContainerGap(14, Short.MAX_VALUE))\n );\n\n panelConsultarVeiculo.add(jPanelBGConsultarVeiculo1, new org.netbeans.lib.awtextra.AbsoluteConstraints(730, 370, 140, 90));\n\n jPanelBGConsultarVeiculo2.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(72, 61, 139), 1, true));\n jPanelBGConsultarVeiculo2.setForeground(new java.awt.Color(72, 61, 139));\n\n btnConsultarVeiculo.setBackground(new java.awt.Color(72, 61, 139));\n btnConsultarVeiculo.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnConsultarVeiculo.setForeground(new java.awt.Color(255, 255, 255));\n btnConsultarVeiculo.setText(\"Consultar\");\n\n btnNovaConsultarVeiculo.setBackground(new java.awt.Color(72, 61, 139));\n btnNovaConsultarVeiculo.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\n btnNovaConsultarVeiculo.setForeground(new java.awt.Color(255, 255, 255));\n btnNovaConsultarVeiculo.setText(\"Nova Consulta\");\n\n javax.swing.GroupLayout jPanelBGConsultarVeiculo2Layout = new javax.swing.GroupLayout(jPanelBGConsultarVeiculo2);\n jPanelBGConsultarVeiculo2.setLayout(jPanelBGConsultarVeiculo2Layout);\n jPanelBGConsultarVeiculo2Layout.setHorizontalGroup(\n jPanelBGConsultarVeiculo2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelBGConsultarVeiculo2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanelBGConsultarVeiculo2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnConsultarVeiculo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnNovaConsultarVeiculo, javax.swing.GroupLayout.Alignment.TRAILING))\n .addContainerGap())\n );\n jPanelBGConsultarVeiculo2Layout.setVerticalGroup(\n jPanelBGConsultarVeiculo2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanelBGConsultarVeiculo2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnConsultarVeiculo)\n .addGap(18, 18, 18)\n .addComponent(btnNovaConsultarVeiculo)\n .addContainerGap(13, Short.MAX_VALUE))\n );\n\n panelConsultarVeiculo.add(jPanelBGConsultarVeiculo2, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 370, -1, 90));\n\n jPanel1.add(panelConsultarVeiculo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -2, 1050, 590));\n\n getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n }",
"public void CierraTablero()\r\n\t{\r\n\t\tTablero.this.setVisible(false);\r\n\t\tTablero.this.mara.setVisible(true);\r\n\t\tTablero.this.dispose();\r\n\t}",
"public PlanoContasConsulta() {\r\n setTitle(\"Cadastro de Plano Contas\");\r\n setLayout(new BorderLayout());\r\n pBotoes = new JPanel(new FlowLayout());\r\n tabela = new JTable(new PlanoContasTableModel());\r\n btExcluir = new JButton(\"Excluir\");\r\n btAlterar = new JButton(\"Alterar\");\r\n btIncluir = new JButton(\"Incluir\");\r\n btPesquisar = new JButton(\"Pesquisar\");\r\n lFiltro = new JLabel(\"Filtar\");\r\n tfFiltro = new JTextField(30);\r\n\r\n add(pBotoes, BorderLayout.NORTH);\r\n add(new JScrollPane(tabela), BorderLayout.CENTER);\r\n\r\n pBotoes.add(lFiltro);\r\n pBotoes.add(tfFiltro);\r\n pBotoes.add(btPesquisar);\r\n pBotoes.add(btIncluir);\r\n pBotoes.add(btAlterar);\r\n pBotoes.add(btExcluir);\r\n \r\n btPesquisar.addActionListener(this);\r\n btIncluir.addActionListener(this);\r\n btAlterar.addActionListener(this);\r\n btExcluir.addActionListener(this);\r\n \r\n \r\n\r\n pack();\r\n setVisible(true);\r\n setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n }",
"public frmacceso() {\n initComponents();\n }",
"public void limpaFramePolinomios ()\n {\n jPanelOperacoes.setVisible(false);\n jPanelPolinomios.setVisible(true);\n this.repaint();\n }",
"public void limpaFrameOperacoes ()\n {\n jPanelOperacoes.setVisible(true);\n jPanelPolinomios.setVisible(false);\n this.repaint();\n }",
"public Ingresos_cliente() {\n initComponents();\n limpiar();\n this.setLocationRelativeTo(null);\n }",
"public UTL_JFrame_VentanaGraficas() {\n \n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jPanel1 = new javax.swing.JPanel();\n jcbAula = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n jcb_Actividad = new javax.swing.JComboBox<>();\n jLabel2 = new javax.swing.JLabel();\n jcb_Maestro = new javax.swing.JComboBox<>();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n btnEntrar = new javax.swing.JButton();\n jcb_razones = new javax.swing.JComboBox<>();\n jLabel5 = new javax.swing.JLabel();\n jcb_Hora_Clase = new javax.swing.JComboBox<>();\n jLabel6 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\n jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jcbAula.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Seleccione\" }));\n jPanel1.add(jcbAula, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 90, 230, -1));\n\n jLabel1.setText(\"¿En que Aula estas?\");\n jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 100, -1, -1));\n\n jcb_Actividad.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Seleccione\", \"Clase\", \"Trabajo\", \"Investigacion\", \"Otros\" }));\n jPanel1.add(jcb_Actividad, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 120, 230, -1));\n\n jLabel2.setText(\"¿Que Actividad estas realizando?\");\n jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 120, -1, -1));\n\n jcb_Maestro.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Seleccione\" }));\n jPanel1.add(jcb_Maestro, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 180, 230, -1));\n\n jLabel3.setText(\"¿Con que maestro estas?\");\n jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 180, -1, -1));\n\n jLabel4.setFont(new java.awt.Font(\"Myanmar Text\", 1, 18)); // NOI18N\n jLabel4.setText(\"Xorox version 1.0.0\");\n jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 30, -1, -1));\n\n btnEntrar.setText(\"Entrar\");\n btnEntrar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEntrarActionPerformed(evt);\n }\n });\n jPanel1.add(btnEntrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 260, 90, -1));\n\n jcb_razones.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Seleccione\", \"Diversion\", \"Redes Sociales\", \"Correo Electronico\" }));\n jPanel1.add(jcb_razones, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 150, 230, -1));\n\n jLabel5.setText(\"Razon\");\n jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 150, -1, -1));\n\n jcb_Hora_Clase.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Seleccione\" }));\n jPanel1.add(jcb_Hora_Clase, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 210, 230, -1));\n\n jLabel6.setText(\"Selecciona tu hora de Clase\");\n jPanel1.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 210, -1, -1));\n\n jButton1.setText(\"Salir\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n jPanel1.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 260, 70, -1));\n\n jScrollPane1.setViewportView(jPanel1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 509, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 354, Short.MAX_VALUE)\n );\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n encabezado = new javax.swing.JLabel();\n jPanel2 = new javax.swing.JPanel();\n jScrollPane2 = new javax.swing.JScrollPane();\n tabla = new javax.swing.JTable();\n jLabel3 = new javax.swing.JLabel();\n nombre = new javax.swing.JTextField();\n jButton7 = new javax.swing.JButton();\n jLabel14 = new javax.swing.JLabel();\n barraBaja = new javax.swing.JPanel();\n guardar = new javax.swing.JPanel();\n saveE = new javax.swing.JLabel();\n buscarn = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n jSeparator1 = new javax.swing.JSeparator();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setUndecorated(true);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n encabezado.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n encabezado.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n encabezado.setText(\"Nuevo Empleado\");\n encabezado.setToolTipText(\"\");\n encabezado.setCursor(new java.awt.Cursor(java.awt.Cursor.MOVE_CURSOR));\n encabezado.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n encabezadoMouseDragged(evt);\n }\n });\n encabezado.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n encabezadoMousePressed(evt);\n }\n });\n getContentPane().add(encabezado, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 32, 790, 30));\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n tabla.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\", \"Título 5\", \"Título 6\", \"Título 7\", \"Título 8\", \"Título 9\", \"Título 10\"\n }\n ));\n tabla.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tablaMouseClicked(evt);\n }\n });\n jScrollPane2.setViewportView(tabla);\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane2)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 227, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 122, 790, -1));\n\n jLabel3.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel3.setText(\"Nombre\");\n getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 80, 150, -1));\n\n nombre.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n nombre.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(236, 138, 32), 1, true));\n nombre.setEnabled(false);\n getContentPane().add(nombre, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 80, 277, 24));\n\n jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/IMAGENES/icons8-close-window-20 (1).png\"))); // NOI18N\n jButton7.setBorder(null);\n jButton7.setBorderPainted(false);\n jButton7.setContentAreaFilled(false);\n jButton7.setFocusPainted(false);\n jButton7.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/IMAGENES/icons8-close-window-20.png\"))); // NOI18N\n jButton7.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/IMAGENES/icons8-close-window-20.png\"))); // NOI18N\n jButton7.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/IMAGENES/icons8-close-window-20.png\"))); // NOI18N\n jButton7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton7ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton7, new org.netbeans.lib.awtextra.AbsoluteConstraints(770, 0, -1, 30));\n\n jLabel14.setBackground(new java.awt.Color(255, 255, 255));\n jLabel14.setOpaque(true);\n getContentPane().add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 790, 30));\n\n barraBaja.setBackground(new java.awt.Color(236, 138, 32));\n\n guardar.setBackground(new java.awt.Color(238, 238, 238));\n guardar.setForeground(new java.awt.Color(238, 238, 238));\n\n saveE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n saveE.setForeground(new java.awt.Color(236, 138, 32));\n saveE.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n saveE.setText(\"Seleccionar\");\n saveE.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n saveE.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n saveEMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout guardarLayout = new javax.swing.GroupLayout(guardar);\n guardar.setLayout(guardarLayout);\n guardarLayout.setHorizontalGroup(\n guardarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(saveE, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n guardarLayout.setVerticalGroup(\n guardarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(saveE, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n buscarn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buscarnActionPerformed(evt);\n }\n });\n buscarn.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n buscarnKeyReleased(evt);\n }\n });\n\n jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Imagenes/lupa.png\"))); // NOI18N\n jButton3.setText(\"Buscar\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout barraBajaLayout = new javax.swing.GroupLayout(barraBaja);\n barraBaja.setLayout(barraBajaLayout);\n barraBajaLayout.setHorizontalGroup(\n barraBajaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, barraBajaLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(buscarn, javax.swing.GroupLayout.PREFERRED_SIZE, 299, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 253, Short.MAX_VALUE)\n .addComponent(guardar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29))\n );\n barraBajaLayout.setVerticalGroup(\n barraBajaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, barraBajaLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(barraBajaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(guardar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(barraBajaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(buscarn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3)))\n .addContainerGap())\n );\n\n getContentPane().add(barraBaja, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 370, 790, -1));\n getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 60, 170, 10));\n\n pack();\n }"
] | [
"0.78674334",
"0.76156837",
"0.755884",
"0.7546597",
"0.7520951",
"0.7476467",
"0.74400693",
"0.74254525",
"0.7405911",
"0.7336052",
"0.72752315",
"0.7207058",
"0.71929586",
"0.7187887",
"0.71814054",
"0.71698385",
"0.71669555",
"0.71635103",
"0.7152389",
"0.7148019",
"0.7144663",
"0.7140624",
"0.713263",
"0.7121646",
"0.7120726",
"0.7113484",
"0.7107148",
"0.71019447",
"0.71006405",
"0.7100373",
"0.7100088",
"0.709562",
"0.70867676",
"0.7079539",
"0.70759636",
"0.7047844",
"0.70327514",
"0.7024835",
"0.70162624",
"0.70143926",
"0.7009671",
"0.700885",
"0.70059144",
"0.7004158",
"0.7000114",
"0.69711506",
"0.6942581",
"0.69423354",
"0.6936664",
"0.69320184",
"0.6929503",
"0.69289",
"0.69264203",
"0.6923045",
"0.69220114",
"0.6914969",
"0.6913809",
"0.6904444",
"0.6901669",
"0.6896372",
"0.68944746",
"0.6891554",
"0.68859005",
"0.68814373",
"0.68794024",
"0.68673974",
"0.6865603",
"0.68642884",
"0.68641955",
"0.6861966",
"0.68582654",
"0.68577653",
"0.68521976",
"0.68474835",
"0.68398905",
"0.68382776",
"0.6832678",
"0.6831661",
"0.68302184",
"0.682949",
"0.682865",
"0.6826117",
"0.6823573",
"0.68225396",
"0.6817152",
"0.6812816",
"0.68102396",
"0.680565",
"0.680511",
"0.68025225",
"0.68022805",
"0.68014175",
"0.6800145",
"0.67996264",
"0.6797017",
"0.6796925",
"0.6795781",
"0.67929256",
"0.6790792",
"0.6787913",
"0.678682"
] | 0.0 | -1 |
[E0] [A0..BF] [80..BF] [E1..EF] [80..BF] [80..BF] | private static boolean isMalformed3(int b1, int b2, int b3) {
return (b1 == (byte) 0xe0 && (b2 & 0xe0) == 0x80) || (b2 & 0xc0) != 0x80 || (b3 & 0xc0) != 0x80;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"A6E(int i) {\n this.A00 = i;\n }",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[9];\n defaultNucleotideCodec0.getUngappedLength(byteArray0);\n byteArray0[0] = (byte)60;\n byteArray0[1] = (byte)82;\n byte byte0 = (byte) (-73);\n byteArray0[2] = (byte) (-73);\n byteArray0[3] = (byte)86;\n defaultNucleotideCodec0.iterator(byteArray0);\n byteArray0[4] = (byte)8;\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.decode(byteArray0, 3555L);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // index 3555 corresponds to encodedIndex 1781 encodedglyph length is 9\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec\", e);\n }\n }",
"public static void main(String[] args){\n \tbyte[] bytes = {90, -103};\n \tfor(byte by:bytes){\n \t\tif(Instruction.HEAD[0]!=by&&ESCAPE!=by&&Instruction.TAIL[0]!=by){\n \t\t\tSystem.out.println(\"escape code error.\"+by);\n \t\t}\n \t}\n \t\n \tSystem.out.println(Instruction.HEAD[0]);\n \tSystem.out.println(Instruction.HEAD[0]==0x5a);\n }",
"private byte m1653f() {\n char charAt;\n int i = this.f2519d;\n do {\n int i2 = this.f2519d;\n if (i2 <= 0) {\n break;\n }\n CharSequence charSequence = this.f2516a;\n int i3 = i2 - 1;\n this.f2519d = i3;\n charAt = charSequence.charAt(i3);\n this.f2520e = charAt;\n if (charAt == '&') {\n return 12;\n }\n } while (charAt != ';');\n this.f2519d = i;\n this.f2520e = ';';\n return 13;\n }",
"private void m72697hn() {\n int size = this.aep.size() - this.aes;\n if (size > 0) {\n this.aev = true;\n for (int i = 0; i < size; i++) {\n this.aep.remove(0);\n }\n }\n }",
"private byte m1655h() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 <= 0) {\n break;\n }\n CharSequence charSequence = this.f2516a;\n int i3 = i2 - 1;\n this.f2519d = i3;\n char charAt2 = charSequence.charAt(i3);\n this.f2520e = charAt2;\n if (charAt2 == '<') {\n return 12;\n }\n if (charAt2 == '>') {\n break;\n } else if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i4 = this.f2519d;\n if (i4 <= 0) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n int i5 = i4 - 1;\n this.f2519d = i5;\n charAt = charSequence2.charAt(i5);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n }\n this.f2519d = i;\n this.f2520e = '>';\n return 13;\n }",
"@Test(timeout = 4000)\n public void test08() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[5];\n byte byte0 = (byte)0;\n byte byte1 = (byte)83;\n byte byte2 = (byte)3;\n byte byte3 = (byte)0;\n byte byte4 = (byte)0;\n Range range0 = Range.ofLength(3149L);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.iterator(byteArray0, range0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // range [ 0 .. 3148 ]/0B is out of range of sequence which is only [ 0 .. -1 ]/0B\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec$IteratorImpl\", e);\n }\n }",
"public static void main(String[] args) {\n String key = \"4071321\";\n String strToDecode = \"Li, ailu jw au facntll\";\n StringBuilder ES = new StringBuilder();\n long spCount = 0;\n for(int i= 0;i<strToDecode.length();i++)\n {\n int ascii = strToDecode.charAt(i);\n\n if((ascii<65 || ascii>122) || (ascii > 90 && ascii < 97))\n {\n char a = strToDecode.charAt(i);\n System.out.println(a);\n ES.append(a);\n spCount++;\n }\n else\n {\n int keyPos = (int)(i - spCount)%7;\n int subKey = Character.getNumericValue(key.charAt(keyPos));\n long strAscii = ascii - subKey;\n\n if(strAscii<65)\n {\n strAscii = 91-(65- strAscii);\n }\n\n if(ascii >=97 && strAscii< 97) {\n strAscii = 123 - (97 - strAscii);\n }\n ES.append((char)strAscii);\n }\n\n }\n System.out.println(ES);\n\n }",
"private byte m1656i() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 < this.f2518c) {\n CharSequence charSequence = this.f2516a;\n this.f2519d = i2 + 1;\n char charAt2 = charSequence.charAt(i2);\n this.f2520e = charAt2;\n if (charAt2 == '>') {\n return 12;\n }\n if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i3 = this.f2519d;\n if (i3 >= this.f2518c) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n this.f2519d = i3 + 1;\n charAt = charSequence2.charAt(i3);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n } else {\n this.f2519d = i;\n this.f2520e = '<';\n return 13;\n }\n }\n }",
"private static char[] m3268z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 18);\n }\n return toCharArray;\n }",
"public static void m4() {\r\n\t\r\n\t\tfor(int i=1;i<=5;i++) {\r\n\t\t\tchar ch ='E';\r\n\t\t\tfor(int j=5;j>=1;j--) {\r\n\t\t\t\tSystem.out.print(ch);\r\n\t\t\t\tch--;\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"@Test(timeout = 4000)\n public void test128() throws Throwable {\n StringReader stringReader0 = new StringReader(\"D!tcbD=EVjn`\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-7), 6);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"D\", token0.toString());\n assertEquals(74, token0.kind);\n }",
"@Test void testHexCharLiteralOutsideRangeFails() {\n final String sql = \"^_unicode'cg'^XCF\";\n final String expected = \"Unknown character set 'unicode'\";\n expr(sql).fails(expected);\n }",
"@Test(timeout = 4000)\n public void test033() throws Throwable {\n Range range0 = Range.ofLength(127L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n range0.complementFrom(linkedList0);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ 0 .. 125 ]/0B\", string0);\n }",
"char getEChar();",
"private static char[] m7947z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 16);\n }\n return toCharArray;\n }",
"private int m10257E() throws cf {\r\n int i = 0;\r\n int i2;\r\n if (this.g.mo1996h() >= 5) {\r\n byte[] f = this.g.mo1994f();\r\n int g = this.g.mo1995g();\r\n i2 = 0;\r\n int i3 = 0;\r\n while (true) {\r\n byte b = f[g + i];\r\n i3 |= (b & 127) << i2;\r\n if ((b & 128) != 128) {\r\n this.g.mo1993a(i + 1);\r\n return i3;\r\n }\r\n i2 += 7;\r\n i++;\r\n }\r\n } else {\r\n i2 = 0;\r\n while (true) {\r\n byte u = mo1978u();\r\n i2 |= (u & 127) << i;\r\n if ((u & 128) != 128) {\r\n return i2;\r\n }\r\n i += 7;\r\n }\r\n }\r\n }",
"private int decode(int index) {\n return (encoded[index] - 32) & 0x3F;\n }",
"private static char[] m6491z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 108);\n }\n return toCharArray;\n }",
"private static int partialIsValidUtf8NonAscii(byte[] bytes, int index, int limit) {\n while (index < limit) {\n int index2 = index + 1;\n byte b = bytes[index];\n if (b >= 0) {\n index = index2;\n } else if (b < -32) {\n if (index2 >= limit) {\n return b;\n }\n if (b >= -62) {\n index = index2 + 1;\n if (bytes[index2] > -65) {\n }\n }\n return -1;\n } else if (b < -16) {\n if (index2 >= limit - 1) {\n return Utf8.incompleteStateFor(bytes, index2, limit);\n }\n int index3 = index2 + 1;\n byte b2 = bytes[index2];\n if (b2 <= -65 && ((b != -32 || b2 >= -96) && (b != -19 || b2 < -96))) {\n index = index3 + 1;\n if (bytes[index3] > -65) {\n }\n }\n return -1;\n } else if (index2 >= limit - 2) {\n return Utf8.incompleteStateFor(bytes, index2, limit);\n } else {\n int index4 = index2 + 1;\n byte b3 = bytes[index2];\n if (b3 <= -65 && (((b << 28) + (b3 + 112)) >> 30) == 0) {\n int index5 = index4 + 1;\n if (bytes[index4] <= -65) {\n index = index5 + 1;\n if (bytes[index5] > -65) {\n }\n }\n }\n return -1;\n }\n }\n return 0;\n }",
"public String getAAE011() {\n return AAE011;\n }",
"@Test(timeout = 4000)\n public void test126() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F}n S'~C\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(74, token0.kind);\n assertEquals(\"F\", token0.toString());\n }",
"public interface UnicodeConstants {\n\n /** Refers to unnormalized Unicode: */\n static final byte NORM_UNNORMALIZED = 0;\n /** Refers to Normalization Form C: */\n static final byte NORM_NFC = 1;\n /** Refers to Normalization Form KC: */\n static final byte NORM_NFKC = 2;\n /** Refers to Normalization Form D: */\n static final byte NORM_NFD = 3;\n /** Refers to Normalization Form KD: */\n static final byte NORM_NFKD = 4;\n /** Refers to Normalization Form THDL, which is NFD except for\n <code>U+0F77</code> and <code>U+0F79</code>, which are\n normalized according to NFKD. This is the One True\n Normalization Form, as it leaves no precomposed codepoints and\n does not normalize <code>U+0F0C</code>. */\n static final byte NORM_NFTHDL = 5;\n\n\n /** for those times when you need a char to represent a\n non-existent codepoint */\n static final char EW_ABSENT = '\\u0000';\n\n\n //\n // the thirty consonants, in alphabetical order:\n //\n\n /** first letter of the alphabet: */\n static final char EWC_ka = '\\u0F40';\n\n static final char EWC_kha = '\\u0F41';\n static final char EWC_ga = '\\u0F42';\n static final char EWC_nga = '\\u0F44';\n static final char EWC_ca = '\\u0F45';\n static final char EWC_cha = '\\u0F46';\n static final char EWC_ja = '\\u0F47';\n static final char EWC_nya = '\\u0F49';\n static final char EWC_ta = '\\u0F4F';\n static final char EWC_tha = '\\u0F50';\n static final char EWC_da = '\\u0F51';\n static final char EWC_na = '\\u0F53';\n static final char EWC_pa = '\\u0F54';\n static final char EWC_pha = '\\u0F55';\n static final char EWC_ba = '\\u0F56';\n static final char EWC_ma = '\\u0F58';\n static final char EWC_tsa = '\\u0F59';\n static final char EWC_tsha = '\\u0F5A';\n static final char EWC_dza = '\\u0F5B';\n static final char EWC_wa = '\\u0F5D';\n static final char EWC_zha = '\\u0F5E';\n static final char EWC_za = '\\u0F5F';\n /** Note the irregular name. The Extended Wylie representation is\n <code>'a</code>. */\n static final char EWC_achung = '\\u0F60';\n static final char EWC_ya = '\\u0F61';\n static final char EWC_ra = '\\u0F62';\n static final char EWC_la = '\\u0F63';\n static final char EWC_sha = '\\u0F64';\n static final char EWC_sa = '\\u0F66';\n static final char EWC_ha = '\\u0F67';\n /** achen, the 30th consonant (and, some say, the fifth vowel) DLC NOW FIXME: rename to EWC_achen */\n static final char EWC_a = '\\u0F68';\n\n\n /** In the word for father, \"pA lags\", there is an a-chung (i.e.,\n <code>\\u0F71</code>). This is the constant for that little\n guy. */\n static final char EW_achung_vowel = '\\u0F71';\n\n\n /* Four of the five vowels, some say, or, others say, \"the four\n vowels\": */\n /** \"gi gu\", the 'i' sound in the English word keep: */\n static final char EWV_i = '\\u0F72';\n /** \"zhabs kyu\", the 'u' sound in the English word tune: */\n static final char EWV_u = '\\u0F74';\n /** \"'greng bu\" (also known as \"'greng po\", and pronounced <i>dang-bo</i>), the 'a' sound in the English word gate: */\n static final char EWV_e = '\\u0F7A';\n /** \"na ro\", the 'o' sound in the English word bone: */\n static final char EWV_o = '\\u0F7C';\n\n\n /** subscribed form of EWC_wa, also known as wa-btags */\n static final char EWSUB_wa_zur = '\\u0FAD';\n /** subscribed form of EWC_ya */\n static final char EWSUB_ya_btags = '\\u0FB1';\n /** subscribed form of EWC_ra */\n static final char EWSUB_ra_btags = '\\u0FB2';\n /** subscribed form of EWC_la */\n static final char EWSUB_la_btags = '\\u0FB3';\n}",
"private static char[] m619z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 20);\n }\n return toCharArray;\n }",
"@Test(timeout = 4000)\n public void test055() throws Throwable {\n StringReader stringReader0 = new StringReader(\"elg6*[%|8BECpLep_\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }",
"private String processBytes(String bytes){\n Pattern p = Pattern.compile(\"170-180\");\r\n Matcher m = p.matcher(bytes);\r\n //find two bounds\r\n int posi[] = new int[2];\r\n for(int i=0;i<2;i++){\r\n if(m.find()) posi[i] = m.start();\r\n }\r\n //Cut string\r\n return bytes.substring(posi[0], posi[1]);\r\n }",
"@Test(timeout = 4000)\n public void test09() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n Collection<Nucleotide> collection0 = null;\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte)0;\n byteArray0[1] = (byte)0;\n byteArray0[2] = (byte) (-72);\n byteArray0[3] = (byte) (-11);\n Range range0 = Range.of((long) (byte) (-11), 2L);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.iterator(byteArray0, range0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // range [ -11 .. 2 ]/0B is out of range of sequence which is only [ 0 .. 47348 ]/0B\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec$IteratorImpl\", e);\n }\n }",
"private int m672E() {\n int i = 0;\n if (this.f552g.mo501h() >= 5) {\n byte[] f = this.f552g.mo499f();\n int g = this.f552g.mo500g();\n int i2 = 0;\n int i3 = 0;\n while (true) {\n byte b = f[g + i];\n i2 |= (b & Byte.MAX_VALUE) << i3;\n if ((b & 128) != 128) {\n this.f552g.mo495a(i + 1);\n return i2;\n }\n i3 += 7;\n i++;\n }\n } else {\n int i4 = 0;\n while (true) {\n byte u = mo470u();\n i |= (u & Byte.MAX_VALUE) << i4;\n if ((u & 128) != 128) {\n return i;\n }\n i4 += 7;\n }\n }\n }",
"@Test\n public void Test8484()\n {\n String s = \"\\u9FE1\\uCEF3\\u2798\\uAAB6\\uDA7C\";\n Collator coll = Collator.getInstance();\n CollationKey collKey = coll.getCollationKey(s); \n logln(\"Pass: \" + collKey.toString() + \" generated OK.\");\n }",
"@Test(timeout = 4000)\n public void test017() throws Throwable {\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte)120;\n byteArray0[1] = (byte) (-68);\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n JavaCharStream javaCharStream0 = new JavaCharStream(byteArrayInputStream0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }",
"@Test(timeout = 4000)\n public void test075() throws Throwable {\n StringReader stringReader0 = new StringReader(\"<?ep_cuW)AS/}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, (-1));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(88, token0.kind);\n }",
"@Test void byteLarge() {\n\t\tbyte[] data = new byte[100];\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tdata[i] = (byte)(100 + i);\n\t\t}\n\t\tAztecCode marker = new AztecEncoder().\n\t\t\t\taddUpper(\"A\").addBytes(data, 1, 99).addLower(\"a\").fixate();\n\n\t\t// clear the old data\n\t\tclearMarker(marker);\n\n\t\tassertTrue(new AztecDecoder().process(marker));\n\n\t\tassertEquals('A', marker.message.charAt(0));\n\t\tfor (int i = 1; i < 100; i++) {\n\t\t\tassertEquals(100 + i, (int)marker.message.charAt(i));\n\t\t}\n\t\tassertEquals('a', marker.message.charAt(100));\n\t}",
"public int letter2index(char c) { \t\n \treturn (int)(c - 'A')%26 ;\n }",
"public FontCharCodeIterator getCharCodeIterator() throws PDFNetException {\n/* 684 */ return new FontCharCodeIterator(GetCharCodeIterator(this.a), this.b);\n/* */ }",
"Character getCode();",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString xStringA = scan.next() + \"111111\";\n\t\tchar[] xCharA = xStringA.toCharArray();\n\t\tString[] xAlpha = new String[26];\n\t\txAlpha[0]=\"a\";\n\t\txAlpha[1]=\"B\";\n\t\txAlpha[2]=\"C\";\n\t\txAlpha[3]=\"D\";\n\t\txAlpha[4]=\"E\";\n\t\txAlpha[5]=\"F\";\n\t\txAlpha[6]=\"G\";\n\t\txAlpha[7]=\"H\";\n\t\txAlpha[8]=\"I\";\n\t\txAlpha[9]=\"J\";\n\t\txAlpha[10]=\"K\";\n\t\txAlpha[11]=\"L\";\n\t\txAlpha[12]=\"M\";\n\t\txAlpha[13]=\"N\";\n\t\txAlpha[14]=\"O\";\n\t\txAlpha[15]=\"P\";\n\t\txAlpha[16]=\"Q\";\n\t\txAlpha[17]=\"R\";\n\t\txAlpha[18]=\"S\";\n\t\txAlpha[19]=\"T\";\n\t\txAlpha[20]=\"U\";\n\t\txAlpha[21]=\"V\";\n\t\txAlpha[22]=\"W\";\n\t\txAlpha[23]=\"X\";\n\t\txAlpha[24]=\"Y\";\n\t\txAlpha[25]=\"Z\";\n\t\t\n\t\t\n\t\tchar one = xStringA.charAt(0);\n\t\tchar two = xStringA.charAt(1);\n\t\tchar three = xStringA.charAt(2);\n\t\tchar four = xStringA.charAt(3);\n\t\tchar five = xStringA.charAt(4);\n\t\tchar six = xStringA.charAt(5);\n\n\t\tString sOne = Character.toString(one);\n\t\tString sTwo = Character.toString(two);\n\t\tString sThree = Character.toString(three);\n\t\tString sFour = Character.toString(four);\n\t\tString sFive = Character.toString(five);\n\t\tString sSix = Character.toString(six);\n\t/*\t\n\t\tSystem.out.println(sOne);\n\t\tSystem.out.println(sTwo);\n\t\tSystem.out.println(sThree);\n\t\tSystem.out.println(sFour);\n\t\tSystem.out.println(sFive);\n\t\tSystem.out.println(sSix);\n\t*/\n\t\t\n\t\tfor (int i = 0; i < 26 ; i++) {\n\t\t\tif (sOne != xAlpha[i]) {\n\t\t\t\tint oneVar = 1;\n\t\t\t\toneVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sOne + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(oneVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar1\");\n\t\t\t}\n\t\t\t\n\t\t\tif (sTwo != xAlpha[i]) {\n\t\t\t\tint twoVar = 2;\n\t\t\t\ttwoVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sTwo + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(twoVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar2\");\n\t\t\t}\n\t\t\t}\n\t\t}",
"@Test(timeout = 4000)\n public void test079() throws Throwable {\n StringReader stringReader0 = new StringReader(\"f6&^~-)+L]\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.getBeginColumn());\n assertEquals(\"&\", token0.toString());\n }",
"@Test(timeout = 4000)\n public void test009() throws Throwable {\n StringReader stringReader0 = new StringReader(\"kE4X 9\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1), 66, 1279);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('k', char0);\n }",
"private static boolean m66068b(String str) {\n for (int i = 0; i < str.length(); i++) {\n char charAt = str.charAt(i);\n if (charAt <= 31 || charAt >= 127 || \" #%/:?@[\\\\]\".indexOf(charAt) != -1) {\n return true;\n }\n }\n return false;\n }",
"byte getEByte();",
"@Test(timeout = 4000)\n public void test122() throws Throwable {\n StringReader stringReader0 = new StringReader(\"[dfm,AL#MUTe;f\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"L\", token0.toString());\n assertEquals(74, token0.kind);\n }",
"@Test\n public void Test4179686() throws Exception {\n RuleBasedCollator en_us = (RuleBasedCollator) Collator.getInstance(Locale.US);\n // Create a collator with a few expanding character sequences in it....\n RuleBasedCollator coll = new RuleBasedCollator(en_us.getRules()\n + \" & ae ; \\u00e4 & AE ; \\u00c4\"\n + \" & oe ; \\u00f6 & OE ; \\u00d6\"\n + \" & ue ; \\u00fc & UE ; \\u00dc\");\n\n String text = \"T\\u00f6ne\"; // o-umlaut\n\n CollationElementIterator iter = coll.getCollationElementIterator(text);\n List elements = new ArrayList();\n int elem;\n\n // Iterate forward and collect all of the elements into a Vector\n while ((elem = iter.next()) != CollationElementIterator.NULLORDER) {\n elements.add(new Integer(elem));\n }\n\n // Now iterate backward and make sure they're the same\n iter.reset();\n int index = elements.size() - 1;\n while ((elem = iter.previous()) != CollationElementIterator.NULLORDER) {\n int expect = ((Integer)elements.get(index)).intValue();\n\n if (elem != expect) {\n errln(\"Mismatch at index \" + index\n + \": got \" + Integer.toString(elem,16)\n + \", expected \" + Integer.toString(expect,16));\n }\n index--;\n }\n }",
"public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }",
"public int getExceptionIndex() {\n/* 412 */ return (this.value & 0xFFFF00) >> 8;\n/* */ }",
"public static void main(String[] args) {\n\n\n\n\n\n System.out.println((char) ('a' - 32));\n }",
"public abstract CharSequence mo2160e();",
"String getEACCode();",
"public abstract void mo2153a(CharSequence charSequence);",
"@Test(timeout = 4000)\n public void test023() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Gnzd86`;Gs=\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 14, 4094, 4075);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(4094, int0);\n }",
"private byte m1654g() {\n char charAt;\n do {\n int i = this.f2519d;\n if (i >= this.f2518c) {\n return 12;\n }\n CharSequence charSequence = this.f2516a;\n this.f2519d = i + 1;\n charAt = charSequence.charAt(i);\n this.f2520e = charAt;\n } while (charAt != ';');\n return 12;\n }",
"@Test(timeout = 4000)\n public void test103() throws Throwable {\n int int0 = JavaCharStream.hexval('E');\n assertEquals(14, int0);\n }",
"public abstract void mo2157b(CharSequence charSequence);",
"@Test(timeout = 4000)\n public void test137() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F83|i5vU 84Kd\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 887, 887);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(3, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(890, javaCharStream0.getColumn());\n }",
"@Test(timeout = 4000)\n public void test066() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 4087, 122, 682);\n javaCharStream0.backup(4087);\n // Undeclared exception!\n try { \n javaCharStream0.BeginToken();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -3405\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaCharStream\", e);\n }\n }",
"public interface KeyCode {\n\n // Alphabet keys:\n int A_UPPER_CASE = 65;\n int B_UPPER_CASE = 66;\n int C_UPPER_CASE = 67;\n int D_UPPER_CASE = 68;\n int E_UPPER_CASE = 69;\n int F_UPPER_CASE = 70;\n int G_UPPER_CASE = 71;\n int H_UPPER_CASE = 72;\n int I_UPPER_CASE = 73;\n int J_UPPER_CASE = 74;\n int K_UPPER_CASE = 75;\n int L_UPPER_CASE = 76;\n int M_UPPER_CASE = 77;\n int N_UPPER_CASE = 78;\n int O_UPPER_CASE = 79;\n int P_UPPER_CASE = 80;\n int Q_UPPER_CASE = 81;\n int R_UPPER_CASE = 82;\n int S_UPPER_CASE = 83;\n int T_UPPER_CASE = 84;\n int U_UPPER_CASE = 85;\n int V_UPPER_CASE = 86;\n int W_UPPER_CASE = 87;\n int X_UPPER_CASE = 88;\n int Y_UPPER_CASE = 89;\n int Z_UPPER_CASE = 90;\n\n // int A_LOWER_CASE = 97;\n // int B_LOWER_CASE = 98;\n // int C_LOWER_CASE = 99;\n // int D_LOWER_CASE = 100;\n // int E_LOWER_CASE = 101;\n // int F_LOWER_CASE = 102;\n // int G_LOWER_CASE = 103;\n // int H_LOWER_CASE = 104;\n // int I_LOWER_CASE = 105;\n // int J_LOWER_CASE = 106;\n // int K_LOWER_CASE = 107;\n // int L_LOWER_CASE = 108;\n // int M_LOWER_CASE = 109;\n // int N_LOWER_CASE = 110;\n // int O_LOWER_CASE = 111;\n // int P_LOWER_CASE = 112;\n // int Q_LOWER_CASE = 113;\n // int R_LOWER_CASE = 114;\n // int S_LOWER_CASE = 115;\n // int T_LOWER_CASE = 116;\n // int U_LOWER_CASE = 117;\n // int V_LOWER_CASE = 118;\n // int W_LOWER_CASE = 119;\n // int X_LOWER_CASE = 120;\n // int Y_LOWER_CASE = 121;\n // int Z_LOWER_CASE = 122;\n\n // Numeric keys:\n int NUMPAD_0 = 96;\n int NUMPAD_1 = 97;\n int NUMPAD_2 = 98;\n int NUMPAD_3 = 99;\n int NUMPAD_4 = 100;\n int NUMPAD_5 = 101;\n int NUMPAD_6 = 102;\n int NUMPAD_7 = 103;\n int NUMPAD_8 = 104;\n int NUMPAD_9 = 105;\n\n int NUM_0 = 48;\n int NUM_1 = 49;\n int NUM_2 = 50;\n int NUM_3 = 51;\n int NUM_4 = 52;\n int NUM_5 = 53;\n int NUM_6 = 54;\n int NUM_7 = 55;\n int NUM_8 = 56;\n int NUM_9 = 57;\n\n int PERSIAN_0 = 1776;\n int PERSIAN_1 = 1777;\n int PERSIAN_2 = 1778;\n int PERSIAN_3 = 1779;\n int PERSIAN_4 = 1780;\n int PERSIAN_5 = 1781;\n int PERSIAN_6 = 1782;\n int PERSIAN_7 = 1783;\n int PERSIAN_8 = 1784;\n int PERSIAN_9 = 1785;\n\n // Function keys:\n int F1 = 112;\n int F2 = 113;\n int F3 = 114;\n int F4 = 115;\n int F5 = 116;\n int F6 = 117;\n int F7 = 118;\n int F8 = 119;\n int F9 = 120;\n int F10 = 121;\n int F11 = 122;\n int F12 = 123;\n\n // Control Keys:\n int BACKSPACE = 8;\n int TAB = 9;\n int ENTER = 13;\n int SHIFT = 16;\n int CTRL = 17;\n int ALT = 18;\n int PAUSE_BREAK = 19;\n int CAPS_LOCK = 20;\n int ESCAPE = 27;\n int PAGEUP = 33;\n int PAGEDOWN = 34;\n int END = 35;\n int HOME = 36;\n int LEFT = 37;\n int UP = 38;\n int RIGHT = 39;\n int DOWN = 40;\n int PRINT_SCREEN = 44;\n int INSERT = 45;\n int DELETE = 46;\n\n // Other Keys:\n int SPACE = 32;\n int EQUALITY = 61;\n int LEFT_WINDOW_KEY = 91;\n int RIGHT_WINDOW_KEY = 92;\n int SELECT_KEY = 93; // besides of right control key (context menu key, usually works like right click)\n int MULTIPLY = 106;\n int ADD = 107;\n int SUBTRACT = 109;\n int DECIMAL_POINT = 110;// . in numpad section\n int DIVIDE = 111;\n int NUM_LOCK = 144;\n int SCROLL_LOCK = 145;\n int SEMI_COLON = 186;// ;\n int EQUAL_SIGN = 187;// =\n int COMMA = 188;// ,\n int DASH = 189;// -\n int PERIOD = 190;// . in alphabet section\n int FORWARD_SLASH = 191;// /\n int GRAVE_ACCENT = 192; // `\n int OPEN_BRACKET = 219; // [\n int BACK_SLASH = 220; // \\\n int CLOSE_BRAKET = 221; // ]\n int SINGLE_QUOTE = 222; // '\n}",
"@Test(timeout = 4000)\n public void test066() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=<D!T!tLp\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 20, 0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(3, javaCharStream0.getEndColumn());\n }",
"C1111j mo5881f(String str);",
"public void m3537e(String str) {\n try {\n C0748e c0748e = (C0748e) this.f2511a.get(str);\n if (c0748e != null) {\n C0750g.m3561a().m3594e(c0748e);\n }\n for (C0745b e : (List) this.f2512b.get(str)) {\n e.mo1854e();\n }\n } catch (Throwable th) {\n }\n }",
"public static void m3() {\r\n\t\tchar ch ='E';\r\n\t\tfor(int i =1 ;i<=5;i++) {\r\n\t\t\tfor(int j=5;j>=1;j--) {\r\n\t\t\t\tSystem.out.print(ch);\r\n\t\t\t}\r\n\t\t\tch--;\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public static String a(byte paramByte) {\n/* 65 */ return \"\" + a[(paramByte & 0xF0) >>> 4] + a[paramByte & 0xF];\n/* */ }",
"@Test(timeout = 4000)\n public void test108() throws Throwable {\n StringReader stringReader0 = new StringReader(\"^z{b>wblu8^IJ+?\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 47, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(47, javaCharStream0.getColumn());\n }",
"public String getCharacterSequence();",
"public byte e()\r\n/* 84: */ {\r\n/* 85:86 */ return this.e;\r\n/* 86: */ }",
"private static boolean isTashkeelCharFE(char ch) {\n return ( ch!=0xFE75 &&(ch>=0xFE70 && ch<= 0xFE7F) );\n }",
"@Test(timeout = 4000)\n public void test097() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n long long0 = range0.getLength();\n assertEquals(9223372032559808565L, long0);\n \n range0.equals(\"]?&0A@\");\n Range range1 = Range.of(9223372032559808565L);\n List<Range> list0 = range0.complement(range1);\n assertTrue(list0.contains(range0));\n \n boolean boolean0 = range0.equals(\"]?&0A@\");\n assertFalse(boolean0);\n \n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ 1 .. 9223372032559808565 ]/RB\", string0);\n \n Range.CoordinateSystem.values();\n range1.complement(range0);\n List<Range> list1 = range1.complement(range0);\n assertTrue(list1.contains(range1));\n assertFalse(list1.equals((Object)list0));\n assertEquals(1, list1.size());\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-3465), (-2086));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"q\", token0.toString());\n assertEquals(74, token0.kind);\n }",
"private static int scanHexSequence (String address, int index, int end, int [] counter) {\n \n char testChar;\n int numDigits = 0;\n int start = index;\n \n // Trying to match the following productions:\n // hexseq = hex4 *( \":\" hex4)\n // hex4 = 1*4HEXDIG\n for (; index < end; ++index) {\n testChar = address.charAt(index);\n if (testChar == ':') {\n // IPv6 addresses are 128-bit, so there can be at most eight sections.\n if (numDigits > 0 && ++counter[0] > 8) {\n return -1;\n }\n // This could be '::'.\n if (numDigits == 0 || ((index+1 < end) && address.charAt(index+1) == ':')) {\n return index;\n }\n numDigits = 0;\n }\n // This might be invalid or an IPv4address. If it's potentially an IPv4address,\n // backup to just after the last valid character that matches hexseq.\n else if (!isHex(testChar)) {\n if (testChar == '.' && numDigits < 4 && numDigits > 0 && counter[0] <= 6) {\n int back = index - numDigits - 1;\n return (back >= start) ? back : (back+1);\n }\n return -1;\n }\n // There can be at most 4 hex digits per group.\n else if (++numDigits > 4) {\n return -1;\n }\n }\n return (numDigits > 0 && ++counter[0] <= 8) ? end : -1;\n }",
"com.google.protobuf.ByteString getE();",
"public final String m9700e() {\n return this.f8820e;\n }",
"@Test(timeout = 4000)\n public void test058() throws Throwable {\n StringReader stringReader0 = new StringReader(\"b|}T=mM,PuM8AP|}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 0, 0);\n assertEquals((-1), javaCharStream0.bufpos);\n \n char[] charArray0 = javaCharStream0.GetSuffix(0);\n assertEquals(0, charArray0.length);\n }",
"@Test(timeout = 4000)\n public void test008() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.readChar();\n javaCharStream0.GetImage();\n assertEquals(1, javaCharStream0.bufpos);\n }",
"public String getAAE100() {\n return AAE100;\n }",
"public void mo9824b(String str) {\n int i;\n int i2;\n try {\n int length = str.length() * 3;\n int i3 = C3670m.m8671i(length);\n int i4 = i3 + length;\n if (i4 > this.f9107e) {\n byte[] bArr = new byte[length];\n int a = C3700r1.m8885a(str, bArr, 0, length);\n mo9814c(a);\n mo9826b(bArr, 0, a);\n return;\n }\n if (i4 > this.f9107e - this.f9108f) {\n mo9827i();\n }\n int i5 = C3670m.m8671i(str.length());\n i = this.f9108f;\n if (i5 == i3) {\n int i6 = i + i5;\n this.f9108f = i6;\n int a2 = C3700r1.m8885a(str, this.f9106d, i6, this.f9107e - i6);\n this.f9108f = i;\n i2 = (a2 - i) - i5;\n mo9820l(i2);\n this.f9108f = a2;\n } else {\n i2 = C3700r1.m8884a((CharSequence) str);\n mo9820l(i2);\n this.f9108f = C3700r1.m8885a(str, this.f9106d, this.f9108f, i2);\n }\n this.f9109g += i2;\n } catch (C3703c e) {\n this.f9109g -= this.f9108f - i;\n this.f9108f = i;\n throw e;\n } catch (ArrayIndexOutOfBoundsException e2) {\n throw new C3674d(e2);\n } catch (C3703c e3) {\n mo9808a(str, e3);\n }\n }",
"E8Rule createE8Rule();",
"public String mo26396a(String str) {\n int length = str.length();\n for (int i = 0; i < length; i++) {\n char charAt = str.charAt(i);\n char[][] cArr = this.f18227c;\n if (charAt < cArr.length && cArr[charAt] != null) {\n return mo26403a(str, i);\n }\n }\n return str;\n }",
"@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"D!%cD=EVjn`\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.getEndColumn());\n assertEquals(\"%\", token0.toString());\n }",
"@Test(timeout = 4000)\n public void test078() throws Throwable {\n String string0 = SQLUtil.normalize(\"^PcBSW[==qn/g\", true);\n assertEquals(\"^ PcBSW [ = = qn / g\", string0);\n }",
"String getWordIn(String schar, String echar);",
"@Test(timeout = 4000)\n public void test053() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1, 0);\n char char0 = javaCharStream0.readChar();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndLine());\n assertEquals('Z', char0);\n }",
"@Test\n public void testHangingWildcards() throws Exception {\n // Test hanging wildcards on the end anchored to BOF (should be stripped):\n String input = \"AABB????????\";\n String expected = \"AABB\";\n String spaced = \"AA BB\";\n\n String expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.BOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.BOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.BOFOffset, true);\n assertEquals(spaced, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.BOFOffset, true);\n assertEquals(spaced, expression);\n\n // Test hanging wildcards on the end anchored to EOF (should remain):\n input = \"AABB{4}\";\n expected = \"AABB{4}\";\n spaced = \"AA BB {4}\";\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.EOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.EOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.EOFOffset, true);\n assertEquals(spaced, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.EOFOffset, true);\n assertEquals(spaced, expression);\n\n // Test hanging wildcards at the start anchored to BOF (should remain):\n input = \"????????AABB\";\n expected = \"{4}AABB\";\n spaced = \"{4} AA BB\";\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.BOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.BOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.BOFOffset, true);\n assertEquals(spaced, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.BOFOffset, true);\n assertEquals(spaced, expression);\n\n // Test hanging wildcards at the start anchored to EOF (should be stripped):\n input = \"????????AABB\";\n expected = \"AABB\";\n spaced = \"AA BB\";\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.EOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.EOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.EOFOffset, true);\n assertEquals(spaced, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.EOFOffset, true);\n assertEquals(spaced, expression);\n }",
"C12000e mo41091f(String str);",
"String getIndexBits();",
"public static int m8655e() {\n return 8;\n }",
"public Integer doAsciiToEbcdic(CommBufferLogic commBuffer, int ascii) {\n Integer temp = ASCIITOEBCDIC[ascii];\n\n Integer codePage = commBuffer.getConnectionData().getCodePage();\n if (codePage != 37) { // Default US\n // ASCII to EBCDIC based on CP037\n Integer idx, size;\n size = CP037_CP500.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP037_CP500[idx]) {\n temp = CP037_CP500[idx + size];\n break;\n }\n }\n switch (codePage) { // Latin_1 CCSID 697 only\n case 273: // Austria, Germany\n size = CP500_CP273.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP273[idx]) {\n temp = CP500_CP273[idx + size];\n break;\n }\n }\n break;\n case 277: // Denmark, Norway\n size = CP500_CP277.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP277[idx]) {\n temp = CP500_CP277[idx + size];\n break;\n }\n }\n break;\n case 278: // Finland, Sweden\n size = CP500_CP278.length / 2;\n for (idx = 0; idx < size; idx++)\n {\n if (temp == CP500_CP278[idx]) {\n temp = CP500_CP278[idx + size];\n break;\n }\n }\n break;\n case 280: // Italy\n size = CP500_CP280.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP280[idx]) {\n temp = CP500_CP280[idx + size];\n break;\n }\n }\n break;\n case 284: // Spain, Latin America\n size = CP500_CP284.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP284[idx]) {\n temp = CP500_CP284[idx + size];\n break;\n }\n }\n break;\n case 285: // United Kingdom\n size = CP500_CP285.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP285[idx]) {\n temp = CP500_CP285[idx + size];\n break;\n }\n }\n break;\n case 297: // France\n size = CP500_CP297.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP297[idx]) {\n temp = CP500_CP297[idx + size];\n break;\n }\n }\n break;\n case 871: // Iceland\n size = CP500_CP871.length / 2;\n for (idx = 0; idx < size; idx++) {\n if (temp == CP500_CP871[idx]) {\n temp = CP500_CP871[idx + size];\n break;\n }\n }\n break;\n }\n }\n return temp;\n }",
"BigInteger getReplacedEP();",
"public static String asciiToEBCDIC(byte[] a) {\n\t\tbyte[] e = new byte[a.length];\n\t\tfor (int i = 0; i < a.length; i++)\n\t\t\te[i] = ASCII2EBCDIC[a[i] & 0xFF];\n\t\treturn new String(e);\n\t}",
"@Test(timeout = 4000)\n public void test021() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getEndLine();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals((-2818), int0);\n }",
"private static int m1646b(CharSequence charSequence) {\n return new C0510a(charSequence, false).mo4452e();\n }",
"@Test(timeout = 4000)\n public void test05() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[5];\n byteArray0[0] = (byte)89;\n byteArray0[1] = (byte)71;\n byte byte0 = (byte)0;\n byteArray0[2] = (byte)0;\n int int0 = (-3383);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.getUngappedOffsetFor(byteArray0, (-3383));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }",
"@Test(timeout = 4000)\n public void test081() throws Throwable {\n StringReader stringReader0 = new StringReader(\";{\\\"9n/s(2C'#tQX*\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[4];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }",
"protected abstract int getSurrogateOffset(char paramChar1, char paramChar2);",
"@Test(timeout = 4000)\n public void test03() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.valueOf(\"INSTANCE\");\n byte[] byteArray0 = new byte[7];\n byteArray0[0] = (byte)118;\n byteArray0[1] = (byte) (-43);\n byteArray0[2] = (byte) (-107);\n byteArray0[3] = (byte)0;\n byteArray0[4] = (byte)5;\n byteArray0[5] = (byte)0;\n byteArray0[6] = (byte)0;\n Range range0 = Range.of((long) (byte)0, (long) (byte)0);\n Iterator<Nucleotide> iterator0 = defaultNucleotideCodec0.iterator(byteArray0, range0);\n assertNotNull(iterator0);\n }",
"@Test(timeout = 4000)\n public void test21() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = Range.of((-1259L), 255L);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n range2.getEnd(range_CoordinateSystem1);\n // Undeclared exception!\n try { \n Range.parseRange(\"[ -1259 .. 256 ]/SB\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Cf&9B{tMCu\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(4, javaCharStream0.getColumn());\n }",
"private static final int m40100b(String str) {\n int length = str.length();\n int i = 0;\n while (true) {\n if (i >= length) {\n i = -1;\n break;\n } else if (!C12798a.m40012a(str.charAt(i))) {\n break;\n } else {\n i++;\n }\n }\n return i == -1 ? str.length() : i;\n }",
"public static C1398e m9715a(String str) {\r\n return (C1398e) f6248c.get(str);\r\n }",
"private static int slowCharToNibble( char c ) \r\n { \r\n if ( '0' <= c && c <= '9' ) \r\n { \r\n return c - '0'; \r\n } \r\n else if ( 'a' <= c && c <= 'f' ) \r\n { \r\n return c - 'a' + 0xa; \r\n } \r\n else if ( 'A' <= c && c <= 'F' ) \r\n { \r\n return c - 'A' + 0xa; \r\n } \r\n else \r\n { \r\n throw new IllegalArgumentException( \"Invalid hex character: \" + c ); \r\n } \r\n }",
"@Test(timeout = 4000)\n public void test151() throws Throwable {\n StringReader stringReader0 = new StringReader(\"/&[o8PbSh8%nM__1\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 39);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(\"&\", token0.toString());\n }",
"private static void createMap()\r\n {\r\n position = new String[8][8];\r\n for(int i=0;i<8;i++)\r\n {\r\n int z=0;\r\n for(int j=72;j>=65;j--)\r\n {\r\n position[i][z]=(char)j+\"\"+(i+1); //uses ascii char placement for letters\r\n z++;\r\n }\r\n }\r\n \r\n }",
"public int b(char paramChar)\r\n/* 714: */ {\r\n/* 715:706 */ return this.f[\"0123456789abcdef\".indexOf(paramChar)];\r\n/* 716: */ }",
"private byte ensureIsInAlphabet(byte input) {\n return (byte)(ALPHABET_START + (Math.abs(input) % ALPHABET_SIZE));\n }"
] | [
"0.56606364",
"0.55779004",
"0.5451697",
"0.53635234",
"0.53592974",
"0.5324024",
"0.5306386",
"0.52798116",
"0.52772796",
"0.5256659",
"0.52495307",
"0.5242374",
"0.52237195",
"0.521681",
"0.5203255",
"0.5202699",
"0.51826644",
"0.51824516",
"0.5155868",
"0.5132563",
"0.51324654",
"0.5115166",
"0.51116806",
"0.50955325",
"0.50870204",
"0.50835085",
"0.5055497",
"0.50448936",
"0.5035676",
"0.50292856",
"0.50242764",
"0.5015241",
"0.5007976",
"0.49729776",
"0.49704129",
"0.4957984",
"0.49488947",
"0.49448586",
"0.49339676",
"0.49274278",
"0.49193406",
"0.48941374",
"0.48930573",
"0.4891751",
"0.48818603",
"0.4872309",
"0.4863191",
"0.48615518",
"0.48595464",
"0.4856196",
"0.48536542",
"0.48490834",
"0.48399752",
"0.48398834",
"0.4836119",
"0.483253",
"0.4831872",
"0.4829131",
"0.482347",
"0.48229712",
"0.4819467",
"0.4819222",
"0.48176822",
"0.48157787",
"0.4811818",
"0.48091942",
"0.48045722",
"0.48027182",
"0.4794249",
"0.4792599",
"0.4788283",
"0.47874135",
"0.47843653",
"0.47802246",
"0.4779602",
"0.47793943",
"0.4777418",
"0.47660172",
"0.47657835",
"0.47652802",
"0.47649175",
"0.47622862",
"0.47609562",
"0.47596008",
"0.47585708",
"0.47556502",
"0.474581",
"0.47423953",
"0.4741201",
"0.47323647",
"0.47309008",
"0.47305045",
"0.47299966",
"0.4729088",
"0.47287852",
"0.47272697",
"0.4723919",
"0.47206444",
"0.4719817",
"0.47191462",
"0.4718988"
] | 0.0 | -1 |
[F0] [90..BF] [80..BF] [80..BF] [F1..F3] [80..BF] [80..BF] [80..BF] [F4] [80..8F] [80..BF] [80..BF] only check 80be range here, the [0xf0,0x80...] and [0xf4,0x90...] will be checked by Surrogate.neededFor(uc) | private static boolean isMalformed4(int b2, int b3, int b4) {
return (b2 & 0xc0) != 0x80 || (b3 & 0xc0) != 0x80 || (b4 & 0xc0) != 0x80;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n @Tag(\"bm1000\")\n public void testFFFFF800() {\n CuteNetlibCase.doTest(\"FFFFF800.SIF\", \"555679.5648174941\", \"1858776.4328128027\", NumberContext.of(7, 4));\n }",
"@Test void testHexCharLiteralOutsideRangeFails() {\n final String sql = \"^_unicode'cg'^XCF\";\n final String expected = \"Unknown character set 'unicode'\";\n expr(sql).fails(expected);\n }",
"private int byteRangeCheck(int i){\r\n if (i < 0){\r\n return -1;\r\n } else if (i > 255){\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }",
"private static boolean m66068b(String str) {\n for (int i = 0; i < str.length(); i++) {\n char charAt = str.charAt(i);\n if (charAt <= 31 || charAt >= 127 || \" #%/:?@[\\\\]\".indexOf(charAt) != -1) {\n return true;\n }\n }\n return false;\n }",
"private static boolean m4389a(String str) {\n return str != null && str.length() != 0 && Pattern.compile(\"^[0-9A-Fa-f]{13,18}+$\").matcher(str).matches() && str.indexOf(\"000000000\") == -1 && str.indexOf(\"111111111\") == -1 && str.indexOf(\"222222222\") == -1 && str.indexOf(\"333333333\") == -1 && str.indexOf(\"444444444\") == -1 && str.indexOf(\"555555555\") == -1 && str.indexOf(\"666666666\") == -1 && str.indexOf(\"777777777\") == -1 && str.indexOf(\"888888888\") == -1 && str.indexOf(\"999999999\") == -1;\n }",
"public interface C7878U {\n /* renamed from: Lg */\n public static final int f26781Lg = 1;\n /* renamed from: Mg */\n public static final int f26782Mg = 2;\n public static final int NOERROR = 0;\n /* renamed from: Ng */\n public static final int f26783Ng = 3;\n /* renamed from: Og */\n public static final int f26784Og = 4;\n /* renamed from: Pg */\n public static final int f26785Pg = 5;\n /* renamed from: Qg */\n public static final int f26786Qg = 6;\n}",
"private boolean FCDCheckBackwards(int ch, int offset)\n {\n int fcd;\n m_FCDLimit_ = offset + 1;\n m_source_.setIndex(offset);\n if (ch < 0x180) {\n fcd = m_nfcImpl_.getFCD16FromBelow180(ch);\n } else if (!Character.isLowSurrogate((char)ch)) {\n if (m_nfcImpl_.singleLeadMightHaveNonZeroFCD16(ch)) {\n fcd = m_nfcImpl_.getFCD16FromNormData(ch);\n } else {\n fcd = 0;\n }\n } else {\n int c2 = m_source_.previous();\n if (c2 < 0) {\n fcd = 0; // start of input\n } else if (Character.isHighSurrogate((char)c2)) {\n ch = Character.toCodePoint((char)c2, (char)ch);\n fcd = m_nfcImpl_.getFCD16FromNormData(ch);\n --offset;\n } else {\n m_source_.moveIndex(1);\n fcd = 0;\n }\n }\n\n // Scan backward until we find a char with a leading cc of zero.\n boolean result = true;\n if (fcd != 0) {\n int leadCC;\n for (;;) {\n leadCC = fcd >> SECOND_LAST_BYTE_SHIFT_;\n if (leadCC == 0 || (ch = m_source_.previousCodePoint()) < 0) {\n offset = m_source_.getIndex();\n break;\n }\n fcd = m_nfcImpl_.getFCD16(ch);\n int prevTrailCC = fcd & LAST_BYTE_MASK_;\n if (leadCC < prevTrailCC) {\n result = false;\n } else if (fcd == 0) {\n offset = m_source_.getIndex() + Character.charCount(ch);\n break;\n }\n }\n }\n\n // storing character with 0 lead fcd or the 1st accent with a base\n // character before it\n m_FCDStart_ = offset;\n m_source_.setIndex(m_FCDLimit_);\n return result;\n }",
"private static boolean isTashkeelCharFE(char ch) {\n return ( ch!=0xFE75 &&(ch>=0xFE70 && ch<= 0xFE7F) );\n }",
"private static int partialIsValidUtf8NonAscii(byte[] bytes, int index, int limit) {\n while (index < limit) {\n int index2 = index + 1;\n byte b = bytes[index];\n if (b >= 0) {\n index = index2;\n } else if (b < -32) {\n if (index2 >= limit) {\n return b;\n }\n if (b >= -62) {\n index = index2 + 1;\n if (bytes[index2] > -65) {\n }\n }\n return -1;\n } else if (b < -16) {\n if (index2 >= limit - 1) {\n return Utf8.incompleteStateFor(bytes, index2, limit);\n }\n int index3 = index2 + 1;\n byte b2 = bytes[index2];\n if (b2 <= -65 && ((b != -32 || b2 >= -96) && (b != -19 || b2 < -96))) {\n index = index3 + 1;\n if (bytes[index3] > -65) {\n }\n }\n return -1;\n } else if (index2 >= limit - 2) {\n return Utf8.incompleteStateFor(bytes, index2, limit);\n } else {\n int index4 = index2 + 1;\n byte b3 = bytes[index2];\n if (b3 <= -65 && (((b << 28) + (b3 + 112)) >> 30) == 0) {\n int index5 = index4 + 1;\n if (bytes[index4] <= -65) {\n index = index5 + 1;\n if (bytes[index5] > -65) {\n }\n }\n }\n return -1;\n }\n }\n return 0;\n }",
"public interface UnicodeConstants {\n\n /** Refers to unnormalized Unicode: */\n static final byte NORM_UNNORMALIZED = 0;\n /** Refers to Normalization Form C: */\n static final byte NORM_NFC = 1;\n /** Refers to Normalization Form KC: */\n static final byte NORM_NFKC = 2;\n /** Refers to Normalization Form D: */\n static final byte NORM_NFD = 3;\n /** Refers to Normalization Form KD: */\n static final byte NORM_NFKD = 4;\n /** Refers to Normalization Form THDL, which is NFD except for\n <code>U+0F77</code> and <code>U+0F79</code>, which are\n normalized according to NFKD. This is the One True\n Normalization Form, as it leaves no precomposed codepoints and\n does not normalize <code>U+0F0C</code>. */\n static final byte NORM_NFTHDL = 5;\n\n\n /** for those times when you need a char to represent a\n non-existent codepoint */\n static final char EW_ABSENT = '\\u0000';\n\n\n //\n // the thirty consonants, in alphabetical order:\n //\n\n /** first letter of the alphabet: */\n static final char EWC_ka = '\\u0F40';\n\n static final char EWC_kha = '\\u0F41';\n static final char EWC_ga = '\\u0F42';\n static final char EWC_nga = '\\u0F44';\n static final char EWC_ca = '\\u0F45';\n static final char EWC_cha = '\\u0F46';\n static final char EWC_ja = '\\u0F47';\n static final char EWC_nya = '\\u0F49';\n static final char EWC_ta = '\\u0F4F';\n static final char EWC_tha = '\\u0F50';\n static final char EWC_da = '\\u0F51';\n static final char EWC_na = '\\u0F53';\n static final char EWC_pa = '\\u0F54';\n static final char EWC_pha = '\\u0F55';\n static final char EWC_ba = '\\u0F56';\n static final char EWC_ma = '\\u0F58';\n static final char EWC_tsa = '\\u0F59';\n static final char EWC_tsha = '\\u0F5A';\n static final char EWC_dza = '\\u0F5B';\n static final char EWC_wa = '\\u0F5D';\n static final char EWC_zha = '\\u0F5E';\n static final char EWC_za = '\\u0F5F';\n /** Note the irregular name. The Extended Wylie representation is\n <code>'a</code>. */\n static final char EWC_achung = '\\u0F60';\n static final char EWC_ya = '\\u0F61';\n static final char EWC_ra = '\\u0F62';\n static final char EWC_la = '\\u0F63';\n static final char EWC_sha = '\\u0F64';\n static final char EWC_sa = '\\u0F66';\n static final char EWC_ha = '\\u0F67';\n /** achen, the 30th consonant (and, some say, the fifth vowel) DLC NOW FIXME: rename to EWC_achen */\n static final char EWC_a = '\\u0F68';\n\n\n /** In the word for father, \"pA lags\", there is an a-chung (i.e.,\n <code>\\u0F71</code>). This is the constant for that little\n guy. */\n static final char EW_achung_vowel = '\\u0F71';\n\n\n /* Four of the five vowels, some say, or, others say, \"the four\n vowels\": */\n /** \"gi gu\", the 'i' sound in the English word keep: */\n static final char EWV_i = '\\u0F72';\n /** \"zhabs kyu\", the 'u' sound in the English word tune: */\n static final char EWV_u = '\\u0F74';\n /** \"'greng bu\" (also known as \"'greng po\", and pronounced <i>dang-bo</i>), the 'a' sound in the English word gate: */\n static final char EWV_e = '\\u0F7A';\n /** \"na ro\", the 'o' sound in the English word bone: */\n static final char EWV_o = '\\u0F7C';\n\n\n /** subscribed form of EWC_wa, also known as wa-btags */\n static final char EWSUB_wa_zur = '\\u0FAD';\n /** subscribed form of EWC_ya */\n static final char EWSUB_ya_btags = '\\u0FB1';\n /** subscribed form of EWC_ra */\n static final char EWSUB_ra_btags = '\\u0FB2';\n /** subscribed form of EWC_la */\n static final char EWSUB_la_btags = '\\u0FB3';\n}",
"private String processBytes(String bytes){\n Pattern p = Pattern.compile(\"170-180\");\r\n Matcher m = p.matcher(bytes);\r\n //find two bounds\r\n int posi[] = new int[2];\r\n for(int i=0;i<2;i++){\r\n if(m.find()) posi[i] = m.start();\r\n }\r\n //Cut string\r\n return bytes.substring(posi[0], posi[1]);\r\n }",
"public boolean validaCPF(String cpf){\n if (cpf.equals(\"00000000000\") || cpf.equals(\"11111111111\") || cpf.equals(\"22222222222\")\n || cpf.equals(\"33333333333\") || cpf.equals(\"44444444444\") || cpf.equals(\"55555555555\")\n || cpf.equals(\"66666666666\") || cpf.equals(\"77777777777\") || cpf.equals(\"88888888888\")\n || cpf.equals(\"99999999999\") || (cpf.length() != 11))\n return (false);\n\n char dig10, dig11;\n int sm, i, r, num, peso;\n\n // \"try\" - protege o codigo para eventuais erros de conversao de tipo (int)\n try {\n // Calculo do 1o. Digito Verificador\n sm = 0;\n peso = 10;\n for (i = 0; i < 9; i++) {\n // converte o i-esimo caractere do CPF em um numero:\n // por exemplo, transforma o caractere '0' no inteiro 0\n // (48 eh a posicao de '0' na tabela ASCII)\n num = (int) (cpf.charAt(i) - 48);\n sm = sm + (num * peso);\n peso = peso - 1;\n }\n\n r = 11 - (sm % 11);\n if ((r == 10) || (r == 11))\n dig10 = '0';\n else\n dig10 = (char) (r + 48); // converte no respectivo caractere numerico\n\n // Calculo do 2o. Digito Verificador\n sm = 0;\n peso = 11;\n for (i = 0; i < 10; i++) {\n num = (int) (cpf.charAt(i) - 48);\n sm = sm + (num * peso);\n peso = peso - 1;\n }\n\n r = 11 - (sm % 11);\n if ((r == 10) || (r == 11))\n dig11 = '0';\n else\n dig11 = (char) (r + 48);\n\n // Verifica se os digitos calculados conferem com os digitos informados.\n if ((dig10 == cpf.charAt(9)) && (dig11 == cpf.charAt(10)))\n return (true);\n else\n return (false);\n } catch (InputMismatchException erro) {\n return (false);\n }\n }",
"public boolean isCPF(String CPF) {\n if (CPF.equals(\"00000000000\") || CPF.equals(\"11111111111\") ||\n CPF.equals(\"22222222222\") || CPF.equals(\"33333333333\") ||\n CPF.equals(\"44444444444\") || CPF.equals(\"55555555555\") ||\n CPF.equals(\"66666666666\") || CPF.equals(\"77777777777\") ||\n CPF.equals(\"88888888888\") || CPF.equals(\"99999999999\") ||\n (CPF.length() != 11))\n return(false);\n\n char dig10, dig11;\n int sm, i, r, num, peso;\n\n // \"try\" - protege o codigo para eventuais erros de conversao de tipo (int)\n try {\n // Calculo do 1o. Digito Verificador\n sm = 0;\n peso = 10;\n for (i=0; i<9; i++) {\n // converte o i-esimo caractere do CPF em um numero:\n // por exemplo, transforma o caractere '0' no inteiro 0\n // (48 eh a posicao de '0' na tabela ASCII)\n num = (int)(CPF.charAt(i) - 48); \n sm = sm + (num * peso);\n peso = peso - 1;\n }\n\n r = 11 - (sm % 11);\n if ((r == 10) || (r == 11))\n dig10 = '0';\n else dig10 = (char)(r + 48); // converte no respectivo caractere numerico\n\n// Calculo do 2o. Digito Verificador\n sm = 0;\n peso = 11;\n for(i=0; i<10; i++) {\n num = (int)(CPF.charAt(i) - 48);\n sm = sm + (num * peso);\n peso = peso - 1;\n }\n\n r = 11 - (sm % 11);\n if ((r == 10) || (r == 11))\n dig11 = '0';\n else dig11 = (char)(r + 48);\n\n// Verifica se os digitos calculados conferem com os digitos informados.\n if ((dig10 == CPF.charAt(9)) && (dig11 == CPF.charAt(10)))\n return(true);\n else return(false);\n } catch (InputMismatchException erro) {\n return(false);\n }\n\t}",
"private boolean isNumericoConFraccion(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tcase '.':\r\n\t\t\treturn dotCountValidate();\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public static final boolean m2221containsfz5IDCE(UIntRange $this$contains, long value) {\n Intrinsics.checkParameterIsNotNull($this$contains, \"$this$contains\");\n return ULong.m1443constructorimpl(value >>> 32) == 0 && $this$contains.m2198containsWZ4Q5Ns(UInt.m1374constructorimpl((int) value));\n }",
"@Test(timeout = 4000)\n public void test046() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.startsBefore(range0);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"private static int isSeenFamilyChar(char ch){\n if (ch >= 0x633 && ch <= 0x636){\n return 1;\n }else {\n return 0;\n }\n }",
"public abstract int partialIsValidUtf8(int i, byte[] bArr, int i2, int i3);",
"public static boolean isCPF(String CPF) {\n\t if (CPF.equals(\"00000000000\") ||\n\t CPF.equals(\"11111111111\") ||\n\t CPF.equals(\"22222222222\") || CPF.equals(\"33333333333\") ||\n\t CPF.equals(\"44444444444\") || CPF.equals(\"55555555555\") ||\n\t CPF.equals(\"66666666666\") || CPF.equals(\"77777777777\") ||\n\t CPF.equals(\"88888888888\") || CPF.equals(\"99999999999\") ||\n\t (CPF.length() != 11))\n\t return(false);\n\n\t char dig10, dig11;\n\t int sm, i, r, num, peso;\n\n\t // \"try\" - protege o codigo para eventuais erros de conversao de tipo (int)\n\t try {\n\t // Calculo do 1o. Digito Verificador\n\t sm = 0;\n\t peso = 10;\n\t for (i=0; i<9; i++) {\n\t // converte o i-esimo caractere do CPF em um numero:\n\t // por exemplo, transforma o caractere '0' no inteiro 0\n\t // (48 eh a posicao de '0' na tabela ASCII)\n\t num = (int)(CPF.charAt(i) - 48);\n\t sm = sm + (num * peso);\n\t peso = peso - 1;\n\t }\n\n\t r = 11 - (sm % 11);\n\t if ((r == 10) || (r == 11))\n\t dig10 = '0';\n\t else dig10 = (char)(r + 48); // converte no respectivo caractere numerico\n\n\t // Calculo do 2o. Digito Verificador\n\t sm = 0;\n\t peso = 11;\n\t for(i=0; i<10; i++) {\n\t num = (int)(CPF.charAt(i) - 48);\n\t sm = sm + (num * peso);\n\t peso = peso - 1;\n\t }\n\n\t r = 11 - (sm % 11);\n\t if ((r == 10) || (r == 11))\n\t dig11 = '0';\n\t else dig11 = (char)(r + 48);\n\n\t // Verifica se os digitos calculados conferem com os digitos informados.\n\t if ((dig10 == CPF.charAt(9)) && (dig11 == CPF.charAt(10)))\n\t return(true);\n\t else return(false);\n\t } catch (InputMismatchException erro) {\n\t return(false);\n\t }\n\t }",
"@Test(timeout = 4000)\n public void test048() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range0.isSubRangeOf(range1);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"public CharRange(int lower, int upper) {\n super(lower < UTF16.NONBMP_MIN ? SOME : NONE,\n // don't use ALL here, because that requires that the BMP class contains high surrogates\n upper >= UTF16.NONBMP_MIN ? SOME : NONE);\n this.lower = lower;\n this.upper = upper;\n }",
"public static boolean isCPF(String CPF) {\n\t\t if (CPF.equals(\"00000000000\") || CPF.equals(\"11111111111\") ||\n\t\t CPF.equals(\"22222222222\") || CPF.equals(\"33333333333\") ||\n\t\t CPF.equals(\"44444444444\") || CPF.equals(\"55555555555\") ||\n\t\t CPF.equals(\"66666666666\") || CPF.equals(\"77777777777\") ||\n\t\t CPF.equals(\"88888888888\") || CPF.equals(\"99999999999\") ||\n\t\t (CPF.length() != 11))\n\t\t return(false);\n\n\t\t char dig10, dig11;\n\t\t int sm, i, r, num, peso;\n\n\t\t// \"try\" - protege o codigo para eventuais erros de conversao de tipo (int)\n\t\t try {\n\t\t// Calculo do 1o. Digito Verificador\n\t\t sm = 0;\n\t\t peso = 10;\n\t\t for (i=0; i<9; i++) { \n\t\t// converte o i-esimo caractere do CPF em um numero:\n\t\t// por exemplo, transforma o caractere '0' no inteiro 0 \n\t\t// (48 eh a posicao de '0' na tabela ASCII) \n\t\t num = (int)(CPF.charAt(i) - 48); \n\t\t sm = sm + (num * peso);\n\t\t peso = peso - 1;\n\t\t }\n\n\t\t r = 11 - (sm % 11);\n\t\t if ((r == 10) || (r == 11))\n\t\t dig10 = '0';\n\t\t else dig10 = (char)(r + 48); // converte no respectivo caractere numerico\n\n\t\t// Calculo do 2o. Digito Verificador\n\t\t sm = 0;\n\t\t peso = 11;\n\t\t for(i=0; i<10; i++) {\n\t\t num = (int)(CPF.charAt(i) - 48);\n\t\t sm = sm + (num * peso);\n\t\t peso = peso - 1;\n\t\t }\n\n\t\t r = 11 - (sm % 11);\n\t\t if ((r == 10) || (r == 11))\n\t\t dig11 = '0';\n\t\t else dig11 = (char)(r + 48);\n\n\t\t// Verifica se os digitos calculados conferem com os digitos informados.\n\t\t if ((dig10 == CPF.charAt(9)) && (dig11 == CPF.charAt(10)))\n\t\t return(true);\n\t\t else return(false);\n\t\t } catch (Exception e) {\n\t\t return(false);\n\t\t }\n\t\t }",
"boolean isUF(Formula f);",
"public static EnumC8819gu m51368b(String str) {\n if (f37095b == null) {\n synchronized (EnumC8819gu.class) {\n if (f37095b == null) {\n f37095b = new HashMap();\n EnumC8819gu[] values = EnumC8819gu.values();\n for (EnumC8819gu guVar : values) {\n f37095b.put(guVar.f37768a.toLowerCase(), guVar);\n }\n }\n }\n }\n EnumC8819gu guVar2 = f37095b.get(str.toLowerCase());\n return guVar2 != null ? guVar2 : EnumC8819gu.Invalid;\n }",
"private boolean shouldUseFeet(int lowerBound, int upperBound) {\n return (shouldUseUpToFormat(lowerBound) && upperBound >= 12) || (lowerBound >= 12 && upperBound >= 24);\n }",
"public int getNomRangeBits(int i) {\n/* 344 */ switch (this.h) {\n/* */ case 1:\n/* */ case 2:\n/* 347 */ return this.i[i];\n/* */ case 0:\n/* 349 */ return this.e.getNomRangeBits(i);\n/* */ } \n/* 351 */ throw new IllegalArgumentException(\"Non JPEG 2000 part I component transformation\");\n/* */ }",
"private int m10257E() throws cf {\r\n int i = 0;\r\n int i2;\r\n if (this.g.mo1996h() >= 5) {\r\n byte[] f = this.g.mo1994f();\r\n int g = this.g.mo1995g();\r\n i2 = 0;\r\n int i3 = 0;\r\n while (true) {\r\n byte b = f[g + i];\r\n i3 |= (b & 127) << i2;\r\n if ((b & 128) != 128) {\r\n this.g.mo1993a(i + 1);\r\n return i3;\r\n }\r\n i2 += 7;\r\n i++;\r\n }\r\n } else {\r\n i2 = 0;\r\n while (true) {\r\n byte u = mo1978u();\r\n i2 |= (u & 127) << i;\r\n if ((u & 128) != 128) {\r\n return i2;\r\n }\r\n i += 7;\r\n }\r\n }\r\n }",
"private static final int m40100b(String str) {\n int length = str.length();\n int i = 0;\n while (true) {\n if (i >= length) {\n i = -1;\n break;\n } else if (!C12798a.m40012a(str.charAt(i))) {\n break;\n } else {\n i++;\n }\n }\n return i == -1 ? str.length() : i;\n }",
"@Test(timeout = 4000)\n public void test066() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem0);\n Object object0 = new Object();\n range0.equals(\"[ 0 .. -1 ]/0B\");\n Range.CoordinateSystem.values();\n Range.CoordinateSystem.values();\n range0.equals(range0);\n range0.getBegin();\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"[ 0 .. -1 ]/0B\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.[ 0 .. -1 ]/0B\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"public static void main(String[] args) {\n\t\tPattern p = Pattern.compile(\"^0x[0-9a-fA-F]{1,10}\");\n\t\t// Next we create matcher, that will be check our String by Pattern\n\t\tMatcher m_1 = p.matcher(\"0x12423\");\n\t\tMatcher m_2 = p.matcher(\"23\");\n\t\t// Run checker\n\t\tboolean match_1 = m_1.matches();\n\t\tboolean match_2 = m_2.matches();\n\t\tSystem.out.println(\"0x12423 is HEX notation: \" + match_1);\n\t\tSystem.out.println(\"23 is HEX notation: \" + match_2);\n\t}",
"private boolean isAlfabetico(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase 'A':\r\n\t\t\treturn true;\r\n\t\tcase 'B':\r\n\t\t\treturn true;\r\n\t\tcase 'C':\r\n\t\t\treturn true;\r\n\t\tcase 'D':\r\n\t\t\treturn true;\r\n\t\tcase 'E':\r\n\t\t\treturn true;\r\n\t\tcase 'F':\r\n\t\t\treturn true;\r\n\t\tcase 'G':\r\n\t\t\treturn true;\r\n\t\tcase 'H':\r\n\t\t\treturn true;\r\n\t\tcase 'I':\r\n\t\t\treturn true;\r\n\t\tcase 'J':\r\n\t\t\treturn true;\r\n\t\tcase 'K':\r\n\t\t\treturn true;\r\n\t\tcase 'L':\r\n\t\t\treturn true;\r\n\t\tcase 'M':\r\n\t\t\treturn true;\r\n\t\tcase 'N':\r\n\t\t\treturn true;\r\n\t\tcase 'Ñ':\r\n\t\t\treturn true;\r\n\t\tcase 'O':\r\n\t\t\treturn true;\r\n\t\tcase 'P':\r\n\t\t\treturn true;\r\n\t\tcase 'Q':\r\n\t\t\treturn true;\r\n\t\tcase 'R':\r\n\t\t\treturn true;\r\n\t\tcase 'S':\r\n\t\t\treturn true;\r\n\t\tcase 'T':\r\n\t\t\treturn true;\r\n\t\tcase 'U':\r\n\t\t\treturn true;\r\n\t\tcase 'V':\r\n\t\t\treturn true;\r\n\t\tcase 'W':\r\n\t\t\treturn true;\r\n\t\tcase 'X':\r\n\t\t\treturn true;\r\n\t\tcase 'Y':\r\n\t\t\treturn true;\r\n\t\tcase 'Z':\r\n\t\t\treturn true;\r\n\t\tcase 'a':\r\n\t\t\treturn true;\r\n\t\tcase 'b':\r\n\t\t\treturn true;\r\n\t\tcase 'c':\r\n\t\t\treturn true;\r\n\t\tcase 'd':\r\n\t\t\treturn true;\r\n\t\tcase 'e':\r\n\t\t\treturn true;\r\n\t\tcase 'f':\r\n\t\t\treturn true;\r\n\t\tcase 'g':\r\n\t\t\treturn true;\r\n\t\tcase 'h':\r\n\t\t\treturn true;\r\n\t\tcase 'i':\r\n\t\t\treturn true;\r\n\t\tcase 'j':\r\n\t\t\treturn true;\r\n\t\tcase 'k':\r\n\t\t\treturn true;\r\n\t\tcase 'l':\r\n\t\t\treturn true;\r\n\t\tcase 'm':\r\n\t\t\treturn true;\r\n\t\tcase 'n':\r\n\t\t\treturn true;\r\n\t\tcase 'ñ':\r\n\t\t\treturn true;\r\n\t\tcase 'o':\r\n\t\t\treturn true;\r\n\t\tcase 'p':\r\n\t\t\treturn true;\r\n\t\tcase 'q':\r\n\t\t\treturn true;\r\n\t\tcase 'r':\r\n\t\t\treturn true;\r\n\t\tcase 's':\r\n\t\t\treturn true;\r\n\t\tcase 't':\r\n\t\t\treturn true;\r\n\t\tcase 'u':\r\n\t\t\treturn true;\r\n\t\tcase 'v':\r\n\t\t\treturn true;\r\n\t\tcase 'w':\r\n\t\t\treturn true;\r\n\t\tcase 'x':\r\n\t\t\treturn true;\r\n\t\tcase 'y':\r\n\t\t\treturn true;\r\n\t\tcase 'z':\r\n\t\t\treturn true;\r\n\t\tcase ' ':\r\n\t\t\treturn true;\r\n\t\tcase '*':\r\n\t\t\treturn true;// debido a búsquedas\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private boolean inByteRange(int k) {\n try {\n if (k < 0 || k >= this.numberOfBytes())\n throw new Exception(\"Data: byte index is out of range (0<=\" + k + \"<\" + this.numberOfBytes() + \")\");\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n return true;\n }",
"@Test(timeout = 4000)\n public void test097() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n long long0 = range0.getLength();\n assertEquals(9223372032559808565L, long0);\n \n range0.equals(\"]?&0A@\");\n Range range1 = Range.of(9223372032559808565L);\n List<Range> list0 = range0.complement(range1);\n assertTrue(list0.contains(range0));\n \n boolean boolean0 = range0.equals(\"]?&0A@\");\n assertFalse(boolean0);\n \n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ 1 .. 9223372032559808565 ]/RB\", string0);\n \n Range.CoordinateSystem.values();\n range1.complement(range0);\n List<Range> list1 = range1.complement(range0);\n assertTrue(list1.contains(range1));\n assertFalse(list1.equals((Object)list0));\n assertEquals(1, list1.size());\n }",
"public boolean checkInvalid6(String x) {\n String phuAmDau = \"qsdklxvb\";\n for (int i = 1; i < x.length(); i++) {\n if (phuAmDau.contains(String.valueOf(x.charAt(i)))) {\n return true;\n }\n }\n return false;\n }",
"private\n static\n boolean\n isHexChar( char ch )\n {\n return ( ch >= '0' && ch <= '9' ) ||\n ( ch >= 'a' && ch <= 'f' ) ||\n ( ch >= 'A' && ch <= 'F' );\n }",
"C12000e mo41091f(String str);",
"@Test(timeout = 4000)\n public void test25() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(265L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range0.complementFrom(linkedList0);\n Range range1 = Range.of((-3234L));\n range0.isSubRangeOf(range1);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.complementFrom(linkedList0);\n range1.intersects(range0);\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"TGa_,[\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.TGa_,[\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"private boolean validNbit(String input) {\n\t\treturn input.matches(\"[0-9A-F]+\");\n\t}",
"private static boolean m13721a(int i) {\n if (!(i == C2087a.f5832S || i == C2087a.f5831R || i == C2087a.f5816C || i == C2087a.f5814A || i == C2087a.f5833T || i == C2087a.f5862w || i == C2087a.f5863x || i == C2087a.f5828O || i == C2087a.f5864y || i == C2087a.f5865z || i == C2087a.f5834U || i == C2087a.ac || i == C2087a.ad || i == C2087a.ah || i == C2087a.ag || i == C2087a.ae || i == C2087a.af || i == C2087a.f5830Q || i == C2087a.f5827N)) {\n if (i != C2087a.aG) {\n return false;\n }\n }\n return true;\n }",
"private int rangeEndLS(char startingLS) {\n if (startingLS >= 0xdbff) {\n return 0xdbff;\n }\n\n int c;\n int val = getFromU16SingleLead(startingLS);\n for (c = startingLS+1; c <= 0x0dbff; c++) {\n if (getFromU16SingleLead((char)c) != val) {\n break;\n }\n }\n return c-1;\n }",
"private static boolean isHex(char p_char) {\n return (p_char <= 'f' && (fgLookupTable[p_char] & ASCII_HEX_CHARACTERS) != 0);\n }",
"private boolean FCDCheck(int ch, int offset)\n {\n boolean result = true;\n\n // Get the trailing combining class of the current character.\n // If it's zero, we are OK.\n m_FCDStart_ = offset - 1;\n m_source_.setIndex(offset);\n // trie access\n int fcd;\n if (ch < 0x180) {\n fcd = m_nfcImpl_.getFCD16FromBelow180(ch);\n } else if (m_nfcImpl_.singleLeadMightHaveNonZeroFCD16(ch)) {\n if (Character.isHighSurrogate((char)ch)) {\n int c2 = m_source_.next(); \n if (c2 < 0) {\n fcd = 0; // end of input\n } else if (Character.isLowSurrogate((char)c2)) {\n fcd = m_nfcImpl_.getFCD16FromNormData(Character.toCodePoint((char)ch, (char)c2));\n } else {\n m_source_.moveIndex(-1);\n fcd = 0;\n }\n } else {\n fcd = m_nfcImpl_.getFCD16FromNormData(ch);\n }\n } else {\n fcd = 0;\n }\n\n int prevTrailCC = fcd & LAST_BYTE_MASK_;\n\n if (prevTrailCC == 0) {\n offset = m_source_.getIndex();\n } else {\n // The current char has a non-zero trailing CC. Scan forward until\n // we find a char with a leading cc of zero.\n while (true) {\n ch = m_source_.nextCodePoint();\n if (ch < 0) {\n offset = m_source_.getIndex();\n break;\n }\n // trie access\n fcd = m_nfcImpl_.getFCD16(ch);\n int leadCC = fcd >> SECOND_LAST_BYTE_SHIFT_;\n if (leadCC == 0) {\n // this is a base character, we stop the FCD checks\n offset = m_source_.getIndex() - Character.charCount(ch);\n break;\n }\n\n if (leadCC < prevTrailCC) {\n result = false;\n }\n\n prevTrailCC = fcd & LAST_BYTE_MASK_;\n }\n }\n m_FCDLimit_ = offset;\n m_source_.setIndex(m_FCDStart_ + 1);\n return result;\n }",
"private static boolean c(char paramChar)\r\n/* 680: */ {\r\n/* 681:674 */ return ((paramChar >= '0') && (paramChar <= '9')) || ((paramChar >= 'a') && (paramChar <= 'f')) || ((paramChar >= 'A') && (paramChar <= 'F'));\r\n/* 682: */ }",
"@Test(timeout = 4000)\n public void test071() throws Throwable {\n int int0 = JavaCharStream.hexval('f');\n assertEquals(15, int0);\n }",
"@Test(timeout = 4000)\n public void test08() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n byte[] byteArray0 = new byte[5];\n byte byte0 = (byte)0;\n byte byte1 = (byte)83;\n byte byte2 = (byte)3;\n byte byte3 = (byte)0;\n byte byte4 = (byte)0;\n Range range0 = Range.ofLength(3149L);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.iterator(byteArray0, range0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // range [ 0 .. 3148 ]/0B is out of range of sequence which is only [ 0 .. -1 ]/0B\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec$IteratorImpl\", e);\n }\n }",
"public static final UIntRange m2229untilKr8caGY(byte $this$until, byte to) {\n if (Intrinsics.compare((int) to & 255, 0) <= 0) {\n return UIntRange.Companion.getEMPTY();\n }\n return new UIntRange(UInt.m1374constructorimpl($this$until & 255), UInt.m1374constructorimpl(UInt.m1374constructorimpl(to & 255) - 1), (DefaultConstructorMarker) null);\n }",
"private boolean RANGE(char first, char last) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int code = input.nextChar(in, len);\r\n if (code < first || code > last) return false;\r\n in += len;\r\n return true;\r\n }",
"public abstract int partialIsValidUtf8Direct(int i, ByteBuffer byteBuffer, int i2, int i3);",
"@Test(timeout = 4000)\n public void test067() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32767L, 9223372036854775554L);\n range0.equals(range_CoordinateSystem0);\n Object object0 = new Object();\n range0.toString();\n range0.equals(object0);\n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.getEnd();\n Range.Comparators.values();\n Range range1 = Range.of(range_CoordinateSystem0, 9223372036854775553L, 9223372036854775553L);\n range0.complement(range1);\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"EeIU+%v}^s\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.EeIU+%v}^s\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }",
"public static final void m978checkUIntRangeBoundsJ1ME1BU(int from, int until) {\n if (!(UnsignedKt.uintCompare(until, from) > 0)) {\n throw new IllegalArgumentException(RandomKt.boundsErrorMessage(UInt.m190boximpl(from), UInt.m190boximpl(until)).toString());\n }\n }",
"@Test\n public void testStringCom11CaracteresIguaisIsNotCPF() {\n ArrayList<String> stringsCom11CaracteresIguais = new ArrayList<>();\n stringsCom11CaracteresIguais.add(\"00000000000\");\n stringsCom11CaracteresIguais.add(\"11111111111\");\n stringsCom11CaracteresIguais.add(\"22222222222\");\n stringsCom11CaracteresIguais.add(\"33333333333\");\n stringsCom11CaracteresIguais.add(\"44444444444\");\n stringsCom11CaracteresIguais.add(\"55555555555\");\n stringsCom11CaracteresIguais.add(\"66666666666\");\n stringsCom11CaracteresIguais.add(\"77777777777\");\n stringsCom11CaracteresIguais.add(\"88888888888\");\n stringsCom11CaracteresIguais.add(\"99999999999\");\n\n boolean todosInvalidos = true;\n for (String stringCom11CaracteresIguais : stringsCom11CaracteresIguais) {\n //Se algum for validado, o teste falha:\n if (ValidadorCPF.isCPF(stringCom11CaracteresIguais)) {\n todosInvalidos = false;\n }\n }\n assertTrue(todosInvalidos);\n }",
"@Test\n\tpublic void testXb8() {\n\t\tTextField xbText = new TextField(\"1,2,3,4,,5,6\");\n\t\tboolean checkXbText = initTest.checkXbFormat(xbText);\n\t\tassertFalse(checkXbText);\n\t}",
"private void validateUPC(KeyEvent evt) {\n\t\t\n\t\tif (UPCTypeSwitch != QRCODE && UPCTypeSwitch != CODE39){\n\t\t\n\t\t\tchar UPCNumbers[] = upcTextField.getText().toCharArray();\n\t\t\t//System.out.println(\"matcher: \" + matcher.group());\n\t\t\t\n\t\t\tboolean InvalidUPC = false;\n\t\t\tfor (int i = 0; i < UPCNumbers.length; i++){\n\t\t\t\t//System.out.println(Character.isDigit(UPCNumbers[i]));\n\t\t\t\t//System.out.println(Character.isDigit(Integer.parseInt(Character.toString(UPCNumbers[i]))));\n\t\t\t\tif (Character.isDigit(UPCNumbers[i]) == false){\n\t\t\t\t\tInvalidUPC = true;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tInvalidUPC = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(\"UPCNumber: \" + jTextField1.getText() + \" | UPCLengthConstraint: \" + UPCLengthConstraint + \" | InvalidUPC: \" + InvalidUPC);\n\t\t\tif (upcTextField.getText().length() != UPCLengthConstraint || InvalidUPC == true){\n\t\t\t\tcheckdigitTextField.setText(\"\");\n\t\t\t\tfileMenuItem1.setEnabled(false);\n\t\t\t\texportButton.setEnabled(false);\n\t\t\t\tupdateButton.setEnabled(false);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfileMenuItem1.setEnabled(true);\n\t\t\t\texportButton.setEnabled(true);\n\t\t\t\tupdateButton.setEnabled(true);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if (UPCTypeSwitch == QRCODE && qrCodeTextArea.getText().length() > 0){\n\t\t\t\n\t\t\tfileMenuItem1.setEnabled(true);\n\t\t\texportButton.setEnabled(true);\n\t\t\tupdateButton.setEnabled(true);\n\t\t\t\n\t\t}\n\t\telse if (UPCTypeSwitch == QRCODE && qrCodeTextArea.getText().length() == 0){\n\t\t\t\n\t\t\tfileMenuItem1.setEnabled(false);\n\t\t\texportButton.setEnabled(false);\n\t\t\tupdateButton.setEnabled(false);\n\t\t\t\n\t\t}\n\t\telse if (UPCTypeSwitch == CODE39 && upcTextField.getText().length() > 0){\n\t\t\t\n\t\t\tfileMenuItem1.setEnabled(true);\n\t\t\texportButton.setEnabled(true);\n\t\t\tupdateButton.setEnabled(true);\n\t\t\t\n\t\t}\n\t\telse if (UPCTypeSwitch == CODE39 && upcTextField.getText().length() == 0){\n\t\t\t\n\t\t\tfileMenuItem1.setEnabled(true);\n\t\t\texportButton.setEnabled(true);\n\t\t\tupdateButton.setEnabled(true);\n\t\t\t\n\t\t}\n\t}",
"private byte m1656i() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 < this.f2518c) {\n CharSequence charSequence = this.f2516a;\n this.f2519d = i2 + 1;\n char charAt2 = charSequence.charAt(i2);\n this.f2520e = charAt2;\n if (charAt2 == '>') {\n return 12;\n }\n if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i3 = this.f2519d;\n if (i3 >= this.f2518c) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n this.f2519d = i3 + 1;\n charAt = charSequence2.charAt(i3);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n } else {\n this.f2519d = i;\n this.f2520e = '<';\n return 13;\n }\n }\n }",
"private boolean isHexadecimalDigit(final char c) {\n return (c <= 'f' && map[c] >= 0);\n }",
"boolean hasUnknown72();",
"private byte m1655h() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 <= 0) {\n break;\n }\n CharSequence charSequence = this.f2516a;\n int i3 = i2 - 1;\n this.f2519d = i3;\n char charAt2 = charSequence.charAt(i3);\n this.f2520e = charAt2;\n if (charAt2 == '<') {\n return 12;\n }\n if (charAt2 == '>') {\n break;\n } else if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i4 = this.f2519d;\n if (i4 <= 0) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n int i5 = i4 - 1;\n this.f2519d = i5;\n charAt = charSequence2.charAt(i5);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n }\n this.f2519d = i;\n this.f2520e = '>';\n return 13;\n }",
"public boolean checkInvalid7(String x) {\n if (x.length() > 3) {\n for (int i = 0; i < x.length() - 2; i++) {\n if (consonants.contains(String.valueOf(x.charAt(i)))\n && (consonants.contains(String.valueOf(x.charAt(i + 1))))\n && consonants.contains(String.valueOf(x.charAt(i + 2)))\n && ((x.charAt(i) != 'n') || x.charAt(i + 1) !=\n 'g' || x.charAt(i + 2) != 'h')) {\n return true;\n }\n }\n }\n return false;\n }",
"boolean hasS8();",
"private static int scanHexSequence (String address, int index, int end, int [] counter) {\n \n char testChar;\n int numDigits = 0;\n int start = index;\n \n // Trying to match the following productions:\n // hexseq = hex4 *( \":\" hex4)\n // hex4 = 1*4HEXDIG\n for (; index < end; ++index) {\n testChar = address.charAt(index);\n if (testChar == ':') {\n // IPv6 addresses are 128-bit, so there can be at most eight sections.\n if (numDigits > 0 && ++counter[0] > 8) {\n return -1;\n }\n // This could be '::'.\n if (numDigits == 0 || ((index+1 < end) && address.charAt(index+1) == ':')) {\n return index;\n }\n numDigits = 0;\n }\n // This might be invalid or an IPv4address. If it's potentially an IPv4address,\n // backup to just after the last valid character that matches hexseq.\n else if (!isHex(testChar)) {\n if (testChar == '.' && numDigits < 4 && numDigits > 0 && counter[0] <= 6) {\n int back = index - numDigits - 1;\n return (back >= start) ? back : (back+1);\n }\n return -1;\n }\n // There can be at most 4 hex digits per group.\n else if (++numDigits > 4) {\n return -1;\n }\n }\n return (numDigits > 0 && ++counter[0] <= 8) ? end : -1;\n }",
"public abstract Self byteRange(byte min, byte max);",
"private static int isSeenTailFamilyChar(char ch) {\n if (ch >= 0xfeb1 && ch < 0xfebf){\n return tailFamilyIsolatedFinal [ch - 0xFEB1];\n } else {\n return 0;\n }\n }",
"private static boolean m13730b(int i) {\n if (!(i == C2087a.f5815B || i == C2087a.f5817D || i == C2087a.f5818E || i == C2087a.f5819F || i == C2087a.f5820G || i == C2087a.f5824K || i == C2087a.f5825L || i == C2087a.f5826M)) {\n if (i != C2087a.f5829P) {\n return false;\n }\n }\n return true;\n }",
"static int type_of_lxi(String passed){\n\t\tchar fourth = passed.charAt(4);\n\t\tif(fourth=='B' || fourth=='D' || fourth=='H')\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n\t}",
"public static boolean isValid(int c) {\n return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) ||\n (0x10000 <= c && c <= 0x10FFFF);\n }",
"public static final boolean m2215contains68kG9v0(UIntRange $this$contains, byte value) {\n Intrinsics.checkParameterIsNotNull($this$contains, \"$this$contains\");\n return $this$contains.m2198containsWZ4Q5Ns(UInt.m1374constructorimpl(value & 255));\n }",
"@Test(timeout = 4000)\n public void test21() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = Range.of((-1259L), 255L);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n range2.getEnd(range_CoordinateSystem1);\n // Undeclared exception!\n try { \n Range.parseRange(\"[ -1259 .. 256 ]/SB\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }",
"public static final UIntRange m2227until5PvTz6A(short $this$until, short to) {\n if (Intrinsics.compare((int) to & UShort.MAX_VALUE, 0) <= 0) {\n return UIntRange.Companion.getEMPTY();\n }\n return new UIntRange(UInt.m1374constructorimpl($this$until & UShort.MAX_VALUE), UInt.m1374constructorimpl(UInt.m1374constructorimpl(65535 & to) - 1), (DefaultConstructorMarker) null);\n }",
"private static int specialChar(char ch) {\n if ((ch > '\\u0621' && ch < '\\u0626') ||\n (ch == '\\u0627') ||\n (ch > '\\u062E' && ch < '\\u0633') ||\n (ch > '\\u0647' && ch < '\\u064A') ||\n (ch == '\\u0629')) {\n return 1;\n } else if (ch >= '\\u064B' && ch<= '\\u0652') {\n return 2;\n } else if (ch >= 0x0653 && ch <= 0x0655 ||\n ch == 0x0670 ||\n ch >= 0xFE70 && ch <= 0xFE7F) {\n return 3;\n } else {\n return 0;\n }\n }",
"public boolean mo857f() {\n if ((this.f631z & 8) == 0) {\n return false;\n }\n if (this.f601A == null) {\n C4124b bVar = this.f602B;\n if (bVar != null) {\n this.f601A = bVar.mo960a((MenuItem) this);\n }\n }\n if (this.f601A != null) {\n return true;\n }\n return false;\n }",
"public static boolean isLowSurrogate(int c) {\n return (0xDC00 <= c && c <= 0xDFFF);\n }",
"private byte m1653f() {\n char charAt;\n int i = this.f2519d;\n do {\n int i2 = this.f2519d;\n if (i2 <= 0) {\n break;\n }\n CharSequence charSequence = this.f2516a;\n int i3 = i2 - 1;\n this.f2519d = i3;\n charAt = charSequence.charAt(i3);\n this.f2520e = charAt;\n if (charAt == '&') {\n return 12;\n }\n } while (charAt != ';');\n this.f2519d = i;\n this.f2520e = ';';\n return 13;\n }",
"@Test(timeout = 4000)\n public void test102() throws Throwable {\n int int0 = JavaCharStream.hexval('F');\n assertEquals(15, int0);\n }",
"@Test(timeout = 4000)\n public void test09() throws Throwable {\n DefaultNucleotideCodec defaultNucleotideCodec0 = DefaultNucleotideCodec.INSTANCE;\n Collection<Nucleotide> collection0 = null;\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte)0;\n byteArray0[1] = (byte)0;\n byteArray0[2] = (byte) (-72);\n byteArray0[3] = (byte) (-11);\n Range range0 = Range.of((long) (byte) (-11), 2L);\n // Undeclared exception!\n try { \n defaultNucleotideCodec0.iterator(byteArray0, range0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // range [ -11 .. 2 ]/0B is out of range of sequence which is only [ 0 .. 47348 ]/0B\n //\n verifyException(\"org.jcvi.jillion.core.residue.nt.DefaultNucleotideCodec$IteratorImpl\", e);\n }\n }",
"public static int m66070c(String str) {\n int length = str.length();\n for (int i = 0; i < length; i++) {\n char charAt = str.charAt(i);\n if (charAt <= 31 || charAt >= 127) {\n return i;\n }\n }\n return -1;\n }",
"@Test\r\n\tpublic void testCheckCharacter() throws ConfuserException {\r\n\t\t// Check to make sure unknowns work by checking against basic ASCII\r\n\t\tfor (char ndx = 0x021; ndx < 0x007E; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Unknown, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t\t// Check to make sure Hiragana pass\r\n\t\tfor (char ndx = 0x3041; ndx < 0x3096; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Hiragana, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t\t// Check to make sure the katakana pass\r\n\t\tfor (char ndx = 0x30A1; ndx < 0x30FC; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Katakana, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t\t// Check to make sure the kanji pass, note that we are checking the \r\n\t\t// full CJK range so this includes kanji that are not used in Japanese\r\n\t\tfor (char ndx = 0x4E00; ndx < 0x9FAF; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Kanji, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t}",
"private static String getUniNameOfCodePoint(int codePoint) {\n/* 111 */ String hex = Integer.toString(codePoint, 16).toUpperCase(Locale.US);\n/* 112 */ switch (hex.length()) {\n/* */ \n/* */ case 1:\n/* 115 */ return \"uni000\" + hex;\n/* */ case 2:\n/* 117 */ return \"uni00\" + hex;\n/* */ case 3:\n/* 119 */ return \"uni0\" + hex;\n/* */ } \n/* 121 */ return \"uni\" + hex;\n/* */ }",
"public static boolean isHighSurrogate(int c) {\n return (0xD800 <= c && c <= 0xDBFF);\n }",
"private boolean checkInteger(byte buffer[], int sindex, int findex)\n {\n \t\t// 첫 글자를 체크한다. (+, -가 올수 있다.)\n \t\tbyte b = buffer[sindex];\n \t\tif ((b < 48) || (b > 57)) {\n \t\t\tif (b != 45)\n \t\t\t\tif (b != 43) return false;\n \t\t}\n \t\tfor (int i=sindex+1; i<findex; i++) {\n \tif ((buffer[i] < 48) || (buffer[i] > 57)) return false;\n \t\t}// end of for\n \t\treturn true;\n \t}",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n range0.getEnd(range_CoordinateSystem0);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 248L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }",
"public static boolean stringInBounds (String plainText) {\r\n\t\t\r\n\t\tchar[] pText = plainText.toCharArray();\r\n\t\tboolean isCorrect;\r\n\t\tfor(int i = 0; i < plainText.length(); i++) {\r\n\t\t\tdo {\r\n\t\t\t\tif (plainText.charAt(i) < LOWER_BOUND || plainText.charAt(i) > UPPER_BOUND ) {\r\n\t\t\t\t\tisCorrect = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**\r\n\t\t\t\t\tif(plainText.charAt(i) < LOWER_BOUND) {\r\n\t\t\t\t\t\tchar nChar = (char) (plainText.charAt(i) - RANGE);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tchar nChar = (char) (plainText.charAt(i) + RANGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t\r\n\t\t\t\t}else {\r\n\t\t\t\t\tisCorrect = true;\r\n\t\t\t\t}\r\n\t\t\t}while(isCorrect = false);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Test\n\tpublic void testXb6() {\n\t\tTextField xbText = new TextField(\"1,2,3,abc,5,6\");\n\t\tboolean checkXbText = initTest.checkXbFormat(xbText);\n\t\tassertFalse(checkXbText);\n\t}",
"protected final boolean isCharTrie() {\n/* 358 */ return ((this.m_options_ & 0x100) == 0);\n/* */ }",
"void beginNonZeroHex(String s) {\n \t\tboolean findot = false;\n \t\tString mantisse = \"\";\n \t\tint exposant = -1;\n \t\tfor (int i = 0; i < s.length(); i++) {\n \t\t\tswitch(s.charAt(i)) {\n \t\t\tcase 'p':\n \t\t\t\texposantFlottantHex(mantisse, exposant, s.substring(i+1));\n \t\t\t\treturn;\n \t\t\tcase 'P':\n \t\t\t\texposantFlottantHex(mantisse, exposant, s.substring(i+1));\n \t\t\t\treturn;\n \t\t\tcase '.':\n \t\t\t\tfindot = true;\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\tmantisse += s.charAt(i);\n \t\t\t\tif(!findot) {\n \t\t\t\t\tif(exposant == -1) {\n \t\t\t\t\t\texposant ++;\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\texposant += 4;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t//compareExposantHex(exposant, mantisse); \n \t}",
"public void testInteger() throws Exception {\n String string = \"abcdandmore\";\n CharIndex idx = CharIndex.getInstance(string);\n\n int[] map = PatternBitmap.map(string, idx, new int[idx.size()]);\n\n /* Spot check some */\n assertEquals(0x11, map[idx.lookup('a')]);\n assertEquals(0x02, map[idx.lookup('b')]);\n assertEquals(0x04, map[idx.lookup('c')]);\n assertEquals(0x48, map[idx.lookup('d')]);\n\n /* Check all others for zero/non-zero */\n for (int i = 0; i < 0xffff; i++) {\n char c = (char)i;\n int where = string.indexOf(c);\n if (where >= 0) {\n assertTrue(\"Map for pattern character '\" + c + \"' should be non-zero\",\n (map[idx.lookup(c)] & (1 << where)) != 0);\n } else {\n assertEquals(\"Map for unused character '\" + c + \"' should be zero\",\n 0, map[idx.lookup(c)]);\n }\n }\n }",
"private int normalize(char[] dest, int start, int length) {\n int lacount = 0;\n for (int i = start, e = i + length; i < e; ++i) {\n char ch = dest[i];\n if (ch >= '\\uFE70' && ch <= '\\uFEFC') {\n if (isLamAlefChar(ch)) {\n ++lacount;\n }\n dest[i] = (char)convertFEto06[ch - '\\uFE70'];\n }\n }\n return lacount;\n }",
"private void m81843b(String str) {\n if (this.f58083o) {\n if (C6969H.m41409d(\"G6F82D909BA\").equals(str)) {\n this.f58077i = true;\n m81851o();\n return;\n }\n this.f58077i = false;\n m81851o();\n } else if (C6969H.m41409d(\"G6F82D909BA\").equals(str)) {\n this.f58077i = true;\n m81851o();\n } else if (C6969H.m41409d(\"G7D91C01F\").equals(str)) {\n this.f58077i = false;\n m81851o();\n }\n }",
"private boolean m76078a(String str) {\n return str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAD7D27B8E9A0AAD39BD28E517\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAD7D27B8E9A0AAD39BD28E517\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF58E0ECD5D66A9A\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF58E0ECD5D66A9A\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAC2C77986D416E025BF24D91D9F5DE0E6C68A688DD108B039AF\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAC2C77986D416E025BF24D91D9F5DE0E6C68A688DD108B039AF\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668DEA0EA620AE\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668DEA0EA620AE\")) || str.contains(C6969H.m41409d(\"G738BDC12AA6AE466F51B9245FBF1FCD16C86D118BE33A0\")) || str.contains(Uri.encode(C6969H.m41409d(\"G738BDC12AA6AE466F51B9245FBF1FCD16C86D118BE33A0\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668D\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668D\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466E340C110ABABC0D92690D111F031AC3BE30B9D4DFCF18CD36C97D413B37EAF26B906994CF7F1CCC73497C70FBA\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466E340C110ABABC0D92690D111F031AC3BE30B9D4DFCF18CD36C97D413B37EAF26B906994CF7F1CCC73497C70FBA\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F10F8006F1E8D3D67A90C515AD24E52AE903DF5AF7F6CCC27B80D009F038BF24EA419347FCF1D1D66A979B12AB3DA7\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F10F8006F1E8D3D67A90C515AD24E52AE903DF5AF7F6CCC27B80D009F038BF24EA419347FCF1D1D66A979B12AB3DA7\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466EB1DDE52E8FD9A996A8D9A12AB3DA766E90F855CFAAAD3C56697DA19B03CF967EE1A9D44\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466EB1DDE52E8FD9A996A8D9A12AB3DA766E90F855CFAAAD3C56697DA19B03CF967EE1A9D44\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA27F2078358F3E88CC26781D915BC3B\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA27F2078358F3E88CC26781D915BC3B\")));\n }",
"@Test(timeout = 4000)\n public void test082() throws Throwable {\n Range range0 = Range.ofLength(127L);\n boolean boolean0 = range0.equals(range0);\n assertTrue(boolean0);\n assertFalse(range0.isEmpty());\n }",
"public static boolean hasAllUniqueChars6(String string) {\n if(string.length() > LAST_LETTER - FIRST_LETTER + 1) return false;\n\n int vector = 0;\n\n for(int i = 0; i < string.length(); i++) {\n int value = string.charAt(i) - FIRST_LETTER;\n\n if((vector & (1 << value)) > 0) return false;\n else vector |= (1 << value);\n }\n\n return true;\n }",
"static boolean boolFrByte(byte input,int position){\n return boolFrBit(getBit(input,position));\n }",
"String getIndexBits();",
"@Test(timeout = 4000)\n public void test116() throws Throwable {\n Range range0 = Range.ofLength(4294967244L);\n Long long0 = new Long(4294967244L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range.of(4294967244L);\n Range.CoordinateSystem.values();\n Range range1 = Range.parseRange(\"[ 1 .. 4294967244 ]/RB\");\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range2 = Range.parseRange(\"[ 1 .. 4294967244 ]/RB\", range_CoordinateSystem1);\n range2.getEnd();\n range0.equals(range1);\n range2.getBegin();\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\", range_CoordinateSystem2);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }",
"static int type_of_xra(String passed){\n\t\tif(general_registers.contains(passed.charAt(4)))\n\t\t\treturn 1;\n\t\telse if(passed.charAt(4)=='M')\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 0;\n\t}",
"@Test\n\tpublic void testXb7() {\n\t\tTextField xbText = new TextField(\"1;2;3;4;5;6\");\n\t\tboolean checkXbText = initTest.checkXbFormat(xbText);\n\t\tassertFalse(checkXbText);\n\t}",
"boolean hasByteCode();",
"private static int charToNibble( char c ) \r\n { \r\n if ( c > 'f' ) \r\n { \r\n throw new IllegalArgumentException( \"Invalid hex character: \" + c ); \r\n } \r\n int nibble = correspondingNibble[ c ]; \r\n if ( nibble < 0 ) \r\n { \r\n throw new IllegalArgumentException( \"Invalid hex character: \" + c ); \r\n } \r\n return nibble; \r\n }",
"private void parseRange(Node node) {\r\n if (switchTest) return;\r\n int low = node.low();\r\n int high = node.high();\r\n ok = false;\r\n if (in < input.length()) {\r\n int ch = input.codePointAt(in);\r\n ok = (ch >= low) && (ch <= high);\r\n if (ok) {\r\n int n = Character.charCount(ch);\r\n in += n;\r\n if (tracing) traceInput();\r\n }\r\n }\r\n }",
"public static boolean isIUPAC(final char base) {\n\tswitch(base) {\n\t case 'A':\n\t case 'C':\n\t case 'G':\n\t case 'T':\n\t case 'U':\n\t case 'R':\n\t case 'Y':\n\t case 'S':\n\t case 'W':\n\t case 'K':\n\t case 'M':\n\t case 'B':\n\t case 'D':\n\t case 'H':\n\t case 'V':\n\t case 'N':\n\t //\n\t case 'a':\n\t case 'c':\n\t case 'g':\n\t case 't':\n\t case 'u':\n\t case 'r':\n\t case 'y':\n\t case 's':\n\t case 'w':\n\t case 'k':\n\t case 'm':\n\t case 'b':\n\t case 'd':\n\t case 'h':\n\t case 'v':\n\t case 'n': return true;\n\t default: return false;\n\t\t}\n\t}",
"private boolean isPrivateUse(char c) {\n return c >= '\\uE000' && c <= '\\uF8FF';\n }",
"public static boolean isSurrogateHigh(char c) {\n return c >= '\\ud800' && c <= '\\udbff';\n }"
] | [
"0.5758858",
"0.5634631",
"0.56013244",
"0.5390082",
"0.5307624",
"0.5285176",
"0.5276353",
"0.52712387",
"0.52667314",
"0.5249467",
"0.5236006",
"0.5198131",
"0.5197494",
"0.5181549",
"0.51696163",
"0.5165474",
"0.5111947",
"0.5106236",
"0.50959885",
"0.5072329",
"0.504432",
"0.50349575",
"0.5032976",
"0.50294864",
"0.5025706",
"0.5010393",
"0.4974173",
"0.49443176",
"0.49363106",
"0.49339357",
"0.49178928",
"0.49023438",
"0.49015856",
"0.4888577",
"0.48877275",
"0.4886307",
"0.4885308",
"0.48843658",
"0.48786008",
"0.4862063",
"0.48608622",
"0.4856108",
"0.48424888",
"0.4838366",
"0.4830512",
"0.48265463",
"0.48260128",
"0.4824028",
"0.48149905",
"0.48078993",
"0.48061383",
"0.47944623",
"0.47787327",
"0.4762942",
"0.4757522",
"0.4749799",
"0.47497714",
"0.47480038",
"0.4747373",
"0.474052",
"0.4739653",
"0.47361416",
"0.4730986",
"0.47266102",
"0.47263944",
"0.4723888",
"0.4715553",
"0.47024998",
"0.4702101",
"0.47015262",
"0.4697969",
"0.4695533",
"0.4682408",
"0.46794882",
"0.46761897",
"0.46743104",
"0.46742007",
"0.46678692",
"0.46677732",
"0.4666227",
"0.46504718",
"0.46361017",
"0.4635815",
"0.46254745",
"0.46248814",
"0.46235383",
"0.46179903",
"0.46172503",
"0.46154135",
"0.46144208",
"0.46138486",
"0.46122253",
"0.46103257",
"0.46097475",
"0.46022338",
"0.4596894",
"0.4585637",
"0.4578433",
"0.4575881",
"0.45745188",
"0.45730945"
] | 0.0 | -1 |
This method is optimized for ASCII input. | private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) {
byte[] srcArray = src.array();
int srcPosition = src.arrayOffset() + src.position();
int srcLength = src.arrayOffset() + src.limit();
char[] destArray = dst.array();
int destPosition = dst.arrayOffset() + dst.position();
int destLength = dst.arrayOffset() + dst.limit();
int destLengthASCII = destPosition + Math.min(srcLength - srcPosition, destLength - destPosition);
// ASCII only loop
while (destPosition < destLengthASCII && srcArray[srcPosition] >= 0) {
destArray[destPosition++] = (char) srcArray[srcPosition++];
}
while (srcPosition < srcLength) {
int b1 = srcArray[srcPosition];
if (b1 >= 0) {
// 1 byte, 7 bits: 0xxxxxxx
if (destPosition >= destLength) {
return xflow(src, srcPosition, srcLength, dst, destPosition, 1);
}
destArray[destPosition++] = (char) b1;
srcPosition++;
} else if ((b1 >> 5) == -2) {
// 2 bytes, 11 bits: 110xxxxx 10xxxxxx
if (srcLength - srcPosition < 2 || destPosition >= destLength) {
return xflow(src, srcPosition, srcLength, dst, destPosition, 2);
}
int b2 = srcArray[srcPosition + 1];
if (isMalformed2(b1, b2)) {
return malformed(src, srcPosition, dst, destPosition, 2);
}
destArray[destPosition++] = (char) (((b1 << 6) ^ b2) ^ 0x0f80);
srcPosition += 2;
} else if ((b1 >> 4) == -2) {
// 3 bytes, 16 bits: 1110xxxx 10xxxxxx 10xxxxxx
if (srcLength - srcPosition < 3 || destPosition >= destLength) {
return xflow(src, srcPosition, srcLength, dst, destPosition, 3);
}
int b2 = srcArray[srcPosition + 1];
int b3 = srcArray[srcPosition + 2];
if (isMalformed3(b1, b2, b3)) {
return malformed(src, srcPosition, dst, destPosition, 3);
}
destArray[destPosition++] = (char) (((b1 << 12) ^ (b2 << 6) ^ b3) ^ 0x1f80);
srcPosition += 3;
} else if ((b1 >> 3) == -2) {
// 4 bytes, 21 bits: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
if (srcLength - srcPosition < 4 || destLength - destPosition < 2) {
return xflow(src, srcPosition, srcLength, dst, destPosition, 4);
}
int b2 = srcArray[srcPosition + 1];
int b3 = srcArray[srcPosition + 2];
int b4 = srcArray[srcPosition + 3];
int uc = ((b1 & 0x07) << 18) | ((b2 & 0x3f) << 12) | ((b3 & 0x3f) << 06) | (b4 & 0x3f);
if (isMalformed4(b2, b3, b4) || !((uc >= 0x10000) && (uc <= 1114111))) {
return malformed(src, srcPosition, dst, destPosition, 4);
}
destArray[destPosition++] = (char) (0xd800 | (((uc - 0x10000) >> 10) & 0x3ff));
destArray[destPosition++] = (char) (0xdc00 | ((uc - 0x10000) & 0x3ff));
srcPosition += 4;
} else {
return malformed(src, srcPosition, dst, destPosition, 1);
}
}
return xflow(src, srcPosition, srcLength, dst, destPosition, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void parseInput() throws InvalidArgumentValueException {\n\t\t\n\t\t\n\t\ttry {\n\t\t\tstringArgBytes = stringToArrayOfByte(stringText.getText());\n\t\t} catch (NumberFormatException e) {\n\n\t\t\tthrow new InvalidArgumentValueException(\n\t\t\t\t\t\"This string cannot be converted to ASCII for some reason. Maybe there are non asci characters used in it\");\n\t\t}\n\t}",
"static void getNonBlank() throws IOException{\n while(curr_char == 32)\n {\n curr_char = pbIn.read();\n }\n }",
"@Test(timeout = 4000)\n public void test009() throws Throwable {\n StringReader stringReader0 = new StringReader(\"kE4X 9\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-1), 66, 1279);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('k', char0);\n }",
"private static void task41() {\n System.out.println(\"Enter character: \");\n char ch = scanStr().charAt(0);\n\n System.out.println(\"ASCII value of \" + ch + \" is \" + (int)ch);\n }",
"private AsciiUtils() {\r\n\t}",
"@Test(timeout = 4000)\n public void test053() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1, 0);\n char char0 = javaCharStream0.readChar();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndLine());\n assertEquals('Z', char0);\n }",
"private static void readInput() { input = sc.nextLine().toLowerCase().toCharArray(); }",
"private static String validateInputStr() {\n String str = \"\";\n Scanner genericString = new Scanner(System.in);\n if (!genericString.hasNextInt()) {\n str = genericString.nextLine();\n return str;\n }\n else {\n validateInputStr();\n }\n return str;\n }",
"private boolean containsOnlyASCII(String input) {\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tif (input.charAt(i) > 127) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public void setNChar()\n/* */ {\n/* 1168 */ this.isNChar = true;\n/* */ }",
"@Test(timeout = 4000)\n public void test061() throws Throwable {\n StringReader stringReader0 = new StringReader(\"anBz*^T>\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[4];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"^\", token0.toString());\n }",
"@Test(timeout = 4000)\n public void test092() throws Throwable {\n StringReader stringReader0 = new StringReader(\"s15IMZA$C/uXdG]R\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0, 0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(13, javaCharStream0.bufpos);\n assertEquals(\"uXdG\", token0.toString());\n }",
"private void handleCharacterData() {\n\t\tif (!buffer.isEmpty()) {\n\t\t\tbyte[] data = buffer.toArray();\n\t\t\tbuffer.clear();\n\t\t\thandler.handleString(new String(data));\n\t\t}\n\t}",
"@Override\n public void accept(CharSequence charSequence) {\n }",
"@Test(timeout = 4000)\n public void test058() throws Throwable {\n StringReader stringReader0 = new StringReader(\";{\\\"9n/s(2C'#tQX*\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n byte[] byteArray0 = new byte[8];\n byteArray0[0] = (byte)115;\n byteArray0[1] = (byte)93;\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n javaCharStream0.ReInit((InputStream) byteArrayInputStream0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"s\", token0.toString());\n }",
"private static String loadConvert(String str) {\n\t\tint off = 0;\n\t\tint len = str.length();\n\t\tchar[] in = str.toCharArray();\n\t\tchar[] convtBuf = new char[1024];\n\t\tif (convtBuf.length < len) {\n\t\t\tint newLen = len * 2;\n\t\t\tif (newLen < 0) {\n\t\t\t\tnewLen = Integer.MAX_VALUE;\n\t\t\t}\n\t\t\tconvtBuf = new char[newLen];\n\t\t}\n\t\tchar aChar;\n\t\tchar[] out = convtBuf;\n\t\tint outLen = 0;\n\t\tint end = off + len;\n\n\t\twhile (off < end) {\n\t\t\taChar = in[off++];\n\t\t\tif (aChar == '\\\\') {\n\t\t\t\taChar = in[off++];\n\t\t\t\tif (aChar == 'u') {\n\t\t\t\t\t// Read the xxxx\n\t\t\t\t\tint value = 0;\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\taChar = in[off++];\n\t\t\t\t\t\tswitch (aChar) {\n\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\tvalue = (value << 4) + aChar - '0';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'a';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'A':\n\t\t\t\t\t\tcase 'B':\n\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\tcase 'F':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'A';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"Malformed \\\\uxxxx encoding.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tout[outLen++] = (char) value;\n\t\t\t\t} else {\n\t\t\t\t\tif (aChar == 't')\n\t\t\t\t\t\taChar = '\\t';\n\t\t\t\t\telse if (aChar == 'r')\n\t\t\t\t\t\taChar = '\\r';\n\t\t\t\t\telse if (aChar == 'n')\n\t\t\t\t\t\taChar = '\\n';\n\t\t\t\t\telse if (aChar == 'f')\n\t\t\t\t\t\taChar = '\\f';\n\t\t\t\t\tout[outLen++] = aChar;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout[outLen++] = aChar;\n\t\t\t}\n\t\t}\n\t\treturn new String(out, 0, outLen);\n\t}",
"private void printchar(){\n temp = (inp).toString();\n count = (temp).length();\n System.out.println(\"Length = \"+(temp).length());\n }",
"public static void main(String[] args) {\nScanner scn=new Scanner(System.in);\nSystem.out.print(\"½Ð¿é¤J¤å¦r\");\nString str=scn.nextLine();\nchar[]data=str.toCharArray();\nint len=str.length();\nchar[]data1=new char[len];\nfor(int i=0;i<len;i++){\n\tdata1[i]=data[len-i-1];\n}\nString str2=new String(data1);\nSystem.out.println(data1);\n\t}",
"@Test(timeout = 4000)\n public void test031() throws Throwable {\n StringReader stringReader0 = new StringReader(\"H+\\\"RE_]I95BDm\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals('H', char0);\n }",
"private String stringKeyBoardInput() {\n\t\tString input = \"\";\n\t\tboolean tryAgain = true;\n\t\twhile (tryAgain) {\n\t\t\ttry {\n\t\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t\tinput = scanner.nextLine();\n\t\t\t\ttryAgain = false;\n\t\t\t} catch (InputMismatchException ime) {\n\t\t\t\tSystem.out.println(\"Invalid input.\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}",
"@Test(timeout = 4000)\n public void test126() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F}n S'~C\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(74, token0.kind);\n assertEquals(\"F\", token0.toString());\n }",
"private char readChar() {\r\n\t\tInputStream in = System.in;\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n\t\tString line = null;\r\n\r\n\t\ttry {\r\n\t\t\tline = br.readLine();\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t\treturn line.toLowerCase().charAt(0);\r\n\t}",
"String getInput();",
"public abstract char read_char();",
"@Test(timeout = 4000)\n public void test066() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=<D!T!tLp\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 20, 0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(3, javaCharStream0.getEndColumn());\n }",
"private void prepareInput() {\n\t\tif(input.charAt(0) == '-') input = \"0\" + input;\n\t\tfor(int i = 0; i < input.length() - 1; i++) {\n\t\t\tif(input.charAt(i) == '(' && input.charAt(i+1) == '-') input = input.substring(0, i+1) + \"0\" + input.substring(i+1); \n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test133() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=<D!T!tLp\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 87);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"=\", token0.toString());\n }",
"private boolean CHAR(char ch) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int code = input.nextChar(in, len);\r\n if (code != ch) return false;\r\n in += len;\r\n return true;\r\n }",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[8];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }",
"@Override\n\tprotected void processInput() {\n\t}",
"char getEChar();",
"char readChar();",
"@Test(timeout = 4000)\n public void test063() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n javaCharStream0.maxNextCharInd = 2;\n javaCharStream0.prevCharIsCR = true;\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('\\u0000', char0);\n }",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n char temp;\n for(int i=0; i < str.length(); i++) {\n temp = str.charAt(i);\n \n if(temp>=65 && temp <= 96) {\n // 대문자를 소문자로 변형\n System.out.println((char)(temp+32) +\"\");\n } else if(temp >= 97 && temp <= 122) {\n // 소문자를 대문자로 변형\n System.out.println((char)(temp-32) + \"\");\n } else {\n // 숫자가 들어갔을 때는 그냥 출력\n System.out.println(temp +\"\");\n }\n }\n // 아스키 코드 65 = 'A' ~ 90 = 'Z'\n // 97 = 'a' ~ 122 = 'z'\n }",
"public static void main(String[] args) throws IOException{\n char c;\r\n do{\r\n c = (char)System.in.read();\r\n System.out.println(\"c: \"+c);\r\n }while(c!='.');\r\n //2 method: int read(byte data[]) & int read(byte data[],int min, int max)\r\n// byte data[] = new byte[10];// input char translated into byte numbers\r\n// System.out.println(\"nhap cac ki tu: \");\r\n// //System.in.read(data);\r\n// System.in.read(data,0,3);// read chars [0;3)\r\n// System.out.println(\"cac ki tu vua nhap\");\r\n// for(int i=0;i<data.length;i++)\r\n// System.out.println((char)data[i]);// empty positions filled with 0/empty space\r\n }",
"@Test(timeout = 4000)\n public void test102() throws Throwable {\n StringReader stringReader0 = new StringReader(\"oh\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 89, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[1];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(74, token0.kind);\n assertEquals(\"h\", token0.toString());\n }",
"@Test(timeout = 4000)\n public void test115() throws Throwable {\n StringReader stringReader0 = new StringReader(\"V&H#2E6u%Ql&dI\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 2, 2);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"V\", token0.toString());\n }",
"public boolean isAscii()\n { \n for (int i=0; i<val.length(); ++i)\n { \n int c = val.charAt(i);\n if (c > 0x7f) return false;\n }\n return true;\n }",
"protected void handleInput(String input) {}",
"protected final String parseASCIIString(ByteArrayInputStream stream, final int length) throws EOFException\n {\n try\n {\n return new String(parseByteArray(stream, length), \"US-ASCII\");\n }\n catch (UnsupportedEncodingException e) // should not occur in a proper\n // JVM port\n {\n throw new IllegalStateException(\"US-ASCII is not a supported charset name\");\n }\n }",
"@Override\r\n\tpublic void acceptInput(String input) {\n\t\t\r\n\t}",
"public static boolean isAscii(char ch) {\n/* 403 */ return (ch < '');\n/* */ }",
"@Test(timeout = 4000)\n public void test001() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~\\\"Py BTn?,~tnf\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 15, 15);\n javaCharStream0.bufpos = (-1396);\n javaCharStream0.backup((-1396));\n javaCharStream0.adjustBeginLineColumn((-1396), 76);\n assertEquals(0, javaCharStream0.bufpos);\n }",
"public static String acceptString() {\n\t\tString stringData = null;\r\n\t\tBufferedReader input = null;\r\n\t\ttry {\r\n\t\t\t// chaining the streams\r\n\t\t\tinput = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n\t\t\t// reading data from the reader\r\n\t\t\tstringData = input.readLine();\r\n\t\t} catch (IOException ioException) {\r\n\t\t\tSystem.out.println(\"Error in accepting data.\");\r\n\t\t} finally {\r\n\t\t\tinput = null;\r\n\t\t}\r\n\t\treturn stringData;\r\n\t}",
"@Test(timeout = 4000)\n public void test008() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Z[^o)j]BO6Ns,$`3$e\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.readChar();\n javaCharStream0.GetImage();\n assertEquals(1, javaCharStream0.bufpos);\n }",
"@Test(timeout = 4000)\n public void test059() throws Throwable {\n StringReader stringReader0 = new StringReader(\".`BW=S&r<Py\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\".\", token0.toString());\n }",
"char getReadChar();",
"C3579d mo19708e(String str) throws IOException;",
"@Test(timeout = 4000)\n public void test078() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[2];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(9, javaCharStream0.bufpos);\n assertEquals(10, javaCharStream0.getColumn());\n }",
"void readInput() {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line = input.readLine();\n\t\t\tString [] numbers = line.split(\" \");\n\n\t\t\tlenA = Integer.parseInt(numbers[0]);\n\t\t\tlenB = Integer.parseInt(numbers[1]); \n\n\t\t\twordA = input.readLine().toLowerCase(); \n\t\t\twordB = input.readLine().toLowerCase();\n\n\t\t\tg = Integer.parseInt(input.readLine());\n\n\t\t\tString key; \n\t\t\tString [] chars;\n\t\t\tpenaltyMap = new HashMap<String, Integer>();\n\n\t\t\tfor(int i=0;i<676;i++) {\n\t\t\t\tline = input.readLine();\n\t\t\t\tchars = line.split(\" \");\n\t\t\t\tkey = chars[0] + \" \" + chars[1];\n\t\t\t\tpenaltyMap.put(key, Integer.parseInt(chars[2]));\n\n\t\t\t}\n\n\t\t\tinput.close();\n\n\t\t} catch (IOException io) {\n\t\t\tio.printStackTrace();\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test129() throws Throwable {\n StringReader stringReader0 = new StringReader(\"CjTuDS`ey>LBoXB\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }",
"public static void main(String[] args) {\n Scanner key=new Scanner(System.in);\r\n while(key.hasNext())\r\n {\r\n String s=key.next();\r\n String c=\"\";\r\n for (int i = 0; i <s.length(); i++) {\r\n if((Character)s.charAt(i)=='1'|| (Character)s.charAt(i)=='0'|| (Character)s.charAt(i)=='-')\r\n {\r\n // c=c+c.concat(String.valueOf((Character)s.charAt(i)));\r\n System.out.print((Character)s.charAt(i));\r\n }\r\n else if((Character)s.charAt(i)=='A' || (Character)s.charAt(i)=='B' || (Character)s.charAt(i)=='C')\r\n {\r\n System.out.print(2);\r\n }\r\n else if((Character)s.charAt(i)=='D' || (Character)s.charAt(i)=='E' || (Character)s.charAt(i)=='F')\r\n {\r\n System.out.print(3);\r\n }\r\n else if((Character)s.charAt(i)=='G' || (Character)s.charAt(i)=='H' || (Character)s.charAt(i)=='I')\r\n {\r\n System.out.print(4);\r\n }\r\n else if((Character)s.charAt(i)=='J' || (Character)s.charAt(i)=='K' || (Character)s.charAt(i)=='L')\r\n {\r\n System.out.print(5);\r\n }\r\n else if((Character)s.charAt(i)=='M' || (Character)s.charAt(i)=='N' || (Character)s.charAt(i)=='O')\r\n {\r\n System.out.print(6);\r\n }\r\n else if((Character)s.charAt(i)=='P' || (Character)s.charAt(i)=='Q' || (Character)s.charAt(i)=='R' || (Character)s.charAt(i)=='S')\r\n {\r\n System.out.print(7);\r\n }\r\n else if((Character)s.charAt(i)=='T' || (Character)s.charAt(i)=='U' || (Character)s.charAt(i)=='V')\r\n {\r\n System.out.print(8);\r\n }\r\n else if((Character)s.charAt(i)=='W' || (Character)s.charAt(i)=='X' || (Character)s.charAt(i)=='Y'|| (Character)s.charAt(i)=='Z')\r\n {\r\n System.out.print(9);\r\n }\r\n }\r\n System.out.println();\r\n }\r\n }",
"public static void main(String[] args) {\n\t\tint howMany = 0; //��ū�� ���� ���� ����\n\t\tString output = \"\"; //��ȯ String ����\n\t\tString[] temp = new String[10]; //output�� ��������� �ӽ÷� ����ϴ� �迭\n\n\t\tSystem.out.println(\"검색어 입력 : \");\n\t\tinput = sc.nextLine(); // ���ڿ� �Է�\n\t\tcheckSearchingOperator(input); // ���ڿ� Ȯ��\n\t\t\n\t\t\n\t\t//�������� ������ ���� �˻�� �ڸ���, temp��� �迭�� �� ��ū���� �����Ѵ�.\n\t\tif (hasAnd) { // \"+\" ��ȣ�� ���� ���\n\t\t\tStringTokenizer tokens = new StringTokenizer(input, \"+\");\n\t\t\tfor (int i = 0; tokens.hasMoreElements(); i++) {\n\t\t\t\ttemp[i] = new String(tokens.nextToken());\n\t\t\t\thowMany++;\n\t\t\t}\n\t\t} else if (hasOr) {\n\t\t\tStringTokenizer tokens = new StringTokenizer(input, \"|\");\n\t\t\tfor (int i = 0; tokens.hasMoreElements(); i++) {\n\t\t\t\ttemp[i] = new String(tokens.nextToken());\n\t\t\t\thowMany++;\n\t\t\t}\n\t\t\t// �� ������ ������ �迭�� + Ȥ�� |�� �������� �߸� �������� ����ִ�.\n\t\t} else { //������ ���°��\n\t\t\ttemp[0] = new String(input);\n\t\t\thowMany++;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// �˻����ʵ� �ȳ������ defalut �� bi �ʵ带 �־��ش�.\n\t\tfor (int i = 0; i < howMany; i++) {\n\t\t\tif (!(temp[i].contains(\":\"))) {\n\t\t\t\ttemp[i] = \"bi:\" + temp[i]; \n\t\t\t}\n\t\t}\n\t\t// �� ������ ������ �� ��ū�� ��� : �� �����ϰ� �ȴ�.\n\t\t\n\t\t\n\t\t//�� ��ū�� ���鼭 �˻��� �ʵ尡 �ȵ� ��ū�� ã�Ƽ� ����Ʈ���� bi: �� �־��ָ鼭 ���� ������ش�.\n\t\tfor (int i = 0; i < howMany; i++) {\n\t\t\tStringTokenizer tokens = new StringTokenizer(temp[i], \":\");\n\t\t\tString tmp1 = tokens.nextToken();\n\t\t\tif ((!Field.isMember(tmp1))) {\n\t\t\t\ttemp[i] = \"bi:(\" + tokens.nextToken().trim() + \")\";\n\t\t\t} // Field�� ���� �ִ��� Ȯ���ϰ� ������ ��bƮ���� bi ����\n\t\t\telse {\n\t\t\t\ttemp[i] = tmp1 + \":(\" + tokens.nextToken().trim() + \")\";\n\t\t\t}\n\t\t}\n\t\t// ������� �ϸ� temp�� �ϼ��� token���� �� ���ִ�.\n\t\t\n\t\tString query = \"\";\n\t\tif (hasAnd) { //And�� ���\n\t\t\tfor (int i = 0; i < howMany; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\tquery = query.concat(\" and \"); // �� ó���� and ������ �ȵȴ�.\n\t\t\t\t}\n\t\t\t\tquery = query.concat(temp[i]);\n\t\t\t}\n\t\t} else if (hasOr) { //or�� ���\n\t\t\tfor (int i = 0; i < howMany; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\tquery = query.concat(\" or \"); // �� ó���� and ������ �ȵȴ�.\n\t\t\t\t}\n\t\t\t\tquery = query.concat(temp[i]);\n\t\t\t}\n\t\t} else { //������ ���� ���\n\t\t\tquery = query.concat(temp[0]);\n\t\t}\n\t\n\t\t\n\n\t\t\n\t\t\n\t\ttry {\n\t\t\tquery= URLEncoder.encode(query, \"UTF-8\");\n\t\t\t// encoding�ؼ� query�� ����\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t//output file�� urlhead �����ϰ�\n\t\toutput = new String(url_head);\n\t\t\n\t\toutput = output.concat(query);\n\t\toutput = output.concat(url_tail);\n\t\t\n\t\t\t\n\t\toutput = output.replaceAll(\" \", \" \");\n\t\t//������ �ι����ٸ� �ٿ��ش�.\n\t\t\n\t\t\n\t\t\n\n\t\tNTISDataParser parser = new NTISDataParser();\n\t\tList<ResultModel> list = parser.getNtisData(output);\n\t\t\n\t\tfor(ResultModel m : list) {\n\t\t\tSystem.out.println(m.getManager());\n\t\t}\n\t\t\n\t}",
"private void readInput(char[] inputArr) {\n\n\t\tfor (char c : inputArr) {\n\t\t\tcheckChar(Character.toString(c));\n\n\t\t\tSystem.out.println(\"==I=N=P=U=T============\");\n\t\t\tSystem.out.println(c);\n\t\t\tSystem.out.println(\"===Q=U=E=U=E===========\");\n\t\t\tSystem.out.println(queue.toString());\n\t\t\tSystem.out.println(\"====S=T=A=C=K==========\");\n\t\t\tSystem.out.println(stack.toString());\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test067() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[6];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(6, javaCharStream0.getEndColumn());\n }",
"private String filterValue(String value) {\n try {\n // First, filter out any non-ASCII characters.\n byte[] raw = value.getBytes(\"US-ASCII\");\n String ascii = new String(raw, \"US-ASCII\");\n \n // Make sure there's no newlines\n ascii = ascii.replace('\\n', ' ');\n \n return ascii;\n } catch(UnsupportedEncodingException e) {\n // should never happen\n throw new RuntimeException(\"Missing ASCII encoding\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test154() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Q!@aV0Ak~pvq\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(4, javaCharStream0.bufpos);\n assertEquals(7, javaCharStream0.getEndColumn());\n }",
"@Test(timeout = 4000)\n public void test137() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F83|i5vU 84Kd\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 887, 887);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(3, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(890, javaCharStream0.getColumn());\n }",
"public boolean canUseCharArrays()\n/* */ {\n/* 405 */ return true;\n/* */ }",
"@Test(timeout = 4000)\n public void test072() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=<D!T!tLp\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n stringReader0.read();\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"<\", token0.toString());\n }",
"@Test\n public void testToChar() {\n Object[][] datas = new Object[][]{\n {1, '1'},\n {5, '5'},\n {10, 'A'},\n {11, 'B'},\n {12, 'C'},\n {13, 'D'},\n {14, 'E'},\n {15, 'F'}\n };\n for (Object[] data : datas) {\n char result = Tools.toChar((Integer) data[0]);\n char expResult = (Character) data[1];\n assertEquals(result, expResult);\n System.out.println(\"testToChar()\");\n }\n }",
"@Test(timeout = 4000)\n public void test088() throws Throwable {\n StringReader stringReader0 = new StringReader(\"c3UZts4z!|a\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 21, 47);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(9, javaCharStream0.bufpos);\n assertEquals(30, javaCharStream0.getEndColumn());\n }",
"@Test(timeout = 4000)\n public void test108() throws Throwable {\n StringReader stringReader0 = new StringReader(\"^z{b>wblu8^IJ+?\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 47, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(47, javaCharStream0.getColumn());\n }",
"@Override\n\tpublic String input() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String input() throws Exception {\n\t\treturn null;\n\t}",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString xStringA = scan.next() + \"111111\";\n\t\tchar[] xCharA = xStringA.toCharArray();\n\t\tString[] xAlpha = new String[26];\n\t\txAlpha[0]=\"a\";\n\t\txAlpha[1]=\"B\";\n\t\txAlpha[2]=\"C\";\n\t\txAlpha[3]=\"D\";\n\t\txAlpha[4]=\"E\";\n\t\txAlpha[5]=\"F\";\n\t\txAlpha[6]=\"G\";\n\t\txAlpha[7]=\"H\";\n\t\txAlpha[8]=\"I\";\n\t\txAlpha[9]=\"J\";\n\t\txAlpha[10]=\"K\";\n\t\txAlpha[11]=\"L\";\n\t\txAlpha[12]=\"M\";\n\t\txAlpha[13]=\"N\";\n\t\txAlpha[14]=\"O\";\n\t\txAlpha[15]=\"P\";\n\t\txAlpha[16]=\"Q\";\n\t\txAlpha[17]=\"R\";\n\t\txAlpha[18]=\"S\";\n\t\txAlpha[19]=\"T\";\n\t\txAlpha[20]=\"U\";\n\t\txAlpha[21]=\"V\";\n\t\txAlpha[22]=\"W\";\n\t\txAlpha[23]=\"X\";\n\t\txAlpha[24]=\"Y\";\n\t\txAlpha[25]=\"Z\";\n\t\t\n\t\t\n\t\tchar one = xStringA.charAt(0);\n\t\tchar two = xStringA.charAt(1);\n\t\tchar three = xStringA.charAt(2);\n\t\tchar four = xStringA.charAt(3);\n\t\tchar five = xStringA.charAt(4);\n\t\tchar six = xStringA.charAt(5);\n\n\t\tString sOne = Character.toString(one);\n\t\tString sTwo = Character.toString(two);\n\t\tString sThree = Character.toString(three);\n\t\tString sFour = Character.toString(four);\n\t\tString sFive = Character.toString(five);\n\t\tString sSix = Character.toString(six);\n\t/*\t\n\t\tSystem.out.println(sOne);\n\t\tSystem.out.println(sTwo);\n\t\tSystem.out.println(sThree);\n\t\tSystem.out.println(sFour);\n\t\tSystem.out.println(sFive);\n\t\tSystem.out.println(sSix);\n\t*/\n\t\t\n\t\tfor (int i = 0; i < 26 ; i++) {\n\t\t\tif (sOne != xAlpha[i]) {\n\t\t\t\tint oneVar = 1;\n\t\t\t\toneVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sOne + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(oneVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar1\");\n\t\t\t}\n\t\t\t\n\t\t\tif (sTwo != xAlpha[i]) {\n\t\t\t\tint twoVar = 2;\n\t\t\t\ttwoVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sTwo + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(twoVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar2\");\n\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}",
"public static int Main()\n\t{\n\t\tint n;\n\t\tString a = new String(new char[81]); //?????a??\n//C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged:\n\t\tchar * p;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tSystem.in.read(); //?????\n\t\twhile (n-- != 0) //??n???\n\t\t{\n\t\t\ta = new Scanner(System.in).nextLine(); //??????\n\t\t\tp = a; //??????\n\t\t\tif (*p != '_' && (*p > 'z' || *p < 'a') && (*p>'Z' || *p < 'A')) //???????????\n\t\t\t{\n\t\t\t\tSystem.out.print('0');\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\tcontinue; //????\n\t\t\t}\n\t\t\tfor (p = a.Substring(1); * p != '\\0';p++) //??'\\0'??\n\t\t\t{\n\t\t\t\tif (*p != '_' && (*p > 'z' || *p < 'a') && (*p>'9' || *p < '0') && (*p>'Z' || *p < 'A')) //??????????????\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print('0');\n\t\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\t\tbreak; //????\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (*p == '\\0') //?????????\n\t\t\t{\n\t\t\t\tSystem.out.print('1');\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"@Test(timeout = 4000)\n public void test122() throws Throwable {\n StringReader stringReader0 = new StringReader(\"[dfm,AL#MUTe;f\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"L\", token0.toString());\n assertEquals(74, token0.kind);\n }",
"@Test(timeout = 4000)\n public void test135() throws Throwable {\n StringReader stringReader0 = new StringReader(\"]X%^)tJ\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0);\n char char0 = javaCharStream0.ReadByte();\n assertEquals((-1), javaCharStream0.bufpos);\n assertEquals(']', char0);\n }",
"@Test(timeout = 4000)\n public void test086() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~:}LC@A$L'2q+~$ja\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(90, token0.kind);\n }",
"@Test(timeout = 4000)\n public void test136() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~:}LC@A$L'2q+~$ja\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n stringReader0.read();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\":\", token0.toString());\n }",
"@Override\n public boolean isUnicode()\n {\n return true;\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n StringReader stringReader0 = new StringReader(\"q,rv8PAfKjbSw`H(r\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-3465), (-2086));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"q\", token0.toString());\n assertEquals(74, token0.kind);\n }",
"@Test\n\tpublic void test_ReadUtf8String_bad_data() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, 'A', 0);\n\t\tassertEquals(\"\\ufffdA\" /* unicode replacement char, 'A'*/, br.readUtf8String(0));\n\t}",
"public abstract void mo2157b(CharSequence charSequence);",
"public abstract String read_string();",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.adjustBeginLineColumn(122, 122);\n int int0 = javaCharStream0.getBeginColumn();\n assertEquals(122, int0);\n }",
"@Override\n public String convertedText() {\n\n String input = mStringInputEditText.getText().toString();\n if (input.length() != 0) {\n String hexCode = String.format(\"%x\", new BigInteger(1, input.getBytes()));\n return mCheckBox.isChecked() ? hexCode.replaceAll(\"..(?!$)\", \"$0 \") : hexCode;\n } else {\n return \"\";\n }\n }",
"public void testAlgorithmSpecific() {\n TestData.chars(\"x y z\", \"xX Zz\")\n ._______Def_(\" - \", \" - - \")\n .____Ignore_(\" - \", \" -------- \")\n .all();\n }",
"static void getToken() throws IOException{\n curr_char = pbIn.read();\n getNonBlank();\n lookUp();\n }",
"@Test(timeout = 4000)\n public void test011() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Gnzd86`;Gs=\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 14, 14, 14);\n javaCharStream0.nextCharInd = 14;\n char char0 = javaCharStream0.BeginToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('\\u0000', char0);\n }",
"@Test(timeout = 4000)\n public void test065() throws Throwable {\n StringReader stringReader0 = new StringReader(\"Cf&9B{tMCu\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(4, javaCharStream0.getColumn());\n }",
"@Test(timeout = 4000)\n public void test121() throws Throwable {\n StringReader stringReader0 = new StringReader(\"WA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[8];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(\"MV5G\", token0.toString());\n }",
"@Test(timeout = 4000)\n public void test080() throws Throwable {\n StringReader stringReader0 = new StringReader(\"c3UZts4z!|a\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 21, 47);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(23, javaCharStream0.getColumn());\n }",
"@Test(timeout = 4000)\n public void test114() throws Throwable {\n StringReader stringReader0 = new StringReader(\"WA.W2e9@MV5G\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getColumn());\n }",
"@Test\n\tpublic void test_ReadNextUtf8String() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, -107, -61, -65, 0, -22, -87, -107, 0);\n\t\tassertEquals(\"\\uaa55\\u00ff\", br.readNextUtf8String());\n\t\tassertEquals(\"\\uaa55\", br.readNextUtf8String());\n\t}",
"@Test(timeout = 4000)\n public void test117() throws Throwable {\n StringReader stringReader0 = new StringReader(\"XlJO@=TH|\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 124, 1);\n char[] charArray0 = new char[6];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getEndColumn());\n }",
"@Test(timeout = 4000)\n public void test097() throws Throwable {\n StringReader stringReader0 = new StringReader(\"oh\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 89, 1);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(2, javaCharStream0.getColumn());\n }",
"@Test(timeout = 4000)\n public void test016() throws Throwable {\n StringReader stringReader0 = new StringReader(\"7o9?>+o`*qi$\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char char0 = javaCharStream0.readChar();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals('7', char0);\n }",
"private char processChar(char r11) {\n /*\n // Method dump skipped, instructions count: 152\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.adobe.xmp.impl.FixASCIIControlsReader.processChar(char):char\");\n }",
"@Test(timeout = 4000)\n public void test137() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null);\n PipedInputStream pipedInputStream0 = new PipedInputStream();\n javaCharStream0.ReInit((InputStream) pipedInputStream0, 122, 122);\n assertEquals((-1), javaCharStream0.bufpos);\n }",
"@Test(timeout = 4000)\n public void test062() throws Throwable {\n StringReader stringReader0 = new StringReader(\"b|}T=mM,PuM8AP|}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 0, 0);\n char char0 = javaCharStream0.BeginToken();\n assertEquals('b', char0);\n \n int int0 = javaCharStream0.getEndLine();\n assertEquals(10, javaCharStream0.getBeginLine());\n assertEquals(10, int0);\n assertEquals(0, javaCharStream0.getColumn());\n }",
"public static void main(String[] args) {\n\t\t TextInput input = new NumericInput();\n\t\t input.add('1');\n\t\t input.add('a');\n\t\t input.add('0');\n\t\t System.out.println(input.getValue());\n\n}",
"@Test(timeout = 4000)\n public void test022() throws Throwable {\n byte[] byteArray0 = new byte[2];\n byteArray0[0] = (byte)48;\n byteArray0[1] = (byte)48;\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n JavaCharStream javaCharStream0 = new JavaCharStream(byteArrayInputStream0, 102, (byte)84, (byte)48);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(85, javaCharStream0.getEndColumn());\n }",
"@Test(timeout = 4000)\n public void test073() throws Throwable {\n StringReader stringReader0 = new StringReader(\"anBz*^T>\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n stringReader0.read();\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals(3, javaCharStream0.getEndColumn());\n }",
"@Test(timeout = 4000)\n public void test046() throws Throwable {\n StringReader stringReader0 = new StringReader(\".wa]!^8?,%1IG\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(85, token0.kind);\n }",
"public static boolean isAsciiControl(char ch) {\n/* 441 */ return (ch < ' ' || ch == '');\n/* */ }",
"String readString();",
"protected java.lang.String readNum() throws java.io.IOException {\n char c = readCharWord();\n java.lang.StringBuilder result = new java.lang.StringBuilder();\n if (c!='-' && !java.lang.Character.isDigit(c))\n throw error();\n do {\n result.append(c);\n c = next();\n } while (java.lang.Character.isDigit(c));\n return result.toString();\n }",
"@Test(timeout = 4000)\n public void test116() throws Throwable {\n StringReader stringReader0 = new StringReader(\"U3kE.1/hk@Tuvel]`L\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }"
] | [
"0.6446954",
"0.62292933",
"0.61711824",
"0.59582084",
"0.5951612",
"0.59379715",
"0.5906261",
"0.5815829",
"0.5785889",
"0.57521677",
"0.5738557",
"0.57267356",
"0.5716099",
"0.5702226",
"0.5660068",
"0.5653789",
"0.5650589",
"0.5645895",
"0.5644456",
"0.5639252",
"0.5626065",
"0.5625215",
"0.56075054",
"0.5587799",
"0.5586499",
"0.5585168",
"0.557119",
"0.5564821",
"0.55619687",
"0.55585194",
"0.55558664",
"0.55536634",
"0.5548566",
"0.55463284",
"0.5542929",
"0.5539611",
"0.55383724",
"0.55230516",
"0.5521228",
"0.5517994",
"0.55167395",
"0.55156636",
"0.55136335",
"0.55117774",
"0.5511635",
"0.55104595",
"0.55088013",
"0.5506439",
"0.55019546",
"0.5501683",
"0.5497362",
"0.54904914",
"0.5489351",
"0.54869884",
"0.5486771",
"0.5484482",
"0.5484052",
"0.5483537",
"0.5478716",
"0.5477384",
"0.54721993",
"0.5470498",
"0.5461184",
"0.54603153",
"0.54603153",
"0.5459224",
"0.5457234",
"0.5456216",
"0.5454175",
"0.545226",
"0.5447391",
"0.5438791",
"0.5436642",
"0.5435415",
"0.54316294",
"0.54291105",
"0.5428591",
"0.54258674",
"0.54222673",
"0.54111123",
"0.5409458",
"0.54068804",
"0.5400752",
"0.53976005",
"0.53973734",
"0.53936714",
"0.5391402",
"0.53875935",
"0.5383934",
"0.5383232",
"0.5376215",
"0.5375822",
"0.5375374",
"0.53740746",
"0.53699887",
"0.53684694",
"0.53676057",
"0.5367346",
"0.5366883",
"0.53660613",
"0.536399"
] | 0.0 | -1 |
Methods: Getter method for the COM property "Application" | @DISPID(1000) //= 0x3e8. The runtime will prefer the VTID if present
@VTID(7)
word._Application application(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@VTID(12)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject getApplication();",
"@DISPID(148)\n @PropGet\n excel._Application getApplication();",
"@DISPID(148)\n @PropGet\n com.exceljava.com4j.excel._Application getApplication();",
"public String getApplication() {\r\n\t\treturn application;\r\n\t}",
"public String getApplication() {\r\n return application;\r\n }",
"@VTID(7)\r\n excel._Application getApplication();",
"Application getApplication();",
"public TApplication getApplication() {\n return window.getApplication();\n }",
"@VTID(7)\n com.exceljava.com4j.excel._Application getApplication();",
"@VTID(7)\n com.exceljava.com4j.excel._Application getApplication();",
"@VTID(7)\n com.exceljava.com4j.excel._Application getApplication();",
"@VTID(7)\n com.exceljava.com4j.excel._Application getApplication();",
"@VTID(7)\n excel._Application getApplication();",
"public Application getApplication() {\n return (Application)this.getSource();\n }",
"protected Application getApplication() {\r\n\t\treturn application;\r\n\t}",
"public com.atomgraph.linkeddatahub.apps.model.Application getApplication()\n {\n return (com.atomgraph.linkeddatahub.apps.model.Application)getContainerRequestContext().getProperty(LAPP.Application.getURI());\n }",
"public Application getApp() {\n\t\treturn app;\n\t}",
"@DISPID(1610743808) //= 0x60020000. The runtime will prefer the VTID if present\r\n @VTID(7)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject application();",
"public SmartApplication getSmartApplication() {\r\n\t\treturn application;\r\n\t}",
"public static MIDLetParamsApp getApplication() {\n return Application.getInstance(MIDLetParamsApp.class);\n }",
"protected ApplicationComponent getApplicationComponent() {\n return ((MainApp) getApplication()).getApplicationComponent();\n }",
"public MauiApplication getApplication ()\n\t{\n\t\treturn application;\n\t}",
"public Optional<ApplicationVersion> application() { return application; }",
"public String getApp();",
"public int getApplication() {\n\treturn com.hps.july.constants.Applications.DICTIONARY;\n}",
"public String getApplicationName() {\n return applicationName;\n }",
"@Override\n\tpublic String getApp() {\n\t\tthrow new UnsupportedOperationException(\"Not supported yet.\");\n\t}",
"public String getApplicationName() {\r\n\t\treturn applicationName;\r\n\t}",
"public java.lang.String getApplicationID() {\r\n return applicationID;\r\n }",
"public String getApplicationdata() {\r\n return applicationdata;\r\n }",
"public static Application getApp() {\n if (sApplication != null) return sApplication;\n throw new NullPointerException(\"u should init first\");\n }",
"public ApplicationInfo getApplicationInfo() {\n return null;\n }",
"@Key(\"application.component\")\n\tString applicationComponent();",
"public org.thethingsnetwork.management.proto.HandlerOuterClass.Application getApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);",
"public Vector getApplicationProperties() {\n return appProperties;\n }",
"@DISPID(3) //= 0x3. The runtime will prefer the VTID if present\r\n @VTID(7)\r\n visiotool.IVApplication application();",
"public String getApplicationID() {\n return applicationID;\n }",
"public BuilderApplication getApp() {\n\t\treturn app;\n\t}",
"public static ApplicationComponent component() {\n return instance().applicationComponent;\n }",
"AdminApplication getApplication();",
"public String getAppName( )\n\t{\n\t\treturn appName;\n\t}",
"public java.lang.String getApplicationId() {\r\n return applicationId;\r\n }",
"public String getAppName() {\n\t\treturn appName;\n\t}",
"public String getAppName();",
"public static ApplicationBase getApplication()\r\n {\r\n if (instance == null)\r\n {\r\n throw new IllegalStateException(\"Micgwaf was not (yet) initialized correctly: no instance of Application is known.\");\r\n }\r\n return instance;\r\n }",
"public String getApplicationPresentation() {\n\t\treturn this.getApplicationName() + \" \" + this.getVersion();\n\t}",
"public static Application getApp() {\n if (sApplication != null) {\n return sApplication;\n }\n Application app = getApplicationByReflect();\n init(app);\n return app;\n }",
"@Nullable\n Application getApplication(String name);",
"public OSPApplication getOSPApp();",
"public String getAppCode()\n\t{\n\t\treturn appCode;\n\t}",
"abstract public String getApplicationName();",
"public List<Application> getApplications()\n {\n return _apps;\n }",
"public static Application getInstance(){\n\t\treturn getInstance (null);\n\t}",
"public IMApplicationInfo getIMApplicationInfo(){\n\t\treturn this.getApplicationContextFactory().getApplicationContext().getRequestContext().getIMApplicationInfo();\n\t}",
"public String getProducerApplication();",
"public static App getInstance() {\n return applicationInstance;\n }",
"public final String getAppName( )\n\t{\n\t\treturn this.data.getString( \"applicationName\" );\n\t}",
"public int getApplications() {\r\n return applications;\r\n }",
"public static InteractiveApp getApp() {\n return (InteractiveApp) ApplicationInstance.getActive();\n }",
"public String getAppId()\r\n {\r\n return getSemanticObject().getProperty(data_appId);\r\n }",
"public void setApplication(AppW app) {\n\t\tthis.app = app;\n\t}",
"public Application getOwningApplication()\r\n\t{\r\n\t\treturn owningApplication;\r\n\t}",
"public String getApplicationPath()\n {\n return getApplicationPath(false);\n }",
"public void setApplication(String application) {\r\n this.application = application;\r\n }",
"public String getApplicationTitle() {\n return applicationTitle.get();\n }",
"public String getTozApplicationName() {\n return (tozApplicationName);\n }",
"java.lang.String getAppName();",
"java.lang.String getAppName();",
"java.lang.String getAppName();",
"@AutoEscape\n\tpublic String getAppName();",
"public Boolean applicationMap() {\n return this.applicationMap;\n }",
"public ApplicationInfo getApplicationInfo() {\n return getActivityInfo().applicationInfo;\n }",
"public static FFTApp getApplication() {\n return Application.getInstance(FFTApp.class);\n }",
"public static BlaiseGraphicsTestApp getApplication() {\n return Application.getInstance(BlaiseGraphicsTestApp.class);\n }",
"public void setApplication(String application) {\r\n\t\tthis.application = application;\r\n\t}",
"public static String getAppName(){\r\n return getProperty(\"name\", \"Jin\");\r\n }",
"public ApplicationVersion getApplicationVersion() {\n\t\treturn applicationVersion;\n\t}",
"public static GretellaApp getApplication() {\n return Application.getInstance(GretellaApp.class);\n }",
"String getComponentAppId();",
"public String getAppID() {\n return appID;\n }",
"public static ApplicationOptions getOptions (){\n\t\treturn _applicationOptions;\n\t}",
"public void setApp(PR1 application){\n this.application = application;\n }",
"public List<Application> getVisibleApplications() {\n return null;\r\n }",
"public String getPortletApplicationName() {\n if(this.portletID != null) {\n return portletID.getPortletApplicationName();\n }\n return null;\n }",
"@OAMany(toClass = Application.class, reverseName = Application.P_ApplicationType, createMethod = false)\n\tprivate Hub<Application> getApplications() {\n\t\treturn null;\n\t}",
"public java.lang.String getAppName() {\n java.lang.Object ref = appName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n appName_ = s;\n return s;\n }\n }",
"public java.lang.String getAppName() {\n java.lang.Object ref = appName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n appName_ = s;\n return s;\n }\n }",
"public String getAppExt1() {\n return appExt1;\n }",
"@XmlElement(required = true)\n public List<Application> getApplications() {\n return applications;\n }",
"@Override\n\tpublic String getAppId() {\n\t\treturn app.getAppId();\n\t}",
"@Override\r\n//\tpublic Application getModel() {\r\n//\n//\t\treturn application;\r\n//\t}\r\n\t\r\n\tpublic Application getModel() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn application;\r\n\t}",
"public String getApplicationName() {\n\t\treturn this.properties.getProperty(SoundLooperProperties.KEY_APPLICATION_NAME, \"UNKNOW\");\n\t}",
"public java.lang.String getAppName() {\n java.lang.Object ref = appName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n appName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAppName() {\n java.lang.Object ref = appName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n appName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getAppName() {\n java.lang.Object ref = appName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n appName_ = s;\n return s;\n }\n }",
"@Override\n\tpublic java.lang.String getAppType() {\n\t\treturn _scienceApp.getAppType();\n\t}",
"public Object getApplication(String attibuteName) {\n return servletRequest.getServletContext().getAttribute(attibuteName);\n }",
"public java.lang.String getAppName() {\n java.lang.Object ref = appName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n appName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public void setApp(Main application) { this.application = application;}"
] | [
"0.8436414",
"0.7911141",
"0.7875809",
"0.78544605",
"0.78495836",
"0.778835",
"0.7618604",
"0.75866824",
"0.7549122",
"0.7549122",
"0.7549122",
"0.7549122",
"0.75064427",
"0.7501411",
"0.74937034",
"0.74443465",
"0.7432374",
"0.7196444",
"0.7090742",
"0.7086743",
"0.7028636",
"0.7010568",
"0.6944256",
"0.6808046",
"0.68071246",
"0.6775492",
"0.67642",
"0.67097855",
"0.6670274",
"0.66279304",
"0.6612744",
"0.656204",
"0.65345377",
"0.6516197",
"0.64964217",
"0.6485926",
"0.6479877",
"0.6441389",
"0.64199364",
"0.64124876",
"0.64118755",
"0.63325584",
"0.6332204",
"0.6293119",
"0.62667686",
"0.6247328",
"0.6222915",
"0.62157106",
"0.6214718",
"0.62131906",
"0.62014705",
"0.62000114",
"0.6188097",
"0.6177318",
"0.6161842",
"0.6152456",
"0.6135415",
"0.6112317",
"0.60903925",
"0.60643315",
"0.60571074",
"0.60528886",
"0.6045476",
"0.60450596",
"0.6043548",
"0.6043374",
"0.60101706",
"0.60101706",
"0.60101706",
"0.5994046",
"0.5993552",
"0.59918463",
"0.59840184",
"0.597488",
"0.59541994",
"0.5952701",
"0.59475684",
"0.59431845",
"0.5905022",
"0.58939874",
"0.58893126",
"0.58883834",
"0.5875077",
"0.5874958",
"0.58744717",
"0.58700544",
"0.58700544",
"0.5868746",
"0.5867865",
"0.58655155",
"0.58611816",
"0.5859402",
"0.5857876",
"0.5857876",
"0.5856446",
"0.58558667",
"0.58546317",
"0.5838231",
"0.5835419"
] | 0.72774047 | 17 |
Getter method for the COM property "Creator" | @DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present
@VTID(8)
int creator(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCreator() {\n return getProperty(Property.CREATOR);\n }",
"public String getCreator()\n\t{\n\t\treturn null;\n\t}",
"public String getCreator() {\r\n return creator;\r\n }",
"public String getCreator() {\r\n return creator;\r\n }",
"public String getCreator() {\n return this.creator;\n }",
"public String getCreator() {\n\t\treturn creator;\n\t}",
"public String getCreator() {\n return creator;\n }",
"public String getCreator() {\n return creator;\n }",
"public String getCreator() {\n return creator;\n }",
"public String getCreator() {\n return creator;\n }",
"public String getCreator() {\n return creator;\n }",
"public String getCreator() {\n return creator;\n }",
"public String getCreator() {\n return creator;\n }",
"public String getCreator() {\n return creator;\n }",
"public String getCreator() {\n return creator;\n }",
"public abstract String getCreator();",
"@DISPID(149)\n @PropGet\n com.exceljava.com4j.excel.XlCreator getCreator();",
"@VTID(13)\r\n int getCreator();",
"@VTID(8)\r\n excel.XlCreator getCreator();",
"public java.lang.String getCreatorName() {\n return creatorName;\n }",
"public Integer getCreator() {\n return creator;\n }",
"public String getCreatorName() {\n return creatorName;\n }",
"public String getCreatorName() {\n return creatorName;\n }",
"public String getCreatorName() {\n return creatorName;\n }",
"@VTID(8)\n com.exceljava.com4j.excel.XlCreator getCreator();",
"@VTID(8)\n com.exceljava.com4j.excel.XlCreator getCreator();",
"@VTID(8)\n com.exceljava.com4j.excel.XlCreator getCreator();",
"@VTID(8)\n com.exceljava.com4j.excel.XlCreator getCreator();",
"public String getCreatorCode() {\n return creatorCode;\n }",
"@VTID(8)\n excel.XlCreator getCreator();",
"@DISPID(149)\n @PropGet\n excel.XlCreator getCreator();",
"public Long getCreator() {\n return creator;\n }",
"public String getCreatorGuid() {\n return creatorGuid;\n }",
"public String getCreatorId() {\n return this.CreatorId;\n }",
"public SystemUserBO getCreator()\n {\n if (_creator == null)\n {\n _creator = new SystemUserBO(_model.getCreator());\n }\n return _creator;\n }",
"public void setCreator(String creator) {\n this.creator = creator;\n }",
"public void setCreator(String creator) {\n this.creator = creator;\n }",
"public void setCreator(String creator) {\n this.creator = creator;\n }",
"public void setCreator(String creator) {\n this.creator = creator;\n }",
"public void setCreator(String creator) {\n this.creator = creator;\n }",
"public IIID getCreatorIID()\n throws ORIOException;",
"public String getCreatorId() {\n return creatorId;\n }",
"public String getCreatorId() {\n return creatorId;\n }",
"public java.lang.Integer getCreatorId() {\n return creatorId;\n }",
"public WhoAmI getCreatorID() {\r\n\t\treturn myCreatorId;\r\n\t}",
"public void setCreator(String creator) {\n\t\tthis.creator = creator;\n\t}",
"public void setCreator(Integer creator) {\n this.creator = creator;\n }",
"String getCreatorId();",
"public Date getCreatorDate() {\n return creatorDate;\n }",
"public User getCreator() {\n return this.creator;\n }",
"@Override\n protected String getCreatorDisplayName() {\n try {\n // DAV:creator-displayname -> use jcr:createBy if present.\n if (exists() && ((Node) item).hasProperty(Property.JCR_CREATED_BY)) {\n return ((Node) item).getProperty(Property.JCR_CREATED_BY).getString();\n }\n } catch (RepositoryException e) {\n log.warn(\"Error while accessing jcr:createdBy property\");\n }\n\n // fallback\n return super.getCreatorDisplayName();\n }",
"public String getCreatorAt(int i){\n return creator[i];\n }",
"public static boolean hasComponentCreator() {\n return sCreator != null;\n }",
"public void setCreator(String creator) {\r\n this.creator = creator == null ? null : creator.trim();\r\n }",
"public void setCreator(String creator) {\r\n this.creator = creator == null ? null : creator.trim();\r\n }",
"public void setCreator(String creator) {\n this.creator = creator == null ? null : creator.trim();\n }",
"public void setCreator(String creator) {\n this.creator = creator == null ? null : creator.trim();\n }",
"public void setCreator(String creator) {\n this.creator = creator == null ? null : creator.trim();\n }",
"public void setCreator(Long creator) {\n this.creator = creator;\n }",
"protected Creator getCreator(ObjectInformation objectInformation) {\n\n return getCreatorRegistry().getCreator(objectInformation.getClazz(), objectInformation.getField());\n }",
"public ParseUser getCreator() {\n try {\n return fetchIfNeeded().getParseUser(\"creator\");\n }\n catch(ParseException e) {\n Log.d(TAG, \"Error in retrieving the creator: \" + e);\n return null;\n }\n }",
"public IUser getCreatorObject()\n throws OculusException;",
"public void setCreatorName(String creatorName) {\n this.creatorName = creatorName;\n }",
"public void addCreator(String value) {\n/* 106 */ addStringToSeq(\"creator\", value);\n/* */ }",
"public String getClCreateBy() {\r\n\t\treturn clCreateBy;\r\n\t}",
"public static DesignViewCreatorForExternal getDefault() {\n\t\tif(creator == null){\n\t\t\tcreator = new DesignViewCreatorForExternal();\n\t\t\tversions = new Hashtable();\n\t\t}\n\t\treturn creator;\n\t}",
"public IBusinessObject setCreatorIID(IIID creator)\n throws ORIOException;",
"public String getCreater() {\n\t\treturn creater;\n\t}",
"public String getCreater() {\n\t\treturn creater;\n\t}",
"public String getCreateAuthor() {\n return createAuthor;\n }",
"public Calendar getCreationDate() throws IOException {\n/* 238 */ return getCOSObject().getDate(COSName.CREATION_DATE);\n/* */ }",
"public void setCreator(org.semanticwb.model.User value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swb_creator, value.getSemanticObject());\r\n }else\r\n {\r\n removeCreator();\r\n }\r\n }",
"public void setCreator(org.semanticwb.model.User value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swb_creator, value.getSemanticObject());\r\n }else\r\n {\r\n removeCreator();\r\n }\r\n }",
"public void setCreator(org.semanticwb.model.User value)\r\n {\r\n if(value!=null)\r\n {\r\n getSemanticObject().setObjectProperty(swb_creator, value.getSemanticObject());\r\n }else\r\n {\r\n removeCreator();\r\n }\r\n }",
"public void setCreatorGuid(String creatorGuid) {\n this.creatorGuid = creatorGuid;\n }",
"public void setCreatorName(java.lang.String creatorName) {\n this.creatorName = creatorName;\n }",
"public void setCreatorId(String CreatorId) {\n this.CreatorId = CreatorId;\n }",
"@Override\r\n\tpublic String creatorType() {\n\t\treturn \"ShapeViewer\";\r\n\t}",
"public String getCreatorEncodedString() {\n return Hexadecimal.valueOf(this._creatorCertSeq);\n }",
"public TypeSpecCreator getTSCreator() {\n\t\t\treturn this.TSCreator;\n\t\t}",
"public void removeCreator()\r\n {\r\n getSemanticObject().removeProperty(swb_creator);\r\n }",
"public void removeCreator()\r\n {\r\n getSemanticObject().removeProperty(swb_creator);\r\n }",
"public void removeCreator()\r\n {\r\n getSemanticObject().removeProperty(swb_creator);\r\n }",
"public boolean _checkIfCreatorPropertyBased(AnnotationIntrospector intr, AnnotatedWithParams creator, BeanPropertyDefinition propDef) {\n Mode mode = intr.findCreatorBinding(creator);\n if (mode == Mode.PROPERTIES) {\n return true;\n }\n if (mode == Mode.DELEGATING) {\n return false;\n }\n if ((propDef != null && propDef.isExplicitlyNamed()) || intr.findInjectableValueId(creator.getParameter(0)) != null) {\n return true;\n }\n if (propDef != null) {\n String implName = propDef.getName();\n if (implName != null && !implName.isEmpty() && propDef.couldSerialize()) {\n return true;\n }\n }\n return false;\n }",
"public String getCreateMethod() {\n\t\treturn createMethod;\n\t}",
"public String getCreater() {\r\n return creater;\r\n }",
"public String getCreater() {\n return creater;\n }",
"public String getCreater() {\n return creater;\n }",
"Builder addCreator(String value);",
"public java.util.Calendar getCreationDate() {\n return creationDate;\n }",
"private IInformationControlCreator getQuickAssistAssistantInformationControlCreator() {\n return new IInformationControlCreator() {\n @Override\n public IInformationControl createInformationControl(\n final Shell parent) {\n final String affordance = getAdditionalInfoAffordanceString();\n return new DefaultInformationControl(parent, affordance);\n }\n };\n }",
"U getCreateby();",
"public void setCreatorId(String creatorId) {\n this.creatorId = creatorId;\n }",
"public java.util.Calendar getCreated()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CREATED$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }",
"public void setCreatorDate(Date creatorDate) {\n this.creatorDate = creatorDate;\n }",
"public boolean isIsCreator() {\r\n if (ui.isIsUserAuthenticated() && recipe != null) {\r\n if(recipe.getCreator() == user)\r\n return true;\r\n else\r\n return false;\r\n } else {\r\n return false;\r\n }\r\n }",
"public Date getCreationDate() {\n\t\treturn this.creationDate;\n\t\t\n\t}",
"public Date getCreationDate()\r\n {\r\n return (m_creationDate);\r\n }",
"public Date getCreation() {\n return creation;\n }"
] | [
"0.81792843",
"0.78855383",
"0.7723479",
"0.7723479",
"0.76988494",
"0.7687096",
"0.76671296",
"0.76671296",
"0.76671296",
"0.76671296",
"0.76671296",
"0.76671296",
"0.76671296",
"0.76671296",
"0.76671296",
"0.7580854",
"0.74214125",
"0.73774475",
"0.7290068",
"0.7186391",
"0.71253204",
"0.709752",
"0.709752",
"0.709752",
"0.7060827",
"0.7060827",
"0.7060827",
"0.7060827",
"0.6977572",
"0.6966656",
"0.68885773",
"0.6816353",
"0.6776825",
"0.6756936",
"0.67480683",
"0.66890526",
"0.66662186",
"0.66662186",
"0.66662186",
"0.66662186",
"0.66556406",
"0.6588541",
"0.6588541",
"0.65847194",
"0.6581414",
"0.658037",
"0.63817906",
"0.63738",
"0.6356561",
"0.6336569",
"0.62421113",
"0.6166342",
"0.615484",
"0.61381805",
"0.61381805",
"0.613602",
"0.613602",
"0.613602",
"0.60535413",
"0.60366905",
"0.60176843",
"0.6014515",
"0.6005097",
"0.5983517",
"0.5944942",
"0.5904373",
"0.58726656",
"0.58604276",
"0.58604276",
"0.58545095",
"0.58407044",
"0.58354706",
"0.58354706",
"0.58354706",
"0.58287555",
"0.58162636",
"0.58031887",
"0.5784029",
"0.5739473",
"0.5706705",
"0.5695644",
"0.5695644",
"0.5695644",
"0.5632195",
"0.5619441",
"0.5591373",
"0.558419",
"0.558419",
"0.5578764",
"0.55735314",
"0.5546951",
"0.5545873",
"0.55422187",
"0.55386764",
"0.55320686",
"0.5529514",
"0.55292684",
"0.5521812",
"0.54965335"
] | 0.67691106 | 34 |
Getter method for the COM property "Parent" | @DISPID(1002) //= 0x3ea. The runtime will prefer the VTID if present
@VTID(9)
@ReturnValue(type=NativeType.Dispatch)
com4j.Com4jObject parent(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@VTID(9)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject getParent();",
"@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();",
"@DISPID(150)\n @PropGet\n com4j.Com4jObject getParent();",
"@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();",
"@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();",
"@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();",
"@VTID(9)\n @ReturnValue(type=NativeType.Dispatch)\n com4j.Com4jObject getParent();",
"public String getParent() {\n return _theParent;\n }",
"IGLProperty getParent();",
"public Object getParent() {\r\n return this.parent;\r\n }",
"public Object getParent() {\n return this.parent;\n }",
"public Object getParent() {\n return this.parent;\n }",
"public Object getParent() {\n return this.parent;\n }",
"public String getParent() {\n return _parent;\n }",
"public int Parent() { return this.Parent; }",
"public OwObject getParent()\r\n {\r\n return m_Parent;\r\n }",
"public Foo getParent() {\n return parent;\n }",
"public String getParent() {\r\n return this.parent;\r\n }",
"@DISPID(1610743809) //= 0x60020001. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n @ReturnValue(type=NativeType.Dispatch)\r\n com4j.Com4jObject parent();",
"public String getParent() {\r\n return parent;\r\n }",
"public String getParentName() {\n return getProperty(Property.PARENT_NAME);\n }",
"public String getParent() {\n return parent;\n }",
"public XMLPath getParent() {\r\n return this.parent == null ? null : this.parent.get();\r\n }",
"public PropertySelector getParent() {\n return parent;\n }",
"TMNodeModelComposite getParent() {\n return parent;\n }",
"Spring getParent() {\n return parent;\n }",
"public Instance getParent() {\r\n \t\treturn parent;\r\n \t}",
"public ILexComponent getParent();",
"public IPSComponent peekParent();",
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }",
"@VTID(7)\r\n void getParent();",
"final MenuContainer getParent_NoClientCode() {\n return parent;\n }",
"public CompositeObject getParent(\n )\n {return (parentLevel == null ? null : (CompositeObject)parentLevel.getCurrent());}",
"Object getParent();",
"UIComponent getParent();",
"public String getParentName() {\n return parentName;\n }",
"public String getParentName() {\n return parentName;\n }",
"public WidgetParent getParent() {\n return this.m_parent;\n }",
"public String getParentType() {\n return this.parentType;\n }",
"public int getParentID() {\n\t\treturn _parentID;\n\t}",
"public RMParentShape getParent() { return _parent; }",
"@JsProperty\n Element getParentElement();",
"public String getParentName() {\n\t\treturn parentName;\n\t}",
"public int getParentID() {\n\t\treturn parentID;\n\t}",
"@JsonProperty(\"parent\")\n @ApiModelProperty(value = \"The ID of the parent dialog node (if any).\")\n public String getParent() {\n return parent;\n }",
"public abstract Optional<TypeName> parent();",
"public IDirectory getParent() {\n return this.parent;\n }",
"public PafDimMember getParent() {\r\n\t\treturn parent;\r\n\t}",
"@DerivedProperty\n\tCtElement getParent() throws ParentNotInitializedException;",
"public Entity getParent() {\n return parent;\n }",
"protected Directory getParent() {\n return parent;\n }",
"public Integer getParentid() {\n\t\treturn parentid;\n\t}",
"@DISPID(-2147418104)\n @PropGet\n ms.html.IHTMLElement parentElement();",
"public VisualLexiconNode getParent() {\n \t\treturn parent;\n \t}",
"@NoProxy\n @NoWrap\n @NoDump\n public BwEvent getParent() {\n return parent;\n }",
"public com.vmware.converter.ManagedObjectReference getParentFolder() {\r\n return parentFolder;\r\n }",
"public XMLElement getParent()\n/* */ {\n/* 323 */ return this.parent;\n/* */ }",
"public Boolean getIsParent() {\n return isParent;\n }",
"public int getParentType() {\r\n return parent_type;\r\n }",
"public CUser getParent() {\n return this.parent;\n }",
"public Node getParent(){\n return parent;\n }",
"public Path getParent(\n ) {\n return this.parent;\n }",
"public CarrierShape parent()\n\t{\n\t\treturn parent;\n\t}",
"public final ShapeParent getShapeParent()\n {\n return parent;\n }",
"public PageTreeNode getParent() {\n return parent;\n }",
"public PartialSolution getParent() {\n return _parent;\n }",
"public Optional<Cause> getParent() {\n return this.parent;\n }",
"public String getParentLabel(){\n\t\treturn this.parentLabel;\n\t}",
"@DISPID(84)\r\n\t// = 0x54. The runtime will prefer the VTID if present\r\n\t@VTID(82)\r\n\tint parentID();",
"public E getParentEntity() {\n return parentEntity;\n }",
"public BinomialTree<KEY, ITEM> parent()\n\t{\n\t\treturn _parent;\n\t}",
"public IBuildObject getParent();",
"public Node getParent() {\n return parent;\n }",
"public Node getParent() {\n return parent;\n }",
"public int getParent_id() {\n return this.parent_id;\n }",
"public String getCodeParent() {\n\t\treturn codeParent;\n\t}",
"public String getParent() {\r\n return (String) getAttributeInternal(PARENT);\r\n }",
"public String getParentId() {\n return getParent() != null ? getParent().getId() : null;\n }",
"public PApplet getParent() {\n\t\treturn this.parent;\n\t}",
"public DrawingComposite getParent() {\n\t\treturn parent;\n\t}",
"public int getParent();",
"public Component getParentComponent() {\r\n\t\tif (parentComponent == null) {\r\n\t\t\tif (view != null)\r\n\t\t\t\tparentComponent = view.getComponent(parentComponentName);\r\n\t\t}\r\n\t\treturn parentComponent;\r\n\t}",
"public StructuredId getParent()\r\n {\r\n return parent;\r\n }",
"public Peak getParent() {\n\t\treturn parent;\n\t}",
"public long getParentCode() {\n return parentCode;\n }",
"public CoolBar getParent() {\n checkWidget();\n return parent;\n }",
"@XmlElement\n @Nullable\n public String getParentDocumentId() {\n return this.parentDocumentId;\n }",
"@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(58)\r\n\tint parentID();",
"public ConversionHelper getParent()\n {\n return parent;\n }",
"@JsProperty\n Node getParentNode();",
"public Node getParent() {\r\n\t\t\treturn parent;\r\n\t\t}",
"public Node getParent() {\r\n\t\t\treturn parent;\r\n\t\t}",
"void setParent(IGLProperty parent);",
"public Folder getParentFolder() {\n\t\treturn parentFolder;\n\t}",
"public Parent getVista() {\n\t\treturn null;\n\t}",
"public java.lang.String getContainingParentType() {\n return containingParentType;\n }",
"public java.lang.String getContainingParentType() {\n return containingParentType;\n }",
"public Resource getParent()\n {\n if(parent == null)\n {\n if(parentId != -1)\n {\n try\n {\n parent = new ResourceRef(coral.getStore().getResource(parentId), coral);\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"corrupted data parent resource #\"+parentId+\n \" does not exist\", e);\n }\n }\n else\n {\n parent = new ResourceRef(null, coral);\n }\n }\n try\n {\n return parent.get();\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"in-memory data incosistency\", e);\n }\n }",
"public AccessibleElement getParent();"
] | [
"0.81647867",
"0.81635064",
"0.81635064",
"0.8093195",
"0.8093195",
"0.8093195",
"0.8093195",
"0.7820495",
"0.77545613",
"0.7717162",
"0.76970285",
"0.76970285",
"0.76970285",
"0.7685946",
"0.7662928",
"0.76436096",
"0.76198393",
"0.7584784",
"0.75573677",
"0.75491166",
"0.7538418",
"0.74877375",
"0.74044925",
"0.7373006",
"0.7361728",
"0.7349786",
"0.7325064",
"0.732315",
"0.73226464",
"0.7321795",
"0.73211634",
"0.731258",
"0.73045754",
"0.7273923",
"0.72556615",
"0.72489965",
"0.7244335",
"0.7204559",
"0.7195084",
"0.7169685",
"0.7149787",
"0.71439976",
"0.71375763",
"0.7132675",
"0.71289986",
"0.71169823",
"0.71021616",
"0.71010566",
"0.70960593",
"0.7090904",
"0.7078354",
"0.70763105",
"0.7068518",
"0.70547646",
"0.70439255",
"0.703666",
"0.7032314",
"0.7029912",
"0.70214105",
"0.70091873",
"0.6988117",
"0.6970216",
"0.6966667",
"0.6960149",
"0.6957195",
"0.6939978",
"0.69274384",
"0.6927079",
"0.6920402",
"0.6917498",
"0.69169825",
"0.69083303",
"0.68984944",
"0.68984944",
"0.68984836",
"0.6893869",
"0.6893287",
"0.6890835",
"0.6890446",
"0.68868685",
"0.68859386",
"0.6876731",
"0.68731153",
"0.68720824",
"0.6863158",
"0.6850675",
"0.68491036",
"0.68477386",
"0.6847068",
"0.6817064",
"0.6810185",
"0.6810185",
"0.6802115",
"0.6801635",
"0.67873853",
"0.67871404",
"0.6786261",
"0.67846376",
"0.6782967"
] | 0.75643355 | 18 |
Getter method for the COM property "FavoriteService" | @DISPID(1003) //= 0x3eb. The runtime will prefer the VTID if present
@VTID(13)
java.lang.String favoriteService(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DISPID(1003) //= 0x3eb. The runtime will prefer the VTID if present\r\n @VTID(14)\r\n void favoriteService(\r\n java.lang.String prop);",
"public boolean isFavorite() {\n return isFavorite;\n }",
"public boolean isFavorite() {\n return isFavorite;\n }",
"@Override\n\tpublic boolean isFavorite() {\n\t\treturn this.isFavorite;\n\t}",
"public ServiceInfo getSelectedService() {\n return includedService;\n }",
"public PreferenceService getPreferenceService() {\n return preferenceService;\n }",
"public String getService(){\n\t\t return service;\n\t}",
"public BluetoothService getService() {\n return _service;\n }",
"public String getService() {\n return service;\n }",
"public String getService() {\n return service;\n }",
"public String getService() {\n return service;\n }",
"public String getService() {\n return this.service;\n }",
"public String getService() {\n return this.service;\n }",
"public String getService() {\n return this.service;\n }",
"public Object getService() {\n return service;\n }",
"public String getServiceName(){\n return serviceName;\n }",
"public String getServiceName()\r\n {\r\n return serviceName;\r\n }",
"public String getService() {\n\t\treturn service.get();\n\t}",
"public Class getServiceClass() { return serviceClass; }",
"public Vehicle getService(boolean service) {\n\t\tfor (int i = 0; i < vehicles.size(); i++) {\n\t\t\tVehicle temp = vehicles.get(i);\n\n\t\t\tif (temp.getService() == service) {\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public EPPService getService() {\n\t\treturn service;\n\t}",
"@JsonProperty(\"service\")\n public String getService() {\n return service;\n }",
"String getServiceRef();",
"public Integer getServiceType() {\r\n return serviceType;\r\n }",
"public String getServiceName()\n {\n return serviceName;\n }",
"public String getServiceName() {\r\n return this.serviceName;\r\n }",
"public AddFavouriteService() {\n super(\"AddFavouriteService\");\n }",
"public Class getServiceClass()\n {\n return serviceClass;\n }",
"public Service getService() {\n\t\treturn _service;\n\t}",
"@JsonIgnore public String getMealService() {\n return (String) getValue(\"mealService\");\n }",
"@Override\n\tpublic BaseServic<Banco> getService() {\n\t\treturn service;\n\t}",
"public boolean isFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\treturn mFavoritesCache.isFavoriteSong(getAudioId(),\n\t\t\t\t\t\tgetTrackHost());\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public PlaylistBusinessInterface getService() {\n\t\treturn service;\n\t}",
"private Service getService() {\n return service;\n }",
"public String getServiceName() {\n return serviceName;\n }",
"public String getServiceName()\n {\n return this.mServiceName;\n }",
"public String getServiceName() {\n return this.serviceName;\n }",
"private final StarService m75163p() {\n AbstractC32572g gVar = this.f53577b;\n AbstractC32607k kVar = f53576a[0];\n return (StarService) gVar.mo102348b();\n }",
"@Override\r\n\tpublic String getFortune() {\n\t\treturn service.getFortuneService();\r\n\t}",
"public IPreferencesService getPreferncesService() {\n\n return preferncesService;\n }",
"public Object getService(String serviceName);",
"public java.lang.CharSequence getService() {\n return service;\n }",
"public ServiceName getServiceName() {\n return serviceName;\n }",
"public void setFavorite(boolean favorite) {\n this.favorite = favorite;\n }",
"public interface FavoriteService extends IService<Favorite> {\n \n /**\n * 收藏\n * @param principal\n * @param param\n */\n void favorite(Principal principal, AddFavoriteRo param);\n \n /**\n * 取消收藏\n * @param principal\n * @param param\n */\n void unFavorite(Principal principal, UnFavoriteRo param);\n \n /**\n * 是否已经收藏\n * @param userId\n * @param postId\n * @return\n */\n boolean alreadyFavorite(Long userId, Long postId);\n}",
"public String getServiceName() {\n return this.serviceName;\n }",
"public String getServiceName();",
"public String getServiceName() {\n return serviceName;\n }",
"public YangString getServiceValue() throws JNCException {\n return (YangString)getValue(\"service\");\n }",
"public YangString getServiceValue() throws JNCException {\n return (YangString)getValue(\"service\");\n }",
"@Override\n\tpublic String getAnotherFortuneService() {\n\t\treturn null;\n\t}",
"public void setFavorite(boolean favorite) {\n isFavorite = favorite;\n }",
"public int getServiceID() {\n return serviceID;\n }",
"public java.lang.String getServiceClass() {\n return serviceClass;\n }",
"public java.lang.CharSequence getService() {\n return service;\n }",
"public String getNomService() {\r\n\t\treturn nomService;\r\n\t}",
"public ID getServiceID() {\n\treturn serviceID;\n }",
"public abstract String getServiceName();",
"@Override\n public ServiceID getServiceID() {\n\treturn servID;\n }",
"BLEService getService() {\n return BLEService.this;\n }",
"public com.sohlman.liferay.foobar.service.FooService getFooService() {\n return fooService;\n }",
"public synchronized BluetoothService getBluetoothService(){\n\t\treturn bluetoothService;\n\t}",
"public Reference serviceProvider() {\n return getObject(Reference.class, FhirPropertyNames.PROPERTY_SERVICE_PROVIDER);\n }",
"@Transient\n\tpublic String getServiceId()\t{\n\t\treturn mServiceId;\n\t\t//else return \"N/A\";\n\t}",
"FlashLightService getService() {\n\t return FlashLightService.this; \n\t }",
"public Queue<SongEntry> getFavoritePL() {\r\n return favoritePL;\r\n }",
"public ReferenceService getReferenceService(){\n\t\treturn this.referenceService;\n\t}",
"public AbstractService getService() {\n return service;\n }",
"public Text getService() {\n return service;\n }",
"public java.lang.String getServiceName(){\n return localServiceName;\n }",
"java.lang.String getServiceName();",
"java.lang.String getServiceName();",
"private static String[] getServiceFacades() {\n\t\tString[] facadePropertiesList = null;\n\t\ttry {\n\t\t\tfacadePropertiesList = ATUIUtils.getDefault().getString(ATUI_SERVICES_FACADE_LIST).trim().split(COMMA);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn facadePropertiesList;\n\t}",
"@Override\n\tpublic void setFavorite(boolean value) {\n\t\tthis.isFavorite = value;\n\t}",
"@Override\n protected ProdutoServicoImpl getservice() {\n return produtoService;\n }",
"public interface Favorite {\n boolean get(String id);\n boolean toggle(String id);\n}",
"public interface IFavoriteService {\n\n\tList<Favorite> getFavorites();\n\n\tList<Favorite> getFavoritesByGenre(GenreType genreType);\n\n\tList<Favorite> getFavoritesByParent(FavoriteCategory parent);\n\n\tList<Favorite> getFavoritesByParentId(int parentId);\n\n\tList<Favorite> getFavoritesByRate(int rate);\n\n\tList<Favorite> getFavoritesByBackupStatus(boolean isBackup);\n\n\tList<Favorite> getFavoritesByModifyStatus(boolean isModified);\n\n\tint getFavoriteCountInRate(int rate);\n\n\tint getFavoriteCountInCategory(int parentId);\n\n\tvoid delete(Favorite favorite);\n\n\tvoid delete(List<Favorite> favorites);\n\n\tvoid update(Favorite favorite);\n\n\tvoid update(List<Favorite> favorites);\n\n\tvoid insert(Favorite favorite);\n\n\tvoid insert(List<Favorite> favorites);\n\n\tList<FavoriteCategory> getFavoriteCategories();\n\n\tList<FavoriteCategory> getFavoriteCategoriesByRate(int rate);\n\n\tList<FavoriteCategory> getFavoriteCategoriesByBackupStatus(boolean isBackup);\n\n\tList<FavoriteCategory> getFavoriteCategoriesByModifyStatus(boolean isModified);\n\n\tvoid insertCategory(FavoriteCategory category);\n\n\tvoid insertCategory(List<FavoriteCategory> categories);\n\n\tvoid updateCategory(FavoriteCategory category);\n\n\tvoid updateCategories(List<FavoriteCategory> categories);\n\n\tvoid deleteCategory(FavoriteCategory category);\n\n\tvoid deleteCategories(List<FavoriteCategory> categories);\n}",
"@Override\n\tpublic java.lang.String getOSGiServiceIdentifier() {\n\t\treturn _clipLocalService.getOSGiServiceIdentifier();\n\t}",
"java.lang.String getService();",
"java.lang.String getService();",
"java.lang.String getService();",
"public static String getServiceName() {\n\t\treturn serviceName;\n\t}",
"public static String getServiceName() {\n\t\treturn serviceName;\n\t}",
"@Override\n\tpublic String getFruit() {\n\t\treturn \"Orange\";\n\t}",
"public String getService_category() {\r\n return service_category;\r\n }",
"public Integer getServiceid() {\r\n return serviceid;\r\n }",
"public String getTypeOfService(){\n\treturn typeOfService;\n}",
"public java.lang.String getService() {\n java.lang.Object ref = service_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n service_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getService() {\n java.lang.Object ref = service_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n service_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getService() {\n java.lang.Object ref = service_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n service_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"private com.hps.july.trailcom.beans.OpticalHop ejbRef() throws java.rmi.RemoteException {\n if ( ejbRef == null )\n return null;\n if ( __ejbRef == null )\n __ejbRef = (com.hps.july.trailcom.beans.OpticalHop) PortableRemoteObject.narrow(ejbRef, com.hps.july.trailcom.beans.OpticalHop.class);\n\n return __ejbRef;\n }",
"public java.lang.String getServiceBook () {\r\n\t\treturn serviceBook;\r\n\t}",
"Object getService(String serviceName);",
"public String getServiceDescription()\n {\n return serviceDescription;\n }",
"public ServiceCombo getServices()\n {\n return services;\n }",
"@Override\n public ServiceItem getServiceItem() {\n\tif (serviceItem instanceof ServiceItem){\n\t return ((ServiceItem) serviceItem).clone();\n\t} else if (serviceItem instanceof Item) {\n\t bootstrap = ((Item)serviceItem).getProxy();\n\t serviceItem = ((Item)serviceItem).get();\n\t return ((ServiceItem) serviceItem).clone();\n\t} \n\treturn null;\n }",
"public Service getService() {\n\t\treturn this;\n\t}",
"@Override\n\tpublic String getFortuneService() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getOSGiServiceIdentifier() {\n\t\treturn LocalRichService.class.getName();\n\t}",
"@iri(\"http://persistent.name/rdf/2010/purl#servicedBy\")\n\tObject getPurlServicedBy();"
] | [
"0.6801835",
"0.61999094",
"0.61999094",
"0.5968714",
"0.59155285",
"0.5814761",
"0.57918936",
"0.5767522",
"0.5708536",
"0.5708536",
"0.5708536",
"0.5707747",
"0.5707747",
"0.5707747",
"0.5682373",
"0.56493026",
"0.5643999",
"0.5641149",
"0.56168306",
"0.56069213",
"0.5606341",
"0.5598904",
"0.55940735",
"0.5544053",
"0.553825",
"0.55360514",
"0.5530998",
"0.54956394",
"0.54899484",
"0.54854494",
"0.54752964",
"0.54748285",
"0.5474375",
"0.5445493",
"0.5445421",
"0.5438656",
"0.54377615",
"0.5429795",
"0.54202276",
"0.54144263",
"0.54106134",
"0.54040384",
"0.5395627",
"0.5387301",
"0.5380507",
"0.5369727",
"0.53600276",
"0.53550184",
"0.5350724",
"0.5350724",
"0.5349542",
"0.53441393",
"0.5332203",
"0.53253156",
"0.5324036",
"0.5323793",
"0.5321671",
"0.531911",
"0.53168476",
"0.5305882",
"0.53012645",
"0.5300247",
"0.5295632",
"0.52897453",
"0.52869827",
"0.5282084",
"0.5281986",
"0.52705634",
"0.5269899",
"0.5268656",
"0.52604574",
"0.52604574",
"0.5249308",
"0.5240008",
"0.52390623",
"0.52387255",
"0.5234979",
"0.52334315",
"0.5227999",
"0.5227999",
"0.5227999",
"0.5222099",
"0.5222099",
"0.5222014",
"0.5219997",
"0.5215256",
"0.520522",
"0.5200963",
"0.5200963",
"0.5200963",
"0.51949465",
"0.51864004",
"0.5186168",
"0.51767135",
"0.5171793",
"0.5171737",
"0.51704544",
"0.51640916",
"0.51619965",
"0.51602966"
] | 0.74971217 | 0 |
Setter method for the COM property "FavoriteService" | @DISPID(1003) //= 0x3eb. The runtime will prefer the VTID if present
@VTID(14)
void favoriteService(
java.lang.String prop); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DISPID(1003) //= 0x3eb. The runtime will prefer the VTID if present\r\n @VTID(13)\r\n java.lang.String favoriteService();",
"@Override\n\tpublic void setFavorite(boolean value) {\n\t\tthis.isFavorite = value;\n\t}",
"public void setFavorite(boolean favorite) {\n isFavorite = favorite;\n }",
"public void setFavorite(boolean favorite) {\n this.favorite = favorite;\n }",
"public void setToFavorite(boolean favorite) {\n this.isFavorite = favorite;\n }",
"public void setFavorite(boolean favorite) {\n if (mFavorite != favorite) {\n mFavorite = favorite;\n // Avoid infinite recursions if setChecked() is called from a listener\n if (mBroadcasting) {\n return;\n }\n\n mBroadcasting = true;\n if (mOnFavoriteChangeListener != null) {\n mOnFavoriteChangeListener.onFavoriteChanged(this, mFavorite);\n }\n updateFavoriteButton(favorite);\n mBroadcasting = false;\n }\n }",
"public void changeFavorite(boolean a) {\r\n favorite = a;\r\n }",
"public AddFavouriteService() {\n super(\"AddFavouriteService\");\n }",
"public void setFavorite(int favorite) throws Exception {\n if (favorite == 0) {mFavorite = false;}\n else if (favorite == 1) {mFavorite = true;}\n else {throw new Exception(\"Error: Cannot resolve movie 'favorite' \");}\n }",
"public void setService(Text newService) {\n service = newService;\n }",
"public void setService(CentralSystemServiceFactory service) {\n\t\tthis.service = service;\n\t}",
"@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tConfig.HisiSettingService = ServiceSettingsInfoAidl.Stub.asInterface(service);\n\t\t}",
"public abstract void setServiceName(String serviceName);",
"public void setService(Service value) {\n\t\tthis._service = value;\n\t}",
"private void setService(Service service) {\n this.service = service;\n }",
"@Override\n\tpublic int updateFavoriteVO(FavoriteVO vo) {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic boolean isFavorite() {\n\t\treturn this.isFavorite;\n\t}",
"public boolean isFavorite() {\n return isFavorite;\n }",
"public boolean isFavorite() {\n return isFavorite;\n }",
"public void setService(String service) {\n this.service = service;\n }",
"public void setService (String service) {\n\t this.service = service;\n\t}",
"public void toggleFavorite() {\n setFavorite(!mFavorite);\n }",
"public void setService(PlaylistBusinessInterface service) {\n\t\tthis.service = service;\n\t}",
"public void setService(String service) {\n this.service = service;\n }",
"public void setService(String service) {\n this.service = service;\n }",
"public void setService(String service) {\n this.service = service;\n }",
"void setBluetoothService(BluetoothService bluetoothService);",
"public abstract void setServiceType(String serviceType);",
"public interface FavoriteService extends IService<Favorite> {\n \n /**\n * 收藏\n * @param principal\n * @param param\n */\n void favorite(Principal principal, AddFavoriteRo param);\n \n /**\n * 取消收藏\n * @param principal\n * @param param\n */\n void unFavorite(Principal principal, UnFavoriteRo param);\n \n /**\n * 是否已经收藏\n * @param userId\n * @param postId\n * @return\n */\n boolean alreadyFavorite(Long userId, Long postId);\n}",
"public void toggleFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\tmFavoritesCache.toggleSong(getAudioId(), getTrackHost(),\n\t\t\t\t\t\tgetTrackName(), getAlbumName(), getArtistName());\n\t\t\t}\n\t\t}\n\t}",
"void setClassOfService(ClassOfService serviceClass);",
"@Override\n\t\tpublic void onFavorite(User arg0, User arg1, Status arg2) {\n\t\t\t\n\t\t}",
"@Override\n public void modifiedService(ServiceReference<ManagedServiceFactory> reference,\n ManagedServiceFactory service) {\n }",
"public void setFavorite(boolean favorite, boolean animated) {\n if (favorite) {\n boolean orig = mAnimateFavorite;\n mAnimateFavorite = animated;\n setFavorite(favorite);\n mAnimateFavorite = orig;\n } else {\n boolean orig = mAnimateUnfavorite;\n mAnimateUnfavorite = animated;\n setFavorite(favorite);\n mAnimateUnfavorite = orig;\n }\n }",
"public abstract void setService(OntologyGenerationComponentServiceInterface<T,R> service);",
"public void setService(java.lang.CharSequence value) {\n this.service = value;\n }",
"@Override\n public void onServiceConnected(ComponentName className, IBinder service) {\n StockInfoService.LocalBinder binder = (StockInfoService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n if(stockFile == null)\n throw new NullPointerException();\n mService.setStockFile(stockFile);\n }",
"public export.serializers.avro.DeviceInfo.Builder setService(java.lang.CharSequence value) {\n validate(fields()[1], value);\n this.service = value;\n fieldSetFlags()[1] = true;\n return this;\n }",
"public void setFavSite(final String favSite){\n\t\tthis.favSite = favSite;\n\t}",
"public void setServiceName(String serviceName){\n this.serviceName = serviceName;\n }",
"public void m7904a(boolean favorite) {\n this.f6695h = favorite;\n }",
"public void setFavorite(final String word){\n\t\tif (listener != null){\n\t\t\thandler.post(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlistener.setFavorite(word.trim());\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}",
"public void setServiceName(String serviceName)\r\n {\r\n this.serviceName = serviceName;\r\n }",
"public void updateFeedItemAsFavorite(FeedItem item) {\n new updateFeedItemFavoriteAsync(itemDao).execute(item);\n }",
"@Override\n\tpublic void onFavorite(User source, User target, Status favoritedStatus) {\n\n\t}",
"@JsonProperty(\"service\")\n public void setService(String service) {\n this.service = service;\n }",
"@FXML\n private void toggleFavorite() {\n raise(new ToggleFavoritePersonEvent(id.getText().substring(0, id.getText().indexOf(\".\"))));\n }",
"@iri(\"http://persistent.name/rdf/2010/purl#servicedBy\")\n\tvoid setPurlServicedBy(Object purlServicedBy);",
"public ServiceType setActualServiceType(ServiceType service){\r\n\t\tthis.serviceTypeInUse = service;\r\n\t\treturn this.serviceTypeInUse;\r\n\t}",
"public Event setService(String service) {\n this.service = service;\n return this;\n }",
"public void setServiceName(java.lang.String param){\n localServiceNameTracker = true;\n \n this.localServiceName=param;\n \n\n }",
"public void setServiceRef(IntegrationAppmasterService<?> serviceRef) {\n\t\tthis.serviceRef = serviceRef;\n\t}",
"public void setServiceName(String serviceName)\n {\n this.serviceName = serviceName;\n }",
"public void setServiceID(java.lang.String serviceID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SERVICEID$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SERVICEID$6);\n }\n target.setStringValue(serviceID);\n }\n }",
"@Override\n\t\tpublic void setService(String system_id) throws RemoteException {\n\t\t\tSystem.out.println(\"set service invoke on \" + system_id);\n\t\t}",
"public final void setService(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String service)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Service.toString(), service);\r\n\t}",
"public void setTheSuperFortuneService(SuperFortuneService theSuperFortuneService) {\n\t\tSystem.out.println(\"Inside SoccerCoach SuperFortune setter: injecting dependency...\");\n\t\tthis.theSuperFortuneService = theSuperFortuneService;\n\t}",
"public void setEnhancedService(EnhancedService EnhancedService) {\n this.EnhancedService = EnhancedService;\n }",
"public void onServiceConnected(ComponentName className, IBinder service) {\n imService = ((FriendLocationService.IMBinder)service).getService(); \r\n \r\n \r\n }",
"public Builder setService(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n service_ = value;\n onChanged();\n return this;\n }",
"public Builder setService(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n service_ = value;\n onChanged();\n return this;\n }",
"public Builder setService(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n service_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic void setFlavor() {\n\t\thasFlavor = false;\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(OBSERVABLE_EVENT_SET_FLAVOR);\r\n\t}",
"private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }",
"public void setBluetoothService(BluetoothService bluetoothService) {\n this.bluetoothService = bluetoothService;\n }",
"@Override\n\t\tpublic void onServiceConnected(ComponentName className, IBinder service) {\n\t\t\tMediaPlayerService.LocalMPBinder binder = (MediaPlayerService.LocalMPBinder) service;\n\t\t\tmService = binder.getService();\n\t\t\tmBound = true;\n\t\t\tif (mService.isAutoPlayCase() && getBooleanPreference(getString(R.string.autoplay_switch), false) && mSavedStationDefinition != null)\n\t\t\t\tdoClickOnStopPlayButton(/*getPlayStopButton(), */false);\n\t\t\tsynchronizePlayPauseButton();\n\t\t\tFragmentManager fm = getSupportFragmentManager();\n\t\t\tif (fm != null) {\n\t\t\t\tList<Fragment> fragments = fm.getFragments();\n\t\t\t\tif(fragments != null) {\n\t\t\t\t\tfor (Fragment fragment : fragments) {\n\t\t\t\t\t\tif (fragment != null) {\n\t\t\t\t\t\t\tif (fragment instanceof FavoriteStationsFrame) {\n\t\t\t\t\t\t\t\t((FavoriteStationsFrame) fragment).synchronizeOnServiceConnected(mService);// do something\n\t\t\t\t\t\t\t\tLog.e(\"MTA:onServ.Conn.\", \"FSF:synchronizeOnServiceConnected\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tLog.e(\"MTA:onServ.Conn.\", className.toString());\n\t\t}",
"public interface IFavoriteService {\n\n\tList<Favorite> getFavorites();\n\n\tList<Favorite> getFavoritesByGenre(GenreType genreType);\n\n\tList<Favorite> getFavoritesByParent(FavoriteCategory parent);\n\n\tList<Favorite> getFavoritesByParentId(int parentId);\n\n\tList<Favorite> getFavoritesByRate(int rate);\n\n\tList<Favorite> getFavoritesByBackupStatus(boolean isBackup);\n\n\tList<Favorite> getFavoritesByModifyStatus(boolean isModified);\n\n\tint getFavoriteCountInRate(int rate);\n\n\tint getFavoriteCountInCategory(int parentId);\n\n\tvoid delete(Favorite favorite);\n\n\tvoid delete(List<Favorite> favorites);\n\n\tvoid update(Favorite favorite);\n\n\tvoid update(List<Favorite> favorites);\n\n\tvoid insert(Favorite favorite);\n\n\tvoid insert(List<Favorite> favorites);\n\n\tList<FavoriteCategory> getFavoriteCategories();\n\n\tList<FavoriteCategory> getFavoriteCategoriesByRate(int rate);\n\n\tList<FavoriteCategory> getFavoriteCategoriesByBackupStatus(boolean isBackup);\n\n\tList<FavoriteCategory> getFavoriteCategoriesByModifyStatus(boolean isModified);\n\n\tvoid insertCategory(FavoriteCategory category);\n\n\tvoid insertCategory(List<FavoriteCategory> categories);\n\n\tvoid updateCategory(FavoriteCategory category);\n\n\tvoid updateCategories(List<FavoriteCategory> categories);\n\n\tvoid deleteCategory(FavoriteCategory category);\n\n\tvoid deleteCategories(List<FavoriteCategory> categories);\n}",
"public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n mMovie.setFavorite(true);\n\n //save movie to favorite database table\n mMovieValet.saveFavorite(mMovie);\n\n //add movie to favorite movie list buffer\n mMovieStaff.addFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }",
"public void saveAsMyFavorite(View v){\n\n MyFavoriteLocations myFavoriteLocation=new MyFavoriteLocations();\n myFavoriteLocation.setMyFavoriteLocations(new Locations(1,titleText, address, descriptionText, budgetText, lt, ln, \"df\"));\n\n myFavoriteLocation.save();\n }",
"public final void setService(java.lang.String service)\r\n\t{\r\n\t\tsetService(getContext(), service);\r\n\t}",
"public void setTypeOfService(String typeOfService){\n\tthis.typeOfService=typeOfService;\n}",
"public void setFavortiestate(String favortiestate) {\n this.favortiestate = favortiestate;\n }",
"public void onFavoriteChanged(MaterialFavoriteButton buttonView, boolean favorite);",
"public boolean isFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\treturn mFavoritesCache.isFavoriteSong(getAudioId(),\n\t\t\t\t\t\tgetTrackHost());\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public void setServiceName(String serviceName) {\n this.serviceName = serviceName;\n }",
"public void setServiceName(String serviceName) {\n this.serviceName = serviceName;\n }",
"@Override\n public void setFamilyServiceStatus(String status) {\n }",
"@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n\n // Sets the binder for the service.\n SSMusicService.SSMusicBinder binder = (SSMusicService.SSMusicBinder) service;\n musicService = binder.getService();\n serviceBound = true; // Indicates that the service is bounded.\n }",
"public void setServiceType(typekey.ReviewServiceType value);",
"public final void setFoundService(java.lang.Boolean foundservice)\r\n\t{\r\n\t\tsetFoundService(getContext(), foundservice);\r\n\t}",
"private void toggleFavorite(Set<Long> selectedSet) {\n toggleMultiple(selectedSet, new MultiToggleHelper() {\n\n @Override\n public boolean getField(Cursor c) {\n return c.getInt(MessagesAdapter.COLUMN_FAVORITE) != 0;\n }\n\n @Override\n public void setField(long messageId, boolean newValue) {\n mController.setMessageFavoriteSync(messageId, newValue);\n }\n });\n }",
"public void setServiceValue(String serviceValue) throws JNCException {\n setServiceValue(new YangString(serviceValue));\n }",
"public void setServiceValue(String serviceValue) throws JNCException {\n setServiceValue(new YangString(serviceValue));\n }",
"public final void setFoundService(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Boolean foundservice)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.FoundService.toString(), foundservice);\r\n\t}",
"public void setReferenceService(ReferenceService referenceService){\n\t\tthis.referenceService = referenceService;\n\t}",
"public synchronized void changeServiceStatus() {\n\t\tthis.serviced = true;\n\t}",
"public boolean setServices(ServiceCombo aNewServices)\n {\n boolean wasSet = false;\n if (aNewServices != null)\n {\n services = aNewServices;\n wasSet = true;\n }\n return wasSet;\n }",
"protected void setTypeAlertService(TypeAlertService service) {\n\t\tthis.typeAlertService = service;\n\t}",
"public void xsetServiceID(org.apache.xmlbeans.XmlString serviceID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SERVICEID$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(SERVICEID$6);\n }\n target.set(serviceID);\n }\n }",
"@Override\n\tpublic void addFavorit(FavorisImpl newfavorit) {\n\t\t\n\t}",
"public void setPreferncesService(IPreferencesService preferncesService) {\n\n this.preferncesService = preferncesService;\n }",
"public void setDataObjectService(DataObjectService dataObjectService) {\n this.dataObjectService = dataObjectService;\n }",
"void setProjectFavourite(int accountId, int projectId, boolean favourite);",
"public interface Favorite {\n boolean get(String id);\n boolean toggle(String id);\n}",
"public void setServiceValue(YangString serviceValue) throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n serviceValue,\n childrenNames());\n }",
"public void setServiceValue(YangString serviceValue) throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n serviceValue,\n childrenNames());\n }",
"@Override\n public void modifiedService(ServiceReference<ManagedService> reference, ManagedService service) {\n }",
"public void setServiceName(final String serviceNameValue) {\n this.serviceName = serviceNameValue;\n }",
"void setPreference(String user, String preferenceName, String value) throws OntimizeJEERuntimeException;",
"public void setFavorite(Tweet tweet, AsyncHttpResponseHandler handler) {\n String apiUrl = getApiUrl(\"favorites/create.json\");\n RequestParams params = new RequestParams();\n\n params.put(\"id\", String.valueOf(tweet.getTid()));\n\n // Execute the request\n getClient().post(apiUrl, params, handler);\n }"
] | [
"0.66174114",
"0.6566632",
"0.653563",
"0.6487979",
"0.6297217",
"0.621457",
"0.60498005",
"0.5977077",
"0.5971354",
"0.596261",
"0.5954286",
"0.59383696",
"0.5931519",
"0.5820356",
"0.57811135",
"0.577833",
"0.57709396",
"0.5768284",
"0.5768284",
"0.5737622",
"0.57295007",
"0.572329",
"0.56662357",
"0.5649083",
"0.5649083",
"0.5649083",
"0.5573353",
"0.5545989",
"0.55286485",
"0.549804",
"0.5452252",
"0.5411785",
"0.54003036",
"0.53939766",
"0.5357867",
"0.53554946",
"0.5325646",
"0.5324362",
"0.5313462",
"0.5305213",
"0.5297553",
"0.52948153",
"0.5293306",
"0.5265588",
"0.52181953",
"0.5216458",
"0.5208499",
"0.5205177",
"0.5188008",
"0.51838636",
"0.5176582",
"0.51756644",
"0.5169607",
"0.5162912",
"0.5145107",
"0.51410025",
"0.5104286",
"0.51005894",
"0.5098423",
"0.50977373",
"0.50977373",
"0.50977373",
"0.50915736",
"0.5080175",
"0.5075123",
"0.5065666",
"0.5062424",
"0.5060687",
"0.5055335",
"0.50545293",
"0.5045786",
"0.5044097",
"0.50390726",
"0.5037372",
"0.50283945",
"0.50283945",
"0.5027631",
"0.5026351",
"0.50251776",
"0.50239277",
"0.50191236",
"0.5016653",
"0.5016653",
"0.5003608",
"0.49946016",
"0.49930263",
"0.49853733",
"0.49803573",
"0.49743602",
"0.4966725",
"0.49637383",
"0.4953388",
"0.49415454",
"0.49373746",
"0.4919266",
"0.4919266",
"0.4911554",
"0.49045718",
"0.49015367",
"0.49009144"
] | 0.7181765 | 0 |
if we create a new game, delete the old save_game file | @Override
public void handle(ActionEvent e) {
File f = new File("save_game.dat");
f.delete();
humanTurn = true;
start(primaryStage);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void saveGame() {\n\t\tmanager.saveGame();\n\t}",
"private void saveGame(){\n\t\t\n\t}",
"void saveGame() throws IOException, Throwable {\n Save save = new Save(\"01\");\n save.addToSaveGame(objectsToSave());\n save.saveGame();\n }",
"public void save(){\r\n\t\ttry {\r\n\t\t\tgame.suspendLoop();\r\n\t\t\tGameStockage.getInstance().save(game);\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (GameNotSaveException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t}\r\n\t}",
"private void saveGame(int gameId, String fileName){\n\n }",
"public void saveGame(){\n updateProperties();\n try {\n output = new FileOutputStream(fileName);\n properties.store(output, null); //saving properties to file\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO SAVE GAME ---\");\n e.printStackTrace();\n } finally {\n if (output != null) {\n try {\n output.close();\n System.out.println(\"--- GAME SAVED ---\");\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO CLOSE OUTPUT ---\");\n e.printStackTrace();\n }\n }\n }\n }",
"public void endGame(){\r\n\t\tupdateRecord();\r\n\t\tgameStats.writeToFile();\r\n\t\tstatisticsList = gameStats.makeArrayList();\r\n\t\tgameStats.writeListToFile(statisticsList);\r\n\t}",
"public void saveGame(File fileLocation);",
"void saveGame();",
"private void saveGame() throws FileNotFoundException {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tFile file = null;\r\n\t\tif (fileChooser.showSaveDialog(gameView) == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tfile = fileChooser.getSelectedFile();\r\n\t\t}\r\n\t\tif (file != null) {\r\n\t\t\tFileWriter fileWriter = new FileWriter(convertToStringArrayList(), file);\r\n\t\t\tfileWriter.writeFile();\r\n\t\t}\r\n\r\n\t}",
"private void checkSave() {\n if (view.getSave()) {\n try {\n saveGame.export(view.getSaveGameName());\n } catch (Exception e) {\n System.out.println(\"saving failed\");\n }\n System.exit(0);\n }\n }",
"public void saveGame(){\n \tsaveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n \tsaveGame.saveGame(saveOriginator);\n }",
"public void save() {\n\t\ttry {\n\t\t\t// use buffering\n\t\t\tOutputStream file = new FileOutputStream(\"games.txt\");\n\t\t\tOutputStream buffer = new BufferedOutputStream(file);\n\t\t\tObjectOutput output = new ObjectOutputStream(buffer);\n\t\t\ttry {\n\t\t\t\tif (gameOver) {\n\t\t\t\t\t//notify no need to save completed game\n\t\t\t\t} else {\n\t\t\t\t\tgames.add(this);\n\t\t\t\t\toutput.writeObject(games);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\toutput.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Save not successful\");\n\t\t}\n\t}",
"public void saveGame();",
"public void saveGame() {\r\n\t\t//separator used by system\r\n\t\tString separator = System.getProperty(\"file.separator\");\r\n\t\t//path to where files will be saved\r\n\t\tString path = System.getProperty(\"user.dir\") + separator + \"src\" + separator + \"GameFiles\" + separator;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t//Save the world objects\r\n\t\t\tString world_objects_name = EnvironmentVariables.getTitle() + \"WorldObjects\";\r\n\t\t\t//create a new file with name given by user with added text for identification\r\n\t\t\tFile world_objects_file = new File(path + world_objects_name + \".txt\");\r\n\t\t\tFileOutputStream f_world_objects = new FileOutputStream(world_objects_file);\r\n\t\t\tObjectOutputStream o_world_objects = new ObjectOutputStream(f_world_objects);\r\n\r\n\t\t\t//loop through list and write each object to file\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getWorldObjects()) {\r\n\t\t\t\to_world_objects.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_world_objects.flush();\r\n\t\t\to_world_objects.close();\r\n\t\t\tf_world_objects.flush();\r\n\t\t\tf_world_objects.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Save terrain is done the same ass world objects but we create a new file \r\n\t\t\t//with different added text\r\n\t\t\tString terrain_name = EnvironmentVariables.getTitle() + \"Terrain\";\r\n\t\t\tFile terrain_file = new File(path + terrain_name + \".txt\");\r\n\t\t\tFileOutputStream f_terrain = new FileOutputStream(terrain_file);\r\n\t\t\tObjectOutputStream o_terrain = new ObjectOutputStream(f_terrain);\r\n\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getTerrain()) {\r\n\t\t\t\to_terrain.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_terrain.flush();\r\n\t\t\to_terrain.close();\r\n\t\t\tf_terrain.flush();\r\n\t\t\tf_terrain.close();\r\n\t\t\t\r\n\t\t\t//Save main player, given own file but just a single object\r\n\t\t\tString main_player_name = EnvironmentVariables.getTitle() + \"MainPlayer\";\r\n\t\t\tFile main_player_file = new File(path + main_player_name + \".txt\");\r\n\t\t\tFileOutputStream f_main_player = new FileOutputStream(main_player_file);\r\n\t\t\tObjectOutputStream o_main_player = new ObjectOutputStream(f_main_player);\r\n\r\n\t\t\to_main_player.writeObject(EnvironmentVariables.getMainPlayer());\r\n\r\n\t\t\to_main_player.flush();\r\n\t\t\to_main_player.close();\r\n\t\t\tf_main_player.flush();\r\n\t\t\tf_main_player.close();\r\n\t\t\t\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t} \r\n\t\t\r\n\t\t//saving the environment variables\r\n\t\ttry {\r\n\t\t\tString env_name = EnvironmentVariables.getTitle() + \"EnvVariables\";\r\n\t\t\tFile env_file = new File(path + env_name + \".txt\");\r\n\t\t\t\r\n\t\t\tif(!env_file.exists()) {\r\n\t\t\t\tenv_file.createNewFile();\r\n\t\t }\r\n\t\t\t \r\n\t\t\t//FileWriter fw = new FileWriter(env_file);\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(env_file));\r\n\t\t\t//write each variable to a new line as a string\r\n\t\t\tbw.write(EnvironmentVariables.getTitle()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getWidth())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getHeight())); bw.newLine();\r\n\t\t\tbw.write(EnvironmentVariables.getPlanet()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMass())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getRadius())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getAirDensity())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMeter())); bw.newLine();\r\n\r\n\t\t\t\r\n\t\t\t//bw.flush();\r\n\t\t\tbw.close();\r\n\t\t\t\r\n\t\t}catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t}\r\n\t\t\r\n\t\tEnvironmentVariables.getTerrain().clear();\r\n\t\tEnvironmentVariables.getWorldObjects().clear();\r\n\t}",
"void onGameSaved(File file);",
"void deleteSlot() {\n String[] scores = readFromFile().split(\"\\n\");\n scores[currPlayer] = defaultScore;\n writeToFile(String.join(\"\\n\", scores));\n currPlayer = -1;\n }",
"public void saveGame(){\r\n Scanner in = new Scanner(System.in);\r\n Boolean nameIsFine = false;\r\n String filename;\r\n int input;\r\n do {\r\n System.out.println(\"Filename?\");\r\n filename = this.savePath + File.separator + this.getFilename() + \".ser\";\r\n File newFile = new File(filename);\r\n if(newFile.exists()) {\r\n System.out.println(\"This file already exists.\");\r\n System.out.println(\"Do you want to change the file name?\");\r\n System.out.println(\"Yes: '1', No: '0'.\");\r\n input = in.nextInt();\r\n if (input == 0) {\r\n nameIsFine = true;\r\n } else {\r\n if (input != 1){\r\n System.out.println(\"This is not an option.\");\r\n }\r\n System.out.println(\"Give a different filename.\");\r\n }\r\n } else {\r\n nameIsFine = true;\r\n }\r\n } while(!nameIsFine);\r\n this.save(filename);\r\n }",
"public void SaveCurrentGame(){\n if(gameStarted == false){ return; }\n recordGame.write(board, timeRuunableThread, level);\n timeRuunableThread.setDrawNumber(false);\n canLoadGame = true;\n // update infoCanvas\n CleanInfoCanvas();\n }",
"public void Stop(Player player){\r\n \r\n if (Players.size()==1)\r\n {\r\n enddate=new Date();\r\n //write the result in a file \r\n //read the last game id and plus it with 1\r\n int gameID=0;\r\n String result=\"\";\r\n boolean playerwin=false;\r\n File f = new File(new File(\"\").getAbsolutePath() + \"\\\\src\\\\projectafterupdatev1\\\\pkg2\\\\GameRecords\");\r\n ObjectInputStream obj=null;\r\n try {\r\n obj = new ObjectInputStream(new FileInputStream(f));\r\n } catch (IOException ex) {System.out.println(\"exeption for newing the obj in game id initllize\");}\r\n while (true) {\r\n try {\r\n\r\n FinishedGameRecord temp = (FinishedGameRecord) obj.readObject();\r\n gameID=temp.gameID;\r\n } catch (EOFException e) {\r\n try {\r\n obj.close();\r\n } catch (IOException ex) {}\r\n break;\r\n } catch (IOException ex) {System.out.println(\"gameID initlizing IOE error\"); \r\n } catch (ClassNotFoundException ex) {System.out.println(\"gameID initlizing Class not found error\");\r\n }\r\n }\r\n \r\n gameID++;\r\n if (Objects.equals(Players.get(0).name, new String(\"Random PC\")))\r\n {\r\n result=\"PC Win\";\r\n \r\n }else\r\n {\r\n playerwin=true;\r\n result=Players.get(0).name+\" Win\";\r\n }\r\n //insert the new game record \r\n FinishedGameRecord lastscore=new FinishedGameRecord(playername,\"Random PC\",startdate,enddate,gameID,result);\r\n try {\r\n FileOutputStream os=new FileOutputStream(new File(new File(\"\").getAbsoluteFile()+\"\\\\src\\\\projectafterupdatev1\\\\pkg2\\\\GameRecords\"),true);\r\n AppendingObjectOutputStream obj2=new AppendingObjectOutputStream(os);\r\n \r\n obj2.writeObject(lastscore);\r\n \r\n obj2.close();\r\n os.close();\r\n } catch (FileNotFoundException ex) {System.out.println(\"writeing finished game record 111a\");} \r\n catch (IOException ex){System.out.println(\"111b\");}\r\n \r\n //writing to the score board \r\n \r\n File f3 = new File(new File(\"\").getAbsolutePath() + \"\\\\src\\\\projectafterupdatev1\\\\pkg2\\\\ScoreBoard\");\r\n try {\r\n AppendingObjectOutputStream obj4sore=new AppendingObjectOutputStream(new FileOutputStream(f3,true));\r\n \r\n obj4sore.writeObject(new ScoreRecord(playername, playerwin));\r\n \r\n obj4sore.close();\r\n } catch (FileNotFoundException ex) {System.out.println(\"File not Found obj 4 score\");\r\n } catch (IOException ex) {System.out.println(\"IOEexception obj4score\");\r\n }\r\n \r\n \r\n //insert the toturial records\r\n File f2 = new File(new File(\"\").getAbsolutePath() + \"\\\\src\\\\projectafterupdatev1\\\\pkg2\\\\ToturialFile\");\r\n try {\r\n \r\n AppendingObjectOutputStream obj3=new AppendingObjectOutputStream(new FileOutputStream(f2,true));\r\n WritableToturialClass temp=new WritableToturialClass();\r\n temp.Initlize(moves.size());\r\n temp.gameID=gameID;\r\n temp.grid=boarddata;\r\n temp.note=notedata;\r\n temp.header=boardsheader;\r\n for(int i=0;i<moves.size();i++){\r\n temp.add(moves.get(i).nameoftheattacker, moves.get(i).xaxis, moves.get(i).xaxis,moves.get(i).date);\r\n moves.get(i);\r\n }\r\n obj3.writeObject(temp);\r\n obj3.close();\r\n } catch (FileNotFoundException ex) {System.out.println(\"File not Found obj 3 \");\r\n } catch (IOException ex) {System.out.println(\"IOEexception obj3\");\r\n }\r\n //end of the adding operations\r\n \r\n WinnerDisplay win=new WinnerDisplay();\r\n win.setWinner(Players.get(0).name);\r\n //make the list disappear before the saving shit happen\r\n playerboard.repaintafterupdate();\r\n playerboard.setVisible(false);\r\n win.setLocation(500,300);\r\n win.setVisible(true);\r\n music.StopTheMusic();\r\n music.PlayWinner();\r\n \r\n \r\n }\r\n }",
"public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}",
"@Override\n public void save(Game game) {\n }",
"public void testSaverLoader_save_new()\n {\n TestObj obj = new TestObj(); \n File file = new File(TEST_FILENAME); \n file.delete();\n assertFalse(file.exists());\n try {\n SaverLoader.save(file, obj);\n }\n catch(IOException e) {\n Debug.println(\"Error saving file: \" + e.getMessage());\n }\n assertTrue(file.exists());\n file.delete();\n }",
"public void saveGameSession() {\n\t\tlastSaved = ProjectZero.calendar.getTime().toString();\n\t\tAssetHandler.saveGameSession();\n\t}",
"public void saveGame(File f) {\n savegame = new SaveGame(f, chessboard, gamelog, colorsTurn);\n System.out.println(\"Gamed Saved.\");\n\n }",
"public void save() {\n final JFileChooser fileChooser =\n new JFileChooser(System.getProperty(\"user.dir\"));\n try {\n fileChooser.setSelectedFile(new File(\"save.ser\"));\n int saveFile = fileChooser.showSaveDialog(GameFrame.this);\n\n if (saveFile == JFileChooser.APPROVE_OPTION) {\n File saveGame = fileChooser.getSelectedFile();\n FileOutputStream fileOut = new FileOutputStream(saveGame);\n ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n objOut.writeObject(world);\n objOut.close();\n fileOut.close();\n System.out.println(\"Game saved.\");\n } else {\n return;\n }\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n }",
"@Override\n public void onStop() {\n super.onStop();\n ObjectOutput out = null;\n String fileName = \"savedGame\";\n File saved = new File(getFilesDir(), fileName);\n\n try {\n out = new ObjectOutputStream(new FileOutputStream(saved, false));\n out.writeObject(player);\n out.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void save(String filePath){\r\n Scanner in = new Scanner(System.in);\r\n File saveFile = new File(filePath);\r\n if (saveFile.exists()){\r\n System.out.println(\"Do you really, really want to overwrite your previous game?\");\r\n System.out.println(\"Yes: '1', No: '0'.\");\r\n int input = in.nextInt();\r\n if (input!=1){\r\n return;\r\n }\r\n }\r\n File saveDir = new File(this.savePath);\r\n if (!saveDir.exists()){\r\n saveDir.mkdir();\r\n }\r\n FileOutputStream fos = null;\r\n ObjectOutputStream out = null;\r\n try {\r\n fos = new FileOutputStream(saveFile);\r\n out = new ObjectOutputStream(fos);\r\n out.writeObject(this.serialVersionUID);\r\n out.writeObject(p);\r\n out.writeObject(map);\r\n out.close();\r\n } catch (Exception ex) {\r\n System.out.println(\"Make sure you don't use spaces in your folder names.\");\r\n ex.printStackTrace();\r\n }\r\n }",
"void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }",
"void writeGame(Game game, List<File> existingFiles) throws MoveAlreadyWrittenException, ResultAlreadyWrittenException;",
"@Override\r\n\tpublic void onPause() {\r\n\t\tsuper.onPause();\r\n\t\ttry {\r\n\t\t\tSaveGameHandler.saveGame(this, new SaveGame(controller, status),\r\n\t\t\t\t\t\"test.game\");\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n public void saveGame() {\n\n }",
"void saveGameState(File saveName);",
"public static void save() {\n Game.save(UI.askNgetString(\"Filename for this save file?\")+\".xml\");\n }",
"public static void finishGame(File database) {\n closeAllSockets();\n clearChatDatabase(database);\n }",
"public void save() {\n\t\tlog.log(\"Attempting to save...\");\n\t\tPath spath = Paths.get(getFullSavePath());\n\t\tPath cpath = Paths.get(getFullSavePath() + \"units/\");\n\t\ttry {\n\t\t\tif(!Files.exists(spath))\n\t\t\t\tFiles.createDirectory(spath);\n\t\t\tif(!Files.exists(cpath))\n\t\t\t\tFiles.createDirectory(cpath);\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tlog.log(\"Save failed.\");\n\t\t\treturn;\n\t\t}\n\n\t\tFile[] files = new File(cpath.toString()).listFiles();\n\t\tfor(File f : files) {\n\t\t\tf.delete();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tBufferedWriter mfestWriter = new BufferedWriter(new FileWriter(getFullSavePath() + \"progress.txt\"));\n\t\t\tmfestWriter.write(name);\n\t\t\tmfestWriter.close();\n\t\t\tfor(MapCharacter mc : getFriendlies()) {\n\t\t\t\tBufferedWriter charWriter = new BufferedWriter(new FileWriter(getFullSavePath() + \"units/\"\n\t\t\t\t\t\t+ mc.getEnclosed().getDirName()));\n\t\t\t\tcharWriter.write(mc.getEnclosed().save());\n\t\t\t\tcharWriter.close();\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tlog.log(\"Save failed.\");\n\t\t\treturn;\n\t\t}\n\t\tlog.log(\"Game saved.\");\n\t}",
"private void deleteMathGamesPreviousContent()\n {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(DATABASE_TABLE_MATH_GAMES, null, null);\n db.close();\n }",
"@Override\n public void actionPerformed(ActionEvent e){\n JFileChooser fileChooser = new JFileChooser();\n int status = fileChooser.showSaveDialog(null);\n \n //Check if they actually saved the file\n if (status == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n \n //Try block to make sure file actually exists\n try {\n FileOutputStream fos = new FileOutputStream(fileToSave);\n ObjectOutputStream out = new ObjectOutputStream(fos);\n out.writeObject(games);\n \n //Close the file\n fos.close();\n out.close();\n } catch (FileNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"Error: File not found\");\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"Error: File I/O problem\");\n }\n \n //Tell the user it saved successfully\n JOptionPane.showMessageDialog(null, \"Saved as file: \" + fileToSave.getAbsolutePath());\n }\n }",
"@Override\n public void onPause() {\n super.onPause();\n ObjectOutput out = null;\n String fileName = \"savedGame\";\n File saved = new File(getFilesDir(), fileName);\n\n try {\n out = new ObjectOutputStream(new FileOutputStream(saved, false));\n out.writeObject(player);\n out.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"boolean unload(boolean save);",
"private static void eraseFile() throws IOException {\n\t\tif (!scores.exists()) scores.createNewFile();\r\n\t\tFileWriter overwrite = new FileWriter(scores, false);\r\n\t\t// Inputs to the FileWriter class: file, append? (write to next line or overwrite)\r\n\t\t// append is set to false in order to overwrite\r\n\t\toverwrite.write(\"\");\r\n\t\toverwrite.close();\r\n\t}",
"private void saveFile(){\n\tif (numPlayers == 1 && 0 < numNPCs && numNPCs < 6){\n\t int returnVal = fileChooser.showSaveDialog(this);\n\t if (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\ttry {\n\t\t FileWriter writer =\n\t\t\tnew FileWriter(fileChooser.getSelectedFile());\n\t\t writer.write(this.toXML());\n\t\t writer.close();\n\t\t} catch (Exception ex) {\n\t\t ex.printStackTrace();\n\t\t}\n\t }\n\t} else {\n\t //If it wouldn't make a valid game, warn the user\n\t JFrame f = new JFrame();\n\t JOptionPane.showMessageDialog(f,\n\t\t\t\t\t \"You must have exactly one playable\\n\"\n\t\t\t\t\t + \"character and 1-5 NPCs.\\n\" +\n\t\t\t\t\t \"Current PCs= \" + numPlayers +\n\t\t\t\t\t \", NPCs = \" + numNPCs,\n\t\t\t\t\t \"Improper Game Configuration\",\n\t\t\t\t\t JOptionPane.WARNING_MESSAGE);\t \n\t}\n }",
"public void deleteFile() {\n String newName = playerList.getSelectionModel().getSelectedItem();\n File user = new File(\"SaveData\\\\UserData\\\\\" + newName + \".txt\");\n if (user.delete()) {\n input.setStyle(\"-fx-border-color: default\");\n playerList.getItems().remove(newName);\n\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n\n } else {\n ERROR_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n input.setStyle(\"-fx-border-color: red\");\n }\n }",
"@Override\n public int saveGame(String foo) {\n RunGame.saveGameToDisk(foo);\n return 0;\n }",
"@Override\r\n\tpublic GameState save() {\n\t\treturn null;\r\n\t}",
"public SaveGame() {\n\t\tlives = 0;\n\t\tscore = 0;\n\t\tbrainX = 0;\n\t\tbrainY = 0;\n\t\tzombieX = 0;\n\t}",
"public void endGame() {\r\n if (state[0]) {\r\n if (state[1]) {\r\n frame.remove(pause);\r\n state[1] = false;\r\n }\r\n records.newRecord(game.map, game.end());\r\n frame.remove(game);\r\n records.saveRecords();\r\n state[0] = false;\r\n menu.setVisible(true);\r\n }\r\n }",
"public void saveGame(String fileName){\n try {\n File file1 = new File(fileName);\n FileOutputStream fileOutputStream = new FileOutputStream(file1);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(this);\n }catch (Exception e){\n System.err.println(\"Error when saving file\");\n }\n }",
"public void startSavedGame()\n {\n \n // get rid of nl character left in the stream\n // outFile.flush();\n \n // prompt user and get a file path\n System.out.println(\"\\nWhat is the file path?\");\n String filePath = keyboard.next();\n \n // call the getSavedGame( ) method in the GameControl class to load the game\n GameControl gc = new GameControl();\n gc.getSavedGame(filePath);\n\n // display the game menu for the loaded game\n MainMenuView mmv = new MainMenuView();\n mmv.displaySaveGameView();\n }",
"@Override\n\tpublic void delete(Game game) {\n\t\t\n\t}",
"public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }",
"public void saveGame(String path) throws Exception\n\t{\n\t\tXMLFile db = new XMLFile(path);\n\t\tdb.save(this);\n\t\tSystem.out.println(\"The file '\" + path + \"' has been saved successfully.\");\n\t}",
"public void SaveGame(){\n if(gameStarted == false || canLoadGame == true){ return; }\n gamePaused = true;\n timeRuunableThread.setPause(gamePaused);\n int input = JOptionPane.showOptionDialog(null, \"Do you want to save game?\", \"Save Game\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);\n if(input == JOptionPane.OK_OPTION) {\n SaveCurrentGame();\n animationThread.start();\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"LoadingScreenMusic\");\n }\n musicName = \"LoadingScreenMusic\";\n }else{\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n }\n }",
"private void saveAndExit() {\n if (yesNoQuestion(\"Would you like to save the current active courses to the saved list before saving?\")) {\n addActiveCourseListToCourseList();\n }\n try {\n JsonWriter writer = new JsonWriter(\"./data/ScheduleList.json\",\n \"./data/CourseList.json\");\n writer.open(true);\n writer.writeScheduleList(scheduleList);\n writer.close(true);\n\n writer.open(false);\n writer.writeCourseList(courseList);\n writer.close(false);\n } catch (IOException ioe) {\n System.out.println(\"File Not Found, failed to save\");\n } catch (Exception e) {\n System.out.println(\"Unexpected Error, failed to save\");\n }\n\n }",
"public boolean saveEvent(String gameTitle, Event oldEvent, Event newEvent) {\n\n boolean saved = false;\n\n Game thisGame = MainModel.getInstance().getGame(gameTitle);\n\n Event eventThatAlreadyExist = thisGame.getEvent(newEvent.getName());\n Log.d(\"saveEvent\", \"eventThatAlreadyExist: \"+eventThatAlreadyExist.getName());\n //alreadyExistInGames E' TRUE SE ESISTE GIA' IN QUESTO GIOCO UN EVENTO CON QUEL NOME\n boolean alreadyExistInGames = (eventThatAlreadyExist.getName() != null);\n //modifyingExistingGame E' TRUE SE STO MODIFICANDO UN EVENTO GIA' ESISTENTE\n boolean modifyingExistingGame = (oldEvent != null);\n\n Log.d(\"saveEvent\", \"alreadyExistInGames: \"+ alreadyExistInGames + \" \" + newEvent.getName());\n Log.d(\"saveEvent\", \"modifyingExistingGame: \"+ modifyingExistingGame);\n\n if(alreadyExistInGames && modifyingExistingGame) {\n\n\n\n thisGame.removeEvent(oldEvent);\n thisGame.addEvent(newEvent);\n //MainModel.getInstance().writeGamesJson();\n saved = true;\n }\n else if(!alreadyExistInGames && !modifyingExistingGame) {\n\n Log.d(\"saveEvent\", \"Added new Event\");\n thisGame.addEvent(newEvent);\n //MainModel.getInstance().writeGamesJson();\n saved = true;\n }\n else if(modifyingExistingGame & !alreadyExistInGames) {\n\n Log.d(\"saveEvent\", \"Sto modificando un evento esistente\");\n Log.d(\"saveEvent\", \"Removed old event: \"+ oldEvent.getName() + \", added new Event: \" + newEvent.getName());\n thisGame.removeEvent(oldEvent);\n boolean b = thisGame.addEvent(newEvent);\n if(b)\n Log.d(\"saveEvent\", \"Evento salvato\");\n else\n Log.d(\"saveEvent\", \"Evento non salvato\");\n\n saved = true;\n\n }\n else {\n Log.d(\"saveEvent\", \"Error saving new Event or overwritting the existing one\");\n }\n\n return saved;\n }",
"private static void checkSaveOnExit() {\n\t\tif(!saved && !config.isUpdateDB()) {\n \t\tint option = JOptionPane.showOptionDialog(frame,\n \t\t\t\t\"There are unsaved changes\\nDo you want to save them now?\",\n \t\t\t\t\"Unsaved changes\",JOptionPane.YES_NO_CANCEL_OPTION,\n \t\t\t\tJOptionPane.WARNING_MESSAGE, null, null, 0);\n \t\tswitch(option) {\n \t\tcase 0:\n \t\t\tportfolio.save(WORKING_FILE);\n \t\tcase 1:\n \t\t\tframe.dispose();\n \t\tdefault:\n \t\t\tbreak; \t \t\t\n \t\t}\n \t\tSystem.out.println(\"unsaved changes \" + option);\n \t} else {\n \t\tframe.dispose();\n \t}\n\t\t\n\t}",
"void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}",
"public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }",
"public void loadSaveGameFromFile(File file) {\r\n\t\t//TODO\r\n\t}",
"public static void saveGame(Puzzle puzzle, String name) throws IOException {\n FileWriter wr;\n File file = new File(System.getenv(\"APPDATA\")+\"\\\\SudokuGR04\\\\\" + name + \".txt\");\n wr = new FileWriter(file);\n puzzle.setName(name);\n try {\n //generate File in dir SudokuGR04\n wr.write(puzzle.export());\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n wr.close();\n }\n }",
"void gameSaved() {\n\t\tSystem.out.println(\"\\n\\nGame saved.\");\n\t}",
"@Test\r\n\tpublic void saveGame() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: saveGame \r\n\t\tGame game = new tsw.domain.Game();\r\n\t\tTswacct tswAcct = null;\r\n\t\tservice.saveGame(tswAcct, game, null);\r\n\t}",
"public static boolean deleteGame(final String name) {\n try {\n Session session = driver.session();\n return session.writeTransaction(new TransactionWork<Boolean>() {\n @Override\n public Boolean execute(Transaction tx) {\n return transactionDeleteGame(tx, name);\n }\n });\n\n\n }\n catch (Exception ex)\n {\n System.err.println(ex.getMessage());\n return false;\n }\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which) {\n BackupModel model = backupList.get(position);\n File f = new File(Environment.getExternalStorageDirectory() + \"/InsuranceBackup/\" + model.getFileName());\n if (f.exists()) {\n f.delete();\n if (Build.VERSION.SDK_INT >= 11) {\n recreate();\n } else {\n restartActivity();\n }\n }\n }",
"public void markFileAsNotSaved()\r\n {\r\n saved = false;\r\n }",
"public void saveGame(String fileName){\n Gson gson = new Gson();\n String userJson = gson.toJson(player);\n\n try(Writer w = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(fileName), \"UTF-8\"))) {\n w.write(userJson);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tprotected void onDestroy() {\n\t\t\n\t\tif(!isSave){\n\t\t\tMyDialog.saveTemp(this, Common.PATH);\n\t\t\tsuper.onDestroy();\n\t\t}else{\n\t\t\tsuper.onDestroy();\n\t\t}\n\t\t\n\t}",
"protected void quitGame() {\n gameOver = true;\n }",
"public void saveGame(GamePanel gamePanel) throws IOException\r\n\t{\r\n\t\tSystem.out.println(\"Saving your game.\");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(\"Game.ser\"));\r\n\t\t\tos.writeObject(gamePanel);\r\n\t\t\tos.close();\r\n\t\t}\r\n\t\tcatch (IOException ex) \r\n\t\t{\r\n ex.printStackTrace();\r\n }\r\n\t}",
"void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void exitGame() {\n System.exit(0);\n }",
"@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}",
"public static boolean delete(String name) {\n\t\ttry {\n\t\t\tdeleteDirectory(new File(\"save/\" + name));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\tSystem.out.println(\"[Info] Map \" + name + \" deleted\");\n\t\treturn true;\n\t}",
"static void save() {\n String fileName, line = \"\"; char answer;\n System.out.print(\"Enter file name to save: \"); fileName = scan.nextLine();\n File file = new File(fileName);\n \n if ( file.isFile() ) {\n System.out.printf(\"WARNING: %s exists.\\n\", fileName);\n System.out.print(\"Overwrite (y/n)? \");\n \n while (line.length() < 1) line = scan.nextLine().toUpperCase();\n answer = line.charAt(0);\n\n switch (answer) {\n case 'N': save(); // reprompt\n case 'Y': break; // save the file\n default: save();\n }\n }\n pgmInf.savePgmFileAs(fileName);\n System.out.println(\"Terrain file saved.\");\n }",
"private void save() {\n Saver.saveTeam(team);\n }",
"public void quitGame() {\n quitGame = true;\n }",
"private void log_out() {\n File xx = new File(\"resource/data/staff_id_logedin.txt\");\n if(xx.isFile()){\n xx.delete();\n }\n this.dispose();\n }",
"public void clearSessionFile() {\n try {\n sessionData = new File(wnwData, \"session.dat\");\n sessionData.createNewFile();\n BufferedWriter bufferedWriter = new BufferedWriter(\n new FileWriter(new File(wnwData, \"session.dat\")));\n bufferedWriter.write(\"\");\n bufferedWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void save() {\n File personFile = mainApp.getFilmFilePath();\n if (personFile != null) {\n mainApp.saveFilmDataToFile(personFile);\n } else {\n saveAs();\n }\n }",
"@Test\r\n\tpublic void deleteGame() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: deleteGame \r\n\t\tGame game_1 = new tsw.domain.Game();\r\n\t\tservice.deleteGame(game_1);\r\n\t}",
"public void endGame(){\t\t\r\n\t\tString inits = \r\n\t\t\t\tJOptionPane.showInputDialog(\r\n\t\t\t\t\t\t\"High Scores:\\n\"\r\n\t\t\t\t\t\t+scores[9].toString()\r\n\t\t\t\t\t\t+scores[8].toString()\r\n\t\t\t\t\t\t+scores[7].toString()\r\n\t\t\t\t\t\t+scores[6].toString()\r\n\t\t\t\t\t\t+scores[5].toString()\r\n\t\t\t\t\t\t+scores[4].toString()\r\n\t\t\t\t\t\t+scores[3].toString()\r\n\t\t\t\t\t\t+scores[2].toString()\r\n\t\t\t\t\t\t+scores[1].toString()\r\n\t\t\t\t\t\t+scores[0].toString()\r\n\t\t\t\t\t\t, \"\");\r\n\t\t\r\n\t\tcheckIfHighScore(inits);\r\n\t\t\r\n\t\ttry{\r\n\t\t\tthis.writeScoresToFile(file);\r\n\t\t} catch (Exception e){\r\n\t\t\t\r\n\t\t}\r\n\t}",
"protected void ensureExistence() {\n if (folder.exists()) return;\n\n Base.showWarning(_(\"Sketch Disappeared\"),\n _(\"The sketch folder has disappeared.\\n \" +\n \"Will attempt to re-save in the same location,\\n\" +\n \"but anything besides the code will be lost.\"), null);\n try {\n folder.mkdirs();\n modified = true;\n\n for (int i = 0; i < codeCount; i++) {\n code[i].save(); // this will force a save\n }\n calcModified();\n\n } catch (Exception e) {\n Base.showWarning(_(\"Could not re-save sketch\"),\n _(\"Could not properly re-save the sketch. \" +\n \"You may be in trouble at this point,\\n\" +\n \"and it might be time to copy and paste \" +\n \"your code to another text editor.\"), e);\n }\n }",
"@Override\n public void actionPerformed(ActionEvent actionEvent) {\n if (askUserYesNo(\"Do you really want to quit?\")) {\n if(askUserYesNo(\"Do you want to save game?\")){\n game.saveGame();\n }\n System.exit(0);\n }\n }",
"public void removeFromGame(){\n this.isInGame = false;\n }",
"public void finishGame() {\r\n gameFinished = true;\r\n }",
"public void save(){\r\n if (inputValidation()) {\r\n if (modifyingPart) {\r\n saveExisting();\r\n } else {\r\n saveNew();\r\n }\r\n closeWindow();\r\n }\r\n\r\n }",
"public static void createSaveFile( )\n {\n try\n {\n new File( \"data\" ).mkdirs( );\n PrintWriter writer = new PrintWriter( \"data/\" + Game.instance.getCurrentSaveFile( ).SAVEFILENAME + \".txt\", \"UTF-8\" );\n writer.println( \"dkeys: \" + Game.START_DIAMOND_KEY_COUNT );\n writer.close( );\n }\n catch ( IOException e )\n {\n e.printStackTrace( );\n System.exit( 1 );\n }\n }",
"public String deleteGame(){\t\t\n\t\ttry{\n\t\t\tnew GiocoDao().deleteGame(gioco);\n\t\t\treturn \"Gioco eliminato con successo!\";\n\t\t}\n\t\tcatch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public void loadGame(){\r\n Scanner in = new Scanner(System.in);\r\n System.out.println(\"Choose a saved game. ( -1 : none )\");\r\n try {\r\n File[] listOfFiles = this.showFiles(this.savePath); //Show the files that have been saved earlier\r\n int i = in.nextInt();\r\n if(i==-1){\r\n return;\r\n }\r\n String filePath = listOfFiles[i].getPath(); //Get the path of the chosen file\r\n this.load(filePath);\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"There are no saved games.\");\r\n }\r\n }",
"@Override\n public void endGame(){\n gameOver = true;\n }",
"private void deleteFile(String oldPic) {\n\n\n File fileDir = new File(oldPic);\n if (fileDir.exists()) {\n \n fileDir.delete();\n }\n\n }",
"private void finishGame(boolean again){\r\n\t\tdispose();\r\n\t\tif(again) Util.showNewGameDialog(\"Choose player names:\", cantStop.getGameBoard().getPlayers());\r\n\t}",
"public void onSaveButtonClick(ActionEvent e){\n\t\tsaveFile(false);\n\t}",
"public void saveNewRollManager()\n\t{\n\t JFileChooser chooser = new JFileChooser(); //allows the user to choose a file\n\t chooser.setCurrentDirectory(new File(\"/home/me/Documents\"));\t//sets the directory of where to find the file\n\t int retrival = chooser.showSaveDialog(null);\n\t if (retrival == JFileChooser.APPROVE_OPTION) {\n\t try \n\t {\n\t FileWriter fw = new FileWriter(chooser.getSelectedFile()+\".txt\");\n\t fw.write (getCourseToFileString ( ));\n\t for(Student b : getStudents ( ))\t \t\n\t \tfw.write(b.toFileString ( ));\n\t \tfw.close ( );\n\t \t;\n\t } \n\t catch (Exception ex) \n\t {\n\t ex.printStackTrace();\n\t }\n\t\t\tthis.saveNeed = false;\n\n\t }\n\t \n\t}",
"private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {\n rom.save(obstacle, frog);\n isSaved = true;\n }",
"public void deleteData(String filename, SaveType type);",
"private void confirmExit () {\n\t\tint ret = JOptionPane.showConfirmDialog(this, \"Save game before exiting?\");\n\t\tif (ret == 0) {\n\t\t\tcloseAfterSave = true;\n\t\t\tEngine.requestSync();\n\t\t} else if (ret == 1) {\n\t\t\tkill();\n\t\t}\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t\tFile savingDirectory = new File(savingFolder());\n\t\t\n\t\tif( !savingDirectory.isDirectory() ) {\n\t\t\tsavingDirectory.mkdirs();\n\t\t}\n\t\t\n\t\t\n\t\t//Create the file if it's necessary. The file is based on the name of the item. two items in the same directory shouldn't have the same name.\n\t\t\n\t\tFile savingFile = new File(savingDirectory, getIdentifier());\n\t\t\n\t\tif( !savingFile.exists() ) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsavingFile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"the following item couldn't be saved: \" + getIdentifier());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t\n\t\t//generate the savingTextLine and print it in the savingFile. the previous content is erased when the PrintWriter is created.\n\t\t\n\t\tString text = generateSavingTextLine();\n\n\t\ttry {\n\t\t\tPrintWriter printer = new PrintWriter(savingFile);\n\t\t\tprinter.write(text);\t\t\t\n\t\t\tprinter.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tsave();\n\t\t} \n\t}",
"private void onConfirmButtonPressed() {\r\n disposeDialogAndCreateNewGame();\r\n }",
"private void disposeDialogAndCreateNewGame() {\r\n resultDialog.dispose();\r\n Utilities.bringWindowToFront(parentFrame);\r\n game.createNewGameState(game.getBoard().getRowLength(), game.getBoard().getColumnLength());\r\n }"
] | [
"0.70587635",
"0.6960186",
"0.6877483",
"0.67412066",
"0.6733246",
"0.66870165",
"0.66529644",
"0.66306514",
"0.6591572",
"0.6577898",
"0.6562573",
"0.6532904",
"0.65088826",
"0.6473307",
"0.63936853",
"0.63642746",
"0.6363538",
"0.6316868",
"0.6307638",
"0.6299433",
"0.62835807",
"0.6283505",
"0.62767273",
"0.62724656",
"0.6272317",
"0.62468314",
"0.62198865",
"0.6196651",
"0.6159076",
"0.6158315",
"0.61555463",
"0.6142507",
"0.6130279",
"0.61028135",
"0.6087015",
"0.6065857",
"0.6052345",
"0.6029801",
"0.60297",
"0.599337",
"0.59903324",
"0.59819996",
"0.59534246",
"0.5947016",
"0.59380853",
"0.59360415",
"0.592473",
"0.59016186",
"0.5896442",
"0.5887242",
"0.5884321",
"0.58401304",
"0.58272177",
"0.58250904",
"0.58218634",
"0.5819614",
"0.5795513",
"0.5794215",
"0.5786934",
"0.5725084",
"0.5704564",
"0.57009226",
"0.56894934",
"0.5688924",
"0.5683047",
"0.56344855",
"0.5610499",
"0.5609505",
"0.56063336",
"0.5604365",
"0.5594207",
"0.5585544",
"0.5580521",
"0.55696845",
"0.5565434",
"0.55552065",
"0.55550474",
"0.55512756",
"0.5545874",
"0.55451775",
"0.5545114",
"0.5543006",
"0.5529234",
"0.5528817",
"0.5524644",
"0.55173665",
"0.55141354",
"0.5512741",
"0.5507517",
"0.5503816",
"0.5497184",
"0.5490076",
"0.5489108",
"0.54785",
"0.54594797",
"0.5458518",
"0.545822",
"0.5456347",
"0.5452843",
"0.54469407"
] | 0.6370181 | 15 |
See the class javadoc for this class: it shows the syntax supported in the configuration params. | @Override
public void onRepositoryInitialized(String dataSourceName,
String repositoryName,
ServiceBindingType sbt,
List<Field> fields,
List<Property> properties) throws Exception {
if (properties == null || properties.isEmpty()) {
logger.warn("No properties were provided to the RunSqlScript init handler.");
logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);
return;
}
// First, run a sequence of SQL scripts, where those scripts may
// optionally be packaged in a resources directory within the
// current code's packaged JAR file.
String scriptContents;
List<String> scriptNames = getSqlScriptNames(properties);
if (scriptNames == null || scriptNames.isEmpty()) {
logger.warn("Could not obtain the name of any SQL script to run.");
logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);
return;
}
for (String scriptName : scriptNames) {
String scriptPath = getSqlScriptPath(dataSourceName, repositoryName, scriptName);
if (Tools.isBlank(scriptPath)) {
logger.warn("Could not get path to SQL script.");
logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);
continue;
}
scriptContents = getSqlScriptContents(scriptPath);
if (Tools.isBlank(scriptContents)) {
logger.warn("Could not get contents of SQL script from resource " + scriptPath);
logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);
continue;
}
runScript(dataSourceName, repositoryName, scriptContents, "resource path " + scriptPath);
}
// Next, run a second sequence of SQL scripts, where those scripts may be
// stored on disk, in a resources directory within the server directory.
List<File> scriptFiles = getSqlScriptFiles(dataSourceName, repositoryName);
// Run these scripts in a sequence based on the ascending order of their filenames.
// FIXME: consider adding functionality to specify the locale for filename
// sorting here. (The current sort order is based on the system's default locale.)
Collections.sort(scriptFiles, new Comparator<File>() {
@Override
public int compare(File f1, File f2) {
return Collator.getInstance().compare(f1.getName(), f2.getName());
}
});
for (File scriptFile : scriptFiles) {
logger.trace("Reading script file " + scriptFile.getCanonicalPath());
scriptContents = FileTools.readFile(scriptFile);
if (Tools.isBlank(scriptContents)) {
logger.warn("Could not get contents of SQL script from file " + scriptFile.getCanonicalPath());
logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);
continue;
}
runScript(dataSourceName, repositoryName, scriptContents, "file " + scriptFile.getName());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getSyntax(){\n\t\treturn syntax;\n\t}",
"public String getSyntax() {\n return syntax;\n }",
"@NotNull\n String getSyntax();",
"@Override\r\n\tpublic String getFormat() {\r\n\t\treturn \"java\";\r\n\t}",
"String getExampleParameters();",
"public String configurationInfo();",
"Syntax getSyntax();",
"protected String paramString() {\n return super.paramString() + \",\" + \"caretColor=\" + caretColor + \",\"\n + \"disabledTextColor=\" + disabledTextColor + \",\" + \"editable=\"\n + isEditable + \",\" + \"margin=\" + margin + \",\"\n + \"selectedTextColor=\" + selectedTextColor + \",\"\n + \"selectionColor=\" + selectionColor;\n\n }",
"public Parameters getConfigParameters();",
"public String paramString() {\n\t\tString tail = super.paramString();\n\t\ttail = tail.substring(tail.indexOf(')') + 1);\n\t\treturn \"points=\" + points + \", lineWidth=\" + getLineWidth() + tail;\n\t}",
"@Override\r\n\tpublic String getFormat() {\r\n\t\treturn \"properties\";\r\n\t}",
"protected String paramString() {\n String horizontalAlignmentString;\n if (horizontalAlignment == LEFT) {\n\t horizontalAlignmentString = \"LEFT\";\n\t} else if (horizontalAlignment == CENTER) {\n\t horizontalAlignmentString = \"CENTER\";\n\t} else if (horizontalAlignment == RIGHT) {\n\t horizontalAlignmentString = \"RIGHT\";\n\t} else if (horizontalAlignment == LEADING) {\n\t horizontalAlignmentString = \"LEADING\";\n\t} else if (horizontalAlignment == TRAILING) {\n\t horizontalAlignmentString = \"TRAILING\";\n\t} else horizontalAlignmentString = \"\";\n String commandString = (command != null ?\n\t\t\t\tcommand : \"\");\n\n return super.paramString() +\n \",columns=\" + columns +\n \",columnWidth=\" + columnWidth +\n \",command=\" + commandString +\n \",horizontalAlignment=\" + horizontalAlignmentString;\n }",
"public Syntax getSyntax() {\n\t\treturn SyntaxJ.reporterSyntax(\n\t\t\t\tnew int[] { Syntax.ListType(), Syntax.WildcardType() },\n\t\t\t\tSyntax.WildcardType());\n\t}",
"public interface ConfigureConfiguration {\n\n\t// A list of names of configuration files\n\t@Option(shortName=\"c\", description = \"Name of one or many configuration \"\n\t\t+ \"files. Parameters in configuration files override each other. If a\"\n\t\t+ \" parameter is provided in more than one file, the first occurrence \"\n\t\t+ \" is used.\"\n\t) \n\tList<File> getConf();\n\tboolean isConf();\n\t\n}",
"public String getConfig();",
"private Configuration help() {\n final HelpFormatter formatter = new HelpFormatter();\n\n formatter.printHelp(\"-f filepath OR -u http://fake.url\", options);\n return null;\n }",
"public interface SimpleParams {\n /** Query fields and boosts. */\n public static String QF = \"qf\";\n\n /** Override the currently enabled/disabled query operators. */\n public static String QO = \"q.operators\";\n\n /** Enables {@code AND} operator (+) */\n public static final String AND_OPERATOR = \"AND\";\n /** Enables {@code NOT} operator (-) */\n public static final String NOT_OPERATOR = \"NOT\";\n /** Enables {@code OR} operator (|) */\n public static final String OR_OPERATOR = \"OR\";\n /** Enables {@code PREFIX} operator (*) */\n public static final String PREFIX_OPERATOR = \"PREFIX\";\n /** Enables {@code PHRASE} operator (\") */\n public static final String PHRASE_OPERATOR = \"PHRASE\";\n /** Enables {@code PRECEDENCE} operators: {@code (} and {@code )} */\n public static final String PRECEDENCE_OPERATORS = \"PRECEDENCE\";\n /** Enables {@code ESCAPE} operator (\\) */\n public static final String ESCAPE_OPERATOR = \"ESCAPE\";\n /** Enables {@code WHITESPACE} operators: ' ' '\\n' '\\r' '\\t' */\n public static final String WHITESPACE_OPERATOR = \"WHITESPACE\";\n /** Enables {@code FUZZY} operator (~) */\n public static final String FUZZY_OPERATOR = \"FUZZY\";\n /** Enables {@code NEAR} operator (~) */\n public static final String NEAR_OPERATOR = \"NEAR\";\n}",
"private String inFormat() {\n File f = cfg.getReadFromFile();\n if (f != null) {\n return \" in format file \" + f.getPath();\n }\n return \" in format \" + StringUtils.defaultString(cfg.getName(), \"(unnamed)\");\n }",
"public String getCommandLinePattern();",
"protected void configureTokenizer()\r\n\t{\r\n\t\tLogger.debug(\"Configuring syntax tokenizer\", Level.GUI,this);\r\n\t\ttry\r\n\t\t{\r\n\t\t\tLogger.debug(\"Setting flags\", Level.GUI,this);\r\n\t\t\t// Use the standard configuration as a base\r\n\t\t\tm_properties = new StandardTokenizerProperties();\r\n\t\t\t// Return token positions and line comments\r\n\t\t\tm_properties.setParseFlags( Flags.F_TOKEN_POS_ONLY | Flags.F_RETURN_LINE_COMMENTS );\r\n\t\t\t// Python comments\r\n\t\t\t// Block comments are parsed manually\r\n\t\t\tm_properties.addLineComment(\"#\");\n\t\t\t// Python strings\r\n\t\t\tm_properties.addString(\"\\\"\", \"\\\"\", \"\\\"\");\r\n\t\t\tm_properties.addString(\"\\'\", \"\\'\", \"\\'\");\r\n\t\t\t// Normal whitespaces\r\n\t\t\tm_properties.addWhitespaces(TokenizerProperties.DEFAULT_WHITESPACES);\r\n\t\t\t// Normal separators\r\n\t\t\tm_properties.addSeparators(TokenizerProperties.DEFAULT_SEPARATORS);\r\n\t\t\t// Add our keywords\r\n\t\t\tLogger.debug(\"Adding keywords\", Level.GUI,this);\r\n\t\t\tfor(String word : m_listFunctions)\r\n\t\t\t{\r\n\t\t\t\tm_properties.addKeyword(word);\r\n\t\t\t}\r\n\t\t\tfor(String word : m_listModifiers)\r\n\t\t\t{\r\n\t\t\t\tm_properties.addKeyword(word);\r\n\t\t\t}\r\n\t\t\tfor(String word : m_listLanguage)\r\n\t\t\t{\r\n\t\t\t\tm_properties.addKeyword(word);\r\n\t\t\t}\r\n\t\t\tfor(String word : m_listConstants)\r\n\t\t\t{\r\n\t\t\t\tm_properties.addKeyword(word);\r\n\t\t\t}\r\n\t\t\t// Special symbols\r\n\t\t\tLogger.debug(\"Adding symbols\", Level.GUI,this);\r\n\t\t\tm_properties.addSpecialSequence(\"\\\"\\\"\\\"\");\r\n\t\t\tm_properties.addSpecialSequence(\"{\");\r\n\t\t\tm_properties.addSpecialSequence(\"}\");\r\n\t\t\tm_properties.addSpecialSequence(\"(\");\r\n\t\t\tm_properties.addSpecialSequence(\")\");\r\n\t\t\tm_properties.addSpecialSequence(\"[\");\r\n\t\t\tm_properties.addSpecialSequence(\"]\");\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public interface Config {\n int MAX_IP_RECORD = 10;\n String ADB_PATH = \"adb_path\";\n String IP_HISTORY = \"ip_history\";\n String TITLE = \"Wifi Adb Ultimate\";\n String HELP = \"https://github.com/Sausure/WIFIADB/tree/master/WIFIADBIntelliJPlugin\";\n String DEFAULT_PORT = \"5555\";\n String EMPTY = \"\";\n String SPACE = \" \";\n String ANY_SPACES = \"\\\\s{1,}\";\n String ENTER = \"\\\\n\";\n String TAB = \"\\\\t\";\n String DEFAULT_PROGRESS_TIP = \"Wait a moment\";\n String DAEMON_FLAG = Utils.concat(SPACE,\"daemon\",SPACE);\n String IP_PATTERN = \"\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}:\\\\d{1,5}\";\n}",
"private String addOptions() {\n\t\tStringBuilder tag = new StringBuilder();\n\t\tint OptionsNumber = Integer.parseInt(parameters[0]);\n\t\t// Nine Parameters: OptionsNumber, Option1, Option1Tag, Option2, Option2Tag, Option3, Option3Tag, Option4, Option4Tag\n\t\t// Minimum Three Parameters, Maximum Nine\n\t\t// If OptionsNumber = 1, Use Option1 and Option1Tag only. If OptionsNumber = 2, Use Option1 and Option2.\n\t\ttag.append(\"options:[\");\n\t\ttag.append(\"[\" + parameters[1] + \"|\" + parameters[2] + \"]\");\n\t\tif (OptionsNumber > 1) {\n\t\t\ttag.append(\", [\" + parameters[3] + \"|\" + parameters[4] + \"]\");\n\t\t}\n\t\tif (OptionsNumber > 2) {\n\t\t\ttag.append(\", [\" + parameters[5] + \"|\" + parameters[6] + \"]\");\n\t\t}\n\t\tif (OptionsNumber > 3) {\n\t\t\ttag.append(\", [\" + parameters[7] + \"|\" + parameters[8] + \"]\");\n\t\t}\n\t\ttag.append(\"]\");\n\t\treturn tag.toString();\n\n\t}",
"public String usage()\n {\n return (\"Common [optional] options supported by Minitest:\\n\"\n + \"(Note: assumes inputDir=.\\\\tests\\\\api)\\n\"\n + super.usage()); // Grab our parent classes usage as well\n }",
"public interface ValueType {\n /** synonyms. */\n String SYNONYMS = \"synonyms\";\n /** patterns. */\n String PATTERNS = \"patterns\";\n }",
"String getParamsAsString(boolean bWithParantheses);",
"@Test(expected = ConfigurationException.class)\n public void testInvalidSyntax3() throws Exception {\n ConfigurationParser parser = new ConfigurationParser();\n\n parser.parse(CharSource.wrap(\"{ a: 1 minutes: 2\"), FlatObject.class);\n }",
"void setExampleParameters(String strExampleParams);",
"public void printConfig();",
"@Override\n\tpublic String getDescription() {\n\t\treturn \"?\";\n\t}",
"interface MozartExampleOptions extends MozartOptions {\n @Description(\"Path to the custom input file (customer data table)\")\n ValueProvider<String> getInputCustomDataFile();\n\n void setInputCustomDataFile(ValueProvider<String> value);\n\n @Description(\"Custom data column names\")\n ValueProvider<String> getCustomDataColumnNames();\n\n void setCustomDataColumnNames(ValueProvider<String> value);\n }",
"public List<String> getExampleFormats() {\r\n return exampleFormats;\r\n }",
"@Test(expected = ConfigurationException.class)\n public void testInvalidSyntax4() throws Exception {\n ConfigurationParser parser = new ConfigurationParser();\n\n parser.parse(CharSource.wrap(\"{ 7: 1 }\"), FlatObject.class);\n }",
"@Override\n public String commandDocumentation() {\n return (\"Displays the documentation of various commands.\");\n }",
"@Override\n protected void options()\n {\n super.options();\n addOption(Opt.APPLICATION_ID);\n addOption(Opt.SERVER_ID);\n addOption(Opt.CATEGORY);\n addOption(Opt.NAME, \"The name of the label\");\n }",
"@Test(expected = ConfigurationException.class)\n public void testInvalidSyntax2() throws Exception {\n ConfigurationParser parser = new ConfigurationParser();\n\n parser.parse(CharSource.wrap(\"{ a: 1\"), FlatObject.class);\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn \"Incorrect Configuration: \"+super.toString();\r\n\t}",
"public abstract String getConfig();",
"C getConfiguration();",
"abstract ConfigDescription getDescription();",
"@Override\n public String kind() {\n return \"@param\";\n }",
"void configuration(String source, String name, String value);",
"public abstract String commandDocumentation();",
"UsagePattern getUsagePattern();",
"public interface Params\n{\n\tpublic static final String DEFAULT_PATH=\"default_path\";\n\tpublic static final String DEFAULT_NAME=\"default_name\";\n\tpublic static final String MODE=\"mode\";\n\tpublic static final String FILE_TYPE=\"file_type\";\n}",
"@Configuration\n public Option[] configuration() {\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.sling\", \"org.apache.sling.distribution.core\");\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.sling\", \"org.apache.sling.distribution.api\");\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.jackrabbit.vault\",\"org.apache.jackrabbit.vault\");\n return new Option[]{\n baseConfiguration(),\n slingQuickstart(),\n logback(),\n // build artifact\n slingDistribution(),\n // testing\n defaultOsgiConfigs(),\n SlingOptions.webconsole(),\n CoreOptions.mavenBundle(\"org.apache.felix\", \"org.apache.felix.webconsole.plugins.ds\", \"2.0.8\"),\n junitBundles()\n };\n }",
"@Override\r\n\tpublic String getNotationExample()\r\n\t{\r\n\t\treturn \"(turn 'direction')\";\r\n\t}",
"@Override\r\n\tpublic boolean supports(ConfigAttribute attribute) {\n\t\treturn true;\r\n\t}",
"public class_config(){\n\t\t\n\t\tformat_date=\"dd/MM/yyyy\";\n\t\tcurrency='€';\n\t\tdecimals=2;\n\t\tlanguage=\"eng\";\n\t\ttheme=\"Metal\";\n\t\tfile_format=\"json\";\n\t\t\n\t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getJsonConfiguration() != null)\n sb.append(\"JsonConfiguration: \").append(getJsonConfiguration()).append(\",\");\n if (getParquetConfiguration() != null)\n sb.append(\"ParquetConfiguration: \").append(getParquetConfiguration());\n sb.append(\"}\");\n return sb.toString();\n }",
"private static void printRunOptions(){\n\t\tSystem.out.println(\"Run options:\");\n\t\tSystem.out.println(\" -simple <configFile> <pathToApplication> <synthesis(true/false)>\");\n\t\tSystem.out.println(\" -simpleSpeedup <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -sweep <configFile> <pathToApplication> <sweepConfig> <parallelism(integer)> <synthesis(true/false)>\");\n\t\tSystem.out.println(\" -sweepRemote <configFile> <pathToApplication> <sweepConfig> <parallelism(integer)> <synthesis(true/false)> <hostAddress> <hostPort>\");\n\t\tSystem.out.println(\" -synthesize <configFile> <pathToApplication> <methodName> <scheduleCDFG(true/false)>\");\n\t\tSystem.out.println(\" -test <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -speedup <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -testCGRAVerilog <configFile> <pathToApplication>\");\n\t}",
"Configuration getConfiguration();",
"Configuration getConfiguration();",
"Configuration getConfiguration();",
"Configuration getConfiguration();",
"public interface Configuration {\n// /**\n// * 获取主分词器词库\n// * @return\n// */\n// public String getMainDic();\n// /**\n// * 获取城市词路径\n// * @return String 城市词路径\n// */\n// public String getCityDicionary();\n\n /**\n * 获取城区词路径\n *\n * @return String 获取城区词路径\n */\n public String getRegionDicionary();\n\n /**\n * 获取\"工程师\"类词库路径\n *\n * @return String \"工程师\"类词库路径\n */\n public String getTheoremDicionary();\n\n /**\n * 获取\"总工程师\"类词库路径\n *\n * @return String \"总工程师\"类词库路径\n */\n public String getEngineerDicionary();\n\n /**\n * 获取垃圾类词库路径\n *\n * @return String 垃圾类词库路径\n */\n public String getConjunctionDicionary();\n\n /**\n * 获取多义类词库路径\n *\n * @return String 多义词库路径\n */\n public String getPolysemyDicionary();\n\n /**\n * 获取多职位前词库路径\n *\n * @return String 多职位前词库路径\n */\n public String getManagerDicionary();\n\n /**\n * 获取多职位后词库路径\n *\n * @return String 多职位后词库路径\n */\n public String getAssistantDicionary();\n\n /**\n * 获取数字词库路径\n *\n * @return String 数字词库路径\n */\n public String getNumberDicionary();\n\n /**\n * 获取无用词词库路径\n *\n * @return String 无用词词库路径\n */\n public String getWorthlessDicionary();\n\n /**\n * 获取标签词词库路径\n *\n * @return String 标签词词库路径\n */\n public String getTagDicionary();\n\n /**\n * 获取公司性质词词库路径\n *\n * @return String 公司性质词词库路径\n */\n public String getCorporationDicionary();\n// /**\n// * 获取ik分词器的主路径\n// * @return\n// */\n// public String getIkMainFilePath();\n\n}",
"public String listPatterns() {\n return \"Full list of patterns\";\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getConfiguration() != null)\n sb.append(\"Configuration: \").append(getConfiguration()).append(\",\");\n if (getGrafanaVersion() != null)\n sb.append(\"GrafanaVersion: \").append(getGrafanaVersion()).append(\",\");\n if (getWorkspaceId() != null)\n sb.append(\"WorkspaceId: \").append(getWorkspaceId());\n sb.append(\"}\");\n return sb.toString();\n }",
"@Override\n \tprotected void configureFormatting(FormattingConfig c) {\n \t\tEMFPatternLanguageGrammarAccess grammar = (EMFPatternLanguageGrammarAccess) getGrammarAccess();\n \t\tc.setLinewrap(0, 1, 2).before(grammar.getSL_COMMENTRule());\n \t\tc.setLinewrap(0, 1, 2).before(grammar.getML_COMMENTRule());\n \t\tc.setLinewrap(0, 1, 1).after(grammar.getML_COMMENTRule());\n \t\t\n \t\tfor (Keyword keyword : grammar.findKeywords(\".\")) {\n \t\t\tc.setNoSpace().before(keyword);\n \t\t\tc.setNoSpace().after(keyword);\n \t\t}\n \t\tfor (Keyword keyword : grammar.findKeywords(\":\")) {\n \t\t\tc.setSpace(\" \").before(keyword);\n \t\t\tc.setSpace(\" \").after(keyword);\n \t\t}\n \t\tfor (Keyword keyword : grammar.findKeywords(\"::\")) {\n\t\t\tc.setNoSpace().before(keyword);\n \t\t\tc.setNoSpace().after(keyword);\n \t\t}\n \t\tfor (Keyword keyword : grammar.findKeywords(\",\")) {\n \t\t\tc.setNoSpace().before(keyword);\n \t\t\tc.setSpace(\" \").after(keyword);\n \t\t}\n\t\tfor (Keyword keyword : grammar.findKeywords(\"(\")) {\n \t\t\tc.setNoSpace().before(keyword);\n \t\t\tc.setNoSpace().after(keyword);\n \t\t}\n\t\tAnnotationElements annotationAccess = grammar.getAnnotationAccess();\n\t\tfor (Keyword keyword : grammar.findKeywords(\")\")) { \n\t\t\tif (!keyword.equals(annotationAccess.getRightParenthesisKeyword_2_3())) {\n\t\t\t\tc.setNoSpace().before(keyword);\n\t\t\t\tc.setNoSpace().after(keyword);\n\t\t\t} else {\n\t\t\t\tc.setLinewrap(1).after(keyword);\n\t\t\t}\n\t\t}\n\t\tfor (Keyword keyword : grammar.findKeywords(\"@\")) {\n\t\t\tc.setNoSpace().after(keyword);\n\t\t}\n \t\t\n \t\tEMFPatternModelElements patternModelAccess = grammar.getEMFPatternModelAccess();\n \t\tc.setLinewrap(2).after(patternModelAccess.getPackageNameAssignment_1_1());\n \t\tc.setLinewrap(1).after(patternModelAccess.getImportPackagesAssignment_2());\n \t\tc.setLinewrap().before(patternModelAccess.getPatternsAssignment_3());\n \t\t\n\t\t\n\t\tPatternElements patternAccess = grammar.getPatternAccess();\n\t\tc.setLinewrap(1).after(patternAccess.getAnnotationsAssignment_0());\n\t\t\n \t\tPatternBodyElements patternBodyAccess = grammar.getPatternBodyAccess();\n \t\tc.setLinewrap(1, 1, 2).before(patternBodyAccess.getConstraintsAssignment_3_0());\n \t\tc.setLinewrap(1, 1, 2).before(patternBodyAccess.getRightCurlyBracketKeyword_4());\n \t\tc.setLinewrap(2).after(patternBodyAccess.getRightCurlyBracketKeyword_4());\n \t\tc.setIndentationIncrement().after(patternBodyAccess.getLeftCurlyBracketKeyword_2());\n \t\tc.setIndentationDecrement().before(patternBodyAccess.getRightCurlyBracketKeyword_4());\n \t}",
"public interface Config {\n\t\t/**\n\t\t * the IdentityX policy which should be used for authentication\n\t\t *\n\t\t * @return the policy name\n\t\t */\n\t\t@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();\n\n\t\t/**\n\t\t * the IdentityX application to be used\n\t\t *\n\t\t * @return the application Id\n\t\t */\n\t\t@Attribute(order = 200, validators = { RequiredValueValidator.class })\n\t\tString applicationId();\n\t\t\n\t\t\n\t\t/**\n\t\t * the IdentityX Description to be used\n\t\t *\n\t\t * @return the transactionDescription\n\t\t */\n\t\t@Attribute(order = 300, validators = { RequiredValueValidator.class })\n\t\tdefault String transactionDescription() {\n\t\t\treturn \"OpenAM has Requested an Authentication\";\n\t\t}\n\t}",
"void setUsagePattern(UsagePattern usagePattern);",
"public interface Config {\n public final String contentOfDocument=\"contentOfDoc\";\n public final String docId=\"docId\";\n public final String baseIp=\"http://irlab.daiict.ac.in/Annotation_Interface\";\n public final String sentenceFolder=\"sentences\";\n public final String savedSentenceEnd=\"savedSentenceEnd\";\n public final String savedSentenceStart=\"savedSentenceStart\";\n public final String docName=\"doc_name\";\n public final String relationFolder=\"relationsFolder\";\n public final String savedRelation=\"savedRelation\";\n public final String loginPrefs=\"loginFolder\";\n public final String isLoggedIn=\"isLoggedIn\";\n public final String userName=\"userName\";\n public final String password=\"password\";\n public final String relation=\"relation\";\n public final String checkedRelation=\"checkedRelation\";\n}",
"protected abstract String getCommandLine() throws ConfigException;",
"public interface SeparatorConfiguration {\n\n String get();\n\n}",
"@Test(expected = ConfigurationException.class)\n public void testInvalidSyntax1() throws Exception {\n ConfigurationParser parser = new ConfigurationParser();\n\n parser.parse(CharSource.wrap(\"{ a: \\\"1\\\". b: \\\"2\\\" }\"), FlatObject.class);\n }",
"@Override\r\n public String toString() {\r\n return \"Parameter Code: \" + this.code + \"\\nDescription: \" + this.description + \"\\nCategory Description: \" + this.categoryDescription;\r\n }",
"public final /* synthetic */ String zzqq() throws Exception {\n return this.zzckn.getString(\"flag_configuration\", \"{}\");\n }",
"@Override\n\tpublic String getHelp() {\n\n\t\treturn \"EXAMINE|EXAMINAR\";\n\t}",
"public String getHelp() {\n\t\treturn \"DCAU type\";\n\t}",
"private static void printUsage()\n {\n StringBuilder usage = new StringBuilder();\n usage.append(String.format(\"semantika %s [OPTIONS...]\\n\", Environment.QUERYANSWER_OP));\n usage.append(\" (to execute query answer)\\n\");\n usage.append(String.format(\" semantika %s [OPTIONS...]\\n\", Environment.MATERIALIZE_OP));\n usage.append(\" (to execute RDB2RDF export)\");\n String header = \"where OPTIONS include:\"; //$NON-NLS-1$\n String footer =\n \"\\nExample:\\n\" + //$NON-NLS-1$\n \" ./semantika queryanswer -c application.cfg.xml -l 100 -sparql 'SELECT ?x WHERE { ?x a :Person }'\\n\" + //$NON-NLS-1$\n \" ./semantika rdb2rdf -c application.cfg.xml -o output.n3 -f N3\"; //$NON-NLS-1$\n mFormatter.setOptionComparator(null);\n mFormatter.printHelp(400, usage.toString(), header, sOptions, footer);\n }",
"public void setCommandLinePattern(String pattern);",
"private static String getUsage()\n {\n final StringBuilder usage = new StringBuilder(400);\n\n // Empty line before usage info\n usage.append(\"\\n \" \n // Describe commands/options\n + \"those <option> <command> <cmd-options> \\n\"\n + \" Options:\\n\"\n + \"\\t-v : Allows stack trace to be printed.\\n\" \n + \" Commands:\\n\"\n + getCreateUsage()\n + \" help\\n\" \n + \"\\t Displays this help message\\n\" \n + \" version\\n\" \n + \"\\t Displays the SDK version and supported Core APIs\\n\");\n\n return usage.toString();\n }",
"default boolean supportsOptions() {\n return false;\n }",
"public Object\tgetConfiguration();",
"@Override\r\n\tpublic String getNotationExample()\r\n\t{\r\n\t\treturn \"(in-subrange 'X1-number', 'Y1-number', 'X2-number', 'Y2-number')\";\r\n\t}",
"public String getFormat() {\n/* 206 */ return getValue(\"format\");\n/* */ }",
"@Override\n public String getDescription() {\n return \"Tagged data upload\";\n }",
"String documentFormat();",
"@Override\n\tpublic YamlDocumentOptions options() {\n\t\treturn super.options();\n\t}",
"@Override\n\tpublic void config(StarConfig config) {\n\t\t\n\t}",
"public String parameterComment() {\n return parameterComment;\n }",
"public List<String> getParametersLabel() {\n\t\treturn PARAMETERS;\n\t}",
"public interface Config {\r\n\r\n @Attribute(order = 100, validators = {RequiredValueValidator.class})\r\n String rquiAttributeName();\r\n }",
"public String getParameters() {\r\n\t\t\r\n\t\tString strLength = String.valueOf(length);\r\n\t\tString strWidth = String.valueOf(width);\r\n\t\tString strHeight = String.valueOf(height);\r\n\t\t\r\n\t\treturn \"Length: \" + strLength + \"\\nWidth: \" + strWidth + \"\\nHeight: \" + strHeight;\r\n\t}",
"public void printOptions() {\n\t\t\n\t}",
"public void helpByParamsError() {\n System.err.println(\"The command syntax is wrong.\");\n System.err.println(\"You can write the command in the following way:\");\n System.err.println(\"java -jar portScanner-1.5.jar ipOrElseDomain minPortRange maxPortRange [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar 127.0.0.1 0 65535 file.txt\");\n System.err.println(\"or else\");\n System.err.println(\"java -jar PortScanner-1.5.jar ipOrElseDomain [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar cloudflare.com file.txt\");\n System.err.println(\"The file is not obligatory option.\");\n System.exit(1);\n }",
"@Override\n\tpublic String getDescription() {\n\t\treturn \"This extension allows setting of different winds at different altitudes.\";\n\t}",
"@Override\n public String getDescription() {\n return \"List all of the geometry commands.\";\n }",
"public interface PropertyDefinition {\n\n String getLocalName();\n\n FormatConverter getConverter();\n\n List<String> getValues();\n\n boolean isMultiValued();\n\n}",
"@ApiModelProperty(required = true, value = \"The description of the configuration parameter.\")\n public String getDescription() {\n return description;\n }",
"void compileParameterList() {\n tagBracketPrinter(PAR_LIST_TAG, OPEN_TAG_BRACKET);\n try {\n compileParameterListHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(PAR_LIST_TAG, CLOSE_TAG_BRACKET);\n }",
"private Syntaxes() {\r\n\t\tthis.map = new HashMap();\r\n\r\n\t\tregisterSyntax(new DirectoryStringSyntax());\r\n\t\tregisterSyntax(new OidSyntax());\r\n\t\tregisterSyntax(new IA5StringSyntax());\r\n\t\tregisterSyntax(new TelephoneNumberSyntax());\r\n\t\tregisterSyntax(new PrintableStringSyntax());\r\n\t\tregisterSyntax(new GuideSyntax());\r\n\t\tregisterSyntax(new PostalAddressSyntax());\r\n\t\tregisterSyntax(new NumericStringSyntax());\r\n\t\tregisterSyntax(new OctetStringSyntax());\r\n\t\tregisterSyntax(new DeliveryMethodSyntax());\r\n\t\tregisterSyntax(new TelexNumberSyntax());\r\n\t\tregisterSyntax(new TeletexTerminalIdentifierSyntax());\r\n\t\tregisterSyntax(new FacsimileTelephoneNumberSyntax());\r\n\t\tregisterSyntax(new DistinguishedNameSyntax());\r\n\r\n\t}",
"@Override\n\tpublic IKeyword option() { return option; }",
"@Override\n public boolean hasAdditionalConfig() { return true; }",
"public interface RuntimeConfigurationBackend {\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n Boolean getBoolean(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setBoolean(String name, boolean value);\n\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n Integer getInteger(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setInt(String name, int value);\n\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n Long getLong(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setLong(String name, long value);\n\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n Float getFloat(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setFloat(String name, float value);\n\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n Double getDouble(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setDouble(String name, double value);\n\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n String getString(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setString(String name, String value);\n}",
"String getConfigName();",
"private void printUsage() {\n \n // new formatter\n HelpFormatter formatter = new HelpFormatter();\n \n // add the text and print\n formatter.printHelp(\"arara [file [--log] [--verbose] [--timeout N] [--language L] | --help | --version]\", commandLineOptions);\n }",
"public String toString() {\n return getClass().getName() + \"[\" + paramString() + \"]\";\n }",
"public abstract Configuration configuration();",
"public void setFormat(String value) {\n/* 198 */ setValue(\"format\", value);\n/* */ }",
"java.lang.String getParameterValue();",
"ParameterConfiguration getParameterConfiguration(String name);"
] | [
"0.6444194",
"0.6255276",
"0.6220834",
"0.5768367",
"0.57495666",
"0.5711459",
"0.55307764",
"0.5494919",
"0.54494405",
"0.5374763",
"0.53542894",
"0.53465754",
"0.53124326",
"0.52367556",
"0.51359105",
"0.5109411",
"0.51017874",
"0.5101079",
"0.50912243",
"0.5078564",
"0.5053593",
"0.50477135",
"0.50436324",
"0.50362915",
"0.5034208",
"0.50254995",
"0.50172657",
"0.49984124",
"0.49918923",
"0.49740452",
"0.49556813",
"0.49496615",
"0.49457872",
"0.4918441",
"0.49117842",
"0.49082282",
"0.49036625",
"0.48919734",
"0.4886221",
"0.48846555",
"0.486545",
"0.48583698",
"0.4853503",
"0.48502055",
"0.4849586",
"0.4847034",
"0.48408556",
"0.4827041",
"0.48212233",
"0.481651",
"0.48136076",
"0.48136076",
"0.48136076",
"0.48136076",
"0.4813013",
"0.48092434",
"0.4799504",
"0.47983152",
"0.47914645",
"0.47898996",
"0.47889152",
"0.47727755",
"0.47686478",
"0.47680724",
"0.47602087",
"0.47579193",
"0.47531438",
"0.47477898",
"0.47405925",
"0.47357994",
"0.47327563",
"0.4727578",
"0.4724986",
"0.47194135",
"0.4716885",
"0.4716127",
"0.4705832",
"0.4701999",
"0.47012675",
"0.4699381",
"0.46973467",
"0.46951112",
"0.4688097",
"0.46878096",
"0.46848303",
"0.46843076",
"0.46834284",
"0.46803316",
"0.46778837",
"0.46712074",
"0.46695334",
"0.46645084",
"0.46635047",
"0.46628553",
"0.466123",
"0.46571144",
"0.4655895",
"0.46540064",
"0.46479875",
"0.46418348",
"0.46269315"
] | 0.0 | -1 |
Returns a string representation of a resource available to the current class. | private String getStringFromResource(String resourcePath) {
String str = "";
ClassLoader classloader = getClass().getClassLoader();
if (classloader == null) {
return str;
}
if (logger.isTraceEnabled()) {
URL resourceurl = classloader.getResource(resourcePath);
logger.trace("URL=" + resourceurl.toString());
}
InputStream instream = classloader.getResourceAsStream(resourcePath);
if (instream == null) {
logger.warn("Could not read resource from path " + resourcePath);
return null;
}
try {
str = stringFromInputStream(instream);
} catch (IOException ioe) {
logger.warn("Could not create string from stream: ", ioe);
return null;
}
return str;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@JsonIgnore\n public String getResource() {\n return this.resource;\n }",
"abstract public String asString(final A resource);",
"public String toString() {\r\n\r\n\t\tStringBuilder buffer = new StringBuilder();\r\n\r\n\t\tbuffer.append(\"iddiaryresource=[\").append(iddiaryresource).append(\"] \");\r\n\t\tbuffer.append(\"typediaryresource=[\").append(typediaryresource).append(\"] \");\r\n\t\tbuffer.append(\"urldiaryresource=[\").append(urldiaryresource).append(\"] \");\r\n\r\n\t\treturn buffer.toString();\r\n\t}",
"@Override\r\n public String toString()\r\n {\r\n return \"baseResource=[\" + baseResource_ + \"], subResource=[\"\r\n + subResource_ + \"]\";\r\n }",
"String getResourceName();",
"public String getResourceName();",
"@Override\n\tpublic String toString() {\n\t\tif (m_URL != null) {\n\t\t\tString path = m_URL.getPath();\n\t\t\tString rt = null;\n\t\t\tif (path.endsWith(ServerConstants.CONSUMER_SERVICE_NAME)) {\n\t\t\t\trt = \"C\";\n\t\t\t} else if (path.endsWith(ServerConstants.PRIMARY_PRODUCER_SERVICE_NAME)) {\n\t\t\t\trt = \"PP\";\n\t\t\t} else if (path.endsWith(ServerConstants.SECONDARY_PRODUCER_SERVICE_NAME)) {\n\t\t\t\trt = \"SP\";\n\t\t\t} else if (path.endsWith(ServerConstants.ONDEMAND_PRODUCER_SERVICE_NAME)) {\n\t\t\t\trt = \"ODP\";\n\t\t\t}\n\t\t\treturn \"[\" + rt + \":\" + m_URL.getHost() + \"/\" + m_resourceID + \"]\";\n\t\t}\n\t\treturn \"[null/\" + m_resourceID + \"]\";\n\t}",
"String getResourceType();",
"String encodeResourceToString(IBaseResource theResource) throws DataFormatException;",
"public ResourceInfo getResource() {\n\t\treturn resource;\n\t}",
"ResourceType getResource();",
"String getResource();",
"Resource getResource();",
"public static String encodeResourceToString(IBaseResource theResource) {\n\t\tFhirContext ctx = FhirContext.forR4();\n\t\tIParser parser = ctx.newJsonParser();\n\t\treturn parser.encodeResourceToString(theResource);\n\t}",
"public String getResourceName() {\n return this.resourceName;\n }",
"public String getResourceType( )\r\n {\r\n return _strResourceType;\r\n }",
"String resourceType();",
"public String getResourceName() {\n return resourceName;\n }",
"public IResource getResource();",
"public String getResourceName() {\n return getBaseName() + getNameSuffix();\n }",
"public String getResourceName() {\n return resourceName;\n }",
"private MyResource() {\n System.out.printf(\"[%s] has been created \\n\", MyResource.class.getSimpleName());\n }",
"@Override\r\n public String print() {\r\n String attribute = \"Title of resource:\\t\" + getTitle() + \"\\n\" + \"url of resource:\\t\" + url;\r\n System.out.println(attribute);\r\n return attribute;\r\n }",
"Resource getResource() {\n\t\treturn resource;\n\t}",
"public Resource getResource() {\n return resource;\n }",
"public String getResourceType() {\n return this.ResourceType;\n }",
"protected String getResourceName() {\n\t\treturn resourceName;\n\t}",
"public Resource getResource(){\n return res;\n }",
"public String getResourceType() {\n return this.resourceType;\n }",
"public String resource_name () throws BaseException {\n throw new BaseException(\"Not implemented\");\n }",
"public interface INamedResource {\n String getShortName();\n}",
"public String getResourceLink() {\n\t\treturn resourceLink;\n\t}",
"@Override\n public String toString() {\n // Chargement du traducteur\n final ResourceBundle bundle = GeneralConstant.BUNDLE;\n switch (this) {\n // Classe Archer\n case ARCHER:\n return bundle.getString(\"ARCHER\");\n // Classe Assassin\n case ASSASSIN:\n return bundle.getString(\"ASSASSIN\");\n // Classe Mage Noir\n case BLACKMAGE:\n return bundle.getString(\"BLACKMAGE\");\n // Aucune classe\n case NONE:\n return bundle.getString(\"NONE\");\n // Classe PnJ\n case PNJ:\n return bundle.getString(\"PNJ\");\n // Classe Guerrier\n case WARRIOR:\n return bundle.getString(\"WARRIOR\");\n // Classe Magicien Blanc\n case WHITEMAGE:\n return bundle.getString(\"WHITEMAGE\");\n // Classe par défaut (NONE)\n default:\n return bundle.getString(\"NONE\");\n }\n }",
"public String getResourceName() {\n\treturn this.resrcName;\n }",
"public String toString() {\n\t\t\tswitch(this) {\n\t\t\tcase INSERT_BSI_RESOURCES_BASE:{\n\t\t\t\treturn \"INSERT INTO lry.aut_bsi_prc_cfg_resources(CFG_ID, RSC_NAME, RSC_DESCRIPTION, RSC_LOCATION_INPUT, RSC_LOCATION_OUTPUT, RSC_ITEM, RSC_ITEM_KEY) VALUES(?,?,?,?,?,?,?);\";\n\t\t\t}\n\t\t\tcase SELECT_ALL_BSI_RESOURCES_BASE:{\n\t\t\t\treturn \"SELECT RSC_ID FROM lry.aut_bsi_prc_cfg_resources;\";\n\t\t\t}\n\t\t\tcase SELECT_BSI_RESOURCES_BASE_BY_CFG_BASE_ID:{\n\t\t\t\treturn \"SELECT RSC_ID FROM lry.aut_bsi_prc_cfg_resources WHERE CFG_ID=?;\";\n\t\t\t}\n\t\t\tdefault:{\n\t\t\t\treturn this.name();\n\t\t\t}\n\t\t\t}\n\t\t}",
"public abstract IResource getResource();",
"public String getResourceClassName()\r\n {\r\n return getSemanticObject().getProperty(swb_resourceClassName);\r\n }",
"public String getResourceType () {\n return resourceType;\n }",
"@Pure\n\tpublic Resource eResource() {\n\t\treturn getJvmTypeParameter().eResource();\n\t}",
"public String getResourceType() {\n return resourceType;\n }",
"@Override\n public String toString() {\n return Helper.concat(this.getClass().getName(), \"{\",\n \"id:\", getId(),\n \", name:\", getName(),\n \", positions:\", positions,\n \", resourceRoles:\", resourceRoles,\n \"}\");\n }",
"public String getName(Class<? extends Resource> resourceType, OgemaLocale locale, boolean useDefaultLanguage);",
"public String getResourceType () {\n return resourceType;\n }",
"public String getResourceType() {\n\t\treturn _resourceType;\n\t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getVersion() != null)\n sb.append(\"version: \").append(getVersion()).append(\",\");\n if (getResource() != null)\n sb.append(\"resource: \").append(getResource()).append(\",\");\n if (getPath() != null)\n sb.append(\"path: \").append(getPath()).append(\",\");\n if (getHttpMethod() != null)\n sb.append(\"httpMethod: \").append(getHttpMethod()).append(\",\");\n if (getHeaders() != null)\n sb.append(\"headers: \").append(getHeaders().toString()).append(\",\");\n if (getMultiValueHeaders() != null)\n sb.append(\"multiValueHeaders: \").append(getMultiValueHeaders().toString()).append(\",\");\n if (getQueryStringParameters() != null)\n sb.append(\"queryStringParameters: \").append(getQueryStringParameters().toString()).append(\",\");\n if (getMultiValueQueryStringParameters() != null)\n sb.append(\"multiValueQueryStringParameters: \").append(getMultiValueQueryStringParameters().toString()).append(\",\");\n if (getPathParameters() != null)\n sb.append(\"pathParameters: \").append(getPathParameters().toString()).append(\",\");\n if (getStageVariables() != null)\n sb.append(\"stageVariables: \").append(getStageVariables().toString()).append(\",\");\n if (getRequestContext() != null)\n sb.append(\"requestContext: \").append(getRequestContext().toString()).append(\",\");\n if (getBody() != null)\n sb.append(\"body: \").append(getBody()).append(\",\");\n if (getIsBase64Encoded() != null)\n sb.append(\"isBase64Encoded: \").append(getIsBase64Encoded());\n sb.append(\"}\");\n return sb.toString();\n }",
"public String resourceId() {\n return this.resourceId;\n }",
"public String resourceId() {\n return this.resourceId;\n }",
"public String resourceId() {\n return this.resourceId;\n }",
"public String resourceId() {\n return this.resourceId;\n }",
"public String resourceId() {\n return this.resourceId;\n }",
"public String getResourceUri() {\n return resourceUri;\n }",
"java.lang.String getResourceUri();",
"protected Resource getResource() {\n return resource;\n }",
"public String getResourceName() {\n return null;\n }",
"public String toString() {\n return (isRelative() ? \"\" : \"(not relative)\") + getName() + \": \" +\n getClassName();\n }",
"@Override\n\tpublic String getResource() {\n\t\ttry {\n\t\t\treturn (new File(\"./resources/images/mageTowerCard.png\")).getCanonicalPath();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn \"\";\n\t\t}\n\t}",
"RequiredResourceType getRequiredResource();",
"protected static String getResourceAsString(Class<?> clazz, String location) {\n try (InputStream resourceStream = clazz.getResourceAsStream(location)) {\n return IoUtils.toUtf8String(resourceStream);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"public String getResourceLocation() {\n return resourceLocation;\n }",
"public ResourceClass getResourceClass()\n {\n return resourceClass;\n }",
"@Override\n public String getName() {\n return FetchingIdlingResource.class.getSimpleName();\n }",
"public String getResourceID() {\n\t\treturn resourceID;\n\t}",
"public String toString() {\n return path + RegistryConstants.URL_SEPARATOR + \"version:\" + version;\n }",
"public interface IResource {\n\t// TODO: Have priorities for resources either here or implemented in IResourceView\n\n\n\tpublic String getName();\n\t\n\tpublic IUniformLocation getLocation(); // public IStorageLocation getLocation() ?\n\t\n\tpublic IResourceType getType();\n}",
"public URN getResourceURN()\r\n {\r\n return resourceURN;\r\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getAccountId() != null)\n sb.append(\"accountId: \").append(getAccountId()).append(\",\");\n if (getResourceId() != null)\n sb.append(\"resourceId: \").append(getResourceId()).append(\",\");\n if (getStage() != null)\n sb.append(\"stage: \").append(getStage()).append(\",\");\n if (getRequestId() != null)\n sb.append(\"requestId: \").append(getRequestId()).append(\",\");\n if (getIdentity() != null)\n sb.append(\"identity: \").append(getIdentity().toString()).append(\",\");\n if (getResourcePath() != null)\n sb.append(\"resourcePath: \").append(getResourcePath()).append(\",\");\n if (getHttpMethod() != null)\n sb.append(\"httpMethod: \").append(getHttpMethod()).append(\",\");\n if (getApiId() != null)\n sb.append(\"apiId: \").append(getApiId()).append(\",\");\n if (getPath() != null)\n sb.append(\"path: \").append(getPath()).append(\",\");\n if (getAuthorizer() != null)\n sb.append(\"authorizer: \").append(getAuthorizer().toString());\n if (getOperationName() != null)\n sb.append(\"operationName: \").append(getOperationName().toString());\n if (getExtendedRequestId() != null)\n sb.append(\"extendedRequestId: \").append(getExtendedRequestId()).append(\",\");\n if (getRequestTime() != null)\n sb.append(\"requestTime: \").append(getRequestTime()).append(\",\");\n if (getProtocol() != null)\n sb.append(\"protocol: \").append(getProtocol()).append(\",\");\n if (getRequestTimeEpoch() != null)\n sb.append(\"requestTimeEpoch: \").append(getRequestTimeEpoch()).append(\",\");\n if (getDomainPrefix() != null)\n sb.append(\"domainPrefix: \").append(getDomainPrefix()).append(\",\");\n if (getDomainName() != null)\n sb.append(\"domainName: \").append(getDomainName());\n sb.append(\"}\");\n return sb.toString();\n }",
"public String getImageResource() {\n \t\t// if (isWindows)\n \t\t// return \"/\" + new File(imageResource).getPath();\n \t\t// else\n \t\treturn imageResource;\n \t}",
"Class<? extends Resource> getResourceType();",
"public String getResourceId() {\n return this.resourceId;\n }",
"public String getResourceId() {\n return this.resourceId;\n }",
"String getResourceID();",
"public ResourceVO getResource() {\n\treturn resource;\n}",
"public String getResourceId();",
"private String getResourceName(String resourceId)\n/* */ {\n/* 1165 */ HashMap<String, String> managedObject = (HashMap)this.managedObjectVsResourceIdMap.get(resourceId);\n/* 1166 */ StringBuffer toReturn = new StringBuffer();\n/* 1167 */ String type = (String)managedObject.get(\"TYPE\");\n/* 1168 */ if ((!\"HAI\".equals(type)) && (!this.monitors.contains(resourceId)))\n/* */ {\n/* 1170 */ toReturn.append(\"\\\"\").append(getParentResourceDisplayname(resourceId)).append(\"\\\"\").append(\",\");\n/* */ }\n/* 1172 */ else if ((!\"HAI\".equals(type)) && (this.monitors.contains(resourceId)))\n/* */ {\n/* 1174 */ toReturn.append(\",\");\n/* */ }\n/* 1176 */ toReturn.append(\"\\\"\").append((String)managedObject.get(\"DISPLAYNAME\")).append(\"\\\"\");\n/* 1177 */ return toReturn.toString();\n/* */ }",
"public static Resource getConsoleResource(BeanContext context) {\n SlingHttpServletRequest request = context.getRequest();\n ResourceResolver resolver = request.getResourceResolver();\n String path = null;\n // use the resource set by a probably executed 'defineObjects' tag (supports including components)\n Resource resource = context.getAttribute(\"resource\", Resource.class);\n if (resource == null) {\n resource = request.getResource();\n }\n if (resource != null) {\n path = resource.getPath();\n }\n // use the suffix as the resource path if the resource is not defined or references a servlet\n if (StringUtils.isBlank(path) || path.startsWith(\"/bin/\")) {\n RequestPathInfo requestPathInfo = request.getRequestPathInfo();\n path = XSS.filter(requestPathInfo.getSuffix());\n resource = null;\n }\n if (resource == null && StringUtils.isNotBlank(path)) {\n resource = resolver.getResource(path);\n }\n if (resource == null) {\n // fallback to the root node if the servlet request has no suffix\n resource = resolver.getResource(\"/\");\n }\n return resource;\n }",
"public String getResourceUrl() {\n return this.resourceUrl;\n }",
"public AbstractResource resource()\r\n {\r\n\t return this.resource_state;\r\n }",
"public static String getRawResource(Context context, int resource) {\n String res = null;\n InputStream is = context.getResources().openRawResource(resource);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n byte[] b = new byte[1];\n try {\n while (is.read(b) != -1) {\n baos.write(b);\n }\n ;\n res = baos.toString();\n is.close();\n baos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return res;\n }",
"public Resource getTargetResource();",
"public String getResourceUrl() {\n\t\treturn resourceUrl;\n\t}",
"@Override\n public String toString(){\n return String.format(\"Gain Resources -> \" + mResourcesGains);\n }",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String getResourceArn() {\n return this.resourceArn;\n }",
"public String toString() {\n\n String str = super.toString() + \"; descriptor for class: \";\n\n //-- add class name\n if (_class != null)\n str += _class.getName();\n else\n str += \"[null]\";\n\n //-- add xml name\n str += \"; xml name: \" + _xmlName;\n\n return str;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"AeronaveResource [nome=\" + nome + \", marca=\" + marca + \", ano=\" + ano + \", descricao=\" + descricao\n\t\t\t\t+ \", vendido=\" + vendido + \", created=\" + created + \", update=\" + update + \"]\";\n\t}",
"public void displayResource(Resource resource) {\n\n\t\tSystem.out.println(resource.getID() + \" \"\n\t\t\t\t+ resource.getFirstName() + \" \"\n\t\t\t\t+ resource.getLastName() + \" \"\n\t\t\t\t+ resource.getRole());\n\t}",
"public String getStringResource(LocaleResource resource){\n\t\tContext c = ConnectedApp.getContextStatic();\n\t\tswitch(resource){\t\t\n\t\tcase support_contact:\n default:\n\t\t\tint resId= c.getResources().getIdentifier(resource.toString()+\"_\"+ getCountryCode().toLowerCase(Locale.US), \"string\",\n\t\t\t\t\tc.getPackageName());\n\t\t\treturn c.getString(resId);\n\t\t}\n\t\t//return null;\n\t}",
"@Override\n\tpublic String getResource() {\n\t\tif (this.getUpgraded()) {\n\t\t\ttry {\n\t\t\t\treturn (new File(\"./resources/images/ArcherTower_Upgrade.png\")).getCanonicalPath();\n\t\t\t} catch (IOException e) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\treturn (new File(\"./resources/images/ArcherTower_Default.png\")).getCanonicalPath();\n\t\t\t} catch (IOException e) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t}",
"private static String resourceName(Class<?> clazz) {\r\n\t\tString className = clazz.getSimpleName().replace(\"$\", \" \");\r\n\t\tif (className.equalsIgnoreCase(\"EvsInitiateMultipartUploadRequest\")) {\r\n\t\t\treturn \"multipartupload/initiate\";\r\n\t\t} else if (className.equalsIgnoreCase(\"EvsCompleteMultipartUploadRequest\")) {\r\n\t\t\treturn \"multipartupload/complete\";\r\n\t\t} else if (className.equalsIgnoreCase(\"EvsAbortMultipartUploadRequest\")) {\r\n\t\t\treturn \"multipartupload/abort\";\r\n\t\t} else if (className.equalsIgnoreCase(\"EvsListPartsRequest\")) {\r\n\t\t\treturn \"multipartupload/listparts\";\r\n\t\t} else if (className.equalsIgnoreCase(\"EvsUploadPartRequest\")) {\r\n\t\t\treturn \"multipartupload/uploadpart\";\r\n\t\t} else if (className.equalsIgnoreCase(\"EvsListMultipartUploadsRequest\")) {\r\n\t\t\treturn \"multipartupload/list\";\r\n\t\t} else if(className.equalsIgnoreCase(\"EvsUploadFileRequest\")){\r\n\t\t\treturn \"fileupload\";\r\n\t\t}else{\r\n\t\t\tthrow new EvsClientException(\"resource not available\");\r\n\t\t}\r\n\t}",
"public ResourceType getResourceType() {\n\treturn this.resourceType;\n }",
"Resource getAbilityResource();",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getJobId() != null)\n sb.append(\"JobId: \").append(getJobId()).append(\",\");\n if (getDestination() != null)\n sb.append(\"Destination: \").append(getDestination()).append(\",\");\n if (getResourceType() != null)\n sb.append(\"ResourceType: \").append(getResourceType()).append(\",\");\n if (getStatus() != null)\n sb.append(\"Status: \").append(getStatus()).append(\",\");\n if (getCreationTimestamp() != null)\n sb.append(\"CreationTimestamp: \").append(getCreationTimestamp()).append(\",\");\n if (getLastUpdatedTimestamp() != null)\n sb.append(\"LastUpdatedTimestamp: \").append(getLastUpdatedTimestamp()).append(\",\");\n if (getFailureReason() != null)\n sb.append(\"FailureReason: \").append(getFailureReason());\n sb.append(\"}\");\n return sb.toString();\n }",
"public Object makeResource();",
"public String toString() {\n String s = getClass().getName();\n String message = getLocalizedMessage();\n return (message != null) ? (s + \": \" + message) : s;\n }",
"public String toString() {\n return String.format(\"[%s] %s\", this.getStatusIcon(), this.description);\n }",
"public String getResourceurl() {\n return resourceurl;\n }",
"protected String getResourceFileParameter() {\n if (resourceFile != null) {\n return \"/resource=\" + resourceFile.toString();\n } else {\n return null;\n }\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(this.getName());\n sb.append(\"\\n name=\").append(this.getName());\n sb.append(\"\\n type=\").append(this.getType());\n sb.append(\"\\n parentType=\").append(this.getParentType());\n sb.append(\"\\n resourceUrl=\").append(this.getResourceUrl());\n sb.append(\"\\n restUrl=\").append(this.getRestUrl());\n sb.append(\"\\n soapUrl=\").append(this.getSoapUrl());\n sb.append(\"\\n thumbnailUrl=\").append(this.getThumbnailUrl());\n sb.append(\"\\n capabilities=\").append(this.getCapabilities());\n sb.append(\"\\n creator=\").append(this.getCreator());\n sb.append(\"\\n description=\").append(this.getDescription());\n sb.append(\"\\n keywords=\").append(this.getKeywords());\n if (this.getEnvelope() != null) {\n if (this.getEnvelope() instanceof EnvelopeN) {\n EnvelopeN envn = (EnvelopeN) this.getEnvelope();\n sb.append(\"\\n envelope=\");\n sb.append(envn.getXMin()).append(\", \").append(envn.getYMin()).append(\", \");\n sb.append(envn.getXMax()).append(\", \").append(envn.getYMax());\n if (envn.getSpatialReference() != null) {\n sb.append(\" wkid=\").append(envn.getSpatialReference().getWKID());\n }\n }\n }\n return sb.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn getFullPath();\n\t}",
"public interface ResourceDefinition\n{\n\n\t/**\n\t * Get the native path in the repository for the resource\n\t * \n\t * @return\n\t */\n\tString getRepositoryPath();\n\n\t/**\n\t * Get the external path of the passed in path releative to this resource\n\t * \n\t * @param path\n\t * @return\n\t */\n\tString getExternalPath(String path);\n\n\t/**\n\t * Get the repository path, relative to this resource\n\t * \n\t * @param name\n\t * @return\n\t */\n\tString getRepositoryPath(String name);\n\n\t/**\n\t * Does the path represent a resource that is private for the current\n\t * request This may relate to a logged in user or context. This will control\n\t * the caching headers in the http response.\n\t * \n\t * @return\n\t */\n\tboolean isPrivate();\n\n\t/**\n\t * @return\n\t */\n\tString getFunctionDefinition();\n\n\t/**\n\t * @return\n\t */\n\tint getDepth();\n\n}"
] | [
"0.69880867",
"0.69617414",
"0.6830508",
"0.6822778",
"0.67659646",
"0.67637163",
"0.6643988",
"0.6594528",
"0.6573533",
"0.6536199",
"0.6478594",
"0.6457977",
"0.64239717",
"0.6413809",
"0.640413",
"0.64032066",
"0.63956606",
"0.6354115",
"0.63316876",
"0.63247186",
"0.6323864",
"0.6267658",
"0.6251253",
"0.6247204",
"0.62153417",
"0.61905223",
"0.6184899",
"0.61701274",
"0.61578536",
"0.6156157",
"0.6126193",
"0.61115104",
"0.6104648",
"0.6089827",
"0.60762286",
"0.60642457",
"0.60403216",
"0.6037299",
"0.6035557",
"0.6024824",
"0.6024797",
"0.6018013",
"0.6006215",
"0.59980136",
"0.5990375",
"0.5985353",
"0.5985353",
"0.5985353",
"0.5985353",
"0.5985353",
"0.5979662",
"0.59679395",
"0.59475785",
"0.59186065",
"0.59120196",
"0.59045094",
"0.5895644",
"0.58875453",
"0.58384526",
"0.58308685",
"0.58307254",
"0.5815975",
"0.58117086",
"0.5810851",
"0.5791494",
"0.57857466",
"0.5785269",
"0.57787913",
"0.57714427",
"0.57714427",
"0.5768682",
"0.57620925",
"0.5755741",
"0.5753327",
"0.57378",
"0.5735182",
"0.5722838",
"0.5689218",
"0.56848955",
"0.56805754",
"0.5669547",
"0.5664883",
"0.5664883",
"0.5664883",
"0.5663036",
"0.56516916",
"0.5636559",
"0.56338596",
"0.5627364",
"0.5624666",
"0.5624138",
"0.5619037",
"0.561841",
"0.56161433",
"0.5601425",
"0.5600314",
"0.5597679",
"0.5592075",
"0.55750525",
"0.5571965",
"0.55433965"
] | 0.0 | -1 |
Returns a string representation of the contents of an input stream. | private String stringFromInputStream(InputStream instream) throws IOException {
StringBuilder sb = new StringBuilder("");
if (instream == null) {
logger.warn("Input stream is null.");
return sb.toString();
}
BufferedReader bufreader = new BufferedReader(new InputStreamReader(instream));
String line = "";
while ((line = bufreader.readLine()) != null) {
sb.append(line);
sb.append(LINE_SEPARATOR);
}
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String readStream(InputStream in) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = in.read();\n while(i != -1) {\n bo.write(i);\n i = in.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }",
"static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }",
"private String streamToString(InputStream is) throws IOException {\n String str = \"\";\n \n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n \n try {\n BufferedReader reader = new BufferedReader(\n new InputStreamReader(is));\n \n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n \n reader.close();\n } finally {\n is.close();\n }\n \n str = sb.toString();\n }\n \n return str;\n }",
"public static String loadStream(InputStream in) throws IOException {\r\n\t\tInputStream is = in;\r\n\t\tint ptr = 0;\r\n\t\tis = new BufferedInputStream(is);\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\t\ttry {\r\n\t\t\twhile ((ptr = is.read()) != -1) {\r\n\t\t\t\tbuffer.append((char) ptr);\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tis.close();\r\n\t\t}\r\n\t\treturn buffer.toString();\r\n\t}",
"static String loadStream(InputStream in) throws IOException { \n\t\tint ptr = 0; \n\t\tin = new BufferedInputStream(in); \n\t\tStringBuffer buffer = new StringBuffer(); \n\t\twhile( (ptr = in.read()) != -1 ) { \n\t\t\tbuffer.append((char)ptr); \n\t\t} \n\t\treturn buffer.toString(); \n\t}",
"private String readStream(InputStream is) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = is.read();\n while(i != -1) {\n bo.write(i);\n i = is.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }",
"private String readStream(InputStream in) throws IOException {\n BufferedReader r = new BufferedReader(new InputStreamReader(in));\n\n StringBuilder sb = new StringBuilder();\n String line;\n\n // Reads every line and stores them in sb.\n while((line = r.readLine()) != null) {\n sb.append(line);\n }\n\n // Closes the input stream.\n in.close();\n\n return sb.toString();\n }",
"private String inputStreamToString(InputStream is) {\n Scanner scanner = new Scanner(is);\n Scanner tokenizer = scanner.useDelimiter(\"\\\\A\");\n String str = tokenizer.hasNext() ? tokenizer.next() : \"\";\n scanner.close();\n return str;\n }",
"public static String convertStreamToString(InputStream is) {\n java.util.Scanner s = new java.util.Scanner(is).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }",
"public static String streamToString(InputStream is) throws IOException {\n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n\n try {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n } finally {\n is.close();\n }\n return sb.toString();\n } else {\n return \"\";\n }\n\t}",
"static String convertStreamToString(java.io.InputStream is) {\n java.util.Scanner s = new java.util.Scanner(is).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }",
"static String convertStreamToString(java.io.InputStream is) {\n java.util.Scanner s = new java.util.Scanner(is).useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }",
"public static String convertStreamToString(InputStream is) {\n String line = \"\";\n StringBuilder total = new StringBuilder();\n BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n try {\n while ((line = rd.readLine()) != null) {\n total.append(line);\n }\n } catch (Exception e) {\n\n }\n return total.toString();\n }",
"private String convertStreamToString(InputStream is) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder builder = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n builder.append(line);\n }\n return builder.toString();\n }",
"private String InputStreamToString(InputStream in) {\n BufferedReader reader = null;\n try {\n reader = new BufferedReader(new InputStreamReader(in, IConstants.UTF8_ENCODING));\n } catch (UnsupportedEncodingException e1) {\n LogUtil.logError(EntropyPlugin.PLUGIN_ID, e1);\n }\n\n StringBuffer myStrBuf = new StringBuffer();\n int charOut = 0;\n String output = \"\"; //$NON-NLS-1$\n try {\n while ((charOut = reader.read()) != -1) {\n myStrBuf.append(String.valueOf((char) charOut));\n }\n } catch (IOException e) {\n LogUtil.logError(EntropyPlugin.PLUGIN_ID, e);\n }\n output = myStrBuf.toString();\n return output;\n }",
"private static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is), 8192);\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return sb.toString();\n }",
"public static String inputStreamToString(InputStream in) {\r\n StringBuffer buffer = new StringBuffer();\r\n try {\r\n BufferedReader br = new BufferedReader(new InputStreamReader(in,\r\n \"UTF-8\"), 1024);\r\n String line;\r\n while ((line = br.readLine()) != null) {\r\n buffer.append(line);\r\n }\r\n } catch (IOException iox) {\r\n LOGR.warning(iox.getMessage());\r\n }\r\n return buffer.toString();\r\n }",
"private static String readIt(InputStream stream) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(stream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return sb.toString();\n\t}",
"Stream<In> getInputStream();",
"public static String convertStreamToString(InputStream is) {\n if (is == null) return null;\n Scanner s = new Scanner(is, \"UTF-8\").useDelimiter(\"\\\\A\");\n return s.hasNext() ? s.next() : \"\";\n }",
"public String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }",
"private static String convertStreamToString(InputStream is)\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try\n {\n while ((line = reader.readLine()) != null)\n {\n sb.append(line + \"\\n\");\n }\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n is.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n System.out.println(sb.toString());\n return sb.toString();\n }",
"private String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line).append('\\n');\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }",
"public static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n \n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }",
"private static String convertStreamToString(InputStream is) {\r\n\r\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\tString line = null;\r\n\t\ttry {\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tsb.append(line + \"\\n\");\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tis.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}",
"public static String getAsString(InputStream is) {\n\t\treturn head(is, null);\n\t}",
"public static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n try {\n is.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }",
"private static String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return sb.toString();\n }",
"public static String inputStreamToString(InputStream is) {\n\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n\n return null;\n\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n return sb.toString();\n\n }",
"public static String InputStreamToString(InputStream is) throws IOException {\r\n\t\treturn InputStreamToString(is, false, true);\r\n\t}",
"public String convertStreamToString(InputStream is) {\n try {\n if (is != null) {\n Writer writer = new StringWriter();\n\n char[] buffer = new char[1024];\n try {\n Reader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n int n;\n while ((n = reader.read(buffer)) != -1) {\n writer.write(buffer, 0, n);\n }\n } finally {\n is.close();\n }\n return writer.toString();\n } else {\n return \"\";\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Did not expect this one...\", e);\n }\n }",
"private static final String convertStreamToString(InputStream is) {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(is));\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tString line = null;\n\t\ttry {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tis.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public static String convertStreamToString(InputStream inputStream) {\n\n String result = \"\";\n try {\n\n Scanner scanner = new Scanner(inputStream, \"UTF-8\").useDelimiter(\"\\\\A\");\n if (scanner.hasNext()) {\n result = scanner.next();\n }\n inputStream.close();\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n return result;\n }",
"public String readStream(InputStream in) {\n BufferedReader reader = null;\n StringBuffer data = new StringBuffer(\"\");\n try {\n reader = new BufferedReader(new InputStreamReader(in));\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n data.append(line);\n }\n } catch (IOException e) {\n Log.e(\"Log\", \"IOException\");\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return data.toString();\n }",
"private static String convertStreamToString(InputStream is) {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t sb.append(line + \"\\n\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n try {\n\t\t\tis.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n return sb.toString();\n \n }",
"public String StreamToString(InputStream is) {\r\n //Creamos el Buffer\r\n BufferedReader reader =\r\n new BufferedReader(new InputStreamReader(is));\r\n StringBuilder sb = new StringBuilder();\r\n String line = null;\r\n try {\r\n //Bucle para leer todas las líneas\r\n //En este ejemplo al ser solo 1 la respuesta\r\n //Pues no haría falta\r\n while((line = reader.readLine())!=null){\r\n sb.append(line);\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n try {\r\n is.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n //retornamos el codigo límpio\r\n return sb.toString();\r\n }",
"public static String read(InputStream in) throws IOException {\n\t\tStringBuilder result = new StringBuilder();\n\t try {\n\t byte[] buf = new byte[1024]; int r = 0;\n\t while ((r = in.read(buf)) != -1) {result.append(new String(buf, 0, r));}\n\t } finally { in.close();}\n\t\tString text=result.toString();\n\t\treturn text;\n\t}",
"private String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n String line;\n try {\n // building the string\n while ((line = reader.readLine()) != null) {\n sb.append(line).append('\\n');\n }\n } catch (IOException e) {\n // error occurred in the inputstream\n Log.e(TAG, \"IOException: \" + e.getMessage());\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n // error occurred closing input stream\n Log.e(TAG, \"IOException: \" + e.getMessage());\n }\n }\n return sb.toString();\n }",
"public String getStringFromInputStream(InputStream is) {\n\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n } finally {\n try {\n br.close();\n } catch (Exception e) {\n }\n br = null;\n return sb.toString();\n }\n }",
"protected String convertStreamToString(InputStream is) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n log.info(sb.toString());\n return sb.toString();\n }",
"public static String convertStreamToString(InputStream is) throws IOException {\r\n\t\tif (is != null) {\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\tString line;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\r\n\t\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\t\tsb.append(line).append(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t} finally {\r\n\t\t\t\tis.close();\r\n\t\t\t}\r\n\t\t\treturn sb.toString();\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}",
"public static String convertStreamToString(InputStream is) throws Exception {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder sb = new StringBuilder();\n String line = null;\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n reader.close();\n return sb.toString();\n }",
"protected static String convertStreamToString(InputStream is) {\r\n /*\r\n * To convert the InputStream to String we use the BufferedReader.readLine()\r\n * method. We iterate until the BufferedReader return null which means\r\n * there's no more data to read. Each line will appended to a StringBuilder\r\n * and returned as String.\r\n */\r\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\r\n StringBuilder sb = new StringBuilder();\r\n \r\n String line = null;\r\n try {\r\n while ((line = reader.readLine()) != null) {\r\n sb.append(line + \"\\n\");\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n try {\r\n is.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n \r\n return sb.toString();\r\n }",
"public static String GetStringFromInputStream(InputStream is) {\n\t\tString line;\n\t\tStringBuilder total = new StringBuilder();\n\n\t\t// Wrap a BufferedReader around the InputStream\n\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is));\n\n\t\t// Read response until the end\n\t\ttry {\n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\ttotal.append(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tis.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tUtilities\n\t\t\t\t\t\t.LogWarning(\"GetStringFromInputStream - could not close stream\");\n\t\t\t}\n\t\t}\n\n\t\t// Return full string\n\t\treturn total.toString();\n\t}",
"private static String convertStreamToString(InputStream inputStream) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n reader.close();\n return sb.toString();\n }",
"public static String streamToString(InputStream is) {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n StringBuilder stringBuilder = new StringBuilder();\n String line = null;\n\n try {\n\n while ((line = reader.readLine()) != null) {\n stringBuilder.append(line);\n }\n\n reader.close();\n\n } catch (IOException e) {\n // obsłuż wyjątek\n Log.d(WebServiceHandler.class.getSimpleName(), e.toString());\n }\n\n return stringBuilder.toString();\n }",
"private static String convertStreamToString(InputStream is) {\n\t\tInputStreamReader isr = new InputStreamReader(is);\n BufferedReader reader = new BufferedReader(isr);\n StringBuilder sb = new StringBuilder();\n \n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line + \"\\n\");\n }\n } catch (IOException e) {\n \tLog.e(TAG, e.getMessage(), e);\n } finally {\n try {\n reader.close();\n } catch (IOException e) {\n \tLog.w(TAG, e.getMessage(), e);\n }\n \n try {\n isr.close();\n } catch (IOException e) {\n \tLog.w(TAG, e.getMessage(), e);\n }\n }\n \n return sb.toString();\n }",
"private String convertStreamToString(InputStream is) throws IOException {\r\n\t\tint bufSize = 8 * 1024;\r\n\t\tif (is != null) {\r\n\t\t\tWriter writer = new StringWriter();\r\n\r\n\t\t\tchar[] buffer = new char[bufSize];\r\n\t\t\ttry {\r\n\t\t\t\tInputStreamReader ireader = new InputStreamReader(is, \"UTF-8\");\r\n\t\t\t\tReader reader = new BufferedReader(ireader, bufSize);\r\n\t\t\t\tint n;\r\n\t\t\t\twhile ((n = reader.read(buffer)) != -1) {\r\n\t\t\t\t\twriter.write(buffer, 0, n);\r\n\t\t\t\t}\r\n\t\t\t\treader.close();\r\n\t\t\t\tireader.close();\r\n\t\t\t\treturn writer.toString();\r\n\t\t\t} catch (OutOfMemoryError ex) {\r\n\t\t\t\tLog.e(\"b2evo_android\", \"Convert Stream: (out of memory)\");\r\n\t\t\t\twriter.close();\r\n\t\t\t\twriter = null;\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"\";\r\n\t\t\t} finally {\r\n\t\t\t\tis.close();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}",
"private static String getStringFromInputStream(InputStream is) {\r\n\r\n BufferedReader br = null;\r\n StringBuilder sb = new StringBuilder();\r\n\r\n String line;\r\n try {\r\n\r\n br = new BufferedReader(new InputStreamReader(is));\r\n while ((line = br.readLine()) != null) {\r\n sb.append(line);\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n if (br != null) {\r\n try {\r\n br.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n return sb.toString();\r\n\r\n }",
"public static String convertStreamToString(InputStream is) throws IOException {\n\tif (is != null) {\n\t\tWriter writer = new StringWriter();\n\n\t\tchar[] buffer = new char[1024];\n\t\ttry {\n\t\t\tReader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n\t\t\tint n;\n\t\t\twhile ((n = reader.read(buffer)) != -1) {\n\t\t\t\twriter.write(buffer, 0, n);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t}\n\t\treturn writer.toString();\n\t} else {\n\t\treturn \"\";\n\t}\n}",
"private static String read(InputStream in) throws IOException {\n StringBuilder builder = new StringBuilder();\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n String line = null;\n while ((line = reader.readLine()) != null)\n builder.append(line);\n\n return builder.toString();\n }",
"public static String decodeToString(InputStream in) throws IOException {\n\t\treturn new String(decodeToBytes(in));\n\t}",
"private String readStream(InputStream is) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(is),1000);\n for (String line = r.readLine(); line != null; line =r.readLine()){\n sb.append(line);\n }\n is.close();\n return sb.toString();\n }",
"public static String getStringFromInputStream(InputStream is) {\n\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(is));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return sb.toString();\n }",
"public static String convertInputStreamToString(InputStream in) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tList<String> lines = null;\n\t\ttry {\n\t\t\tlines = IOUtils.readLines(in);\n\t\t} catch (IOException e) {\n\t\t\te.toString();\n\t\t}\n\t\tif (lines != null) {\n\t\t\tfor (String line : lines) {\n\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public String convertStreamToString(InputStream is) throws IOException {\r\n /*\r\n * To convert the InputStream to String we use the Reader.read(char[]\r\n * buffer) method. We iterate until the Reader return -1 which means\r\n * there's no more data to read. We use the StringWriter class to\r\n * produce the string.\r\n */\r\n if (is != null) {\r\n Writer writer = new StringWriter();\r\n char[] buffer = new char[1024];\r\n try {\r\n Reader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\r\n int n;\r\n while ((n = reader.read(buffer)) != -1) {\r\n writer.write(buffer, 0, n);\r\n }\r\n } finally {\r\n is.close();\r\n }\r\n return writer.toString();\r\n } else {\r\n return \"\";\r\n }\r\n }",
"public static String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {\n BufferedReader br = null;\n StringBuilder sb = new StringBuilder();\n\n String line;\n try {\n\n br = new BufferedReader(new InputStreamReader(stream));\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (br != null) {\n try {\n br.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n return sb.toString();\n }",
"public static String readString(InputStream is) throws IOException {\n return readString(is, DEFAULT_ENCODING);\n }",
"private static String convertInputStreamToString(InputStream inputStream) throws IOException{\n BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream));\n String line = \"\";\n String result = \"\";\n while((line = bufferedReader.readLine()) != null)\n result += line;\n\n inputStream.close();\n return result;\n\n }",
"private StringBuilder inputStreamToString(InputStream is) {\n \t String line = \"\";\n \t StringBuilder total = new StringBuilder();\n \t \n \t // Wrap a BufferedReader around the InputStream\n \t BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n \n \t // Read response until the end\n \t try {\n \t\t\twhile ((line = rd.readLine()) != null) { \n \t\t\t total.append(line); \n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t \n \t // Return full string\n \t return total;\n \t}",
"public String convertStreamToString(InputStream instream) throws Exception {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(instream));\n\t\t StringBuilder sb = new StringBuilder();\n\t\t String line = null;\n\n\t\t while ((line = reader.readLine()) != null) {\n\t\t \t\n\t\t sb.append(line);\n\t\t }\n\t\t instream.close();\n\t\t return sb.toString();\n\t\t \n\t\t}",
"private static String convertInputStreamToString(InputStream inputStream) throws IOException {\n BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(inputStream));\n String line = \"\";\n String result = \"\";\n while((line = bufferedReader.readLine()) != null)\n result += line;\n\n inputStream.close();\n return result;\n\n }",
"public static String convertInputStreamToString(InputStream is)\n throws IOException {\n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n try {\n BufferedReader reader = new BufferedReader(\n new InputStreamReader(is, UtilsConstants.UTF_8));\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(UtilsConstants.LINE_SEPARATOR);\n }\n } finally {\n is.close();\n }\n return sb.toString();\n } else {\n return \"\";\n }\n }",
"private static String ioStr(InputStream in) throws IOException {\n\t\t// Read input\n\t\tString str = new String();\n\t\tString next = null;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\t\twhile ((next = reader.readLine()) != null) {\n\t\t\tstr += next + \"\\n\";\n\t\t}\n\t\tin.close();\n\n\t\t// Convert result accordingly\n\t\tif (str.length() > 1) {\n\t\t\treturn str.substring(0, str.length() - 1);\n\t\t}\n\t\treturn str;\n\t}",
"protected String traverseStream(InputStream stream){\n\n\t\tScanner input = new Scanner(stream);\n\t\tString res = \"\";\n\n\t\twhile(input.hasNext()){\n\t\t\tres += input.next() + \" \";\n\t\t}\n\n\t\treturn res;\n\t}",
"private static String convertStreamToString(InputStream is) {\r\n\t\t/*\r\n\t\t * To convert the InputStream to String we use the\r\n\t\t * BufferedReader.readLine() method. We iterate until the BufferedReader\r\n\t\t * return null which means there's no more data to read. Each line will\r\n\t\t * appended to a StringBuilder and returned as String.\r\n\t\t */\r\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(is));\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\tString line = null;\r\n\t\ttry {\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tsb.append(line + \"\\n\");\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n//\t\t\tLog.e(\"HTTP\", \"HTTP::convertStreamToString IOEX\",e);\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tis.close();\r\n\t\t\t} catch (IOException e) {\r\n//\t\t\t\tLog.e(Constants.TAG, \"HTTP::convertStreamToString, finally catch IOEX\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}",
"private String readIt(InputStream stream) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(stream, \"iso-8859-1\"), 128);\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n return sb.toString();\n }",
"@NonNull\n public static String getStringFrom(InputStream inputStream) {\n StringBuffer dataStringBuffer = new StringBuffer(\"\");\n try {\n InputStreamReader isr = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(isr);\n String readString = bufferedReader.readLine();\n while (readString != null) {\n dataStringBuffer.append(readString);\n readString = bufferedReader.readLine();\n }\n isr.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n return dataStringBuffer.toString();\n }",
"static String slurp(InputStream stream) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line).append(System.lineSeparator());\n }\n br.close();\n return sb.toString();\n }",
"private static String convertInputStreamToString(InputStream inputStream) throws IOException{\t\t\t\t\t\t\t\t\t\n\n\t\tBufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));\t\t\t\t\t\t\t\t\t\n\t\tString line = \"\";\t\t\t\t\t\t\t\t\t\n\t\tString result = \"\";\t\t\t\t\t\t\t\t\t\n\t\twhile((line = bufferedReader.readLine()) != null)\t{\t\t\t\t\t\t\t\t\n\t\t\tresult += line;\t\t\t\t\t\t\t\t\n\t\t}\t\t\t\t\t\t\t\t\t\n\n\t\tinputStream.close();\t\t\t\t\t\t\t\t\t\n\t\treturn result;\t\t\t\t\t\t\t\t\t\n\t}",
"private StringBuilder inputStreamToString(InputStream is) {\n String rLine = \"\";\n StringBuilder answer = new StringBuilder();\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\n try {\n while ((rLine = br.readLine()) != null) {\n answer.append(rLine);\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return answer;\n }",
"public InputStream getStream();",
"private static String readFromStream(InputStream inputStream) throws IOException {\n StringBuilder output = new StringBuilder();\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"));\n BufferedReader reader = new BufferedReader(inputStreamReader);\n String line = reader.readLine();\n while (line != null) {\n output.append(line);\n line = reader.readLine();\n }\n }\n return output.toString();\n }",
"public String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {\n Reader reader = null;\n reader = new InputStreamReader(stream, \"UTF-8\");\n char[] buffer = new char[len];\n reader.read(buffer);\n return new String(buffer);\n }",
"private static String readFromStream(InputStream inputStream) throws IOException {\n\n // Create a new empty string builder\n StringBuilder stringBuilder = new StringBuilder();\n\n // Create a bufferedReader that reads from the inputStream param\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream,\n Charset.forName(\"UTF-8\")));\n\n // Create a string that is one line of the buffered reader\n String line = bufferedReader.readLine();\n\n while (line != null) {\n // Add line to stringBuilder\n stringBuilder.append(line);\n\n // Set line to the next line in buffered reader\n line = bufferedReader.readLine();\n }\n\n // Return string builder as a string\n return stringBuilder.toString();\n }",
"private static String convertStreamToString(InputStream inputStream) {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tinputStream));\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tString line = null;\n\t\ttry {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"EXCEPTION\", e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tinputStream.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tLog.i(\"##sb#\", sb.toString());\n\t\treturn sb.toString();\n\t}",
"public static String ReadData(InputStream input) throws IOException {\n BufferedReader reader = new BufferedReader(new\n InputStreamReader(input));\n StringBuilder builder = new StringBuilder();\n while (true) {\n String line = reader.readLine();\n if(line == null) {\n break;\n }\n\n builder.append(line);\n }\n\n return builder.toString();\n }",
"public InputStream getInputStream();",
"public InputStream getInputStream();",
"public String readString() throws IOException {\n return WritableUtils.readString(in);\n }",
"public static String streamToText(InputStream stream) {\n\t\ttry {\n\t\t\treturn readerToText(new InputStreamReader(stream, AppConventions.CHAR_ENCODING));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\tlogger.error(\"Error while reading from reader. {}\", e.getMessage());\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public final PrintStream getInputStream() {\n return inputStream;\n }",
"private String read(InputStream in) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(in), 1000);\n for (String line = r.readLine(); line != null; line = r.readLine()) {\n sb.append(line);\n }\n in.close();\n return sb.toString();\n }",
"public static String read(InputStream input) throws Exception {\r\n\t\treader.setInput(input);\r\n\t\treader.setCharset(\"UTF-8\");\r\n\t\treturn reader.read();\r\n\t}",
"public static String toString(final InputStream input, final Charset encoding) throws IOException {\n final StringWriter sw = new StringWriter();\n copy(input, sw, encoding);\n return sw.toString();\n }",
"public static String convertStreamToString(InputStream is) throws IOException {\n\n String encoding = \"UTF-8\"; //default\n\n\n // cerca se il documento specifica un altro encoding\n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));//\"UTF-8\"));\n while ((line = reader.readLine()) != null) { //CRASHA\n sb.append(line).append(\"\\n\");\n if ((sb.toString().contains(\"<?\") && sb.toString().contains(\"?>\")) && sb.toString().contains(\"encoding=\")) {\n\n Pattern p = Pattern.compile(\".*<\\\\?.*encoding=.(.*).\\\\?>.*\", Pattern.DOTALL);\n\n Matcher matcher = p.matcher(sb.toString());\n\n if (matcher.matches()) {\n encoding = matcher.group(1);\n }\n\n break;\n }\n }\n\n\n\n }\n\n // converte\n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n\n try {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is, encoding));//\"UTF-8\"));\n while ((line = reader.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n System.out.println(line);\n }\n } finally {\n is.close();\n }\n return sb.toString();\n } else {\n return \"error\";\n }\n }",
"public static String readFileFromInputStream(final InputStream is) throws IOException\n\t{\n\t\tfinal BufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tis, FILE_CHARSET_NAME));\n\t\ttry\n\t\t{\n\t\t\tfinal StringBuilder contents = new StringBuilder(BUFFER_SIZE);\n\n\t\t\t// copy from input stream\n\t\t\tfinal char[] charBuffer = new char[BUFFER_SIZE];\n\t\t\tint len;\n\t\t\twhile ((len = input.read(charBuffer)) > 0)\n\t\t\t{\n\t\t\t\tcontents.append(charBuffer, 0, len);\n\t\t\t}\n\n\t\t\treturn contents.toString().replaceAll(\"\\r\\n\", \"\\n\");\n\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tinput.close();\n\t\t}\n\t}",
"private static String stringFromInputStream(InputStream inIS) {\n\n if (inIS == null) {\n return null;\n }\n StringBuffer outBuffer = new StringBuffer();\n InputStreamReader isr = null;\n BufferedReader input = null;\n try {\n String line = null;\n isr = new InputStreamReader(inIS);\n input = new BufferedReader(isr);\n while ((line = input.readLine()) != null) {\n if (line.indexOf(\"//\") == -1) {\n outBuffer.append(line);\n outBuffer.append(System.getProperty(\"line.separator\"));\n }\n }\n } catch (IOException ioe) {\n log.error(\"Unable to read from InputStream or write to output buffer\");\n ioe.printStackTrace();\n outBuffer = null;\n }\n try {\n isr.close();\n input.close();\n inIS.close();\n } catch (IOException ioe) {\n log.error(\"InputStream could not be closed\");\n ioe.printStackTrace();\n }\n if (outBuffer == null) {\n return null;\n } else {\n return outBuffer.toString();\n }\n\n }",
"protected String convertStreamToString(InputStream is, String charset) {\n\t\tScanner s = new Scanner(is, charset);\n\t\ttry {\n\t\t\ts.useDelimiter(\"\\\\A\");\n\t\t\treturn s.hasNext() ? s.next() : \"\";\n\t\t} finally {\n\t\t\ts.close();\n\t\t}\n\t}",
"protected String readFullyAsString(InputStream inputStream)\n\t\t\tthrows IOException {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tbyte[] buffer = new byte[1024];\n\t\tint length;\n\t\twhile ((length = inputStream.read(buffer)) != -1) {\n\t\t\tbaos.write(buffer, 0, length);\n\t\t}\n\t\treturn baos.toString(StandardCharsets.UTF_8.name());\n\t}",
"public static String toString(final InputStream input, final String encoding)\n throws IOException {\n return toString(input, Charset.forName(encoding));\n }",
"public static String toString(final Reader input) throws IOException {\n final StringWriter sw = new StringWriter();\n copy(input, sw);\n return sw.toString();\n }",
"private String readString( InputStream stream ) throws IOException {\n char delimiter = (char) stream.read();\n buffer = new StringBuffer();\n while ( true ) {\n int c = stream.read();\n if ( c == delimiter ) {\n break;\n }\n else {\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n throw new TableFormatException(\n \"End of line within a string literal\" );\n case '\\\\':\n buffer.append( (char) stream.read() );\n break;\n case END:\n throw new TableFormatException(\n \"End of file within a string literal\" );\n default:\n buffer.append( (char) c );\n }\n }\n }\n return buffer.toString();\n }",
"private static String readStream(InputStream is, String charsetName) throws UnsupportedEncodingException, IOException {\r\n StringBuffer sb = new StringBuffer();\r\n byte[] buffer = new byte[1024];\r\n int length = 0;\r\n while ((length = is.read(buffer)) != -1) {\r\n sb.append(new String(buffer, 0, length, charsetName));\r\n }\r\n return sb.toString();\r\n }",
"public String responsetoString(InputStream in) throws IOException{\n\t\tBufferedReader br = new BufferedReader( new InputStreamReader(in));\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString line = null;\n\t\twhile((line = br.readLine())!= null){\n\t\t\tsb.append(line);\t\t\t\n\t\t}\n\t\tin.close();\n\t\treturn sb.toString();\n\t}",
"public static String readFromInputStream(InputStream inputStream) throws IOException {\n StringBuilder streamOutput = new StringBuilder();\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset\n .forName(\"UTF-8\"));\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String line = bufferedReader.readLine();\n while (line != null) {\n streamOutput.append(line);\n line = bufferedReader.readLine();\n }\n }\n return streamOutput.toString();\n }",
"public static String readIt(InputStream is) throws IOException {\n BufferedReader reader = null;\n reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n StringBuilder responseStrBuilder = new StringBuilder();\n String inputStr;\n while ((inputStr = reader.readLine()) != null) {\n responseStrBuilder.append(inputStr);\n }\n return responseStrBuilder.toString();\n }",
"InputStream getDataStream();",
"public static String getContent(InputStream stream) throws Exception {\n return getContent(new InputStreamReader(stream));\n }",
"protected String readUnicodeInputStream(InputStream in) throws IOException {\n\t\tUnicodeReader reader = new UnicodeReader(in, null);\n\t\tString data = FileCopyUtils.copyToString(reader);\n\t\treader.close();\n\t\treturn data;\n\t}"
] | [
"0.7846848",
"0.7582624",
"0.7481981",
"0.7458483",
"0.7438558",
"0.74164504",
"0.7372809",
"0.7297833",
"0.7261581",
"0.72384",
"0.7227836",
"0.7227836",
"0.7192695",
"0.7178013",
"0.71317047",
"0.7122579",
"0.7110187",
"0.7100672",
"0.71000767",
"0.70520484",
"0.7048218",
"0.70408195",
"0.70339644",
"0.70155036",
"0.7011457",
"0.700997",
"0.6990463",
"0.69821894",
"0.69668245",
"0.6966676",
"0.69560146",
"0.69521105",
"0.6917097",
"0.68634367",
"0.68472904",
"0.68256557",
"0.6824064",
"0.6822155",
"0.6821683",
"0.6807735",
"0.6800556",
"0.67822355",
"0.6782006",
"0.67693794",
"0.6742224",
"0.6730265",
"0.67260593",
"0.66968316",
"0.6695157",
"0.6689817",
"0.6677983",
"0.66768974",
"0.6633473",
"0.66311795",
"0.66303986",
"0.6625885",
"0.66103536",
"0.6600969",
"0.66002953",
"0.65787995",
"0.6578127",
"0.65692383",
"0.6567387",
"0.6559053",
"0.65587664",
"0.6546858",
"0.65463114",
"0.6545807",
"0.65383905",
"0.65210766",
"0.6509543",
"0.65027964",
"0.6463024",
"0.64412075",
"0.6435156",
"0.64017534",
"0.63819534",
"0.6380402",
"0.6380402",
"0.6365317",
"0.6337746",
"0.63303334",
"0.63289165",
"0.63288444",
"0.6306188",
"0.6304316",
"0.63039404",
"0.63034445",
"0.62989366",
"0.62967604",
"0.6278597",
"0.6274964",
"0.6252332",
"0.6251469",
"0.62471086",
"0.6240504",
"0.62333626",
"0.6220999",
"0.6143047",
"0.61121583"
] | 0.68654567 | 33 |
Accela Automation File: IModelIdGenerator.java Accela, Inc. Copyright (C): 2009 Description: TODO Notes: $Id: IModelIdGenerator.java 138537 20090710 02:16:46Z ACHIEVO\michael.mao $ Revision History <Date>,<Who>,<What> Mar 23, 2009jebel.qinInitial. | public interface IModelGenerator
{
public static final String MAIN_MODEL = "mainModel";
public static final String CURRENT_DATE = "currentDate";
/**
* Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.
*
* @param entity domain model entity
*/
public void generate(Object entity) throws AAException;
/**
* Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.
*
* @param entity domain model entity
* @param ormContext ORM context.
*/
public void generate(Object entity, Context ormContext) throws AAException;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void AutoID() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"private static int generateId() {\n\t\treturn ++sId;\n\t}",
"public interface IDGenerator {\n /**\n * Return the name of the ID sequence which this instance encapsulates.\n *\n * @return the name of the ID sequence which this instance encapsulates\n */\n public String getIDName();\n\n /**\n * Returns the next ID in the ID sequence encapsulated by this instance. Internal state is updated so that this ID\n * is not returned again from this method.\n *\n * @return the next ID in the ID sequence\n *\n * @throws IDGenerationException if an error occurs while generating the ID (for example, error while connecting to\n * the database)\n */\n public long getNextID() throws IDGenerationException;\n\n /**\n * <p>\n * Returns the next ID in the ID sequence encapsulated by this instance in the form of a BigInteger, rather than a\n * long.\n * </p>\n *\n * @return next ID in the ID sequence as a BigInteger\n *\n * @throws IDGenerationException if an error occurs while generating the ID (for example, error while connecting to\n * the database)\n */\n public BigInteger getNextBigID() throws IDGenerationException;\n\n /**\n * <p>\n * Disposes the id generator instance.\n * </p>\n */\n public void dispose();\n}",
"String mo10312id();",
"public interface IdGenerator \n{\n /**\n * Get the next identifier\n * @param conn The connection to use then getting the id\n * @param sequenceName The sequence name for the table. This is a name that identifies the\n * table.\n * @throws org.tgdb.exceptions.DbException if something goes wrong\n * @return an integer value.. This is not complete..\n */\n public int getNextId(Connection conn, String sequenceName) throws DbException;\n}",
"public void generateID()\n {\n ID = this.hashCode();\n }",
"@Override\r\n\tpublic int getModelId() {\n\t\treturn 0;\r\n\t}",
"public long getModelId();",
"String idProvider();",
"private void generateID(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String t : terms.keySet())\n\t\t\tsb.append(t.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, t.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tfor (String s : sources)\n\t\t\tsb.append(s.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, s.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tsb.deleteCharAt(sb.length()-1);\n\t\tif (yearFrom > -1) sb.append(\"_\" + yearFrom);\n\t\tif (yearTo > -1) sb.append(\"_\" + yearTo);\n\t\tif (useCompounds) sb.append(\"_COMP\");\n\t\tif (useStopwords) sb.append(\"_STOP\");\n\t\tsb.append(\"_CNT\" + contextSize);\n\t\tsb.append(\"_\" + System.currentTimeMillis());\n\t\tthis.id = sb.toString();\n\t}",
"String getContentGeneratorId();",
"public interface IGeneratorIdService {\n /**\n * @return \"unique\" long id\n */\n Long generateId();\n}",
"public IIID getCreatorIID()\n throws ORIOException;",
"public String generateID() {\n return IDPREFIX + nextidint++;\n }",
"private long generateID() {\n\t\treturn ++lastID;\n\t}",
"public void obtenerID();",
"private SimpleIdGenerator() {\r\n }",
"int id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String id();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"public int getMakerId();",
"java.lang.String getID();",
"public abstract long id();",
"public interface IDMLIdentifiers\n{\n \n /**\n\t *\tGets the associated DML service.\n\t *\t@return\tThe DML service associated.\n\t */\n public IDMLService getDMLService();\n \n /**\n\t *\tGets the maximum length of a simple (not compound) identifier. This value should be the minimum valid length for any kind of identifier (e.g. table name, parameter name)\n\t *\t@return\tThe maximum length.\n\t */\n public int getMaxLength();\n \n /**\n\t *\tEscapes a simple (not compound) identifier to prevent name clashing with reserved words.\n\t *\t@param\tidentifierName\tName that identifies a database object.\n\t *\t@return\tAn escaped identifier.\n\t */\n public String escapeIdentifier(String identifierName);\n \n /**\n\t *\tReturns a name that can be used as a valid identifier (e.g. parameter name, constraint name). It should contain only valid characters and its length should not exceed the maximum defined in MaxLength.\n\t *\t@param\tbaseName\tAn identifier name.\n\t *\t@param\ttruncateUsingRandomDigits\tIndicates if the identifier should be truncated if its length exceeds the MaxLength. In this case, random digits should be used as a suffix to prevent name clashing.\n\t *\t@return\tA string representing a valid identifier.\n\t */\n public String getValidIdentifier(String baseName, boolean truncateUsingRandomDigits);\n}",
"public String ID();",
"public int getID() {\r\n // Bouml preserved body begin 00040D02\r\n\t System.out.println(ID);\r\n\t return ID;\r\n // Bouml preserved body end 00040D02\r\n }",
"public interface AllergyModelProperties extends PropertyAccess<AllergyModel> {\n ModelKeyProvider<AllergyModel> id();\n}",
"public String getId()\r\n/* 14: */ {\r\n/* 15:14 */ return this.id;\r\n/* 16: */ }",
"public String identity () throws CGException {\n return new String(\"ModelImport\");\n }",
"int nextId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();"
] | [
"0.6681154",
"0.65529406",
"0.6454353",
"0.63970584",
"0.63952184",
"0.630346",
"0.62410676",
"0.62360215",
"0.62275106",
"0.61683714",
"0.61496735",
"0.6146445",
"0.6106157",
"0.61051214",
"0.6104795",
"0.60992545",
"0.6079371",
"0.60689",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6046159",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6036952",
"0.6025366",
"0.601627",
"0.6012239",
"0.60048914",
"0.59823143",
"0.59739393",
"0.59691596",
"0.5967057",
"0.59657925",
"0.59186286",
"0.5915095",
"0.5915095",
"0.5915095",
"0.5915095",
"0.5915095"
] | 0.64931464 | 2 |
Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class. | public void generate(Object entity) throws AAException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IModelGenerator\n{\n\tpublic static final String MAIN_MODEL = \"mainModel\";\n\tpublic static final String CURRENT_DATE = \"currentDate\";\n\t/**\n\t * Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.\n\t * \n\t * @param entity domain model entity\n\t */\n\tpublic void generate(Object entity) throws AAException;\n\n\t/**\n\t * Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.\n\t * \n\t * @param entity domain model entity\n\t * @param ormContext ORM context.\n\t */\n\tpublic void generate(Object entity, Context ormContext) throws AAException;\n}",
"public void generate(Object entity, Context ormContext) throws AAException;",
"private void fillEmbeddedTypes() {\n List<String> otherClassesNames = new ArrayList<>(PRIMITIVE_TYPES);\n otherClassesNames.add(\"[]\");\n otherClassesNames.add(\"...\");\n\n List<TypeConstructor> otherClasses = new ArrayList<>();\n for (String type : otherClassesNames) {\n Classifier classifier = new Classifier(type, Language.JAVA, \"\", null, new ArrayList<MemberEntity>(), \"\");\n otherClasses.add(classifier);\n QualifiedName name = new QualifiedName(OTHER_PACKAGE, type);\n classes.put(name, classifier);\n parameters.put(name, new ParametersDescription());\n superTypes.put(name, new ArrayList<JavaType>());\n createClassMaps(name);\n }\n\n PackageEntity otherPackage = new PackageEntity(OTHER_PACKAGE, Language.JAVA, otherClasses,\n new ArrayList<MemberEntity>(), new ArrayList<PackageEntity>(), \"\", null);\n packages.put(OTHER_PACKAGE, otherPackage);\n\n for (TypeConstructor otherClass : otherClasses) {\n otherClass.setContainingPackage(otherPackage);\n }\n }",
"public EmbeddedObjects() {\n super();\n this._embeddedObjectList = new java.util.Vector<de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject>();\n }",
"@Override\npublic <S extends Formation> Iterable<S> saveAll(Iterable<S> entities) {\n\treturn null;\n}",
"private static void exportEntities(GraknClient.Session session, Path schemaRoot) throws IOException {\n final File outputFileEntity = schemaRoot.resolve(\"entity\").toFile();\n GraknClient.Transaction tx = session.transaction().write();\n Stack<String> exportingTypes = new Stack<>();\n exportingTypes.push(\"entity\");\n exportExplicitHierarchy(exportingTypes, outputFileEntity, tx, false);\n tx.close();\n\n LOG.info(\"Exported entity hierarchy\");\n }",
"public Entity build();",
"Cascade createCascade();",
"private <T extends Model> QuerySet<T> all(Class<T> modelClass) {\n QuerySet<T> querySet = new QuerySet<T>();\n querySet.setEntity((Class<T>) this.entity);\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n OneToOneField oneToOneFieldAnnotation = null;\n ForeignKeyField foreignKeyFieldAnnotation = null;\n ManyToManyField manyToManyFieldAnnotation = null;\n try {\n String sql = \"SELECT * FROM\";\n tableName = TableUtil.getTableName(modelClass);\n sql = String.format(\"%s %s\", sql, tableName);\n if (JediEngine.DEBUG) {\n System.out.println(sql + \";\\n\");\n }\n connect();\n statement = connection.prepareStatement(sql);\n resultSet = statement.executeQuery();\n if (!resultSet.next()) {\n return querySet;\n }\n resultSet.beforeFirst();\n while (resultSet.next()) {\n Object obj = entity.newInstance();\n Field id = jedi.db.models.Model.class.getDeclaredField(\"id\");\n id.setAccessible(true);\n // Oracle returns BigDecimal object.\n if (connection.toString().startsWith(\"oracle\")) {\n id.set(\n obj,\n ((java.math.BigDecimal) resultSet.getObject(id.toString().substring(id.toString().lastIndexOf('.') + 1))).intValue());\n } else {\n // MySQL and PostgreSQL returns a Integer object.\n id.set(obj, resultSet.getObject(id.toString().substring(id.toString().lastIndexOf('.') + 1)));\n }\n List<Field> _fields = JediEngine.getAllFields(this.entity);\n for (Field field : _fields) {\n field.setAccessible(true);\n if (!JediEngine.isJediField(field)) {\n continue;\n }\n if (field.toString().substring(field.toString().lastIndexOf('.') + 1).equals(\"serialVersionUID\")) {\n continue;\n }\n if (field.getName().equalsIgnoreCase(\"objects\")) {\n continue;\n }\n oneToOneFieldAnnotation = field.getAnnotation(OneToOneField.class);\n foreignKeyFieldAnnotation = field.getAnnotation(ForeignKeyField.class);\n manyToManyFieldAnnotation = field.getAnnotation(ManyToManyField.class);\n FetchType fetchType = JediEngine.FETCH_TYPE;\n Manager manager = null;\n if (manyToManyFieldAnnotation != null) {\n fetchType = fetchType.equals(FetchType.NONE) ? manyToManyFieldAnnotation.fetch_type() : fetchType;\n if (fetchType.equals(FetchType.EAGER)) {\n String packageName = this.entity.getPackage().getName();\n String model = manyToManyFieldAnnotation.model().getSimpleName();\n model = Model.class.getSimpleName().equals(model) ? \"\" : model;\n Class superClazz = null;\n Class clazz = null;\n if (model.isEmpty()) {\n ParameterizedType genericType = null;\n if (ParameterizedType.class.isAssignableFrom(field.getGenericType().getClass())) {\n genericType = (ParameterizedType) field.getGenericType();\n superClazz = ((Class) (genericType.getActualTypeArguments()[0])).getSuperclass();\n if (superClazz == Model.class) {\n clazz = (Class) genericType.getActualTypeArguments()[0];\n model = clazz.getSimpleName();\n }\n }\n }\n String references = manyToManyFieldAnnotation.references();\n if (references == null || references.trim().isEmpty()) {\n if (clazz != null) {\n references = TableUtil.getTableName(clazz);\n } else {\n references = TableUtil.getTableName(model);\n }\n }\n String intermediateModelclassName = String.format(\"%s.%s\", packageName, model);\n Class associatedModelClass = Class.forName(intermediateModelclassName);\n manager = new Manager(associatedModelClass);\n QuerySet querySetAssociatedModels = null;\n String intermediateModelName = manyToManyFieldAnnotation.through().getSimpleName();\n intermediateModelName = Model.class.getSimpleName().equals(intermediateModelName) ? \"\" : intermediateModelName;\n if (intermediateModelName != null && !intermediateModelName.trim().isEmpty()) {\n intermediateModelclassName = String.format(\"%s.%s\", packageName, intermediateModelName);\n Class intermediateModelClass = Class.forName(intermediateModelclassName);\n String intermediateTableName = ((Model) intermediateModelClass.newInstance()).getTableName();\n querySetAssociatedModels = manager.raw(\n String.format(\n \"SELECT * FROM %s WHERE id IN (SELECT %s_id FROM %s WHERE %s_id = %d)\",\n TableUtil.getTableName(references),\n TableUtil.getColumnName(model),\n intermediateTableName,\n TableUtil.getColumnName(obj.getClass()),\n ((Model) obj).getId()),\n associatedModelClass);\n } else {\n querySetAssociatedModels = manager.raw(\n String.format(\n \"SELECT * FROM %s WHERE id IN (SELECT %s_id FROM %s_%s WHERE %s_id = %d)\",\n TableUtil.getTableName(references),\n TableUtil.getColumnName(model),\n tableName,\n TableUtil.getTableName(references),\n TableUtil.getColumnName(obj.getClass()),\n ((Model) obj).getId()),\n associatedModelClass);\n }\n field.set(obj, querySetAssociatedModels);\n } else {\n field.set(obj, null);\n }\n } else if (oneToOneFieldAnnotation != null || foreignKeyFieldAnnotation != null) {\n if (oneToOneFieldAnnotation != null) {\n fetchType = fetchType.equals(FetchType.NONE) ? oneToOneFieldAnnotation.fetch_type() : fetchType;\n } else {\n fetchType = fetchType.equals(FetchType.NONE) ? foreignKeyFieldAnnotation.fetch_type() : fetchType;\n }\n if (fetchType.equals(FetchType.EAGER)) {\n // Recovers the attribute class.\n Class associatedModelClass = Class.forName(field.getType().getName());\n manager = new Manager(associatedModelClass);\n String s = String.format(\"%s_id\", TableUtil.getColumnName(field));\n Object o = resultSet.getObject(s);\n Model associatedModel = manager.get(\"id\", o);\n // References a model associated by a foreign key.\n field.set(obj, associatedModel);\n } else {\n field.set(obj, null);\n }\n } else {\n // Sets the fields that aren't Model instances.\n if ((field.getType().getSimpleName().equals(\"int\") || field.getType().getSimpleName().equals(\"Integer\")) &&\n connection.toString().startsWith(\"oracle\")) {\n if (resultSet.getObject(TableUtil.getColumnName(field)) == null) {\n field.set(obj, 0);\n } else {\n String columnName = TableUtil.getColumnName(field);\n BigDecimal bigDecimal = (BigDecimal) resultSet.getObject(columnName);\n field.set(obj, bigDecimal.intValue());\n }\n } else {\n Object columnValue = resultSet.getObject(TableUtil.getColumnName(field));\n columnValue = convertZeroDateToNull(columnValue);\n if (columnValue instanceof java.sql.Date) {\n java.sql.Date date = (java.sql.Date) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(date.getTime());\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n columnValue = calendar.getTime();\n }\n if (columnValue instanceof java.sql.Time) {\n java.sql.Time time = (java.sql.Time) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(time.getTime());\n calendar.set(Calendar.YEAR, 0);\n calendar.set(Calendar.MONTH, 0);\n calendar.set(Calendar.DAY_OF_MONTH, 0);\n columnValue = calendar.getTime();\n }\n if (columnValue instanceof Timestamp) {\n Timestamp timestamp = (Timestamp) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(timestamp.getTime());\n columnValue = calendar.getTime();\n }\n field.set(obj, columnValue);\n }\n }\n manager = null;\n }\n T model = (T) obj;\n if (model != null) {\n model.setPersisted(true);\n }\n querySet.add(model);\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n close(resultSet, statement, connection);\n }\n return querySet;\n }",
"ConfigurationEntity loadFullConfigurations() {\n\n\t\tConfigurationEntity config;\n\t\tconfig = getPartiallyLoadedConfigEntity();\n\t\tconfig.setCanvasLayout(getCanvasLayoutMatrix());\n\t\treturn config\n\t}",
"public void saveAllEntities() {\n for (T entity : getEntities()) {\n if (entity.getId() < 0) {\n entity.setId(null);\n getService().save(entity);\n }\n else {\n getService().save(entity);\n }\n }\n for (T removedEntity : getRemovedEntities()) {\n getService().delete(removedEntity.getId());\n }\n setRemovedEntities(new ArrayList<T>());\n }",
"public interface MerchandiserEntities {\n\n static Entity outletEntity() {\n return new Entity(\n Entities.OUTLET_ENTITY,\n OutletModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n field(OutletModel.name),\n field(OutletModel.address),\n field(OutletModel.qrCode),\n field(OutletModel.location, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.locationGps, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.locationNetwork, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.images, JavaType.ARRAY, hasManyOutletImages())\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n Entities.OUTLET_TABLE,\n OutletTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n column(OutletModel.name, OutletTable.name),\n column(OutletModel.address, OutletTable.address),\n column(OutletModel.qrCode, OutletTable.qr_code)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n ArrayBuilder.<RelationMapping>create()\n .addAll(ImmutableList.of(\n Entities.locationMapping(OutletModel.location, OutletTable.location_id),\n Entities.locationMapping(OutletModel.locationGps, OutletTable.location_id_gps),\n Entities.locationMapping(OutletModel.locationNetwork, OutletTable.location_id_network),\n outletImagesMapping()\n ))\n .addAll(Arrays.asList(Entities.baseRelationMappingsArray()))\n .build(list -> list.toArray(new RelationMapping[list.size()]))\n )\n );\n }\n\n static Relationship hasOneLocation() {\n return new Relationship(\n Relationship.Type.MANY_TO_ONE,\n Relationship.Name.HAS_ONE,\n Entities.LOCATION_ENTITY\n );\n }\n\n static Relationship hasManyOutletImages() {\n return new Relationship(\n Relationship.Type.ONE_TO_MANY,\n Relationship.Name.HAS_MANY,\n Entities.OUTLET_IMAGE_ENTITY\n );\n }\n\n static VirtualRelationMappingImpl outletImagesMapping() {\n return new VirtualRelationMappingImpl(\n Entities.OUTLET_IMAGE_TABLE,\n Entities.OUTLET_IMAGE_ENTITY,\n ImmutableList.of(\n new ForeignColumnMapping(\n OutletImageTable.outlet_id,\n OutletTable.id\n )\n ),\n OutletModel.images,\n new RelationMappingOptionsImpl(\n RelationMappingOptions.CascadeUpsert.YES,\n RelationMappingOptions.CascadeDelete.YES,\n true\n )\n );\n }\n\n static Entity outletImageEntity() {\n return new Entity(\n Entities.OUTLET_IMAGE_ENTITY,\n OutletImageModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n field(OutletImageModel.title),\n field(OutletImageModel.description),\n field(OutletImageModel.uri),\n field(OutletImageModel.file),\n field(OutletImageModel.fileName),\n field(OutletImageModel.height),\n field(OutletImageModel.width),\n field(OutletImageModel.outlet, JavaType.OBJECT, hasOneOutlet())\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n Entities.OUTLET_IMAGE_TABLE,\n OutletImageTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n column(OutletImageModel.title, OutletImageTable.title),\n column(OutletImageModel.description, OutletImageTable.description),\n column(OutletImageModel.uri, OutletImageTable.uri),\n column(OutletImageModel.file, OutletImageTable.file),\n column(OutletImageModel.fileName, OutletImageTable.file_name),\n column(OutletImageModel.height, OutletImageTable.height),\n column(OutletImageModel.width, OutletImageTable.width)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n ArrayBuilder.<RelationMapping>create()\n .addAll(ImmutableList.of(\n new DirectRelationMappingImpl(\n OUTLET_TABLE,\n OUTLET_ENTITY,\n ImmutableList.of(\n new ForeignColumnMapping(\n OutletImageTable.outlet_id,\n OutletTable.id\n )\n ),\n OutletImageModel.outlet,\n new DirectRelationMappingOptionsImpl(\n RelationMappingOptions.CascadeUpsert.NO,\n RelationMappingOptions.CascadeDelete.NO,\n true,\n DirectRelationMappingOptions.LoadAndDelete.LOAD_AND_DELETE\n )\n )\n ))\n .addAll(Arrays.asList(Entities.baseRelationMappingsArray()))\n .build(list -> list.toArray(new RelationMapping[list.size()]))\n )\n );\n }\n\n static Relationship hasOneOutlet() {\n return new Relationship(\n Relationship.Type.MANY_TO_ONE,\n Relationship.Name.HAS_ONE,\n OUTLET_ENTITY\n );\n }\n\n static Entity locationEntity() {\n return new Entity(\n LOCATION_ENTITY,\n LocationModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n Entities.field(LocationModel.lat),\n Entities.field(LocationModel.lng),\n Entities.field(LocationModel.accuracy)\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n LOCATION_TABLE,\n LocationTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n Entities.column(LocationModel.lat, LocationTable.lat),\n Entities.column(LocationModel.lng, LocationTable.lng),\n Entities.column(LocationModel.accuracy, LocationTable.accuracy)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n Entities.baseRelationMappingsArray()\n )\n );\n }\n}",
"public List<Entity> getAll() {\n return entities;\n }",
"void saveAll(Collection<?> entities);",
"public void toEntity(){\n\n }",
"public final void generateAll() {\n ConsoleUtils.display(\">> Generate Rest test...\");\n\n List<IUpdater> updaters = this.getAdapter().getRestUpdatersTest();\n this.processUpdater(updaters);\n\n Iterable<EntityMetadata> entities =\n this.getAppMetas().getEntities().values();\n\n for (final EntityMetadata entity : entities) {\n if (entity.getOptions().containsKey(\"rest\") \n && !entity.isInternal() \n && !entity.getFields().isEmpty()) {\n\n ConsoleUtils.display(\">>> Generate Rest test for \" \n + entity.getName());\n\n this.getDatamodel().put(\n TagConstant.CURRENT_ENTITY, entity.getName());\n\n updaters = this.getAdapter()\n .getRestEntityUpdatersTest(entity);\n this.processUpdater(updaters);\n }\n }\n }",
"public CuentaEntity toEntity() {\r\n CuentaEntity cuentaE = super.toEntity();\r\n if (this.tarjeta != null) {\r\n if (!this.tarjeta.isEmpty()) {\r\n List<TarjetaEntity> tarjetasEntity = new ArrayList<>();\r\n for (TarjetaDTO dtoTarjeta : tarjeta) {\r\n tarjetasEntity.add(dtoTarjeta.toEntity());\r\n }\r\n cuentaE.setTarjeta(tarjetasEntity);\r\n }\r\n }\r\n if (this.ordenPagos != null) {\r\n if (!this.ordenPagos.isEmpty()) {\r\n List<OrdenPagoEntity> ordenesEntity = new ArrayList<>();\r\n for (OrdenPagoDTO dtoOrdenPago : ordenPagos) {\r\n ordenesEntity.add(dtoOrdenPago.toEntity());\r\n }\r\n cuentaE.setOrdenPagos(ordenesEntity);\r\n }\r\n }\r\n \r\n if (this.estudiante != null) {\r\n System.out.println(\"---------------------------------------------------343434343\");\r\n EstudianteEntity es = estudiante.toEntity();\r\n cuentaE.setEstudiante(es);\r\n System.out.println(es.getDocumento());\r\n System.out.println(cuentaE.getEstudiante());\r\n System.out.println(cuentaE.getEstudiante().getDocumento());\r\n }\r\n\r\n return cuentaE;\r\n }",
"public void createStaticEntities() {\n\n //Add Main Static entities\n entities.add(createGraveYard(7, -15));\n entities.add(createRuins(-25, -5));\n entities.add(createDragonSkull(-23, 23));\n entities.add(createLavaPool(-12, -20)); //Left Lava Pool\n entities.add(createLavaPool(5, -10)); //Middle Lava Pool\n entities.add(createLavaPool(19, -7)); //Right Lava Pool\n entities.add(createDungeonPortal(-24, -13));\n //For objects that are added randomly & require more specific addition\n //entities, their methodology will follow add()\n addRandoms();\n }",
"protected List<FloorDef> genEntities() {\n List<FloorDef> list = new ArrayList<>();\n\n // MUST ADD THE WORK IDS AFTER\n\n list.add(new FloorDef(1, 10, 7001));\n list.add(new FloorDef(2, 3, 7002));\n list.add(new FloorDef(3, 10, 7003));\n list.add(new FloorDef(4, 0, 7004));\n\n //int[] workIDs = new int[]{};\n\n //for (int i = 0; i < workIDs.length)\n\n return list;\n }",
"@Override\r\n public List<? extends DataStoreEntity> getAllEntities(boolean recursive) {\n return null;\r\n }",
"private static ImmutableList<Class<?>> applicationEntities() {\n List<String> paths = new ArrayList<>(List.of(PREFIX_STRING));\n if (additionalPaths != null) {\n paths.addAll(additionalPaths);\n }\n\n final List<Class<?>> collect = paths\n .stream()\n .map(path -> {\n logger.info(\"Scanning {} for Hibernate entities\", path);\n final Reflections reflections = new Reflections(path);\n final Set<Class<?>> entities = reflections.getTypesAnnotatedWith(Entity.class);\n logger.info(\"Found {} Hibernate entities\", entities.getClass());\n if (logger.isDebugEnabled()) {\n entities.forEach((entity) -> logger.debug(\"Registered {}.\", entity.getName()));\n }\n return entities;\n })\n .flatMap(Collection::stream)\n .collect(Collectors.toList());\n\n return ImmutableList.copyOf(collect);\n }",
"private void readEntityDeploymentInitial() {\n for (Class<?> entityClass : bootupClasses.getEntities()) {\n DeployBeanInfo<?> info = createDeployBeanInfo(entityClass);\n deployInfoMap.put(entityClass, info);\n Class<?> embeddedIdType = info.getEmbeddedIdType();\n if (embeddedIdType != null) {\n embeddedIdTypes.add(embeddedIdType);\n }\n }\n for (Class<?> entityClass : bootupClasses.getEmbeddables()) {\n DeployBeanInfo<?> info = createDeployBeanInfo(entityClass);\n deployInfoMap.put(entityClass, info);\n if (embeddedIdTypes.contains(entityClass)) {\n // register embeddedId types early - scalar properties only\n // and needed for creating BeanTables (id properties)\n registerEmbeddedBean(info);\n } else {\n // delay register of other embedded beans until after\n // the BeanTables have been created to support ManyToOne\n embeddedBeans.add(info);\n }\n }\n }",
"public List<Class<?>> getAllModelEntities() {\n\t\treturn ModelClasses.findModelClassesWithInterface(IEntityType.class);\n\t}",
"private void performCreates()\n {\n // Create entities. We have to loop possibly many times to create the entities\n // because we have to set the FKs. It's\n // possible that the source for a FK is a FK from yet another EI. We don't\n // want to copy a FK until we know that the source for a FK has been\n // properly set. We also want to make sure we set the FK's for the EIs that\n // have been excluded/deleted before we copy FKs for the included/created.\n int debugCnt = 0; // We'll keep a counter in case we get an infinite loop.\n\n // creatingEntities will be true for as long as we think we need to create more entities.\n boolean creatingEntities = true;\n while ( creatingEntities )\n {\n // We'll hope that we're done creating entities after this iteration. If we\n // find we need to create more then we'll turn it back on.\n creatingEntities = false;\n\n if ( debugCnt++ > 100 )\n throw new ZeidonException(\"Internal error: too many times creating entities.\");\n\n for ( ViewImpl view : viewList )\n {\n ObjectInstance oi = view.getObjectInstance();\n\n for ( final EntityInstanceImpl ei : oi.getEntities() )\n {\n if ( ! requiresCreate( ei ) )\n continue;\n\n assert ! ei.getEntityDef().isDerivedPath();\n\n if ( ! createInstance( view, ei ) )\n creatingEntities = true; // We weren't able to create ei. Try again later.\n }\n }\n } // while creatingEntities...\n }",
"public void testGetAllChildrenEntities()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface entityA = factory.createEntity();\r\n\t\t\tentityA.setName(\"entityA\");\r\n\r\n\t\t\tEntityInterface entityB = factory.createEntity();\r\n\t\t\tentityB.setName(\"entityB\");\r\n\t\t\tentityB.setParentEntity(entityA);\r\n\r\n\t\t\tEntityInterface entityC = factory.createEntity();\r\n\t\t\tentityC.setName(\"entityC\");\r\n\t\t\tentityC.setParentEntity(entityA);\r\n\r\n\t\t\tEntityInterface entityD = factory.createEntity();\r\n\t\t\tentityD.setName(\"entityD\");\r\n\t\t\tentityD.setParentEntity(entityB);\r\n\r\n\t\t\tEntityInterface entityE = factory.createEntity();\r\n\t\t\tentityE.setName(\"entityE\");\r\n\t\t\tentityE.setParentEntity(entityB);\r\n\r\n\t\t\tEntityInterface entityF = factory.createEntity();\r\n\t\t\tentityF.setName(\"entityF\");\r\n\t\t\tentityF.setParentEntity(entityC);\r\n\r\n\t\t\tEntityInterface entityG = factory.createEntity();\r\n\t\t\tentityG.setName(\"entityG\");\r\n\t\t\tentityG.setParentEntity(entityC);\r\n\r\n\t\t\tEntityInterface entityH = factory.createEntity();\r\n\t\t\tentityH.setName(\"entityH\");\r\n\t\t\tentityH.setParentEntity(entityC);\r\n\r\n\t\t\tentityManagerInterface.persistEntity(entityA);\r\n\t\t\tentityManagerInterface.persistEntity(entityB);\r\n\t\t\tentityC = entityManagerInterface.persistEntity(entityC);\r\n\r\n\t\t\tentityManagerInterface.persistEntity(entityD);\r\n\t\t\tentityManagerInterface.persistEntity(entityE);\r\n\t\t\tentityManagerInterface.persistEntity(entityF);\r\n\t\t\tentityManagerInterface.persistEntity(entityG);\r\n\t\t\tentityManagerInterface.persistEntity(entityH);\r\n\r\n\t\t\tCollection<EntityInterface> cChildren = entityManagerInterface\r\n\t\t\t\t\t.getChildrenEntities(entityC);\r\n\t\t\tassertEquals(3, cChildren.size());\r\n\r\n\t\t\tCollection<EntityInterface> hChildren = entityManagerInterface\r\n\t\t\t\t\t.getChildrenEntities(entityH);\r\n\t\t\tassertEquals(0, hChildren.size());\r\n\r\n\t\t\tentityA = entityManagerInterface.getEntityByIdentifier(entityA.getId().toString());\r\n\t\t\tentityB = entityManagerInterface.getEntityByIdentifier(entityB.getId().toString());\r\n\t\t\tentityC = entityManagerInterface.getEntityByIdentifier(entityC.getId().toString());\r\n\t\t\tentityD = entityManagerInterface.getEntityByIdentifier(entityD.getId().toString());\r\n\t\t\tentityE = entityManagerInterface.getEntityByIdentifier(entityE.getId().toString());\r\n\r\n\t\t\tassertEquals(2, entityManagerInterface.getChildrenEntities(entityA).size());\r\n\t\t\tassertEquals(2, entityManagerInterface.getChildrenEntities(entityB).size());\r\n\t\t\tassertEquals(3, entityManagerInterface.getChildrenEntities(entityC).size());\r\n\t\t\tassertEquals(0, entityManagerInterface.getChildrenEntities(entityD).size());\r\n\t\t\tassertEquals(0, entityManagerInterface.getChildrenEntities(entityE).size());\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"public <T> Collection<T> saveAll(Collection<T> entities);",
"List<DomainRelationshipDTO> findAll();",
"private void readEntityRelationships() {\n List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck = new ArrayList<>();\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n checkMappedBy(info, primaryKeyJoinCheck);\n }\n for (DeployBeanPropertyAssocOne<?> prop : primaryKeyJoinCheck) {\n checkUniDirectionalPrimaryKeyJoin(prop);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n secondaryPropsJoins(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n setInheritanceInfo(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n if (!info.isEmbedded()) {\n registerDescriptor(info);\n }\n }\n }",
"public DynamicModelPart buildChildrenUsingSeeds() {\n this.children.parallelStream().forEach(child -> {\n child.buildUsingSeeds();\n });\n return this;\n }",
"protected void handleEntitiesIndividually() {\n\n\t\tfinal Set<Long> originalBatch = getUidsToLoad();\n\t\tfinal Set<Long> batchOfOne = new HashSet<Long>();\n\n\t\t/**\n\t\t * We replace the batch of all the uids with our own which we'll only put one uid at a time.\n\t\t */\n\t\tsetBatch(batchOfOne);\n\n\t\tLOG.info(\"Loading \" + originalBatch.size() + \" entities individually\");\n\n\t\tfor (final Long uid : originalBatch) {\n\n\t\t\ttry {\n\n\t\t\t\tbatchOfOne.clear();\n\t\t\t\tbatchOfOne.add(uid);\n\n\t\t\t\tfinal Collection<ENTITY> loadedEntity = loadBatch();\n\t\t\t\tgetPipelinePerformance().addCount(\"loader:entities_loaded_individually\", loadedEntity.size());\n\n\t\t\t\tfor (final ENTITY entity : loadedEntity) {\n\t\t\t\t\tgetNextStage().send(entity);\n\t\t\t\t\tgetPipelinePerformance().addCount(\"loader:entities_out\", 1);\n\n\t\t\t\t}\n\t\t\t} catch (final Exception e) {\n\t\t\t\tgetPipelinePerformance().addCount(\"loader:individual_entity_loading_failures\", 1);\n\n\t\t\t\tLOG.error(\"Could not load entity with uid \" + uid + \" for indexing, this entity will not be indexed. \", e);\n\t\t\t}\n\n\t\t}\n\n\t\t/** Put the original set of uids back. */\n\t\tsetBatch(originalBatch);\n\n\t}",
"@Override\n protected void resetEntitySubClass ()\n {\n super.resetEntitySubClass ();\n }",
"public void testInheritanceGetAllAttributes()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\t// Step 2\t\t\t\r\n\t\t\tentityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\t\t\tentityManagerInterface.persistEntity(advanceTissueSpecimenB);\r\n\r\n\t\t\t// Step 3\t\r\n\r\n\t\t\tCollection<AttributeInterface> specimenAttributes = specimen.getAllAttributes();\r\n\t\t\t//2 user attributes + 1 system attribute for id\r\n\t\t\tassertEquals(3, specimenAttributes.size());\r\n\r\n\t\t\t//2 child Attributes + 1 parent Attribute + 2 system generated attributes for id\r\n\t\t\tCollection<AttributeInterface> tissueSpecimenAttributes = tissueSpecimen\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\tassertEquals(5, tissueSpecimenAttributes.size());\r\n\r\n\t\t\tCollection<AttributeInterface> advanceTissueSpecimenAAttributes = advanceTissueSpecimenA\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\t//1 child attribute + 2 parent Attribute + 1 grand parent attribute + 3 system generated attributes\r\n\t\t\tassertEquals(7, advanceTissueSpecimenAAttributes.size());\r\n\r\n\t\t\tCollection<AttributeInterface> advanceTissueSpecimenBAttributes = advanceTissueSpecimenB\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\t//2 child attribute + 2 parent Attribute + 1 grand parent attribute + 3 system generated attributes\r\n\t\t\tassertEquals(8, advanceTissueSpecimenBAttributes.size());\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"protected void prepareSave() {\r\n EObject cur;\r\n for (Iterator<EObject> iter = getAllContents(); iter.hasNext();) {\r\n cur = iter.next();\r\n \r\n EStructuralFeature idAttr = cur.eClass().getEIDAttribute();\r\n if (idAttr != null && !cur.eIsSet(idAttr)) {\r\n cur.eSet(idAttr, EcoreUtil.generateUUID());\r\n }\r\n }\r\n }",
"protected void addDefaultEntities() {\n\t\t// Complex entities\n\t\tentities.add(new EnglishName());\n\t\tentities.add(new DutchName());\n\t\t// Regular entities\n\t\tentities.add(new EnglishMathematic());\n\t\tentities.add(new DutchMathematic());\n\t\tentities.add(new EnglishConfirmation());\n\t\tentities.add(new DutchConfirmation());\n\t\tentities.add(new EnglishProfanity());\n\t\tentities.add(new DutchProfanity());\n\t\tentities.add(new EnglishCurrency());\n\t\tentities.add(new DutchCurrency());\n\t\tentities.add(new EnglishLanguage());\n\t\tentities.add(new DutchLanguage());\n\t\tentities.add(new EnglishCountry());\n\t\tentities.add(new DutchCountry());\n\t\tentities.add(new EnglishDate());\n\t\tentities.add(new DutchDate());\n\t\tentities.add(new EnglishTime());\n\t\tentities.add(new DutchTime());\n\t\tentities.add(new EnglishDuration());\n\t\tentities.add(new DutchDuration());\n\t\tentities.add(new EnglishMonth());\n\t\tentities.add(new DutchMonth());\n\t\tentities.add(new EnglishOrder());\n\t\tentities.add(new EnglishOrder2());\n\t\tentities.add(new DutchOrder());\n\t\tentities.add(new EnglishNumeric());\n\t\tentities.add(new DutchNumeric());\n\t\tentities.add(new EnglishPreposition());\n\t\tentities.add(new DutchPreposition());\n\t\tentities.add(new UniversalMathematic());\n\t\tentities.add(new UniversalCurrency());\n\t\tentities.add(new UniversalSmiley());\n\t\tentities.add(new UniversalFrowny());\n\t\tentities.add(new UniversalTime());\n\t\tentities.add(new UniversalNumeric());\n\t\tentities.add(new UniversalAlphabetic());\n\t}",
"@Test(description = \"export interface with all relationships\")\n public void exportWithAllRelationships()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final InterfaceData inter = data.getInterface(\"TestInterface\").addAllRelationships();\n data.create();\n\n inter.checkExport(inter.export());\n }",
"@XmlTransient\n public de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[] getEmbeddedObject(\n ) {\n de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[] array = new de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[0];\n return (de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[]) this._embeddedObjectList.toArray(array);\n }",
"@Override\npublic void deleteAll(Iterable<? extends Formation> entities) {\n\t\n}",
"public DynamicModelPart buildChildren() {\n this.children.parallelStream().forEach(child -> {\n child.build();\n });\n return this;\n }",
"@Override\n\tpublic void generate() {\n\t\tJavaObject object = new JavaObject(objectType);\n\n\t\t// Fields\n\t\taddFields(object);\n\n\t\t// Empty constructor\n\t\taddEmptyConstructor(object);\n\n\t\t// Types constructor\n\t\taddTypesConstructor(object);\n\n\t\t// Clone constructor\n\t\taddCloneConstructor(object);\n\n\t\t// Setters\n\t\taddSetters(object);\n\n\t\t// Build!\n\t\taddBuild(object);\n\n\t\t// Done!\n\t\twrite(object);\n\t}",
"@Override\n public Class<E> getPersistentClass() {\n return entityClass;\n }",
"@Override\n protected final void resetEntitySubClass ()\n {\n super.resetEntitySubClass ();\n }",
"@AllowFailure(message=\"Fails after first run with duplicate key value in a unique PK constraint or index\")\n public void testEagerFetch() {\n Map props = new HashMap(System.getProperties());\n props.put(\"openjpa.MetaDataFactory\", \"jpa(Types=\" + TblChild.class.getName() + \";\"\n + TblGrandChild.class.getName() + \";\"\n + TblParent.class.getName() + \")\");\n props.put(\"openjpa.jdbc.QuerySQLCache\", \"true\");\n\n OpenJPAEntityManagerFactorySPI emf1 = (OpenJPAEntityManagerFactorySPI) OpenJPAPersistence.\n cast(Persistence.createEntityManagerFactory(\"test\", props));\n try {\n EntityManagerImpl em = (EntityManagerImpl)emf1.createEntityManager();\n\n em.getTransaction().begin();\n\n for (int i = 1; i < 3; i++) {\n TblParent p = new TblParent();\n p.setParentId(i);\n TblChild c = new TblChild();\n c.setChildId(i);\n c.setTblParent(p);\n p.addTblChild(c);\n em.persist(p);\n em.persist(c);\n\n TblGrandChild gc = new TblGrandChild();\n gc.setGrandChildId(i);\n gc.setTblChild(c);\n c.addTblGrandChild(gc);\n\n em.persist(p);\n em.persist(c);\n em.persist(gc);\n }\n em.flush();\n em.getTransaction().commit();\n em.clear();\n\n for (int i = 1; i < 3; i++) {\n TblParent p = em.find(TblParent.class, i);\n int pid = p.getParentId();\n assertEquals(pid, i);\n Collection<TblChild> children = p.getTblChildren();\n boolean hasChild = false;\n for (TblChild c : children) {\n hasChild = true;\n Collection<TblGrandChild> gchildren = c.getTblGrandChildren();\n int cid = c.getChildId();\n assertEquals(cid, i);\n boolean hasGrandChild = false;\n for (TblGrandChild gc : gchildren) {\n hasGrandChild = true;\n int gcId = gc.getGrandChildId();\n assertEquals(gcId, i);\n }\n assertTrue(hasGrandChild);\n }\n assertTrue(hasChild);\n em.close();\n }\n } finally {\n closeEMF(emf1);\n }\n }",
"public Entity5Builder() {\r\n entity5 = new Entity5();\r\n }",
"public void deleteAll( Class<?> c) throws RNoEntityException{\n\t\tEntity e = ALiteOrmBuilder.getInstance().getEntity(c);\n\t\tif(e == null)\n\t\t\tthrow new RNoEntityException(\"For : \" + c.getName());\n\t\te .deleteAll(db);\n\t}",
"protected void buildCommonModel(PhysicalDataModel pdm, boolean fhirSchema, boolean oauthSchema, boolean javaBatchSchema) {\n if (fhirSchema) {\n FhirSchemaGenerator gen = new FhirSchemaGenerator(adminSchemaName, schemaName);\n gen.buildSchema(pdm);\n switch (dbType) {\n case DB2:\n gen.buildDatabaseSpecificArtifactsDb2(pdm);\n break;\n case DERBY:\n logger.info(\"No database specific artifacts\");\n break;\n case POSTGRESQL:\n gen.buildDatabaseSpecificArtifactsPostgres(pdm);\n break;\n default:\n throw new IllegalStateException(\"Unsupported db type: \" + dbType);\n }\n }\n\n // Build/update the Liberty OAuth-related tables\n if (oauthSchema) {\n OAuthSchemaGenerator oauthSchemaGenerator = new OAuthSchemaGenerator(oauthSchemaName);\n oauthSchemaGenerator.buildOAuthSchema(pdm);\n }\n\n // Build/update the Liberty JBatch related tables\n if (javaBatchSchema) {\n JavaBatchSchemaGenerator javaBatchSchemaGenerator = new JavaBatchSchemaGenerator(javaBatchSchemaName);\n javaBatchSchemaGenerator.buildJavaBatchSchema(pdm);\n }\n }",
"@Override\r\n public List<EntityPath> getAllEntityPaths(boolean recursive) {\n return null;\r\n }",
"public static CodeBlock generateToModelForSet(Field field, GenerationPackageModel generationInfo) throws DefinitionException, InnerClassGenerationException {\n if (field.getGenericType().getTypeName().equals(CLASS_SET) || field.getGenericType().getTypeName().matches(PATTERN_FOR_GENERIC_INNER_TYPES))\n throw new DefinitionException(format(UNABLE_TO_DEFINE_GENERIC_TYPE,\n field.getGenericType().getTypeName(),\n field.getName(),\n field.getDeclaringClass().getSimpleName(),\n TO_MODEL + field.getDeclaringClass().getSimpleName()));\n if (field.getGenericType().getTypeName().contains(CLASS_STRING))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_STRING_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_INTEGER))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_INT_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_DOUBLE))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_DOUBLE_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_LONG))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_LONG_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_BYTE))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_BYTE_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_BOOLEAN))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_BOOL_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_FLOAT))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_FLOAT_SET, field.getName(), field.getName())).build();\n\n ClassName newClassMapper = createMapperForInnerClassIfNeeded(getClassFromField(field), generationInfo);\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_ENTITY_SET,\n field.getName(),\n field.getName(),\n newClassMapper,\n TO_MODEL + newClassMapper.simpleName().replace(MAPPER, EMPTY_STRING))).build();\n }",
"Builder addMainEntity(Thing value);",
"@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generator = new Generator(\n \t\trs.getInt(1),\n \t\trs.getString(2),\n \t\trs.getString(3),\n \t\trs.getInt(4),\n \t\trs.getInt(5),\n \t\trs.getInt(6)\n \t);\n\t\t\t\tresult.add(generator);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t\treturn result;\n\n\t}",
"@Override\n public boolean hasEntityShapes() { return true; }",
"void buildFromEntity(E entity);",
"@Override\n\tpublic List<Generator> getAll() {\n\t\treturn new ArrayList<>();\n\t}",
"public static void createEntitySources() {\n UUID makeBreakfastId = UUID.fromString(\"fab3906e-b50a-11eb-b13c-0242ac110002\"); //saved.getId()\n ITodo makeBreakfast = SelectTemplate.selectOne(ITodo.class, new Object[]{makeBreakfastId}, new HashMap<>());\n System.out.println(\"selected -> \" + makeBreakfast.getId());\n\n UUID makePancakeId = UUID.fromString(\"fab6a862-b50a-11eb-b13c-0242ac110002\");\n ITodo makePancake = SelectTemplate.selectOne(ITodo.class, new Object[]{makePancakeId}, new HashMap<>());\n System.out.println(\"selected -> \" + makePancake.getId());\n\n //modify found task\n makeBreakfast.setNextTask(makePancake);\n\n //updated modified task\n UpdateTemplate.updateOne(makeBreakfast);\n ITodo updatedTask = SelectTemplate.selectOne(ITodo.class, new Object[]{makeBreakfast.getId()}, new HashMap<>());\n System.out.println(\"updated -> \" + updatedTask.getId());\n }",
"@Test\n public void testDAM32102001() {\n // By default the loading related entity is eager.\n testDAM32101001();\n }",
"protected Entity() {\n UID = GEN_COUNT;\n GEN_COUNT++;\n }",
"Builder addMainEntity(Thing.Builder value);",
"@Override\n public List<SideDishEntity> findAll() {\n return null;\n }",
"@Test\n public void testJavaScriptGenerationAllEntities() throws Exception {\n setSystemAdministratorContext();\n\n // final Template template = createSaveTemplate(\n // \"/org/openbravo/service/datasource/templates/datasource\", new ArrayList<Template>());\n\n int i = 0;\n for (Entity entity : ModelProvider.getInstance().getModel()) {\n final DataSourceService dataSourceService = dataSourceServiceProvider.getDataSource(entity\n .getName());\n final DataSourceComponent component = (DataSourceComponent) dataSourceComponentProvider\n .getComponent(dataSourceService.getName(), new HashMap<String, Object>());\n component.setDataSourceService(dataSourceService);\n i++;\n if ((i % 2) == 0) {\n final Map<String, Object> params = new HashMap<String, Object>();\n params.put(\"_onlyGenerateCreateStatement\", \"true\");\n component.setParameters(params);\n }\n final Map<String, Object> data = new HashMap<String, Object>();\n data.put(\"data\", component);\n final String result = templateProcessor.process(dataSourceService.getTemplate(), data);\n log.debug(result);\n }\n // prevent actual save of the template\n OBDal.getInstance().rollbackAndClose();\n }",
"Collection<Class<?>> registerEntities();",
"public static void addInterfaces(Model model) throws MolgenisModelException\r\n\t{\r\n\t\tlogger.debug(\"add root entities for interfaces...\");\r\n\t\tfor (Entity entity : model.getEntities())\r\n\t\t{\r\n\t\t\t// Generate the interface if rootAncestor (so has subclasses) and\r\n\t\t\t// itself is not an interface...\r\n\t\t\tif (entity.isRootAncestor())\r\n\t\t\t{\r\n\t\t\t\tEntity rootAncestor = entity;\r\n\t\t\t\tif (!entity.isAbstract())\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\t// generate a new interface\r\n\t\t\t\t\trootAncestor = new Entity(\"_\" + entity.getName() + \"Interface\", entity.getName(),\r\n\t\t\t\t\t\t\tmodel.getDatabase());\r\n\t\t\t\t\trootAncestor\r\n\t\t\t\t\t\t\t.setDescription(\"Identity map table for \"\r\n\t\t\t\t\t\t\t\t\t+ entity.getName()\r\n\t\t\t\t\t\t\t\t\t+ \" and all its subclasses. \"\r\n\t\t\t\t\t\t\t\t\t+ \"For each row that is added to \"\r\n\t\t\t\t\t\t\t\t\t+ entity.getName()\r\n\t\t\t\t\t\t\t\t\t+ \" or one of its subclasses, first a row must be added to this table to get a valid primary key value.\");\r\n\t\t\t\t\t// rootAncestor.setAbstract( true );\r\n\r\n\t\t\t\t\t// copy key fields to interface and unset auto key in child\r\n\t\t\t\t\tVector<Field> keyfields = entity.getKey(0).getFields();\r\n\t\t\t\t\tVector<String> keyfields_copy = new Vector<String>();\r\n\t\t\t\t\tfor (Field f : keyfields)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tField key_field = new Field(rootAncestor, f.getType(), f.getName(), f.getName(), f.isAuto(),\r\n\t\t\t\t\t\t\t\tf.isNillable(), f.isReadOnly(), f.getDefaultValue());\r\n\t\t\t\t\t\tkey_field.setDescription(\"Primary key field unique in \" + entity.getName()\r\n\t\t\t\t\t\t\t\t+ \" and its subclasses.\");\r\n\t\t\t\t\t\tif (key_field.getType() instanceof StringField) key_field.setVarCharLength(key_field\r\n\t\t\t\t\t\t\t\t.getVarCharLength());\r\n\t\t\t\t\t\trootAncestor.addField(key_field);\r\n\t\t\t\t\t\tkeyfields_copy.add(key_field.getName());\r\n\r\n\t\t\t\t\t\tif (f.isAuto())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// unset auto key in original, but\r\n\r\n\t\t\t\t\t\t\t// SOLVED BY TRIGGERS Field autoField =\r\n\t\t\t\t\t\t\t// entity.getField(f.getName());\r\n\t\t\t\t\t\t\t// SOLVED BY TRIGGERS autoField.setAuto(false);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\trootAncestor.addKey(keyfields_copy, entity.getKey(0).isSubclass(), null);\r\n\r\n\t\t\t\t\tVector<String> parents = new Vector<String>();\r\n\t\t\t\t\tparents.add(rootAncestor.getName());\r\n\t\t\t\t\tentity.setParents(parents);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// add the type enum to the root element\r\n\t\t\t\tVector<Entity> subclasses = entity.getAllDescendants();\r\n\t\t\t\tVector<String> enumOptions = new Vector<String>();\r\n\t\t\t\tenumOptions.add(entity.getName());\r\n\t\t\t\tfor (Entity subclass : subclasses)\r\n\t\t\t\t{\r\n\t\t\t\t\tenumOptions.add(subclass.getName());\r\n\t\t\t\t}\r\n\t\t\t\tField type_field = new Field(rootAncestor, new EnumField(), Field.TYPE_FIELD, Field.TYPE_FIELD, true,\r\n\t\t\t\t\t\tfalse, false, null);\r\n\t\t\t\ttype_field.setDescription(\"Subtypes of \" + entity.getName() + \". Have to be set to allow searching\");\r\n\t\t\t\ttype_field.setEnumOptions(enumOptions);\r\n\t\t\t\ttype_field.setHidden(true);\r\n\t\t\t\trootAncestor.addField(0, type_field);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"ImmutableList<SchemaOrgType> getMainEntityList();",
"public List<Entity> getAllEntities()\n\t{\n\t\treturn this.entities;\n\t}",
"public Vector<HibernateEntity> getEntitiesAllowedAsParent() {\n\t\tVector<HibernateEntity> result = new Vector<HibernateEntity>();\n\t\tfor (HibernateEntity entity : getHibernateModel().getEntities()) {\n\t\t\tif (entity != this && entity.getFather() == null) {\n\t\t\t\tresult.add(entity);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"public void setupEntities() {\n }",
"@Override\n public List<R> getAll() {\n return onFindForList(getSession().createCriteria(entityClass).list());\n }",
"public List<Object> retrieveIncrementalEntities() {\n List<Object> result = new ArrayList<Object>();\n for (ProvisioningEntityWrapper provisioningEntityWrapper : this.provisioningEntityWrappers) {\n \n if (provisioningEntityWrapper.getGrouperTargetEntity() != null) {\n result.add(provisioningEntityWrapper.getGrouperTargetEntity());\n } else if (provisioningEntityWrapper.getGrouperProvisioningEntity() != null) {\n result.add(provisioningEntityWrapper.getGrouperProvisioningEntity());\n } else if (provisioningEntityWrapper.getGcGrouperSyncMember() != null) {\n result.add(provisioningEntityWrapper.getGcGrouperSyncMember());\n } else if (provisioningEntityWrapper.getProvisioningStateEntity() != null) {\n result.add(provisioningEntityWrapper.getProvisioningStateEntity());\n }\n }\n return result;\n }",
"Assembler newAssembler(final Class< ? > dto, final Class< ? > entity);",
"@Override\n\t@Transactional\n\tpublic List<T> getAll() {\n\t\tList<?> result = hibernateTemplate.getSessionFactory().getCurrentSession()\n\t\t\t\t.createCriteria(getGenericClass())\n\t\t\t\t.list();\n\t\treturn result.stream()\n\t\t\t\t.map(e -> initialize(checkType(e)))\n\t\t\t\t.filter(e -> e != null)\n\t\t\t\t.collect(Collectors.toList());\n\t}",
"public void addHeaderRelationships(boolean include_types) { \n Bundles bs = getRTParent().getRootBundles();\n Iterator<Tablet> it_tab = bs.tabletIterator();\n while (it_tab.hasNext()) {\n Tablet tablet = it_tab.next();\n // System.err.println(\"Tablet \\\"\" + tablet + \"\\\"\");\n int fields[] = tablet.getFields();\n // Only keep the non-null fields\n List<Integer> al = new ArrayList<Integer>(); for (int i=0;i<fields.length;i++) if (fields[i] != -1) al.add(i);\n fields = new int[al.size()]; for (int i=0;i<fields.length;i++) fields[i] = al.get(i);\n // Go through the valid fields now\n for (int i=0;i<fields.length;i++) {\n int hdr_i = fields[i];\n int hdr_j = fields[(i+1)%fields.length];\n\tString hdr_i_str = bs.getGlobals().fieldHeader(hdr_i),\n\t hdr_j_str = bs.getGlobals().fieldHeader(hdr_j);\n // System.err.println(\" \\\"\" + hdr_i_str + \"\\\" => \\\"\" + hdr_j_str + \"\\\"\");\n // Put the symbol\n if (entity_to_shape.containsKey(hdr_i_str) == false) entity_to_shape.put(hdr_i_str, Utils.Symbol.CIRCLE); \n if (entity_to_shape.containsKey(hdr_j_str) == false) entity_to_shape.put(hdr_j_str, Utils.Symbol.CIRCLE); \n\t// Make the world location\n\tif (entity_to_wxy.containsKey(hdr_i_str) == false) { entity_to_wxy.put(hdr_i_str, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1)); transform(hdr_i_str); }\n\tif (entity_to_wxy.containsKey(hdr_j_str) == false) { entity_to_wxy.put(hdr_j_str, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1)); transform(hdr_j_str); }\n\t// Figure out the weights\n\tgraph.addNode(hdr_i_str); graph.addNode(hdr_j_str); digraph.addNode(hdr_i_str); digraph.addNode(hdr_j_str);\n\tdouble g_w = graph.getConnectionWeight(graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(hdr_j_str)),\n\t dg_w = digraph.getConnectionWeight(graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(hdr_j_str));\n if (Double.isInfinite(g_w)) g_w = 0.0; if (Double.isInfinite(dg_w)) dg_w = 0.0;\n // Add the edges\n\t graph.addNeighbor(hdr_i_str, hdr_j_str, g_w + tablet.size());\n\t graph.addNeighbor(hdr_j_str, hdr_i_str, g_w + tablet.size());\n\tdigraph.addNeighbor(hdr_i_str, hdr_j_str, dg_w + tablet.size());\n\t// Associate the bundles with the edge\n\tIterator<Bundle> it_bun = tablet.bundleIterator();\n\twhile (it_bun.hasNext()) {\n\t Bundle bundle = it_bun.next();\n\t graph.addLinkReference( graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(hdr_j_str), bundle);\n\t graph.addLinkReference( graph.getEntityIndex(hdr_j_str), graph.getEntityIndex(hdr_i_str), bundle);\n\t digraph.addLinkReference(digraph.getEntityIndex(hdr_i_str), digraph.getEntityIndex(hdr_j_str), bundle);\n // Include the data types if specified\n\t if (include_types) {\n BundlesDT.DT datatype = BundlesDT.getEntityDataType(bundle.toString(hdr_i));\n // System.err.println(\"Including Type For \\\"\" + bundle.toString(hdr_i) + \"\\\" ==> \" + datatype);\n\t if (datatype != null) {\n graph.addNode(\"\" + datatype); entity_to_shape.put(\"\" + datatype, Utils.Symbol.TRIANGLE);\n\t digraph.addNode(\"\" + datatype); \n\t if (entity_to_wxy.containsKey(\"\" + datatype) == false) {\n\t entity_to_wxy.put(\"\" + datatype, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1)); \n\t\ttransform(\"\" + datatype);\n\t }\n\t g_w = graph.getConnectionWeight(graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(\"\" + datatype));\n\t dg_w = graph.getConnectionWeight(graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(\"\" + datatype));\n if (Double.isInfinite(g_w)) g_w = 0.0; if (Double.isInfinite(dg_w)) dg_w = 0.0;\n\t graph.addNeighbor(\"\" + datatype, hdr_i_str, g_w + 1);\n\t graph.addNeighbor(hdr_i_str, \"\" + datatype, g_w + 1);\n\t digraph.addNeighbor(hdr_i_str, \"\" + datatype, dg_w + 1);\n\t graph.addLinkReference( graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(\"\" + datatype), bundle);\n\t graph.addLinkReference( graph.getEntityIndex(\"\" + datatype), graph.getEntityIndex(hdr_i_str), bundle);\n\t digraph.addLinkReference(digraph.getEntityIndex(hdr_i_str), digraph.getEntityIndex(\"\" + datatype), bundle);\n digraph.addLinkStyle(digraph.getEntityIndex(hdr_i_str), digraph.getEntityIndex(\"\" + datatype), STYLE_DOTTED_STR);\n\t }\n\t }\n\t}\n\t// Add the style\n digraph.addLinkStyle(digraph.getEntityIndex(hdr_i_str), digraph.getEntityIndex(hdr_j_str), STYLE_SOLID_STR);\n }\n }\n getRTComponent().render();\n }",
"EntityType getEntity();",
"private void populateEntitiesLists() {\n\t\tfor (StaticEntity entity : ((ClientTiledMap) map).staticEntities) {\n\t\t\tregisterStaticEntity(entity);\n\t\t}\n\t}",
"public static void main(String[] args) {\n\n\t\tConfiguration cfg = new Configuration();\n\t\tcfg.configure(\"hibernate.cfg.xml\"); \n\n\t\tSessionFactory factory = cfg.buildSessionFactory();\n\t\tSession session = factory.openSession();\t\t\n\n\t\tCards c =new Cards();\n\n\t\t c.setCid(101);\n\t\t c.setCname(\"java4s\");\n\n\t\t CardUser c1=new CardUser();\n\n\t\t c1.setCarduserid(504);\n\t\t c1.setCardusername(\"customer4\");\n\t\t c1.setParentObject(c);\n\n \t CardUser c2=new CardUser();\n\n\t\t c2.setCarduserid(505);\n\t\t c2.setCardusername(\"customer5\");\n\t\t c2.setParentObject(c);\n\n\t\t CardUser c3=new CardUser();\n\n\t\t c3.setCarduserid(506);\n\t\t c3.setCardusername(\"customer6\");\n\t\t c3.setParentObject(c); \t\t \n\n\t\t Transaction tx = session.beginTransaction();\n\n\t\t session.save(c1);\n\t\t session.save(c2);\n\t\t session.save(c3);\n\n\t\t tx.commit();\n\t\t session.close();\n\t\t System.out.println(\"One To Many is Done..!!\");\n\t\t factory.close();\n\t}",
"public Entity5 build() {\r\n return entity5;\r\n }",
"@Override\n public boolean isEmbedded() {\n return true;\n }",
"protected void setEmbeddableKeys() {\n }",
"@Override\n protected void setEmbeddableKeys() {\n }",
"public abstract P toEntity();",
"public Set getAllPersistableChildren() {\n \n Set children = new HashSet();\n children.addAll(comments);\n return children;\n }",
"@SuppressWarnings(\"deprecation\")\n public void createAll(boolean clean) {\n if (clean) {\n plugin.getLogger().info(\"[AdvancementAPI] Cleaning previously generated advancements\");\n for (Advancement advancement : this.advancements.values()) {\n if (Bukkit.getAdvancement(advancement.getKey()) != null) {\n Bukkit.getUnsafe().removeAdvancement(advancement.getKey());\n }\n }\n\n Bukkit.reloadData();\n }\n\n plugin.getLogger().info(\"[AdvancementAPI] Generating advancements\");\n for (Advancement advancement : this.advancements.values()) {\n if (Bukkit.getAdvancement(advancement.getKey()) == null) {\n Bukkit.getUnsafe().loadAdvancement(advancement.getKey(), serializer.serialize(advancement));\n }\n }\n\n Bukkit.reloadData();\n }",
"public void testGetDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\t//step 2\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\t\t\tadvanceTissueSpecimenB = entityManagerInterface.persistEntity(advanceTissueSpecimenB);\r\n\r\n\t\t\t/*\r\n\t\t\t * Test getData method\r\n\t\t\t */\r\n\r\n\t\t\t//step 3\t\t\t\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tMap outputMap = entityManagerInterface.getRecordById(tissueSpecimen, recordId);\r\n\r\n\t\t\t//step 4\t\r\n\t\t\tassertEquals(4, outputMap.size());\r\n\t\t\tassertEquals(\"123456\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label\", outputMap.get(label));\r\n\t\t\tassertEquals(\"45\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"11-12-1982\", outputMap.get(arivalDate));\r\n\r\n\t\t\t//step 5\t\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"46\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\toutputMap = entityManagerInterface.getRecordById(advanceTissueSpecimenA, recordId);\r\n\t\t\t//step 6\t\t\t\r\n\t\t\tassertEquals(5, outputMap.size());\r\n\t\t\tassertEquals(\"869\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label\", outputMap.get(label));\r\n\t\t\tassertEquals(\"46\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"11-11-1982\", outputMap.get(arivalDate));\r\n\r\n\t\t\t//step 7\t\t\t\t\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"1001\");\r\n\t\t\tdataValue.put(label, \"specimen parent label new\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"411\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"01-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttributeB, \"40\");\r\n\t\t\tdataValue.put(newAttributeB2, \"41\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenB, dataValue);\r\n\t\t\toutputMap = entityManagerInterface.getRecordById(advanceTissueSpecimenB, recordId);\r\n\t\t\t//step 8\t\t\t\t\r\n\t\t\tassertEquals(6, outputMap.size());\r\n\t\t\tassertEquals(\"1001\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label new\", outputMap.get(label));\r\n\t\t\tassertEquals(\"411\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"01-11-1982\", outputMap.get(arivalDate));\r\n\t\t\tassertEquals(\"40\", outputMap.get(newAttributeB));\r\n\t\t\tassertEquals(\"41\", outputMap.get(newAttributeB2));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic Class<E> getEntityClass() {\n\t\treturn null;\n\t}",
"public void testInsertDataForInheritanceParentNoData()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\t//step 2\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\t//dataValue.put(barcode, \"123456\");\r\n\t\t\t//dataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\t//step 3\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\t//step 4\r\n\t\t\tResultSet resultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\r\n\t\t\tresultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"public void testInsertDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\r\n\t\t\tresultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"public void reproduce() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < Utils.between(_nChildren,1,8); i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inherit(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_nTotalChildren++;\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t\t_infectedGeneticCode = null;\n\t\t\t}\n\t\t\t_timeToReproduce = 20;\n\t\t}\n\t}",
"public void generate() {\n\t\tthis.initializePathBindingClass();\n\t\t// managed at abstract level ; name provided at binding generation time\n\t\t// this.addGetName();\n\t\t// this.addGetType();\n\n\t\t// add all properties methods\n\t\tthis.addProperties();\n\t\t// add getter that provides property list\n\t\tthis.addGetChildBindings();\n\n\t\t// initialize class declaration (*Binding)\n\t\tthis.initializeRootBindingClass();\n\t\t// add constructors\n\t\tthis.addConstructors();\n\t\t// add getWithRoot method\n\t\tthis.addGetWithRoot();\n\t\t// add getSafelyWithRoot method\n\t\tthis.addGetSafelyWithRoot();\n\n\t\tthis.addGeneratedTimestamp();\n\t\tthis.addSerialVersionUID();\n\t\tthis.saveCode(this.pathBindingClass);\n\t\tthis.saveCode(this.rootBindingClass);\n\t}",
"@Override\n\tpublic List<ImageEntity> getAll() {\n\t\treturn DatabaseContext.findAll(ImageEntity.class);\n\t}",
"void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) {\n HasManyProxy proxyHandler = new HasManyProxy(this, f, (HasMany) a);\n associationProxies.add(proxyHandler);\n Classes.setFieldValue(this, f.getName(), Proxy.newProxyInstance(List.class.getClassLoader(),\n new Class[]{List.class}, proxyHandler));\n } else if (a.annotationType().equals(HasAndBelongsToMany.class)) {\n // TODO implement\n } else if (a.annotationType().equals(HasOne.class)) {\n // TODO implement\n } else if (a.annotationType().equals(BelongsTo.class)) {\n BelongsTo belongsTo = (BelongsTo) a;\n if (!(f.getGenericType() instanceof Class))\n throw new IllegalAnnotationException(\"@BelongsTo can only be applied to non-generic fields\");\n ActiveRecord ar = (ActiveRecord) Classes.newInstance(f.getGenericType());\n String fk = ActiveRecords.foriegnKey(f.getGenericType());\n if (!belongsTo.foreignKey().equals(\"\")) fk = belongsTo.foreignKey();\n System.out.println(\"foriegn key = \" + fk);\n Object fkValue = Classes.getFieldValue(this, fk);\n if (fkValue != null) {\n ar.read(fkValue);\n Classes.setFieldValue(this, f.getName(), ar);\n }\n }\n }\n }\n }",
"@Override\n public void save(Iterable<? extends SideDishEntity> entities) {\n\n }",
"public LazyDataModel<BasicEntity> getEntities() {\n return entities;\n }",
"TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Test name\");\n testEntity.setCheck(true);\n testEntity.setDateCreated(new Date(System.currentTimeMillis()));\n testEntity.setDescription(\"description\");\n\n Specialization specialization = new Specialization();\n specialization.setName(\"Frontend\");\n specialization.setLevel(\"Senior\");\n specialization.setYears(10);\n\n testEntity.setSpecialization(specialization);\n\n return testEntity;\n }",
"public void setInheritAll(boolean value) {\n inheritAll = value;\n }",
"List<T> getAll() throws PersistException;",
"@Override\n\tpublic <T> EntityGraph<T> createEntityGraph(Class<T> rootType) {\n\t\treturn null;\n\t}",
"public abstract List<T> convertToEntities(List<D> dtos);",
"public void testInheritanceEditMetadataForChangeParentWithNoData()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\t//step 2\t\t\t\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\t//step 3\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\t//step 4\r\n\t\t\tEntityInterface savedTissueSpecimen = entityManagerInterface\r\n\t\t\t\t\t.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 5\r\n\t\t\tEntityInterface newSpecimen = factory.createEntity();\r\n\t\t\tnewSpecimen.setName(\"newSpecimen\");\r\n\t\t\tnewSpecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcodeOfNewSpecimen = factory.createStringAttribute();\r\n\t\t\tbarcodeOfNewSpecimen.setName(\"barcodeOfNewSpecimen\");\r\n\t\t\tnewSpecimen.addAbstractAttribute(barcodeOfNewSpecimen);\r\n\r\n\t\t\t//step 6\r\n\t\t\tnewSpecimen = entityManagerInterface.persistEntity(newSpecimen);\r\n\r\n\t\t\t//step 6\r\n\t\t\ttissueSpecimen.setParentEntity(newSpecimen);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 7\r\n\t\t\tassertTrue(true);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.getEntityByIdentifier(savedTissueSpecimen\r\n\t\t\t\t\t.getId());\r\n\t\t\tassertEquals(savedTissueSpecimen.getParentEntity(), newSpecimen);\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcodeOfNewSpecimen, \"123456\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\r\n\t\t\tentityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(0, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ newSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic Class<Object> getEntityClass() {\n\t\treturn null;\n\t}",
"public void getEntities() {\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tEntityA entityA = exampleDao.getOne(1);\r\n\t\tEntityB entityB3 = entityBDao.getOne(3);\r\n\t \tEntityB entityB2 = entityBDao.getOne(2);\r\n\t \tEntityB entityB1 = entityBDao.getOne(1);\r\n\r\n\t \t\r\n\r\n\t\tentityA.setEntityBList(Arrays.asList(entityB2,entityB3,entityB1));\r\n\r\n\t}",
"public void iterateMainEntity(Entity e, OsmDbAccessorContext ctx) throws SQLException {\n \t\tif (e instanceof Way && e.getTag(OSMTagKey.ADDR_INTERPOLATION) != null ){\n \t\t\tBuildingInterpolation type = null;\n \t\t\tint interpolationInterval = 0;\n \t\t\tif(e.getTag(OSMTagKey.ADDR_INTERPOLATION) != null) {\n \t\t\t\ttry {\n \t\t\t\t\ttype = BuildingInterpolation.valueOf(e.getTag(OSMTagKey.ADDR_INTERPOLATION).toUpperCase());\n \t\t\t\t} catch (RuntimeException ex) {\n \t\t\t\t\ttry {\n \t\t\t\t\t\tinterpolationInterval = Integer.parseInt(e.getTag(OSMTagKey.ADDR_INTERPOLATION));\n \t\t\t\t\t} catch(NumberFormatException ex2) {\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (type != null && interpolationInterval > 0) {\n \t\t\t\tList<Node> nodesWithHno = new ArrayList<Node>();\n \t\t\t\tfor (Node n : ((Way) e).getNodes()) {\n \t\t\t\t\tif (n.getTag(OSMTagKey.ADDR_HOUSE_NUMBER) != null && n.getTag(OSMTagKey.ADDR_STREET) != null) {\n \t\t\t\t\t\tnodesWithHno.add(n);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (nodesWithHno.size() > 1) {\n \t\t\t\t\tfor (int i = 1; i < nodesWithHno.size(); i++) {\n \t\t\t\t\t\tNode first = nodesWithHno.get(i - 1);\n \t\t\t\t\t\tNode second = nodesWithHno.get(i);\n \t\t\t\t\t\tboolean exist = streetDAO.findBuilding(first);\n \t\t\t\t\t\tif (exist) {\n \t\t\t\t\t\t\tstreetDAO.removeBuilding(first);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tLatLon l = e.getLatLon();\n \t\t\t\t\t\tSet<Long> idsOfStreet = getStreetInCity(first.getIsInNames(), first.getTag(OSMTagKey.ADDR_STREET), null, l);\n \t\t\t\t\t\tif (!idsOfStreet.isEmpty()) {\n \t\t\t\t\t\t\tBuilding building = new Building(first);\n \t\t\t\t\t\t\tbuilding.setInterpolationInterval(interpolationInterval);\n \t\t\t\t\t\t\tbuilding.setInterpolationType(type);\n \t\t\t\t\t\t\tbuilding.setName(first.getTag(OSMTagKey.ADDR_HOUSE_NUMBER));\n \t\t\t\t\t\t\tbuilding.setName2(second.getTag(OSMTagKey.ADDR_HOUSE_NUMBER));\n \t\t\t\t\t\t\tbuilding.setLatLon2(second.getLatLon());\n \t\t\t\t\t\t\tstreetDAO.writeBuilding(idsOfStreet, building);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t} \n \t\tif (e.getTag(OSMTagKey.ADDR_HOUSE_NUMBER) != null && e.getTag(OSMTagKey.ADDR_STREET) != null) {\n \t\t\tboolean exist = streetDAO.findBuilding(e);\n \t\t\tif (!exist) {\n \t\t\t\tctx.loadEntityData(e);\n \t\t\t\tLatLon l = e.getLatLon();\n \t\t\t\tSet<Long> idsOfStreet = getStreetInCity(e.getIsInNames(), e.getTag(OSMTagKey.ADDR_STREET), null, l);\n \t\t\t\tif (!idsOfStreet.isEmpty()) {\n \t\t\t\t\tBuilding building = new Building(e);\n \t\t\t\t\tString hno = e.getTag(OSMTagKey.ADDR_HOUSE_NUMBER);\n \t\t\t\t\tint i = hno.indexOf('-');\n \t\t\t\t\tif(i != -1) {\n \t\t\t\t\t\tbuilding.setInterpolationInterval(1);\n \t\t\t\t\t\tif(e.getTag(OSMTagKey.ADDR_INTERPOLATION) != null) {\n \t\t\t\t\t\t\ttry {\n \t\t\t\t\t\t\t\tbuilding.setInterpolationType(BuildingInterpolation.valueOf(e.getTag(OSMTagKey.ADDR_INTERPOLATION).toUpperCase()));\n \t\t\t\t\t\t\t} catch (RuntimeException ex) {\n \t\t\t\t\t\t\t\ttry {\n \t\t\t\t\t\t\t\t\tbuilding.setInterpolationInterval(Integer.parseInt(e.getTag(OSMTagKey.ADDR_INTERPOLATION)));\n \t\t\t\t\t\t\t\t} catch(NumberFormatException ex2) {\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t\tbuilding.setName(hno.substring(0, i));\n \t\t\t\t\t\tbuilding.setName2(hno.substring(i + 1));\n \t\t\t\t\t} else {\n \t\t\t\t\t\tbuilding.setName(hno);\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tstreetDAO.writeBuilding(idsOfStreet, building);\n \t\t\t\t}\n \t\t\t}\n \t\t} else if (e instanceof Way /* && OSMSettings.wayForCar(e.getTag(OSMTagKey.HIGHWAY)) */\n \t\t\t\t&& e.getTag(OSMTagKey.HIGHWAY) != null && e.getTag(OSMTagKey.NAME) != null) {\n \t\t\t// suppose that streets with names are ways for car\n \t\t\t// Ignore all ways that have house numbers and highway type\n \t\t\t\n \t\t\t// if we saved address ways we could checked that we registered before\n \t\t\tboolean exist = streetDAO.findStreetNode(e);\n \n \n \n \t\t\t// check that street way is not registered already\n \t\t\tif (!exist) {\n \t\t\t\tctx.loadEntityData(e);\n \t\t\t\tLatLon l = e.getLatLon();\n \t\t\t\tSet<Long> idsOfStreet = getStreetInCity(e.getIsInNames(), e.getTag(OSMTagKey.NAME), e.getTag(OSMTagKey.NAME_EN), l);\n \t\t\t\tif (!idsOfStreet.isEmpty()) {\n \t\t\t\t\tstreetDAO.writeStreetWayNodes(idsOfStreet, (Way) e);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tif (e instanceof Relation) {\n \t\t\tif (e.getTag(OSMTagKey.POSTAL_CODE) != null) {\n \t\t\t\tctx.loadEntityData(e);\n \t\t\t\tpostalCodeRelations.add((Relation) e);\n \t\t\t}\n \t\t}\n \t}",
"public void testEditDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\r\n\t\t\t//Step 2\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\t// Step 3\r\n\t\t\tdataValue.put(barcode, \"870\");\r\n\t\t\tdataValue.put(label, \"specimen parent label123\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"4546\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tentityManagerInterface.editData(tissueSpecimen, dataValue, recordId);\r\n\r\n\t\t\t// step 4\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue = entityManagerInterface.getRecordById(tissueSpecimen, recordId);\r\n\r\n\t\t\tassertEquals(\"870\", dataValue.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label123\", dataValue.get(label));\r\n\t\t\tassertEquals(\"4546\", dataValue.get(quantityInCellCount));\r\n\r\n\t\t\t//Step 5\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\t//Step 6\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"875\");\r\n\t\t\tdataValue.put(label, \"New Label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"454647\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"1223\");\r\n\r\n\t\t\tentityManagerInterface.editData(advanceTissueSpecimenA, dataValue, recordId);\r\n\r\n\t\t\t//Step 7\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue = entityManagerInterface.getRecordById(advanceTissueSpecimenA, recordId);\r\n\r\n\t\t\tassertEquals(\"875\", dataValue.get(barcode));\r\n\t\t\tassertEquals(\"New Label\", dataValue.get(label));\r\n\t\t\tassertEquals(\"454647\", dataValue.get(quantityInCellCount));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}"
] | [
"0.5601284",
"0.5481174",
"0.52181286",
"0.51945096",
"0.51939636",
"0.515072",
"0.5139001",
"0.5083502",
"0.50665724",
"0.49217978",
"0.48960388",
"0.48816594",
"0.4873781",
"0.48523155",
"0.48424837",
"0.48422986",
"0.48287275",
"0.481233",
"0.4804366",
"0.4779279",
"0.47789237",
"0.47657254",
"0.47492748",
"0.4730128",
"0.470762",
"0.4688798",
"0.46819332",
"0.4674073",
"0.4659338",
"0.46587583",
"0.46578056",
"0.46541664",
"0.463573",
"0.46345806",
"0.46174437",
"0.45934552",
"0.4580564",
"0.45790583",
"0.457104",
"0.4567751",
"0.45567936",
"0.45440763",
"0.4543535",
"0.45388275",
"0.45269847",
"0.45173702",
"0.45094278",
"0.4503816",
"0.44990817",
"0.44947016",
"0.44935542",
"0.44869134",
"0.44853005",
"0.4482551",
"0.44767496",
"0.44761148",
"0.44570258",
"0.4441241",
"0.44370008",
"0.4436108",
"0.44333303",
"0.44297954",
"0.44264993",
"0.44243738",
"0.4417527",
"0.44075608",
"0.43914846",
"0.43882495",
"0.43868905",
"0.43814614",
"0.43750733",
"0.43598658",
"0.435922",
"0.4356642",
"0.43488154",
"0.434798",
"0.4346974",
"0.4344125",
"0.43435228",
"0.4341112",
"0.4338544",
"0.43381917",
"0.4337951",
"0.43280274",
"0.43277648",
"0.43267402",
"0.4324922",
"0.43202484",
"0.4320058",
"0.4317071",
"0.43160456",
"0.43115678",
"0.43055207",
"0.43045056",
"0.42902997",
"0.4289089",
"0.4288611",
"0.42760053",
"0.427221",
"0.42715842"
] | 0.51561064 | 5 |
Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class. | public void generate(Object entity, Context ormContext) throws AAException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IModelGenerator\n{\n\tpublic static final String MAIN_MODEL = \"mainModel\";\n\tpublic static final String CURRENT_DATE = \"currentDate\";\n\t/**\n\t * Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.\n\t * \n\t * @param entity domain model entity\n\t */\n\tpublic void generate(Object entity) throws AAException;\n\n\t/**\n\t * Generate whole entity with cascade all. Include all sub entities, such as EmbeddedId, and Embedded class.\n\t * \n\t * @param entity domain model entity\n\t * @param ormContext ORM context.\n\t */\n\tpublic void generate(Object entity, Context ormContext) throws AAException;\n}",
"private void fillEmbeddedTypes() {\n List<String> otherClassesNames = new ArrayList<>(PRIMITIVE_TYPES);\n otherClassesNames.add(\"[]\");\n otherClassesNames.add(\"...\");\n\n List<TypeConstructor> otherClasses = new ArrayList<>();\n for (String type : otherClassesNames) {\n Classifier classifier = new Classifier(type, Language.JAVA, \"\", null, new ArrayList<MemberEntity>(), \"\");\n otherClasses.add(classifier);\n QualifiedName name = new QualifiedName(OTHER_PACKAGE, type);\n classes.put(name, classifier);\n parameters.put(name, new ParametersDescription());\n superTypes.put(name, new ArrayList<JavaType>());\n createClassMaps(name);\n }\n\n PackageEntity otherPackage = new PackageEntity(OTHER_PACKAGE, Language.JAVA, otherClasses,\n new ArrayList<MemberEntity>(), new ArrayList<PackageEntity>(), \"\", null);\n packages.put(OTHER_PACKAGE, otherPackage);\n\n for (TypeConstructor otherClass : otherClasses) {\n otherClass.setContainingPackage(otherPackage);\n }\n }",
"@Override\npublic <S extends Formation> Iterable<S> saveAll(Iterable<S> entities) {\n\treturn null;\n}",
"public EmbeddedObjects() {\n super();\n this._embeddedObjectList = new java.util.Vector<de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject>();\n }",
"public void generate(Object entity) throws AAException;",
"private static void exportEntities(GraknClient.Session session, Path schemaRoot) throws IOException {\n final File outputFileEntity = schemaRoot.resolve(\"entity\").toFile();\n GraknClient.Transaction tx = session.transaction().write();\n Stack<String> exportingTypes = new Stack<>();\n exportingTypes.push(\"entity\");\n exportExplicitHierarchy(exportingTypes, outputFileEntity, tx, false);\n tx.close();\n\n LOG.info(\"Exported entity hierarchy\");\n }",
"public Entity build();",
"Cascade createCascade();",
"private <T extends Model> QuerySet<T> all(Class<T> modelClass) {\n QuerySet<T> querySet = new QuerySet<T>();\n querySet.setEntity((Class<T>) this.entity);\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n OneToOneField oneToOneFieldAnnotation = null;\n ForeignKeyField foreignKeyFieldAnnotation = null;\n ManyToManyField manyToManyFieldAnnotation = null;\n try {\n String sql = \"SELECT * FROM\";\n tableName = TableUtil.getTableName(modelClass);\n sql = String.format(\"%s %s\", sql, tableName);\n if (JediEngine.DEBUG) {\n System.out.println(sql + \";\\n\");\n }\n connect();\n statement = connection.prepareStatement(sql);\n resultSet = statement.executeQuery();\n if (!resultSet.next()) {\n return querySet;\n }\n resultSet.beforeFirst();\n while (resultSet.next()) {\n Object obj = entity.newInstance();\n Field id = jedi.db.models.Model.class.getDeclaredField(\"id\");\n id.setAccessible(true);\n // Oracle returns BigDecimal object.\n if (connection.toString().startsWith(\"oracle\")) {\n id.set(\n obj,\n ((java.math.BigDecimal) resultSet.getObject(id.toString().substring(id.toString().lastIndexOf('.') + 1))).intValue());\n } else {\n // MySQL and PostgreSQL returns a Integer object.\n id.set(obj, resultSet.getObject(id.toString().substring(id.toString().lastIndexOf('.') + 1)));\n }\n List<Field> _fields = JediEngine.getAllFields(this.entity);\n for (Field field : _fields) {\n field.setAccessible(true);\n if (!JediEngine.isJediField(field)) {\n continue;\n }\n if (field.toString().substring(field.toString().lastIndexOf('.') + 1).equals(\"serialVersionUID\")) {\n continue;\n }\n if (field.getName().equalsIgnoreCase(\"objects\")) {\n continue;\n }\n oneToOneFieldAnnotation = field.getAnnotation(OneToOneField.class);\n foreignKeyFieldAnnotation = field.getAnnotation(ForeignKeyField.class);\n manyToManyFieldAnnotation = field.getAnnotation(ManyToManyField.class);\n FetchType fetchType = JediEngine.FETCH_TYPE;\n Manager manager = null;\n if (manyToManyFieldAnnotation != null) {\n fetchType = fetchType.equals(FetchType.NONE) ? manyToManyFieldAnnotation.fetch_type() : fetchType;\n if (fetchType.equals(FetchType.EAGER)) {\n String packageName = this.entity.getPackage().getName();\n String model = manyToManyFieldAnnotation.model().getSimpleName();\n model = Model.class.getSimpleName().equals(model) ? \"\" : model;\n Class superClazz = null;\n Class clazz = null;\n if (model.isEmpty()) {\n ParameterizedType genericType = null;\n if (ParameterizedType.class.isAssignableFrom(field.getGenericType().getClass())) {\n genericType = (ParameterizedType) field.getGenericType();\n superClazz = ((Class) (genericType.getActualTypeArguments()[0])).getSuperclass();\n if (superClazz == Model.class) {\n clazz = (Class) genericType.getActualTypeArguments()[0];\n model = clazz.getSimpleName();\n }\n }\n }\n String references = manyToManyFieldAnnotation.references();\n if (references == null || references.trim().isEmpty()) {\n if (clazz != null) {\n references = TableUtil.getTableName(clazz);\n } else {\n references = TableUtil.getTableName(model);\n }\n }\n String intermediateModelclassName = String.format(\"%s.%s\", packageName, model);\n Class associatedModelClass = Class.forName(intermediateModelclassName);\n manager = new Manager(associatedModelClass);\n QuerySet querySetAssociatedModels = null;\n String intermediateModelName = manyToManyFieldAnnotation.through().getSimpleName();\n intermediateModelName = Model.class.getSimpleName().equals(intermediateModelName) ? \"\" : intermediateModelName;\n if (intermediateModelName != null && !intermediateModelName.trim().isEmpty()) {\n intermediateModelclassName = String.format(\"%s.%s\", packageName, intermediateModelName);\n Class intermediateModelClass = Class.forName(intermediateModelclassName);\n String intermediateTableName = ((Model) intermediateModelClass.newInstance()).getTableName();\n querySetAssociatedModels = manager.raw(\n String.format(\n \"SELECT * FROM %s WHERE id IN (SELECT %s_id FROM %s WHERE %s_id = %d)\",\n TableUtil.getTableName(references),\n TableUtil.getColumnName(model),\n intermediateTableName,\n TableUtil.getColumnName(obj.getClass()),\n ((Model) obj).getId()),\n associatedModelClass);\n } else {\n querySetAssociatedModels = manager.raw(\n String.format(\n \"SELECT * FROM %s WHERE id IN (SELECT %s_id FROM %s_%s WHERE %s_id = %d)\",\n TableUtil.getTableName(references),\n TableUtil.getColumnName(model),\n tableName,\n TableUtil.getTableName(references),\n TableUtil.getColumnName(obj.getClass()),\n ((Model) obj).getId()),\n associatedModelClass);\n }\n field.set(obj, querySetAssociatedModels);\n } else {\n field.set(obj, null);\n }\n } else if (oneToOneFieldAnnotation != null || foreignKeyFieldAnnotation != null) {\n if (oneToOneFieldAnnotation != null) {\n fetchType = fetchType.equals(FetchType.NONE) ? oneToOneFieldAnnotation.fetch_type() : fetchType;\n } else {\n fetchType = fetchType.equals(FetchType.NONE) ? foreignKeyFieldAnnotation.fetch_type() : fetchType;\n }\n if (fetchType.equals(FetchType.EAGER)) {\n // Recovers the attribute class.\n Class associatedModelClass = Class.forName(field.getType().getName());\n manager = new Manager(associatedModelClass);\n String s = String.format(\"%s_id\", TableUtil.getColumnName(field));\n Object o = resultSet.getObject(s);\n Model associatedModel = manager.get(\"id\", o);\n // References a model associated by a foreign key.\n field.set(obj, associatedModel);\n } else {\n field.set(obj, null);\n }\n } else {\n // Sets the fields that aren't Model instances.\n if ((field.getType().getSimpleName().equals(\"int\") || field.getType().getSimpleName().equals(\"Integer\")) &&\n connection.toString().startsWith(\"oracle\")) {\n if (resultSet.getObject(TableUtil.getColumnName(field)) == null) {\n field.set(obj, 0);\n } else {\n String columnName = TableUtil.getColumnName(field);\n BigDecimal bigDecimal = (BigDecimal) resultSet.getObject(columnName);\n field.set(obj, bigDecimal.intValue());\n }\n } else {\n Object columnValue = resultSet.getObject(TableUtil.getColumnName(field));\n columnValue = convertZeroDateToNull(columnValue);\n if (columnValue instanceof java.sql.Date) {\n java.sql.Date date = (java.sql.Date) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(date.getTime());\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n columnValue = calendar.getTime();\n }\n if (columnValue instanceof java.sql.Time) {\n java.sql.Time time = (java.sql.Time) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(time.getTime());\n calendar.set(Calendar.YEAR, 0);\n calendar.set(Calendar.MONTH, 0);\n calendar.set(Calendar.DAY_OF_MONTH, 0);\n columnValue = calendar.getTime();\n }\n if (columnValue instanceof Timestamp) {\n Timestamp timestamp = (Timestamp) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(timestamp.getTime());\n columnValue = calendar.getTime();\n }\n field.set(obj, columnValue);\n }\n }\n manager = null;\n }\n T model = (T) obj;\n if (model != null) {\n model.setPersisted(true);\n }\n querySet.add(model);\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n close(resultSet, statement, connection);\n }\n return querySet;\n }",
"ConfigurationEntity loadFullConfigurations() {\n\n\t\tConfigurationEntity config;\n\t\tconfig = getPartiallyLoadedConfigEntity();\n\t\tconfig.setCanvasLayout(getCanvasLayoutMatrix());\n\t\treturn config\n\t}",
"public void saveAllEntities() {\n for (T entity : getEntities()) {\n if (entity.getId() < 0) {\n entity.setId(null);\n getService().save(entity);\n }\n else {\n getService().save(entity);\n }\n }\n for (T removedEntity : getRemovedEntities()) {\n getService().delete(removedEntity.getId());\n }\n setRemovedEntities(new ArrayList<T>());\n }",
"public interface MerchandiserEntities {\n\n static Entity outletEntity() {\n return new Entity(\n Entities.OUTLET_ENTITY,\n OutletModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n field(OutletModel.name),\n field(OutletModel.address),\n field(OutletModel.qrCode),\n field(OutletModel.location, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.locationGps, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.locationNetwork, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.images, JavaType.ARRAY, hasManyOutletImages())\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n Entities.OUTLET_TABLE,\n OutletTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n column(OutletModel.name, OutletTable.name),\n column(OutletModel.address, OutletTable.address),\n column(OutletModel.qrCode, OutletTable.qr_code)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n ArrayBuilder.<RelationMapping>create()\n .addAll(ImmutableList.of(\n Entities.locationMapping(OutletModel.location, OutletTable.location_id),\n Entities.locationMapping(OutletModel.locationGps, OutletTable.location_id_gps),\n Entities.locationMapping(OutletModel.locationNetwork, OutletTable.location_id_network),\n outletImagesMapping()\n ))\n .addAll(Arrays.asList(Entities.baseRelationMappingsArray()))\n .build(list -> list.toArray(new RelationMapping[list.size()]))\n )\n );\n }\n\n static Relationship hasOneLocation() {\n return new Relationship(\n Relationship.Type.MANY_TO_ONE,\n Relationship.Name.HAS_ONE,\n Entities.LOCATION_ENTITY\n );\n }\n\n static Relationship hasManyOutletImages() {\n return new Relationship(\n Relationship.Type.ONE_TO_MANY,\n Relationship.Name.HAS_MANY,\n Entities.OUTLET_IMAGE_ENTITY\n );\n }\n\n static VirtualRelationMappingImpl outletImagesMapping() {\n return new VirtualRelationMappingImpl(\n Entities.OUTLET_IMAGE_TABLE,\n Entities.OUTLET_IMAGE_ENTITY,\n ImmutableList.of(\n new ForeignColumnMapping(\n OutletImageTable.outlet_id,\n OutletTable.id\n )\n ),\n OutletModel.images,\n new RelationMappingOptionsImpl(\n RelationMappingOptions.CascadeUpsert.YES,\n RelationMappingOptions.CascadeDelete.YES,\n true\n )\n );\n }\n\n static Entity outletImageEntity() {\n return new Entity(\n Entities.OUTLET_IMAGE_ENTITY,\n OutletImageModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n field(OutletImageModel.title),\n field(OutletImageModel.description),\n field(OutletImageModel.uri),\n field(OutletImageModel.file),\n field(OutletImageModel.fileName),\n field(OutletImageModel.height),\n field(OutletImageModel.width),\n field(OutletImageModel.outlet, JavaType.OBJECT, hasOneOutlet())\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n Entities.OUTLET_IMAGE_TABLE,\n OutletImageTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n column(OutletImageModel.title, OutletImageTable.title),\n column(OutletImageModel.description, OutletImageTable.description),\n column(OutletImageModel.uri, OutletImageTable.uri),\n column(OutletImageModel.file, OutletImageTable.file),\n column(OutletImageModel.fileName, OutletImageTable.file_name),\n column(OutletImageModel.height, OutletImageTable.height),\n column(OutletImageModel.width, OutletImageTable.width)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n ArrayBuilder.<RelationMapping>create()\n .addAll(ImmutableList.of(\n new DirectRelationMappingImpl(\n OUTLET_TABLE,\n OUTLET_ENTITY,\n ImmutableList.of(\n new ForeignColumnMapping(\n OutletImageTable.outlet_id,\n OutletTable.id\n )\n ),\n OutletImageModel.outlet,\n new DirectRelationMappingOptionsImpl(\n RelationMappingOptions.CascadeUpsert.NO,\n RelationMappingOptions.CascadeDelete.NO,\n true,\n DirectRelationMappingOptions.LoadAndDelete.LOAD_AND_DELETE\n )\n )\n ))\n .addAll(Arrays.asList(Entities.baseRelationMappingsArray()))\n .build(list -> list.toArray(new RelationMapping[list.size()]))\n )\n );\n }\n\n static Relationship hasOneOutlet() {\n return new Relationship(\n Relationship.Type.MANY_TO_ONE,\n Relationship.Name.HAS_ONE,\n OUTLET_ENTITY\n );\n }\n\n static Entity locationEntity() {\n return new Entity(\n LOCATION_ENTITY,\n LocationModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n Entities.field(LocationModel.lat),\n Entities.field(LocationModel.lng),\n Entities.field(LocationModel.accuracy)\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n LOCATION_TABLE,\n LocationTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n Entities.column(LocationModel.lat, LocationTable.lat),\n Entities.column(LocationModel.lng, LocationTable.lng),\n Entities.column(LocationModel.accuracy, LocationTable.accuracy)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n Entities.baseRelationMappingsArray()\n )\n );\n }\n}",
"public List<Entity> getAll() {\n return entities;\n }",
"void saveAll(Collection<?> entities);",
"public final void generateAll() {\n ConsoleUtils.display(\">> Generate Rest test...\");\n\n List<IUpdater> updaters = this.getAdapter().getRestUpdatersTest();\n this.processUpdater(updaters);\n\n Iterable<EntityMetadata> entities =\n this.getAppMetas().getEntities().values();\n\n for (final EntityMetadata entity : entities) {\n if (entity.getOptions().containsKey(\"rest\") \n && !entity.isInternal() \n && !entity.getFields().isEmpty()) {\n\n ConsoleUtils.display(\">>> Generate Rest test for \" \n + entity.getName());\n\n this.getDatamodel().put(\n TagConstant.CURRENT_ENTITY, entity.getName());\n\n updaters = this.getAdapter()\n .getRestEntityUpdatersTest(entity);\n this.processUpdater(updaters);\n }\n }\n }",
"public void toEntity(){\n\n }",
"public CuentaEntity toEntity() {\r\n CuentaEntity cuentaE = super.toEntity();\r\n if (this.tarjeta != null) {\r\n if (!this.tarjeta.isEmpty()) {\r\n List<TarjetaEntity> tarjetasEntity = new ArrayList<>();\r\n for (TarjetaDTO dtoTarjeta : tarjeta) {\r\n tarjetasEntity.add(dtoTarjeta.toEntity());\r\n }\r\n cuentaE.setTarjeta(tarjetasEntity);\r\n }\r\n }\r\n if (this.ordenPagos != null) {\r\n if (!this.ordenPagos.isEmpty()) {\r\n List<OrdenPagoEntity> ordenesEntity = new ArrayList<>();\r\n for (OrdenPagoDTO dtoOrdenPago : ordenPagos) {\r\n ordenesEntity.add(dtoOrdenPago.toEntity());\r\n }\r\n cuentaE.setOrdenPagos(ordenesEntity);\r\n }\r\n }\r\n \r\n if (this.estudiante != null) {\r\n System.out.println(\"---------------------------------------------------343434343\");\r\n EstudianteEntity es = estudiante.toEntity();\r\n cuentaE.setEstudiante(es);\r\n System.out.println(es.getDocumento());\r\n System.out.println(cuentaE.getEstudiante());\r\n System.out.println(cuentaE.getEstudiante().getDocumento());\r\n }\r\n\r\n return cuentaE;\r\n }",
"public void createStaticEntities() {\n\n //Add Main Static entities\n entities.add(createGraveYard(7, -15));\n entities.add(createRuins(-25, -5));\n entities.add(createDragonSkull(-23, 23));\n entities.add(createLavaPool(-12, -20)); //Left Lava Pool\n entities.add(createLavaPool(5, -10)); //Middle Lava Pool\n entities.add(createLavaPool(19, -7)); //Right Lava Pool\n entities.add(createDungeonPortal(-24, -13));\n //For objects that are added randomly & require more specific addition\n //entities, their methodology will follow add()\n addRandoms();\n }",
"protected List<FloorDef> genEntities() {\n List<FloorDef> list = new ArrayList<>();\n\n // MUST ADD THE WORK IDS AFTER\n\n list.add(new FloorDef(1, 10, 7001));\n list.add(new FloorDef(2, 3, 7002));\n list.add(new FloorDef(3, 10, 7003));\n list.add(new FloorDef(4, 0, 7004));\n\n //int[] workIDs = new int[]{};\n\n //for (int i = 0; i < workIDs.length)\n\n return list;\n }",
"@Override\r\n public List<? extends DataStoreEntity> getAllEntities(boolean recursive) {\n return null;\r\n }",
"private static ImmutableList<Class<?>> applicationEntities() {\n List<String> paths = new ArrayList<>(List.of(PREFIX_STRING));\n if (additionalPaths != null) {\n paths.addAll(additionalPaths);\n }\n\n final List<Class<?>> collect = paths\n .stream()\n .map(path -> {\n logger.info(\"Scanning {} for Hibernate entities\", path);\n final Reflections reflections = new Reflections(path);\n final Set<Class<?>> entities = reflections.getTypesAnnotatedWith(Entity.class);\n logger.info(\"Found {} Hibernate entities\", entities.getClass());\n if (logger.isDebugEnabled()) {\n entities.forEach((entity) -> logger.debug(\"Registered {}.\", entity.getName()));\n }\n return entities;\n })\n .flatMap(Collection::stream)\n .collect(Collectors.toList());\n\n return ImmutableList.copyOf(collect);\n }",
"private void readEntityDeploymentInitial() {\n for (Class<?> entityClass : bootupClasses.getEntities()) {\n DeployBeanInfo<?> info = createDeployBeanInfo(entityClass);\n deployInfoMap.put(entityClass, info);\n Class<?> embeddedIdType = info.getEmbeddedIdType();\n if (embeddedIdType != null) {\n embeddedIdTypes.add(embeddedIdType);\n }\n }\n for (Class<?> entityClass : bootupClasses.getEmbeddables()) {\n DeployBeanInfo<?> info = createDeployBeanInfo(entityClass);\n deployInfoMap.put(entityClass, info);\n if (embeddedIdTypes.contains(entityClass)) {\n // register embeddedId types early - scalar properties only\n // and needed for creating BeanTables (id properties)\n registerEmbeddedBean(info);\n } else {\n // delay register of other embedded beans until after\n // the BeanTables have been created to support ManyToOne\n embeddedBeans.add(info);\n }\n }\n }",
"public List<Class<?>> getAllModelEntities() {\n\t\treturn ModelClasses.findModelClassesWithInterface(IEntityType.class);\n\t}",
"private void performCreates()\n {\n // Create entities. We have to loop possibly many times to create the entities\n // because we have to set the FKs. It's\n // possible that the source for a FK is a FK from yet another EI. We don't\n // want to copy a FK until we know that the source for a FK has been\n // properly set. We also want to make sure we set the FK's for the EIs that\n // have been excluded/deleted before we copy FKs for the included/created.\n int debugCnt = 0; // We'll keep a counter in case we get an infinite loop.\n\n // creatingEntities will be true for as long as we think we need to create more entities.\n boolean creatingEntities = true;\n while ( creatingEntities )\n {\n // We'll hope that we're done creating entities after this iteration. If we\n // find we need to create more then we'll turn it back on.\n creatingEntities = false;\n\n if ( debugCnt++ > 100 )\n throw new ZeidonException(\"Internal error: too many times creating entities.\");\n\n for ( ViewImpl view : viewList )\n {\n ObjectInstance oi = view.getObjectInstance();\n\n for ( final EntityInstanceImpl ei : oi.getEntities() )\n {\n if ( ! requiresCreate( ei ) )\n continue;\n\n assert ! ei.getEntityDef().isDerivedPath();\n\n if ( ! createInstance( view, ei ) )\n creatingEntities = true; // We weren't able to create ei. Try again later.\n }\n }\n } // while creatingEntities...\n }",
"public void testGetAllChildrenEntities()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface entityA = factory.createEntity();\r\n\t\t\tentityA.setName(\"entityA\");\r\n\r\n\t\t\tEntityInterface entityB = factory.createEntity();\r\n\t\t\tentityB.setName(\"entityB\");\r\n\t\t\tentityB.setParentEntity(entityA);\r\n\r\n\t\t\tEntityInterface entityC = factory.createEntity();\r\n\t\t\tentityC.setName(\"entityC\");\r\n\t\t\tentityC.setParentEntity(entityA);\r\n\r\n\t\t\tEntityInterface entityD = factory.createEntity();\r\n\t\t\tentityD.setName(\"entityD\");\r\n\t\t\tentityD.setParentEntity(entityB);\r\n\r\n\t\t\tEntityInterface entityE = factory.createEntity();\r\n\t\t\tentityE.setName(\"entityE\");\r\n\t\t\tentityE.setParentEntity(entityB);\r\n\r\n\t\t\tEntityInterface entityF = factory.createEntity();\r\n\t\t\tentityF.setName(\"entityF\");\r\n\t\t\tentityF.setParentEntity(entityC);\r\n\r\n\t\t\tEntityInterface entityG = factory.createEntity();\r\n\t\t\tentityG.setName(\"entityG\");\r\n\t\t\tentityG.setParentEntity(entityC);\r\n\r\n\t\t\tEntityInterface entityH = factory.createEntity();\r\n\t\t\tentityH.setName(\"entityH\");\r\n\t\t\tentityH.setParentEntity(entityC);\r\n\r\n\t\t\tentityManagerInterface.persistEntity(entityA);\r\n\t\t\tentityManagerInterface.persistEntity(entityB);\r\n\t\t\tentityC = entityManagerInterface.persistEntity(entityC);\r\n\r\n\t\t\tentityManagerInterface.persistEntity(entityD);\r\n\t\t\tentityManagerInterface.persistEntity(entityE);\r\n\t\t\tentityManagerInterface.persistEntity(entityF);\r\n\t\t\tentityManagerInterface.persistEntity(entityG);\r\n\t\t\tentityManagerInterface.persistEntity(entityH);\r\n\r\n\t\t\tCollection<EntityInterface> cChildren = entityManagerInterface\r\n\t\t\t\t\t.getChildrenEntities(entityC);\r\n\t\t\tassertEquals(3, cChildren.size());\r\n\r\n\t\t\tCollection<EntityInterface> hChildren = entityManagerInterface\r\n\t\t\t\t\t.getChildrenEntities(entityH);\r\n\t\t\tassertEquals(0, hChildren.size());\r\n\r\n\t\t\tentityA = entityManagerInterface.getEntityByIdentifier(entityA.getId().toString());\r\n\t\t\tentityB = entityManagerInterface.getEntityByIdentifier(entityB.getId().toString());\r\n\t\t\tentityC = entityManagerInterface.getEntityByIdentifier(entityC.getId().toString());\r\n\t\t\tentityD = entityManagerInterface.getEntityByIdentifier(entityD.getId().toString());\r\n\t\t\tentityE = entityManagerInterface.getEntityByIdentifier(entityE.getId().toString());\r\n\r\n\t\t\tassertEquals(2, entityManagerInterface.getChildrenEntities(entityA).size());\r\n\t\t\tassertEquals(2, entityManagerInterface.getChildrenEntities(entityB).size());\r\n\t\t\tassertEquals(3, entityManagerInterface.getChildrenEntities(entityC).size());\r\n\t\t\tassertEquals(0, entityManagerInterface.getChildrenEntities(entityD).size());\r\n\t\t\tassertEquals(0, entityManagerInterface.getChildrenEntities(entityE).size());\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"public <T> Collection<T> saveAll(Collection<T> entities);",
"List<DomainRelationshipDTO> findAll();",
"private void readEntityRelationships() {\n List<DeployBeanPropertyAssocOne<?>> primaryKeyJoinCheck = new ArrayList<>();\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n checkMappedBy(info, primaryKeyJoinCheck);\n }\n for (DeployBeanPropertyAssocOne<?> prop : primaryKeyJoinCheck) {\n checkUniDirectionalPrimaryKeyJoin(prop);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n secondaryPropsJoins(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n setInheritanceInfo(info);\n }\n for (DeployBeanInfo<?> info : deployInfoMap.values()) {\n if (!info.isEmbedded()) {\n registerDescriptor(info);\n }\n }\n }",
"protected void handleEntitiesIndividually() {\n\n\t\tfinal Set<Long> originalBatch = getUidsToLoad();\n\t\tfinal Set<Long> batchOfOne = new HashSet<Long>();\n\n\t\t/**\n\t\t * We replace the batch of all the uids with our own which we'll only put one uid at a time.\n\t\t */\n\t\tsetBatch(batchOfOne);\n\n\t\tLOG.info(\"Loading \" + originalBatch.size() + \" entities individually\");\n\n\t\tfor (final Long uid : originalBatch) {\n\n\t\t\ttry {\n\n\t\t\t\tbatchOfOne.clear();\n\t\t\t\tbatchOfOne.add(uid);\n\n\t\t\t\tfinal Collection<ENTITY> loadedEntity = loadBatch();\n\t\t\t\tgetPipelinePerformance().addCount(\"loader:entities_loaded_individually\", loadedEntity.size());\n\n\t\t\t\tfor (final ENTITY entity : loadedEntity) {\n\t\t\t\t\tgetNextStage().send(entity);\n\t\t\t\t\tgetPipelinePerformance().addCount(\"loader:entities_out\", 1);\n\n\t\t\t\t}\n\t\t\t} catch (final Exception e) {\n\t\t\t\tgetPipelinePerformance().addCount(\"loader:individual_entity_loading_failures\", 1);\n\n\t\t\t\tLOG.error(\"Could not load entity with uid \" + uid + \" for indexing, this entity will not be indexed. \", e);\n\t\t\t}\n\n\t\t}\n\n\t\t/** Put the original set of uids back. */\n\t\tsetBatch(originalBatch);\n\n\t}",
"public DynamicModelPart buildChildrenUsingSeeds() {\n this.children.parallelStream().forEach(child -> {\n child.buildUsingSeeds();\n });\n return this;\n }",
"@Override\n protected void resetEntitySubClass ()\n {\n super.resetEntitySubClass ();\n }",
"public void testInheritanceGetAllAttributes()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\t// Step 2\t\t\t\r\n\t\t\tentityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\t\t\tentityManagerInterface.persistEntity(advanceTissueSpecimenB);\r\n\r\n\t\t\t// Step 3\t\r\n\r\n\t\t\tCollection<AttributeInterface> specimenAttributes = specimen.getAllAttributes();\r\n\t\t\t//2 user attributes + 1 system attribute for id\r\n\t\t\tassertEquals(3, specimenAttributes.size());\r\n\r\n\t\t\t//2 child Attributes + 1 parent Attribute + 2 system generated attributes for id\r\n\t\t\tCollection<AttributeInterface> tissueSpecimenAttributes = tissueSpecimen\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\tassertEquals(5, tissueSpecimenAttributes.size());\r\n\r\n\t\t\tCollection<AttributeInterface> advanceTissueSpecimenAAttributes = advanceTissueSpecimenA\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\t//1 child attribute + 2 parent Attribute + 1 grand parent attribute + 3 system generated attributes\r\n\t\t\tassertEquals(7, advanceTissueSpecimenAAttributes.size());\r\n\r\n\t\t\tCollection<AttributeInterface> advanceTissueSpecimenBAttributes = advanceTissueSpecimenB\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\t//2 child attribute + 2 parent Attribute + 1 grand parent attribute + 3 system generated attributes\r\n\t\t\tassertEquals(8, advanceTissueSpecimenBAttributes.size());\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"protected void prepareSave() {\r\n EObject cur;\r\n for (Iterator<EObject> iter = getAllContents(); iter.hasNext();) {\r\n cur = iter.next();\r\n \r\n EStructuralFeature idAttr = cur.eClass().getEIDAttribute();\r\n if (idAttr != null && !cur.eIsSet(idAttr)) {\r\n cur.eSet(idAttr, EcoreUtil.generateUUID());\r\n }\r\n }\r\n }",
"protected void addDefaultEntities() {\n\t\t// Complex entities\n\t\tentities.add(new EnglishName());\n\t\tentities.add(new DutchName());\n\t\t// Regular entities\n\t\tentities.add(new EnglishMathematic());\n\t\tentities.add(new DutchMathematic());\n\t\tentities.add(new EnglishConfirmation());\n\t\tentities.add(new DutchConfirmation());\n\t\tentities.add(new EnglishProfanity());\n\t\tentities.add(new DutchProfanity());\n\t\tentities.add(new EnglishCurrency());\n\t\tentities.add(new DutchCurrency());\n\t\tentities.add(new EnglishLanguage());\n\t\tentities.add(new DutchLanguage());\n\t\tentities.add(new EnglishCountry());\n\t\tentities.add(new DutchCountry());\n\t\tentities.add(new EnglishDate());\n\t\tentities.add(new DutchDate());\n\t\tentities.add(new EnglishTime());\n\t\tentities.add(new DutchTime());\n\t\tentities.add(new EnglishDuration());\n\t\tentities.add(new DutchDuration());\n\t\tentities.add(new EnglishMonth());\n\t\tentities.add(new DutchMonth());\n\t\tentities.add(new EnglishOrder());\n\t\tentities.add(new EnglishOrder2());\n\t\tentities.add(new DutchOrder());\n\t\tentities.add(new EnglishNumeric());\n\t\tentities.add(new DutchNumeric());\n\t\tentities.add(new EnglishPreposition());\n\t\tentities.add(new DutchPreposition());\n\t\tentities.add(new UniversalMathematic());\n\t\tentities.add(new UniversalCurrency());\n\t\tentities.add(new UniversalSmiley());\n\t\tentities.add(new UniversalFrowny());\n\t\tentities.add(new UniversalTime());\n\t\tentities.add(new UniversalNumeric());\n\t\tentities.add(new UniversalAlphabetic());\n\t}",
"@Test(description = \"export interface with all relationships\")\n public void exportWithAllRelationships()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final InterfaceData inter = data.getInterface(\"TestInterface\").addAllRelationships();\n data.create();\n\n inter.checkExport(inter.export());\n }",
"@XmlTransient\n public de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[] getEmbeddedObject(\n ) {\n de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[] array = new de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[0];\n return (de.lsem.simulation.transformation.anylogic.generator.persistant.EmbeddedObject[]) this._embeddedObjectList.toArray(array);\n }",
"@Override\npublic void deleteAll(Iterable<? extends Formation> entities) {\n\t\n}",
"public DynamicModelPart buildChildren() {\n this.children.parallelStream().forEach(child -> {\n child.build();\n });\n return this;\n }",
"@Override\n\tpublic void generate() {\n\t\tJavaObject object = new JavaObject(objectType);\n\n\t\t// Fields\n\t\taddFields(object);\n\n\t\t// Empty constructor\n\t\taddEmptyConstructor(object);\n\n\t\t// Types constructor\n\t\taddTypesConstructor(object);\n\n\t\t// Clone constructor\n\t\taddCloneConstructor(object);\n\n\t\t// Setters\n\t\taddSetters(object);\n\n\t\t// Build!\n\t\taddBuild(object);\n\n\t\t// Done!\n\t\twrite(object);\n\t}",
"@Override\n public Class<E> getPersistentClass() {\n return entityClass;\n }",
"@Override\n protected final void resetEntitySubClass ()\n {\n super.resetEntitySubClass ();\n }",
"public Entity5Builder() {\r\n entity5 = new Entity5();\r\n }",
"@AllowFailure(message=\"Fails after first run with duplicate key value in a unique PK constraint or index\")\n public void testEagerFetch() {\n Map props = new HashMap(System.getProperties());\n props.put(\"openjpa.MetaDataFactory\", \"jpa(Types=\" + TblChild.class.getName() + \";\"\n + TblGrandChild.class.getName() + \";\"\n + TblParent.class.getName() + \")\");\n props.put(\"openjpa.jdbc.QuerySQLCache\", \"true\");\n\n OpenJPAEntityManagerFactorySPI emf1 = (OpenJPAEntityManagerFactorySPI) OpenJPAPersistence.\n cast(Persistence.createEntityManagerFactory(\"test\", props));\n try {\n EntityManagerImpl em = (EntityManagerImpl)emf1.createEntityManager();\n\n em.getTransaction().begin();\n\n for (int i = 1; i < 3; i++) {\n TblParent p = new TblParent();\n p.setParentId(i);\n TblChild c = new TblChild();\n c.setChildId(i);\n c.setTblParent(p);\n p.addTblChild(c);\n em.persist(p);\n em.persist(c);\n\n TblGrandChild gc = new TblGrandChild();\n gc.setGrandChildId(i);\n gc.setTblChild(c);\n c.addTblGrandChild(gc);\n\n em.persist(p);\n em.persist(c);\n em.persist(gc);\n }\n em.flush();\n em.getTransaction().commit();\n em.clear();\n\n for (int i = 1; i < 3; i++) {\n TblParent p = em.find(TblParent.class, i);\n int pid = p.getParentId();\n assertEquals(pid, i);\n Collection<TblChild> children = p.getTblChildren();\n boolean hasChild = false;\n for (TblChild c : children) {\n hasChild = true;\n Collection<TblGrandChild> gchildren = c.getTblGrandChildren();\n int cid = c.getChildId();\n assertEquals(cid, i);\n boolean hasGrandChild = false;\n for (TblGrandChild gc : gchildren) {\n hasGrandChild = true;\n int gcId = gc.getGrandChildId();\n assertEquals(gcId, i);\n }\n assertTrue(hasGrandChild);\n }\n assertTrue(hasChild);\n em.close();\n }\n } finally {\n closeEMF(emf1);\n }\n }",
"public void deleteAll( Class<?> c) throws RNoEntityException{\n\t\tEntity e = ALiteOrmBuilder.getInstance().getEntity(c);\n\t\tif(e == null)\n\t\t\tthrow new RNoEntityException(\"For : \" + c.getName());\n\t\te .deleteAll(db);\n\t}",
"protected void buildCommonModel(PhysicalDataModel pdm, boolean fhirSchema, boolean oauthSchema, boolean javaBatchSchema) {\n if (fhirSchema) {\n FhirSchemaGenerator gen = new FhirSchemaGenerator(adminSchemaName, schemaName);\n gen.buildSchema(pdm);\n switch (dbType) {\n case DB2:\n gen.buildDatabaseSpecificArtifactsDb2(pdm);\n break;\n case DERBY:\n logger.info(\"No database specific artifacts\");\n break;\n case POSTGRESQL:\n gen.buildDatabaseSpecificArtifactsPostgres(pdm);\n break;\n default:\n throw new IllegalStateException(\"Unsupported db type: \" + dbType);\n }\n }\n\n // Build/update the Liberty OAuth-related tables\n if (oauthSchema) {\n OAuthSchemaGenerator oauthSchemaGenerator = new OAuthSchemaGenerator(oauthSchemaName);\n oauthSchemaGenerator.buildOAuthSchema(pdm);\n }\n\n // Build/update the Liberty JBatch related tables\n if (javaBatchSchema) {\n JavaBatchSchemaGenerator javaBatchSchemaGenerator = new JavaBatchSchemaGenerator(javaBatchSchemaName);\n javaBatchSchemaGenerator.buildJavaBatchSchema(pdm);\n }\n }",
"@Override\r\n public List<EntityPath> getAllEntityPaths(boolean recursive) {\n return null;\r\n }",
"public static CodeBlock generateToModelForSet(Field field, GenerationPackageModel generationInfo) throws DefinitionException, InnerClassGenerationException {\n if (field.getGenericType().getTypeName().equals(CLASS_SET) || field.getGenericType().getTypeName().matches(PATTERN_FOR_GENERIC_INNER_TYPES))\n throw new DefinitionException(format(UNABLE_TO_DEFINE_GENERIC_TYPE,\n field.getGenericType().getTypeName(),\n field.getName(),\n field.getDeclaringClass().getSimpleName(),\n TO_MODEL + field.getDeclaringClass().getSimpleName()));\n if (field.getGenericType().getTypeName().contains(CLASS_STRING))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_STRING_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_INTEGER))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_INT_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_DOUBLE))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_DOUBLE_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_LONG))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_LONG_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_BYTE))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_BYTE_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_BOOLEAN))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_BOOL_SET, field.getName(), field.getName())).build();\n if (field.getGenericType().getTypeName().contains(CLASS_FLOAT))\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_FLOAT_SET, field.getName(), field.getName())).build();\n\n ClassName newClassMapper = createMapperForInnerClassIfNeeded(getClassFromField(field), generationInfo);\n return CodeBlock.builder().add(of(DOUBLE_TABULATION + GET_ENTITY_SET,\n field.getName(),\n field.getName(),\n newClassMapper,\n TO_MODEL + newClassMapper.simpleName().replace(MAPPER, EMPTY_STRING))).build();\n }",
"Builder addMainEntity(Thing value);",
"@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generator = new Generator(\n \t\trs.getInt(1),\n \t\trs.getString(2),\n \t\trs.getString(3),\n \t\trs.getInt(4),\n \t\trs.getInt(5),\n \t\trs.getInt(6)\n \t);\n\t\t\t\tresult.add(generator);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t\treturn result;\n\n\t}",
"@Override\n public boolean hasEntityShapes() { return true; }",
"void buildFromEntity(E entity);",
"@Override\n\tpublic List<Generator> getAll() {\n\t\treturn new ArrayList<>();\n\t}",
"public static void createEntitySources() {\n UUID makeBreakfastId = UUID.fromString(\"fab3906e-b50a-11eb-b13c-0242ac110002\"); //saved.getId()\n ITodo makeBreakfast = SelectTemplate.selectOne(ITodo.class, new Object[]{makeBreakfastId}, new HashMap<>());\n System.out.println(\"selected -> \" + makeBreakfast.getId());\n\n UUID makePancakeId = UUID.fromString(\"fab6a862-b50a-11eb-b13c-0242ac110002\");\n ITodo makePancake = SelectTemplate.selectOne(ITodo.class, new Object[]{makePancakeId}, new HashMap<>());\n System.out.println(\"selected -> \" + makePancake.getId());\n\n //modify found task\n makeBreakfast.setNextTask(makePancake);\n\n //updated modified task\n UpdateTemplate.updateOne(makeBreakfast);\n ITodo updatedTask = SelectTemplate.selectOne(ITodo.class, new Object[]{makeBreakfast.getId()}, new HashMap<>());\n System.out.println(\"updated -> \" + updatedTask.getId());\n }",
"@Test\n public void testDAM32102001() {\n // By default the loading related entity is eager.\n testDAM32101001();\n }",
"protected Entity() {\n UID = GEN_COUNT;\n GEN_COUNT++;\n }",
"Builder addMainEntity(Thing.Builder value);",
"@Override\n public List<SideDishEntity> findAll() {\n return null;\n }",
"@Test\n public void testJavaScriptGenerationAllEntities() throws Exception {\n setSystemAdministratorContext();\n\n // final Template template = createSaveTemplate(\n // \"/org/openbravo/service/datasource/templates/datasource\", new ArrayList<Template>());\n\n int i = 0;\n for (Entity entity : ModelProvider.getInstance().getModel()) {\n final DataSourceService dataSourceService = dataSourceServiceProvider.getDataSource(entity\n .getName());\n final DataSourceComponent component = (DataSourceComponent) dataSourceComponentProvider\n .getComponent(dataSourceService.getName(), new HashMap<String, Object>());\n component.setDataSourceService(dataSourceService);\n i++;\n if ((i % 2) == 0) {\n final Map<String, Object> params = new HashMap<String, Object>();\n params.put(\"_onlyGenerateCreateStatement\", \"true\");\n component.setParameters(params);\n }\n final Map<String, Object> data = new HashMap<String, Object>();\n data.put(\"data\", component);\n final String result = templateProcessor.process(dataSourceService.getTemplate(), data);\n log.debug(result);\n }\n // prevent actual save of the template\n OBDal.getInstance().rollbackAndClose();\n }",
"Collection<Class<?>> registerEntities();",
"public static void addInterfaces(Model model) throws MolgenisModelException\r\n\t{\r\n\t\tlogger.debug(\"add root entities for interfaces...\");\r\n\t\tfor (Entity entity : model.getEntities())\r\n\t\t{\r\n\t\t\t// Generate the interface if rootAncestor (so has subclasses) and\r\n\t\t\t// itself is not an interface...\r\n\t\t\tif (entity.isRootAncestor())\r\n\t\t\t{\r\n\t\t\t\tEntity rootAncestor = entity;\r\n\t\t\t\tif (!entity.isAbstract())\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\t// generate a new interface\r\n\t\t\t\t\trootAncestor = new Entity(\"_\" + entity.getName() + \"Interface\", entity.getName(),\r\n\t\t\t\t\t\t\tmodel.getDatabase());\r\n\t\t\t\t\trootAncestor\r\n\t\t\t\t\t\t\t.setDescription(\"Identity map table for \"\r\n\t\t\t\t\t\t\t\t\t+ entity.getName()\r\n\t\t\t\t\t\t\t\t\t+ \" and all its subclasses. \"\r\n\t\t\t\t\t\t\t\t\t+ \"For each row that is added to \"\r\n\t\t\t\t\t\t\t\t\t+ entity.getName()\r\n\t\t\t\t\t\t\t\t\t+ \" or one of its subclasses, first a row must be added to this table to get a valid primary key value.\");\r\n\t\t\t\t\t// rootAncestor.setAbstract( true );\r\n\r\n\t\t\t\t\t// copy key fields to interface and unset auto key in child\r\n\t\t\t\t\tVector<Field> keyfields = entity.getKey(0).getFields();\r\n\t\t\t\t\tVector<String> keyfields_copy = new Vector<String>();\r\n\t\t\t\t\tfor (Field f : keyfields)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tField key_field = new Field(rootAncestor, f.getType(), f.getName(), f.getName(), f.isAuto(),\r\n\t\t\t\t\t\t\t\tf.isNillable(), f.isReadOnly(), f.getDefaultValue());\r\n\t\t\t\t\t\tkey_field.setDescription(\"Primary key field unique in \" + entity.getName()\r\n\t\t\t\t\t\t\t\t+ \" and its subclasses.\");\r\n\t\t\t\t\t\tif (key_field.getType() instanceof StringField) key_field.setVarCharLength(key_field\r\n\t\t\t\t\t\t\t\t.getVarCharLength());\r\n\t\t\t\t\t\trootAncestor.addField(key_field);\r\n\t\t\t\t\t\tkeyfields_copy.add(key_field.getName());\r\n\r\n\t\t\t\t\t\tif (f.isAuto())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// unset auto key in original, but\r\n\r\n\t\t\t\t\t\t\t// SOLVED BY TRIGGERS Field autoField =\r\n\t\t\t\t\t\t\t// entity.getField(f.getName());\r\n\t\t\t\t\t\t\t// SOLVED BY TRIGGERS autoField.setAuto(false);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\trootAncestor.addKey(keyfields_copy, entity.getKey(0).isSubclass(), null);\r\n\r\n\t\t\t\t\tVector<String> parents = new Vector<String>();\r\n\t\t\t\t\tparents.add(rootAncestor.getName());\r\n\t\t\t\t\tentity.setParents(parents);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// add the type enum to the root element\r\n\t\t\t\tVector<Entity> subclasses = entity.getAllDescendants();\r\n\t\t\t\tVector<String> enumOptions = new Vector<String>();\r\n\t\t\t\tenumOptions.add(entity.getName());\r\n\t\t\t\tfor (Entity subclass : subclasses)\r\n\t\t\t\t{\r\n\t\t\t\t\tenumOptions.add(subclass.getName());\r\n\t\t\t\t}\r\n\t\t\t\tField type_field = new Field(rootAncestor, new EnumField(), Field.TYPE_FIELD, Field.TYPE_FIELD, true,\r\n\t\t\t\t\t\tfalse, false, null);\r\n\t\t\t\ttype_field.setDescription(\"Subtypes of \" + entity.getName() + \". Have to be set to allow searching\");\r\n\t\t\t\ttype_field.setEnumOptions(enumOptions);\r\n\t\t\t\ttype_field.setHidden(true);\r\n\t\t\t\trootAncestor.addField(0, type_field);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"ImmutableList<SchemaOrgType> getMainEntityList();",
"public List<Entity> getAllEntities()\n\t{\n\t\treturn this.entities;\n\t}",
"public Vector<HibernateEntity> getEntitiesAllowedAsParent() {\n\t\tVector<HibernateEntity> result = new Vector<HibernateEntity>();\n\t\tfor (HibernateEntity entity : getHibernateModel().getEntities()) {\n\t\t\tif (entity != this && entity.getFather() == null) {\n\t\t\t\tresult.add(entity);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"public void setupEntities() {\n }",
"@Override\n public List<R> getAll() {\n return onFindForList(getSession().createCriteria(entityClass).list());\n }",
"public List<Object> retrieveIncrementalEntities() {\n List<Object> result = new ArrayList<Object>();\n for (ProvisioningEntityWrapper provisioningEntityWrapper : this.provisioningEntityWrappers) {\n \n if (provisioningEntityWrapper.getGrouperTargetEntity() != null) {\n result.add(provisioningEntityWrapper.getGrouperTargetEntity());\n } else if (provisioningEntityWrapper.getGrouperProvisioningEntity() != null) {\n result.add(provisioningEntityWrapper.getGrouperProvisioningEntity());\n } else if (provisioningEntityWrapper.getGcGrouperSyncMember() != null) {\n result.add(provisioningEntityWrapper.getGcGrouperSyncMember());\n } else if (provisioningEntityWrapper.getProvisioningStateEntity() != null) {\n result.add(provisioningEntityWrapper.getProvisioningStateEntity());\n }\n }\n return result;\n }",
"Assembler newAssembler(final Class< ? > dto, final Class< ? > entity);",
"@Override\n\t@Transactional\n\tpublic List<T> getAll() {\n\t\tList<?> result = hibernateTemplate.getSessionFactory().getCurrentSession()\n\t\t\t\t.createCriteria(getGenericClass())\n\t\t\t\t.list();\n\t\treturn result.stream()\n\t\t\t\t.map(e -> initialize(checkType(e)))\n\t\t\t\t.filter(e -> e != null)\n\t\t\t\t.collect(Collectors.toList());\n\t}",
"public void addHeaderRelationships(boolean include_types) { \n Bundles bs = getRTParent().getRootBundles();\n Iterator<Tablet> it_tab = bs.tabletIterator();\n while (it_tab.hasNext()) {\n Tablet tablet = it_tab.next();\n // System.err.println(\"Tablet \\\"\" + tablet + \"\\\"\");\n int fields[] = tablet.getFields();\n // Only keep the non-null fields\n List<Integer> al = new ArrayList<Integer>(); for (int i=0;i<fields.length;i++) if (fields[i] != -1) al.add(i);\n fields = new int[al.size()]; for (int i=0;i<fields.length;i++) fields[i] = al.get(i);\n // Go through the valid fields now\n for (int i=0;i<fields.length;i++) {\n int hdr_i = fields[i];\n int hdr_j = fields[(i+1)%fields.length];\n\tString hdr_i_str = bs.getGlobals().fieldHeader(hdr_i),\n\t hdr_j_str = bs.getGlobals().fieldHeader(hdr_j);\n // System.err.println(\" \\\"\" + hdr_i_str + \"\\\" => \\\"\" + hdr_j_str + \"\\\"\");\n // Put the symbol\n if (entity_to_shape.containsKey(hdr_i_str) == false) entity_to_shape.put(hdr_i_str, Utils.Symbol.CIRCLE); \n if (entity_to_shape.containsKey(hdr_j_str) == false) entity_to_shape.put(hdr_j_str, Utils.Symbol.CIRCLE); \n\t// Make the world location\n\tif (entity_to_wxy.containsKey(hdr_i_str) == false) { entity_to_wxy.put(hdr_i_str, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1)); transform(hdr_i_str); }\n\tif (entity_to_wxy.containsKey(hdr_j_str) == false) { entity_to_wxy.put(hdr_j_str, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1)); transform(hdr_j_str); }\n\t// Figure out the weights\n\tgraph.addNode(hdr_i_str); graph.addNode(hdr_j_str); digraph.addNode(hdr_i_str); digraph.addNode(hdr_j_str);\n\tdouble g_w = graph.getConnectionWeight(graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(hdr_j_str)),\n\t dg_w = digraph.getConnectionWeight(graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(hdr_j_str));\n if (Double.isInfinite(g_w)) g_w = 0.0; if (Double.isInfinite(dg_w)) dg_w = 0.0;\n // Add the edges\n\t graph.addNeighbor(hdr_i_str, hdr_j_str, g_w + tablet.size());\n\t graph.addNeighbor(hdr_j_str, hdr_i_str, g_w + tablet.size());\n\tdigraph.addNeighbor(hdr_i_str, hdr_j_str, dg_w + tablet.size());\n\t// Associate the bundles with the edge\n\tIterator<Bundle> it_bun = tablet.bundleIterator();\n\twhile (it_bun.hasNext()) {\n\t Bundle bundle = it_bun.next();\n\t graph.addLinkReference( graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(hdr_j_str), bundle);\n\t graph.addLinkReference( graph.getEntityIndex(hdr_j_str), graph.getEntityIndex(hdr_i_str), bundle);\n\t digraph.addLinkReference(digraph.getEntityIndex(hdr_i_str), digraph.getEntityIndex(hdr_j_str), bundle);\n // Include the data types if specified\n\t if (include_types) {\n BundlesDT.DT datatype = BundlesDT.getEntityDataType(bundle.toString(hdr_i));\n // System.err.println(\"Including Type For \\\"\" + bundle.toString(hdr_i) + \"\\\" ==> \" + datatype);\n\t if (datatype != null) {\n graph.addNode(\"\" + datatype); entity_to_shape.put(\"\" + datatype, Utils.Symbol.TRIANGLE);\n\t digraph.addNode(\"\" + datatype); \n\t if (entity_to_wxy.containsKey(\"\" + datatype) == false) {\n\t entity_to_wxy.put(\"\" + datatype, new Point2D.Double(Math.random()*2 - 1, Math.random()*2 - 1)); \n\t\ttransform(\"\" + datatype);\n\t }\n\t g_w = graph.getConnectionWeight(graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(\"\" + datatype));\n\t dg_w = graph.getConnectionWeight(graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(\"\" + datatype));\n if (Double.isInfinite(g_w)) g_w = 0.0; if (Double.isInfinite(dg_w)) dg_w = 0.0;\n\t graph.addNeighbor(\"\" + datatype, hdr_i_str, g_w + 1);\n\t graph.addNeighbor(hdr_i_str, \"\" + datatype, g_w + 1);\n\t digraph.addNeighbor(hdr_i_str, \"\" + datatype, dg_w + 1);\n\t graph.addLinkReference( graph.getEntityIndex(hdr_i_str), graph.getEntityIndex(\"\" + datatype), bundle);\n\t graph.addLinkReference( graph.getEntityIndex(\"\" + datatype), graph.getEntityIndex(hdr_i_str), bundle);\n\t digraph.addLinkReference(digraph.getEntityIndex(hdr_i_str), digraph.getEntityIndex(\"\" + datatype), bundle);\n digraph.addLinkStyle(digraph.getEntityIndex(hdr_i_str), digraph.getEntityIndex(\"\" + datatype), STYLE_DOTTED_STR);\n\t }\n\t }\n\t}\n\t// Add the style\n digraph.addLinkStyle(digraph.getEntityIndex(hdr_i_str), digraph.getEntityIndex(hdr_j_str), STYLE_SOLID_STR);\n }\n }\n getRTComponent().render();\n }",
"EntityType getEntity();",
"private void populateEntitiesLists() {\n\t\tfor (StaticEntity entity : ((ClientTiledMap) map).staticEntities) {\n\t\t\tregisterStaticEntity(entity);\n\t\t}\n\t}",
"public static void main(String[] args) {\n\n\t\tConfiguration cfg = new Configuration();\n\t\tcfg.configure(\"hibernate.cfg.xml\"); \n\n\t\tSessionFactory factory = cfg.buildSessionFactory();\n\t\tSession session = factory.openSession();\t\t\n\n\t\tCards c =new Cards();\n\n\t\t c.setCid(101);\n\t\t c.setCname(\"java4s\");\n\n\t\t CardUser c1=new CardUser();\n\n\t\t c1.setCarduserid(504);\n\t\t c1.setCardusername(\"customer4\");\n\t\t c1.setParentObject(c);\n\n \t CardUser c2=new CardUser();\n\n\t\t c2.setCarduserid(505);\n\t\t c2.setCardusername(\"customer5\");\n\t\t c2.setParentObject(c);\n\n\t\t CardUser c3=new CardUser();\n\n\t\t c3.setCarduserid(506);\n\t\t c3.setCardusername(\"customer6\");\n\t\t c3.setParentObject(c); \t\t \n\n\t\t Transaction tx = session.beginTransaction();\n\n\t\t session.save(c1);\n\t\t session.save(c2);\n\t\t session.save(c3);\n\n\t\t tx.commit();\n\t\t session.close();\n\t\t System.out.println(\"One To Many is Done..!!\");\n\t\t factory.close();\n\t}",
"public Entity5 build() {\r\n return entity5;\r\n }",
"@Override\n public boolean isEmbedded() {\n return true;\n }",
"protected void setEmbeddableKeys() {\n }",
"@Override\n protected void setEmbeddableKeys() {\n }",
"public abstract P toEntity();",
"public Set getAllPersistableChildren() {\n \n Set children = new HashSet();\n children.addAll(comments);\n return children;\n }",
"@SuppressWarnings(\"deprecation\")\n public void createAll(boolean clean) {\n if (clean) {\n plugin.getLogger().info(\"[AdvancementAPI] Cleaning previously generated advancements\");\n for (Advancement advancement : this.advancements.values()) {\n if (Bukkit.getAdvancement(advancement.getKey()) != null) {\n Bukkit.getUnsafe().removeAdvancement(advancement.getKey());\n }\n }\n\n Bukkit.reloadData();\n }\n\n plugin.getLogger().info(\"[AdvancementAPI] Generating advancements\");\n for (Advancement advancement : this.advancements.values()) {\n if (Bukkit.getAdvancement(advancement.getKey()) == null) {\n Bukkit.getUnsafe().loadAdvancement(advancement.getKey(), serializer.serialize(advancement));\n }\n }\n\n Bukkit.reloadData();\n }",
"@Override\n\tpublic Class<E> getEntityClass() {\n\t\treturn null;\n\t}",
"public void testGetDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\t//step 2\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\t\t\tadvanceTissueSpecimenB = entityManagerInterface.persistEntity(advanceTissueSpecimenB);\r\n\r\n\t\t\t/*\r\n\t\t\t * Test getData method\r\n\t\t\t */\r\n\r\n\t\t\t//step 3\t\t\t\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tMap outputMap = entityManagerInterface.getRecordById(tissueSpecimen, recordId);\r\n\r\n\t\t\t//step 4\t\r\n\t\t\tassertEquals(4, outputMap.size());\r\n\t\t\tassertEquals(\"123456\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label\", outputMap.get(label));\r\n\t\t\tassertEquals(\"45\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"11-12-1982\", outputMap.get(arivalDate));\r\n\r\n\t\t\t//step 5\t\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"46\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\toutputMap = entityManagerInterface.getRecordById(advanceTissueSpecimenA, recordId);\r\n\t\t\t//step 6\t\t\t\r\n\t\t\tassertEquals(5, outputMap.size());\r\n\t\t\tassertEquals(\"869\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label\", outputMap.get(label));\r\n\t\t\tassertEquals(\"46\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"11-11-1982\", outputMap.get(arivalDate));\r\n\r\n\t\t\t//step 7\t\t\t\t\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"1001\");\r\n\t\t\tdataValue.put(label, \"specimen parent label new\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"411\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"01-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttributeB, \"40\");\r\n\t\t\tdataValue.put(newAttributeB2, \"41\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenB, dataValue);\r\n\t\t\toutputMap = entityManagerInterface.getRecordById(advanceTissueSpecimenB, recordId);\r\n\t\t\t//step 8\t\t\t\t\r\n\t\t\tassertEquals(6, outputMap.size());\r\n\t\t\tassertEquals(\"1001\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label new\", outputMap.get(label));\r\n\t\t\tassertEquals(\"411\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"01-11-1982\", outputMap.get(arivalDate));\r\n\t\t\tassertEquals(\"40\", outputMap.get(newAttributeB));\r\n\t\t\tassertEquals(\"41\", outputMap.get(newAttributeB2));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"public void testInsertDataForInheritanceParentNoData()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\t//step 2\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\t//dataValue.put(barcode, \"123456\");\r\n\t\t\t//dataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\t//step 3\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\t//step 4\r\n\t\t\tResultSet resultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\r\n\t\t\tresultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"public void reproduce() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < Utils.between(_nChildren,1,8); i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inherit(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_nTotalChildren++;\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t\t_infectedGeneticCode = null;\n\t\t\t}\n\t\t\t_timeToReproduce = 20;\n\t\t}\n\t}",
"public void generate() {\n\t\tthis.initializePathBindingClass();\n\t\t// managed at abstract level ; name provided at binding generation time\n\t\t// this.addGetName();\n\t\t// this.addGetType();\n\n\t\t// add all properties methods\n\t\tthis.addProperties();\n\t\t// add getter that provides property list\n\t\tthis.addGetChildBindings();\n\n\t\t// initialize class declaration (*Binding)\n\t\tthis.initializeRootBindingClass();\n\t\t// add constructors\n\t\tthis.addConstructors();\n\t\t// add getWithRoot method\n\t\tthis.addGetWithRoot();\n\t\t// add getSafelyWithRoot method\n\t\tthis.addGetSafelyWithRoot();\n\n\t\tthis.addGeneratedTimestamp();\n\t\tthis.addSerialVersionUID();\n\t\tthis.saveCode(this.pathBindingClass);\n\t\tthis.saveCode(this.rootBindingClass);\n\t}",
"public void testInsertDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\r\n\t\t\tresultSet = executeQuery(\"select * from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(4));\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic List<ImageEntity> getAll() {\n\t\treturn DatabaseContext.findAll(ImageEntity.class);\n\t}",
"@Override\n public void save(Iterable<? extends SideDishEntity> entities) {\n\n }",
"void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) {\n HasManyProxy proxyHandler = new HasManyProxy(this, f, (HasMany) a);\n associationProxies.add(proxyHandler);\n Classes.setFieldValue(this, f.getName(), Proxy.newProxyInstance(List.class.getClassLoader(),\n new Class[]{List.class}, proxyHandler));\n } else if (a.annotationType().equals(HasAndBelongsToMany.class)) {\n // TODO implement\n } else if (a.annotationType().equals(HasOne.class)) {\n // TODO implement\n } else if (a.annotationType().equals(BelongsTo.class)) {\n BelongsTo belongsTo = (BelongsTo) a;\n if (!(f.getGenericType() instanceof Class))\n throw new IllegalAnnotationException(\"@BelongsTo can only be applied to non-generic fields\");\n ActiveRecord ar = (ActiveRecord) Classes.newInstance(f.getGenericType());\n String fk = ActiveRecords.foriegnKey(f.getGenericType());\n if (!belongsTo.foreignKey().equals(\"\")) fk = belongsTo.foreignKey();\n System.out.println(\"foriegn key = \" + fk);\n Object fkValue = Classes.getFieldValue(this, fk);\n if (fkValue != null) {\n ar.read(fkValue);\n Classes.setFieldValue(this, f.getName(), ar);\n }\n }\n }\n }\n }",
"public LazyDataModel<BasicEntity> getEntities() {\n return entities;\n }",
"TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Test name\");\n testEntity.setCheck(true);\n testEntity.setDateCreated(new Date(System.currentTimeMillis()));\n testEntity.setDescription(\"description\");\n\n Specialization specialization = new Specialization();\n specialization.setName(\"Frontend\");\n specialization.setLevel(\"Senior\");\n specialization.setYears(10);\n\n testEntity.setSpecialization(specialization);\n\n return testEntity;\n }",
"public void setInheritAll(boolean value) {\n inheritAll = value;\n }",
"List<T> getAll() throws PersistException;",
"@Override\n\tpublic <T> EntityGraph<T> createEntityGraph(Class<T> rootType) {\n\t\treturn null;\n\t}",
"public abstract List<T> convertToEntities(List<D> dtos);",
"@Override\n\tpublic Class<Object> getEntityClass() {\n\t\treturn null;\n\t}",
"public void testInheritanceEditMetadataForChangeParentWithNoData()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\t//step 2\t\t\t\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\t//step 3\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\t//step 4\r\n\t\t\tEntityInterface savedTissueSpecimen = entityManagerInterface\r\n\t\t\t\t\t.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 5\r\n\t\t\tEntityInterface newSpecimen = factory.createEntity();\r\n\t\t\tnewSpecimen.setName(\"newSpecimen\");\r\n\t\t\tnewSpecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcodeOfNewSpecimen = factory.createStringAttribute();\r\n\t\t\tbarcodeOfNewSpecimen.setName(\"barcodeOfNewSpecimen\");\r\n\t\t\tnewSpecimen.addAbstractAttribute(barcodeOfNewSpecimen);\r\n\r\n\t\t\t//step 6\r\n\t\t\tnewSpecimen = entityManagerInterface.persistEntity(newSpecimen);\r\n\r\n\t\t\t//step 6\r\n\t\t\ttissueSpecimen.setParentEntity(newSpecimen);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 7\r\n\t\t\tassertTrue(true);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.getEntityByIdentifier(savedTissueSpecimen\r\n\t\t\t\t\t.getId());\r\n\t\t\tassertEquals(savedTissueSpecimen.getParentEntity(), newSpecimen);\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcodeOfNewSpecimen, \"123456\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\r\n\t\t\tentityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(0, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ newSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"public void getEntities() {\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tEntityA entityA = exampleDao.getOne(1);\r\n\t\tEntityB entityB3 = entityBDao.getOne(3);\r\n\t \tEntityB entityB2 = entityBDao.getOne(2);\r\n\t \tEntityB entityB1 = entityBDao.getOne(1);\r\n\r\n\t \t\r\n\r\n\t\tentityA.setEntityBList(Arrays.asList(entityB2,entityB3,entityB1));\r\n\r\n\t}",
"public void iterateMainEntity(Entity e, OsmDbAccessorContext ctx) throws SQLException {\n \t\tif (e instanceof Way && e.getTag(OSMTagKey.ADDR_INTERPOLATION) != null ){\n \t\t\tBuildingInterpolation type = null;\n \t\t\tint interpolationInterval = 0;\n \t\t\tif(e.getTag(OSMTagKey.ADDR_INTERPOLATION) != null) {\n \t\t\t\ttry {\n \t\t\t\t\ttype = BuildingInterpolation.valueOf(e.getTag(OSMTagKey.ADDR_INTERPOLATION).toUpperCase());\n \t\t\t\t} catch (RuntimeException ex) {\n \t\t\t\t\ttry {\n \t\t\t\t\t\tinterpolationInterval = Integer.parseInt(e.getTag(OSMTagKey.ADDR_INTERPOLATION));\n \t\t\t\t\t} catch(NumberFormatException ex2) {\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (type != null && interpolationInterval > 0) {\n \t\t\t\tList<Node> nodesWithHno = new ArrayList<Node>();\n \t\t\t\tfor (Node n : ((Way) e).getNodes()) {\n \t\t\t\t\tif (n.getTag(OSMTagKey.ADDR_HOUSE_NUMBER) != null && n.getTag(OSMTagKey.ADDR_STREET) != null) {\n \t\t\t\t\t\tnodesWithHno.add(n);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (nodesWithHno.size() > 1) {\n \t\t\t\t\tfor (int i = 1; i < nodesWithHno.size(); i++) {\n \t\t\t\t\t\tNode first = nodesWithHno.get(i - 1);\n \t\t\t\t\t\tNode second = nodesWithHno.get(i);\n \t\t\t\t\t\tboolean exist = streetDAO.findBuilding(first);\n \t\t\t\t\t\tif (exist) {\n \t\t\t\t\t\t\tstreetDAO.removeBuilding(first);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tLatLon l = e.getLatLon();\n \t\t\t\t\t\tSet<Long> idsOfStreet = getStreetInCity(first.getIsInNames(), first.getTag(OSMTagKey.ADDR_STREET), null, l);\n \t\t\t\t\t\tif (!idsOfStreet.isEmpty()) {\n \t\t\t\t\t\t\tBuilding building = new Building(first);\n \t\t\t\t\t\t\tbuilding.setInterpolationInterval(interpolationInterval);\n \t\t\t\t\t\t\tbuilding.setInterpolationType(type);\n \t\t\t\t\t\t\tbuilding.setName(first.getTag(OSMTagKey.ADDR_HOUSE_NUMBER));\n \t\t\t\t\t\t\tbuilding.setName2(second.getTag(OSMTagKey.ADDR_HOUSE_NUMBER));\n \t\t\t\t\t\t\tbuilding.setLatLon2(second.getLatLon());\n \t\t\t\t\t\t\tstreetDAO.writeBuilding(idsOfStreet, building);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t} \n \t\tif (e.getTag(OSMTagKey.ADDR_HOUSE_NUMBER) != null && e.getTag(OSMTagKey.ADDR_STREET) != null) {\n \t\t\tboolean exist = streetDAO.findBuilding(e);\n \t\t\tif (!exist) {\n \t\t\t\tctx.loadEntityData(e);\n \t\t\t\tLatLon l = e.getLatLon();\n \t\t\t\tSet<Long> idsOfStreet = getStreetInCity(e.getIsInNames(), e.getTag(OSMTagKey.ADDR_STREET), null, l);\n \t\t\t\tif (!idsOfStreet.isEmpty()) {\n \t\t\t\t\tBuilding building = new Building(e);\n \t\t\t\t\tString hno = e.getTag(OSMTagKey.ADDR_HOUSE_NUMBER);\n \t\t\t\t\tint i = hno.indexOf('-');\n \t\t\t\t\tif(i != -1) {\n \t\t\t\t\t\tbuilding.setInterpolationInterval(1);\n \t\t\t\t\t\tif(e.getTag(OSMTagKey.ADDR_INTERPOLATION) != null) {\n \t\t\t\t\t\t\ttry {\n \t\t\t\t\t\t\t\tbuilding.setInterpolationType(BuildingInterpolation.valueOf(e.getTag(OSMTagKey.ADDR_INTERPOLATION).toUpperCase()));\n \t\t\t\t\t\t\t} catch (RuntimeException ex) {\n \t\t\t\t\t\t\t\ttry {\n \t\t\t\t\t\t\t\t\tbuilding.setInterpolationInterval(Integer.parseInt(e.getTag(OSMTagKey.ADDR_INTERPOLATION)));\n \t\t\t\t\t\t\t\t} catch(NumberFormatException ex2) {\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t\tbuilding.setName(hno.substring(0, i));\n \t\t\t\t\t\tbuilding.setName2(hno.substring(i + 1));\n \t\t\t\t\t} else {\n \t\t\t\t\t\tbuilding.setName(hno);\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tstreetDAO.writeBuilding(idsOfStreet, building);\n \t\t\t\t}\n \t\t\t}\n \t\t} else if (e instanceof Way /* && OSMSettings.wayForCar(e.getTag(OSMTagKey.HIGHWAY)) */\n \t\t\t\t&& e.getTag(OSMTagKey.HIGHWAY) != null && e.getTag(OSMTagKey.NAME) != null) {\n \t\t\t// suppose that streets with names are ways for car\n \t\t\t// Ignore all ways that have house numbers and highway type\n \t\t\t\n \t\t\t// if we saved address ways we could checked that we registered before\n \t\t\tboolean exist = streetDAO.findStreetNode(e);\n \n \n \n \t\t\t// check that street way is not registered already\n \t\t\tif (!exist) {\n \t\t\t\tctx.loadEntityData(e);\n \t\t\t\tLatLon l = e.getLatLon();\n \t\t\t\tSet<Long> idsOfStreet = getStreetInCity(e.getIsInNames(), e.getTag(OSMTagKey.NAME), e.getTag(OSMTagKey.NAME_EN), l);\n \t\t\t\tif (!idsOfStreet.isEmpty()) {\n \t\t\t\t\tstreetDAO.writeStreetWayNodes(idsOfStreet, (Way) e);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tif (e instanceof Relation) {\n \t\t\tif (e.getTag(OSMTagKey.POSTAL_CODE) != null) {\n \t\t\t\tctx.loadEntityData(e);\n \t\t\t\tpostalCodeRelations.add((Relation) e);\n \t\t\t}\n \t\t}\n \t}",
"public void testEditDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\r\n\t\t\t//Step 2\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\t// Step 3\r\n\t\t\tdataValue.put(barcode, \"870\");\r\n\t\t\tdataValue.put(label, \"specimen parent label123\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"4546\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tentityManagerInterface.editData(tissueSpecimen, dataValue, recordId);\r\n\r\n\t\t\t// step 4\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue = entityManagerInterface.getRecordById(tissueSpecimen, recordId);\r\n\r\n\t\t\tassertEquals(\"870\", dataValue.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label123\", dataValue.get(label));\r\n\t\t\tassertEquals(\"4546\", dataValue.get(quantityInCellCount));\r\n\r\n\t\t\t//Step 5\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\t//Step 6\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"875\");\r\n\t\t\tdataValue.put(label, \"New Label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"454647\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"1223\");\r\n\r\n\t\t\tentityManagerInterface.editData(advanceTissueSpecimenA, dataValue, recordId);\r\n\r\n\t\t\t//Step 7\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue = entityManagerInterface.getRecordById(advanceTissueSpecimenA, recordId);\r\n\r\n\t\t\tassertEquals(\"875\", dataValue.get(barcode));\r\n\t\t\tassertEquals(\"New Label\", dataValue.get(label));\r\n\t\t\tassertEquals(\"454647\", dataValue.get(quantityInCellCount));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}"
] | [
"0.5601645",
"0.5218284",
"0.5194089",
"0.5193244",
"0.5157464",
"0.5151276",
"0.5140509",
"0.50818735",
"0.5067849",
"0.4921244",
"0.48955974",
"0.48819003",
"0.48745114",
"0.4852256",
"0.48441646",
"0.48441607",
"0.48309097",
"0.48136234",
"0.48052204",
"0.47801965",
"0.47801352",
"0.47657442",
"0.47496405",
"0.47301996",
"0.4707062",
"0.46890017",
"0.46827108",
"0.4673869",
"0.465952",
"0.46593103",
"0.4658325",
"0.4653976",
"0.4636273",
"0.46353474",
"0.46175468",
"0.45925853",
"0.4579251",
"0.45787153",
"0.4573406",
"0.45687044",
"0.45573276",
"0.45444772",
"0.45443287",
"0.45392755",
"0.45274377",
"0.45179275",
"0.4510442",
"0.45045823",
"0.45001322",
"0.44962558",
"0.44928706",
"0.44878915",
"0.44864944",
"0.4482434",
"0.44784135",
"0.4478166",
"0.44575915",
"0.44403496",
"0.44375476",
"0.44368",
"0.44324297",
"0.44299394",
"0.4427121",
"0.44249052",
"0.44176173",
"0.44090542",
"0.4393443",
"0.43901888",
"0.4388193",
"0.43808267",
"0.43758357",
"0.43600994",
"0.4358971",
"0.43582103",
"0.43477505",
"0.4346679",
"0.4345791",
"0.43456808",
"0.43430105",
"0.43413448",
"0.43391162",
"0.43380904",
"0.43375555",
"0.43286198",
"0.4328276",
"0.43276373",
"0.43258768",
"0.43201527",
"0.43197364",
"0.43176404",
"0.43172753",
"0.4312055",
"0.43059182",
"0.43053445",
"0.4291741",
"0.42899454",
"0.42880666",
"0.4276273",
"0.42739758",
"0.42707324"
] | 0.5482599 | 1 |
Method that encrypts an individual digit | private char convert(char Char) {
int num = (int) Char;
num = (num - '0' + 7) % 10; // Subtracts '0' to get the integer value and the
// rest is as instructed
Char = (char) (num + '0'); // Translates it back to ASCII value by adding '0'
return Char;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"char cipher(int charToCipher);",
"String encryption(Long key, String encryptionContent);",
"Encryption encryption();",
"public CryptObject encrypt(BigIntegerMod message);",
"public CryptObject encrypt(BigIntegerMod message, BigIntegerMod r);",
"private String encrypt (String password){\r\n String encrypted = \"\";\r\n char temp;\r\n int ASCII;\r\n //For each letter in password.\r\n for (int i = 0; i < password.length(); i++){\r\n temp = password.charAt(i);\r\n ASCII = (int) temp;\r\n //If the letter is a character.\r\n if (ASCII >= 32 && ASCII <= 127){\r\n int x = ASCII - 32;\r\n x = (x + 6) % 96; /*Mod the characters so that it cannot go over the amount.\r\n The letters are all shifted plus 6 characters along. */\r\n encrypted += (char) (x + 32);\r\n }\r\n }\r\n return encrypted;\r\n }",
"public String cipherText(String str, String key)\n{\n String cipher_text=\"\";\n \n for (int i = 0; i < str.length(); i++)\n {\n // converting in range 0-25\n if(str.charAt(i) == ' ' || str.charAt(i) == '\\n')\n cipher_text+= str.charAt(i);\n else{ \n int x = (str.charAt(i) + key.charAt(i)) %26;\n // convert into alphabets(ASCII)\n x += 'A';\n \n cipher_text+=(char)(x);}\n }\n return cipher_text;\n}",
"public static String caesarCypherEncryptor(String str, int key) {\n /* StringBuilder cipher = new StringBuilder();\n for (char ch : str.toCharArray()) {\n char shiftedChar = (char) (((ch - 'a' + key) % 26) + 'a');\n cipher.append(shiftedChar);\n }\n return cipher.toString();*/\n\n return str.chars()\n .mapToObj(ch -> (char) (((ch - 'a' + key) % 26) + 'a'))\n .map(String::valueOf)\n .collect(Collectors.joining());\n }",
"public static String crypter (String chaineACrypter, int codeCryptage) {\r\n char car;\r\n char newCar;\r\n int charLength = chaineACrypter.length();\r\n\r\n for(int i = 0; i < charLength; i++){\r\n car = chaineACrypter.charAt(i);\r\n if(car >= 'a' && car <= 'z'){\r\n newCar = (char)(car + codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= 'A' && car <= 'Z'){\r\n newCar = (char)(car - codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= '0' && car <= '9'){\r\n newCar = (char)(car + 7 % codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }\r\n }\r\n\r\n\r\n return chaineACrypter;\r\n }",
"private static String encrypt(String in){\n\n\t String alphabet = \"1234567890\";\n\n\t String scramble1 = \"<;\\'_$,.?:|)\";\n\t String scramble2 = \"XYZVKJUTHM\";\n\t String scramble3 = \"tuvwxyz&*}\";\n\t String scramble4 = \"~!-+=<>%@#\";\n\t String scramble5 = \"PUDHCKSXWZ\";\n\n\t char messageIn[] = in.toCharArray();\n\t String r = \"\";\n\n\t for(int i = 0; i < in.length(); i++){\n\n\t int letterIndex = alphabet.indexOf(in.charAt(i));\n\n\t if(i % 3 == 0){\n\t r += scramble1.charAt(letterIndex);\n\t }else if (i % 3 == 1){\n\t \tr += scramble2.charAt(letterIndex);\n\t }else if(i % 3 == 2){\n\t \tr += scramble3.charAt(letterIndex);\n\t }\n\t }\n\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\");\n\t\t\t\tSystem.out.println(\" Encoded Message: \" + r);\n\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\\n\\n\");\n\t\treturn r;\n\t}",
"public CryptObject reencrypt(Ciphertext ciphertext, BigIntegerMod r);",
"public String encrypt() {\n StringBuilder encryptedText = new StringBuilder();\n //Make sure the key is valid.\n if (key < 0 || key > 25) {\n Log.d(\"TAG\", \"encrypt: Error in Keu=y \");\n return \"Key Must be 0 : 25\";\n }\n if (plaintext.length() <= 0) {\n Log.d(\"TAG\", \"encrypt: Error in Plain\");\n return \"Error in Plaintext\";\n }\n //Eliminates any whitespace and non alpha char's.\n plaintext = plaintext.trim();\n plaintext = plaintext.replaceAll(\"\\\\W\", \"\");\n if (plaintext.contains(\" \")) {\n plaintext = plaintext.replaceAll(\" \", \"\");\n }\n //Makes sure that all the letters are uppercase.\n plaintext = plaintext.toUpperCase();\n Log.i(\"Caesar\", \"encrypt: plainis : \" + plaintext);\n for (int i = 0; i < plaintext.length(); i++) {\n char letter = plaintext.charAt(i);\n if (charMap.containsKey(letter) && charMap.get(letter) != null) {\n int lookUp = (charMap.get(letter) + key) % 26;\n encryptedText.append(encryptionArr[lookUp]);\n }\n }\n Log.d(\"Caesar.java\", \"encrypt: the Data is \" + encryptedText.toString());\n return encryptedText.toString();\n }",
"public CaesarCipherOne(int key) {this.key=key;}",
"public String digit(String digit);",
"private void encode(){\r\n \r\n StringBuilder sb = new StringBuilder();\r\n \r\n /*\r\n *if a character code is >126 after adding the encryption key, subtract \r\n *95 to wrap\r\n */\r\n for(int i = 0; i < message.length(); i++){\r\n if(message.charAt(i) + key > 126){\r\n int wrappedKey = message.charAt(i) + key - 95;\r\n \r\n sb.append((char) wrappedKey);\r\n \r\n /*\r\n *if a character code ins't > 126 after adding the encryption key\r\n */\r\n } else{\r\n int wrappedKey = message.charAt(i) + key;\r\n sb.append( (char) wrappedKey);\r\n }\r\n }\r\n /*\r\n *case coded message to a string\r\n */\r\n codedMessage = sb.toString();\r\n }",
"public static BigInteger bigIntEncrypt(String txt){\n\n\t String res = \"\"; //empty result string\n\n\t for(int i = 0; i < txt.length(); i++){ // for loop to get value of each char and adds to result\n\n\t res += (int)txt.charAt(i) + shift; // adds the num value of ascii to res string\n\n\t }\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t System.out.println(\" String of char value + shift: \" + res); // shows the txt in big string format\n\t\t\tSystem.out.println(\"------------------------------------------------\\n\\n\");\n\n\t BigInteger bg = new BigInteger(res); // makes bigint out of res\n\n\n\t BigInteger newBg = bg.multiply(key); // math done to bigint\n\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------------------------------------\");\n\t System.out.println(\" String of char values * speical prime: \" + newBg);\n\t\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------------------------------------\\n\\n\");\n\n\t return newBg; // returns bigint, a very very big int\n\t }",
"protected char encrypt1(char c) throws NotInAlphabetException{\n if (passwordPos > password.length()-1) { //reset position to zero after every char is used\n passwordPos = 0; //reset to 0\n }\n //get the current index of where the character being encrypted is and then\n //get the character in the current position of the string using passwordPos and then\n //use this to look up the index in the alphabet\n int temp = ((alphabet.indexOf(c)) + (alphabet.indexOf(password.charAt(passwordPos)))); \n passwordPos += 1; //increment password pos;\n return alphabet.get(wrapInt(temp)); //wrap the index and return\n }",
"private String performEncryption(String creditCardNumber, int offset) {\n /*\n Calling the tokenize method from class Validator to perform the \n tokenization\n */\n int[] digitArr = tokenize(creditCardNumber);\n sb = new StringBuilder();\n for (int i = 0; i < digitArr.length; i++) {\n digitArr[i] = (digitArr[i] + offset);\n sb.append(digitArr[i]);\n //Make the output more readable - XXXX XXXX XXXX XXXX\n if ((i + 1) % 4 == 0) {\n sb.append(\" \");\n }\n }\n return new String(sb);\n }",
"public String Crypt(String s);",
"public int encrypt(int value) {\n int[] arrValue = new int[4];\n\n // split int into array\n // countdown so as to not reverse the original order\n int i = 3;\n while (i >= 0) {\n arrValue[i] = value % 10;\n value /= 10;\n i--;\n }\n\n\n arrValue = swapDigits(arrValue);\n\n int j = 0;\n while (j < 4) {\n arrValue[j] = (arrValue[j] + 7) % 10;\n j++;\n }\n\n return toInt(arrValue);\n }",
"public String encrypt(String word) {\n String [] encr = new String[word.length()];\n StringBuilder encrRet = new StringBuilder();\n for (int i = 0; i<word.length();i++)\n {\n char shift = (char) (((word.charAt(i) - 'a' + 3) % 26) + 'a');\n encrRet = encrRet.append(shift);\n }\n\n return encrRet.toString();\n }",
"public static String caesarCypherEncryptor(String str, int key) {\n\n key = key % 26;\n\n char[] array = str.toCharArray();\n\n for (int i = 0; i < array.length; i++) {\n int value = array[i] + key;\n if(value <= 122)\n array[i] = (char) value;\n else\n array[i] = (char) (96 + value - 122);\n }\n\n return new String(array);\n }",
"public EncryptorReturn encrypt(String in) throws CustomizeEncryptorException;",
"public String encrypt(String word) {\n char[] encrypted = word.toCharArray();\n for (int i = 0; i < encrypted.length; i++){\n if (encrypted[i] == 'x' || encrypted[i] == 'y' || encrypted[i] == 'z'){\n encrypted[i] -= 23;\n } else {\n encrypted[i] += 3;\n }\n \n }\n String encryptedResult = new String(encrypted);\n return encryptedResult;\n }",
"public String encrypt(String word){\n\tint modulus = rsaKeyA * rsaKeyB;\n\tint totient = (rsaKeyA - 1)*(rsaKeyB - 1);\n\tpublicE = calculateExponent(totient);\n\tprivateD = 1 + ((int)Math.random()*10)*totient;\n \n\tif(word == null||word.length()==0) throw new IllegalArgumentException();\n\tString result = \"\";\n\tString wordLower = word.toLowerCase();\n\n\tfor(int i=0; i<wordLower.length(); i++){\n\t if(wordLower.charAt(i)<97 || wordLower.charAt(i)>122)\n\t\tthrow new IllegalArgumentException();\n\t int a = (wordLower.charAt(i)-97);\n\t int b = (int)Math.pow(a,publicE);\n\t int k = (b%26)+97;\n\t result += Character.toString((char)k);\n\t}\n\treturn result;\n }",
"public static String encrypt(String str)\n {\n String returnValue = null;\n\n if (str != null && str.length() > 0)\n {\n StringBuffer encryptedID = new StringBuffer();\n\n // put the ascii value - 32 of each char of str into string buffer\n encodeStringToBuffer(str, encryptedID);\n\n // reverse each group of 2 numbers i.e. 1234 ==> 2143\n reverseIntraStringCharacterGroups(encryptedID, 2);\n\n // get a random number between 3 and 9\n int randomInt = (int) (Math.round(Math.random() * 100) % 7) + 3;\n\n // reverse each group of numbers\n reverseIntraStringCharacterGroups(encryptedID, randomInt);\n\n // add the randon int to the front of the stringBuffer\n encryptedID.insert(0, randomInt);\n\n // convert each number to a letter\n convertNumericToRandomAlpha(encryptedID);\n returnValue = encryptedID.toString();\n }\n return returnValue;\n }",
"String encryptString(String toEncrypt) throws NoUserSelectedException;",
"public String encrypt(String geheimtext);",
"public StringBuilder encodeKey(StringBuilder key, long seed) {\n\t\tif (getStringBuilder()!=null && isNumber(key,false)) {\n\t\t\tint sVar = ((int) (seed % 200));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\tString str = \"\";\n\t\t\tint\tval = 0;\n\t\t\tint idx = 0;\n\t\t\tint end = 0;\n\t\t\tchar[] characters = new char[getStringBuilder().length()];\n\t\t\tgetStringBuilder().getChars(0, getStringBuilder().length(), characters, 0);\n\t\t\tfor (int p = 0; p < characters.length; p++) {\n\t\t\t\tidx = p % key.length();\n\t\t\t\tend = idx + 3;\n\t\t\t\tif (end > key.length()) {\n\t\t\t\t\tend = key.length();\n\t\t\t\t}\n\t\t\t\tval = (Character.valueOf(characters[p]) + ((Integer.parseInt(key.substring(idx,end))) / 2) + sVar);\n\t\t\t\tstr = \"\" + val;\n\t\t\t\twhile (str.length() < 3) {\n\t\t\t\t\tstr = \"0\" + str;\n\t\t\t\t}\n\t\t\t\ts.append(str);\n\t\t\t}\n\t\t\tsetStringBuilder(s);\n\t\t\tcompress(getCharCompressForKey(key,seed));\n\t\t}\n\t\treturn getStringBuilder();\n\t}",
"@Override\n public void encrypt() {\n algo.encrypt();\n String cypher = vigenereAlgo(true);\n this.setValue(cypher);\n }",
"@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n private char encryptLetter(char keyLetter, char plaintextLetter) {\n\n //if not alpha, return unchanged\n if(!Character.isAlphabetic(plaintextLetter)){\n return plaintextLetter;\n }\n\n //convert to upper case for case-insensitivity while looking\n //up in the table\n keyLetter = Character.toUpperCase(keyLetter);\n char plaintextLetterToUpper = Character.toUpperCase(plaintextLetter);\n\n //to leave case unchanged\n if(Character.isUpperCase(plaintextLetter)) {\n return tabulaRecta[keyLetter-65][plaintextLetter-65];\n }\n\n return Character.toLowerCase(tabulaRecta[keyLetter-65][plaintextLetterToUpper-65]);\n }",
"public static String encrypt(String text, int key) {\n StringBuilder sb = new StringBuilder();\n for (char c : text.toCharArray()) {\n if (Character.isLetter(c)) {\n sb.append(shift(c, key));\n } else {\n sb.append(c);\n }\n }\n return sb.toString();\n }",
"char decipher(int charToDeCipher);",
"@Test\n\tpublic void doEncrypt() {\n\t\tString src = \"18903193260\";\n\t\tString des = \"9oytDznWiJfLkOQspiKRtQ==\";\n\t\tAssert.assertEquals(Encryptor.getEncryptedString(KEY, src), des);\n\n\t\t/* Encrypt some plain texts */\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"18963144219\");\n\t\tlist.add(\"13331673185\");\n\t\tlist.add(\"18914027730\");\n\t\tlist.add(\"13353260117\");\n\t\tlist.add(\"13370052053\");\n\t\tlist.add(\"18192080531\");\n\t\tlist.add(\"18066874640\");\n\t\tlist.add(\"15357963496\");\n\t\tlist.add(\"13337179174\");\n\t\tfor (String str : list) {\n\t\t\tSystem.out.println(Encryptor.getEncryptedString(KEY, str));\n\t\t}\n\t}",
"public static String Encrypt(String plainText,int key,String alphabet) throws IOException\n {\n plainText=plainText.toUpperCase();\n String cipherText=\"\";\n\n for(int i=0;i< plainText.length();i++)\n {\n int index=indexOfChar(plainText.charAt(i),alphabet);\n\n if(index==-1)\n {\n cipherText+=plainText.charAt(i);\n\n continue;\n }\n if((index+key)%alphabet.length()==0)\n {\n cipherText+=charAtIndex(index+key,alphabet);\n }\n else\n {\n cipherText+=charAtIndex((index+key)%alphabet.length(),alphabet);\n }\n }\n return cipherText;\n }",
"public void testCaesar(){\n int key1 = 23;\n int key2 = 17;\n String encrypted = encrypt(\"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\", 15);\n System.out.println(\"key is 15\" + \"\\n\" + encrypted);\n String encrypted2 = encryptTwoKeys(\"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\", 8, 21);\n System.out.println(\"key are 8 and 21\" + \"\\n\" + encrypted2);\n }",
"public String encrypt (String input) {\n // parameter checks. If input has nothing, or both keys\n // are zero, we have no work to do.\n if (!hasValue(input)) return \"\";\n if (mainKey1 == 0 && mainKey2 == 0) return input;\n\n // Start with a StringBuilder we can update below.\n StringBuilder encrypted = new StringBuilder(input);\n\n // Walk the input string and transform each letter that exists in\n // our alphabet\n for (int i = 0; i < encrypted.length(); i++) {\n char currChar = encrypted.charAt(i);\n int idx = alphabet.indexOf(currChar);\n if (idx != -1) {\n // Which alphabet do I use? even i is key1, odd i is key2\n String shiftedAlphabet = (i % 2 == 0) ? shiftedAlphabet1: shiftedAlphabet2;\n char newChar = shiftedAlphabet.charAt(idx);\n encrypted.setCharAt(i, newChar);\n }\n }\n\n return encrypted.toString();\n }",
"public void encrypt() {\n // JOptionPane.showMessageDialog(null, \"Encrypting ... Action-Type = \" + DES_action_type);\n int[] flipped_last2_cipher_rounds = new int[64];\n for (int i = 0; i < 32; i++) {\n flipped_last2_cipher_rounds[i] = DES_cipher_sequence[17][i];\n flipped_last2_cipher_rounds[32 + i] = DES_cipher_sequence[16][i];\n }\n DES_ciphertext = select(flipped_last2_cipher_rounds, FP);\n }",
"public BigInteger Encryption(String text){\n \tcypherText = BigInteger.valueOf(0);\n \tint bposition = 0;\n \t/*\n \t * Cursor move from 128 to 1 each time. Do & operation between chvalue\n \t * and cursor, if not 0, means in bit format this position is 1, add\n \t * the corresponding BigInteger in the b list to cypherText.\n \t */\n \tfor(byte ch: text.getBytes()){\n \t\tint cursor = 128;\n \t\tint chvalue = ch;\n \t\tfor(int i = 0;i < 8;i++){\n \t\t\tif((chvalue & cursor) != 0){\n \t\t\t\tcypherText = cypherText.add(b[bposition]);\n \t\t\t}\n \t\t\tcursor >>= 1;\n \t\t bposition ++;\n \t\t}\n \t}\n \treturn cypherText;\n }",
"public String encodePassword(String normalPassword, String key);",
"String encrypt(String input) throws IllegalArgumentException, EncryptionException;",
"public CryptObject reencrypt(Ciphertext ciphertext);",
"public String encrypt(String input) {\n String result = \"\";\n for (int i = 0; i < input.length(); i += 2) {\n result += input.charAt(i);\n }\n for (int i = 1; i < input.length(); i += 2) {\n result += input.charAt(i);\n }\n return result;\n }",
"@Override\n public String encrypt(String word, int cipher) {\n String result = \"\";\n int postcipher = 0;\n boolean wasUpper = false;\n for(int i = 0; i < word.length(); i++)\n {\n char c = word.charAt(i);\n postcipher = c;\n if(Character.isLetter(c)) {\n if (c < ASCII_LOWER_BEGIN) { //change to lowercase\n c += ASCII_DIFF;\n wasUpper = true;\n }\n postcipher = ((c + cipher - ASCII_LOWER_BEGIN) % NUM_ALPHABET + ASCII_LOWER_BEGIN); //shift by cipher amount\n if (wasUpper)\n postcipher -= ASCII_DIFF; //turn back into uppercase if it was uppercase\n wasUpper = false;\n }\n result += (char)postcipher; //add letter by letter into string\n }\n return result;\n }",
"public String encrypt(String plainText);",
"public char encryptChar(char c){\r\n\t\tc = Character.toUpperCase(c);\r\n\t\tchar a = c;\r\n\t\tif(plugboard != null){\r\n\t\t\ta = plugboard.matchChar(c);\r\n\t\t}\r\n\t\ta = rotors.encrypt(a);\r\n\t\tif(plugboard != null){\r\n\t\t\ta = plugboard.matchChar(a);\r\n\t\t}\r\n\t\treturn a;\r\n\t}",
"private BigInteger encrypt(BigInteger message) {\n return message.modPow(e, n);\n }",
"public void testCaesar(){\n String msg = \"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\";\n \n /*String encrypted = encrypt(msg, key);\n System.out.println(\"encrypted \" +encrypted);\n \n String decrypted = encrypt(encrypted, 26-key);\n System.out.println(\"decrypted \" + decrypted);*/\n \n \n String encrypted = encrypt(msg, 15);\n System.out.println(\"encrypted \" +encrypted);\n \n }",
"public String encrypt(String input) {\n \n StringBuilder sb = new StringBuilder(input);\n \n for (int i=0; i< sb.length(); i++) {\n char encrypted = encrypt(sb.charAt(i));\n sb.setCharAt(i, encrypted);\n }\n \n return sb.toString();\n }",
"public static String encrypt(String seed, String plain) throws Exception {\r\nbyte[] rawKey = getRawKey(seed.getBytes());\r\nbyte[] encrypted = encrypt(rawKey, plain.getBytes());\r\nreturn Base64.encodeToString(encrypted, Base64.DEFAULT);\r\n}",
"private String encryptMessage(String message) {\n int MESSAGE_LENGTH = message.length();\n //TODO: throw SizeTooBigException for message requirements\n if(MESSAGE_LENGTH > 1300){\n\n throw new SizeTooBigException();\n }\n\n final int length = message.length();\n String encryptedMessage = \"\";\n for (int i = 0; i < length; i++) {\n //TODO: throw InvalidCharacterException for message requirements\n int m = message.charAt(i);\n int k = this.kissKey.keyAt(i) - 'a';\n int value = m ^ k;\n encryptedMessage += (char) value;\n }\n return encryptedMessage;\n }",
"public char encryptChar(char c) {\r\n try {\r\n char returni = charMap.get(c);\r\n System.out.println(returni);\r\n return returni;\r\n } catch(NullPointerException e) {\r\n System.out.println(\"cant do this dude: \" + c);\r\n return c;\r\n }\r\n }",
"@Override\n public String encryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] encMsg = new char[msg.length()];\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n encMsg[ind] = (char) ((letter + key) % 65536);\n }\n return new String(encMsg);\n }\n }",
"@Override\n\tpublic void Encrypt(Object key) {\n\n\t}",
"private String teaEncrypt(String plaintext, String password) {\n if (plaintext.length() == 0) {\n return (\"\"); // nothing to encrypt\n }\n // 'escape' plaintext so chars outside ISO-8859-1 work in single-byte packing, but keep\n // spaces as spaces (not '%20') so encrypted text doesn't grow too long (quick & dirty)\n String asciitext = plaintext;\n int[] v = strToLongs(asciitext); // convert string to array of longs\n\n if (v.length <= 1) {\n int[] temp = new int[2];\n temp[0] = 0; // algorithm doesn't work for n<2 so fudge by adding a null\n temp[1] = v[0];\n v = temp;\n }\n int[] k = strToLongs(password.substring(0, 16).toLowerCase()); // simply convert first 16 chars of password as\n // key\n int n = v.length;\n\n // int z = v[n - 1], y = v[0], delta = 0x9E3779B9;\n // int mx, e, q = (int) Math.floor(6 + 52 / n), sum = 0;\n int z = v[n - 1];\n int y = v[0];\n int delta = 0x9E3779B9;\n int mx;\n int e;\n int q = (int) Math.floor(6 + 52 / n);\n int sum = 0;\n\n while (q-- > 0) { // 6 + 52/n operations gives between 6 & 32 mixes on each word\n sum += delta;\n e = sum >>> 2 & 3;\n for (int p = 0; p < n; p++) {\n y = v[(p + 1) % n];\n mx = (z >>> 5 ^ y << 2) + (y >>> 3 ^ z << 4) ^ (sum ^ y) + (k[p & 3 ^ e] ^ z);\n z = v[p] += mx;\n }\n }\n\n String ciphertext = longsToHexStr(v);\n\n return ciphertext;\n }",
"public static String encipher(String string, String key){\n key = key != null ? key : defaultKey;\n String newString = \"\";\n string = Enigma.handleStringOnInput(string);\n string = string.toUpperCase();\n for (int i = 0; i < string.length(); i++){\n int temp = alphabetL.indexOf(string.charAt(i));\n newString += key.charAt(temp);\n }\n return newString;\n }",
"@GetMapping(\"/encrypt\")\n public String encrypt(String uid, String data) {\n return \"\";\n }",
"private static BigInteger encrypt(BigInteger x, BigInteger e, BigInteger n) {\r\n\t\treturn x.modPow(e, n);\r\n\t}",
"byte[] encrypt(String plaintext);",
"public static String encrypt(String text) {\r\n\t\tString modifiedText = \"\";\r\n\t\tchar character;\r\n\t\tint code = 0;\r\n\t\tfor (int i = 0; i < text.length(); i++) {\r\n\t\t\tcharacter = text.charAt(i);\r\n\t\t\tcode = character + 7;\r\n\t\t\tcharacter = (char) code;\r\n\t\t\tmodifiedText += Character.toString(character);\r\n\t\t}\r\n\t\treturn modifiedText;\r\n\t}",
"public String encryptShift(String input, int key) {\n StringBuilder encrypted = new StringBuilder(input);\n String alphabetUpCase = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n String alphabetLowCase = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".toLowerCase();\n String shiftedAlphabetUC = alphabetUpCase.substring(key) + alphabetUpCase.substring(0, key);\n String shiftedAlphabetLC = alphabetLowCase.substring(key) + alphabetLowCase.substring(0, key);\n\n for (int i = 0; i < input.length(); i++) {\n char currChar = encrypted.charAt(i);\n if ((currChar + \"\").matches(\"[A-Z]\")) {\n int idx = alphabetUpCase.indexOf(currChar);\n char newChar = shiftedAlphabetUC.charAt(idx);\n encrypted.setCharAt(i, newChar);\n }\n if ((currChar + \"\").matches(\"[a-z]\")) {\n int idx = alphabetLowCase.indexOf(currChar);\n char newChar = shiftedAlphabetLC.charAt(idx);\n encrypted.setCharAt(i, newChar);\n }\n }\n return encrypted.toString();\n }",
"public static String encrypt(String input, String key){\n\t\treturn encrypt(input, key, shift);\n\t}",
"public String encrypt(String message, int key)\n\t{\n\t\tString encryptedMessage = \"\";\n\t\tchar ch;\n \n\t\tfor(int i = 0; i < message.length(); ++i){\n\t\t\tch = message.charAt(i);\n\t\t\t\n\t\t\tif(ch >= 'a' && ch <= 'z'){\n\t ch = (char)(ch + key);\n\t \n\t if(ch > 'z'){\n\t ch = (char)(ch - 'z' + 'a' - 1);\n\t }\n\t \n\t encryptedMessage += ch;\n\t }\n\t else if(ch >= 'A' && ch <= 'Z'){\n\t ch = (char)(ch + key);\n\t \n\t if(ch > 'Z'){\n\t ch = (char)(ch - 'Z' + 'A' - 1);\n\t }\n\t \n\t encryptedMessage += ch;\n\t }\n\t else {\n\t \tencryptedMessage += ch;\n\t }\n\t\t}\n return encryptedMessage;\n\t}",
"public char crypt(char letter){\n\n char l = conns[alphabet.indexOf(letter)];\n\n return l;\n }",
"public static String performCDShiftandPermutate(String CD, int iteration){\n\t\tList<String> CDList = BitManipulator.splitBitStrings(CD);\n\t\tString C = String.format(\"%28s\", CDList.get(0)).replace(' ', '0');\n\t\tString D = String.format(\"%28s\", CDList.get(1)).replace(' ', '0');\n\t\n\t\tlong numC = Integer.parseInt(C, 2);\n\t\tlong numD = Integer.parseInt(D, 2);\n\t\t\n\t\t//numD = Long.rotateLeft(numD, keyShifts[iteration]);\n\t\t//rotates bits around the 28 bits in the number\n\t\tnumC = (numC << keyShifts[iteration]) | (numC>>> (28-keyShifts[iteration]));\n\t\tnumD = (numD << keyShifts[iteration]) | (numD>>> (28-keyShifts[iteration]));\n\t\t//Only get the 28 bits of the number as a bit string, get rid of twos compliment\n\t\tC = String.format(\"%28s\",Long.toBinaryString(numC & 0xFFFFFFF)).replace(' ', '0');\n\t\tD = String.format(\"%28s\", Long.toBinaryString(numD & 0xFFFFFFF )).replace(' ', '0');\n\t\t\n\t\t\n\n\t\tCD = C+D;\n\t\t\n\t\t\n\t\treturn CD;\n\t}",
"@Override\n public String encrypt(String s) throws NotInAlphabetException{ \n passwordPos = 0; //initialize to 0\n return super.encrypt(s); //invoke parent\n }",
"public static String encodeAscii(String in, String key) {\r\n String m = \"\", ts = \"\";\r\n String result = \"\";\r\n int tmp;\r\n for (int i = 0; i < in.length(); i++) {\r\n tmp = (int) (in.charAt(i) + key\r\n .charAt((key.length() % (i + 1) == 0) ? 0\r\n : (key.length() % (i + 1)) - 1)) + 18;\r\n m += String.valueOf((char) (tmp / 100 * 10 + tmp % 10 + 65 + i))\r\n + String\r\n .valueOf((char) (tmp / 100 * 10\r\n + (tmp - tmp / 100 * 100 - tmp % 10) / 10\r\n + 68 + i));\r\n }\r\n\r\n for (int i = 0; i < m.length(); i++) {\r\n ts = String.valueOf((int) m.charAt(i) + 288 + i);\r\n tmp = 3 - ts.length();\r\n for (int j = 0; j < tmp; j++) {\r\n ts = \"0\" + ts;\r\n }\r\n result += ts;\r\n }\r\n return result;\r\n }",
"public String encrypt(String input)\n {\n StringBuilder encrypted = new StringBuilder(input);\n\n String alphabetLower = alphabet.toLowerCase();\n String shiftedAlphabetLower1 = shiftedAlphabet1.toLowerCase();\n String shiftedAlphabetLower2 = shiftedAlphabet2.toLowerCase();\n\n for (int k = 0; k < encrypted.length() ; k++)\n {\n char currentChar = encrypted.charAt(k);\n int indexOfCurrentCharAlphabet = alphabet.indexOf(currentChar);\n int indexOfCurrentCharLower = alphabetLower.indexOf(currentChar);\n\n if (indexOfCurrentCharAlphabet != -1 && k % 2 == 0)\n {\n char newCurrentCharAlphabet = shiftedAlphabet1.charAt(indexOfCurrentCharAlphabet);\n encrypted.setCharAt(k, newCurrentCharAlphabet);\n }\n\n if (indexOfCurrentCharAlphabet != -1 && k % 2 != 0)\n {\n char newCurrentCharAlphabet = shiftedAlphabet2.charAt(indexOfCurrentCharAlphabet);\n encrypted.setCharAt(k, newCurrentCharAlphabet);\n }\n\n if (indexOfCurrentCharLower != -1 && k % 2 == 0)\n {\n char newCurrentCharLower = shiftedAlphabetLower1.charAt(indexOfCurrentCharLower);\n encrypted.setCharAt(k, newCurrentCharLower);\n }\n\n if (indexOfCurrentCharLower != -1 && k % 2 != 0)\n {\n char newCurrentCharLower = shiftedAlphabetLower2.charAt(indexOfCurrentCharLower);\n encrypted.setCharAt(k, newCurrentCharLower);\n }\n }\n return encrypted.toString();\n }",
"@Override\n public String encryptMsg(String msg) {\n if (msg.length() == 0) {\n return msg;\n } else {\n char[] encMsg = new char[msg.length()];\n for (int ind = 0; ind < msg.length(); ++ind) {\n char letter = msg.charAt(ind);\n if (letter >= 'a' && letter <= 'z') {\n encMsg[ind] = (char) ('a' + ((letter - 'a' + key) % 26));\n } else if (letter >= 'A' && letter <= 'Z') {\n encMsg[ind] = (char) ('A' + ((letter - 'A' + key) % 26));\n } else {\n encMsg[ind] = letter;\n }\n }\n return new String(encMsg);\n }\n }",
"public String encryptUnicode(String input, int key) {\n StringBuilder encrypted = new StringBuilder(input);\n for (int i = 0; i < input.length(); i++) {\n char newChar = (char) (encrypted.charAt(i) + key);\n encrypted.setCharAt(i, newChar);\n }\n return encrypted.toString();\n }",
"public String encrypt(String message, String publicKey, String modulus){\n char a;\n BigInteger b;\n String c = \"\";\n \n for(int i = 0; i < message.length(); i++){\n a = message.charAt(i);\n b = new BigInteger(\"\" + (int)a);\n c += \"\" + encrypt(b, new BigInteger(publicKey), new BigInteger(modulus)) + (char)29;\n }\n \n return c;\n }",
"CaesarCipher(int key) {\n this.key = key;\n }",
"public static void cryptClick() {\n //get the input and equation as a string\n String textToEncode = gui.textP.inputArea.getText();\n String equation = gui.settings.equationField.getText();\n //detect if the equation is simple. If so, pass it to the shiftCharacter(), encrypt(), or decrypt() method.\n if (textToEncode.length() > 0 && (equation.matches(\"[0-9-]+$\") || (equation.length() > 1 && !equation.substring(1).matches(\"[^0-9]+$\") && equation.charAt(0) == '-') || equation.trim().isEmpty())) {\n if (equation.trim().isEmpty()) {\n equation = \"0\";\n }\n try {\n String encoded;\n //if the multi-directional method should be used, use it. If not, determine whether to use the encrypt() or decrypt() method.\n if (useMultiDirectionalMethod) {\n encoded = shiftCharacter(textToEncode, Integer.parseInt(equation));\n } else {\n //detect if the shift value is negative or not to determine if it should be encrypted or decrypted.\n if (equation.charAt(0) != '-') {\n encoded = encrypt(textToEncode, Integer.parseInt(equation));\n } else {\n encoded = decrypt(textToEncode, Integer.parseInt(equation.substring(1)));\n }\n }\n //set the text to the output\n gui.textP.outputArea.setText(encoded);\n } catch (IllegalArgumentException iae) {\n gui.textP.outputArea.setText(\"Error: \" + iae.getMessage());\n }\n } else {\n //if the equation is not simple, instead pass it to the encrypt_from_equation() method.\n try {\n String encoded = encrypt_from_equation(textToEncode, equation);\n //set the text to the output or to the error message is there is one\n gui.textP.outputArea.setText(encoded);\n } catch (MathException e) {\n gui.textP.outputArea.setText(e.getMessage() + \"\\n\" + e.getStylizedError());\n } catch (Exception e) {\n gui.textP.outputArea.setText(\"Error: \" + e.getMessage());\n }\n }\n }",
"public String encrypt(String message) {\t\n\n\t\tchar [] letters = new char [message.length()];\n\t\tString newMessage = \"\";\n\n\t\t//create an array of characters from message\n\t\tfor(int i=0; i< message.length(); i++){\n\t\t\tletters[i]= message.charAt(i);\n\t\t}\n\n\t\tfor(int i=0; i<letters.length; i++){\n\t\t\tif(Character.isLetter(letters[i])){ //check to see if letter\n\t\t\t\tif(Character.isUpperCase(letters[i])){ //check to see if it is uppercase\n\t\t\t\t\tnewMessage += letters[i]; //add that character to new string\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t//this creates an array with the numbers that are keys \n\t\tint [] numberOfLetters = new int[newMessage.length()];\n\t\tString alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n\t\tfor(int i=0; i< newMessage.length(); i++){\n\t\t\tfor(int j=0; j< alphabet.length(); j++){\n\t\t\t\tif(newMessage.charAt(i) == alphabet.charAt(j)){ //if they have the same letter\n\t\t\t\t\tnumberOfLetters[i]=j+1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\n\t\t//creates an array of the keys\n\t\tint [] key = new int[numberOfLetters.length];\n\t\tint keys;\n\t\tfor(int i=0; i< numberOfLetters.length; i++){\n\t\t\tkeys = getKey();\n\t\t\tkey[i] = keys;\n\t\t}\n\t\n\t\t//create an array for what we encrypted \n\t\tint [] encryptNum = new int[key.length];\n\t\tfor(int i=0; i< key.length; i++){\n\t\t\tint value = numberOfLetters[i] + key[i];\n\t\t\tif(value > 26){\n\t\t\t\tvalue = value-26;\n\t\t\t\tencryptNum[i]= value;\n\t\t\t}else{\n\t\t\t\tencryptNum[i]= value;\n\t\t\t}\n\t\t}\n\n\t\t//turn encryption into letters \n\t\tString encrypt = \"\";\n\t\tchar [] let = new char [encryptNum.length];\n\n\t\tfor(int i=0; i< encryptNum.length; i++){\n\t\t\tint x = encryptNum[i]-1;\n\t\t\tlet[i] = alphabet.charAt(x);\n\t\t}\n\n\t\tfor(int j=0; j< let.length; j++){\n\t\t\tencrypt += let[j];\n\t\t}\n\n\t\t// COMPLETE THIS METHOD\n\t\t// THE FOLLOWING LINE HAS BEEN ADDED TO MAKE THE METHOD COMPILE\n\n\t\treturn encrypt;\n\t}",
"public static String encrypt(String s, char key) {\n \tbyte[] arr = s.getBytes();\n \treturn Utilities.encrypt(arr, (byte) key);\n }",
"public void encrypt(String s)\n\t{\n\t\tconvertToNum(s);\n\t\tfor(int i = 0; i < myMessage.length; i++)\n\t\t{\n\t\t\tmyView.setEncryptText((myMessage[i].modPow(E, publicKey)).toString() + \" \");\n\t\t}\n\t}",
"private static int base64toInt(char c, byte[] alphaToInt) {\r\n int result = alphaToInt[c];\r\n if (result < 0)\r\n throw new IllegalArgumentException(\"Illegal character \" + c);\r\n return result;\r\n }",
"private static int base64toInt(char c, byte[] alphaToInt) {\n int result = alphaToInt[c];\n if (result < 0) {\n throw new IllegalArgumentException(\"Illegal character \" + c);\n }\n return result;\n }",
"public byte[] Tencryption() {\n int[] ciphertext = new int[message.length];\n\n for (int j = 0, k = 1; j < message.length && k < message.length; j = j + 2, k = k + 2) {\n sum = 0;\n l = message[j];\n r = message[k];\n for (int i = 0; i < 32; i++) {\n sum = sum + delta;\n l = l + (((r << 4) + key[0]) ^ (r + sum) ^ ((r >> 5) + key[1]));\n r = r + (((l << 4) + key[2]) ^ (l + sum) ^ ((l >> 5) + key[3]));\n }\n ciphertext[j] = l;\n ciphertext[k] = r;\n }\n return this.Inttobyte(ciphertext);\n\n }",
"private String vigenereAlgo(boolean encrypt){\n List<Integer> key = EncryptionUtils.stringToIntList(algo.getKey());\n List<Integer> value = EncryptionUtils.stringToIntList(algo.getValue());\n int keyLength = key.size();\n int valueLength = value.size();\n \n List<Integer> crypt = new ArrayList<>();\n \n for (int i = 0; i < valueLength; i++){\n crypt.add(Math.floorMod(value.get(i)-EncryptionUtils.FIRST+ mult(encrypt)*\n (key.get(i%keyLength)-EncryptionUtils.FIRST),EncryptionUtils.SIZE) +EncryptionUtils.FIRST);\n }\n \n return EncryptionUtils.intListToString(crypt);\n }",
"public static String encryptCaesar(String plainText, int key) {\r\n\t\t// Checks\r\n\t\tif (!stringInBounds(plainText)) { return \"\"; } // If the string is not in bounds, return a empty string\r\n\t\t//if (plainText.length() <= 0) { return \"\"; }\r\n\t\t\r\n\t\t// Variables\r\n\t\tString encrypted = \"\"; // Encrypted string, to be built, char by char\r\n\t\t\r\n\t\t// Loops\r\n\t\tfor (int i = 0; i < plainText.length(); i++) {\r\n\t\t\t// Variables\r\n\t\t\tchar c = plainText.charAt(i); // Decrypted character at index i of string plainText\r\n\t\t\tint ec = (int)c + key;\r\n\t\t\t\r\n\t\t\t// Loops\r\n\t\t\twhile (ec > UPPER_BOUND) { ec -= RANGE; }\r\n\t\t\t\r\n\t\t\t// Append to string\r\n\t\t\tencrypted += (char) ec;\r\n\t\t}\r\n\t\t\r\n\t\t// Return\r\n\t\treturn encrypted;\r\n\t}",
"public static String encrypt(String s, char key) {\n\t\tbyte[] b=s.getBytes();\n\t\t\n\t\treturn Utilities.encrypt(b, (byte) key);\n\t\t\n\t}",
"public String encrypt(String text) {\n\t\t\n\t\t//If key is shorter than the text, repeat keyword along length of text\n\t\tif(key.length() < text.length()) {\n\t\t\trepeatKey(text);\n\t\t}\n\t\t\n\t\ttext = text.toLowerCase();\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor(int i = 0 ; i < text.length(); i++) {\n\t\t\tchar textLetter = text.charAt(i);\n\t\t\tchar keyLetter = key.charAt(i);\n\t\t\t\t\t\t\n\t\t\t//Char to encode's position in alphabet\n\t\t\tint textCharacterIndex = alphabet.indexOf(textLetter);\n\t\t\t\n\t\t\t//Only encrypt letters\n\t\t\tif(Character.isLetter(textLetter)) {\n\t\t\t\t\n\t\t\t\t//If character is in the second half of cipher A-M\n\t\t\t\tif(charMap.get(textLetter) > 12 && charMap.get(textLetter) <= 25) {\n\t\t\t\t\t\n\t\t\t\t\tint keyValue = charMapKey.get(keyLetter);\n\t\t\t\t\tString cipher = shiftLeft(baseCipherRHS, keyValue);\t\t\t\t\t\n\t\t\t\t\tsb.append(cipher.charAt(textCharacterIndex % 13));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint keyValue = charMapKey.get(keyLetter);\n\t\t\t\t\tString cipher = shiftRight(baseCipherLHS, keyValue);\n\t\t\t\t\tsb.append(cipher.charAt(textCharacterIndex % 13));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsb.append(text.charAt(i));\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t}",
"@Override\n public byte[] encrypt(byte[] plaintext) {\n java.security.spec.ECPoint point = hashIntoTheCurveInternal(plaintext);\n return encrypt(convertECPoint(point));\n }",
"void insertDigit(int digit);",
"public String encrypt() throws LRException\n\t{\n\t\treturn LUEncrypt.encrypt(getFields(),\n\t\t\t((DataHRecordData)getData()).encryptKey.getStringValue());\n\t}",
"@Test\r\n public void testEncrypt()\r\n {\r\n System.out.println(\"encrypt\");\r\n String input = \"Hello how are you?\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n String result = instance.encrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }",
"public char encodeLetter(char letterToEncode)\n\t{\n\t\tint charAsInt;\n\t\tchar intAsChar;\n\t\t\n\t\tletterToEncode = plugboard.substitute(letterToEncode);\n\t\tcharAsInt = convertToInteger(letterToEncode);\n\t\t\n\t\t//loops through each of the 3 rotors assigning them substitute() mehtod\n\t\tfor(int slot = 0; slot < rotors.length; slot++)\n\t\t{\n\t\t\tcharAsInt = rotors[slot].substitute(charAsInt);\n\t\t}\n\t\t\n\t\tcharAsInt = reflector.substitute(charAsInt);\n\t\t\n\t\t//loops once again through each of the three rotors assigning them substituteBack method\n\t\tfor(int slot = rotors.length-1; slot >= 0; slot--)\n\t\t{\n\t\t\tcharAsInt = rotors[slot].substituteBack(charAsInt);\n\t\t}\n\t\t\n\t\tintAsChar = convertToCharacter(charAsInt);\n\t\tintAsChar = plugboard.substitute(intAsChar);\n\t\trotors[0].rotate();\n\t\t\n\t\treturn intAsChar;\n\t}",
"public static String officallyEncrypt(String in){\n\t BigInteger bigIntEncrypt = bigIntEncrypt(in);\n\n\t String finalEncrypt = encrypt(bigIntEncrypt.toString());\n\t\treturn finalEncrypt;\n\t}",
"private static int[] szyfrujXOR(String str, String key) {\n int[] output = new int[str.length()];\n for(int i = 0; i < str.length(); i++) {\n int o = (Integer.valueOf(str.charAt(i)) ^ Integer.valueOf(key.charAt(i % (key.length() - 1)))) + '0';\n output[i] = o;\n }\n return output; \n }",
"public int generateOTP(String key){\n int len =4;\n\n int OTP;\n String numbers = \"0123456789\";\n Random rndm_method = new Random();\n\n char[] otp = new char[len];\n\n for (int i = 0; i < len; i++)\n {\n otp[i] =\n numbers.charAt(rndm_method.nextInt(numbers.length()));\n }\n OTP = Integer.parseInt(String.valueOf(otp));\n otpCache.put(key, OTP);\n return OTP;\n }",
"public char encrypt(char ch) {\n \n char chUC = Character.toUpperCase(ch);\n int cInd = ALPHABET.indexOf(chUC);\n \n // do not translate non letters\n if (cInd==-1) return ch;\n \n // index of encoded character\n int enInd = (cInd+key)%26;\n // encoded character\n char enCh = ALPHABET.charAt(enInd);\n \n // check the case of character and return appropriate\n if (Character.isUpperCase(ch)) return enCh;\n else return Character.toLowerCase(enCh);\n \n }",
"public static String Encrypt(String inputText, String key) {\n String retVal = \"\";\n try {\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n byte[] keyBytes = new byte[16];\n byte[] b = key.getBytes();\n int len = b.length;\n if (len > keyBytes.length) {\n len = keyBytes.length;\n }\n System.arraycopy(b, 0, keyBytes, 0, len);\n SecretKeySpec keySpec = new SecretKeySpec(keyBytes, \"AES\");\n IvParameterSpec ivSpec = new IvParameterSpec(keyBytes);\n cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec);\n BASE64Encoder _64e = new BASE64Encoder();\n byte[] encryptedData = cipher.doFinal(inputText.getBytes());\n retVal = _64e.encode(encryptedData);\n\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return retVal;\n }",
"public static void main(String[] args) {\r\n long randomNumber = System.currentTimeMillis();\r\n // Get number less than 26\r\n randomNumber = randomNumber % 26;\r\n \r\n // add 65 to the number\r\n randomNumber += 65;\r\n System.out.println((char) randomNumber);\r\n }",
"public String encrypt(final String value) {\n\t\treturn encryptor.encrypt(value);\n\t}",
"public int encrypt(int clock){\n clock = clock * 10;\n try {\n os_obj = socket_obj.getOutputStream();\n osw_obj = new OutputStreamWriter(os_obj);\n bw_obj = new BufferedWriter(osw_obj);\n\n int message = clock;\n bw_obj.write(message);\n bw_obj.flush();\n\n }\n\n catch(Exception e)\n {\n e.printStackTrace();\n }\n\n\n return 0;\n }",
"public void invoke() throws Exception {\n\tchar[] DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };\n\t \ntry\n{\n int l = in_data.length;\n\n char[] out = new char[l << 1];\n\n // two characters form the hex value.\n for (int i = 0, j = 0; i < l; i++) {\n out[j++] = DIGITS[(0xF0 & in_data[i]) >>> 4];\n out[j++] = DIGITS[0x0F & in_data[i]];\n }\n\n\tout_data = new String(out);\n\n} catch (Exception e) {\n\t System.out.println(\"-------------------------\");\n\t System.out.println(\"doEncryptNotif ERROR: \" + e.getMessage() + \".\");\n\t System.out.println(\"-------------------------\");\n\t throw e;\n} \n\n\t}",
"public String encryptString(String s){\r\n\t\tchar[] cArr = s.toCharArray();\r\n\t\tString rStr = \"\";\r\n\t\tfor(char c : cArr){\r\n\t\t\trStr += encryptChar(c);\r\n\t\t}\r\n\t\treturn rStr;\r\n\t}",
"public static String encrypt(String str)\n {\n StringBuilder sb = new StringBuilder(str);\n\n int lenStr = str.length();\n int lenKey = key.length();\n\n //\n // For each character in our string, encrypt it...\n for ( int i = 0, j = 0; i < lenStr; i++, j++ )\n {\n if ( j >= lenKey ) j = 0; // Wrap 'round to beginning of key string.\n\n //\n // XOR the chars together. Must cast back to char to avoid compile error.\n //\n sb.setCharAt(i, (char)(str.charAt(i) ^ key.charAt(j)));\n }\n\n return sb.toString();\n }",
"void overflowDigits() {\n for (int i = 0; i < preDigits.length(); i++) {\n char digit = preDigits.charAt(i);\n // This could be implemented with a modulo, but compared to the main\n // loop this code is too quick to measure.\n if (digit == '9') {\n preDigits.setCharAt(i, '0');\n } else {\n preDigits.setCharAt(i, (char)(digit + 1));\n }\n }\n }",
"public static String encriptar(String input){\n try {\n\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n\n byte[] messageDigest = md.digest(input.getBytes());\n\n BigInteger no = new BigInteger(1, messageDigest);\n\n String hashtext = no.toString(16);\n while (hashtext.length() < 32) {\n hashtext = \"0\" + hashtext;\n }\n return hashtext;\n }\n\n catch (NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n }"
] | [
"0.67022693",
"0.65623057",
"0.6507466",
"0.63074106",
"0.63027155",
"0.6244026",
"0.6210289",
"0.61372507",
"0.6116333",
"0.6106638",
"0.60619384",
"0.6038953",
"0.60321367",
"0.5976206",
"0.5941573",
"0.5939309",
"0.5926407",
"0.58856636",
"0.5875937",
"0.5859108",
"0.5848809",
"0.58451355",
"0.5842622",
"0.58353156",
"0.5825929",
"0.5814914",
"0.580816",
"0.5790107",
"0.57867783",
"0.578266",
"0.57772475",
"0.57638705",
"0.5732747",
"0.5718249",
"0.56731224",
"0.563918",
"0.5627074",
"0.5625399",
"0.56227905",
"0.5619475",
"0.56154895",
"0.5602226",
"0.55923283",
"0.55835295",
"0.5582447",
"0.55819565",
"0.5577939",
"0.5577364",
"0.55746615",
"0.55658716",
"0.5553891",
"0.55483896",
"0.5546522",
"0.5533187",
"0.55241215",
"0.5513619",
"0.55041075",
"0.55006075",
"0.5495659",
"0.5494526",
"0.5491215",
"0.54907936",
"0.54831874",
"0.5481491",
"0.5481236",
"0.54573745",
"0.54268086",
"0.5424229",
"0.5409274",
"0.54067385",
"0.53892297",
"0.538907",
"0.5388149",
"0.5387522",
"0.53791904",
"0.53544044",
"0.53519946",
"0.5345311",
"0.5340481",
"0.5328718",
"0.5316827",
"0.53097296",
"0.5306709",
"0.53045917",
"0.52989626",
"0.52833307",
"0.52742964",
"0.52696747",
"0.5269606",
"0.5255193",
"0.52514136",
"0.5247898",
"0.5236868",
"0.523647",
"0.5235247",
"0.5234974",
"0.52148944",
"0.52081233",
"0.520524",
"0.5203432",
"0.52006835"
] | 0.0 | -1 |
wrap sole group match in specified html tag of class | public static String wrapInTag(String source, String match, String tag, String className) {
Matcher matcher = Pattern.compile(match).matcher(source);
StringBuilder sb = new StringBuilder();
String wrapFmt = className.isEmpty() ? "<%1$s>%3$s</%1$s>" : "<%1$s class=\"%2$s\">%3$s</%1$s>";
int matchEnd = -1;
try {
while (matcher.find()) {
int targetGroup = matcher.groupCount() > 1 ? 1 : 0;
String matched = matcher.group(targetGroup);
while (targetGroup < matcher.groupCount() && matched == null)
matched = matcher.group(++targetGroup);
String wrapped = String.format(wrapFmt, tag, className, matched);
int matchStart = matcher.start(targetGroup);
if (matchStart < 0) matchStart = matcher.start(targetGroup + 1);
if (matchEnd < 0) {
sb.append(source, 0, matchStart);
} else {
sb.append(source, matchEnd, matchStart);
}
sb.append(wrapped);
matchEnd = matcher.end(targetGroup);
}
if (matchEnd > 0)
sb.append(source, matchEnd, source.length());
else
sb.append(source);
return sb.toString();
} catch (Exception e) {
LOGGER.error("{}. Unable to wrap {} at {}", e.toString(), match, source);
}
return source;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void replaceRegex() {\n int index = -1;\n for (int i = 0; i < regex.elist.size(); i++) {\n if (regex.elist.get(i).isShareableUnit) {\n ElementShareableUnit share = (ElementShareableUnit) regex.elist.get(i);\n if (share.share == this) {\n index = i;\n }\n }\n }\n //replace in parenthesis\n for (int i = 0; i < regex.elist.size(); i++) {\n Element e = regex.elist.get(i);\n if (e.isParentheis) {\n e.replaceRegex(this);\n }\n\n }\n if (index == -1) {\n System.out.println(\"there is error \" + this.getString());\n } else {\n regex.elist.remove(index);\n for (int i = 0; i < this.lelement.size(); i++) {\n regex.elist.add(index + i, this.lelement.get(i));\n }\n }\n //System.out.println(\"After: \" + this.regex.getString());\n }",
"public String buildTagRegex() {\n return buildTagRegex(\"(.+?)\", true);\n }",
"private void wrapText() {\r\n if (atEnd()) {\r\n setPosition(0);\r\n updateMatcher();\r\n }\r\n }",
"default HtmlFormatter replace(Pattern pattern, String replacement) {\n return andThen(s -> pattern.matcher(s).replaceAll(replacement));\n }",
"public RegexNode ReduceGroup()\n\t{\n\t\tRegexNode u;\n\n\t\tfor (u = this; u.Type() == Group;)\n\t\t{\n\t\t\tu = u.Child(0);\n\t\t}\n\n\t\treturn u;\n\t}",
"public GrandChildOfStringMatch() {}",
"default HtmlFormatter wrapWith(String str) {\n return wrapWith(\n str,\n str\n );\n }",
"Pattern getTagPattern();",
"public default Tagged<T> wrap( T object ){\n\t\treturn new Tagged<T>(object);\n\t}",
"default HtmlFormatter decorate(String tag) {\n return andThen(s -> s.isEmpty() ? \"\" : String.join(\n \"\",\n \"<\",\n tag,\n \">\",\n s,\n \"</\",\n tag,\n \">\"\n ));\n }",
"private String replaceAll(Matcher matcher, String input, String replacement) {\n // Process substitution string to replace group references with groups\n int cursor = 0;\n StringBuilder result = new StringBuilder();\n\n while (cursor < replacement.length()) {\n char nextChar = replacement.charAt(cursor);\n if (nextChar == '\\\\') {\n cursor++;\n nextChar = replacement.charAt(cursor);\n result.append(nextChar);\n cursor++;\n } else if (nextChar == '$') {\n // Skip past $\n cursor++;\n // The first number is always a group\n int refNum = (int)replacement.charAt(cursor) - '0';\n if ((refNum < 0)||(refNum > 9))\n throw new IllegalArgumentException(\n \"Illegal group reference\");\n cursor++;\n\n // Capture the largest legal group string\n boolean done = false;\n while (!done) {\n if (cursor >= replacement.length()) {\n break;\n }\n int nextDigit = replacement.charAt(cursor) - '0';\n if ((nextDigit < 0)||(nextDigit > 9)) { // not a number\n break;\n }\n int newRefNum = (refNum * 10) + nextDigit;\n if (matcher.groupCount() < newRefNum) {\n done = true;\n } else {\n refNum = newRefNum;\n cursor++;\n }\n }\n // Append group\n if (matcher.group(refNum) != null)\n result.append(matcher.group(refNum));\n } else {\n result.append(nextChar);\n cursor++;\n }\n }\n\n return matcher.replaceAll(result.toString());\n }",
"public interface IRegexFinder {\n String getTag();\n\n // Put tag for a item in tiarray if the item match to a regex.\n default boolean putTagIfRegexFound(TaggedItemsArray tiarray) {\n Iterator<String> itr = tiarray.getIterator();\n boolean anyRegexFound = false;\n\n while (itr.hasNext()) {\n String item = itr.next();\n\n if (match(item)) {\n tiarray.modify(item, getTag());\n anyRegexFound = true;\n }\n }\n\n return anyRegexFound;\n }\n\n // Returns kind / name of regex finder.\n String whoAmI();\n\n boolean match(String toCheck);\n}",
"public abstract void wrapup();",
"private static String replaceAll(Matcher matcher, String rep) {\n try {\n StringBuffer sb = null ; // Delay until needed\n while(matcher.find()) {\n if ( sb == null )\n sb = new StringBuffer() ;\n else {\n // Do one match of zerolength string otherwise filter out.\n if (matcher.start() == matcher.end() )\n continue ;\n }\n matcher.appendReplacement(sb, rep);\n }\n if ( sb == null )\n return null ;\n matcher.appendTail(sb);\n return sb.toString();\n } catch (IndexOutOfBoundsException ex) {\n throw new ExprEvalException(\"IndexOutOfBounds\", ex) ;\n }\n }",
"protected void handleEnd(HtmlDocument.EndTag tag) {\n TagWrapper lastSeen;\n HTML.Element element = tag.getElement();\n while ((lastSeen = mSeenTags.poll()) != null && lastSeen.tag.getElement() != null &&\n !lastSeen.tag.getElement().equals(element)) { }\n\n // Misformatted html, just ignore this tag\n if (lastSeen == null) {\n return;\n }\n\n Object marker = null;\n if (HTML4.B_ELEMENT.equals(element)) {\n // BOLD\n marker = new StyleSpan(Typeface.BOLD);\n } else if (HTML4.I_ELEMENT.equals(element)) {\n // ITALIC\n marker = new StyleSpan(Typeface.ITALIC);\n } else if (HTML4.U_ELEMENT.equals(element)) {\n // UNDERLINE\n marker = new UnderlineSpan();\n } else if (HTML4.A_ELEMENT.equals(element)) {\n // A HREF\n HtmlDocument.TagAttribute attr = lastSeen.tag.getAttribute(HTML4.HREF_ATTRIBUTE);\n // Ignore this tag if it doesn't have a link\n if (attr == null) {\n return;\n }\n marker = new URLSpan(attr.getValue());\n } else if (HTML4.BLOCKQUOTE_ELEMENT.equals(element)) {\n // BLOCKQUOTE\n marker = new QuoteSpan();\n } else if (HTML4.FONT_ELEMENT.equals(element)) {\n // FONT SIZE/COLOR/FACE, since this can insert more than one span\n // we special case it and return\n handleFont(lastSeen);\n }\n\n final int start = lastSeen.startIndex;\n final int end = mBuilder.length();\n if (marker != null && start != end) {\n mBuilder.setSpan(marker, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n }\n }",
"SearchResult replace(SearchResult result, String replacement);",
"@Override\n public void handle(\n @NonNull StylarVisitor visitor,\n @NonNull StylarHtmlRenderer renderer,\n @NonNull HtmlTag tag)\n {\n\n if (tag.isBlock())\n {\n visitChildren(visitor, renderer, tag.getAsBlock());\n }\n\n SpannableBuilder.setSpans(\n visitor.builder(),\n new UnderlineSpan(),\n tag.start(),\n tag.end()\n );\n }",
"public ModifyingWriter createRegexModifyingWriter(Writer output, String regex, int flags, String replacement,\r\n int minimumLengthOfLookBehind, int requestedCapacityOfCharacterBuffer) {\n if (!(output instanceof BufferedWriter)) {\r\n output = new BufferedWriter(output);\r\n }\r\n\r\n // create modifier\r\n Modifier modifier = new RegexModifier(regex, flags, replacement, minimumLengthOfLookBehind,\r\n requestedCapacityOfCharacterBuffer);\r\n\r\n // create and return Writer\r\n return new ModifyingWriter(output, modifier);\r\n }",
"public static void replaceAll1(){\n System.out.println(\">>>>>>>>>>>>\");\n String class0 = \"this is an example\";\n String ret0 = class0.replaceAll(\"are\", \"ARE\");\n assert(ret0.equals(\"this is an example\"));\n System.out.println(ret0);\n }",
"private StringBuilder createHtml(Match match)\r\n {\r\n\r\n MatchEquipe bleu = match.getBleu();\r\n MatchEquipe gris = match.getGris();\r\n MatchEquipe noir = match.getNoir();\r\n\r\n StringBuilder html = new StringBuilder();\r\n\r\n html.append(\"<input id=\\\"buttonMatch\" + match.getIdMatch() + \"\\\" src=\\\" \" + PLUS_SRC\r\n + \"\\\" type=\\\"image\\\" onclick=\\\"toggleVisibility('Match\" + match.getIdMatch() + \"');\\\">\" + RN);\r\n\r\n html.append(\"<div id=\\\"Match\" + match.getIdMatch() + \"Plus\\\" style=\\\"visibility: visible; display: block;\\\">\"\r\n + RN);\r\n html.append(\"D�tail du match<br><br>\" + RN);\r\n html.append(\"<table class=\\\"tableau_match\\\" cellspacing=\\\"0\\\">\" + RN);\r\n html.append(\"<tbody><tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Match #\" + match.getIdMatch() + \"</td>\" + RN);\r\n\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"bleu\\\">\" + bleu.getNomEquipe() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"gris\\\">\" + gris.getNomEquipe() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"noir\\\">\" + noir.getNomEquipe() + \"</td>\" + RN);\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">P�riodes gagn�es</td>\" + RN);\r\n\r\n if(!bleu.isForfait())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + bleu.getNbPeriode() + \"</td>\" + RN);\r\n }\r\n else\r\n {\r\n html.append(\"<td colspan=\\\"7\\\"> Forfait </td>\" + RN);\r\n }\r\n\r\n if(!gris.isForfait())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + gris.getNbPeriode() + \"</td>\" + RN);\r\n }\r\n else\r\n {\r\n html.append(\"<td colspan=\\\"7\\\"> Forfait </td>\" + RN);\r\n }\r\n\r\n if(!noir.isForfait())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + noir.getNbPeriode() + \"</td>\" + RN);\r\n }\r\n else\r\n {\r\n html.append(\"<td colspan=\\\"7\\\"> Forfait </td>\" + RN);\r\n }\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"</tbody></table>\" + RN);\r\n html.append(\"</div>\" + RN);\r\n\r\n html.append(\"<div id=\\\"Match\" + match.getIdMatch() + \"Moins\\\" style=\\\"display: none;\\\">\" + RN);\r\n\r\n html.append(\"Réduire le détail du match\" + RN);\r\n html.append(\"<br><br>\" + RN);\r\n\r\n html.append(\"<table class=\\\"tableau_match\\\" cellspacing=\\\"0\\\">\" + RN);\r\n html.append(\"<tbody><tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\"> Match #\" + idMatch.getText() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"bleu\\\">\" + equipeBleu.getText() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"gris\\\">\" + equipeGris.getText() + \"</td>\" + RN);\r\n html.append(\"<td colspan=\\\"7\\\" class=\\\"noir\\\">\" + equipeNoir.getText() + \"</td>\" + RN);\r\n html.append(\"</tr> \" + RN);\r\n html.append(\"<tr> \" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">P�riode</td>\" + RN);\r\n\r\n if(forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td class=\\\"p1\\\" rowspan=\\\"7\\\" colspan=\\\"7\\\">Forfait</td>\" + RN);\r\n }\r\n\r\n if(forfaitGris.isSelected())\r\n {\r\n html.append(\"<td class=\\\"p1\\\" rowspan=\\\"7\\\" colspan=\\\"7\\\">Forfait</td>\" + RN);\r\n }\r\n\r\n if(forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td class=\\\"p1\\\" rowspan=\\\"7\\\" colspan=\\\"7\\\">Forfait</td>\" + RN);\r\n }\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td>1</td>\" + RN);\r\n html.append(\"<td>2</td>\" + RN);\r\n html.append(\"<td>3</td>\" + RN);\r\n html.append(\"<td>4</td>\" + RN);\r\n html.append(\"<td>5</td>\" + RN);\r\n html.append(\"<td>6</td>\" + RN);\r\n html.append(\"<td>7</td>\" + RN);\r\n }\r\n\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td>1</td>\" + RN);\r\n html.append(\"<td>2</td>\" + RN);\r\n html.append(\"<td>3</td>\" + RN);\r\n html.append(\"<td>4</td>\" + RN);\r\n html.append(\"<td>5</td>\" + RN);\r\n html.append(\"<td>6</td>\" + RN);\r\n html.append(\"<td>7</td>\" + RN);\r\n }\r\n\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td>1</td>\" + RN);\r\n html.append(\"<td>2</td>\" + RN);\r\n html.append(\"<td>3</td>\" + RN);\r\n html.append(\"<td>4</td>\" + RN);\r\n html.append(\"<td>5</td>\" + RN);\r\n html.append(\"<td>6</td>\" + RN);\r\n html.append(\"<td>7</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Pointage</td>\" + RN);\r\n\r\n // p�riodes Bleu\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td>\" + P1B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P2B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P3B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P4B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P5B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P6B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P7B.getText() + \"</td>\" + RN);\r\n }\r\n\r\n // P�riode Gris\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td>\" + P1G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P2G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P3G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P4G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P5G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P6G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P7G.getText() + \"</td>\" + RN);\r\n }\r\n\r\n // P�riode noir\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td>\" + P1N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P2N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P3N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P4N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P5N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P6N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + P7N.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Prolongation 1</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td>\" + prol1B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol2B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol3B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol4B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol5B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol6B.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol7B.getText() + \"</td>\" + RN);\r\n }\r\n\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td>\" + prol1G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol2G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol3G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol4G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol5G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol6G.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol7G.getText() + \"</td>\" + RN);\r\n }\r\n\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td>\" + prol1N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol2N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol3N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol4N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol5N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol6N.getText() + \"</td>\" + RN);\r\n html.append(\"<td>\" + prol7N.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">P�riodes gagn�es</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + periodeGagneeBleu.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + periodeGagneeGris.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + periodeGagneeNoir.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Prolongation 2�me position</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + prol22B.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + prol22G.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + prol22N.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Esprit sportif</td>\" + RN);\r\n\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + espritSportifBleu.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + espritSportifGris.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + espritSportifNoir.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\"</tr>\" + RN);\r\n html.append(\"<tr>\" + RN);\r\n html.append(\"<td class=\\\"premiere_colonne\\\">Points championnats</td>\" + RN);\r\n if(!forfaitBleu.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + pointBleu.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitGris.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + pointGris.getText() + \"</td>\" + RN);\r\n }\r\n if(!forfaitNoir.isSelected())\r\n {\r\n html.append(\"<td colspan=\\\"7\\\">\" + pointNoir.getText() + \"</td>\" + RN);\r\n }\r\n\r\n html.append(\" </tr>\" + RN);\r\n html.append(\"</tbody>\" + RN);\r\n html.append(\"</table>\" + RN);\r\n\r\n html.append(\"<strong>Arbitres</strong> : \" + arbitreChef.getText() + \" & \" + arbitreAdjoint.getText() + RN);\r\n\r\n return html.append(\"</div>\" + RN);\r\n }",
"private String buildWordMatch(Matcher matcher, String word){\n return \"(\" + matcher.replaceAll(\"% \"+word+\" %\")\n + \" or \" + matcher.replaceAll(word+\" %\")\n + \" or \" + matcher.replaceAll(word)\n + \" or \" + matcher.replaceAll(\"% \"+word) + \")\" ;\n }",
"public interface GroupFour extends DomElement {\n\n /**\n * Gets constructor.\n *\n * @return the constructor\n */\n @SubTag(\"constructor\")\n Constructor getConstructor();\n\n /**\n * Gets ids.\n *\n * @return the ids\n */\n @SubTagList(\"id\")\n List<Id> getIds();\n\n /**\n * Gets results.\n *\n * @return the results\n */\n @SubTagList(\"result\")\n List<Result> getResults();\n\n /**\n * Gets associations.\n *\n * @return the associations\n */\n @SubTagList(\"association\")\n List<Association> getAssociations();\n\n /**\n * Gets collections.\n *\n * @return the collections\n */\n @SubTagList(\"collection\")\n List<Collection> getCollections();\n\n /**\n * Gets discriminator.\n *\n * @return the discriminator\n */\n @SubTag(\"discriminator\")\n Discriminator getDiscriminator();\n}",
"@Override\n protected SyntaxTreeNode rewriteBlock(@Nonnull final BlockBuilder parent, @Nonnull final Block block) {\n final String content = concatNodeContent(block.getChildren());\n\n final SyntaxTreeNode first = parent.getChildren().stream().findFirst().orElse(null);\n assert first != null;\n\n // Create a new span containing this content\n final SpanBuilder span = new SpanBuilder();\n span.setEditHandler(new SpanEditHandler(HtmlTokenizer.createTokenizeDelegate()));\n fillSpan(span, first.getStart(), content);\n return span.build();\n }",
"@Override\n\tpublic void visit(RegExpMatchOperator arg0) {\n\t\t\n\t}",
"static String surround(String s, String search_term){\n return s.replaceAll(search_term,\"(\" +search_term +\")\");\n\n }",
"public NodeWrapper wrap(XmlNode node) {\n if (node == this.node) {\n return this;\n }\n if (node.get_OwnerDocument() == this.node) {\n return makeWrapper(node, this);\n } else {\n throw new IllegalArgumentException(\n \"DocumentWrapper#wrap: supplied node does not belong to the wrapped DOM document\");\n }\n }",
"void replace(CtElement element);",
"@Override\n\tpublic String generateHTML() {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tString level = \"\\t\";\n\t\tstringBuilder.append(level.repeat(levelCount)+\"<div>\\n\");\n\t\tlevelCount++;\n\t\tfor (HTMLGenerator htmlGenerator : tags) {\n\t\t\tstringBuilder.append(level.repeat(levelCount)+htmlGenerator.generateHTML());\n\t\t}\n\t\tstringBuilder.append(\"</div>\\n\");\n\t\treturn stringBuilder.toString();\n\t}",
"void replaceClasses(Class current, Class replacement);",
"default HtmlFormatter shortenPackages() {\n return replace(\n PACKAGE_PATTERN,\n \"$2\"\n );\n }",
"@Override\n public Matcher way() {\n return withView(getElementView(this));\n }",
"private String removeHTML(String word) {\r\n\t\tString result = \"\";\r\n\t\t\r\n\t\tString temp = null;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=0;i<word.length();i++) {\r\n\t\t\tchar character = word.charAt(i);\r\n\t\t\t\r\n\t\t\t//if < is found we don't add that text \r\n\t\t\tif(word.charAt(i) == '<') {\r\n\t\t\t\tstartFlag = true;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t//if < is found we don't add that text \r\n\t\t\tif(startFlag == true) {\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t//System.out.println(word.charAt(i)+\" Removed\");\r\n\t\t\t\t//end bracket > found so we can continue to add now \r\n\t\t\t\tif(character == '>') {\r\n\t\t\t\t\tstartFlag = false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\t\r\n\t\t\t\tif(i == 0) {\t\t\t\t\r\n\t\t\t\t\tresult = Character.toString(character);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult += character;\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t\t\r\n\t\t}\t\r\n\t\t\ttemp = result;\r\n\t\t\treturn temp;\t\t \r\n\t\t\r\n\t}",
"private HTMLElement generateSpanElement(String spanClass, int indentLevel) {\n \t\tHTMLElement span = new FormattedHTMLElement(\n \t\t\t\tIIntroHTMLConstants.ELEMENT_SPAN, indentLevel, false);\n \t\tspan.addAttribute(IIntroHTMLConstants.ATTRIBUTE_CLASS, spanClass);\n \t\treturn span;\n \t}",
"private void structureListElement() {\n postBodyHTMLContent = postBodyHTMLContent.replaceAll(Data.LI_OPENING_REGEX_MATCHER, \"- \");\n\n // replace closing tag </li> with </br> to separate with other list item\n postBodyHTMLContent = postBodyHTMLContent.replaceAll(Data.LI_CLOSING_REGEX_MATCHER, \"<br>\");\n }",
"public interface IHtmlStreamWriter extends IXmlStreamWriter {\r\n\tvoid ignoreCurrentEndTag();\r\n}",
"void insertTagContent(TemplateTag tag){\r\n \t\tif(tag.found){\r\n \t\t\ttemplateParts.set(tag.templatePosition,tag.getContent());\r\n \t\t}\r\n \t}",
"public String group() { return group; }",
"private static String removeVisibleHTMLTags(String str) {\n str = stripLineBreaks(str);\n StringBuffer result = new StringBuffer(str);\n StringBuffer lcresult = new StringBuffer(str.toLowerCase());\n \n // <img should take care of smileys\n String[] visibleTags = {\"<img\"}; // are there others to add?\n int stringIndex;\n for ( int j = 0 ; j < visibleTags.length ; j++ ) {\n while ( (stringIndex = lcresult.indexOf(visibleTags[j])) != -1 ) {\n if ( visibleTags[j].endsWith(\">\") ) {\n result.delete(stringIndex, stringIndex+visibleTags[j].length() );\n lcresult.delete(stringIndex, stringIndex+visibleTags[j].length() );\n } else {\n // need to delete everything up until next closing '>', for <img for instance\n int endIndex = result.indexOf(\">\", stringIndex);\n if (endIndex > -1) {\n // only delete it if we find the end! If we don't the HTML may be messed up, but we\n // can't safely delete anything.\n result.delete(stringIndex, endIndex + 1 );\n lcresult.delete(stringIndex, endIndex + 1 );\n }\n }\n }\n }\n \n // TODO: This code is buggy by nature. It doesn't deal with nesting of tags properly.\n // remove certain elements with open & close tags\n String[] openCloseTags = {\"li\", \"a\", \"div\", \"h1\", \"h2\", \"h3\", \"h4\"}; // more ?\n for (int j = 0; j < openCloseTags.length; j++) {\n // could this be better done with a regular expression?\n String closeTag = \"</\"+openCloseTags[j]+\">\";\n int lastStringIndex = 0;\n while ( (stringIndex = lcresult.indexOf( \"<\"+openCloseTags[j], lastStringIndex)) > -1) {\n lastStringIndex = stringIndex;\n // Try to find the matching closing tag (ignores possible nesting!)\n int endIndex = lcresult.indexOf(closeTag, stringIndex);\n if (endIndex > -1) {\n // If we found it delete it.\n result.delete(stringIndex, endIndex+closeTag.length());\n lcresult.delete(stringIndex, endIndex+closeTag.length());\n } else {\n // Try to see if it is a self-closed empty content tag, i.e. closed with />.\n endIndex = lcresult.indexOf(\">\", stringIndex);\n int nextStart = lcresult.indexOf(\"<\", stringIndex+1);\n if (endIndex > stringIndex && lcresult.charAt(endIndex-1) == '/' && (endIndex < nextStart || nextStart == -1)) {\n // Looks like it, so remove it.\n result.delete(stringIndex, endIndex + 1);\n lcresult.delete(stringIndex, endIndex + 1);\n \n }\n }\n }\n }\n \n return result.toString();\n }",
"default HtmlFormatter wrapWith(String left, String right) {\n return andThen(s -> String.join(\n \"\",\n left,\n s,\n right\n ));\n }",
"public void addMatchedElement(ElementWrapper element)\n\t{\n\t\tif (element != null)\n\t\t{\n\t\t\t_matchedElements.add(element);\n\t\t\t_isMatched = true;\n\t\t}\n\t}",
"HTML createHTML();",
"private static String closeSpans() {\n\t\tString ret = \"\";\r\n\t\tfor (int i = 0; i < numCloseSpans; i++) {\r\n\t\t\tret += \"</span>\";\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"public T caseGroup(Group object) {\n\t\treturn null;\n\t}",
"private static String adaptRegEx(Mode mode, String regex, int flagMask, boolean removeWhitespace)\n throws QueryException {\n StringBuilder sb = new StringBuilder();\n boolean escaped = false;\n boolean groupStart = false;\n int completeGroups = 0;\n int backRef = 0;\n int charClassDepth = 0;\n int groupDepth = 0;\n\n for (char c : regex.toCharArray()) {\n if (escaped) {\n if (backRef == 0 && c == '0') {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Reference to group 0 not allowed\");\n } else if (c >= '0' && c <= '9') {\n if (charClassDepth > 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Back references in character class expressions\" + \" are disallowed.\");\n }\n backRef = backRef * 10 + Integer.parseInt(Character.toString(c));\n continue;\n }\n }\n\n if (backRef > 0) {\n // Check back reference that just ended\n if (backRef > completeGroups) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Back reference to nonexisting or unfinished group.\");\n } else {\n backRef = 0;\n escaped = false;\n }\n }\n\n if (c == '\\\\' && !escaped) {\n // Not preceded by backslash\n escaped = true;\n groupStart = false;\n continue;\n }\n\n if (c == '(' && !escaped) {\n groupStart = true;\n groupDepth++;\n escaped = false;\n continue;\n }\n\n if (c == '?' && !escaped && groupStart) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Pure groups are not supported in XQuery regular expressions.\");\n } else if (c == ')' && !escaped) {\n if (--groupDepth < 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Invalid sequence of brackets.\");\n }\n completeGroups++;\n } else if (c == '[' && !escaped) {\n charClassDepth++;\n } else if (c == ']' && !escaped) {\n if (--charClassDepth < 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Invalid sequence of brackets.\");\n }\n } else if (removeWhitespace) {\n // Remove whitespace outside of character classes\n if (charClassDepth == 0 && WHITESPACE.contains(c)) {\n // Don't touch boolean flags\n continue;\n }\n\n sb.append(c);\n }\n\n groupStart = false;\n escaped = false;\n }\n\n // Check for trailing '\\' (only valid with subsequent characters)\n if (escaped && backRef == 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Trailing backslash character in pattern.\");\n }\n\n // Check back reference if that was last token in pattern\n if (backRef > 0 && backRef > completeGroups) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION,\n \"Back reference to nonexisting or unfinished group.\");\n }\n\n // Check for dangling brackets\n if (charClassDepth != 0 || groupDepth != 0) {\n throw new QueryException(ErrorCode.ERR_INVALID_REGULAR_EXPRESSION, \"Pattern contains dangling brackets.\");\n }\n\n if (!removeWhitespace) {\n sb.append(regex);\n }\n\n if (mode == Mode.MATCH) {\n // Adapt for XQuery substring matching by extending pattern\n if (sb.charAt(0) != '^' || ((flagMask & Pattern.MULTILINE) == Pattern.MULTILINE)) {\n if ((flagMask & Pattern.DOTALL) == Pattern.DOTALL) {\n sb.insert(0, \".*\");\n } else {\n sb.insert(0, \"(?s:.*)\");\n }\n }\n\n if (sb.charAt(sb.length() - 1) != '$' || ((flagMask & Pattern.MULTILINE) == Pattern.MULTILINE)) {\n if ((flagMask & Pattern.DOTALL) == Pattern.DOTALL) {\n sb.append(\".*\");\n } else {\n sb.append(\"(?s:.*)\");\n }\n }\n }\n\n return sb.toString();\n }",
"public String buildTagRegex(String tagId, boolean isRegex) {\n String quotedKeysepartor = Pattern.quote(keySeparator);\n String quotedStartEndTagMarker = Pattern.quote(startEndTagMarker);\n String searchRegex = isRegex ? tagId : Pattern.quote(tagId);\n return Pattern.quote(startTag) + \"-?(\" + quotedStartEndTagMarker + \")?\" + quotedKeysepartor + searchRegex + quotedKeysepartor + \"(\"\n + quotedStartEndTagMarker + \")?(\" + Pattern.quote(cleanupMarker) + \")?\" + Pattern.quote(endTag);\n }",
"public final void output(FastStringBuffer buf) {\n switch (containsNonBmp) {\n case NONE:\n if (containsBmp == NONE) {\n buf.append(NOT_ALLOWED_CLASS);\n } else {\n outputBmp(buf);\n }\n break;\n case ALL:\n buf.append(\"(?:\");\n if (containsBmp == NONE) {\n buf.append(SURROGATES1_CLASS);\n buf.append(SURROGATES2_CLASS);\n } else {\n outputBmp(buf);\n buf.append(SURROGATES2_CLASS);\n buf.append('?');\n }\n buf.append(')');\n break;\n case SOME:\n buf.append(\"(?:\");\n boolean needSep = false;\n if (containsBmp != NONE) {\n needSep = true;\n outputBmp(buf);\n }\n List ranges = new ArrayList(10);\n addNonBmpRanges(ranges);\n sortRangeList(ranges);\n String hi = highSurrogateRanges(ranges);\n if (hi.length() > 0) {\n if (needSep) {\n buf.append('|');\n } else {\n needSep = true;\n }\n buf.append('[');\n for (int i = 0, len = hi.length(); i < len; i += 2) {\n char min = hi.charAt(i);\n char max = hi.charAt(i + 1);\n if (min == max) {\n buf.append(min);\n } else {\n buf.append(min);\n buf.append('-');\n buf.append(max);\n }\n }\n buf.append(']');\n buf.append(SURROGATES2_CLASS);\n }\n String lo = lowSurrogateRanges(ranges);\n for (int i = 0, len = lo.length(); i < len; i += 3) {\n if (needSep) {\n buf.append('|');\n } else {\n needSep = true;\n }\n buf.append(lo.charAt(i));\n char min = lo.charAt(i + 1);\n char max = lo.charAt(i + 2);\n if (min == max && (i + 3 >= len || lo.charAt(i + 3) != lo.charAt(i))) {\n buf.append(min);\n } else {\n buf.append('[');\n for (; ;) {\n if (min == max) {\n buf.append(min);\n } else {\n buf.append(min);\n buf.append('-');\n buf.append(max);\n }\n if (i + 3 >= len || lo.charAt(i + 3) != lo.charAt(i)) {\n break;\n }\n i += 3;\n min = lo.charAt(i + 1);\n max = lo.charAt(i + 2);\n }\n buf.append(']');\n }\n }\n if (!needSep) {\n buf.append(NOT_ALLOWED_CLASS);\n }\n buf.append(')');\n break;\n }\n }",
"java.lang.String getGroup();",
"@Test\n\tpublic void testToWrappedHTML_MultipleNewlines_NoLimit() {\n\t\tString s = \"Wrap\\n\\nhere\\n\\n\\n\";\n\t\tString html = HTMLUtilities.toWrappedHTML(s, 0);\n\t\tassertEquals(HTML + \"Wrap<BR>\\n<BR>\\nhere<BR>\\n<BR>\\n<BR>\\n\", html);\n\t}",
"@Override\n\tpublic void visit(Matches arg0) {\n\t\t\n\t}",
"private void replaceWithHTML (int tagType, int numberOfChars) {\n\n lineDelete (ix [tagType], numberOfChars);\n lineInsert (ix [tagType], \"<\" + html [tagType] + \">\");\n if (numberOfChars > 1) {\n textIndex--;\n }\n lineDelete (numberOfChars);\n lineInsert (\"</\" + html [tagType] + \">\");\n resetLineIndex (tagType);\n }",
"public String apply(TregexMatcher tregexMatcher)\n/* */ {\n/* 275 */ return this.result;\n/* */ }",
"private ChunkWrapper getWrapper(Chunk chunk) {\n String c = chunkToString(chunk);\n ChunkWrapper wrapper = chunks.get(c);\n return wrapper;\n }",
"@Override\n\tpublic void visit(Matches arg0) {\n\n\t}",
"public String htmlParsing(boolean isImgAltTag, String[] denyId, String[] denyClass, boolean onlyHead) throws Exception {\r\n HTMLBlock block = parse();\r\n\r\n boolean isAppend = true, isDenyClass = false;\r\n String tagType;\r\n String startTag = \"\";\r\n ArrayList htmlList = new ArrayList();\r\n \r\n while(block.hasMoreTokens()) {\r\n Token token = block.nextToken();\r\n\r\n if(token.getTag() != null && token.getType() != Token.TEXT) {\r\n tagType = token.getTag().getLowerCaseType();\r\n \r\n String className = token.getTag().getAttributeValue(\"class\");\r\n for(int i=0; className != null && denyClass != null && i < denyClass.length; i++) {\r\n if(denyClass[i].equals(className)) {\r\n isAppend = false;\r\n isDenyClass = true;\r\n startTag = token.getTag().getLowerCaseType();\r\n break;\r\n }\r\n }\r\n\r\n if(tagType.equals(\"div\")) {\r\n String id = token.getTag().getAttributeValue(\"id\");\r\n for(int i=0; denyId != null && i < denyId.length; i++) {\r\n if(denyId[i].equals(id)) {\r\n isAppend = false;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if(tagType.equals(\"/div\")) {\r\n isAppend = true;\r\n }\r\n if(isDenyClass && token.getTag().getLowerCaseType().equals(\"/\"+startTag)) {\r\n isDenyClass = false;\r\n isAppend = true;\r\n startTag = \"\";\r\n }\r\n }\r\n\r\n if(isAppend) {\r\n htmlList.add(token);\r\n }\r\n }\r\n\r\n StringBuffer res = new StringBuffer();\r\n \r\n if(onlyHead) {\r\n \tint bodyIndex = 0;\r\n \t\r\n \tfor(int i=0; i<htmlList.size(); i++) {\r\n \t\tToken t = (Token) htmlList.get(i);\r\n \t\t\r\n \t\tif(t.getTag() != null && t.getTag().getLowerCaseType().equals(\"body\")) {\r\n \t\t\tbodyIndex = i;\r\n \t\t\t\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \t\r\n \twhile(true) {\r\n \t\tToken t = (Token) htmlList.get(bodyIndex);\r\n \t\t\r\n \t\tString strHtml = t.toString();\r\n \t\t\tstrHtml = strHtml.replace('\\t',' ');\r\n strHtml = strHtml.replace('\\r',' ');\r\n strHtml = strHtml.replace('\\n',' ');\r\n strHtml = strHtml.trim();\r\n \t\t\t\r\n \t\t\tres.append(strHtml);\r\n \t\t\t\r\n \t\t\tif(t.getTag() != null && t.getTag().getLowerCaseType().equals(\"/body\")) {\r\n \t\t\t\tbreak;\r\n \t\t\t} else {\r\n \t\t\t\tbodyIndex++;\r\n \t\t\t}\r\n \t}\r\n \t/*\r\n \t if(t.getTag().getLowerCaseType().equals(\"body\") && onlyHead) {\r\n \t\tfor(int idx=i; idx < htmlList.size(); idx++) {\r\n \t\t\tt = (Token) htmlList.get(idx);\r\n \t\t\t\r\n \t\t\tString strHtml = t.toString();\r\n \t\t\tstrHtml = strHtml.replace('\\t',' ');\r\n strHtml = strHtml.replace('\\r',' ');\r\n strHtml = strHtml.replace('\\n',' ');\r\n strHtml = strHtml.trim();\r\n \t\t\t\r\n \t\t\tres.append(strHtml);\r\n \t\t\t\r\n \t\t\tif(t.getTag() != null && t.getTag().getLowerCaseType().equals(\"/body\"))\r\n \t\t\t\tbreak;\r\n \t\t}\r\n \t\tbreak;\r\n \t}\r\n \t */\r\n } else {\r\n \tfor (int i=0 ; i < htmlList.size(); i++) {\r\n Token t = (Token) htmlList.get(i);\r\n //파싱된 데이터가 text이면 ...\r\n if(t.getType() == STRING) {\r\n String strHtml = t.getText();\r\n //strHtml = convertFormattedTextToPlaintext(strHtml);\r\n strHtml = strHtml.replace('\\t',' ');\r\n strHtml = strHtml.replace('\\r',' ');\r\n strHtml = strHtml.replace('\\n',' ');\r\n strHtml = StringUtil.trimDuplecateSpace(strHtml);\r\n strHtml = addSpace(strHtml);\r\n res.append(strHtml);\r\n } else if(t.getType() == Token.TAG) {\r\n if(isImgAltTag && (t.getTag().getLowerCaseType().equals(\"img\") || t.getTag().getLowerCaseType().equals(\"area\"))) {\r\n if(t.getTag().getAttributeValue(\"alt\") != null) {\r\n res.append(t.getTag().getAttributeValue(\"alt\"));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n \r\n return res.toString();\r\n }",
"static Extractor byRegex(Pattern pattern) {\n\t\t\treturn Splitter.regexGroupExtractor(pattern);\n\t\t}",
"public static <T extends ParserRuleContext> T getSurrounding(ParseTree current, Class<T> search) {\n\t\tif (current == null) {\n\t\t\tthrow new IllegalArgumentException(\"Null\");\n\t\t}\n\t\tif (search.isInstance(current)) {\n\t\t\treturn search.cast(current);\n\t\t}\n\t\treturn getSurrounding(current.getParent(), search);\n\t}",
"public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n Pattern pattern = Pattern.compile(\"<a\\\\s+(href=[^>]+)>([^<]+)<\\\\/a>\");\n\n StringBuilder sb = new StringBuilder();\n String currentLine = reader.readLine();\n\n while (!\"END\".equals(currentLine)) {\n sb.append(currentLine).append(System.getProperty(\"line.separator\"));\n currentLine = reader.readLine();\n }\n\n Matcher matcher = pattern.matcher(sb);\n\n while (matcher.find()) {\n // group 1 = <a da stane => [URL\n // group 3 = > da stane => ]\n // group 5 = </a> da stane => [/URL]\n\n int startIndex = matcher.start();\n int endIndex = matcher.end();\n\n String replacedTag = \"[URL \" + matcher.group(1) + \"]\" + matcher.group(2) + \"[/URL]\";\n sb.replace(startIndex, endIndex, replacedTag);\n matcher = pattern.matcher(sb);\n\n }\n\n\n\n\n System.out.println(sb);\n\n\n }",
"public void writeToHTML(Match match) {\n ArrayList<String> template = new ArrayList<>();\n ArrayList<String> html = new ArrayList<>();\n ArrayList<Player> roster = new ArrayList<>();\n roster.addAll(match.getRoster().getAllPlayers());\n \n Scanner read = null;\n String fileTemplate = \"template.html\";\n String filePrint = match.getDate().toStringShort() \n + \"_\" + match.getOpponent() + \".html\";\n \n try {\n FileInputStream fileIn = new FileInputStream(fileTemplate);\n read = new Scanner(fileIn);\n }\n catch(FileNotFoundException e) {\n displayErrorMessage(\"File not found\", filePrint);\n }\n while(read.hasNext()) {\n template.add(read.nextLine());\n }\n read.close();\n \n String line = \"\";\n \n for(int i=0; i<template.size(); i++) {\n line = template.get(i);\n \n // Check match for null values\n String date, opponent, start, location, type;\n if(match.getDate().toStringShort().equals(\"0-00-00\")) {\n date = \"\"; \n } else {\n date = match.getDate().toStringShort();\n }\n if(match.getOpponent() == null) {\n opponent = \"\";\n } else {\n opponent = match.getOpponent();\n }\n if(match.getDate().toStringTime().equals(\"00:00\")) {\n start = \"\";\n } else {\n start = match.getDate().toStringTime();\n }\n if(match.getLocation() == null) {\n location = \"\";\n } else {\n location = match.getLocation();\n }\n if(match.getMatchType() == MatchType.none) {\n type = \"\";\n } else {\n type = match.getMatchType().toString();\n }\n \n // Replace values\n if(line.contains(\"$match\")) {\n line = line.replace(\"$match\",\n date + \" - \" + opponent);\n html.add(line);\n } else if(line.contains(\"$start\")) {\n line = line.replace(\"$start\", start);\n html.add(line);\n } else if(line.contains(\"$location\")) {\n line = line.replace(\"$location\", location);\n html.add(line);\n } else if(line.contains(\"$type\")) {\n line = line.replace(\"$type\", type);\n html.add(line);\n } else if(line.contains(\"$number\")) {\n \n // Replace values for each player\n for(int j=0; j<roster.size(); j++) {\n String temp = line;\n Player player = roster.get(j);\n String number, firstName=null, lastName, name=\"\", position;\n \n // Check player for null values\n if(player.getNumber() < 0) {\n number = \"\";\n } else {\n number = Integer.toString(player.getNumber());\n }\n if(player.getLastname() == null) {\n lastName = \"\"; \n } else {\n lastName = player.getLastname();\n name += lastName;\n }\n if(player.getFirstname() == null) {\n firstName = \"\";\n } else {\n firstName = String.valueOf(player.getFirstname().charAt(0));\n if(!(lastName.equals(\"\"))) {\n name += \", \";\n }\n name += firstName + \".\";\n }\n if(player.getPreferredPosition() == PositionType.none) {\n position = \"\";\n } else {\n position = player.getPreferredPosition().toString();\n }\n \n // Replace values in temp line\n temp = temp.replace(\"$number\", number);\n temp = temp.replace(\"$name\", name);\n temp = temp.replace(\"$position\",position);\n \n html.add(temp);\n } \n } else {\n html.add(line);\n }\n }\n PrintWriter write = null;\n try {\n FileOutputStream fileOut = new FileOutputStream(filePrint);\n write = new PrintWriter(fileOut);\n \n for(int i=0; i < html.size(); i++) {\n write.println(html.get(i));\n }\n }\n catch(FileNotFoundException e)\n {\n displayErrorMessage(\"File not found\", filePrint);\n }\n write.close();\n \n Alert printAlert = new Alert(Alert.AlertType.INFORMATION, filePrint + \" is ready for printing\", ButtonType.OK);\n printAlert.setTitle(\"Print Information\");\n printAlert.setHeaderText(null);\n printAlert.showAndWait();\n if(printAlert.getResult() == ButtonType.OK);\n }",
"public String getCellHTML(String groupName, int id) {\n\r\n List<String> examples = phraseExamplesMap.get(id);\r\n String phrase = wordListMap.get(id);\r\n String htmlExs = \"\";\r\n for (String ex : examples) {\r\n htmlExs += \"...\" + ex + \"...<br/>\";\r\n }\r\n htmlExs = htmlExs.substring(0, htmlExs.length() - 5);\r\n return \"<span><span class=\" + groupName + \" id=\" + id + \">\" + phrase + \"</span><div class=ex>\" + htmlExs + \"</div></span>\";\r\n }",
"public String parseHTML(String html) {\n\n int endIndex;\n for (int startIndex = html.indexOf(\"<figure\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<figure\")) {\n endIndex = html.indexOf(\"figure>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 7);\n html = html.replace(sub, \"\");\n }\n\n for (int startIndex = html.indexOf(\"<span class=\\\"editsection\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<span class=\\\"editsection\")) {\n endIndex = html.indexOf(\"span>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 5);\n html = html.replace(sub, \"\");\n }\n\n for (int startIndex = html.indexOf(\"<img\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<img\")) {\n endIndex = html.indexOf(\"img>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 5);\n html = html.replace(sub, \"\");\n }\n\n return html;\n }",
"interface Group\n{\n\n public abstract LabelMap getElements(Context context)\n throws Exception;\n\n public abstract Label getLabel(Class class1);\n\n public abstract boolean isInline();\n}",
"private void movePositionToEndOfTag(String tag) throws ParseException {\n String closing = \"</\" + tag + \">\";\n position = html.indexOf(closing, position);\n if (position == -1) {\n throw new ParseException(\"Cannot skip tag because closing \" + tag + \" doesnt exist.\", position);\n }\n position += closing.length();\n }",
"public static void replaceAll0(){\n System.out.println(\">>>>>>>>>>>>\");\n String class0 = \"this is an example\";\n String ret0 = class0.replaceAll(\"is\", \"IS\");\n assert(ret0.equals(\"thIS IS an example\"));\n System.out.println(ret0);\n }",
"public String wrapStatement(String statement);",
"public interface Parser<T> {\n T parse(String source) throws JAXBException;\n\n\n List<String> groupContent(String content);\n\n}",
"public final void rule__XSetLiteral__Group_3_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:9063:1: ( rule__XSetLiteral__Group_3_1__1__Impl )\r\n // InternalDroneScript.g:9064:2: rule__XSetLiteral__Group_3_1__1__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__XSetLiteral__Group_3_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"private Content getTreeForClassHelper(Type type) {\n Content li = new HtmlTree(HtmlTag.LI);\n if (type.equals(classDoc)) {\n Content typeParameters = getTypeParameterLinks(\n new LinkInfoImpl(configuration, LinkInfoImpl.Kind.TREE,\n classDoc));\n if (configuration.shouldExcludeQualifier(\n classDoc.containingPackage().name())) {\n li.addContent(type.asClassDoc().name());\n li.addContent(typeParameters);\n } else {\n li.addContent(type.asClassDoc().qualifiedName());\n li.addContent(typeParameters);\n }\n } else {\n Content link = getLink(new LinkInfoImpl(configuration,\n LinkInfoImpl.Kind.CLASS_TREE_PARENT, type)\n .label(configuration.getClassName(type.asClassDoc())));\n li.addContent(link);\n }\n return li;\n }",
"public default T unwrap( Tagged<T> obj ){ return obj.unwrap(); }",
"String getReplaced();",
"public List<String> getMTFromParentTag(String tag) {\n\t\tString modifier = \"\";\n\t\tString newTag = \"\";\n\n\t\tPattern p = Pattern.compile(\"^\\\\[(\\\\w+)\\\\s+(\\\\w+)\\\\]$\");\n\t\tMatcher m = p.matcher(tag);\n\t\tif (m.lookingAt()) {\n\t\t\tmodifier = m.group(1);\n\t\t\tnewTag = m.group(2);\n\t\t} else {\n\t\t\tp = Pattern.compile(\"^(\\\\w+)\\\\s+(\\\\w+)$\");\n\t\t\tm = p.matcher(tag);\n\t\t\tif (m.lookingAt()) {\n\t\t\t\tmodifier = m.group(1);\n\t\t\t\tnewTag = m.group(2);\n\t\t\t}\n\n\t\t}\n\t\tList<String> pair = new ArrayList<String>();\n\t\tpair.add(modifier);\n\t\tpair.add(newTag);\n\n\t\treturn pair;\n\t}",
"@org.junit.Test\n public static final void testSgmlShortTags() {\n junit.framework.TestCase.assertEquals(\"<p></p>\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testSgmlShortTags()|0\", org.owasp.html.HtmlSanitizerTest.sanitize(\"<p/b/\")));// Short-tag discarded.\n\n junit.framework.TestCase.assertEquals(\"<p></p>\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testSgmlShortTags()|1\", org.owasp.html.HtmlSanitizerTest.sanitize(\"<p<b>\")));// Discard <b attribute\n\n // This behavior for short tags is not ideal, but it is safe.\n junit.framework.TestCase.assertEquals(\"<p href=\\\"/\\\">first part of the text</> second part</p>\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testSgmlShortTags()|2\", org.owasp.html.HtmlSanitizerTest.sanitize(\"<p<a href=\\\"/\\\">first part of the text</> second part\")));\n }",
"public static String highlightMatchedStrIfFound(String qry, String target, String selector, String cssClass) {\n\n\t\tString kw = \"\";\n\n\t\ttry {\n\t\t\tkw = URLDecoder.decode(qry, \"UTF-8\");\n\t\t\t//System.out.println(\"kw decoded: \"+ kw);\n\t\t}\n\t\tcatch( Exception e){\n\t\t\tSystem.out.println(\"Failed to decode \" + qry);\n\t\t}\n\n\t\tif ( qry.equals(\"*:*\") ) {\n\t\t\treturn target;\n\t\t}\n\t\telse if ( kw.startsWith(\"\\\"\") && kw.endsWith(\"\\\"\") ) {\n\t\t\t// exact phrase search - with double quotes\n\t\t\tkw = kw.replace(\"\\\"\", \"\")\n\t\t\t\t .replace(\"(\", \"\\\\(\")\n\t\t\t\t .replace(\")\", \"\\\\)\");\n\t\t}\n//\t\telse {\n//\t\t\t// non phrase search - split string into words and search using OR\n//\t\t\t// very loose match not using boundry: ie, matches anywhere in string -> less specificity\n//\n//\t\t\tStringBuffer patBuff = new StringBuffer();\n//\t\t\tint count = 0;\n//\t\t\tfor ( String s : kw.split(\" |,\") ){\n//\t\t\t\tcount++;\n//\t\t\t\tif ( count != kw.split(\" \").length ){\n//\t\t\t\t\tpatBuff.append(s+\"|\");\n//\t\t\t\t}\n//\t\t\t\telse {\n//\t\t\t\t\tpatBuff.append(s);\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tkw = patBuff.toString();\n//\t\t}\n\n\t\tkw = kw.replace(\"*\",\"\")\n\t\t\t\t.replace(\"+\", \"\\\\+\");\n\n\t\t//working pattern: vang\\-like|2|\\\\(van|gogh,|Drosophila\\\\)\n\n\t\t// (?im) at the beginning of the regex turns on CASE_INSENSITIVE and MULTILINE modes.\n\t\t// $0 in the replacement string is a placeholder whatever the regex matched in this iteration.\n\t\ttarget = target.replaceAll(\"<(.+)>\", \"<sup>$1</sup>\");\n\n\t\tString result = target.replaceAll(\"(?im)\"+kw, \"<\" + selector + \" class='\" + cssClass + \"'>$0\" + \"</\" + selector + \">\");\n\t\treturn result;\n\t}",
"private void collapse(StringBuffer result, String text) {\n \n }",
"public interface ContentInliner {\n\n /**\n * Get Regexp Pattern for match format string\n *\n * @return Pattern\n */\n Pattern getTagPattern();\n\n /**\n * Inline content to xlsx template\n */\n void inlineToXlsx(SpreadsheetMLPackage pkg, WorksheetPart worksheetPart, Cell newCell, Object paramValue, Matcher matcher);\n\n /**\n * Inline content into doc template\n */\n void inlineToDoc(OfficeComponent officeComponent, XTextRange textRange, XText destination, Object paramValue, Matcher paramsMatcher)\n throws Exception;\n\n /**\n * Inline content into docx template\n */\n void inlineToDocx(WordprocessingMLPackage wordPackage, Text destination, Object paramValue, Matcher paramsMatcher);\n\n /**\n * Inline content into xls template\n */\n void inlineToXls(HSSFPatriarch patriarch, HSSFCell destination, Object paramValue, Matcher paramsMatcher);\n}",
"public TemplateGroupSignature saveGroupSingTemplate(Template template, TemplateGroupSignature group)\n\t{\n\t\tTemplateGroupSignatureDAO dao = new TemplateGroupSignatureDAO();\n\t\tgroup = dao.saveNew(group);\t\n\t\treturn group; \n\t}",
"public final void rule__XSetLiteral__Group_3__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:9009:1: ( rule__XSetLiteral__Group_3__1__Impl )\r\n // InternalDroneScript.g:9010:2: rule__XSetLiteral__Group_3__1__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__XSetLiteral__Group_3__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"protected void handleStart(HtmlDocument.Tag tag) {\n if (!tag.isSelfTerminating()) {\n // Add to the stack of tags needing closing tag\n mSeenTags.push(new TagWrapper(tag, mBuilder.length()));\n }\n }",
"public static String replaceBlock(String text, String token, String replacement)\n {\n String newText = \"\";\n String remainder = text;\n while(true){\n int index = remainder.indexOf(token);\n if(index < 0)\n break;\n // Determine indent level\n String left = remainder.substring(0,index);\n int newLineIndex = left.lastIndexOf(\"\\n\");\n int indent = index - newLineIndex - 1;\n String indented = hangingIndent(replacement,indent);\n String right = remainder.substring(index);\n String newRight = right.replaceFirst(token,indented);\n newText += left + newRight.substring(0,indented.length());\n remainder = newRight.substring(indented.length());\n remainder = remainder;\n }\n return newText + remainder;\n }",
"public void step2(String theHTML)\n {\n this.messageReceiver2.receiveMessage(targetKeyWords+\":initializing the pattern matcher.....\\n\");\n\t patternMatcher=new PatternMatcher();\n\t\tpatternMatcher.output=messageArea;\n//\t\tpatternMatcher.init(theHTML,\".:;<> !#$%&()=^+*/\\\"@[]{}\\n\\r\");\n\t\tpatternMatcher.init(theHTML);\n\t\tthis.tokens=patternMatcher.getTokens();\n\t\tint i;\n\t\tint l=patternMatcher.sequenceLength;\n//\t\tresultArea.setText(\"contents of this page was tokenized.\\n\");\n }",
"@Override\n\tpublic void visitXmatch(Xmatch p) {\n\n\t}",
"void replaceNext() {\n if (mte.getJtext().getSelectionStart() == mte.getJtext().getSelectionEnd()) {\n findNextWithSelection();\n return;\n }\n String searchText = findWhat.getText();\n String temp = mte.getJtext().getSelectedText(); //get selected text\n\n//check if the selected text matches the search text then do replacement\n if ((matchCase.isSelected() && temp.equals(searchText))\n || (!matchCase.isSelected() && temp.equalsIgnoreCase(searchText))) {\n mte.getJtext().replaceSelection(replaceWith.getText());\n }\n\n findNextWithSelection();\n }",
"@Test public void testFullyQualifiedTemplateRef2() throws Exception {\n String dir = getRandomDir();\n writeFile(dir, \"a.st\", \"a(x) ::= << </group/b()> >>\\n\");\n String groupFile =\n \"b() ::= \\\"bar\\\"\\n\"+\n \"c() ::= \\\"</a()>\\\"\\n\";\n writeFile(dir, \"group.stg\", groupFile);\n STGroup group = new STGroupDir(dir);\n ST st1 = group.getInstanceOf(\"/a\");\n ST st2 = group.getInstanceOf(\"/group/c\"); // invokes /a\n String expected = \" bar bar \";\n String result = st1.render()+st2.render();\n assertEquals(expected, result);\n }",
"public T caseTemplateTag(TemplateTag object) {\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"PMD.AvoidDuplicateLiterals\")\n public XML getFixedResult() {\n final List<String> packages = this.skeleton.xpath(\"//package/@id\");\n String finalres = \"\";\n if (this.tempres.toString().indexOf(\"<package\") > 6) {\n finalres = this.tempres.toString().substring(\n 0,\n this.tempres.toString().indexOf(\"<package\") - 6\n );\n }\n for (final String apackage : packages) {\n finalres = finalres.concat(\n String.format(\n \" <package id=\\\"%s\\\">\\n\",\n apackage\n )\n );\n final List<String> classes = this.skeleton.xpath(\n String.format(\n \"//package[@id ='%s']/class/@id\",\n apackage\n )\n );\n for (final String aclass : classes) {\n finalres = this.calc(aclass, finalres);\n }\n finalres = finalres.concat(\" </package>\\n\");\n }\n if (this.tempres.toString().indexOf(\"</app\") > 1) {\n finalres = finalres.concat(\n this.tempres.toString().substring(\n this.tempres.toString().indexOf(\"</app\")\n )\n );\n }\n return new XMLDocument(finalres);\n }",
"public static String expandMessage (String html)\n {\n // parse our segments from the raw HTML\n List<Segment> segs = parseSegments(html);\n\n // group box segments together\n List<Box> group = null;\n for (int ii = 0; ii < segs.size(); ii++) {\n Segment seg = segs.get(ii);\n if (!(seg instanceof Box)) { // we don't group non-box segments\n group = null; // end our accumulating group\n continue;\n }\n Box box = (Box)seg;\n if (group != null && group.get(0).size == box.size) {\n group.add(box);\n segs.remove(ii--);\n } else {\n group = Lists.newArrayList();\n group.add(box);\n segs.set(ii, new Group(group));\n }\n }\n\n // format the segments\n StringBuilder buf = new StringBuilder();\n for (Segment seg : segs) {\n seg.format(buf);\n }\n return buf.toString();\n }",
"public SpaceStrippedNode wrap(NodeInfo node) {\n return SpaceStrippedNode.makeWrapper(node, this, null);\n }",
"private void TokenAnythingElse(Token token,\r\n\t\t\tTreeConstructor treeConstructor, boolean reprocessToken) {\n\t\tnew StackUpdater().updateStack(\"html\", \"element\");\r\n\t\tParser.currentMode = InsertionMode.before_head;\r\n\t\tif (reprocessToken)\r\n\t\t\ttreeConstructor.processToken(token);\r\n\t}",
"private DocumentFragment selectFrom(Node n, Module mod) {\n DocumentFragment local_df = mod.getDoc().createDocumentFragment();\n if (isWanted(n)) {\n\n local_df.appendChild(mod.getDoc().importNode(n.cloneNode(true), true));\n if (local_df.getLastChild().getNodeName().compareToIgnoreCase(\"img\") == 0) {\n // we make this a default wxtimage or not \n //((Element)local_df.getLastChild()).setAttribute(\"class\",\"wxtimage\");\n }\n return local_df;\n }\n\n if (n.hasChildNodes()) {\n Node child = n.getFirstChild();\n while (child != null) {\n local_df.appendChild(selectFrom(child, mod));\n child = child.getNextSibling();\n }\n\n }\n return local_df;\n }",
"public T caseLatchedStatement(LatchedStatement object) {\n\t\treturn null;\n\t}",
"@Override\n protected void compileRegex(String regex) {\n }",
"public static Source wrap(Source incomplete, String withName, String withContent){\n\n final String content = withContent + incomplete.getContents() + END;\n\n final Source revised = from(incomplete, content);\n if(!revised.getName().equals(withName)){\n revised.setName(withName + \".java\");\n }\n\n return revised;\n }",
"public RegexNode ReduceRep()\n\t{\n\t\tRegexNode u;\n\t\tRegexNode child;\n\t\tint type;\n\t\tint min;\n\t\tint max;\n\n\t\tu = this;\n\t\ttype = Type();\n\t\tmin = _m;\n\t\tmax = _n;\n\n\t\tfor (;;)\n\t\t{\n\t\t\tif (u.ChildCount() == 0)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchild = u.Child(0);\n\n\t\t\t// multiply reps of the same type only\n\t\t\tif (child.Type() != type)\n\t\t\t{\n\t\t\t\tint childType = child.Type();\n\n\t\t\t\tif (!(childType >= Oneloop && childType <= Setloop && type == Loop || childType >= Onelazy && childType <= Setlazy && type == Lazyloop))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// child can be too lumpy to blur, e.g., (a {100,105}) {3} or (a {2,})?\n\t\t\t// [but things like (a {2,})+ are not too lumpy...]\n\t\t\tif (u._m == 0 && child._m > 1 || child._n < child._m * 2)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tu = child;\n\t\t\tif (u._m > 0)\n\t\t\t{\n\t\t\t\tu._m = min = ((Integer.MAX_VALUE - 1) / u._m < min) ? Integer.MAX_VALUE : u._m * min;\n\t\t\t}\n\t\t\tif (u._n > 0)\n\t\t\t{\n\t\t\t\tu._n = max = ((Integer.MAX_VALUE - 1) / u._n < max) ? Integer.MAX_VALUE : u._n * max;\n\t\t\t}\n\t\t}\n\n\t\treturn min == Integer.MAX_VALUE ? new RegexNode(Nothing, _options) : u;\n\t}",
"public String makeTags(String tag, String word) {\r\n return \"<\" + tag + \">\" + word + \"</\" + tag + \">\";\r\n }",
"SPAN createSPAN();",
"void startSequence(GroupSG group) throws SAXException;",
"void endSequence(GroupSG group) throws SAXException;",
"public String getNextMatchFromHTML(String strValue) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void visitTag(Tag tag){\n\t\t\n if (tag instanceof Div) { \n Div div = (Div) tag; \n String attr = div.getAttribute(\"class\"); //detailed_rig\n //System.out.println(\"attr:\" + attr);\n if(\"detailed_rig\".equals(attr)){ //小区div\n \t\n \t//System.out.println(\"=========================\"+div.toHtml());\n \tSpanVisitor sv = new SpanVisitor();\n \t//LinkVisitor lv = new LinkVisitor();\n \t//div.accept(lv);\n \t//link = lv.getLink();\n \tdiv.accept(sv);\n \tCommunity com = new Community(sv.getName(), sv.getLink()+\"esf/\", sv.getPrice());\n \tcommunityList.add(com);\n// \tSystem.out.println(\"name:\"+name +\" price:\"+price + \" link:\"+link);\n }\n if(\"fanye\".equals(attr)){\n \tNextPageVisitor np = new NextPageVisitor();\n \tdiv.accept(np);\n \tnextPageLink =np.getLink();\n \t//System.out.println(\"link:\" +np.getLink() );\n }\n //line = textnode.toPlainTextString().trim(); \n //line = textnode.getText(); \n } \t\t\n\t}",
"@Override\n public Iterator<String> iterator() {\n return Iterators.transform(super.iterator(), new Function<String, String>() {\n @Override\n public String apply(String input) {\n return input\n // last .* if exists becomes < (in-significant just a char)\n .replaceAll(\"\\\\.\\\\*\", \"<\")\n // all internal dot char become escaped.\n .replaceAll(\"\\\\.\", \"\\\\\\\\.\")\n // final .* if present (now as <) becomes .* to match any char.\n .replaceAll(\"<\", \"\\\\.\\\\*\");\n }\n });\n }",
"public void testBlogEntryHasTagsAndMediaIsHtml() throws Exception {\n Category category = new Category(\"/java\", \"Java\");\n category.setBlog(blog);\n category.setTags(\"java\");\n blogEntry.addCategory(category);\n blogEntry.setExcerpt(\"Excerpt - here is some text\");\n blogEntry.setBody(\"Body - here is some text\");\n blogEntry.setTags(\"junit, automated unit testing\");\n context.setMedia(ContentDecoratorContext.HTML_PAGE);\n decorator.decorate(context, blogEntry);\n\n StringBuffer tags = new StringBuffer();\n tags.append(\"<div class=\\\"tags\\\"><span>Technorati Tags : </span>\");\n tags.append(\"<a href=\\\"http://technorati.com/tag/automatedunittesting\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">automatedunittesting</a>, \");\n tags.append(\"<a href=\\\"http://technorati.com/tag/java\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">java</a>, \");\n tags.append(\"<a href=\\\"http://technorati.com/tag/junit\\\" target=\\\"_blank\\\" rel=\\\"tag\\\">junit</a>\");\n tags.append(\"</div>\");\n\n assertEquals(\"Excerpt - here is some text\" + tags, blogEntry.getExcerpt());\n assertEquals(\"Body - here is some text\" + tags, blogEntry.getBody());\n }"
] | [
"0.52316386",
"0.5097963",
"0.5004166",
"0.49573094",
"0.47689217",
"0.46867514",
"0.46574262",
"0.46001026",
"0.45247468",
"0.4507569",
"0.4454156",
"0.4436429",
"0.4418134",
"0.4365708",
"0.43482655",
"0.4333554",
"0.4256548",
"0.42508695",
"0.42443615",
"0.42441753",
"0.4212272",
"0.4211664",
"0.41971788",
"0.41970563",
"0.41912177",
"0.41799176",
"0.4177573",
"0.41713527",
"0.41693905",
"0.41540664",
"0.4152617",
"0.4149834",
"0.4133936",
"0.41313985",
"0.41305363",
"0.41212675",
"0.41196263",
"0.41170302",
"0.41158155",
"0.41105223",
"0.41092628",
"0.41002047",
"0.40898275",
"0.40863246",
"0.40838113",
"0.40832958",
"0.40820825",
"0.4080449",
"0.405955",
"0.4058297",
"0.4046923",
"0.40419188",
"0.40415272",
"0.40279725",
"0.40268806",
"0.40220147",
"0.4017387",
"0.40137482",
"0.39978984",
"0.39891863",
"0.3987751",
"0.3981704",
"0.3980079",
"0.3962749",
"0.3956046",
"0.39424276",
"0.39354998",
"0.3921324",
"0.3921139",
"0.39171815",
"0.3917122",
"0.39108825",
"0.38975424",
"0.38927412",
"0.38847813",
"0.38771492",
"0.3873403",
"0.38712475",
"0.38649055",
"0.38608536",
"0.38532364",
"0.38452995",
"0.38426468",
"0.3842398",
"0.38307145",
"0.38079503",
"0.38073438",
"0.3801997",
"0.3797846",
"0.37973884",
"0.37928063",
"0.37854347",
"0.37843502",
"0.3772837",
"0.37699333",
"0.37680957",
"0.37638998",
"0.37607428",
"0.3758958",
"0.3753926"
] | 0.66467774 | 0 |
transform tags content into several tags made of source tag's split content e.g. "tok1, tok2, tok3" > "tok1, tok2, tok3" | public static String splitTagContents(String source, String tagName, String splitRegex) {
String regexBody = String.format("<(?<tagDefinition>%s[^<>]*)>[^<>]+((?<delimiter>%s)[^<>]+)+</%1$s>",
tagName, splitRegex);
regexBody = Strings.getValidPatternOrFailAnyMatch(regexBody);
if (!source.matches(String.format(".*%s.*",regexBody))) return source;
String result = source;
Matcher matcher = Pattern.compile(String.format("(?<tagToSplit>%s)",regexBody)).matcher(source);
while (matcher.find()) {
String sourceTag = matcher.group("tagToSplit");
String sourceTagDefinition = matcher.group("tagDefinition");
String splitDelimiter = matcher.group("delimiter");
String taggedDelimiter = String.format("</%s>%s<%s>", tagName, splitDelimiter, sourceTagDefinition);
result = result.replace(sourceTag, sourceTag.replaceAll(splitDelimiter, taggedDelimiter));
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static List<XMLTag> processTags(String line, int index, int length) {\n List<XMLTag> tempTags = new ArrayList<>();\n\n XMLTag xmlTag = new XMLTag();\n String value = line;\n\n xmlTag.setLine(index + 1);\n\n if (hasTag(value)) {\n // has a tag\n while (hasTag(value) || hasString(value)) {\n xmlTag = new XMLTag();\n xmlTag.setLine(index + 1);\n\n int startTag = value.indexOf(\"<\");\n int endTag = value.indexOf(\">\");\n boolean order = endTag > startTag;\n\n if (hasStringBeforeTag(value, startTag)) {\n xmlTag.setTagType(7);\n xmlTag.setEndIndex(startTag + length + 1);\n xmlTag.setStartIndex(0 + length + 1);\n xmlTag.setValue(value.substring(0, startTag));\n value = value.substring(startTag);\n\n } else if (startTag != -1) {\n // has <\n if (endTag != -1) {\n // has < and > ==> can be 1, 2, 3, 8\n if (order) {\n if (value.substring(startTag + 1, startTag + 2).equals(\"/\")) {\n // 2\n xmlTag.setTagType(2);\n String[] values = value.substring(startTag + 2, endTag).split(\" \");\n xmlTag.setqName(values[0]);\n } else if (value.substring(endTag - 1, endTag).equals(\"/\")) {\n // 3\n xmlTag.setTagType(3);\n String[] qName = value.substring(startTag + 1).split(\"/| \");// **needs to be //?\n xmlTag.setqName(qName[0]);\n\n } else if (value.substring(startTag + 1, startTag + 2).equals(\"?\")) {\n // 8\n xmlTag.setTagType(8);\n } else if (value.substring(startTag + 1, startTag + 2).equals(\"!\")) {\n // 7 <![CDATA[ ]]>\n xmlTag.setTagType(7);\n } else {\n // 1\n xmlTag.setTagType(1);\n String[] values = (value.substring(startTag + 1, endTag)).split(\" \");\n xmlTag.setqName(values[0]);\n }\n\n xmlTag.setEndIndex(endTag + length + 1);\n xmlTag.setStartIndex(startTag + length + 1);\n xmlTag.setValue(value.substring(startTag, endTag + 1));\n value = value.substring(endTag + 1);\n\n } else {\n\n if (endTag > 0 && value.substring(endTag - 1, endTag).equals(\"/\")) {\n xmlTag.setTagType(5);\n\n } else {\n if (value.substring(endTag - 1, endTag).equals(\"?\")) {\n xmlTag.setTagType(8);\n } else if (value.substring(endTag - 1, endTag).equals(\"]\")) {\n // 7 ]]>\n xmlTag.setTagType(7);\n } else {\n xmlTag.setTagType(6);\n }\n }\n xmlTag.setValue(value.substring(0, endTag + 1));\n xmlTag.setEndIndex(endTag + length + 1);\n xmlTag.setStartIndex(-1);\n value = value.substring(endTag + 1);\n }\n\n } else {\n // has < ==> can be 4 || can be 8\n if (value.substring(startTag + 1, startTag + 2).equals(\"?\")) {\n xmlTag.setTagType(8);\n } else if (value.substring(startTag + 1, startTag + 2).equals(\"!\")) {\n // 7 <![CDATA[\n xmlTag.setTagType(7);\n } else {\n xmlTag.setTagType(4);\n String[] values = (value.substring(startTag + 1)).split(\" \");\n xmlTag.setqName(values[0]);\n }\n xmlTag.setValue(value);\n xmlTag.setEndIndex(-1);\n xmlTag.setStartIndex(startTag + length + 1);\n value = \"\";\n }\n } else {\n // no <\n if (endTag != -1) {\n // has > ==> can be 5, 6\n\n if (endTag > 0 && value.substring(endTag - 1, endTag).equals(\"/\")) {\n xmlTag.setTagType(5);\n\n } else {\n if (endTag > 0 && value.substring(endTag - 1, endTag).equals(\"?\")) {\n xmlTag.setTagType(8);\n } else if (endTag > 0 && value.substring(endTag - 1, endTag).equals(\"]\")) {\n // 7 ]]>\n xmlTag.setTagType(7);\n } else {\n xmlTag.setTagType(6);\n }\n }\n xmlTag.setValue(value.substring(0, endTag + 1));\n xmlTag.setEndIndex(endTag + length + 1);\n xmlTag.setStartIndex(-1);\n value = value.substring(endTag + 1);\n\n } else {\n // no tags ==> 7\n xmlTag.setValue(value);\n xmlTag.setTagType(7);\n xmlTag.setEndIndex(-1);\n xmlTag.setStartIndex(-1);\n value = \"\";\n\n }\n }\n\n xmlTagsQueue.add(xmlTag);\n tempTags.add(xmlTag);\n }\n } else {\n // whole line has no tags\n xmlTag.setValue(value);\n xmlTag.setTagType(7);\n xmlTag.setEndIndex(-1);\n xmlTag.setStartIndex(-1);\n\n xmlTagsQueue.add(xmlTag);\n tempTags.add(xmlTag);\n\n return tempTags;\n }\n\n return tempTags;\n }",
"public void flatten () {\n String tags2 = tags.toString();\n tags.delete (0, tags.length());\n int e2 = 0;\n int s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n while (s2 < tags2.length()) {\n e2 = indexOfNextSeparator (tags2, s2, true, true, slashToSeparate);\n merge (tags2.substring (s2, e2));\n s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n }\n }",
"public void merge (String inTags) {\n\n // Remove any rubbish and drop leading and trailing spaces\n String tags2 = StringUtils.purify(inTags).trim();\n if (tags2.equals(tags.toString())) {\n // No need to merge\n } else {\n // System.out.println (\"tags2 (purified) = \" + tags2);\n int e2 = 0;\n int s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n // System.out.println (\"initial s2 = \" + String.valueOf(s2));\n int wordEnd2 = e2;\n char sep = ' ';\n while (s2 < tags2.length()) {\n // Process next tag from input\n StringBuilder next2 = new StringBuilder();\n sep = ' ';\n while (s2 < tags2.length() && (! isTagSeparator (sep))) {\n // Process next level in text tag from input\n e2 = indexOfNextSeparator (tags2, s2, true, true, slashToSeparate);\n // System.out.println (\"e2 and wordend both = \" + String.valueOf(e2));\n wordEnd2 = e2;\n while (wordEnd2 > 0 && Character.isWhitespace (tags2.charAt(wordEnd2 - 1))) {\n wordEnd2--;\n }\n if (next2.length() > 0) {\n next2.append (PREFERRED_LEVEL_SEPARATOR);\n }\n next2.append (tags2.substring (s2, wordEnd2));\n // System.out.println (\"appending \" + String.valueOf(s2) + \"-\"\n // + String.valueOf(e2) + \" from \" + tags2);\n if (e2 < tags2.length()) {\n sep = tags2.charAt (e2);\n }\n s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n // System.out.println (\"s2 = \" + String.valueOf(s2));\n } // end while processing levels for next input tag\n\n // System.out.println (\"next2 = \" + next2.toString());\n\n // next2 now contains next tag from input string\n int s = indexOfNextWordStart (tags, 0, slashToSeparate);\n int e = 0;\n int compareResult = 1;\n while (s < tags.length() && (compareResult > 0)) {\n e = indexOfNextSeparator (tags, s, false, true, slashToSeparate);\n compareResult\n = (next2.toString().compareToIgnoreCase (tags.substring (s, e)));\n // System.out.println (\"s = \" + String.valueOf(s)\n // + \" e = \" + String.valueOf(e)\n // + \" compareResult = \" + String.valueOf(compareResult));\n if ((compareResult > 0) && (s < tags.length())) {\n s = indexOfNextWordStart (tags, e, slashToSeparate);\n }\n } // End while looking for a match or insertion point\n\n if (s >= tags.length()) {\n if (tags.length() > 0) {\n tags.append (PREFERRED_TAG_SEPARATOR);\n tags.append (' ');\n }\n tags.append (next2);\n // System.out.println (\"At end of tags, appending with result \"\n // + tags.toString());\n }\n else\n if (compareResult < 0) {\n tags.insert (s, next2);\n tags.insert (s + next2.length(), PREFERRED_TAG_SEPARATOR);\n tags.insert (s + next2.length() + 1, ' ');\n }\n s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n } // end while more tags from input\n }\n }",
"String convertTagsToWhitespaceSeparated(List<T> tags);",
"protected List<String> split(String pattern) {\n\t\tint p = 0;\n\t\tint n = pattern.length();\n\t\tList<String> chunks = new ArrayList<String>();\n\t\tStringBuffer buf = new StringBuffer();\n\t\t// find all start and stop indexes first, then collect\n\t\tList<Integer> starts = new ArrayList<Integer>();\n\t\tList<Integer> stops = new ArrayList<Integer>();\n\t\twhile ( p<n ) {\n\t\t\tif ( p == pattern.indexOf(escape+start,p) ) {\n\t\t\t\tp += escape.length() + start.length();\n\t\t\t}\n\t\t\telse if ( p == pattern.indexOf(escape+stop,p) ) {\n\t\t\t\tp += escape.length() + stop.length();\n\t\t\t}\n\t\t\telse if ( p == pattern.indexOf(start,p) ) {\n\t\t\t\tstarts.add(p);\n\t\t\t\tp += start.length();\n\t\t\t}\n\t\t\telse if ( p == pattern.indexOf(stop,p) ) {\n\t\t\t\tstops.add(p);\n\t\t\t\tp += stop.length();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tp++;\n\t\t\t}\n\t\t}\n\n//\t\tSystem.out.println(\"\");\n//\t\tSystem.out.println(starts);\n//\t\tSystem.out.println(stops);\n\t\tif ( starts.size() > stops.size() ) {\n\t\t\tthrow new IllegalArgumentException(\"unterminated tag in pattern: \"+pattern);\n\t\t}\n\n\t\tif ( starts.size() < stops.size() ) {\n\t\t\tthrow new IllegalArgumentException(\"missing start tag in pattern: \"+pattern);\n\t\t}\n\n\t\tint ntags = starts.size();\n\t\tfor (int i=0; i<ntags; i++) {\n\t\t\tif ( starts.get(i)>=stops.get(i) ) {\n\t\t\t\tthrow new IllegalArgumentException(\"tag delimiters out of order in pattern: \"+pattern);\n\t\t\t}\n\t\t}\n\n\t\t// collect into chunks now\n\t\tif ( ntags==0 ) {\n\t\t\tchunks.add(pattern.substring(0, n));\n\t\t}\n\n\t\tif ( ntags>0 && starts.get(0)>0 ) { // copy text up to first tag into chunks\n\t\t\tchunks.add(pattern.substring(0, starts.get(0)));\n\t\t}\n\t\tfor (int i=0; i<ntags; i++) {\n\t\t\t// copy inside of <tag>\n\t\t\tString tag = pattern.substring(starts.get(i) + start.length(), stops.get(i));\n\t\t\tchunks.add(tag);\n\t\t\tif ( i+1 < ntags ) {\n\t\t\t\t// copy from end of <tag> to start of next\n\t\t\t\tString text = pattern.substring(stops.get(i) + stop.length(), starts.get(i + 1));\n\t\t\t\tchunks.add(text);\n\t\t\t}\n\t\t}\n\t\tif ( ntags>0 ) {\n\t\t\tint endOfLastTag = stops.get(ntags - 1) + stop.length();\n\t\t\tif ( endOfLastTag < n-1 ) { // copy text from end of last tag to end\n\t\t\t\tString text = pattern.substring(endOfLastTag+stop.length(), n);\n\t\t\t\tchunks.add(text);\n\t\t\t}\n\t\t}\n\n\t\t// strip out the escape sequences\n\t\tfor (int i=0; i<chunks.size(); i++) {\n\t\t\tString chunk = chunks.get(i).replace(escape, \"\");\n\t\t\tchunks.set(i, chunk);\n\t\t}\n\n\t\treturn chunks;\n\t}",
"public ArrayList<Utterance> getSplittedUtts(){\n ArrayList<Utterance> result = new ArrayList<Utterance>();\n\n for(Utterance utt : utts){\n String content = utt.getContent().toLowerCase().trim();\n ArrayList<String> subSentences = sp.split(content);\n if(subSentences.size() > 3){\n result.add(utt);\n }\n else if(subSentences.size() > 1){ // sub sentences num : 2 - 3\n for(String s : subSentences){\n Utterance tmp = utt;\n tmp.setContent(s);\n result.add(tmp); // seperate them\n }\n }\n else{\n result.add(utt);\n }\n }\n return result;\n }",
"List<T> findWhitespaceSeparatedTagsAndCreateIfNotExists(String tags);",
"private static ArrayList<String> convertToTags(String name) {\n String[] tags = name.split(\"@\");\n ArrayList<String> currTags = new ArrayList<>(Arrays.asList(tags));\n currTags.remove(0);\n String lastOne = currTags.remove(currTags.size() - 1);\n lastOne = lastOne.substring(0, lastOne.lastIndexOf(\".\"));\n currTags.add(lastOne);\n return currTags;\n }",
"@NonNull\n private void splitHTMLIntoArrays() {\n String[] splitted = postBodyHTMLContent.split(Data.BR_MATCHER);\n\n // create List of array that can be modified using linkedList\n splittedPostComponent = new LinkedList<String>(Arrays.asList(splitted));\n }",
"public String getLinkedTags (String parent) {\n StringBuilder linkedTags = new StringBuilder();\n int i = 0;\n int s = getTagStart(i);\n while (s >= 0 && s < tags.length()) {\n if (i > 0) {\n linkedTags.append(\", \");\n }\n linkedTags.append(getLinkedTag (i, parent));\n i++;\n s = getTagStart(i); \n }\n return linkedTags.toString();\n }",
"abstract Node split();",
"abstract Node split();",
"public ArrayList<String> makeSentences(String text) {\n \t\t/*\n \t\t * Quick check so we're not trying to split up an empty\n \t\t * String. This only happens right before the user types\n \t\t * at the end of a document and we don't have anything to\n \t\t * split, so return.\n \t\t */\n \t\tif (text.equals(\"\")) {\n \t\t\tArrayList<String> sents = new ArrayList<String>();\n \t\t\tsents.add(\"\");\n \t\t\treturn sents;\n \t\t}\n \t\t\n \t\t/**\n \t\t * Because the eosTracker isn't initialized until the TaggedDocument is,\n \t\t * it won't be ready until near the end of DocumentProcessor, in which\n \t\t * case we want to set it to the correct\n \t\t */\n \t\tthis.eosTracker = main.editorDriver.taggedDoc.eosTracker;\n \t\tthis.editorDriver = main.editorDriver;\n \t\t\n \t\tArrayList<String> sents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tArrayList<String> finalSents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tboolean mergeNext = false;\n \t\tboolean mergeWithLast = false;\n \t\tboolean forceNoMerge = false;\n \t\tint currentStart = 1;\n \t\tint currentStop = 0;\n \t\tString temp;\n \n \t\t/**\n \t\t * replace unicode format characters that will ruin the regular\n \t\t * expressions (because non-printable characters in the document still\n \t\t * take up indices, but you won't know they're there untill you\n \t\t * \"arrow\" though the document and have to hit the same arrow twice to\n \t\t * move past a certain point. Note that we must use \"Cf\" rather than\n \t\t * \"C\". If we use \"C\" or \"Cc\" (which includes control characters), we\n \t\t * remove our newline characters and this screws up the document. \"Cf\"\n \t\t * is \"other, format\". \"Cc\" is \"other, control\". Using \"C\" will match\n \t\t * both of them.\n \t\t */\n \t\ttext = text.replaceAll(\"\\u201C\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\u201D\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\\\p{Cf}\",\"\");\n \n \t\tint lenText = text.length();\n \t\tint index = 0;\n \t\tint buffer = editorDriver.sentIndices[0];\n \t\tString safeString = \"\";\n \t\tMatcher abbreviationFinder = ABBREVIATIONS_PATTERN.matcher(text);\n \t\t\n \t\t//================ SEARCHING FOR ABBREVIATIONS ================\n \t\twhile (index < lenText-1 && abbreviationFinder.find(index)) {\n \t\t\tindex = abbreviationFinder.start();\n \t\t\t\n \t\t\ttry {\n \t\t\t\tint abbrevLength = index;\n \t\t\t\twhile (text.charAt(abbrevLength) != ' ') {\n \t\t\t\t\tabbrevLength--;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (ABBREVIATIONS.contains(text.substring(abbrevLength+1, index+1))) {\n \t\t\t\t\teosTracker.setIgnore(index+buffer, true);\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \t\t\t\n \t\t\tindex++;\n \t\t}\t\t\n \t\t\n \t\tMatcher sent = EOS_chars.matcher(text);\n \t\tboolean foundEOS = sent.find(currentStart); // xxx TODO xxx take this EOS character, and if not in quotes, swap it for a permanent replacement, and create and add an EOS to the calling TaggedDocument's eosTracker.\n \t\t\n \t\t/*\n \t\t * We want to check and make sure that the EOS character (if one was found) is not supposed to be ignored. If it is, we will act like we did not\n \t\t * find it. If there are multiple sentences with multiple EOS characters passed it will go through each to check, foundEOS will only be true if\n \t\t * an EOS exists in \"text\" that would normally be an EOS character and is not set to be ignored.\n \t\t */\n \t\t\n \t\tindex = 0;\n \t\tif (foundEOS) {\t\n \t\t\ttry {\n \t\t\t\twhile (index < lenText-1 && sent.find(index)) {\n \t\t\t\t\tindex = sent.start();\n \t\t\t\t\tif (!eosTracker.sentenceEndAtIndex(index+buffer)) {\n \t\t\t\t\t\tfoundEOS = false;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tfoundEOS = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tindex++;\n \t\t\t\t}\n \t\t\t} catch (IllegalStateException e) {}\n \t\t}\n \t\t//We need to reset the Matcher for the code below\n \t\tsent = EOS_chars.matcher(text);\n \t\tsent.find(currentStart);\n \t\t\n \t\tMatcher sentEnd;\n \t\tMatcher citationFinder;\n \t\tboolean hasCitation = false;\n \t\tint charNum = 0;\n \t\tint lenTemp = 0;\n \t\tint lastQuoteAt = 0;\n \t\tint lastParenAt = 0;\n \t\tboolean foundQuote = false;\n \t\tboolean foundParentheses = false;\n \t\tboolean isSentence;\n \t\tboolean foundAtLeastOneEOS = foundEOS;\n \t\t\n \t\t/**\n \t\t * Needed otherwise when the user has text like below:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two. This is the last sentence.\n \t\t * and they begin to delete the EOS character as such:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two This is the last sentence.\n \t\t * Everything gets screwed up. This is because the operations below operate as expected only when there actually is an EOS character\n \t\t * at the end of the text, it expects it there in order to function properly. Now usually if there is no EOS character at the end it wouldn't\n \t\t * matter since the while loop and !foundAtLeastOneEOS conditional are executed properly, BUT as you can see the quotes, or more notably the EOS character inside\n \t\t * the quotes, triggers this initial test and thus the operation breaks. This is here just to make sure that does not happen.\n \t\t */\n \t\tString trimmedText = text.trim();\n \t\tint trimmedTextLength = trimmedText.length();\n \n \t\t//We want to make sure that if there is an EOS character at the end that it is not supposed to be ignored\n \t\tboolean EOSAtSentenceEnd = true;\n \t\tif (trimmedTextLength != 0) {\n \t\t\tEOSAtSentenceEnd = EOS.contains(trimmedText.substring(trimmedTextLength-1, trimmedTextLength)) && eosTracker.sentenceEndAtIndex(editorDriver.sentIndices[1]-1);\n \t\t} else {\n \t\t\tEOSAtSentenceEnd = false;\n \t\t}\n \t\t\n \t\t//Needed so that if we are deleting abbreviations like \"Ph.D.\" this is not triggered.\n \t\tif (!EOSAtSentenceEnd && (editorDriver.taggedDoc.watchForEOS == -1))\n \t\t\tEOSAtSentenceEnd = true;\n \n \t\twhile (foundEOS == true) {\n \t\t\tcurrentStop = sent.end();\n \t\t\t\n \t\t\t//We want to make sure currentStop skips over ignored EOS characters and stops only when we hit a true EOS character\n \t\t\ttry {\n \t\t\t\twhile (!eosTracker.sentenceEndAtIndex(currentStop+buffer-1) && currentStop != lenText) {\n \t\t\t\t\tsent.find(currentStop+1);\n \t\t\t\t\tcurrentStop = sent.end();\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \n \t\t\ttemp = text.substring(currentStart-1,currentStop);\n \t\t\tlenTemp = temp.length();\n \t\t\tlastQuoteAt = 0;\n \t\t\tlastParenAt = 0;\n \t\t\tfoundQuote = false;\n \t\t\tfoundParentheses = false;\n \t\t\t\n \t\t\tfor(charNum = 0; charNum < lenTemp; charNum++){\n \t\t\t\tif (temp.charAt(charNum) == '\\\"') {\n \t\t\t\t\tlastQuoteAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundQuote == true)\n \t\t\t\t\t\tfoundQuote = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundQuote = true;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (temp.charAt(charNum) == '(') {\n \t\t\t\t\tlastParenAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundParentheses)\n \t\t\t\t\t\tfoundParentheses = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundParentheses = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundQuote == true && ((temp.indexOf(\"\\\"\",lastQuoteAt+1)) == -1)) { // then we found an EOS character that shouldn't split a sentence because it's within an open quote.\n \t\t\t\tif ((currentStop = text.indexOf(\"\\\"\",currentStart +lastQuoteAt+1)) == -1) {\n \t\t\t\t\tcurrentStop = text.length(); // if we can't find a closing quote in the rest of the input text, then we assume the author forgot to put a closing quote, and act like it's at the end of the input text.\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tcurrentStop +=1;\n \t\t\t\t\tmergeNext=true;// the EOS character we are looking for is not in this section of text (section being defined as a substring of 'text' between two EOS characters.)\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\n \t\t\tif (foundParentheses && ((temp.indexOf(\")\", lastParenAt+1)) == -1)) {\n \t\t\t\tif ((currentStop = text.indexOf(\")\", currentStart + lastParenAt + 1)) == -1)\n \t\t\t\t\tcurrentStop = text.length();\n \t\t\t\telse {\n \t\t\t\t\tcurrentStop += 1;\n \t\t\t\t\tmergeNext = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \n \t\t\tif (foundQuote) {\n \t\t\t\tsentEnd = SENTENCE_QUOTE.matcher(text);\t\n \t\t\t\tisSentence = sentEnd.find(currentStop-2); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \n \t\t\t\tif (isSentence == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\t\tcurrentStop = text.indexOf(\"\\\"\",sentEnd.start())+1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundParentheses) {\n \t\t\t\tsentEnd = SENTENCE_PARENTHESES.matcher(text);\n \t\t\t\tisSentence = sentEnd.find(currentStop-2);\n \t\t\t\t\n \t\t\t\tif (isSentence == true) {\n \t\t\t\t\tcurrentStop = text.indexOf(\")\", sentEnd.start()) + 1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1, currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// now check to see if there is a CITATION after the sentence (doesn't just apply to quotes due to paraphrasing)\n \t\t\t// The rule -- at least as of now -- is if after the EOS mark there is a set of parenthesis containing either one word (name) or a name and numbers (name 123) || (123 name) || (123-456 name) || (name 123-456) || etc..\n \t\t\tcitationFinder = CITATION.matcher(text.substring(currentStop));\t\n \t\t\thasCitation = citationFinder.find(); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \t\t\t\n \t\t\tif (hasCitation == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\tcurrentStop = text.indexOf(\")\",citationFinder.start()+currentStop)+1;\n \t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\tmergeNext = false;\n \t\t\t}\t\n \t\t\t\n \t\t\tif (mergeWithLast) {\n \t\t\t\tmergeWithLast=false;\n \t\t\t\tString prev=sents.remove(sents.size()-1);\n \t\t\t\tsafeString=prev+safeString;\n \t\t\t}\n \t\t\t\n \t\t\tif (mergeNext && !forceNoMerge) {//makes the merge happen on the next pass through\n \t\t\t\tmergeNext=false;\n \t\t\t\tmergeWithLast=true;\n \t\t\t} else {\n \t\t\t\tforceNoMerge = false;\n \t\t\t\tfinalSents.add(safeString);\n \t\t\t}\n \t\t\n \t\t\tsents.add(safeString);\n \t\t\t\n \t\t\t//// xxx xxx xxx return the safeString_subbedEOS too!!!!\n \t\t\tif (currentStart < 0 || currentStop < 0) {\n \t\t\t\tLogger.logln(NAME+\"Something went really wrong making sentence tokens.\", LogOut.STDERR);\n \t\t\t\tErrorHandler.fatalProcessingError(null);\n \t\t\t}\n \n \t\t\tcurrentStart = currentStop+1;\n \t\t\tif (currentStart >= lenText) {\n \t\t\t\tfoundEOS = false;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tfoundEOS = sent.find(currentStart);\n \t\t}\n \n \t\tif (!foundAtLeastOneEOS || !EOSAtSentenceEnd) {\n \t\t\tArrayList<String> wrapper = new ArrayList<String>(1);\n \t\t\twrapper.add(text);\n \t\t\treturn wrapper;\n \t\t}\n \t\t\n \t\treturn finalSents;\n \t}",
"public interface Parser<T> {\n T parse(String source) throws JAXBException;\n\n\n List<String> groupContent(String content);\n\n}",
"public String tagger(String textDariWebsite){\n String[] splitter = textDariWebsite.split(\"\\n\");\n\n\n String textWithTag = \"\";\n for(int i = 0; i < splitter.length; i++){\n String hasilNer = sentenceTagger.addNer(splitter[i]);\n textWithTag += hasilNer;\n textWithTag += \"\\n\";\n }\n\n return textWithTag;\n }",
"public void replace (String from, String to) {\n boolean found = (from.length() == 0);\n\n // Go through tags, checking individual words\n /*\n int e = 0;\n int s = indexOfNextWordStart (tags, e);\n while (s < tags.length() && (! found)) {\n e = indexOfNextSeparator (tags, s, true, true);\n if (from.equalsIgnoreCase (tags.substring (s, e))) {\n found = true;\n removeTag (s, e);\n }\n }\n */\n int e = 0;\n int s = indexOfNextWordStart (tags, e, slashToSeparate);\n\n // Go through tags, looking for complete tags\n while (s < tags.length() && (! found)) {\n e = indexOfNextSeparator (tags, s, false, true, slashToSeparate);\n if (from.equalsIgnoreCase (tags.substring (s, e))) {\n found = true;\n removeTag (s, e);\n } else {\n s = indexOfNextWordStart (tags, e, slashToSeparate);\n }\n }\n if (found && to.length() > 0) {\n merge (to);\n }\n }",
"protected String parseHtml(String html) {\n\t\tString tokens = new String();\n\t\ttry {\n\t\t\tDocument document = Jsoup.parse(html);\n\t\t\tdocument.select(\"code,pre\").remove();\n\t\t\tString textcontent = document.text();\n\t\t\tArrayList<String> cleaned = removeSpecialChars(textcontent);\n\t\t\tfor (String token : cleaned) {\n\t\t\t\ttokens += token + \" \";\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\t// handle the exception\n\t\t}\n\t\treturn tokens;\n\t}",
"public String getToTag();",
"static ArrayList<String> tag(ArrayList<String> rawWords){\n\t\tArrayList<String> outSentence = new ArrayList<String>();\n\t\t//String[][] chart = new String[rawWords.size()][rawWords.size()];\n\t\tfor(int i = 0; i<rawWords.size(); i++){\n\t\t\tString[] entry = rawWords.get(i).split(\"\\\\s+\");\n\t\t\tString word = entry[0];\n\t\t\tString pos = entry[1];\n\t\t\tSystem.out.println(word);\n\t\t\tif((pos.equals(\"NNP\")||word.equals(\"tomorrow\"))&&rawWords.get(i-1).split(\"\\\\s+\")[0].equals(\"due\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tint j = i+1;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"NN\")||next.equals(\"NNP\")||next.equals(\"NNS\")||next.equals(\"NNPS\")||next.equals(\"CD\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}\n\t\t\telse if (pos.equals(\"CD\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\tint j = i+1;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tif((rawWords.get(j).split(\"\\\\s\")[1].equals(\"CC\")&&rawWords.get(j-1).split(\"\\\\s\")[1].equals(\"CD\")&&rawWords.get(j+1).split(\"\\\\s\")[1].equals(\"CD\"))||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NN\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNP\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNPS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"CD\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"CD\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"%\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tif(rawWords.get(j).split(\"\\\\s\")[0].equals(\"to\")&&rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"up\")){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if(rawWords.get(j).split(\"\\\\s\")[1].equals(\"#\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"PRP$\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJ\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJR\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"$\")){\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t}\n\t\t\t\t\telse if(rawWords.get(j).split(\"\\\\s\")[1].equals(\"POS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"DT\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"approximately\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"around\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"almost\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"about\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[0].equals(\"as\")&&(rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"many\")||rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"much\"))&&rawWords.get(j-2).split(\"\\\\s\")[0].equals(\"as\")){\n\t\t\t\t\t\tbeginning-=3;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[1].equals(\"VBN\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"RB\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[1].equals(\"VBN\")&&j>1&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\")&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"RB\")))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if((rawWords.get(j).split(\"\\\\s\")[1].equals(\"RBR\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"not\"))&&rawWords.get(j+1).split(\"\\\\s+\")[1].equals(\"JJ\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse{\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t\t}\n\t\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t\t}\n\t\t\t\t\ti=ending;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else if(pos.equals(\"CD\")&&rawWords.get(i-1).split(\"\\\\s+\")[0].equals(\"$\")&&rawWords.get(i-2).split(\"\\\\s+\")[1].equals(\"IN\")){\n\t\t\t\tint beginning=i;\n\t\t\t\tint ending = i;\n\t\t\t\tint j=i+1;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"CD\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tString prior=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tString priorWord = rawWords.get(j).split(\"\\\\s\")[0];\n\t\t\t\t\tif(prior.equals(\"$\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s+\")[0].equals(\"as\")&&rawWords.get(j-1).split(\"\\\\s+\")[0].equals(\"much\")&&rawWords.get(j-2).split(\"\\\\s+\")[0].equals(\"as\")){\n\t\t\t\t\t\tbeginning -=3;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t\tj -=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"IN\")){\n\t\t\t\t\t\tbeginning --;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}*/\n\t\t\t//else if(pos.equals(arg0))\n\t\t\telse if(pos.equals(\"PRP\")||pos.equals(\"WP\")||word.equals(\"those\")||pos.equals(\"WDT\")){\n\t\t\t\tint beginning = i;\n\t\t\t\t//int ending = i;\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t}\n\t\t\telse if(word.equals(\"anywhere\")&&rawWords.get(i+1).split(\"\\\\s+\")[0].equals(\"else\")){\n\t\t\t\toutSentence.add(\"anywhere\\tB-NP\");\n\t\t\t\toutSentence.add(\"else\\tI-NP\");\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t/*else if (word.equals(\"same\")&&rawWords.get(i-1).split(\"\\\\s\")[0].equals(\"the\")){\n\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\tString nounGroupLine = \"the\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tnounGroupLine = \"same\\tI-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t}*/\n\t\t\telse if(pos.equals(\"NN\")||pos.equals(\"NNS\")||pos.equals(\"NNP\")||pos.equals(\"NNPS\")||pos.equals(\"CD\")/*||pos.equals(\"PRP\")*/||pos.equals(\"EX\")||word.equals(\"counseling\")||word.equals(\"Counseling\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tboolean endFound = false;\n\t\t\t\tint j = i+1;\n\t\t\t\twhile(!endFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"NN\")||next.equals(\"NNS\")||next.equals(\"NNP\")||next.equals(\"NNPS\")||next.equals(\"CD\")||(next.equals(\"CC\")&&rawWords.get(j-1).split(\"\\\\s\")[1].equals(rawWords.get(j+1).split(\"\\\\s\")[1]))){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendFound = true;\n\t\t\t\t}\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tString[] pArray = rawWords.get(j).split(\"\\\\s+\");\n\t\t\t\t\tString prior = pArray[1];\n\t\t\t\t\tif(j>2 &&prior.equals(rawWords.get(j-2).split(\"\\\\s+\")[1])&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"CC\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\"))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if(prior.equals(\"JJ\")||prior.equals(\"JJR\")||prior.equals(\"JJS\")||prior.equals(\"PRP$\")||prior.equals(\"RBS\")||prior.equals(\"$\")||prior.equals(\"RB\")||prior.equals(\"NNP\")||prior.equals(\"NNPS\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBN\")&&j>1&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\")&&(rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"RB\")))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBN\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"RB\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBG\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if((prior.equals(\"RBR\")||pArray[0].equals(\"not\"))&&rawWords.get(j+1).split(\"\\\\s+\")[1].equals(\"JJ\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if((pArray[0].equals(\"Buying\")||pArray[0].equals(\"buying\"))&&rawWords.get(j+1).split(\"\\\\s+\")[0].equals(\"income\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if(pArray[0].equals(\"counseling\")||pArray[0].equals(\"Counseling\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tif(rawWords.get(j).split(\"\\\\s+\")[1].equals(\"NN\")){\n\t\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (prior.equals(\"DT\")||prior.equals(\"POS\")){\n\t\t\t\t\t\t//j--;\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tif(!rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\"))\n\t\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tString outLine = word+\"\\tO\";\n\t\t\t\toutSentence.add(outLine);\n\t\t\t}\n\t\t}\n\t\toutSentence.remove(0);\n\t\toutSentence.remove(outSentence.size()-1);\n\t\toutSentence.add(\"\");\n\t\treturn outSentence;\n\t}",
"private void assembleTags(Question question, String userTags) {\n\t\tif (userTags != null && !userTags.isEmpty()) {\n\t\t\tString[] tagNames = userTags.split(Constants.COMMA_DELIMITER);\n\t\t\tif (tagNames.length > 0) {\n\t\t\t\tList<Tag> tags = new ArrayList<Tag>();\n\t\t\t\tfor (String tagName : tagNames) {\n\t\t\t\t\tTag tag = new Tag();\n\t\t\t\t\ttag.setName(tagName);\n\t\t\t\t\ttags.add(tag);\n\t\t\t\t}\n\t\t\t\tquestion.setTags(tags);\n\t\t\t}\n\t\t}\n\t}",
"private void removeTagAndContent(ArrayList p_tags, HtmlObjects.Tag p_tag)\n {\n int i_start = 0;\n int i_end = 0;\n\n loop: for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o == p_tag)\n {\n i_start = i;\n\n for (int j = i + 1; j < max; j++)\n {\n Object o1 = p_tags.get(j);\n\n if (o1 instanceof HtmlObjects.EndTag)\n {\n HtmlObjects.EndTag etag = (HtmlObjects.EndTag) o1;\n\n if (p_tag.tag.equalsIgnoreCase(etag.tag)\n && p_tag.partnerId == etag.partnerId)\n {\n i_end = j;\n break loop;\n }\n }\n }\n }\n }\n\n if (i_start >= 0 && i_end > i_start)\n {\n p_tags.subList(i_start, i_end + 1).clear();\n }\n }",
"private String[] extractTags(HttpServletRequest request)\n throws ServletException, IOException {\n String tagline = request.getParameter(\"tags\").toLowerCase();\n String[] tags = {};\n if (!tagline.isEmpty())\n tags = tagline.split(\" \");\n return tags;\n }",
"public MyTuple<String, HashMap<String,String>> generateTags(String text){\n\t\t\n\t\tHashMap<String, String> wordsTags = new HashMap<String, String>();\n\t\tArrayList<String> filteredWords = new ArrayList<String>();\n\t\t\n\t\tStringReader sr = new StringReader(text);\n\t\tTokenStream ts = this.tokenStream(\"\", sr);\n\t\tCharTermAttribute term = ts.addAttribute(CharTermAttribute.class);\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\ttry{\n\t\t\tts.reset();\n\t\t\t while (ts.incrementToken()) {\n\t\t\t\t String toAdd = term.toString().replaceAll(\"[^A-za-z-']\", \"\");\n\t\t\t\t if(toAdd != \"\"){//if the word to add is valid, add it to list of filtered words and append it to the string builder\n\t\t\t\t\t filteredWords.add(toAdd);\n\t\t\t\t\t sb.append(toAdd + \" \");\n\t\t\t\t }\n\t\t }\n\t\t ts.end();\n\t\t} catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\ttry {\n\t\t\t\tts.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\tString [] words = filteredWords.toArray(new String [filteredWords.size()]);\n\t\tString [] tags = tagger.tag(words);\n\t\t//populate the tagMap with the tags of the filtered words. \n\t\tfor(int i = 0; i< tags.length; i++){\n\t\t\twordsTags.put(words[i], tags[i]);\n\t\t}\n\t\t\n\t\tMyTuple<String, HashMap<String, String>> retVal = new MyTuple<>(sb.toString(), wordsTags);\n\t\t\n\t\treturn retVal;\n\t}",
"public static ArrayList<String> extractTags(String tags) {\n\n // probably more efficent ways to do this.\n //\n // whitespace = re.compile('\\s')\n\n tags = tags.replaceAll(\"\\\\s\", \"\");\n String tagArray[] = tags.split(\",\");\n\n // let's clean it up, removing the empty string and removing dups\n ArrayList<String> cleaned = new ArrayList<>();\n for (String tag : tagArray) {\n if (!tag.equals(\"\") && !cleaned.contains(tag)) {\n cleaned.add(tag);\n }\n }\n\n return cleaned;\n }",
"public List<String> tag(List<String> text) {\n\n\t\t// Create a data container for a sentence\n\n\t\tString[] s = new String[text.size() + 1];\n\t\ts[0] = \"root\";\n\t\tfor (int j = 0; j < text.size(); j++)\n\t\t\ts[j + 1] = text.get(j);\n\t\ti.init(s);\n\t\t// System.out.println(EuroLangTwokenizer.tokenize(text));\n\n\t\t// lemmatizing\n\n\t\t// System.out.println(\"\\nReading the model of the lemmatizer\");\n\t\t// Tool lemmatizer = new\n\t\t// Lemmatizer(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.lemmatizer.model\");\n\t\t// // create a lemmatizer\n\n\t\t// System.out.println(\"Applying the lemmatizer\");\n\t\t// lemmatizer.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Lemmata: \"); for (String l : i.plemmas)\n\t\t// System.out.print(l+\" \"); System.out.println();\n\n\t\t// morphologic tagging\n\n\t\t// System.out.println(\"\\nReading the model of the morphologic tagger\");\n\t\t// is2.mtag.Tagger morphTagger = new\n\t\t// is2.mtag.Tagger(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.morphtagger.model\");\n\n\t\t// System.out.println(\"\\nApplying the morpholoigc tagger\");\n\t\t// morphTagger.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Morph: \"); for (String f : i.pfeats)\n\t\t// System.out.print(f+\" \"); System.out.println();\n\n\t\t// part-of-speech tagging\n\n\t\t// System.out.println(\"\\nReading the model of the part-of-speech tagger\");\n\n//\t\tSystem.out.println(\"Applying the part-of-speech tagger\");\n\t\ttagger.apply(i);\n\t\tList<String> tags = new ArrayList<String>(i.ppos.length - 1);\n\t\tfor (int j = 1; j < i.ppos.length; j++)\n\t\t\ttags.add(i.ppos[j]);\n\t\treturn tags;\n\t\t// System.out.println(\"Part-of-Speech tags: \");\n\t\t// for (String p : i.ppos)\n\t\t// System.out.print(p + \" \");\n\t\t// System.out.println();\n\n\t\t// parsing\n\n\t\t// System.out.println(\"\\nReading the model of the dependency parser\");\n\t\t// Tool parser = new Parser(\"models/prs-spa.model\");\n\n\t\t// System.out.println(\"\\nApplying the parser\");\n\t\t// parser.apply(i);\n\n\t\t// System.out.println(i.toString());\n\n\t\t// write the result to a file\n\n\t\t// CONLLWriter09 writer = new\n\t\t// is2.io.CONLLWriter09(\"example-out.txt\");\n\n\t\t// writer.write(i, CONLLWriter09.NO_ROOT);\n\t\t// writer.finishWriting();\n\n\t}",
"private void devideVorlage(List<TemplateTag> tags) throws MissingTagException{\r\n \t\tTreeSet<TemplateTag> sortedTags = new TreeSet<TemplateTag>();\r\n \t\tfor (TemplateTag tag:tags){\r\n \t\t\tint position = template.indexOf(tag.name);\r\n \t\t\tif(position > -1){\r\n \t\t\t\ttag.setPositions(position);\r\n \t\t\t\ttag.found = true;\r\n \t\t\t\tsortedTags.add(tag);\r\n \t\t\t}else{\r\n \t\t\t\tif(tag.required){\r\n \t\t\t\t\tthrow new MissingTagException(tag,templateFile);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\tdevidePointer = 0;\r\n \t\tfor (TemplateTag tag:sortedTags){\r\n \t\t\ttemplateParts.add(getHtmPart(tag));\r\n \t\t\ttag.templatePosition = templateParts.size();\r\n \t\t\ttemplateParts.add(\"\");\r\n \t\t}\r\n \t\ttemplateParts.add(template.substring(devidePointer, template.length()));\r\n \t}",
"public SourcedToken[] sourcedTokenize(String input, String source) {\n Token[] tokens = tokenize(input);\n SourcedToken[] sourcedTokens = new SourcedToken[tokens.length];\n for (int i = 0; i < tokens.length; i++) {\n String key = tokens[i].getValue() + \"@\" + source;\n if (tokMap.get(key) == null) {\n tokMap.put(key, new Integer(++nextId));\n }\n int id = ((Integer) tokMap.get(key)).intValue();\n sourcedTokens[i] = new BasicSourcedToken(id, tokens[i].getValue(), source);\n }\n return sourcedTokens;\n }",
"private String tagText(String s)throws IOException{\n//\tMaxentTagger tagger = new MaxentTagger(\"english-left3words-distsim.tagger\");\n\tString s1=null;\n\tSystem.out.println(\"here starts the process\");\n\ts1 = tagger.tagString(s);\n\treturn s1;\n}",
"protected void tag (int ltagStart) throws HTMLParseException {\r\n Tag tag = new Tag ();\r\n Token token = new Token (tag, false);\r\n switch (nextToken) {\r\n case STRING:\r\n tag.setType (stringValue);\r\n match (STRING);\r\n arglist (tag);\r\n if (tagmode) {\r\n block.setRest (lastTagStart);\r\n } else {\r\n token.setStartIndex (ltagStart);\r\n //block.addToken (token);\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(token);\r\n }\r\n break;\r\n case MT:\r\n tagmode = false;\r\n match (MT);\r\n break;\r\n case END:\r\n block.setRest (lastTagStart);\r\n tagmode = false;\r\n return;\r\n default:\r\n arglist (tag);\r\n }\r\n }",
"private String[] extractXmlElementValues(String xmlTagName, String text, boolean includeStartEndTags) {\n ArrayList<String> foundElements = new ArrayList<String>();\n int currentPos = 0;\n\n while ( currentPos >= 0 ) {\n String startTag = \"<\" + xmlTagName + \">\";\n String endTag = \"</\" + xmlTagName + \">\";\n\n String rootStartTag = \"\";\n String rootEndTag = \"\";\n\n String resultText = \"\";\n int startValuePos = text.indexOf(startTag,currentPos);\n if ( startValuePos < 0 ) {\n startTag = \"<\" + xmlTagName + \" \";\n startValuePos = text.indexOf(startTag,currentPos);\n }\n if ( startValuePos >= 0 ) {\n int rootStartTagPos = startValuePos;\n currentPos = -1;\n //iPos += 3;\n startValuePos = text.indexOf(\">\", startValuePos);\n if ( startValuePos >= 0 ) {\n startValuePos = startValuePos + 1;\n int endValuePos = text.indexOf(endTag, startValuePos);\n if ( endValuePos >= 0 && endValuePos > startValuePos ) {\n resultText = text.substring(startValuePos, endValuePos);\n if ( includeStartEndTags ) {\n rootStartTag = text.substring(rootStartTagPos, startValuePos);\n rootEndTag = text.substring(endValuePos, endValuePos+endTag.length()+1);\n// System.out.println(\"\");\n// System.out.println(\"START TAG : ]\" + rootStartTag + \"[\");\n// System.out.println(\"END TAG : ]\" + rootEndTag + \"[\");\n foundElements.add(rootStartTag + resultText + rootEndTag);\n } else {\n foundElements.add(resultText);\n }\n currentPos = endValuePos;\n }\n }\n } else {\n // Procedure for namespace defined tags\n startTag = \":\" + xmlTagName;\n startValuePos = text.indexOf(startTag,currentPos);\n if ( startValuePos < 0 ) {\n startTag = \":\" + xmlTagName + \" \";\n startValuePos = text.indexOf(startTag,currentPos);\n }\n currentPos = -1;\n if ( startValuePos >= 0 ) {\n int rootStartTagPos = startValuePos;\n int startBracket = text.lastIndexOf(\"<\", startValuePos );\n if ( startBracket >= 0 && startBracket < startValuePos ) {\n String nsName = text.substring(startBracket+1,startValuePos);\n endTag = \"</\" + nsName + \":\" + xmlTagName + \">\";\n startValuePos = text.indexOf(\">\", startValuePos);\n if ( startValuePos >= 0 ) {\n startValuePos = startValuePos + 1;\n int endValuePos = text.indexOf(endTag, startValuePos);\n if ( endValuePos >= 0 && endValuePos > startValuePos ) {\n resultText = text.substring(startValuePos, endValuePos);\n if ( includeStartEndTags ) {\n rootStartTag = \"<\" + nsName + text.substring(rootStartTagPos, startValuePos);\n rootEndTag = text.substring(endValuePos, endValuePos+endTag.length()+1);\n// System.out.println(\"\");\n// System.out.println(\"NAMESPACE START TAG : ]\" + rootStartTag + \"[\");\n// System.out.println(\"NAMESPACE END TAG : ]\" + rootEndTag + \"[\");\n foundElements.add(rootStartTag + resultText + rootEndTag);\n } else {\n foundElements.add(resultText);\n }\n currentPos = endValuePos + endTag.length();\n }\n }\n }\n }\n }\n }\n return foundElements.toArray(new String[foundElements.size()]);\n }",
"public void Mini_Parser(){\n Lista_ER Nuevo=null;\n String Nombre=\"\";\n String Contenido=\"\";\n ArrayList<String> tem = new ArrayList<String>();\n //este boleano sirve para concatenar la expresion regular\n int Estado=0;\n for (int x = 0; x < L_Tokens.size(); x++) {\n switch(Estado){\n //ESTADO 0\n case 0:\n //Conjuntos\n if(L_Tokens.get(x).getLexema().equals(\"CONJ\")){\n if(L_Tokens.get(x+1).getLexema().equals(\":\")){\n if(L_Tokens.get(x+2).getDescripcion().equals(\"Identificador\")){\n //Son conjuntos \n Nombre=L_Tokens.get(x+2).getLexema();\n Estado=1;\n x=x+4;\n }\n }\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Identificador\")){\n //pasaa estado de expresion regular\n Nombre=L_Tokens.get(x).getLexema();\n Estado=2;\n }\n break;\n \n case 1:\n //ESTADO 1\n //Concatena los conjuntos\n if(L_Tokens.get(x).getDescripcion().equals(\"Identificador\")){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Digito\")){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n for(int i=6;i<=37;i++){\n if(L_Tokens.get(x).getID()==i){\n if(L_Tokens.get(x+1).getDescripcion().equals(\"Tilde\")){\n Contenido=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n x=x+2;\n Estado=0;\n }\n \n }\n }\n //conjunto sin llaves\n if(L_Tokens.get(x).getLexema().equals(\";\")){\n if(L_Tokens.get(x-1).getLexema().equals(\",\")){\n }else{\n L_Tokens_Conj.add(new Lista_Conjuntos(Nombre, Contenido));\n Estado=0;\n Contenido=\"\";\n\n }\n }else{\n Contenido+=L_Tokens.get(x).getLexema();\n }\n \n\n break;\n case 2:\n //ESTADO 2\n if(L_Tokens.get(x).getLexema().equals(\"-\")){\n if(L_Tokens.get(x+1).getLexema().equals(\">\")){\n //se mira que es expresion regular\n \n Lista_ER nuevo=new Lista_ER(L_Tokens.get(x-1).getLexema());\n Nuevo=nuevo;\n L_Tokens_ER.add(nuevo);\n x++;\n Estado=3;\n }\n }\n if(L_Tokens.get(x).getLexema().equals(\":\")){\n //se mira que es lexema\n Estado=4;\n }\n break;\n case 3: \n //ESTADO 3\n //Concatenacion de Expresion Regular\n \n //System.out.println(\"---------------------------------\"+ L_Tokens.get(x).getLexema());\n if(L_Tokens.get(x).getDescripcion().equals(\"Punto\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Barra Vetical\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Interrogacion\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Asterisco\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Signo Mas\")){\n Nuevo.setER(L_Tokens.get(x).getLexema());\n }\n if(L_Tokens.get(x).getDescripcion().equals(\"Lexema de Entrada\")){ \n String tem1='\"'+L_Tokens.get(x).getLexema()+'\"';\n Nuevo.setER(tem1);\n \n }\n if(L_Tokens.get(x).getLexema().equals(\"{\")){ \n String tem1=\"\";\n if(L_Tokens.get(x+2).getLexema().equals(\"}\")){\n tem1=L_Tokens.get(x).getLexema()+L_Tokens.get(x+1).getLexema()+L_Tokens.get(x+2).getLexema();\n Nuevo.setER(tem1);\n }\n }\n if(L_Tokens.get(x).getLexema().equals(\";\")){\n Estado=0;\n }\n break;\n case 4:\n// System.out.println(L_Tokens.get(x).getLexema());\n Contenido=L_Tokens.get(x+1).getLexema();\n L_Tokens_Lex.add(new Lista_LexemasE(L_Tokens.get(x-2).getLexema(), Contenido));\n Estado=0;\n \n break;\n }//fin switch\n }//Fin for\n }",
"private static List<String> simpleTokenize (String text) {\r\n\r\n // Do the no-brainers first\r\n String splitPunctText = splitEdgePunct(text);\r\n\r\n int textLength = splitPunctText.length();\r\n \r\n // BTO: the logic here got quite convoluted via the Scala porting detour\r\n // It would be good to switch back to a nice simple procedural style like in the Python version\r\n // ... Scala is such a pain. Never again.\r\n\r\n // Find the matches for subsequences that should be protected,\r\n // e.g. URLs, 1.0, U.N.K.L.E., 12:53\r\n Matcher matches = Protected.matcher(splitPunctText);\r\n //Storing as List[List[String]] to make zip easier later on \r\n List<List<String>> bads = new ArrayList<List<String>>();\t//linked list?\r\n List<Pair<Integer,Integer>> badSpans = new ArrayList<Pair<Integer,Integer>>();\r\n while(matches.find()){\r\n // The spans of the \"bads\" should not be split.\r\n if (matches.start() != matches.end()){ //unnecessary?\r\n List<String> bad = new ArrayList<String>(1);\r\n bad.add(splitPunctText.substring(matches.start(),matches.end()));\r\n bads.add(bad);\r\n badSpans.add(new Pair<Integer, Integer>(matches.start(),matches.end()));\r\n }\r\n }\r\n\r\n // Create a list of indices to create the \"goods\", which can be\r\n // split. We are taking \"bad\" spans like \r\n // List((2,5), (8,10)) \r\n // to create \r\n /// List(0, 2, 5, 8, 10, 12)\r\n // where, e.g., \"12\" here would be the textLength\r\n // has an even length and no indices are the same\r\n List<Integer> indices = new ArrayList<Integer>(2+2*badSpans.size());\r\n indices.add(0);\r\n for(Pair<Integer,Integer> p:badSpans){\r\n indices.add(p.first);\r\n indices.add(p.second);\r\n }\r\n indices.add(textLength);\r\n\r\n // Group the indices and map them to their respective portion of the string\r\n List<List<String>> splitGoods = new ArrayList<List<String>>(indices.size()/2);\r\n for (int i=0; i<indices.size(); i+=2) {\r\n String goodstr = splitPunctText.substring(indices.get(i),indices.get(i+1));\r\n List<String> splitstr = Arrays.asList(goodstr.trim().split(\" \"));\r\n splitGoods.add(splitstr);\r\n }\r\n\r\n // Reinterpolate the 'good' and 'bad' Lists, ensuring that\r\n // additonal tokens from last good item get included\r\n List<String> zippedStr= new ArrayList<String>();\r\n int i;\r\n for(i=0; i < bads.size(); i++) {\r\n zippedStr = addAllnonempty(zippedStr,splitGoods.get(i), true);\r\n zippedStr = addAllnonempty(zippedStr,bads.get(i), false);\r\n }\r\n zippedStr = addAllnonempty(zippedStr,splitGoods.get(i), true);\r\n \r\n // BTO: our POS tagger wants \"ur\" and \"you're\" to both be one token.\r\n // Uncomment to get \"you 're\"\r\n /*ArrayList<String> splitStr = new ArrayList<String>(zippedStr.size());\r\n for(String tok:zippedStr)\r\n \tsplitStr.addAll(splitToken(tok));\r\n zippedStr=splitStr;*/\r\n \r\n return zippedStr;\r\n }",
"public ArrayList<String> getTags(String url) {\n // Use hashset to remove duplicates\n Collection<String> tags = new HashSet<>();\n try {\n String page = connectAndGetPage(url);\n Pattern p = Pattern.compile(\"<[^>]*>\");\n Matcher m = p.matcher(page);\n while (m.find()) {\n // Get match and add to hashset if not a comment or closing tag.\n String match = m.group(0);\n String characterAfterStart = String.valueOf(match.charAt(1));\n if (!characterAfterStart.equals(\"/\") && !characterAfterStart.equals(\"!\")) {\n tags.add(match.trim());\n }\n }\n } catch (IOException e) {\n System.out.println(\"IOException\");\n }\n return sortTags(tags);\n\n }",
"private SortedSet<String> FillTagList(String tags) {\n \tSortedSet<String> tagset = new TreeSet<String>();\n \tString[] tag_arr = tags.split(\" \");\n \tfor (int i = 0; i < tag_arr.length; i++) {\n \t\ttagset.add(tag_arr[i]);\n \t}\n \ttag_arr = new String[]{};\n \ttag_arr = tagset.toArray(tag_arr);\n\n\t\tm_taglist = new ArrayList < Map<String,String> >();\n\t\tm_taglistmap = new HashMap <String, Integer>();\n\t\tMap<String, String> m;\n\t\tfor (int i = 0; i < tag_arr.length; i++) {\n\t\t\tm = new HashMap<String, String>();\n\t\t\tm.put(\"tag_name\", tag_arr[i]);\n\t\t\tm.put(\"extra_info\", \"\");\n\t\t\tm_taglist.add(m);\n\t\t\tm_taglistmap.put(tag_arr[i],i);\n\t\t}\n\t\t\n\t\tListView lv = ((ListView)findViewById(R.id.ImageTagsList));\n lv.setAdapter(new SimpleAdapter(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\tm_taglist,\n\t\t\t\t\t\t\tR.layout.tags_list_item,\n\t\t\t\t\t\t\tnew String[]{\"tag_name\",\"extra_info\"},\n\t\t\t\t\t\t\tnew int[]{R.id.TagName, R.id.ExtraInfo}));\n \tlv.setTextFilterEnabled(true);\n \tlv.setOnItemClickListener(this);\n \t\n \treturn tagset;\n }",
"public void transform() {\n String delimiter = \" \";\n\n System.out.println(\"Using pathname \" + this.inputPath_ + \"\\n\");\n\n //create string to hold the entire input file\n String input = \"\";\n try { //use a scanner to get the contents of the file into a string\n Scanner inputScanner = new Scanner(new File(this.inputPath_));\n //use a delimiter that only matches the end of the file; this will give us the whole file\n input = inputScanner.useDelimiter(\"\\\\Z\").next();\n inputScanner.close();\n } catch (Exception e) {\n System.err.println(\"Couldn't read \" + this.inputPath_);\n System.exit(-100);\n }\n //if we are here, then there wasn't an exception\n\n //make sure not empty file\n if(input.isEmpty()) {\n System.err.print(\"Error: Empty file.\");\n System.exit(-200);\n }\n\n //create an array for the line strings\n ArrayList<String> inputLines = new ArrayList<>();\n\n //next, separate the input string into multiple strings, one for each line\n //delimiter string regex - only match line terminators\n String lineDelim = \"(\\n|\\r|\\r\\n|\\u0085|\\u2028|\\u2029)\";\n StringTokenizer inputLineTokenizer = new StringTokenizer(input, lineDelim); //create a string tokenizer\n\n //count number of lines\n int numberOfLines = inputLineTokenizer.countTokens();\n\n //add the lines to the array\n for(int i = 0; i < numberOfLines; i++) inputLines.add(inputLineTokenizer.nextToken(lineDelim));\n\n\n //split line into words\n\n //create arraylist of strings\n ArrayList<ArrayList<String>> lines = new ArrayList<>();\n\n for(int i = 0; i < inputLines.size(); i++) {\n //printout(\"Read line: \" + inputLines.get(i) + \"\\n\");\n\n //create a tokenizer and count number of tokens\n StringTokenizer tokenizer = new StringTokenizer(inputLines.get(i), delimiter);\n int numWords = tokenizer.countTokens();\n\n //create array of strings\n ArrayList<String> currentLine = new ArrayList<>();\n\n for(int j = 0; j < numWords; j++) { //add a word if it is valid\n String currentWord = cleanUpText(tokenizer.nextToken(delimiter));\n if(!currentWord.isEmpty()) currentLine.add(currentWord);\n }\n\n //add the current line to the list of typed lines if it had any valid words\n if(currentLine.size() > 0) lines.add(currentLine);\n }\n\n if(lines.size() <= 0) {\n System.err.println(\"ERROR! File did not contain a line with any valid words. Please try again with a different inpput file.\");\n System.exit(-444);\n } else {\n //send lines from array to pipe\n for(int i = 0; i < lines.size(); i++) {\n this.output_.put(lines.get(i));\n }\n\n\n\n //send a null terminator?\n //this causes the other filter to give an exception\n //the exception is caught by the other filter, which breaks the loop it uses to get new lines\n this.output_.put(null);\n //printout(\"Done with file input.\\n\");\n //stop the filter\n this.stop();\n }\n\n\n }",
"public List<List<TaggedWord>> getsTaggedSentences(String input) {\n List<List<HasWord>> sentences = MaxentTagger.tokenizeText(new StringReader(input));\n return mxntg.process(sentences);\n }",
"@Override\n\tprotected Map<Object, Object> rawTextParse(CharSequence text) {\n\n\t\tStanfordCoreNLP pipeline = null;\n\t\ttry {\n\t\t\tpipeline = pipelines.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tAnnotation document = new Annotation(text.toString());\n\t\tpipeline.annotate(document);\n\t\tMap<Object, Object> sentencesMap = new LinkedHashMap<Object, Object>();//maintain sentence order\n\t\tint id = 0;\n\t\tList<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n\t\tfor (CoreMap sentence : sentences) {\n\t\t\tStringBuilder processedText = new StringBuilder();\n\t\t\tfor (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n\t\t\t\tString word = token.get(CoreAnnotations.TextAnnotation.class);\n\t\t\t\tString lemma = token.get(CoreAnnotations.LemmaAnnotation.class);\n\t\t\t\tString pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n\t\t\t\t//todo this should really happen after parsing is done, because using lemmas might confuse the parser\n\t\t\t\tif (config().isUseLowercaseEntries()) {\n\t\t\t\t\tword = word.toLowerCase();\n\t\t\t\t\tlemma = lemma.toLowerCase();\n\t\t\t\t}\n\t\t\t\tif (config().isUseLemma()) {\n\t\t\t\t\tword = lemma;\n\t\t\t\t}\n\t\t\t\tprocessedText.append(word).append(POS_DELIMITER).append(lemma).append(POS_DELIMITER).append(pos).append(TOKEN_DELIM);\n //inserts a TOKEN_DELIM at the end too\n\t\t\t}\n\t\t\tsentencesMap.put(id, processedText.toString().trim());//remove the single trailing space\n\t\t\tid++;\n\t\t}\n\t\ttry {\n\t\t\tpipelines.put(pipeline);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn sentencesMap;\n\t}",
"void insertTagContent(TemplateTag tag){\r\n \t\tif(tag.found){\r\n \t\t\ttemplateParts.set(tag.templatePosition,tag.getContent());\r\n \t\t}\r\n \t}",
"private HashMap<String, StringBuilder> parseTags(String str) {\n\n\t\tHashMap<String, StringBuilder> fieldMap = new HashMap<String, StringBuilder>();\n\n\t\tfor (int i = 0; i < fieldNames.length; i++) {\n\n\t\t\tfieldMap.put(fieldNames[i], new StringBuilder(\"\"));\n\n\t\t}\n\n\t\tString[][] content = new String[fieldNames.length][];\n\n\t\tfor (int i = 0; i < fieldNames.length; i++) {\n\n\t\t\tcontent[i] = StringUtils.substringsBetween(str, \"<\" + fieldNames[i]\n\t\t\t\t\t+ \">\", \"</\" + fieldNames[i] + \">\");\n\t\t}\n\n\t\tfor (int i = 0; i < content.length; i++) {\n\n\t\t\tStringBuilder temp = new StringBuilder(\" \");\n\t\t\tif (content[i] != null) {\n\n\t\t\t\tfor (int j = 0; j < content[i].length; j++) {\n\n\t\t\t\t\ttemp.append(content[i][j]);\n\n\t\t\t\t\tif (content[i].length - 1 > j)\n\t\t\t\t\t\ttemp.append(\" \");\n\t\t\t\t}\n\n\t\t\t\tfieldMap.put(fieldNames[i], temp);\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn fieldMap;\n\t}",
"private String composeMarkedSentence(String source) {\n \tString charstates=\"\";\r\n \ttry{\r\n \t\tint ct=0;\r\n \t\tStatement stmt = conn.createStatement();\r\n \t\tStatement stmt1 = conn.createStatement();\r\n \t\tStatement stmt2 = conn.createStatement();\r\n\t ResultSet rs = stmt.executeQuery(\"select * from marked_simpleseg where source='\"+source+\"'\");\r\n\t \twhile(rs.next()){\r\n\t \t\tct+=1;\r\n\t \t}\r\n\t\t\tif(ct==1){\r\n\t\t\t\tResultSet rs1 = stmt1.executeQuery(\"select * from marked_simpleseg where source='\"+source+\"'\");\r\n\t\t\t\twhile(rs1.next()){\r\n\t\t\t\t\tString str=rs1.getString(3);\r\n\t\t\t\t\tPattern pattern1 = Pattern.compile(\"[a-zA-Z\\\\_]+=\\\"[\\\\w±\\\\+\\\\–\\\\-\\\\.:/\\\\_;x´X\\\\×\\\\s,]+\\\"\");\r\n\t \tMatcher matcher = pattern1.matcher(str);\r\n\t \twhile ( matcher.find()){\r\n\t \t\tint i=matcher.start();\r\n\t \t\tint j=matcher.end();\r\n\t \t\tcharstates=charstates.concat(str.subSequence(i,j).toString()+\" \");\r\n\t }\r\n\t \tmatcher.reset();\r\n\t\t\t\t}\r\n\t\t\t\thasSeg = 0;\r\n\t\t\t}\r\n\t\t\telse if(ct>1){\r\n\t\t\t\tResultSet rs2 = stmt2.executeQuery(\"select * from marked_simpleseg where source='\"+source+\"'\");\r\n\t\t\t\twhile(rs2.next()){\r\n\t\t\t\t\tcharstates=charstates.concat(rs2.getString(3));\r\n\t\t\t\t}\r\n\t\t\t\thasSeg = 1;\r\n\t\t\t}\r\n \t}catch (Exception e)\r\n {\r\n \t\tStringWriter sw = new StringWriter();PrintWriter pw = new PrintWriter(sw);e.printStackTrace(pw);LOGGER.error(ApplicationUtilities.getProperty(\"CharaParser.version\")+System.getProperty(\"line.separator\")+sw.toString());\r\n }\r\n \treturn charstates;\r\n\t}",
"Split getNext();",
"public Content<T> parseFrom(Collection<T> content, T left, T right) {\n /*\n Ideally, this function is going to be getting information that looks something like this:\n\n obj1{obj2}moreinfo\n\n So, the strategy for parsing something like this is to make a data structure with the representation:\n\n [Literal(\"obj1\"), Scope([Literal(\"obj2\")]), Content(\"moreinfo\")]\n\n So we parse everything up to a delimiter, parse everything within the delimiters, and then everything after it\n */\n\n // Get all current information\n Literal<T> literal = new Literal<T>(\n left,\n right,\n FlatParser.untilNextDelimiter(content, left));\n\n\n // We are at the end of the statement to parse, just return the literal\n if(literal.value.size() == content.size())\n return literal;\n else {\n Scope<T> scopedElement = new Scope();\n Scope<T> rest = new Scope();\n\n\n // If there is more content other than the literal, we have to parse the inner elements and outer elements\n return new Content<>(\n Util.concatenate(\n Util.wrap(literal),\n\n Util.wrap(scopedElement.parseFrom(\n FlatParser.withinDelim(content, left, right).get(0),\n left, right)),\n\n Util.wrap(rest.parseFrom(\n FlatParser.afterNextScope(content, left, right),\n left, right))\n )\n );\n\n }\n }",
"private void addTagName(TagHolder holder, List<CommonToken> tokens, int tokenIndex) \n\t{\n\t\ttokenIndex++;\n\t\tfor (;tokenIndex<tokens.size(); tokenIndex++)\n\t\t{\n\t\t\tCommonToken tok=tokens.get(tokenIndex);\n\t\t\tif (tok.getType()==MXMLLexer.GENERIC_ID)\n\t\t\t{\n\t\t\t\tholder.setTagName(tok.getText());\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (tok.getText()!=null && tok.getText().trim().length()>0)\n\t\t\t{\n\t\t\t\t//kick out if non whitespace hit; ideally, we shouldn't ever hit here\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"private void cleanupRawTags(ArrayList p_tags)\n {\n // Find the paired tags that belong together.\n // !!! DO NOT RELY ON PAIRING STATUS. Some prop changes start\n // after <seg> but close after </seg> and even after </tu>!!!\n assignPairingStatus(p_tags);\n\n // Basic cleanup: remove surrounding <p> and inner <o:p>\n removeParagraphTags(p_tags);\n\n // Remove revision markers when they were ON accidentally\n // before translating documents or during an alignment task\n // (WinAlign).\n removePropRevisionMarkers(p_tags);\n\n // Cleanup INS/DEL revisions similarly.\n removeDelRevisions(p_tags);\n applyInsRevisions(p_tags);\n\n // WinAligned files can contain endnotes (and footnotes, but I\n // think in Word-HTML they're both endnotes).\n removeEndNotes(p_tags);\n\n // Remove empty spans that are created from superfluous\n // original formatting in Word (<span color=blue></span>)\n removeEmptyFormatting(p_tags);\n\n // Leave the rest to the Word-HTML Extractor.\n }",
"@Override\n public void pushback() {\n if (tokenizer != null) {\n // add 1 to count: when looping through the new tokenizer, we want there to be 1 more token remaining than there is currently.\n int tokensRemaining = tokenizer.countTokens() + 1;\n tokenizer = new StringTokenizer(stringToTokenize, delimiter, includeDelimiterTokens);\n int totalNumberOfTokens = tokenizer.countTokens();\n for (int i = totalNumberOfTokens; i > tokensRemaining; i--) {\n tokenizer.nextToken();\n }\n }\n }",
"protected abstract String[] tokenizeImpl(String text);",
"private boolean performRearrange(List<CommonToken> tokens) throws BadLocationException\n\t{\n\t\tList<TagHolder> topLevelTags=new ArrayList<MXMLRearranger.TagHolder>();\n\t\tint tagLevel=0;\n\t\tfor (int tokenIndex=0;tokenIndex<tokens.size();tokenIndex++)\n\t\t{\n\t\t\tCommonToken token=tokens.get(tokenIndex);\n\t\t\tSystem.out.println(token.getText());\n\t\t\tswitch (token.getType())\n\t\t\t{\n\t\t\t\tcase MXMLLexer.TAG_OPEN:\n\t\t\t\t\tif (tagLevel==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t//capture tag\n\t\t\t\t\t\tint previousWSIndex=findPreviousWhitespaceIndex(tokens, tokenIndex-1);\n\t\t\t\t\t\tTagHolder holder=new TagHolder(tokens.get(previousWSIndex), previousWSIndex);\n\t\t\t\t\t\taddTagName(holder, tokens, tokenIndex);\n\t\t\t\t\t\tupdateCommentTagNames(topLevelTags, holder.mTagName);\n\t\t\t\t\t\ttopLevelTags.add(holder);\n\t\t\t\t\t}\n\t\t\t\t\ttagLevel++;\n\t\t\t\t\ttokenIndex=findToken(tokenIndex, tokens, MXMLLexer.TAG_CLOSE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MXMLLexer.END_TAG_OPEN:\n\t\t\t\t\ttagLevel--;\n\t\t\t\t\ttokenIndex=findToken(tokenIndex, tokens, MXMLLexer.TAG_CLOSE);\n\t\t\t\t\tif (tagLevel==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tmarkTopLevelTagEnd(tokenIndex, topLevelTags);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase MXMLLexer.EMPTY_TAG_OPEN:\n\t\t\t\t\tif (tagLevel==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t//capture tag\n\t\t\t\t\t\tint previousWSIndex=findPreviousWhitespaceIndex(tokens, tokenIndex-1);\n\t\t\t\t\t\tTagHolder holder=new TagHolder(tokens.get(previousWSIndex), previousWSIndex);\n\t\t\t\t\t\taddTagName(holder, tokens, tokenIndex);\n\t\t\t\t\t\tupdateCommentTagNames(topLevelTags, holder.mTagName);\n\t\t\t\t\t\ttopLevelTags.add(holder);\n\t\t\t\t\t}\n\t\t\t\t\ttokenIndex=findToken(tokenIndex, tokens, MXMLLexer.EMPTYTAG_CLOSE);\n\t\t\t\t\tif (tagLevel==1)\n\t\t\t\t\t\tmarkTopLevelTagEnd(tokenIndex, topLevelTags);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MXMLLexer.COMMENT:\n\t\t\t\t\tif (tagLevel==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tint previousWSIndex=findPreviousWhitespaceIndex(tokens, tokenIndex-1);\n\t\t\t\t\t\tTagHolder holder=new TagHolder(tokens.get(previousWSIndex), previousWSIndex);\n\t\t\t\t\t\ttopLevelTags.add(holder);\n\t\t\t\t\t\tmarkTopLevelTagEnd(tokenIndex, topLevelTags);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n//\t\t\t\tcase MXMLLexer.DECL_START:\n//\t\t\t\tcase MXMLLexer.CDATA:\n//\t\t\t\tcase MXMLLexer.PCDATA:\n//\t\t\t\tcase MXMLLexer.EOL:\n//\t\t\t\tcase MXMLLexer.WS:\n\t\t\t}\n\t\t}\n\t\t\n\t\tList<TagHolder> unsortedList=new ArrayList<MXMLRearranger.TagHolder>();\n\t\tunsortedList.addAll(topLevelTags);\n\t\t\n\t\t//sort the elements in the tag list based on the supplied ordering\n\t\tString ordering=mPrefs.getString(PreferenceConstants.MXMLRearr_RearrangeTagOrdering);\n\t\tString[] tagNames=ordering.split(PreferenceConstants.AS_Pref_Line_Separator);\n\t\tSet<String> usedTags=new HashSet<String>();\n\t\tfor (String tagName : tagNames) {\n\t\t\tif (!tagName.equals(PreferenceConstants.MXMLUnmatchedTagsConstant))\n\t\t\t\tusedTags.add(tagName);\n\t\t}\n\t\tList<TagHolder> sortedList=new ArrayList<MXMLRearranger.TagHolder>();\n\t\tfor (String tagName : tagNames) \n\t\t{\n\t\t\tboolean isSpecOther=tagName.equals(PreferenceConstants.MXMLUnmatchedTagsConstant);\n\t\t\t//find all the items that match\n\t\t\tfor (int i=0;i<topLevelTags.size();i++)\n\t\t\t{\n\t\t\t\tTagHolder tagHolder=topLevelTags.get(i);\n\t\t\t\t\n\t\t\t\t//if the tagname matches the current specification \n\t\t\t\t//OR if the current spec is the \"other\" and the current tag doesn't match any in the list\n\t\t\t\tboolean tagMatches=false;\n\t\t\t\tif (!isSpecOther)\n\t\t\t\t{\n\t\t\t\t\tSet<String> testTag=new HashSet<String>();\n\t\t\t\t\ttestTag.add(tagName);\n\t\t\t\t\ttagMatches=matchesRegEx(tagHolder.mTagName, testTag);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttagMatches=(!matchesRegEx(tagHolder.mTagName, usedTags));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (tagMatches)\n\t\t\t\t{\n\t\t\t\t\ttopLevelTags.remove(i);\n\t\t\t\t\tsortedList.add(tagHolder);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsortedList.addAll(topLevelTags);\n\t\t\n\t\t//check for changes: if no changes, do nothing\n\t\tif (sortedList.size()!=unsortedList.size())\n\t\t{\n\t\t\t//error, just kick out\n\t\t\tSystem.out.println(\"Error performing mxml rearrange; tag count doesn't match\");\n\t\t\tmInternalError=\"Internal error replacing text: tag count doesn't match\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tboolean differences=false;\n\t\tfor (int i=0;i<sortedList.size();i++)\n\t\t{\n\t\t\tif (sortedList.get(i)!=unsortedList.get(i))\n\t\t\t{\n\t\t\t\tdifferences=true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!differences)\n\t\t\treturn true; //succeeded, just nothing done\n\t\t\n\t\t//reconstruct document in the sorted order\n\t\tString source=mSourceDocument.get();\n\t\tStringBuffer newText=new StringBuffer();\n\t\tfor (TagHolder tagHolder : sortedList) \n\t\t{\n\t\t\tCommonToken startToken=tokens.get(tagHolder.mStartTokenIndex);\n\t\t\tCommonToken endToken=tokens.get(tagHolder.mEndTokenIndex);\n\t\t\tString data=source.substring(startToken.getStartIndex(), endToken.getStopIndex()+1);\n\t\t\tnewText.append(data);\n\t\t}\n\t\t\n\t\tint startOffset=tokens.get(unsortedList.get(0).mStartTokenIndex).getStartIndex();\n\t\tint endOffset=tokens.get(unsortedList.get(unsortedList.size()-1).mEndTokenIndex).getStopIndex()+1;\n\t\tString oldData=mSourceDocument.get(startOffset, endOffset-startOffset);\n\t\tif (!ActionScriptFormatter.validateNonWhitespaceCharCounts(oldData, newText.toString()))\n\t\t{\n\t\t\tmInternalError=\"Internal error replacing text: new text doesn't match replaced text(\"+oldData+\")!=(\"+newText.toString()+\")\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tmSourceDocument.replace(startOffset, endOffset-startOffset, newText.toString());\n\t\t\n\t\treturn true;\n\t}",
"private void parse() {\n stack.push(documentNode);\n try {\n Token token = lexer.nextToken();\n boolean tagOpened = false;\n\n while (token.getType() != TokenType.EOF) {\n\n if (token.getType() == TokenType.TEXT) {\n TextNode textNode = new TextNode((String) token.getValue());\n ((Node) stack.peek()).addChild(textNode);\n\n } else if (token.getType() == TokenType.TAG_OPEN) {\n if (tagOpened) {\n throw new SmartScriptParserException(\"The tag was previously open but is not yet closed.\");\n }\n tagOpened = true;\n lexer.setState(LexerState.TAG);\n\n } else if (token.getType() == TokenType.TAG_NAME && token.getValue().equals(\"=\")) {\n parseEchoTag(tagOpened);\n tagOpened = false;\n\n } else if (token.getType() == TokenType.TAG_NAME && ((String) token.getValue()).matches(\"[Ff][Oo][Rr]\")) {\n parseForTag(tagOpened);\n tagOpened = false;\n\n } else if (token.getType() == TokenType.TAG_NAME && ((String) token.getValue()).matches(\"[Ee][Nn][Dd]\")) {\n parseEndTag();\n tagOpened = false;\n } else {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n token = lexer.nextToken();\n }\n if (!(stack.peek() instanceof DocumentNode)) {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n } catch (LexerException | EmptyStackException exc) {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n}",
"private static void buildTokens (Document doc, String block, boolean[] newToken,\n int offset, int nextBlockStart, boolean firstBlock) {\n int tokenStart = 0;\n \tfor (int i=1; i<=block.length(); i++) {\n \t\tif(newToken[i]) {\n \t\t\tint tokenEnd = i;\n \t\t\tFeatureSet fs = null;\n \t\t\t// if number, compute value (set value=-1 if not a number)\n \t\t\tint value = 0;\n \t\t\tfor (int j=tokenStart; j<tokenEnd; j++) {\n \t\t\t\tif (Character.isDigit(block.charAt(j))) {\n \t\t\t\t\tvalue = (value * 10) + Character.digit(block.charAt(j),10);\n \t\t\t\t} else if (block.charAt(j) == ',' && value > 0) {\n \t\t\t\t\t// skip comma if preceded by non-zero digit\n \t\t\t\t} else {\n \t\t\t\t\tvalue = -1;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t\tString type = specialTokenType.get(tokenStart + offset);\n \t\t\tif (type != null) {\n \t\t\t\tfs = new FeatureSet (\"type\", type);\n \t\t\t} else if (Character.isUpperCase(block.charAt(tokenStart))) {\n \t\t\t\tif (firstBlock ||\n \t\t\t\t // for ACE\n \t\t\t\t lastToken.equals(\"_\") ||\n \t\t\t\t lastToken.equals(\"\\\"\") || lastToken.equals(\"``\") || lastToken.equals(\"`\")) {\n \t\t\t\t\tfs = new FeatureSet (\"case\", \"forcedCap\");\n \t\t\t\t} else {\n \t\t\t\t\tfs = new FeatureSet (\"case\", \"cap\");\n \t\t\t\t}\n \t\t\t} else if (value >= 0) {\n \t\t\t\tfs = new FeatureSet (\"intvalue\", new Integer(value));\n \t\t\t} else {\n \t\t\t\tfs = new FeatureSet ();\n \t\t\t}\n \t\t\t// create token\n \t\t\tint spanEnd = (tokenEnd == block.length()) ? nextBlockStart : tokenEnd + offset;\n \t\t\tString tokenString = block.substring(tokenStart, tokenEnd);\n \t\t\trecordToken (doc, tokenString, tokenStart + offset, spanEnd, fs);\n \t\t\ttokenStart = tokenEnd;\n \t\t\tlastToken = tokenString;\n \t\t}\n \t}\n\t}",
"public List<Feature> process(String tag, String data);",
"private Vector<String> separateSubs(){\n Vector<String> subs = new Vector<String>();\n StringTokenizer st = new StringTokenizer(masterSubs, \",\");\n\n while(st.hasMoreTokens()){\n subs.add(st.nextToken().toLowerCase());\n }\n\n return subs;\n\t\t\n\t}",
"public static HashSet<Tag> parseTags(String t) throws DukeException {\n boolean isWhiteSpace = t.trim().isEmpty();\n if (isWhiteSpace) {\n throw new DukeException(MESSAGE_INVALID_TAG);\n }\n HashSet<Tag> tags = new HashSet<Tag>();\n String[] splitTags = t.split(\" \");\n Arrays.stream(splitTags).map(Tag::new).forEach(tags::add);\n return tags;\n }",
"public String makeTags(String tag, String word) {\r\n return \"<\" + tag + \">\" + word + \"</\" + tag + \">\";\r\n }",
"T transform(String line);",
"private static String convertTag(final String src) {\n final String s = TAG_NAMES.get(src);\n return s != null ? s : src;\n }",
"public Object run(Object value) {\n if (value == null)\n return null;\n StringReader input = new StringReader(value.toString());\n StringWriter withoutTags = new StringWriter();\n boolean tagOpen = false;\n int currentChar = -2;\n while (currentChar != -1) {\n try {\n currentChar = input.read();\n } catch (IOException e) {\n currentChar = -1;\n }\n if (currentChar >= 0) {\n if (currentChar == '<') {\n tagOpen = true;\n } else if (currentChar == '>') {\n tagOpen = false;\n } else if (!(tagOpen)) {\n withoutTags.write(currentChar);\n }\n } else {\n currentChar = -1; // end in any case\n }\n }\n return withoutTags.toString();\n }",
"public void test() throws IOException, SQLException\r\n\t{\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(new File(\"src/result.txt\")));\r\n\t\tList<String> sents = new ArrayList<>();\r\n\t\tBufferedReader br = new BufferedReader(new FileReader(new File(\"src/test_tmp_col.txt\")));\r\n\t\tString line = \"\";\r\n\t\tString wordseq = \"\";\r\n\t\tList<List<String>> tokens_list = new ArrayList<>();\r\n\t\tList<String> tokens = new ArrayList<>();\r\n\t\twhile((line=br.readLine())!=null)\r\n\t\t{\r\n\t\t\tif(line.trim().length()==0)\r\n\t\t\t{\r\n\t\t\t\tsents.add(wordseq);\r\n\t\t\t\ttokens_list.add(tokens);\r\n\t\t\t\twordseq = \"\";\r\n\t\t\t\ttokens = new ArrayList<>();\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tString word = line.split(\"#\")[0];\r\n\t\t\t\twordseq += word;\r\n\t\t\t\ttokens.add(word);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbr.close();\r\n\t\tfor(String sent : sents)\r\n\t\t{\r\n\t\t\tString newsURL = null;\r\n\t\t\tString imgAddress = null;\r\n\t\t\tString newsID = null;\r\n\t\t\tString saveTime = null;\r\n\t\t\tString newsTitle = null;\r\n\t\t\tString placeEntity = null;\r\n\t\t\tboolean isSummary = false;\r\n\t\t\tPair<String, LabelItem> result = extractbysentence(newsURL, imgAddress, newsID, saveTime, newsTitle, sent, placeEntity, isSummary);\r\n\t\t\t\r\n\t\t\tif(result!=null)\r\n\t\t\t{\r\n\t\t\t\r\n//\t\t\t\tSystem.out.print(result.getSecond().eventType+\"\\n\");\r\n\t\t\t\tbw.write(sent+'\\t'+result.getSecond().triggerWord+\"\\t\"+result.getSecond().sourceActor+'\\t'+result.getSecond().targetActor+\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tbw.write(sent+'\\n');\r\n\t\t\t}\r\n\t\t}\r\n\t\tbw.close();\r\n\t\t\r\n\t}",
"private java.util.ArrayList<String> textSplit(String splitted) {\n java.util.ArrayList<String> returned = new java.util.ArrayList<String>();\n String relatedSeparator = this.getLineSeparator(splitted);\n String[] pieces = splitted.split(relatedSeparator + relatedSeparator);\n String rstr = \"\";\n for (int cpiece = 0; cpiece < pieces.length; cpiece++) {\n String cstr = pieces[cpiece];\n if (rstr.length() + cstr.length() > maxLength) {\n if (!rstr.isEmpty()) {\n returned.add(rstr);\n rstr = cstr;\n }\n else {\n returned.add(cstr);\n }\n }\n else {\n if (rstr.equals(\"\")) {\n rstr = cstr;\n }\n else {\n rstr = rstr + lineSeparator + lineSeparator + cstr;\n }\n }\n if (cpiece == pieces.length - 1) {\n returned.add(rstr);\n }\n }\n return returned;\n }",
"private synchronized void tags(ViewHolder holder, int position){\n holder.tagsLL.removeAllViews();\n\n int count = 0;\n while (count < 3) {\n String tagName = \"\";\n switch (count) {\n case 0:\n tagName = tag1ArrList.get(position);\n break;\n case 1:\n tagName = tag2ArrList.get(position);\n break;\n case 2:\n tagName = tag3ArrList.get(position);\n break;\n }\n if (! tagName.equals(\"\")) {\n final TextView tagTV = Tags.newTagView(context, userUIPreferences.textSize, userUIPreferences.tagsTextColor, userUIPreferences.tagsTVParams, userUIPreferences.tagsBackgroundDrawable,\n userUIPreferences.fontStyle, userUIPreferences.userSelectedFontTF);\n tagTV.setText(tagName.replaceAll(\"_\", \" \"));\n holder.tagsLL.addView(tagTV);\n }\n else{\n break;\n }\n count ++;\n }\n }",
"private static String escapeTags(final StringBuffer buf) {\n for (int i = 0; i < buf.length(); i++) {\n char ch = buf.charAt(i);\n if (ch == '<') {\n buf.replace(i, i + 1, \"<\");\n } else if (ch == '>') {\n buf.replace(i, i + 1, \">\");\n }\n }\n return buf.toString();\n }",
"public Tag firstSentenceTags()[] { return firstSentenceTags; }",
"public String[] prepareText(String text) {\n\n Properties props = new Properties();\n\n props.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner\");\n StanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\n //apply\n Annotation document = new Annotation(text);\n pipeline.annotate(document);\n\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n ArrayList<String> result = new ArrayList<>();\n\n for (CoreMap sentence : sentences) {\n\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n // this is the text of the token\n String word = token.get(CoreAnnotations.LemmaAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(PartOfSpeechAnnotation.class);\n // this is the NER label of the token\n String ne = token.get(CoreAnnotations.NamedEntityTagAnnotation.class);\n\n if (!StringUtils.isStopWord(word)) {\n result.add(word);\n }\n\n }\n\n }\n String[] result_ar = new String[result.size()];\n\n return result.toArray(result_ar);\n }",
"private static ArrayList<FragmentNode> htmlToNodes( final String html, Font font, Color color, double superscriptScale, double subscriptScale ) {\n\n ArrayList<FragmentNode> nodeList = new ArrayList<FragmentNode>();\n\n String s = new String( html ); // operate on a copy\n\n // strip off html tags\n if ( s.startsWith( HTML_BEGIN_TAG ) ) {\n s = s.substring( HTML_BEGIN_TAG.length() );\n }\n if ( s.endsWith( HTML_END_TAG ) ) {\n s = s.substring( 0, s.length() - HTML_END_TAG.length() );\n }\n\n // convert html to nodes\n boolean done = false;\n String token = null;\n while ( !done ) {\n\n // look for the next tag of interest\n int index;\n final int subIndex = s.indexOf( SUBSCRIPT_BEGIN_TAG );\n final int supIndex = s.indexOf( SUPERSCRIPT_BEGIN_TAG );\n if ( subIndex == -1 ) {\n index = supIndex;\n }\n else if ( supIndex == -1 ) {\n index = subIndex;\n }\n else {\n index = Math.min( supIndex, subIndex );\n }\n\n if ( index == -1 ) {\n // if no tag, any remaining text appears on the normal line of text\n if ( s.length() > 0 ) {\n nodeList.add( new NormalNode( s, font, color ) );\n }\n done = true;\n }\n else {\n\n // anything before the tag of interest appears on the normal line of text\n token = s.substring( 0, index );\n if ( token.length() > 0 ) {\n nodeList.add( new NormalNode( token, font, color ) );\n }\n s = s.substring( index, s.length() );\n\n if ( s.startsWith( SUPERSCRIPT_BEGIN_TAG ) ) {\n // superscript\n index = s.indexOf( SUPERSCRIPT_END_TAG );\n if ( index == -1 ) {\n throw new UnsupportedOperationException( \"malformed HTML, missing \" + SUPERSCRIPT_END_TAG + \": \" + s );\n }\n else {\n token = s.substring( SUPERSCRIPT_BEGIN_TAG.length(), index );\n nodeList.add( new SuperscriptNode( token, font, color, superscriptScale ) );\n s = s.substring( index + SUPERSCRIPT_END_TAG.length(), s.length() );\n }\n }\n else if ( s.startsWith( SUBSCRIPT_BEGIN_TAG ) ) {\n // subscript\n index = s.indexOf( SUBSCRIPT_END_TAG );\n if ( index == -1 ) {\n throw new UnsupportedOperationException( \"malformed HTML, missing \" + SUBSCRIPT_END_TAG + \": \" + s );\n }\n else {\n token = s.substring( SUBSCRIPT_BEGIN_TAG.length(), index );\n nodeList.add( new SubscriptNode( token, font, color, subscriptScale ) );\n s = s.substring( index + SUBSCRIPT_END_TAG.length(), s.length() );\n }\n }\n else {\n // unrecognized tags (eg, <i>) are skipped and included in the next token\n s = s.substring( index + 1, s.length() );\n }\n }\n }\n\n return nodeList;\n }",
"private boolean isComplete() {\n if (this.content.charAt(0) != '<' || this.content.charAt(this.content.length() - 1) != '>') {\n throw new IllegalArgumentException(\"Invalid XML file.\");\n }\n Stack<String> xmlTags = new Stack<>();\n for (int i = 0; i < this.content.length();) {\n String currTag = \"\";\n int j = 0;\n for (j = 0; i + j < this.content.length(); ++j) {\n if (this.content.charAt(i + j) == '>') {\n currTag = this.content.substring(i, i + j + 1);\n break;\n }\n }\n String word = \"\";\n if (currTag.charAt(1) == '/') {\n word = currTag.substring(2, currTag.length() - 1);\n if (!word.equals(xmlTags.peek())) {\n throw new IllegalArgumentException(\"Invalid end tag: should be \"\n + xmlTags.peek() + \", but got \" + word);\n }\n xmlTags.pop();\n if (xmlTags.size() == 0 && i + word.length() + 3 < this.content.length() - 1) {\n throw new IllegalArgumentException(\"Content after root tag.\");\n }\n this.result.add(\"end:\" + word);\n }\n else {\n word = currTag.substring(1, currTag.length() - 1);\n if (checkTag(word)) {\n xmlTags.push(word);\n this.result.add(\"start:\" + word);\n }\n else {\n throw new IllegalArgumentException(\"Invalid tag.\");\n }\n }\n i = i + j + 1;\n for (j = i; j < this.content.length(); ++j) {\n if (this.content.charAt(j) == '<') {\n break;\n }\n }\n word = \"\";\n if (i != j) {\n word = this.content.substring(i, j);\n }\n if (word.length() > 0) {\n this.result.add(\"char:\" + word);\n }\n i = j;\n }\n return xmlTags.empty();\n }",
"private Tree<Token> convertToTreeOfTokens(Tree<String> tree) {\n Tree<Token> root = new Tree<Token>(makeOneToken(tree.getValue()));\n\n Iterator<Tree<String>> iter = tree.children();\n \n while (iter.hasNext()) {\n Tree<String> child = iter.next();\n root.addChildren(convertToTreeOfTokens(child));\n }\n return root;\n }",
"public void transformToSecondXml();",
"private void removeInsTag(ArrayList p_tags, HtmlObjects.Tag p_tag)\n {\n int i_start = 0;\n int i_end = 0;\n\n loop: for (int i = 0, max = p_tags.size(); i < max; i++)\n {\n Object o = p_tags.get(i);\n\n if (o == p_tag)\n {\n i_start = i;\n\n for (int j = i + 1; j < max; j++)\n {\n Object o1 = p_tags.get(j);\n\n if (o1 instanceof HtmlObjects.EndTag)\n {\n HtmlObjects.EndTag etag = (HtmlObjects.EndTag) o1;\n\n if (p_tag.tag.equalsIgnoreCase(etag.tag)\n && p_tag.partnerId == etag.partnerId)\n {\n i_end = j;\n break loop;\n }\n }\n }\n }\n }\n\n if (i_start >= 0 && i_end > i_start)\n {\n p_tags.subList(i_end - 1, i_end + 1).clear();\n p_tags.subList(i_start, i_start + 2).clear();\n }\n }",
"protected void computeTagNameProposals() {\n \t\t// completing the *first* tag in \"<tagname1 |<tagname2\"\n \t\t\n \t\t// Ignore attributes\n \t\tif (inAttributeRegion()) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\taddTagNameProposals(this.getElementPosition(node));\n \t\t// addEndTagNameProposals();\n \n \t}",
"public List<String> sourceString() {\n // Processing is done here\n return Arrays.asList(\"tomato\", \"carrot\", \"cabbage\");\n }",
"@Override\n public String split(String source) {\n String result = (hasEnd()) ? source.substring(getStart(), getEnd()) : source.substring(getStart());\n result = (trimmed) ? result.trim() : result;\n return wordCase.apply(result);\n }",
"private List<String> replaceTokens(final AbstractBuild<?, ?> build, final BuildListener listener,\n final List<String> params) {\n final List<String> tokenizedParams = new ArrayList<String>();\n\n for (int i = 0; i < params.size(); i++) {\n tokenizedParams.add(replaceToken(build, listener, params.get(i)));\n // params.set(i, replaceToken(build, listener, params.get(i)));\n }\n\n return tokenizedParams;\n }",
"public void tokenize(String input, List<TokenInfo> tokens);",
"default String tagsString() {\n final StringBuffer buffer = new StringBuffer();\n final String separator = \", \";\n getTags().forEach(tag -> buffer.append(tag).append(separator));\n if (buffer.length() == 0) {\n return \"\";\n } else {\n return buffer.substring(0, buffer.length() - separator.length());\n }\n }",
"protected void addContentAsTokens(Tokenizer tokenizer, Object value) {\n if (Strings.isEmpty(value)) {\n return;\n }\n String normalizedValue = NON_PREFIX_OR_WHITESPACE_CHARACTER.matcher(value.toString()).replaceAll(\"\");\n tokenizer.acceptPlain(normalizedValue, searchPrefixes::add);\n }",
"private void collapse(StringBuffer result, String text) {\n \n }",
"private static Stream<String> getTokensFromRawText(String rawText) {\n return Stream.of(rawText.split(\"\\\\s\"));\n }",
"private void parseEntities() {\n // See: https://github.com/twitter/twitter-text/tree/master/java\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractCashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractHashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractMentionedScreennamesWithIndices(getText()));\n }",
"private void processTag(String p_content)\n {\n StringBuffer tagName = new StringBuffer();\n Hashtable attributes = new Hashtable();\n boolean bEndTag;\n\n int i = eatWhitespaces(p_content, 0);\n\n bEndTag = i < p_content.length() && p_content.charAt(i) == '/';\n\n //read the tag name...\n while (i < p_content.length() &&\n !Character.isWhitespace(p_content.charAt(i)))\n {\n tagName.append(p_content.charAt(i));\n\n i++;\n }\n\n i = eatWhitespaces(p_content, i);\n\n //read the attributes...\n StringBuffer attributeName = new StringBuffer();\n StringBuffer attributeValue = new StringBuffer();\n\n while (i < p_content.length())\n {\n try\n {\n i = eatWhitespaces(p_content, i);\n\n //read the name...\n while (!Character.isWhitespace(p_content.charAt(i)) &&\n p_content.charAt(i) != '=')\n {\n attributeName.append(p_content.charAt(i));\n i++;\n }\n\n i = eatWhitespaces(p_content, i);\n if (p_content.charAt(i) == '=')\n {\n while (p_content.charAt(i) != '\"')\n {\n i++;\n }\n i++;\n while (p_content.charAt(i) != '\"')\n {\n attributeValue.append(p_content.charAt(i));\n i++;\n }\n i++;\n }\n\n attributes.put(attributeName.toString(),\n attributeValue.toString());\n\n attributeName.setLength(0);\n attributeValue.setLength(0);\n }\n catch (IndexOutOfBoundsException e)\n {\n // tough luck the TMX wasn't as well written as we thought...\n // CvdL: TODO: throw an exception!!\n }\n }\n\n if (bEndTag)\n {\n m_handler.processEndTag(tagName.substring(1),\n \"<\" + p_content + \">\");\n }\n else\n {\n m_handler.processTag(tagName.toString(), attributes,\n \"<\" + p_content + \">\");\n }\n }",
"private void closeTagOpenState() throws SAXException, IOException {\n // this can't happen in PLAINTEXT, so using not PCDATA as the condition\n if (contentModelFlag != ContentModelFlag.PCDATA\n && contentModelElement != null) {\n /*\n * If the content model flag is set to the RCDATA or CDATA states\n * but no start tag token has ever been emitted by this instance of\n * the tokeniser (fragment case), or, if the content model flag is\n * set to the RCDATA or CDATA states and the next few characters do\n * not match the tag name of the last start tag token emitted (case\n * insensitively), or if they do but they are not immediately\n * followed by one of the following characters: + U+0009 CHARACTER\n * TABULATION + U+000A LINE FEED (LF) + U+000B LINE TABULATION +\n * U+000C FORM FEED (FF) + U+0020 SPACE + U+003E GREATER-THAN SIGN\n * (>) + U+002F SOLIDUS (/) + EOF\n * \n * ...then emit a U+003C LESS-THAN SIGN character token, a U+002F\n * SOLIDUS character token, and switch to the data state to process\n * the next input character.\n */\n // Let's implement the above without lookahead. strBuf holds\n // characters that need to be emitted if looking for an end tag\n // fails.\n // Duplicating the relevant part of tag name state here as well.\n clearStrBuf();\n for (int i = 0; i < contentModelElement.length(); i++) {\n char e = contentModelElement.charAt(i);\n char c = read();\n char folded = c;\n if (c >= 'A' && c <= 'Z') {\n folded += 0x20;\n }\n if (folded != e) {\n if (i > 0 || (folded >= 'a' && folded <= 'z')) {\n if (html4) {\n err((contentModelFlag == ContentModelFlag.CDATA ? \"CDATA\"\n : \"RCDATA\")\n + \" element \\u201C\"\n + contentModelElement\n + \"\\u201D contained the string \\u201C</\\u201D, but it was not the start of the end tag. (HTML4-only error)\");\n } else {\n warn((contentModelFlag == ContentModelFlag.CDATA ? \"CDATA\"\n : \"RCDATA\")\n + \" element \\u201C\"\n + contentModelElement\n + \"\\u201D contained the string \\u201C</\\u201D, but this did not close the element.\");\n }\n }\n tokenHandler.characters(LT_SOLIDUS, 0, 2);\n emitStrBuf();\n unread(c);\n return;\n }\n appendStrBuf(c);\n }\n endTag = true;\n tagName = contentModelElement;\n char c = read();\n switch (c) {\n case ' ':\n case '\\t':\n case '\\n':\n case '\\u000B':\n case '\\u000C':\n /*\n * U+0009 CHARACTER TABULATION U+000A LINE FEED (LF) U+000B\n * LINE TABULATION U+000C FORM FEED (FF) U+0020 SPACE Switch\n * to the before attribute name state.\n */\n beforeAttributeNameState();\n return;\n case '>':\n /* U+003E GREATER-THAN SIGN (>) Emit the current tag token. */\n emitCurrentTagToken();\n /*\n * Switch to the data state.\n */\n return;\n case '\\u0000':\n /*\n * EOF Parse error.\n */\n err(\"Expected \\u201C>\\u201D but saw end of file instead.\");\n /*\n * Emit the current tag token.\n */\n emitCurrentTagToken();\n /* Reconsume the character in the data state. */\n unread(c);\n return;\n case '/':\n /*\n * U+002F SOLIDUS (/) Parse error unless this is a permitted\n * slash.\n */\n // never permitted here\n err(\"Stray \\u201C/\\u201D in end tag.\");\n /* Switch to the before attribute name state. */\n beforeAttributeNameState();\n return;\n default:\n if (html4) {\n err((contentModelFlag == ContentModelFlag.CDATA ? \"CDATA\"\n : \"RCDATA\")\n + \" element \\u201C\"\n + contentModelElement\n + \"\\u201D contained the string \\u201C</\\u201D, but it was not the start of the end tag. (HTML4-only error)\");\n } else {\n warn((contentModelFlag == ContentModelFlag.CDATA ? \"CDATA\"\n : \"RCDATA\")\n + \" element \\u201C\"\n + contentModelElement\n + \"\\u201D contained the string \\u201C</\\u201D, but this did not close the element.\");\n }\n tokenHandler.characters(LT_SOLIDUS, 0, 2);\n emitStrBuf();\n cstart = pos; // don't drop the character\n return;\n }\n } else {\n /*\n * Otherwise, if the content model flag is set to the PCDATA state,\n * or if the next few characters do match that tag name, consume the\n * next input character:\n */\n char c = read();\n if (c >= 'A' && c <= 'Z') {\n /*\n * U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL\n * LETTER Z Create a new end tag token,\n */\n endTag = true;\n clearStrBuf();\n /*\n * set its tag name to the lowercase version of the input\n * character (add 0x0020 to the character's code point),\n */\n appendStrBuf((char) (c + 0x20));\n /*\n * then switch to the tag name state. (Don't emit the token yet;\n * further details will be filled in before it is emitted.)\n */\n tagNameState();\n return;\n } else if (c >= 'a' && c <= 'z') {\n /*\n * U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL\n * LETTER Z Create a new end tag token,\n */\n endTag = true;\n clearStrBuf();\n /*\n * set its tag name to the input character,\n */\n appendStrBuf(c);\n /*\n * then switch to the tag name state. (Don't emit the token yet;\n * further details will be filled in before it is emitted.)\n */\n tagNameState();\n return;\n } else if (c == '>') {\n /* U+003E GREATER-THAN SIGN (>) Parse error. */\n err(\"Saw \\u201C</>\\u201D.\");\n /*\n * Switch to the data state.\n */\n return;\n } else if (c == '\\u0000') {\n /* EOF Parse error. */\n err(\"Saw \\u201C</\\u201D immediately before end of file.\");\n /*\n * Emit a U+003C LESS-THAN SIGN character token and a U+002F\n * SOLIDUS character token.\n */\n tokenHandler.characters(LT_SOLIDUS, 0, 2);\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n } else {\n /* Anything else Parse error. */\n err(\"Garbage after \\u201C</\\u201D.\");\n /*\n * Switch to the bogus comment state.\n */\n clearLongStrBuf();\n appendToComment(c);\n bogusCommentState();\n return;\n }\n }\n }",
"String convertTag(String tag);",
"String[] getTags() {\n if (sections == null) {\n return null;\n }\n\n Vector<String> tagV = new Vector<>(sections.length * 2);\n\n for (Section section : sections) {\n String[] names = section.getOutputNames();\n\n Collections.addAll(tagV, names);\n } // outer for\n\n return tagV.toArray(new String[tagV.size()]);\n }",
"private static boolean[] splitIntoTokens (String blockString, int blockStart, boolean lastBlock) {\n\tchar[] block = blockString.toCharArray();\n\tint blockLength = block.length;\n\tboolean[] newToken = new boolean[blockLength+1];\n\tnewToken[blockLength] = true;\n\t// except for \".\" , make any non-alphanumeric a separate token\n\tfor (int i=0; i<blockLength; i++) {\n\t\tchar c = block[i];\n\t\tif (!(Character.isLetterOrDigit(c) || c =='.')) {\n\t\t\tnewToken[i] = true;\n\t\t\tnewToken[i+1] = true;\n\t\t}\n\t}\n\t// make ``, '', --, and ... single tokens\n\tfor (int i=0; i<blockLength-1; i++) {\n\t\tchar c = block[i];\n\t\tif ((c == '`' || c == '\\'' || c == '-') && c == block[i+1]\n\t\t && newToken[i]) {\n\t\t\tnewToken[i+1] = false;\n\t\t}\n\t}\n\tfor (int i=0; i<blockLength-2; i++) {\n\t\tif (block[i] == '.' && block[i+1] == '.' &&\n\t\t block[i+2] == '.' && newToken[i]) {\n\t\t\tnewToken[i+1] = false;\n\t\t\tnewToken[i+2] = false;\n\t\t}\n\t}\n\t// make comma a separate token unless surrounded by digits\n\tfor (int i=1; i<blockLength-2; i++) {\n\t\tif (block[i] == ',' && Character.isDigit(block[i-1]) &&\n\t\t Character.isDigit(block[i+1])) {\n\t\t\tnewToken[i] = false;\n\t\t\tnewToken[i+1] = false;\n\t\t}\n\t}\n\t// make period a separate token if this is the last block\n\t// [of a sentence] and the period is final or followed by [\"'}>)] or ''\n\t// Note that this may split off the period even if the token is an\n\t// abbreviation.\n\tif (lastBlock) {\n\t\tif (block[blockLength-1] == '.') {\n\t\t\tnewToken[blockLength-1] = true;\n\t\t} else if (blockLength > 1 && block[blockLength-2] == '.' &&\n\t\t \"\\\"'}>)\".indexOf(block[blockLength-1]) >= 0) {\n\t\t newToken[blockLength-2] = true;\n\t\t} else if (blockLength > 2 && block[blockLength-3] == '.' &&\n\t\t block[blockLength-2] == '\\'' &&\n\t\t block[blockLength-1] == '\\'') {\n\t\t newToken[blockLength-3] = true;\n\t\t}\n\t}\n\t// split off standard 2 and 3-character suffixes ('s, n't, 'll, etc.)\n\tfor (int i=0; i<blockLength-2; i++) {\n\t\tif (newToken[i+3] && suffixes3.contains(blockString.substring(i,i+3))){\n\t\t\tnewToken[i] = true;\n\t\t\tnewToken[i+1] = false;\n\t\t\tnewToken[i+2] = false;\n\t\t}\n\t}\n\tfor (int i=0; i<blockLength-1; i++) {\n\t\tif (newToken[i+2] && suffixes2.contains(blockString.substring(i,i+2))){\n\t\t\tnewToken[i] = true;\n\t\t\tnewToken[i+1] = false;\n\t\t}\n\t}\n\t// make &...; a single token (probable XML escape sequence)\n\tfor (int i=0; i<blockLength-1; i++) {\n\t\tif (block[i] == '&') {\n\t\t\tfor (int j=i+1; j<blockLength; j++) {\n\t\t\t\tif (block[j] == ';') {\n\t\t\t\t\tfor (int k=i+1; k<=j; k++) {\n\t\t\t\t\t\tnewToken[k] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor (int i=0; i<blockLength; i++) {\n\t\tInteger tokenEnd = specialTokenEnd.get(blockStart + i);\n\t\tif (tokenEnd != null) {\n\t\t\tnewToken[i] = true;\n\t\t\tfor (int j=i+1; j<blockLength && j+blockStart < tokenEnd; j++) {\n\t\t\t\tnewToken[j] = false;\n\t\t\t}\n\t\t}\n\t}\n\treturn newToken;\n}",
"private List<String> ListTransform(Object value) {\n\n if (value.toString().contains(lineDelimiter))\n return Arrays.asList(value.toString().split(lineDelimiter));\n\n List<String> lines = new ArrayList<>();\n if (!value.toString().equals(\"\"))\n lines.add(value.toString());\n\n return lines;\n }",
"public ArrayList<String> getStringListFromHtmlText(@NotNull String htmlText, @NotNull String startTag, @NotNull String endTag) {\n final ArrayList<String> list = new ArrayList<>();\n try {\n String completeRegex = startTag + \"(.+?)\" + endTag;\n Pattern TAG_REGEX = Pattern.compile(completeRegex, Pattern.DOTALL);\n final Matcher matcher = TAG_REGEX.matcher(htmlText);\n while (matcher.find()) {\n list.add(matcher.group(1));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return list;\n }",
"private List<Tag> getTags(String text, boolean orderAlpha) {\r\n\t\tif (text != null)\r\n\t\t\tparseText(text);\r\n\t\tList<Tag> tags = new ArrayList<Tag>();\r\n\t\t// remplissage de la Liste des Tags\r\n\t\tEnumeration e = words.keys();\r\n\t\twhile (e.hasMoreElements()) {\r\n\t\t\tObject key = e.nextElement();\r\n\t\t\tString name = (String) key;\r\n\t\t\tint frequency = ((Integer) words.get(key)).intValue();\r\n\r\n\t\t\tTag tag = new Tag(frequency, frequency, name, name);\r\n\t\t\ttags.add(tag);\r\n\r\n\t\t}\r\n\t\twords = null;\r\n\r\n\t\tremovePlurals(tags);\r\n\t\tsortByFrequencyDesc(tags);\r\n\t\treduceToMaxNumbOfTags(tags);\r\n\t\tallocateClasses(tags);\r\n\t\tif (orderAlpha)\r\n\t\t\tsortTagNamesAsc(tags);\r\n\t\treturn tags;\r\n\r\n\t}",
"public StringBuilder getTags () {\n return tags;\n }",
"java.util.List<speech_formatting.SegmentedTextOuterClass.TokenSegment> \n getTokenSegmentList();",
"Stream<List<Term>> toSentences(List<Integer> intText, List<Term> termText);",
"private String[] getTags() {\n String[] tags = new String[10];\n Node temp = head;\n int i = 0;\n\n while ((temp != null) && i < 10) {\n tags[i] = temp.message;\n temp = temp.next;\n i++;\n }\n return tags;\n }",
"static String[] getChunksOfTemplate(String template) {\n int p = template.indexOf(DELIM);\n if (p >= 0) {\n String[] result = new String[2];\n result[0] = template.substring(0, p);\n result[1] = template.substring(p + DELIM.length());\n return result;\n } else {\n String[] result = new String[1];\n result[0] = template;\n return result;\n }\n\n }",
"private void tokenizar(){\r\n String patron = \"(?<token>[\\\\(]|\\\\d+|[-+\\\\*/%^]|[\\\\)])\";\r\n Pattern pattern = Pattern.compile(patron);\r\n Matcher matcher = pattern.matcher(this.operacion);\r\n \r\n String token;\r\n \r\n while(matcher.find()){\r\n token = matcher.group(\"token\");\r\n tokens.add(token);\r\n \r\n }\r\n \r\n }",
"@Override\n public Collection process(Collection tmObjs) throws JspTagException {\n if (tmObjs == null || tmObjs.isEmpty()) {\n return Collections.EMPTY_SET;\n } else {\n List sourceLocators = new ArrayList();\n Iterator iter = tmObjs.iterator();\n \n while (iter.hasNext()) {\n try {\n TMObjectIF tmObj = (TMObjectIF) iter.next();\n // get all source locators as LocatorIF objects\n if (tmObj != null) {\n sourceLocators.addAll( tmObj.getItemIdentifiers() );\n }\n } catch (ClassCastException e) {\n }\n }\n return sourceLocators;\n }\n }",
"@Override\n\tpublic void characters(char ch[], int start, int len) throws SAXException {\n\t\ttry {\n\t\t\tif (!startTagIsClosed) {\n\t\t\t\twrite('>');\n\t\t\t\tstartTagIsClosed = true;\n\t\t\t}\n\t\t\twriteEsc(ch, start, len, false);\n\t\t\tsuper.characters(ch, start, len);\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}",
"@SuppressWarnings(\"unused\")\n\tprivate void removeTags(File file)\n\t{\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(Main.id + \".html\"));\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = br.readLine();\n\t\t\tSystem.out.println(\"reading..\");\n\t\t\twhile (line != null) {\n\t\t\t\tsb.append(line);\n\t\t\t\tsb.append(System.lineSeparator());\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tString everything = sb.toString();\n\n\t\t\tDocument doc = Jsoup.parse(everything);\n\t\t\tPrintWriter writer = new PrintWriter(Main.id + \".html\");\n\n\t\t\tString text = doc.text().replaceAll(\" \", System.getProperty(\"line.separator\"));\n\n\t\t\twriter.write(text);\n\t\t\twriter.close();\n\n\t\t\tSystem.out.println(doc.text());\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tbr.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}",
"List<String> tokenize1(String doc) {\n List<String> res = new ArrayList<String>();\n\n for (String s : doc.split(\"[\\\\p{Punct}\\\\s]+\"))\n res.add(s);\n return res;\n }",
"@Override\n public void flatMap(String value, Collector<Tuple2<String, Integer>> out) {\n String[] tokens = value.toLowerCase().split(\"\\\\W+\");\n\n // emit the pairs\n for (String token : tokens) {\n if (token.length() > 0) {\n out.collect(new Tuple2<>(token, 1));\n }\n }\n }",
"@Override\n\t\tprotected void map(Object key, Text value, Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tStringTokenizer str=new StringTokenizer(value.toString());\n//\t\t\tString[]str=new String(value.toString()).split(\"a\");\n\t\t\twhile(str.hasMoreTokens()){\n\t\t\t\tword.set(str.nextToken());\n\t\t\t\tcontext.write(word, one);\n\t\t\t\t}\n//\t\t\tfor(String b:str){\n//\t\t\t\tword.set(b);\n//\t\t\t\tcontext.write(word, one);\n//\t\t\t\t\n//\t\t\t}\n\t\t\t\n\t\t}",
"public TagParser(String input, TaskList lines) {\n this.input = input;\n this.lines = lines;\n }",
"List<String> tokenize0(String doc) {\n List<String> res = new ArrayList<String>();\n\n for (String s : doc.split(\"\\\\s+\"))\n res.add(s);\n return res;\n }",
"public static String extractTokens(KSuccessorRelation<NetSystem, Node> rel) {\n\t\t\n\t\tString tokens = \"\";\n\t\tfor (Node[] pair : rel.getSuccessorPairs()) {\n\t\t\t\n\t\t\tString l1 = pair[0].getLabel();\n\t\t\tString l2 = pair[1].getLabel();\n\t\t\t\n\t\t\tif (NodeAlignment.isValidLabel(l1) && NodeAlignment.isValidLabel(l2)) {\n\t\t\t\ttokens += join(processLabel(l1),WORD_SEPARATOR) + \n\t\t\t\t\t\t RELATION_SYMBOL + \n\t\t\t\t\t\t join(processLabel(l2),WORD_SEPARATOR) + \n\t\t\t\t\t\t WHITESPACE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// no relations have been found (because the query contained only single activities)\n\t\t//if (tokens.isEmpty()) {\n\t\t\tfor (Node n : rel.getEntities()) {\n\t\t\t\tString l = n.getLabel();\n\t\t\t\tif (NodeAlignment.isValidLabel(l)) {\n\t\t\t\t\ttokens += join(processLabel(l), WORD_SEPARATOR) + WHITESPACE;\n\t\t\t\t}\n\t\t\t}\n\t\t//}\n\t\t\n\t\treturn tokens;\n\t}"
] | [
"0.60084295",
"0.58829343",
"0.56477123",
"0.5485509",
"0.5237322",
"0.5096884",
"0.5003122",
"0.4970288",
"0.4959589",
"0.49548158",
"0.49441087",
"0.49441087",
"0.4888941",
"0.48044407",
"0.47910252",
"0.47511664",
"0.47338122",
"0.4732108",
"0.4731486",
"0.47281072",
"0.4726134",
"0.47162828",
"0.47135878",
"0.47094473",
"0.47020373",
"0.47010142",
"0.46697327",
"0.466572",
"0.46584144",
"0.46445543",
"0.46317497",
"0.46289325",
"0.4598522",
"0.45930102",
"0.4565494",
"0.4563704",
"0.45437932",
"0.45413122",
"0.45327428",
"0.45149642",
"0.45128545",
"0.45057687",
"0.44930577",
"0.448906",
"0.44877806",
"0.4484115",
"0.44838005",
"0.44643942",
"0.44611266",
"0.44596088",
"0.44568837",
"0.44394755",
"0.44324532",
"0.44264147",
"0.44110346",
"0.43981996",
"0.43972728",
"0.4396894",
"0.43950182",
"0.43923298",
"0.4390308",
"0.43837285",
"0.43801948",
"0.43731394",
"0.4365018",
"0.43642145",
"0.4362657",
"0.43598405",
"0.4357164",
"0.43486333",
"0.43437728",
"0.43434396",
"0.4343122",
"0.4337985",
"0.43341142",
"0.4326671",
"0.43245813",
"0.43129086",
"0.43104967",
"0.43079764",
"0.42944202",
"0.4291863",
"0.42875904",
"0.42859447",
"0.4281969",
"0.42688328",
"0.42614013",
"0.4256557",
"0.42559487",
"0.4255683",
"0.42446408",
"0.4241862",
"0.42390135",
"0.42352608",
"0.42279205",
"0.42259163",
"0.4225893",
"0.42145455",
"0.42038545",
"0.42017812"
] | 0.650477 | 0 |
Calculates the area of a triangle | public void calcArea(){
double p=(side1+side2+side3)/2;
area=p*(p-side1)*(p-side2)*(p-side3);
area=Math.sqrt(area);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double TriangleAreaCal()\n\t{\n\t\tdouble x;\n\t\tx = Math.toRadians(60);\n\t\tdouble area = (Math.pow(this.length, 2) * Math.sin(x))/2;\n\t\treturn area;\n\t}",
"double area() {\n System.out.println(\"Inside Area for Triangle.\");\n return dim1 * dim2 / 2;\n }",
"public static double area(Triangle triangle) {\n Vector3f a = triangle.get1();\n Vector3f b = triangle.get2();\n Vector3f c = triangle.get3();\n\n Vector3f ab = b.subtract(a); // TODO garbage\n Vector3f ac = c.subtract(a);\n\n Vector3f cross = ab.cross(ac); // TODO garbage\n double areaSquared = MyVector3f.lengthSquared(cross) / 4.0;\n double area = Math.sqrt(areaSquared);\n\n return area;\n }",
"public double triangleArea(double width, double height)\n\t{\n\t\treturn (width*height)/2;\n\t}",
"public static double triangleArea(double base, double height){\n double area;\n return area = (.5 * base)*height;\n }",
"double area() {\nSystem.out.println(\"Inside Area for Triangle.\");\nreturn dim1 * dim2 / 2;\n}",
"double area();",
"@Test\n public void isTriangle() {\n\t\tPoint a = new Point(1, 3);\n Point b = new Point(2, -5);\n Point c = new Point(-8, 4);\n Triangle triangle = new Triangle(a, b, c);\n\t\tdouble result = triangle.area();\n\t\tdouble expected = 35.5;\n\t\tassertThat(result, is(expected));\n }",
"double calculateArea();",
"float triangleArea(tPoint p2)\n {\n float area = (((this.p1.x - this.p0.x) * (p2.y - this.p0.y)) - \n ((p2.x - this.p0.x) * (this.p1.y - this.p0.y)));\n return area;\n }",
"public static double area_triangle(double base, double height){\n\t\t// A = 1/2 * b * h\n\t\tdouble area;\n\t\tarea = 1.0/2.0 * base * height;\n\t\treturn area;\n\t}",
"public double area();",
"public double getArea(){\n double p = (side1 + side2 + side3) / 2;\n return Math.sqrt(p * (p - side1) * (p - side2) * (p - side3));\n }",
"public abstract float area();",
"public double area()\n\t{\n\t\t// To recognize points, their angles must be compared - middle one always represents the opposing point.\n\t\tdouble angleXAB = pointA.calculateLineAngle(pointB);\n\t\tdouble angleXAC = pointA.calculateLineAngle(pointC);\n\t\tdouble angleXAD = pointA.calculateLineAngle(pointD);\n\t\t\n\t\tTriangle first;\n\t\tTriangle second;\n\n\t\t// Creates triangles based on angles comparison.\n\t\t// opposite is XAD\n\t\tif(angleXAB > angleXAC)\n\t\t\t// opposite is XAC\n\t\t\tif(angleXAC > angleXAD)\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointB, pointD);\n\t\t\t\tsecond = new Triangle (pointB, pointD, pointC);\n\t\t\t} // if\n\t\t\t// opposite is XAB\n\t\t\telse if (angleXAD > angleXAB)\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointC, pointD);\n\t\t\t\tsecond = new Triangle (pointB, pointD, pointC);\n\t\t\t} // else if\t\n\t\t\t// opposite is XAD\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointB, pointC);\n\t\t\t\tsecond = new Triangle (pointD, pointB, pointC);\n\t\t\t} // else\n\n\t\telse\t\n\t\t\t// opposite is XAC\n\t\t\tif(angleXAD > angleXAC)\t\t\t\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointB, pointD);\n\t\t\t\tsecond = new Triangle (pointB, pointD, pointC);\n\t\t\t} // if \n\t\t\t// opposite is XAD\n\t\t\telse if (angleXAD > angleXAB)\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointC, pointD);\n\t\t\t\tsecond = new Triangle (pointB, pointD, pointC);\n\t\t\t} // else if \n\t\t\t// opposite is XAB\n\t\t\telse \t\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointC, pointD);\n\t\t\t\tsecond = new Triangle (pointB, pointD, pointC);\n\t\t\t} // else\t\n\t\t\t\t\t\n\t\treturn \tfirst.area() + second.area();\n\t}",
"@Override\n\tpublic double getArea(){\n\t\tdouble ab_ac_area = get_triangle_area(getVector_AB(),getVector_AC());\n\t\t\n\t\t//area of vector ac and ad\n\t\tdouble ac_ad_area = get_triangle_area(getVector_AC(),getVector_AD());\n\t\t\n\t\t//area of vector ab and ad\n\t\tdouble ab_ad_area = get_triangle_area(getVector_AC(),getVector_AD());\n\t\t\n\t\t//area of vector bc and bd\n\t\tdouble bc_ad_area = get_triangle_area(getVector_BC(),getVector_BD());\n\t\t\n\t\t//sum \n\t\treturn ab_ac_area + ac_ad_area + ab_ad_area + bc_ad_area;\n\t}",
"abstract double area();",
"abstract double area();",
"abstract double area();",
"abstract double area();",
"public double area()\r\n {\r\n float dx = tr.getX() - bl.getX();\r\n float dy = tr.getY() - bl.getY();\r\n return dx*dy;\r\n }",
"public double area() {\n\t\tif (area != 0)\n\t\t\treturn area;\n\n\t\tPoint current = vertices.get(0);\n\t\tfor (int i = 1; i < vertices.size(); i++) {\n\t\t\tPoint next = vertices.get(i);\n\t\t\tarea += current.crossProduct(next);\n\t\t\tcurrent = next;\n\t\t}\n\n\t\torientation = area > 0 ? \"CCW\" : \"CW\";\n\t\tarea = Math.abs(area / 2);\n\n\t\treturn area;\n\t}",
"public static void findArea(double side1,double side2,double side3) {\n\t\tdouble a = side1;\n\t\tdouble b = side2;\n\t\tdouble c = side3;\n\t\tSystem.out.println(\"a : \"+a);\n\t\tSystem.out.println(\"b : \"+b);\n\t\tSystem.out.println(\"c : \"+c);\n\n\n\t\tdouble s = (a+b+c)/2;\n\t\tdouble area = sqrt(s*(s-a)*(s-b)*(s-c));\n\t\tSystem.out.println(\"Area of Triangle is \"+area);\n\t}",
"public void area()\n {\n float s= (float) (0.5 * a * b);\n double areaOfTraingle = (float)Math.sqrt((s - a) * (s - b) * (s - c));\n //using math function for square root operation\n System.out.println(\"Area of traiangle : \"+ areaOfTraingle);\n }",
"public static double area(double side1, double side2, double side3) {\n\t double s = (side1 + side2 + side3) / 2;\n\t double area = Math.pow(s * (s - side1) * (s - side2) * (s - side3) , 0.5);\n\t \n\t return area;\n\t}",
"public double area(){\r\n\t\treturn this.base()*this.altezza();\r\n\t}",
"@Override\n public double getArea() {\n double s = (a + b + c) / 2;\n return Math.sqrt(s * (s - a) * (s - b) * (s - c));\n }",
"public void calArea()\n {\n //Start of the formula\n for(int i = 0; i < sides-1; i++)\n {\n area += (poly[i].getX()*poly[i+1].getY())-(poly[i].getY()*poly[i+1].getX());\n }\n\n //half the total calculation\n area = area/2;\n\n //if area is negative times by -1\n if(area <= 0)\n {\n area = area*-1;\n }\n }",
"static Double computeArea() {\n // Area is height x width\n Double area = height * width;\n return area;\n }",
"public abstract double computeArea();",
"double getArea();",
"double getArea();",
"@Override\n public double area() {\n double P = this.perimeter() / 2;\n double result = Math.sqrt(P * (P - side1) * (P - side2) * (P - side3));\n return result;\n }",
"public void triangle(){\n Shape triangle = new Shape();\n triangle.addPoint(new Point(0,0));\n triangle.addPoint(new Point(6,0));\n triangle.addPoint(new Point(3,6));\n for (Point p : triangle.getPoints()){\n System.out.println(p);\n }\n double peri = getPerimeter(triangle);\n System.out.println(\"perimeter = \"+peri);\n }",
"public abstract double calculateArea();",
"public abstract double calculateArea();",
"public double computeArea()\n {\n int len = _points.size();\n Point p1 = _points.get(len - 1);\n\n double area = 0.0;\n\n // Compute based on Green's Theorem.\n for(int i = 0; i < len; i++)\n {\n Point p2 = _points.get(i);\n area += (p2.x + p1.x)*(p2.y - p1.y);\n p1 = p2; // Shift p2 to p1.\n }\n\n return -area / 2.0;\n }",
"public double area() \n {\n double area = 0;\n for (Line2D line : lines) \n {\n area += line.getP1().getX() * line.getP2().getY();\n area -= line.getP2().getX() * line.getP1().getY();\n }\n area /= 2.0;\n return Math.abs(area);\n }",
"static double polygonArea(Triangulator triRef, int ind) {\n\tint hook = 0;\n\tint ind1, ind2;\n\tint i1, i2;\n\tdouble area = 0.0, area1 = 0;\n\n\tind1 = ind;\n\ti1 = triRef.fetchData(ind1);\n\tind2 = triRef.fetchNextData(ind1);\n\ti2 = triRef.fetchData(ind2);\n\tarea = Numerics.stableDet2D(triRef, hook, i1, i2);\n\n\tind1 = ind2;\n\ti1 = i2;\n\twhile (ind1 != ind) {\n\t ind2 = triRef.fetchNextData(ind1);\n\t i2 = triRef.fetchData(ind2);\n\t area1 = Numerics.stableDet2D(triRef, hook, i1, i2);\n\t area += area1;\n\t ind1 = ind2;\n\t i1 = i2;\n\t}\n\n\treturn area;\n }",
"public abstract float calArea();",
"public double area(){\n\t\tdouble area=length*width;\r\n\t\treturn area;\r\n\t}",
"public double area() {\n double sum = 0.0;\n for (int i = 0; i < N; i++) {\n sum = sum + (a[i].x * a[i+1].y) - (a[i].y * a[i+1].x);\n }\n return 0.5 * sum;\n }",
"public double area()\n {\n double area = length * width;\n //System.out.println(area);\n return area;\n }",
"public static double Triangle(double L, double W) {\n\tdouble area = .5 * L *W;\n\treturn area;\n}",
"@Override\n\tpublic double getArea() {\n\t\tdouble p = getPerimeter() / 2;\n\t\tdouble s = p * ((p - side1) * (p - side2) * (p - side3));\n\t\tdouble Area = Math.sqrt(s);\n\t\treturn Area;\n\t}",
"public void getArea() {\n\t\ts = (double) (a + b + c) / 2;\n\t\tarea = Math.sqrt(s * (s - a) * (s - b) * (s - c));\n\t\tSystem.out.println(\"Area: \" + area);\n\t}",
"public double area(){\n return (base*height) / 2;\n }",
"public double calculateArea(){\r\n\t\treturn this.getSide()*this.getSide();\r\n}",
"public double area()\n {\n return PdVector.area(p1, p2, p3);\n }",
"public double getArea();",
"public double getArea();",
"public double getArea();",
"public double getArea (){\n int area = length * length;\n System.out.println(area);\n return area;\n }",
"public double Area() {\r\n \treturn(getLength() * getWidth());\r\n }",
"public static float area(float side) {\n return side * side;\n }",
"public double largestTriangleArea(int[][] points) {\n int N = points.length;\n double area = 0f;\n for (int i = 0; i < N; i++) {\n for (int j = i + 1; j < N; j++) {\n for (int k = j + 1; k < N; k++) {\n area = Math.max(area, shoelaceFormula(points[i], points[j], points[k]));\n }\n }\n }\n return area;\n }",
"@Override\r\n\tpublic double area() {\r\n\r\n\t\treturn this.sideA*this.sideB;\r\n\t}",
"public double area() {\n\t\treturn width*length;\n\t}",
"public double getArea() {\n /*\n * area = base (1o lado ou 3o lado) x altura (2o lado ou 4o lado)\n */\n\n return this.getLado(1) * this.getLado(2);\n }",
"private double calculaArea(){\r\n double area;\r\n area= (double) (Math.pow((cir.getY()-cir.getX()), 2)*Math.PI);\r\n return area;\r\n \r\n }",
"public int area() {\n \tarea = width()*height();\n }",
"@Override\n\tvoid findArea(double dim1, double dim2) {\n\t\tSystem.out.println(\"The area of Triangle: \"+(0.5*dim1*dim2));\n\t}",
"public int area() {\r\n\t\tint area = (getLength()) * (getBreath());\r\n\t\treturn (area);\r\n\t}",
"public double calcArea() {\r\n\t\tdouble area = length * width;\r\n\t\treturn area;\r\n\t}",
"public double getArea() { return Math.sqrt(s * (s - d12) * (s - d23) * (s - d31)); }",
"@Override\n\tpublic double getArea() {\n\t\treturn Math.pow(getSide(), 2) * this.N / 4 * (Math.tan(Math.toRadians(180 / this.N)));\n\t}",
"public float area() {\n return (base * haltura / 2);\r\n }",
"static double area(double AB, double BC, double CA) {\n double s = 0.5 * perimeter(AB, BC, CA); // semiperimeter\n return Math.sqrt(s) * Math.sqrt(s - AB) * Math.sqrt(s - BC) * Math.sqrt(s - CA);\n }",
"public abstract float getArea();",
"public double findArea(){\n\t\tdouble area= (0.5*(length * width));\n\t\treturn area;\n\t}",
"protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }",
"public float area(){\r\n return (float)Math.PI*(float)Math.pow(radio, 2);\r\n }",
"public double area() {\n return (width * height);\n }",
"double getArea(double width){\n return width*width;\n }",
"public double areaUnsigned() \n {\n double area = 0;\n for (Line2D line : lines) \n {\n area += line.getP1().getX() * line.getP2().getY();\n area -= line.getP2().getX() * line.getP1().getY();\n }\n area /= 2.0;\n return area;\n }",
"public double getArea() {\n\t\tdouble area = Math.round(2 * Math.pow(sideLength, 2) * \n\t\t\t\t(1 + Math.sqrt(2)));\n\t\t\n\t\treturn area;\n\t}",
"double area() {\n System.out.println(\"Inside Area for Rectangle.\");\n return dim1 * dim2;\n }",
"private void getArea() {\n\t\tdouble a = 0;\n\t\tint n = points.length;\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\ta += (points[i-1].x + points[i].x) * (points[i-1].y - points[i].y);\n\t\t}\n\t\t// process last segment if ring is not closed\n\t\tif (!points[0].equals(points[n-1])) {\n\t\t\ta += (points[n-1].x + points[0].x) * (points[n-1].y - points[0].y);\n\t\t}\n\t\tarea = Math.abs(a / 2);\n\t}",
"@Override\n public double area()\n {\n\treturn (double) length * width;\n }",
"public static void main(String[] args) {\n\n /* variables that hold the side of a triangle */\n double sideA;\n double sideB;\n double sideC;\n \n double area;\n double perimeter;\n \n double s; // variable need to calculate the area\n \n Scanner scan = new Scanner(System.in); //scanner to take user input\n \n /* formating for the numbers */\n DecimalFormat decimalFormat = new DecimalFormat(\"0.000\");\n \n \n /* ask for user input */\n System.out.print(\"Enter side A's value: \");\n sideA = scan.nextDouble();\n \n System.out.print(\"Enter side B's value: \");\n sideB = scan.nextDouble();\n \n System.out.print(\"Enter side C's value: \");\n sideC = scan.nextDouble();\n \n /* calculate perimeter, s, and area */\n perimeter = sideA + sideB + sideC;\n s = perimeter / 2.0;\n area = sqrt(s * (s - sideA) * (s - sideB) * (s - sideC));\n \n /* output results */\n System.out.println(\"The perimeter of the triangle is \" \n + decimalFormat.format(perimeter) + \" and the area is \" \n + decimalFormat.format(area));\n \n scan.close(); //close scanner\n \n }",
"public double area() {\n return Math.PI * r * r;\n }",
"public double area() {\n\t\treturn width * height;\n\t}",
"public double calcArea()\n\t{\n\t\treturn (double) oneside * oneside;\n\t}",
"double area() {\r\n\t\treturn Math.PI*r*r;\r\n\t\t//return (int)((Math.PI*r*r + 0.005) * 100) / 100.0;\r\n\t}",
"double getArea(){\n return 3.14 * raggio * raggio;\n }",
"public double getArea(){\n if (getHeight()<0 || getWidth()<0){\n System.out.println(\"Input Invalid\");\n return -1;\n }\n return (getWidth() * getHeight());\n }",
"public float area() {\n return (getBase() * getAltura() )/ 2;\n }",
"public abstract double getArea();",
"public abstract double getArea();",
"public abstract double getArea();",
"public static double area(double length, double breadth) {\n return length * breadth;\n }",
"@Override\n\tpublic double area() {\n\t\treturn l*b;\n\t}",
"public int area()\n\t{\n\t\treturn length*width;\n\t}",
"public static float area(float base, float height) {\n return (base * height) / 2;\n }",
"@Override\r\n public double calculateArea() {\n double area = 0;\r\n return area;\r\n }",
"public static double areaTri (double c, double d) {\n\t\tdouble area = .5 * c * d; \n\t\treturn area;\n\t}",
"public double area() {\n\t\treturn Math.PI*r*r;\n\t}",
"public static double area(double side){\n\n double area = 0.0;\n area = ((5 * Math.pow(side, 2)) / (4 * (Math.tan(Math.PI / 5))));\n return area;\n\n }",
"public double calculateArea() {\r\n return PI * radius * radius;\r\n }",
"public double calculateArea()\n {\n return (Math.PI * radius) * (Math.PI * radius);\n }"
] | [
"0.83209693",
"0.80640775",
"0.80503815",
"0.8042826",
"0.7797992",
"0.76550996",
"0.75900036",
"0.7588481",
"0.75729185",
"0.7560489",
"0.7498061",
"0.74617887",
"0.7344327",
"0.73176587",
"0.72922015",
"0.7283809",
"0.72772354",
"0.72772354",
"0.72772354",
"0.72772354",
"0.72441816",
"0.7173268",
"0.7097447",
"0.7085336",
"0.70753914",
"0.7067391",
"0.7050421",
"0.7050242",
"0.70428395",
"0.70424676",
"0.7036038",
"0.7036038",
"0.70278126",
"0.7018346",
"0.70103806",
"0.70103806",
"0.7008553",
"0.70083654",
"0.6999042",
"0.69878936",
"0.6986893",
"0.69693416",
"0.6935592",
"0.69289416",
"0.6909642",
"0.690882",
"0.6903583",
"0.68890584",
"0.6873352",
"0.6849857",
"0.6849857",
"0.6849857",
"0.6836792",
"0.6776565",
"0.67620474",
"0.67558575",
"0.675481",
"0.6739166",
"0.6720269",
"0.67087775",
"0.6705882",
"0.67046356",
"0.66925925",
"0.6687941",
"0.66783965",
"0.6669846",
"0.666288",
"0.6627555",
"0.6627091",
"0.662559",
"0.6624043",
"0.6620928",
"0.6620816",
"0.66188383",
"0.66167957",
"0.66113657",
"0.66052103",
"0.66023284",
"0.6595286",
"0.6563021",
"0.65573156",
"0.6554989",
"0.6546487",
"0.65442044",
"0.6534706",
"0.6522111",
"0.6522029",
"0.6510541",
"0.6510541",
"0.6510541",
"0.6505773",
"0.65006477",
"0.65003216",
"0.6477726",
"0.6467625",
"0.64477295",
"0.64461976",
"0.6445198",
"0.6442596",
"0.6430982"
] | 0.7392346 | 12 |
Calculates the perimeter of a triangle | public void calcPerimeter(){
perimeter=side1+side2+side3;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void triangle(){\n Shape triangle = new Shape();\n triangle.addPoint(new Point(0,0));\n triangle.addPoint(new Point(6,0));\n triangle.addPoint(new Point(3,6));\n for (Point p : triangle.getPoints()){\n System.out.println(p);\n }\n double peri = getPerimeter(triangle);\n System.out.println(\"perimeter = \"+peri);\n }",
"public double perimeter(){\n perimeter = calcSide(x1,y1,x2,y2)+calcSide(x2,y2,x3,y3)+calcSide(x3,y3,x1,y1);\n \n \n \n return perimeter;\n \n \n }",
"public double perimeter();",
"double perimeter();",
"public double getPerimeter(){\n\t\tdouble p;\n\t\tp=getside1()+getside2()+getside3();\n\t\treturn p;\n\t}",
"double getPerimeter();",
"double getPerimeter();",
"double getPerimeter();",
"double getPerimeter();",
"public double perimeter ()\r\n {\r\n return v1.distanceTo(v2)+v2.distanceTo(v3)+v3.distanceTo(v1);\r\n }",
"static Double computePerimeter() {\n // Perimeter is 2(height) + 2(width)\n Double perimeter = height*2 + width*2;\n return perimeter;\n }",
"public double getPerimeter();",
"public double getPerimeter();",
"public static double trianglePerimeter(Point2D point1, Point2D point2, Point2D point3) {\n\n double distance12 = point1.distance(point2);\n double distance23 = point2.distance(point3);\n double distance31 = point3.distance(point1);\n\n return distance12 + distance23 + distance31;\n\n }",
"int perimeter() {\r\n\t\tint perimeter = 2 * (getLength()) + (getBreath());\r\n\t\treturn (perimeter);\r\n\t}",
"public int perimeter()\n\t{\n\t\treturn 2*(length+width);\n\t}",
"public double perimeter()\n {\n double perimeter = (length * 2) + (width * 2);\n //System.out.println(perimeter);\n return perimeter;\n }",
"public double Perimeter() {\r\n \treturn((getLength() * 2) + (getWidth() * 2));\r\n }",
"protected double getPerimeter()\r\n {\r\n return ( 2 + Math.sqrt( 2.0 ) ) * getSide();\r\n }",
"public abstract double calculatePerimeter();",
"public abstract double calculatePerimeter();",
"public double calcPerimeter()\n\t{\n\t\treturn (double) oneside * 4;\n\t}",
"public abstract float getPerimeter();",
"@Override\n\tvoid FindPerimeter(double dim1) {\n\t\tSystem.out.println(\"The perimeter of Triangle: \"+(3*dim1));\n\t}",
"public double getPerimeter(){\n return side1 + side2 + side3;\n }",
"public double perimeter() {\n return 2 * Math.PI * r;\n }",
"@Override\r\n\tpublic double perimeter() {\n\t\t\r\n\t\tdouble result;\r\n\t\t\r\n\t\tint width = this.getWidth();\r\n\t\tint height = this.getHeight();\r\n\t\t\r\n\t\tresult = (width + height) * 2;\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"@Override\n public double perimeter()\n {\n\treturn (double) (2 * length + 2 * width);\n }",
"@Override\n\tpublic double calculatePerimeter() {\n\t\treturn 2* Shape.PI * r;\n\t}",
"double getPerimeter(){\n return 2*height+width;\n }",
"public double calculatePerimeter()\n {\n return 2 * Math.PI * radius;\n }",
"public int getPerimeter()\t{\n//\t\treturn 2 * x + 2 * y;\n\t\treturn x + y + width + height;\n\t}",
"public double getPerimeter(){\n if (getHeight()<0 || getWidth()<0){\n System.out.println(\"Input Invalid\");\n return -1;\n }\n return 2*( getHeight() + getWidth());\n }",
"public int perimeter() {\n \treturn 0;\n }",
"double getPerimeter() {\n return width + width + height + height;\n }",
"public static double perimeter(double length, double sideCount) {\n return (length * sideCount);\n }",
"public double calculatePerimeter() {\r\n return 2 * PI * radius;\r\n }",
"public int getPerimeter()\n {\n return 2 * (this.length + this.width);\n }",
"@Override\n public double perimeter() {\n return 2 * (width + length);\n }",
"@Override\r\n\tpublic void calcPerimeter() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic double getPerimeter() {\n\t\treturn (this.side1 + this.side2 + this.base);\r\n\t}",
"@Override\r\n public double perimeter() {\n return (height+width)*2;\r\n }",
"public void perimeter()\n {\n int perimeterOfTraiangle = a+b+c;\n System.out.println(\"Periemter of traiangle : \" + perimeterOfTraiangle);\n }",
"@Override\n\tpublic double perimeter() {\n\t\t\n\t\treturn circumference();\n\t\t\n\t}",
"static double perimeter(double AB, double BC, double CA) {\n return AB + BC + CA;\n }",
"@Override\n\tpublic double perimeter() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"public double getPerimeter() {\n\t\treturn sideLength * 8;\n\t}",
"@Override\n\tpublic double getPerimeter() {\n\t\treturn 2*(width+length);\n\t}",
"@Override\n\tpublic double getPerimeter() {\n\t\treturn side1 + side2 + side3;\n\t}",
"@Override\n\tpublic double calcPerimeter() {\n\t\treturn 2*(x+y);\n\t}",
"public double perimeter()\n\t{\n\t\t// To recognize points, their angles must be compared - middle one always represents the opposing point.\n\t\tdouble angleXAB = pointA.calculateLineAngle(pointB);\n\t\tdouble angleXAC = pointA.calculateLineAngle(pointC);\n\t\tdouble angleXAD = pointA.calculateLineAngle(pointD);\n\t\t\n\t\tdouble side1;\n\t\tdouble side2;\n\t\tdouble side3;\n\t\tdouble side4;\n\n\t\t// Creates sides based on angles comparison.\n\n\t\t// Excluding double 0 cases (vertical and horizontal)\n\t\t// opposite is XAB\n\t\tif(angleXAC == angleXAD)\n\t\t{\n\t\t\tside1 = pointA.getDistance(pointC);\n\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\tside3 = pointB.getDistance(pointC);\n\t\t\tside4 = pointB.getDistance(pointD);\n\t\t\treturn \tside1 + side2 + side3 + side4;\n\t\t} // if \n\t\t// opposite is XAC\n\t\telse if(angleXAB == angleXAD)\n\t\t{\n\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\tside3 = pointC.getDistance(pointB);\n\t\t\tside4 = pointC.getDistance(pointD);\n\t\t\treturn \tside1 + side2 + side3 + side4;\n\t\t} // else if \n\t\t// opposite is XAD\n\t\telse if(angleXAB == angleXAC)\n\t\t{\n\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\tside2 = pointA.getDistance(pointC);\n\t\t\tside3 = pointD.getDistance(pointB);\n\t\t\tside4 = pointD.getDistance(pointC);\n\t\t\treturn \tside1 + side2 + side3 + side4;\n\t\t} // else if \n\t\tif(angleXAB > angleXAC)\n\t\t{\n\t\t\t// opposite is XAC\n\t\t\tif(angleXAC > angleXAD)\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\t\tside3 = pointC.getDistance(pointB);\n\t\t\t\tside4 = pointC.getDistance(pointD);\n\n\t\t\t} // if\n\t\t\t// opposite is XAB\n\t\t\telse if (angleXAD > angleXAB)\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointC);\n\t\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\t\tside3 = pointB.getDistance(pointC);\n\t\t\t\tside4 = pointB.getDistance(pointD);\n\t\t\t} // else if\t\n\t\t\t// opposite is XAD\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\t\tside2 = pointA.getDistance(pointC);\n\t\t\t\tside3 = pointD.getDistance(pointB);\n\t\t\t\tside4 = pointD.getDistance(pointC);\n\t\t\t} // else\n\t\t} // if\n\t\telse\t\n\t\t{\n\t\t\t// opposite is XAC\n\t\t\tif(angleXAD > angleXAC)\t\t\t\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\t\tside3 = pointC.getDistance(pointB);\n\t\t\t\tside4 = pointC.getDistance(pointD);\n\t\t\t} // if \n\t\t\t// opposite is XAD\n\t\t\telse if (angleXAD > angleXAB)\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\t\tside2 = pointA.getDistance(pointC);\n\t\t\t\tside3 = pointD.getDistance(pointB);\n\t\t\t\tside4 = pointD.getDistance(pointC);\n\t\t\t} // else if \n\t\t\t// opposite is XAB\n\t\t\telse \t\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointC);\n\t\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\t\tside3 = pointB.getDistance(pointC);\n\t\t\t\tside4 = pointB.getDistance(pointD);\n\t\t\t} // else\n\t\t} // else\t\t\n\t\treturn \tside1 + side2 + side3 + side4;\n\t\t\n\t}",
"@Override\n public double getPerimeter() {\n return 4 * ((int) this.radiusX + (int) this.radiusY - (4 - Math.PI) * ((int) this.radiusX * (int) this.radiusY) / ((int) this.radiusX + (int) this.radiusY));\n }",
"@Override\n int perimeterFigure() {\n if (!isRealFigure()) {\n return -1;\n }\n //When the triangular prism is real\n return 2 * super.perimeterFigure() + 3 * getD();\n }",
"@Override\n\tpublic double getPerimeter() {\n\t\treturn this.N * getSide();\n\t}",
"static double perimeter(PointDouble a, PointDouble b, PointDouble c) {\n return dist(a, b) + dist(b, c) + dist(c, a);\n }",
"@Override\n\tpublic double getperimeter() {\n\t\treturn 2*width+2*length;\n\t}",
"@Override\n\tpublic double getPerimeter() {\n\t\treturn width + width + length + length;\n\t}",
"@Override\r\n\tpublic double getPerimeter() {\r\n\t\treturn 2 * (width + height);\r\n\t}",
"@Override\r\n\tpublic double getPerimeter() {\r\n\t\treturn 2 * (width + height);\r\n\t}",
"@Override\r\n public double getPerimeter() {\r\n double perimeter=2*(length+breadth);\r\n return perimeter;\r\n }",
"@Override\n\tpublic double perimeter() {\n\t\treturn edge*4;\n\t}",
"public double getPerimeter(){\n this.fperimeter = getSide() * 4;\n return fperimeter ;\n\n }",
"public double getPerimeter() {\n return 2 * radius * Math.PI;\n }",
"public static double getPerimeter() {\n\t\treturn perimeter;\n\t}",
"@Override\n\tpublic double calPerimeter() {\n\t\treturn 2*Math.PI*radius;\n\t}",
"@Override\n public double getPerimeter() {\n return a + b + c;\n }",
"public double getPerimeter(){\r\n\t\t\r\n\t\tdouble obim = 2 * PI * this.radius;\r\n\t\t\r\n\t\treturn obim;\r\n\t}",
"@Override\n\tpublic double calPerimeter() {\n\t\treturn a+b+c;\n\t}",
"public int islandPerimeter(int[][] grid)\n {\n\tint peri = 0;\n\tfor (int i = 0; i < grid.length; i++)\n\t{\n\t for (int j = 0; j < grid[0].length; j++)\n\t {\n\t\tif (grid[i][j] == 1)\n\t\t{\n\t\t peri +=4;\n\t\t if (i > 0 && grid[i-1][j]==1)\n\t\t\tperi--;\n\t\t if (j > 0 && grid[i][j-1]==1)\n\t\t\tperi--;\n\t\t if (i <grid.length-1 && grid[i+1][j]==1)\n\t\t\tperi--;\n\t\t if (j < grid[0].length-1 && grid[i][j+1]==1)\n\t\t\tperi--;\n\t\t}\n\t }\n\t}\n\treturn 0;\n }",
"public int getPerimeter()\n\t{\n\t\treturn (int) (Math.PI * radius * 2);\n\t}",
"public static void main(String[] args) {\n\n /* variables that hold the side of a triangle */\n double sideA;\n double sideB;\n double sideC;\n \n double area;\n double perimeter;\n \n double s; // variable need to calculate the area\n \n Scanner scan = new Scanner(System.in); //scanner to take user input\n \n /* formating for the numbers */\n DecimalFormat decimalFormat = new DecimalFormat(\"0.000\");\n \n \n /* ask for user input */\n System.out.print(\"Enter side A's value: \");\n sideA = scan.nextDouble();\n \n System.out.print(\"Enter side B's value: \");\n sideB = scan.nextDouble();\n \n System.out.print(\"Enter side C's value: \");\n sideC = scan.nextDouble();\n \n /* calculate perimeter, s, and area */\n perimeter = sideA + sideB + sideC;\n s = perimeter / 2.0;\n area = sqrt(s * (s - sideA) * (s - sideB) * (s - sideC));\n \n /* output results */\n System.out.println(\"The perimeter of the triangle is \" \n + decimalFormat.format(perimeter) + \" and the area is \" \n + decimalFormat.format(area));\n \n scan.close(); //close scanner\n \n }",
"@Override\n\tpublic double getPerimeter() {\n\t\treturn 8 * side;\n\t}",
"float triangleArea(tPoint p2)\n {\n float area = (((this.p1.x - this.p0.x) * (p2.y - this.p0.y)) - \n ((p2.x - this.p0.x) * (this.p1.y - this.p0.y)));\n return area;\n }",
"abstract void findPerimeter();",
"public double TriangleAreaCal()\n\t{\n\t\tdouble x;\n\t\tx = Math.toRadians(60);\n\t\tdouble area = (Math.pow(this.length, 2) * Math.sin(x))/2;\n\t\treturn area;\n\t}",
"synchronized public Polygon getPerimeter() {\n \t\tif (null == p || p[0].length < 2) return new Polygon();\n \n \t\t// local pointers, since they may be transformed\n \t\tint n_points = this.n_points;\n \t\tif (!this.at.isIdentity()) {\n \t\t\tfinal Object[] ob = getTransformedData();\n \t\t\tp = (double[][])ob[0];\n \t\t\tn_points = p[0].length;\n \t\t}\n \t\tint[] x = new int[n_points];\n \t\tint[] y = new int[n_points];\n \t\tfor (int i=0; i<n_points; i++) {\n \t\t\tx[i] = (int)p[0][i];\n \t\t\ty[i] = (int)p[1][i];\n \t\t}\n \t\treturn new Polygon(x, y, n_points);\n \t}",
"public double getPerimeter() {\n\t\treturn (super.getPerimeter()+height)*2;\r\n\t}",
"@Override\r\n\tpublic double perimeter() {\n\t\treturn 2*length*breadth;\r\n\t}",
"@Override\n\tpublic float perimeter() {\n\t\treturn 0;\n\t}",
"@Override\n public double area() {\n double P = this.perimeter() / 2;\n double result = Math.sqrt(P * (P - side1) * (P - side2) * (P - side3));\n return result;\n }",
"double area() {\n System.out.println(\"Inside Area for Triangle.\");\n return dim1 * dim2 / 2;\n }",
"@Override\n\tpublic double getPerimeter()\n\t{\n\t\tdouble perimeter = radius*2*pi;\n\t\treturn perimeter;\n\t}",
"public void perimeter() {\n\t\tSystem.out.println(\"Square perimeter\");\n\t}",
"public double getPerimeter(){\n return 0;\n }",
"public static int perimeterOfRectangle(int length, int width) {\n return 2 * (length + width);\n }",
"public double getPerimeter (Shape s) {\n double totalPerim = 0.0;\n // Start wth prevPt = the last point \n Point prevPt = s.getLastPoint();\n // For each point currPt in the shape,\n for (Point currPt : s.getPoints()) {\n // Find distance from prevPt point to currPt \n double currDist = prevPt.distance(currPt);\n // Update totalPerim by currDist\n totalPerim = totalPerim + currDist;\n // Update prevPt to be currPt\n prevPt = currPt;\n }\n // totalPerim is the answer\n return totalPerim;\n }",
"double area() {\nSystem.out.println(\"Inside Area for Triangle.\");\nreturn dim1 * dim2 / 2;\n}",
"@Test\n public void testcalPerimeterRectangle3() {\n double ex = -8;\n \n startPoint.setX(1);\n startPoint.setY(1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calPerimeterRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }",
"public double getPerimeter (Shape s) {\n double totalPerim = 0.0;\n // Start wth prevPt = the last point\n Point prevPt = s.getLastPoint();\n // For each point currPt in the shape,\n for (Point currPt : s.getPoints()) {\n // Find distance from prevPt point to currPt\n double currDist = prevPt.distance(currPt);\n // Update totalPerim by currDist\n totalPerim = totalPerim + currDist;\n // Update prevPt to be currPt\n prevPt = currPt;\n }\n // totalPerim is the answer\n return totalPerim;\n }",
"default void getPerimeter(int... sides) {\n\t\tint perimeter = 0;\n\t\tfor (int side : sides) {\n\t\t\tperimeter += side;\n\t\t}\n\n\t\tSystem.out.println(\"Perimeter: \" + perimeter);\n\t}",
"public int getTriangleCount();",
"public double Perimeter() {\n return OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_Perimeter(swigCPtr, this);\n }",
"@Override\n\tpublic void perimeter(double x,double y) {\n double p = y*x;\n System.out.println(\"The circle's perimeter is \"+p);\n\t}",
"public double triangleArea(double width, double height)\n\t{\n\t\treturn (width*height)/2;\n\t}",
"public static void numberTwo(){\n\n\n short x = 40; // 1 side side of cube 40 cm\n short y = 12; // cube has 12 edges\n short perimetercube = 40 * 12;\n System.out.println(\" Perimeter cube:\" + perimetercube);\n // Piramida - rectangle\n int a1 = 20;\n int b2 = 30;\n int c3 = 20;\n int d4 = 30;\n int perimeter = a1 + b2 + c3 + d4;\n System.out.println(\" Perimeter rectangle : \" + perimeter);\n final double PI = 3.14;\n\n\n\n double veryDouble = 3.14;\n double r = 58;\n\n System.out.println(PI);\n\n }",
"@Test\n public void testcalPerimeterRectangle4() {\n double ex = 8;\n \n startPoint.setX(-1);\n startPoint.setY(-1);\n endPoint.setX(3);\n endPoint.setY(3);\n \n double ac = rec.calPerimeterRectangle(startPoint, endPoint);\n assertNotEquals(ex, ac, 0);\n }",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint side1=sc.nextInt();\n\t\tint side2=sc.nextInt();\n\t\tint side3=sc.nextInt();\n\t\tint prmter=calcPermtrOfTrngle(side1,side2,side3);\n\t\tSystem.out.println(\"perimeter of given sides of triangle: \"+prmter);\n\t\tsc.close();\n\n\t}",
"public double basePerimeter()\r\n {\r\n double basePerimeter = (radius * 2) * Math.PI;\r\n return basePerimeter;\r\n }",
"@Override\n\tpublic double getArea() {\n\t\tdouble p = getPerimeter() / 2;\n\t\tdouble s = p * ((p - side1) * (p - side2) * (p - side3));\n\t\tdouble Area = Math.sqrt(s);\n\t\treturn Area;\n\t}",
"@Test\r\n\tpublic void testPerimeter() {\r\n\t\tint perimeter = LENGTH + WIDTH + LENGTH + WIDTH;\r\n\t\tassertEquals(perimeter, validRectangle.perimeter());\r\n\t}"
] | [
"0.8094488",
"0.78208756",
"0.7767403",
"0.77446735",
"0.7524237",
"0.7514086",
"0.7514086",
"0.7514086",
"0.7514086",
"0.7466762",
"0.7443338",
"0.7399907",
"0.7399907",
"0.7381949",
"0.7377746",
"0.7374211",
"0.7330418",
"0.7327246",
"0.731683",
"0.73092026",
"0.73092026",
"0.72964686",
"0.7231048",
"0.7220765",
"0.7213713",
"0.71947145",
"0.7183224",
"0.7120599",
"0.71174884",
"0.71158284",
"0.7104535",
"0.7095452",
"0.7071205",
"0.70686233",
"0.70566565",
"0.70559233",
"0.7050109",
"0.70381725",
"0.70181406",
"0.7014009",
"0.6970651",
"0.6964635",
"0.6958262",
"0.69426715",
"0.69408584",
"0.693697",
"0.69287664",
"0.6924163",
"0.6887537",
"0.6883818",
"0.6846589",
"0.68355614",
"0.6834848",
"0.6833471",
"0.68327457",
"0.6824959",
"0.6777779",
"0.676515",
"0.676515",
"0.6764553",
"0.6762735",
"0.67532176",
"0.67479825",
"0.672855",
"0.67052114",
"0.6688746",
"0.6677002",
"0.66725546",
"0.66501963",
"0.663775",
"0.66188323",
"0.6588457",
"0.65856946",
"0.6583832",
"0.6571389",
"0.6558754",
"0.6544294",
"0.65308493",
"0.6466186",
"0.64536536",
"0.64177126",
"0.6409042",
"0.6389101",
"0.6346971",
"0.6344597",
"0.63119",
"0.63094527",
"0.6276457",
"0.62699443",
"0.6259232",
"0.62422043",
"0.62342864",
"0.6216283",
"0.61936015",
"0.61567307",
"0.6151081",
"0.6148979",
"0.6146776",
"0.6143749",
"0.61237735"
] | 0.75113344 | 9 |
Log.d(TAG, "onTouch(" + v + ", " + event + ")"); | @Override
public boolean onTouch(View v, MotionEvent event) {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void touchEvent(MotionEvent event);",
"@Override\n public void onTouch(int index) {\n }",
"@Override\r\n public boolean onTouch(View v, MotionEvent event) {\n\treturn mGestureDetector.onTouchEvent(event);\r\n }",
"@Override\r\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\r\n\t\treturn this.mGestureDetector.onTouchEvent( event );\r\n\t}",
"public boolean onTouch(View v, MotionEvent event) {\n\n int eventAction = event.getActionMasked();\n int x = (int)(event.getX()/(26*scale));\n int y = (int)(event.getY()/(26*scale));\n\n switch (eventAction) {\n case MotionEvent.ACTION_DOWN:\n case MotionEvent.ACTION_POINTER_DOWN:\n digit[x] ^= (1 << y);\n Log.w(\"onTouch\", String.format(\"%02x %02x %02x %02x %02x\", digit[0], digit[1], digit[2], digit[3], digit[4]));\n //((TextView)(getRootView().findViewById(R.id.text1))).setText(String.format(\"%02X %02X %02X %02X %02X\", digit[0], digit[1], digit[2], digit[3], digit[4]));\n invalidate();\n Log.w(\"ACTION\", String.format(\"(%d,%d)\", x, y));\n break;\n case MotionEvent.ACTION_POINTER_UP:\n case MotionEvent.ACTION_UP:\n case MotionEvent.ACTION_CANCEL:\n break;\n case MotionEvent.ACTION_MOVE:\n Log.w(\"ACTION\", String.format(\"(%d,%d)\", x, y));\n break;\n }\n return false;\n }",
"@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\tULog.i(WordAdapter.this, \"onTouch() \");\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean dispatchTouchEvent( MotionEvent e ) {\n\t\tint action = e.getAction();\r\n\t\tfloat x = e.getRawX();\r\n\t\tfloat y = e.getRawY();\r\n\t\tLog.d(TAG, \"onTouch dev:\" + e.getDeviceId() + \" act:\" + action + \" ind:\" + e.getActionIndex() + \" @ \"+ x + \",\" + y );\r\n\t\tnativeTouch( appPtr, action, x, y );\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic boolean onTouchEvent(MotionEvent ev) {\n\t\tLog.i(\"TestEvent\", \"activity->onTouchEvent \" + TouchEventUtil.getTouchAction(ev.getAction()));\n\t\treturn super.onTouchEvent(ev);\n\t}",
"@Override\n public boolean onTouch(View view, MotionEvent me){\n game.onTouch(me);\n return false;\n }",
"@Override\n\tpublic boolean onTouch(View v, MotionEvent ev) {\n\t\tboolean handled = handleTouch(v, ev);\n\t\tprintMotionEvent(ev, handled);\n\t\treturn handled;\n\t}",
"@Override\n public void onTouchEvent(RecyclerView rv, MotionEvent e) {\n }",
"@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn gestureScanner.onTouchEvent(event);\n\n\t\t\t}",
"@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return true;\n }",
"@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return true;\n }",
"@Override\n public boolean onTouch(View v, MotionEvent event) {\n return false;\n }",
"@Override\r\n\t\tpublic boolean onTouchEvent(MotionEvent event) {\n\r\n\t\t\treturn true;\r\n\t\t}",
"@Override\n public void touch()\n {\n\n }",
"@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean onTouchEvent(final MotionEvent e) {\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\t\t\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}",
"public void onTouchEvent(MotionEvent event) {\n Vector3 v = GLHelper.projectTouchToWorld(renderer.getWidth(), renderer.getHeight(),\n renderer.getCurrentModelView(), renderer.getCurrentProjection(), event.getX(), event.getY());\n\n if (BuildConfig.DEBUG) Log.d(TAG, \"touch: \" + v);\n\n flock.touch(v);\n }",
"@Override\r\n public boolean onTouch(View v, MotionEvent event)\r\n {\n switch(event.getActionIndex())\r\n {\r\n case MotionEvent.ACTION_DOWN:\r\n break;\r\n case MotionEvent.ACTION_UP:\r\n break;\r\n case MotionEvent.ACTION_MOVE:\r\n tapAnswer();\r\n return true;\r\n }\r\n \r\n return false;\r\n }",
"@Override\r\n\t\tpublic void onTouchButtonDown(View arg0, MotionEvent arg1) {\n\r\n\t\t}",
"@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n public boolean onTouchEvent(MotionEvent event) {\n gestureDetectorCompat.onTouchEvent(event);\n // Return true to tell android OS that event has been consumed, do not pass it to other event list\n // eners.\n return true;\n }",
"@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return true;\n }",
"@SuppressLint(\"ClickableViewAccessibility\")\n @Override\n public boolean onTouchEvent(MotionEvent event) {\n return true;\n }",
"@Override\r\n public boolean onTouchEvent(MotionEvent event) {\n return super.onTouchEvent(event);\r\n }",
"@Override\n\t\t\tpublic boolean onTouch(View arg0, MotionEvent arg1) {\n\t\t\t\treturn true;\n\t\t\t}",
"@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\ttouchStartTime = System.currentTimeMillis();\n\t\t// new ShowThread().start();\n\t\treturn mGestureDetector.onTouchEvent(event);\n\t}",
"@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn DetailTreasureChestActivity.this.detector.onTouchEvent(event);\n\t\t\t}",
"@Override\n public boolean onTouchEvent(MotionEvent event) {\n int action = event.getAction();\n tb.tbOnTouch(action);\n return true;\n }",
"void onViewTap(View view, float x, float y);",
"@Override\n public boolean onTouchEvent(MotionEvent event) {\n // Pass activity on touch event to the gesture detector.\n gestureDetectorCompat.onTouchEvent(event);\n // Return true to tell android OS that event has been consumed, do not pass it to other event listeners.\n return true;\n }",
"public void onTouchDown(NMapView arg0, MotionEvent arg1) {\n\n }",
"public void events(View v){\n }",
"@Override\n public void onDownMotionEvent() {\n \n }",
"@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tLog.i(TAG, \"MyLinearLayout() onTouchEvent event = \" + event.getAction());\r\n\t\treturn super.onTouchEvent(event);\r\n\t}",
"public void onViewDown() {\n\n }",
"@Override\n\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\tLog.i(\"TestEvent\", \"activity->dispatchTouchEvent \" + TouchEventUtil.getTouchAction(ev.getAction()));\n\t\treturn super.dispatchTouchEvent(ev);\n\t}",
"public boolean onTouch(View v, MotionEvent event) {\n\t\t\tif (event.getAction() == MotionEvent.ACTION_DOWN) {\n\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"@Override\n public void onShowPress(MotionEvent e) {\n Log.d(TAG, \"onShowPress\");\n }",
"@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tthis.mGestureDetector.onTouchEvent( event );\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic void onTouchUp(LTouch e) {\n\t}",
"@Override\n\tpublic boolean onTouch(View view, MotionEvent event) {\n\t\treturn this._gestureDetector.onTouchEvent(event);\n\t}",
"@Override\n public boolean onTouchEvent(MotionEvent event)\n {\n return gestureDetector.onTouchEvent(event);\n }",
"public void onClick(View v) {\n\n }",
"public void onClick(View v) {\n\n }",
"@Override\n public boolean onTouch(View v, MotionEvent event) {\n return viewPager.dispatchTouchEvent(event);\n }",
"public void onClick(View v) {\n }",
"public void onClick(View v) {\n }",
"@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\n\t\treturn super.onTouchEvent(event);\n\t}",
"@SuppressLint(\"ClickableViewAccessibility\")\n\t\t\t@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public void onClick(View v) {\n }",
"@Override\n public boolean onTouchEvent(MotionEvent event) {\n manager.receiveTouch(event);\n\n return true;\n }",
"public void onClick(View v) {\n\t}",
"@Override\n public void onLongPress(MotionEvent e) {\n Log.d(TAG, \"onLongPress\");\n }",
"@Override\n public boolean onTouchEvent(MotionEvent event) {\n return false;\n }",
"@Override\n public boolean onTouchEvent(MotionEvent event) {\n return false;\n }",
"@Override\n public boolean onTouch(View v, MotionEvent event) {\n float x;\n float y;\n int w = v.getWidth();\n int h = v.getHeight();\n int curAction = ACTION_NONE;\n float xscale = (float)w / (float)438;\n float yscale = (float)h / (float)600;\n\n x = event.getX() / xscale;\n y = event.getY() / yscale;\n // Log.d(LOG_TAG, \"x: \" + x + \", y:\" + y);\n if (x >= 90 && x <= 210 &&\n y >= 300 && y <= 425) curAction = ACTION_BATARI;\n else if (x >= 110 && x <= 200 &&\n y >= 450 && y <= 540) curAction = ACTION_GABARI;\n else if (x >= 240 && x <= 350 &&\n y >= 300 && y <= 430) curAction = ACTION_FUROHA;\n else if (x >= 245 && x <= 370 &&\n y >= 440 && y <= 550) curAction = ACTION_FUROA;\n if (event.getAction() == MotionEvent.ACTION_DOWN) {\n mActionType = curAction;\n Log.d(LOG_TAG, \"DOWN ACTION: \" + curAction);\n } else if (event.getAction() == MotionEvent.ACTION_UP ) {\n Log.d(LOG_TAG, \"UP ACTION: \" + curAction);\n if (mActionType == curAction) doAction(mActionType);\n }\n return true;\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\n public void onClick(View v) {\n\n }",
"@Override\r\n public void onClick(View arg0) {\n\r\n }",
"@Override\n public boolean onTouch(View v, MotionEvent event) {\n return mPager.dispatchTouchEvent(event);\n }",
"@Override\n public void onClick(View v)\n {\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tlistener(v);\n\n\t\t}",
"@Override\r\n\tpublic void onTouchMove(LTouch e) {\n\t\t\r\n\t}",
"@SuppressLint(\"ClickableViewAccessibility\")\n @Override\n public boolean onTouchEvent(MotionEvent event) {\n return gestureHandler.onTouchEvent(event);\n }",
"@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tint action = event.getAction();\n\t\tswitch (action) {\n\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\t//Log.i(\"MainActivity\", \"MainActivity-onTouchEvent action = action down\");\n\t\t\t\tbreak;\n\n\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\t//Log.i(\"MainActivity\", \"MainActivity-onTouchEvent action = action up\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn super.onTouchEvent(event);\n\t}",
"@Override\n public void onClick(View arg0) {\n\n }",
"@Override\n public boolean onTouchEvent( MotionEvent event )\n {\n if ( gesture_detector.onTouchEvent( event ) )\n {\n return true;\n }\n else\n {\n return super.onTouchEvent( event );\n }\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\tlistener.onClick(v);\n\t}",
"@Override\npublic void onClick(View v) {\n\t\n}",
"@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\tif (event.getAction() == MotionEvent.ACTION_DOWN) {\n\t\t\t\t\thandler.sendMessageDelayed(\n\t\t\t\t\t\t\thandler.obtainMessage(touchEventId1, v), 1);\n\t\t\t\t}\n\t\t\t\tif (event.getAction() == MotionEvent.ACTION_UP) {\n\t\t\t\t\thandler.sendMessageDelayed(\n\t\t\t\t\t\t\thandler.obtainMessage(touchEventId2, v), 1);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n public void onClick(View v) {\n if (v.getTag() != null) {\n nativeOnClick((int) v.getTag());\n } else {\n Log.e(TAG, \"onClick for view: \" + v + \" has no tag!\");\n }\n }",
"@Override\r\n\tpublic boolean dispatchTouchEvent(MotionEvent event) {\n\t\tLog.i(TAG, \"MyLinearLayout() dispatchTouchEvent event = \" + event.getAction());\r\n\t\treturn super.dispatchTouchEvent(event);\r\n\t}",
"@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\treturn false;\r\n\t}",
"void onInputEvent(View view, int buttons);",
"public boolean onTouchEvent(MotionEvent event) {\n\tif(state==MAIN_MENU || state==RESUME)\n\t{ags.onTouchEvent(event);}\n\t\n\telse if(state==GAME_SCREEN){\n\t//\tat= new AndroidTouch(ag);\n\t\tag.onTouchEvent(event);\n\t}\n\t\n\t\n\treturn super.onTouchEvent(event);\n\t\n}",
"public void onClick(View v) {\n }",
"@Override\r\n public boolean onTouchEvent(MotionEvent event)\r\n {\n switch (event.getAction())\r\n {\r\n case MotionEvent.ACTION_DOWN:\r\n Log.e(\"shicong\", \"ButtonViewTest ACTION_DOWN\" + event.getX() + \"/\" + event.getY());\r\n break;\r\n case MotionEvent.ACTION_UP:\r\n Log.e(\"shicong\", \"ButtonViewTest ACTION_UP\" + event.getX() + \"/\" + event.getY());\r\n break;\r\n case MotionEvent.ACTION_MOVE:\r\n// Log.e(\"shicong\", \"ButtonViewTest ACTION_MOVE\");\r\n break;\r\n default:\r\n break;\r\n }\r\n \r\n return super.onTouchEvent(event);\r\n }",
"@Override\n\t\t\t\tpublic void onTouchMove() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onTouchMove() {\n\t\t\t\t\t\n\t\t\t\t}",
"public abstract void onOneClick(View v);",
"public void onClick(View v)\n {\n }",
"@Override\n public void onClick(View view){\n }",
"@Override\n public boolean onDown(MotionEvent e) {\n return true;\n }",
"@Override\r\n public void onClick(View v) {\n\r\n }",
"@Override\n public boolean onTouchEvent(MotionEvent e) {\n return gestureDetector.onTouchEvent(e);\n }",
"@Override\n public void onClick(View view) {\n }",
"@Override\r\n public boolean onInterceptTouchEvent(MotionEvent event) {\n if (event.getAction() == MotionEvent.ACTION_DOWN) {\r\n //因为onTouchEvent事件监听不到\r\n mDownX = event.getX();\r\n mDownY = event.getY();\r\n// setListener();\r\n// LogManager.e(\"ACTION_DOWN \" + mDownX + \":\" + mDownY);\r\n\r\n }\r\n\r\n return super.onInterceptTouchEvent(event);\r\n }",
"@Override\r\n\tpublic void onClick(View v) \r\n\t{\n\t}",
"@Override\r\n\tpublic void onClick(View v) {\n\r\n\t}"
] | [
"0.76598275",
"0.74571663",
"0.7399561",
"0.73216367",
"0.72721994",
"0.7266024",
"0.71225375",
"0.71000606",
"0.704064",
"0.7029857",
"0.70136607",
"0.7009925",
"0.6984459",
"0.6984459",
"0.6983439",
"0.69665134",
"0.6966362",
"0.69462144",
"0.69462144",
"0.69462144",
"0.6939096",
"0.6931082",
"0.69278467",
"0.69239587",
"0.69202334",
"0.69165146",
"0.6903512",
"0.6881106",
"0.6873654",
"0.6862149",
"0.6853232",
"0.6819041",
"0.6814419",
"0.67792386",
"0.676818",
"0.67617315",
"0.67460954",
"0.6744137",
"0.67210585",
"0.67060196",
"0.66958815",
"0.668705",
"0.668228",
"0.6681004",
"0.66678256",
"0.6666883",
"0.66578007",
"0.6648271",
"0.6647705",
"0.6647705",
"0.6646515",
"0.66346323",
"0.66346323",
"0.66318744",
"0.6629806",
"0.661745",
"0.661745",
"0.66094023",
"0.6606555",
"0.6596544",
"0.65950376",
"0.65950376",
"0.659249",
"0.6583784",
"0.6583784",
"0.6583784",
"0.6583784",
"0.6583784",
"0.6583784",
"0.6583671",
"0.65829873",
"0.65705967",
"0.6556632",
"0.65565795",
"0.6554754",
"0.65466684",
"0.6543418",
"0.65429837",
"0.654206",
"0.65361637",
"0.65144145",
"0.6510211",
"0.6508576",
"0.6501417",
"0.6494605",
"0.64940834",
"0.64898837",
"0.6488562",
"0.64836466",
"0.64836466",
"0.648271",
"0.6480485",
"0.648014",
"0.6474501",
"0.64723295",
"0.6466873",
"0.64660305",
"0.64616007",
"0.6449968",
"0.64493465"
] | 0.68898726 | 27 |
Simple cache listener interface that will notify on either EXPIRE events or EVICT events. The former will be for elements that have been hanging around for too long; the latter will be for elements that get booted in order to make room for additional elements (LRU). | public static interface CacheListener<T> {
/**
* An entry has outlived its "time-to-live.
*
* @param key entry key of element being removed
*/
void expiredElement(T key);
/**
* An entry has been removed to make room for additional elements
*
* @param key entry key of element being removed
*/
void evictedElement(T key);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void notifyElementEvicted(Ehcache cache, Element element) {\r\n //noop\r\n }",
"@Test\n\tpublic void test3() throws InterruptedException {\n\t\tDeadElementCallBack<String, Integer> callback = new DeadElementCallBack<String, Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic void notify(String key, Integer elements) {\n\t\t\t}\n\t\t}; \n\t\tLRUCache<String, Integer> cache = new LRUCache<String, Integer>(2000, 2, callback);\n\t\tcache.put(\"hello\", 1);\n\t\tcache.put(\"yo\", 2);\n\t\tcache.put(\"hola\", 4);\n\t\tThread.sleep(1500);\n\t\tcache.get(\"yo\"); // Using a value.\n\t\tThread.sleep(1000);\n\t\tcache.put(\"sup\", 3);\n\t\tassertTrue(cache.size() == 3);\n\t\tassertTrue(cache.get(\"sup\") != null);\n\t\tassertTrue(cache.get(\"yo\") != null);\n\t}",
"protected void notifyListeners(CacheEvent e) {\n synchronized (listeners) {\n for (int i=0; i<listeners.size(); i++) {\n CacheListener l = (CacheListener) listeners.elementAt(i);\n l.cacheUpdated(e);\n }\n }\n }",
"public interface Listener {\n void insertedElement(Cachable cachable);\n void removedElement(Cachable cachable);\n}",
"public void notifyCacheAdded(String cacheName) {\n // no-op\n }",
"public interface EvictionPolicy\n {\n /**\n * This method is called by the cache to indicate that an entry has\n * been touched.\n *\n * @param entry the Cache Entry that has been touched\n */\n public void entryTouched(OldOldCache.Entry entry);\n\n /**\n * This method is called by the cache when the cache requires the\n * eviction policy to evict entries.\n *\n * @param cMaximum the maximum number of units that should remain\n * in the cache when the eviction is complete\n */\n public void requestEviction(int cMaximum);\n }",
"@Override\n public void onCacheAvailable(File cacheFile, String url, int percentsAvailable) {\n }",
"public void cacheStopped(ClusterEvent e) {}",
"public interface Cache<K,E> {\n\tpublic E getCacheEntry(K id);\n\t\n\tpublic boolean addCacheEntry(K id, E entry);\n\t\n\tpublic void removeCacheEntry(K id);\n\t\n\tpublic Stream<E> getAllEntries();\n}",
"interface Cache {\n\n /** @return A cache entry for given path string or <code>null</code> (if file cannot be read or too large to cache).\n * This method increments CacheEntry reference counter, caller must call {@link #checkIn(CacheEntry)} to release returned entry (when not null). */\n CacheEntry checkOut(CacheEntryLoader cacheEntryLoader);\n\n /**\n * Method to release cache entry previously obtained from {@link #checkOut(CacheEntryLoader)} call.\n * This method decrements CacheEntry reference counter.\n */\n void checkIn(CacheEntry key);\n\n /** Invalidates cached entry for given path string (if it is cached) */\n void invalidate(String pathString);\n\n void rename(String fromPathString, String toPathString);\n\n// /** Preload given file path in cache (if cache has vacant spot). Preloading happens in background. Preloaded pages initially have zero reference counter. */\n// void preload (String pathString);\n\n /** Clears the cache of all entries (even if some entries are checked out) */\n void clear();\n\n /** Allocates entry of given size for writing.\n * It will not be visible to others until caller calls {@link #update(String, CacheEntry)}.*/\n CacheEntry alloc(long size);\n\n /** Registers recently writtien cache entry as available for reading */\n void update(String pathString, CacheEntry cacheEntry);\n}",
"public interface OAObjectCacheListener<T extends OAObject> {\n \n /**\n * Called when there is a change to an object.\n */\n public void afterPropertyChange(T obj, String propertyName, Object oldValue, Object newValue);\n\n /** \n * called when a new object is added to OAObjectCache, during the object construction. \n */\n public void afterAdd(T obj);\n \n public void afterAdd(Hub<T> hub, T obj);\n \n public void afterRemove(Hub<T> hub, T obj);\n \n public void afterLoad(T obj);\n \n}",
"private static void cacheContent(Collection listeners) {\r\n\r\n Iterator ipList = listeners.iterator();\r\n while (ipList.hasNext()) {\r\n Content c = (Content) ipList.next();\r\n try {\r\n Map types = new Hashtable();\r\n Listener.cachedContent.put(c.getNodeData(\"IP\").getString(), types); //$NON-NLS-1$\r\n Iterator it = c.getContent(\"Access\").getChildren().iterator(); //$NON-NLS-1$\r\n while (it.hasNext()) {\r\n Content type = (Content) it.next();\r\n types.put(type.getNodeData(\"Method\").getString().toLowerCase(), StringUtils.EMPTY); //$NON-NLS-1$\r\n }\r\n }\r\n catch (RepositoryException re) {\r\n log.error(\"RepositoryException caught while loading listener configuration: \" + re.getMessage(), re); //$NON-NLS-1$\r\n }\r\n }\r\n }",
"public interface EzyerCache {\n class PersistentObject {\n public final byte[] mData;\n public final String mKey;\n public final long mExpireTimeMillis;\n\n public PersistentObject(byte[] data, String key, long expireTimeMillis) {\n mData = data;\n mKey = key;\n mExpireTimeMillis = expireTimeMillis;\n }\n }\n\n class ValueObject {\n public final byte[] mData;\n public final String mKey;\n public final boolean mIsExpired;\n\n public ValueObject(byte[] data, String key, boolean isExpired) {\n mData = data;\n mKey = key;\n mIsExpired = isExpired;\n }\n }\n\n ValueObject get(String key);\n\n List<ValueObject> get(String key, int start, int end);\n\n void set(PersistentObject po);\n\n void add(PersistentObject po);\n\n void remove(String key);\n\n boolean isExpired(String key);\n\n void clear();\n}",
"public interface Cache<K,V> {\n\t/**\n\t * Returns the object for the given id from cache, null if no object is in cache.\n\t *\n\t * @param id the id to retrieve\n\t * @return a V object.\n\t */\n\tV get(K id);\n\t\n\t/**\n\t * Puts the cacheable object in cache.\n\t *\n\t * @param id the object id\n\t * @param cacheable the object to cache.\n\t */\n\tvoid put(K id, V cacheable);\n\n\t/**\n\t * Removes an object from the cache.\n\t *\n\t * @param id cache object id.\n\t */\n\tvoid remove(K id);\n\t\n\t/**\n\t * Clears the cache.\n\t */\n\tvoid clear();\n\n\t/**\n\t * Returns the cache stats.\n\t *\n\t * @return a {@link net.anotheria.moskito.core.predefined.CacheStats} object.\n\t */\n\tCacheStats getCacheStats();\n\n /**\n * Return all elements from cache.\n *\n * @return collection\n */\n Collection<V> getAllElements();\n\t\n}",
"public void entryTouched(OldOldCache.Entry entry);",
"@Override\n public void forEachRemaining(Consumer<? super InternalCacheEntry<K, V>> action) {\n long now = timeService.wallClockTime();\n\n while (spliterator.tryAdvance(consumer)) {\n InternalCacheEntry<K, V> currentEntry = current;\n if (currentEntry.canExpire() && currentEntry.isExpired(now) &&\n expirationManager.entryExpiredInMemoryFromIteration(currentEntry, now).join() == Boolean.TRUE) {\n continue;\n }\n action.accept(currentEntry);\n }\n }",
"public interface ContentCache extends Cache<List<byte[]>>{\n int notCacheSize();\n}",
"public void notifyCacheRemoved(String cacheName) {\n // no-op\n }",
"public interface CustomCache<K, V> {\n\n /**\n * gets a value by key\n * returns null if key is expired\n *\n * @param key\n * @return\n */\n V get(K key);\n\n /**\n * puts into cache with given ttl\n *\n * @param key\n * @param value\n */\n void put(K key, V value);\n\n /**\n * averages out the non expired values in cache.\n * to be discussed in interview\n *\n * @return\n */\n double average();\n}",
"public interface CacheProviders {\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Topic>>> getTopics(Observable<List<Topic>> topics, DynamicKeyGroup nodeIdAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Topic>>> getUserCreateTopics(Observable<List<Topic>> topics, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Topic>>> getUserFavorites(Observable<List<Topic>> topics, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<TopicDetail>> getTopicDetail(Observable<TopicDetail> topic, DynamicKey id, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<UserDetailInfo>> getUserInfo(Observable<UserDetailInfo> user, DynamicKey id, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<News>>> getNews(Observable<List<News>> news, DynamicKeyGroup nodeIdAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Notification>>> getNotifications (Observable<List<Notification>> notifications, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Site>>> getSite(Observable<List<Site>> sites, DynamicKey offset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<UserInfo>>> getUserFollowing(Observable<List<UserInfo>> users, DynamicKeyGroup usernameAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<com.example.bill.epsilon.bean.topic.Reply>>> getUserReplies(Observable<List<com.example.bill.epsilon.bean.topic.Reply>> replies, DynamicKeyGroup usernameAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<TopicReply>>> getReplies(Observable<List<TopicReply>> replies, DynamicKeyGroup idAndOffset, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<Node>>> readNodes(Observable<List<Node>> nodes, EvictProvider evictProvider);\n\n @LifeCache(duration = 7, timeUnit = TimeUnit.DAYS)\n Observable<Reply<List<NewsNode>>> readNewsNodes(Observable<List<NewsNode>> nodes, EvictProvider evictProvider);\n}",
"public void touch()\n {\n ++m_cUses;\n m_dtLastUse = getSafeTimeMillis();\n\n EvictionPolicy policy = OldOldCache.this.getEvictionPolicy();\n if (policy != null)\n {\n policy.entryTouched(this);\n }\n }",
"public interface Cache {\r\n\r\n public Object get( Object key);\r\n public void put( Object key, Object value);\r\n}",
"public interface Cache<K, V> {\n\n /**\n * 通过键值获取获取缓存值\n *\n * @param k k\n * @return\n */\n V get(K k);\n\n /**\n * 通过键值刷新缓存值\n *\n * @param k k\n */\n void refresh(K k);\n}",
"@Override\n\tpublic void onEvent(CacheEvent<? extends Object, ? extends Object> cacheEvent) {\n\t\tSystem.out.println(\"cacheEvent.getKey()= \" + cacheEvent.getKey()+\"cacheEvent.getOldValue()=\" +cacheEvent.getOldValue() + \"cacheEvent.getNewValue()=\" + cacheEvent.getNewValue());\n\t}",
"public interface Cache {\n void put(String key, Object value);\n\n Object get(String key);\n}",
"@Test\n public void testNearTruncate()\n {\n NamedCache cache = getNamedCache(\"near-client-listener-truncate\");\n cache.clear();\n\n clearEvents();\n cache.put(MapListenerTests.KEY, MapListenerTests.VALUE);\n assertEquals(cache.get(MapListenerTests.KEY), MapListenerTests.VALUE);\n checkEvents(true, false);\n\n clearEvents();\n cache.truncate();\n Eventually.assertThat(invoking(cache).get(MapListenerTests.KEY), nullValue());\n checkEvents(false, false);\n\n clearEvents();\n cache.put(MapListenerTests.KEY, MapListenerTests.VALUE);\n checkEvents(true, false);\n }",
"public interface ICache {\n\t\n\t/**\n\t * <p>\n\t * get the Cached Object from cache pool by the cache String key\n\t * @param key\n\t * @return\n\t */\n\tpublic Object get(String key);\n\t\n\t\n\t\n\t/**\n\t * <p>\n\t * \n\t * @param key\n\t * @return old cache object \n\t */\n\tpublic Object put(String key,Object value);\n\t\n\t/**\n\t * <p>\n\t * get the Cached Object from cache pool by the cache String key quietly,\n\t * without update the statistic data\n\t * @param key\n\t * @return\n\t */\n\tpublic Object getQuiet(String key);\n\t\n\t\n\t/**\n\t * <p>\n\t * remove the cached object from cache pool by the cache String key\n\t * @param key\n\t * @return\n\t */\n\tpublic Object remove(String key);\n\t\n\t/**\n\t * <p>\n\t * free specied size mem\n\t * @param size unit in Byte\n\t * @return\n\t */\n\tpublic long free(long size);\n\t\n\t\n\t/**\n\t * <p>\n\t * flush to the underly resource\n\t */\n\tpublic void flush();\n\t\n}",
"public interface HitNotifier {\n\n /**\n * Add hl as a listener to hit events.\n * @param hl the hit listener\n */\n void addHitListener(HitListener hl);\n\n /**\n * Remove hl from the list of listeners to hit events.\n * @param hl the hit listener\n */\n void removeHitListener(HitListener hl);\n}",
"public interface UserEntityCache {\n int getHitCount();\n int getMissCount();\n\n void put(long key, CacheElement<UserEntity> cacheElement);\n\n CacheElement<UserEntity> get(long key);\n}",
"StoreResponse add(CACHE_ELEMENT e);",
"public interface StepCandidateCacheListener {\r\n void cacheLoaded(MethodCache<StepCandidate> cache);\r\n}",
"public interface Listener<K, V> {\n\n /**\n * Invoked when a mapping is evicted.\n *\n * @param key the key evicted\n * @param value the value evicted\n */\n void evicted(K key, V value);\n }",
"public static void CacheChanged(Cache cache, Waypoint waypoint) {\n\t\tsynchronized (list) {\n\t\t\tfor (SelectedCacheChangedEventListner event : list) {\n\t\t\t\tif (event == null)\n\t\t\t\t\tcontinue;\n\t\t\t\tevent.SelectedCacheChangedEvent(selectedCache, selectedWaypoint, true, false);\n\t\t\t}\n\t\t}\n\n\t}",
"public static void main(String args[]){\n LRUCache cache = new LRUCache(2);\n\n cache.put(1, 1);\n cache.put(2, 2);\n System.out.println(cache.get(1)); // returns 1\n cache.put(3, 3); // evicts key 2\n System.out.println(cache.get(2)); // returns -1 (not found)\n cache.put(4, 4); // evicts key 1\n System.out.println(cache.get(1)); // returns -1 (not found)\n System.out.println(cache.get(3)); // returns 3\n System.out.println(cache.get(4)); // returns 4\n }",
"@CacheEvict(allEntries = true, cacheNames = { \"airly_now\", \"history\" })\n @Scheduled(fixedDelay = 30000)\n public void reportCacheEvict() {\n }",
"public interface Cache<K, V> {\n\n public V get(K key);\n\n public void put(K key, V value);\n\n public void remove(K key);\n\n}",
"public interface CacheInvalidationStrategyIF {\n\t\n}",
"@Override\n public CacheEventListener createCacheEventListener(Properties properties)\n {\n return new YhxiaCacheEventListener();\n }",
"public interface TypedCache<T> extends WritableCache<T>, ObservableWriteOperation<T>, BaseCache {\n @Nullable\n T find(long id);\n\n @NonNull\n Observable<? extends T> observeById(long id);\n\n @NonNull\n Observable<? extends T> observeById(T element);\n}",
"protected void onAdd()\n {\n scheduleExpiry();\n\n // update units\n int cNewUnits = calculateUnits(m_oValue);\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cOldUnits = m_cUnits;\n if (cOldUnits == -1)\n {\n // entry is discarded; avoid exception\n return;\n }\n\n if (cNewUnits != cOldUnits)\n {\n map.adjustUnits(cNewUnits - cOldUnits);\n m_cUnits = cNewUnits;\n }\n }\n\n // issue add notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_INSERTED, getKey(), null, getValue()));\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tpublic void run() {\n\t\t\tsynchronized (mInetAddressList) {\n\t\t\t\tIterator<?> cacheIterator = mInetAddressList.entrySet().iterator();\n\t\t\t\twhile (cacheIterator.hasNext()) {\n\t\t\t\t\tMap.Entry<String, CacheElement> cacheEntry = (Map.Entry<String, CacheElement>) cacheIterator.next();\n\t\t\t\t\tif (System.currentTimeMillis() - cacheEntry.getValue().getCreateTime() >= mCacheTime * 1000) {\n\t\t\t\t\t\tcacheIterator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public interface ILeveledCache<K, V> extends ICache<K, V>{\n void reCache() throws IOException, ClassNotFoundException;\n Map<K, V> add(K key, V object) throws IOException, ClassNotFoundException;\n List<K> sortedKeys();\n int maxLevel1size();\n Set<K> level1keys();\n}",
"@Override\r\n protected void processUpdate(final ICacheElement<K, V> ce)\r\n {\r\n if (!isAlive())\r\n {\r\n log.error(\"{0}: No longer alive; aborting put of key = {1}\",\r\n () -> logCacheName, ce::getKey);\r\n return;\r\n }\r\n\r\n log.debug(\"{0}: Storing element on disk, key: {1}\",\r\n () -> logCacheName, ce::getKey);\r\n\r\n // old element with same key\r\n IndexedDiskElementDescriptor old = null;\r\n\r\n try\r\n {\r\n IndexedDiskElementDescriptor ded = null;\r\n final byte[] data = getElementSerializer().serialize(ce);\r\n\r\n // make sure this only locks for one particular cache region\r\n storageLock.writeLock().lock();\r\n try\r\n {\r\n old = keyHash.get(ce.getKey());\r\n\r\n // Item with the same key already exists in file.\r\n // Try to reuse the location if possible.\r\n if (old != null && data.length <= old.len)\r\n {\r\n // Reuse the old ded. The defrag relies on ded updates by reference, not\r\n // replacement.\r\n ded = old;\r\n ded.len = data.length;\r\n }\r\n else\r\n {\r\n // we need this to compare in the recycle bin\r\n ded = new IndexedDiskElementDescriptor(dataFile.length(), data.length);\r\n\r\n if (doRecycle)\r\n {\r\n final IndexedDiskElementDescriptor rep = recycle.ceiling(ded);\r\n if (rep != null)\r\n {\r\n // remove element from recycle bin\r\n recycle.remove(rep);\r\n ded = rep;\r\n ded.len = data.length;\r\n recycleCnt++;\r\n this.adjustBytesFree(ded, false);\r\n log.debug(\"{0}: using recycled ded {1} rep.len = {2} ded.len = {3}\",\r\n logCacheName, ded.pos, rep.len, ded.len);\r\n }\r\n }\r\n\r\n // Put it in the map\r\n keyHash.put(ce.getKey(), ded);\r\n\r\n if (queueInput)\r\n {\r\n queuedPutList.add(ded);\r\n log.debug(\"{0}: added to queued put list. {1}\",\r\n () -> logCacheName, queuedPutList::size);\r\n }\r\n\r\n // add the old slot to the recycle bin\r\n if (old != null)\r\n {\r\n addToRecycleBin(old);\r\n }\r\n }\r\n\r\n dataFile.write(ded, data);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n\r\n log.debug(\"{0}: Put to file: {1}, key: {2}, position: {3}, size: {4}\",\r\n logCacheName, fileName, ce.getKey(), ded.pos, ded.len);\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure updating element, key: {1} old: {2}\",\r\n logCacheName, ce.getKey(), old, e);\r\n }\r\n }",
"protected abstract void evict();",
"public interface Cache<T> {\n\n /**\n * Put the object in the cache with the given <code>key</code>.\n * <p>\n * The object is stored for the default configured time, depending on the\n * cache implementation. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n void put(@NonNull String key, @NonNull T value);\n\n /**\n * Put the object in the cache with the given <code>key</code> for the\n * given <code>duration</code>.\n * <p>\n * The object is stored for the requested duration. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param duration The (not null) duration to store the object for.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull Duration duration);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull LocalDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull ZonedDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for ever.\n * <p>\n * The object is stored and should never be removed. This should overrule configured default\n * expiry time for objects put in the cache. However, the object may still be evicted from\n * the cache, for instance for memory reasons.\n * <p>\n * This method calls Duration.ofMillis(Long.max()) and passes it to the put(key, value, Duration duration).\n * So this method does not persist eternally, but rather persists for a long time.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n default void putEternally(@NonNull final String key, @NonNull final T value) {\n put(key, value, Duration.ofMillis(Long.MAX_VALUE));\n }\n\n /**\n * Retrieve the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The value, or <code>null</code> if the object is not found.\n */\n T get(@NonNull String key);\n\n /**\n * Retrieve an optional for the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The <code>Optional</code> for the value.\n */\n default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }\n\n /**\n * Remove the value associate with the <code>key</code>.\n *\n * @param key The key to remove.\n */\n void remove(@NonNull String key);\n\n}",
"public interface HomeCache {\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestAllPins(\n Observable<PinListBean> observablePinList,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestAllPinsNext(\n Observable<PinListBean> observablePinList,\n DynamicKey maxPinId,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestFollowingPins(\n Observable<PinListBean> observablePinList,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestFollowingPinsNext(\n Observable<PinListBean> observablePinList,\n DynamicKey maxPinId,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestPopularPins(\n Observable<PinListBean> observablePinList,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestPopularPinsNext(\n Observable<PinListBean> observablePinList,\n DynamicKey maxPinId,\n EvictProvider evictProvider);\n}",
"private void pageCacheChanged() {\n // Ok to have a race here, see the field javadoc.\n if (!pageCacheChanged)\n pageCacheChanged = true;\n }",
"long getEvictions();",
"public interface CacheValueComputationFailureHandler {\n public void onFailure(String key, Throwable e);\n}",
"@Override\n protected synchronized void subscribeActual(Observer<? super Response<T>> observer) {\n Call<T> call = originalCall.clone();\n\n try {\n for (Annotation annotation : annotations) {\n if (annotation instanceof Cache) {\n time = ((Cache) annotation).time();\n bindParams = ((Cache) annotation).bindParams();\n break;\n }\n }\n MethodFactoryAdapter adapter = new MethodFactoryAdapter(call.request(), bindParams);\n MethodFactory factory = adapter.get();\n HashMap<String, String> parseParameters = factory.parseParameters();\n String url = call.request().url().toString();\n boolean isFirst = true;\n StringBuffer buffer = new StringBuffer();\n for (HashMap.Entry<String, String> entry : parseParameters.entrySet()) {\n String key = entry.getKey();\n String value = entry.getValue();\n if (isFirst) {\n buffer.append(\"?\").append(key).append(\"=\").append(value);\n isFirst = false;\n } else {\n buffer.append(\"&\").append(key).append(\"=\").append(value);\n }\n }\n String cacheUrl = url + buffer.toString();\n long nowTime = System.currentTimeMillis();\n fileName = cacheUrl + \"&\" + nowTime;\n\n cache = DiskLruCacheHelper.createCache(APP.app, URL_CACHE);\n String responseCacheData = DiskLruCacheHelper.readCacheToString(cache, cacheUrl);\n int indexOfTime = responseCacheData.indexOf(\"\\n\");\n String[] times = responseCacheData.substring(0, indexOfTime).split(\":\");\n responseCacheData = responseCacheData.substring(indexOfTime + 1);\n long diskCacheTime = Long.parseLong(times[1]);\n if (!TextUtils.isEmpty(responseCacheData) && diskCacheTime != -1 && nowTime - time <= diskCacheTime) {\n E e = new Gson().fromJson(responseCacheData, E.class);\n Response<T> cacheResponse = (Response<T>) Response.success(e);\n observer.onNext(cacheResponse);\n } else {\n cache.delete();\n cache = null;\n\n }\n } catch (Exception e) {\n if (cache != null && !cache.isClosed()) {\n try {\n cache.delete();\n } catch (IOException e1) {\n\n }\n call = null;\n }\n }\n\n\n CallDisposable disposable = new CallDisposable(call);\n observer.onSubscribe(disposable);\n\n boolean terminated = false;\n try {\n Response<T> response = call.execute();\n E e = (E) response.body();\n String responseData = new Gson().toJson(e);\n if (cache == null) {\n cache = DiskLruCacheHelper.createCache(APP.app, URL_CACHE);\n }\n DiskLruCacheHelper.writeStringToCache(cache, responseData, fileName);\n if (!disposable.isDisposed()) {\n observer.onNext(response);\n }\n if (!disposable.isDisposed()) {\n terminated = true;\n observer.onComplete();\n }\n } catch (Throwable t) {\n Exceptions.throwIfFatal(t);\n if (terminated) {\n RxJavaPlugins.onError(t);\n } else if (!disposable.isDisposed()) {\n try {\n observer.onError(t);\n } catch (Throwable inner) {\n Exceptions.throwIfFatal(inner);\n RxJavaPlugins.onError(new CompositeException(t, inner));\n }\n }\n }\n }",
"@Override\n\tpublic void addStateListener(MemcachedClientStateListener arg0) {\n\n\t}",
"@Override\n public void cacheResult(List<BrokerMessageListener> brokerMessageListeners) {\n for (BrokerMessageListener brokerMessageListener : brokerMessageListeners) {\n if (EntityCacheUtil.getResult(\n BrokerMessageListenerModelImpl.ENTITY_CACHE_ENABLED,\n BrokerMessageListenerImpl.class,\n brokerMessageListener.getPrimaryKey()) == null) {\n cacheResult(brokerMessageListener);\n } else {\n brokerMessageListener.resetOriginalValues();\n }\n }\n }",
"interface ICacheUtil {\n void put(Object key, Object value, long expiredTime, TimeUnit unit);\n Object get(Object key);\n void remove(Object key);\n void clear();\n boolean isExists(Object key);\n}",
"public interface HitNotifier {\r\n\r\n /**\r\n * @param hl a hit listener\r\n * Add hl as a listener to hit events.\r\n */\r\n void addHitListener(HitListener hl);\r\n}",
"public interface InboundConnectionCache<C extends Connection> extends ConnectionCache<C> {\n /** Mark a connection as busy because a request is being processed\n * on the connection. The connection may or may not be previously\n * known to the cache when this method is called.\n * Busy connections cannot be reclaimed.\n * This provides an early indication that a Connection is in use,\n * before we know how many responses still need to be sent on\n * the Connection for this request. This reduces the likelyhood\n * of reclaiming a connection on which we are processing a request.\n * <P>\n * Note that this problem is inherent in a distributed system.\n * We could in any case reclaim a connection AFTER a client\n * has sent a request but BEFORE the request is received.\n * Note that AFTER and BEFORE refer to global time which does\n * not really exist in a distributed system (or at least we\n * want to pretend it is not available).\n *\n * XXX Should we age out connections?\n * This would require actual time stamps, rather than just an LRU queue.\n */\n void requestReceived( C conn ) ;\n\n /** Indicate that request processing has been completed for a request\n * received on conn. This indicates that a Connection that received\n * a request as indicated in a previous call to requestReceived has\n * completed request processing for that request. Responses may still\n * need to be sent. Some number of\n * responses (usually 0 or 1) may be expected ON THE SAME CONNECTION\n * even for an idle connection. We maintain a count of the number of\n * outstanding responses we expect for protocols that return the response\n * on the same connection on which the request was received. This is\n * necessary to prevent reclamation of a Connection that is idle, but\n * still needed to send responses to old requests.\n */\n void requestProcessed( C conn, int numResponseExpected ) ;\n\n /** Inform the cache that a response has been sent on a particular\n * connection.\n * <P>\n * When a Connection is idle, and has no pending responses, it is\n * eligible for reclamation.\n */\n void responseSent( C conn ) ;\n}",
"public interface Listener {\n\n /** Called when the tracked downloads changed. */\n void onDownloadsChanged();\n }",
"public interface Listener {\n\n /** Called when the tracked downloads changed. */\n void onDownloadsChanged();\n }",
"StoreResponse append(CACHE_ELEMENT element);",
"private void removeExpired() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (isExpired(entry.getValue())) {\n removeMap.put(entry.getKey(), entry.getValue());\n }\n }\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.expiredElement(entry.getKey());\n }\n }\n }",
"public interface MongoDBCache<K, V> {\n /**\n * Size of the cache\n *\n * @return size\n */\n int size();\n\n /**\n * Purge all data from cache\n */\n void clear();\n\n /**\n * Remove the entry which has the same key of the parameter\n *\n * @param key\n * @return the removed cache entry\n */\n boolean remove(byte[] key);\n\n /**\n * Get a cache entry which has the same key of the parameter\n *\n * @param key\n * @return\n */\n MongoDBEntry<K, V> get(byte[] key);\n\n /**\n * Verify if the cache contains the key passed on parameter\n *\n * @param key\n * @return true if there is some entry, false if there is not\n */\n boolean containsKey(byte[] key);\n\n /**\n * Since mongo doesn't support actual paging results,\n * we have to sort and do a less than on the last id.\n *\n * @param lastKey\n * @return\n */\n List<MongoDBEntry<K, V>> getPagedEntries(byte[] lastKey);\n\n /**\n * This method must remove all data which are expired. <br/>\n * What means delete all entries that have the expiryTime parameter less than the current date.\n */\n List<MongoDBEntry<K, V>> removeExpiredData(byte[] lastKey);\n\n /**\n * Put an entry to the cache\n *\n * @param entry\n */\n void put(MongoDBEntry<K, V> entry);\n\n void start() throws Exception;\n\n /***\n *\n */\n void stop();\n}",
"public interface CacheManager {\n\n void init();\n\n void destroy();\n\n void del(String key);\n\n void set(String key, Object value);\n\n void set(String key, Object value, int expireTime);\n\n <T> T get(String key, Class<T> clazz);\n\n void hset(String key, String subKey, Object value);\n\n <T> T hget(String key, String subKey, Class<T> clazz);\n\n <T> Map<String, T> hget(String key, Class<T> clazz);\n\n void hrem(String key, String subKey);\n\n long hincr(String key, String subKey);\n\n void sadd(String key, Object val);\n\n boolean sisMember(String key, Object val);\n\n void srem(String key, Object val);\n\n Set<String> sget(String key);\n\n <T> Set<T> sget(String key, Class<T> clazz);\n\n void zadd(String key, Object val, double score);\n\n boolean zisMember(String key, Object val);\n\n void zrem(String key, Object val);\n\n void zrem(String key, double min, double max);\n\n void zreplace(String key, Object val, double score);\n\n double zincr(String key, Object val, double score);\n\n <T> Set<T> zget(String key, double min, double max, Class<T> clazz);\n\n Set<String> zget(String key, double min, double max);\n}",
"public interface TaskCache {\n /**\n * Gets an {@link Object} which will emit a {@link TaskEntity}.\n *\n * @param userId The id used to get data.\n */\n List<TaskEntity> get(int userId);\n\n /**\n * Puts and element into the cache.\n *\n * @param userEntity The task data to save.\n */\n void put(TaskEntity userEntity);\n\n /**\n * Checks if an element (User) exists in the cache.\n *\n * @param userId The id used to get data.\n * @return true if the element is cached, otherwise false.\n */\n boolean isCached(int userId);\n\n /**\n * Checks if the cache is expired.\n * @param userId The id used to get data.\n * @return true, the cache is expired, otherwise false.\n */\n boolean isExpired(int userId);\n\n /**\n * Evict all elements of the cache.\n *\n * @param userId The id used to get data.\n */\n void evictAll(int userId);\n\n /**\n * Change task status\n *\n * @param idTask task to update.\n */\n void refresh(int idTask);\n}",
"StoreResponse set(CACHE_ELEMENT e);",
"void notifyAvailableStorageListeners(final int highWaterValue)\n {\n final CallerContextManager ccm = (CallerContextManager) ManagerManager.getInstance(CallerContextManager.class);\n\n if (ccList != null)\n {\n final int lastHighWaterValue = persistentStorageUse;\n ccList.runInContext(new Runnable()\n {\n public void run()\n {\n synchronized (implObject)\n {\n Vector listeners;\n if ((listeners = getCCData(ccm.getCurrentContext()).asListeners) != null)\n {\n // Invoke listeners\n for (int i = 0; i < listeners.size(); i++)\n {\n // we only invoke a listener once for a high\n // water mark value. Listener A\n // wants to be notified at 75% full and listener\n // B wants to be notified at 90% full.\n // So when we hit 80% full, the listener A is\n // notified. On the next write we\n // hit 90% full, only listener B is notified.\n ListenerData ld = (ListenerData) listeners.elementAt(i);\n if (ld.highWaterMark <= highWaterValue)\n {\n if (ld.highWaterMark > lastHighWaterValue)\n {\n ld.listener.notifyHighWaterMarkReached();\n }\n }\n else\n {\n // listeners are inserted in ascending order\n // so we don't have\n // to iterate the whole list.\n break;\n }\n }\n }\n }\n }\n });\n }\n }",
"private void collectGarbageInCache() {\n CacheReference r;\n while ((r = (CacheReference)queue.poll()) != null) {\n fontCache.remove(r.getKey());\n }\n }",
"@Override\n public void notifyExists(Key<?> key, boolean exists)\n {\n // We have no equivalent for this in our sessions, so just pass along directly to the decorated cache\n queryCache.notifyExists(key, exists);\n }",
"public interface ImageCache {\n Drawable get(Uri uri);\n\n boolean hasEntry(Uri uri);\n\n void preload(Uri uri);\n\n void purge();\n\n void setImageResolver(NotificationInlineImageResolver notificationInlineImageResolver);\n }",
"@Override\n public <T> void storeInItemCache(String key, CacheElement<T> cacheElement) {\n\n if (!isEnabled()) {\n return;\n }\n\n if (!cacheExists()) {\n LOG.error(\"Cache configuration is invalid! NOT Caching. Check EH Cache configuration.\");\n return;\n }\n\n // detect undeclared nulls, complain, and set to null\n if (!cacheElement.isNull() && cacheElement.getPayload() == null) {\n Exception exToLogToHaveStacktraceWhoCausedIt = new Exception();\n LOG.error(\"Detected undeclared null payload on element with key \" + key + \" at insert time!\",\n exToLogToHaveStacktraceWhoCausedIt);\n cacheElement.setNull(true);\n }\n cacheElement.setExpired(false);\n storeElement(key, cacheElement);\n }",
"public interface Caching {\n\t\n\t/**\n\t * ititialize resources for a cache\n\t *\n\t */\n\tvoid init();\n\t\n\t/**\n\t * clear cache\n\t *\n\t */\n\tvoid clear();\n\n}",
"public interface CollectionListener<T>\n{\n public void itemAdded(T item);\n\n public void itemUpdated(T item);\n\n public void itemRemoved(T item);\n}",
"int getCacheConcurrency();",
"public interface BitmapCache {\n void put(BitmapRequest bitmapRequest, Bitmap bitmap);\n\n Bitmap get(BitmapRequest bitmapRequest);\n\n boolean remove(BitmapRequest bitmapRequest);\n\n void clear();\n}",
"List<Runnable> getItemListeners();",
"private void onAccess() {\n ctx.itHolder().checkWeakQueue();\n\n checkRemoved();\n }",
"@ThreadSafe\n interface CacheLoaderTask<K, V> {\n\n /**\n * @param marshalledEntry an iterated entry. Note that {@link org.infinispan.marshall.core.MarshalledEntry#getValue()}\n * might be null if the fetchValue parameter passed to {@link AdvancedCacheLoader#process(KeyFilter,\n * org.infinispan.persistence.spi.AdvancedCacheLoader.CacheLoaderTask,\n * java.util.concurrent.Executor, boolean, boolean)} is false.\n * @param taskContext allows the implementors to decide when to stop the iteration by invoking {@link\n * org.infinispan.persistence.spi.AdvancedCacheLoader.TaskContext#stop()}\n */\n void processEntry(MarshalledEntry<K, V> marshalledEntry, TaskContext taskContext) throws InterruptedException;\n }",
"@Override\n public boolean evaluate(CacheEntryEvent<? extends BinaryObject, ? extends BinaryObject> e) {\n if (!e.getOldValue().<Integer>field(\"population\").equals(\n e.getValue().<Integer>field(\"population\")))\n return true;\n\n // Don't send a notification in all other cases\n return false;\n }",
"@Override\n public void run() {\n // let's cache the current time - we do not operate on a millisecond precision anyway\n final long currentTimeMillis = System.currentTimeMillis();\n // iterate through all entries and remove those where the current time is past their expiry\n Set<Map.Entry<Tuple2<JobID, TransientBlobKey>, Long>> entries =\n new HashSet<>(blobExpiryTimes.entrySet());\n for (Map.Entry<Tuple2<JobID, TransientBlobKey>, Long> entry : entries) {\n if (currentTimeMillis >= entry.getValue()) {\n JobID jobId = entry.getKey().f0;\n TransientBlobKey blobKey = entry.getKey().f1;\n\n cleanupCallback.accept(jobId, blobKey);\n }\n }\n }",
"void evictFromCache( Long id );",
"public interface Listener{\n\t\tpublic void notify(Map<String,Serializable> datas);\n\t}",
"@Override\n\tpublic void invalidateCache() {\n\t\t\n\t}",
"@Override\n\tpublic void onAdCached(AdType arg0) {\n\t\t\n\t}",
"private void listenForNotificationEvents() {\n\t\twhile (!shutdownRequested) {\n\t\t\ttry {\n\t\t\t\tNotificationJob job = notificationQueue.poll( 1000, TimeUnit.MILLISECONDS );\n\t\t\t\t\n\t\t\t\tif (job != null) {\n\t\t\t\t\tprocessNotificationJob( job );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// Ignore and continue looping until shutdown requested\n\t\t\t}\n\t\t}\n\t}",
"public void processScheduledEvent(HttpArtifactCacheEvent.Scheduled event) {\n if (event.getOperation() != ArtifactCacheEvent.Operation.STORE) {\n return;\n }\n\n scheduledCount.incrementAndGet();\n }",
"@Override\r\n protected void processRemovedLRU(final K key, final IndexedDiskElementDescriptor value)\r\n {\r\n if (value != null)\r\n {\r\n subLengthFromCacheSize(value);\r\n }\r\n\r\n addToRecycleBin(value);\r\n\r\n log.debug(\"{0}: Removing key: [{1}] from key store.\", logCacheName, key);\r\n log.debug(\"{0}: Key store size: [{1}].\", logCacheName, this.size());\r\n\r\n doOptimizeRealTime();\r\n }",
"public interface IMoyensListener {\n\n /**\n * Called when a new demand is asked\n * @param newDemand the new demand\n */\n void onDemandAsked(Vehicule newDemand);\n\n /**\n * Called when a demand in the list has been updated\n * @param demand the updated demand\n */\n void onDemandUpdated(Vehicule demand);\n}",
"public interface HoldBackQueueListener {\n public void messagePutInHoldBackQueue(Message message);\n public void messageRemovedFromHoldBackQueue(Message message);\n}",
"@Test\n public void testLIFOEntryEviction() {\n try {\n assertNotNull(cache);\n LocalRegion rgn = (LocalRegion) cache.getRegion(SEPARATOR + regionName);\n assertNotNull(rgn);\n\n assertEquals(\"Region is not properly cleared \", 0, rgn.size());\n assertTrue(\"Entry count not 0 \", new Long(0).equals(lifoStats.getCounter()));\n // put eight entries into the region\n for (int i = 0; i < 8; i++) {\n rgn.put((long) i, (long) i);\n if (i < capacity) {\n // entries are in memory\n assertNotNull(\"Entry is not in VM \", rgn.getValueInVM((long) i));\n } else {\n /*\n * assertTrue(\"LIFO Entry is not evicted\", lifoClockHand.getLRUEntry() .testEvicted());\n */\n assertTrue(\"Entry is not null \", rgn.entries.getEntry((long) i).isValueNull());\n }\n }\n\n } catch (Exception ex) {\n ex.printStackTrace();\n fail(\"Test failed\");\n }\n }",
"@Ignore(\"Google's LRU map max size is not predictable\")\n\t@Override\n\tpublic void evictionTest() throws CacheRegionNotSpecifiedException, CacheValueLoadException\n\t{\n\t}",
"@Override\n public int compareTo(CacheEntry cacheEntry) {\n if (arrivalTime < cacheEntry.arrivalTime) return -1;\n else if (arrivalTime > cacheEntry.arrivalTime) return 1;\n else return 0;\n }",
"@CacheEvict(value = \"meals\", allEntries = true)\n @Override\n public void evictCache() {\n }",
"protected void handleCache(final TileInfo tile)\n {\n if (!valid)\n return;\n\n boolean success = false;\n final int size = (int) tile.fetchInfo.cacheFile.length();\n final byte[] data = new byte[size];\n try {\n try (FileInputStream fileStream = new FileInputStream(tile.fetchInfo.cacheFile)) {\n try (BufferedInputStream buf = new BufferedInputStream(fileStream)) {\n final int bytesRead = buf.read(data, 0, data.length);\n if (bytesRead == data.length) {\n success = true;\n }\n }\n }\n } catch (Exception e) {\n Log.w(\"RemoteTileFetcher\", \"Failed to read cache\", e);\n }\n\n if (success) {\n if (!valid)\n return;\n\n final Handler handler = new Handler(getLooper());\n handler.post(() -> {\n allStats.localData = allStats.localData + size;\n recentStats.localData = recentStats.localData + size;\n\n handleFinishLoading(tile,data,null);\n });\n\n if (debugMode) {\n Log.d(\"RemoteTileFetcher\",\"Read from cache: \" + tile.fetchInfo.urlReq);\n }\n } else {\n // Didn't read it, so go get it\n startFetch(tile);\n\n if (debugMode) {\n Log.d(\"RemoteTileFetcher\",\"Failed to reach from cache: \" + tile.fetchInfo.urlReq);\n }\n }\n }",
"public void entryEvicted(EntryEvent<Identifier, SystemMetadata> event) {\n // nothing to do, entry remains in backing store\n\n }",
"public interface RSSItemListener {\n\n void addRSSItem(RSSItem rssItem);\n\n ArrayList<RSSItem> getAllRSSItems();\n\n int getRSSItemCount();\n\n}",
"public interface RemoteInvalidationProvider {\n\n /**\n * Invalidate the specified cache keys in all servers within the same data center.\n */\n void invalidateOtherServersInSameDataCenter(InvalidationEvent event);\n\n /**\n * Invalidate the specified cache keys in all servers in other data centers.\n */\n void invalidateOtherDataCenters(InvalidationEvent event);\n}",
"public void interestCacheInsert(InterestCacheEntry e)\n\t{\n\t\tif ( interestCache_purgeTimer == null ){\n\t\t\tinterestCache_purgeTimer = new DiffTimer(DiffTimer.TIMEOUT_INTEREST_CACHE_PURGE, null) ;\n\t\t\tif ( interestCache_purgeTimer != null ){\n\t\t\t\tinterestCache_purgeTimer.handle = setTimeout(interestCache_purgeTimer, INTEREST_CACHE_PURGE_INTERVAL) ;\n\t\t\t}\n\t\t}\n\t\tinterestCache.put(e.getInterest().getTaskId(),e) ;\n\t}",
"private void removeEvicted() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n removeMap.putAll(toEvictMap);\n toEvictMap.clear();\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.evictedElement(entry.getKey());\n }\n }\n }",
"private void updateCache(long counter) {\n vertx.eventBus().rxSend(\"posting::get\", null)\n .toObservable()\n /* TODO:\n * 1. Log received string\n * 2. Deserialize received string to List<Posting>\n * 3. Add exponential backoff using .retryWhen\n */\n .subscribe();\n\n }",
"public synchronized void c() {\n a(this.a.getCacheFlushingInterval() > 0 ? SystemClock.uptimeMillis() + (this.a.getCacheFlushingInterval() * 1000) : -1);\n if (this.b != null) {\n this.b.removeCallbacks(this);\n b();\n }\n }",
"public void cacheResult(DataEntry dataEntry);",
"public interface CacheIndex {\n \n /**\n * Puts index on indexedKey.\n *\n * @param indexedKey the indexed key\n * @param key the key\n */\n void put(Object indexedKey, Object key);\n \n /**\n * Removes the index from indexedKey.\n *\n * @param indexedKey the indexed key\n * @param key the key\n */\n void remove(Object indexedKey, Object key);\n \n /**\n * Equals to.\n *\n * @param expectedValue the expected value\n * @return the list\n */\n List<Object> equalsTo(Object expectedValue);\n \n /**\n * Less than.\n *\n * @param value the value\n * @return the list\n */\n List<Object> lessThan(Object value);\n \n /**\n * Less than or equals to.\n *\n * @param value the value\n * @return the list\n */\n List<Object> lessThanOrEqualsTo(Object value);\n \n /**\n * Greater than.\n *\n * @param value the value\n * @return the list\n */\n List<Object> greaterThan(Object value);\n \n /**\n * Greater than or equals to.\n *\n * @param value the value\n * @return the list\n */\n List<Object> greaterThanOrEqualsTo(Object value);\n \n /**\n * Between.\n *\n * @param lowerBound the lower bound\n * @param upperBound the upper bound\n * @return the list\n */\n List<Object> between(Object lowerBound, Object upperBound);\n \n}"
] | [
"0.66830796",
"0.6508848",
"0.6340679",
"0.6175407",
"0.5979635",
"0.59617186",
"0.58759695",
"0.5851739",
"0.5777608",
"0.57132775",
"0.57022065",
"0.5684688",
"0.5663291",
"0.56623834",
"0.56037384",
"0.5579443",
"0.55773133",
"0.5563825",
"0.5563758",
"0.55454254",
"0.54978514",
"0.54788005",
"0.54766005",
"0.54739726",
"0.54714984",
"0.54367805",
"0.54264945",
"0.5414014",
"0.540057",
"0.5363543",
"0.53598005",
"0.5357955",
"0.53500885",
"0.5312827",
"0.5312261",
"0.52946746",
"0.52800375",
"0.52732956",
"0.5271206",
"0.5264316",
"0.5263976",
"0.52534235",
"0.52413684",
"0.5227811",
"0.5220949",
"0.521833",
"0.5217066",
"0.5214706",
"0.514837",
"0.5131547",
"0.5131206",
"0.51138735",
"0.51131344",
"0.51000166",
"0.50977063",
"0.50909376",
"0.50909376",
"0.5090697",
"0.50902295",
"0.5080736",
"0.50651425",
"0.5060764",
"0.5045162",
"0.5044967",
"0.5037308",
"0.50368196",
"0.5016396",
"0.5013242",
"0.50084025",
"0.50025386",
"0.4997101",
"0.49843115",
"0.49741942",
"0.49631616",
"0.49498108",
"0.4949626",
"0.49484622",
"0.4929383",
"0.49260733",
"0.4910121",
"0.49040708",
"0.48878685",
"0.48860595",
"0.48831114",
"0.4878987",
"0.48789027",
"0.4876087",
"0.48748946",
"0.48718044",
"0.48712194",
"0.48623967",
"0.4856276",
"0.48487452",
"0.48477834",
"0.48430103",
"0.48403323",
"0.4840245",
"0.48343265",
"0.48328432",
"0.48304924"
] | 0.745853 | 0 |
An entry has outlived its "timetolive. | void expiredElement(T key); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isExpired(CacheableObject value) {\n if (value == null) {\n return false;\n } else {\n return System.currentTimeMillis() - value.createTime > timeToLive;\n }\n }",
"@Override\r\n\t\tprotected boolean removeEldestEntry(java.util.Map.Entry<K, com.vip.utils.AutoClearnMap.Entry<V>> eldest) {\n\t\t\tlong now = System.currentTimeMillis();\r\n\t\t\tif ((now - eldest.getValue().getLastTime()) > getMaxTime())\r\n\t\t\t\treturn true;\r\n\t\t\t\r\n\t\t\treturn super.removeEldestEntry(eldest);\r\n\t\t}",
"public int getTimeToLive() {\n\t\treturn deathsTillForget;\n\t}",
"public void setTimeToLive(long value) {\n this.timeToLive = value;\n }",
"public void setTimeToLive(int timeToLive) {\n this.timeToLive = timeToLive;\n }",
"public long getTimeToLive() {\n return timeToLive;\n }",
"public void updateLife(){\n lifeTime--;\n if(lifeTime <= 0){\n destroyed = true;\n }\n }",
"public boolean hasExpired() {\n return this.getOriginalTime() + TimeUnit.MINUTES.toMillis(2) < System.currentTimeMillis();\n }",
"public boolean isExpired() {\n return age() > this.timeout;\n }",
"public boolean isExpired() {\n return ((System.currentTimeMillis() - this.createdTime) >= expiryTime);\n }",
"public boolean isDestroyed(){\n\t\treturn System.currentTimeMillis() > creationTime + this.visibleTime ;\n\t}",
"boolean updateDeathsTillForget() {\n\t\tdeathsTillForget -= 1;\n\t\treturn (deathsTillForget < 1);\n\t}",
"public void lifeLost() {\n\n\t\tif (invincipleTimer <= currentTickCount) {\n\t\t\tSystem.out.println(\"Life Lost!\");\n\n\t\t\thealth--;\n\t\t\tinvincipleTimer = currentTickCount + invicibleLength;\n\t\t}\n\t}",
"public boolean isEnd() { return (_dateExpiration - System.currentTimeMillis()) <= 0; }",
"public boolean hasExpired(){\n Date now = new Date();\n return now.after(getExpireTime());\n }",
"boolean isExpire(long currentTime);",
"public void lostLife(){\r\n\t\tthis.lives--;\r\n\t}",
"@Override\n\t\t\tprotected boolean removeEldestEntry(final Map.Entry<K, V> eldest) {\n\t\t\t\treturn super.size() > LRUCache.this.cacheSize;\n\t\t\t}",
"private void removeTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n SoftReference<TimeEntry> timeEntrySoftReference = null;\n ListIterator<SoftReference<TimeEntry>> iterator = timeEntries.listIterator();\n while (iterator.hasNext() && (timeEntrySoftReference == null))\n {\n SoftReference<TimeEntry> softReference = iterator.next();\n if ((softReference != null) && softReference.get() == timeEntry)\n {\n timeEntrySoftReference = softReference;\n }\n }\n if (timeEntrySoftReference != null)\n {\n timeEntries.remove(timeEntrySoftReference);\n }\n }\n }",
"public boolean hasVisitEndtime() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"public boolean hasVisitEndtime() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"public boolean isExpired() {\n return System.currentTimeMillis() > this.expiry;\n }",
"public boolean hasExpired() {\n return (System.currentTimeMillis() - lastUpdate) > IMAGE_CACHE_EXPIRE;\n }",
"public boolean isExpired()\n\t{\n\t\tif (TimeRemaining == 0) \n\t\t\treturn true;\n\t\telse return false;\n\t}",
"private void updateTimeEntryData()\n throws RedmineException\n {\n if (System.currentTimeMillis() > (timeEntriesUpdateTimeStamp+Settings.cacheExpireTime*1000))\n {\n synchronized(timeEntries)\n {\n // get total number of time entries\n int timeEntryCount = getDataLength(\"/time_entries\",\"time_entry\");\n for (int i = timeEntries.size(); i < timeEntryCount; i++)\n {\n timeEntries.add(TIME_ENTRY_NULL);\n }\n\n // get date of first time entry (Note: always sorted descending and cannot be changed)\n timeEntryStartDate = new Date();\n getData(\"/time_entries\",\"time_entry\",timeEntryCount-1,1,new ParseElementHandler<TimeEntry>()\n {\n public void data(Element element)\n {\n timeEntryStartDate = getDateValue(element,\"spent_on\");\n//Dprintf.dprintf(\"timeEntryStartDate=%s\",timeEntryStartDate);\n }\n });\n\n timeEntriesUpdateTimeStamp = System.currentTimeMillis();\n }\n }\n }",
"boolean hasVisitEndtime();",
"boolean hasVisitEndtime();",
"protected static boolean inviteIsAfterTime(Invite inv, long time) {\n long startUtc = 0;\n ParsedDateTime dtStart = inv.getStartTime();\n if (dtStart != null)\n startUtc = dtStart.getUtcTime();\n long ridUtc = 0;\n RecurId rid = inv.getRecurId();\n if (rid != null) {\n ParsedDateTime ridDt = rid.getDt();\n if (ridDt != null)\n ridUtc = ridDt.getUtcTime();\n }\n long invTime = Math.max(startUtc, ridUtc);\n if (inv.isAllDayEvent())\n time -= MSECS_PER_DAY;\n return invTime >= time;\n }",
"public boolean hasVisitEndtime() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }",
"public boolean hasVisitEndtime() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }",
"public boolean isExpired() {\n return getExpiration() <= System.currentTimeMillis() / 1000L;\n }",
"private void expiredWaitTime(VetoedTriggerKey vetoedkey) {\n\t\tlogger.info(\"waitTime exceeded for job:\" + vetoedkey.getKey().toString() + \", giving up\");\n\t\tJobReceiverImpl receiver = (JobReceiverImpl) jobFacade.getJobReceiver(vetoedkey.getKey().getName());\n\t\tif (receiver != null) {\n\t\t\treceiver.putEvent(vetoedkey.getKey().getName(), TRIGGEREVENT.MISFIRED, new Date());\n\t\t\tint ilast = receiver.resultCount() - 1;\n\t\t\tif (ilast >= 0) {\n\t\t\t\tJobResultImpl result = (JobResultImpl) receiver.getJobResult(ilast);\n\t\t\t\tresult.setWaitexpiredAt(new Date());\n\t\t\t}\n\t\t}\n\t}",
"public Date takeOff() {\n \t\r\n \tthis.lastTimeTookOf = new Date();\r\n \treturn lastTimeTookOf;\r\n }",
"public final boolean hasExpired(long curTime) {\n\t if ( m_tmo == NoTimeout)\n\t \treturn false;\n\t if ( curTime > m_tmo)\n\t \treturn true;\n\t return false;\n\t}",
"protected static void expireLocalEntry(Object oKey, NamedCache cache)\n {\n CacheService service = cache.getCacheService();\n BackingMapManagerContext ctx = service.getBackingMapManager().getContext();\n LocalCache mapBM = (LocalCache) ctx.getBackingMap(getCacheName0());\n LocalCache.Entry entry = (LocalCache.Entry)\n mapBM.getEntry(ctx.getKeyToInternalConverter().convert(oKey));\n\n entry.setExpiryMillis(Base.getSafeTimeMillis() - 5000);\n\n try\n {\n // Expiry has a quarter-second granularity; pause this thread to\n // ensure that we don't optimize over the expiry check. See\n // OldCache.m_lNextFlush.\n Blocking.sleep(0x200L);\n }\n catch (InterruptedException e)\n {\n }\n }",
"private void addTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n // insert entry into list\n int index = 0;\n while (index < timeEntries.size())\n {\n SoftReference<TimeEntry> softReference = timeEntries.get(index);\n if ((softReference != null) && softReference.get().spentOn.isBefore(timeEntry.spentOn))\n {\n break;\n }\n index++;\n }\n timeEntries.add(index,new SoftReference<TimeEntry>(timeEntry));\n }\n }",
"protected synchronized void removeExpired(Entry entry, boolean fRemoveInternal)\n {\n entry.discard();\n if (fRemoveInternal)\n {\n super.removeEntryInternal(entry);\n }\n }",
"public boolean checkTimeInPast() throws ParseException {\n LocalTime ltnow = LocalTime.now();\n if(b_startTime != null && checkDateIsToday()){\n LocalTime ltstart = b_startTime.toInstant().atZone(ZoneId.systemDefault()).toLocalTime();\n return ltstart.isBefore(ltnow);\n }else{\n return false;\n }\n }",
"public boolean isExpired() {\n final LocalDateTime now = LocalDateTime.now().minusSeconds(10L);\n return now.isAfter(startTime.plusMinutes(exam.getExamTime())) || endTime != null;\n }",
"public boolean isDestroyed() {\n return hitCounter >= metaObject.getMaxHits();\n }",
"public boolean isExpiredAt(long ldtNow)\n {\n return m_metaInf.isExpiredAt(ldtNow);\n }",
"@Override\n public int compareTo(CacheEntry cacheEntry) {\n if (arrivalTime < cacheEntry.arrivalTime) return -1;\n else if (arrivalTime > cacheEntry.arrivalTime) return 1;\n else return 0;\n }",
"public void endLastEntry(long time) {\n int size = timeInfos.size();\n if (size > 0) {\n timeInfos.get(size - 1).setEndTime(Long.valueOf(time));\n }\n }",
"public boolean hasPast();",
"public boolean isExpired()\n {\n long dtExpiry = m_dtExpiry;\n return dtExpiry != 0 && dtExpiry < getSafeTimeMillis();\n }",
"public Entry()\n {\n m_dtLastUse = m_dtCreated = getSafeTimeMillis();\n }",
"public interface TimedEntry extends DataSerializable {\n\n /**\n * The amount of time remaining before this entry expires, if applicable.\n *\n * @return The remaining amount of time.\n */\n Duration getRemainingTime();\n\n /**\n * Returns whether this entry can be considered expired.\n *\n * @return if expired.\n */\n boolean expired();\n\n /**\n * Denotes whether the timer is currently ticking down (that is, if {@link #getRemainingTime()} should be decreasing with\n * each call.\n *\n * @return <code>true</code> if so.\n */\n boolean isCurrentlyTicking();\n\n /**\n * Returns a {@link TimedEntry} that is currently ticking.\n *\n * @return An entry that represents something that's ticking down.\n */\n TimedEntry start();\n\n /**\n * Returns a {@link TimedEntry} that is currently not ticking.\n *\n * @return An entry that represents something that is not ticking down.\n */\n TimedEntry stop();\n}",
"long getVisitEndtime();",
"long getVisitEndtime();",
"public boolean hasExpired(Map params, Date since) \r\n\t{\t\t\r\n \treturn (System.currentTimeMillis() - since.getTime()) > 5000;\r\n\t}",
"public boolean hasClosingTime() {\n return genClient.cacheHasKey(CacheKey.closingTime);\n }",
"public void entryTouched(OldOldCache.Entry entry);",
"public boolean isNotNullClosingTime() {\n return genClient.cacheValueIsNotNull(CacheKey.closingTime);\n }",
"public boolean hasInstant() {\n return instant_ != null;\n }",
"public boolean timeUp(){\n return timeAlive == pok.getSpawnTime(); \n }",
"@Override\n @CacheEvict(cacheNames = \"TripDetails\", allEntries = true)\n public void cacheEvict(){}",
"@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }",
"private void removeIfExpired(final Object key, final long now) {\n\tfinal Long expirationTimeObject = expirationMap.get(key);\n\tif (isExpired(now, expirationTimeObject)) {\n\t remove(key);\n\t}\n }",
"long getExpiration();",
"public boolean isLate(){\n Date d = givenBack != null ? givenBack : new Date();\n return expirationDate.before(d);\n }",
"public void clearTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n for (int i = 0; i < timeEntries.size(); i++)\n {\n SoftReference<TimeEntry> softReference = timeEntries.get(i);\n if ((softReference != null) && (softReference.get() == timeEntry)) timeEntries.set(i,TIME_ENTRY_NULL);\n }\n timeEntriesUpdateTimeStamp = 0L;\n }\n synchronized(timeEntryHoursSumDateMap)\n {\n timeEntryHoursSumDateMap.put(timeEntry.spentOn,HOURS_UPDATE);\n }\n }",
"public boolean checkTimeout(){\n\t\tif((System.currentTimeMillis()-this.activeTime.getTime())/1000 >= this.expire){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasExpired() {\n return (time.milliseconds() - this.lastRecordTime) > this.inactiveSensorExpirationTimeMs;\n }",
"@Override\n public boolean isMayorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()<this.getValue();\n }",
"public boolean isTooOld(){\n\t\tgetOlder();\n\t\treturn age >= maxAge;\n\t}",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"public void put(String key, Object value, int time) {\n customCache.put(key, new TimeExpiredObject(value, time));\n }",
"private void noteExpiredLease() {\n if (logger.isTraceEnabled(LogMarker.DLS_VERBOSE)) {\n logger.trace(LogMarker.DLS_VERBOSE, \"[noteExpiredLease] {}\", thread);\n }\n if (expiredLeases == null) {\n expiredLeases = new WeakHashMap();\n }\n expiredLeases.put(thread, null);\n }",
"public int getLifeTime() {\n return lifeTime;\n }",
"public boolean hasExpiryTimeSecs() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"@Override\n public boolean isMenorAt(UnitTime ut) {\n return ((LongUnitTime)ut).getValue()>this.getValue(); \n }",
"public boolean keepAlive() {\n\t\tDate date = LocPairsServerTime.getTime();\n\t\tthis.lastLifeSign = date;\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isExpired() {\n\t\treturn model.isExpired();\n\t}",
"public long getTtl() {\n return ttl_;\n }",
"@SuppressWarnings(\"unused\")\n void expire();",
"public boolean hasExpiryTimeSecs() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasExpire() {\n return result.hasExpire();\n }",
"public boolean hasExpire() {\n return result.hasExpire();\n }",
"public boolean hasExpire() {\n return result.hasExpire();\n }",
"public void entryEvicted(EntryEvent<Identifier, SystemMetadata> event) {\n // nothing to do, entry remains in backing store\n\n }",
"private void expire()\n\t{\n\t\tif (m_expire != 0 && m_timeExp < System.currentTimeMillis())\n\t\t{\n\t\t//\tSystem.out.println (\"------------ Expired: \" + getName() + \" --------------------\");\n\t\t\treset();\n\t\t}\n\t}",
"@Override\r\n\tpublic long getEntryDateTime() {\n\t\treturn 0;\r\n\t}",
"@Override\n protected boolean removeEldestEntry(final Map.Entry<K, V> eldest) {\n return size() > capacity;\n }",
"public void lifeLost() {\n\t\t--lives;\n\t\tif (lives == 0) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"boolean hasVotingEndTime();",
"public boolean remainsTime() {\n current = System.currentTimeMillis();\n int timeSpent;\n timeSpent = (int) ((current-this.begin)/1000.0);\n return (timeSpent<=this.limite);\n }",
"public void checkExpiration(){\n //Will grab the time from the timer and compare it to the job expiration\n //Then will grab each jobID that is expired\n //Will then add it to a String array\n //then remove all those jobs in the String array\n //return true if found\n\n for(int i=0; i < jobs.size(); i++){\n currentJob = jobs.get(i);\n if(currentJob.getExpData().compareTo(JobSystemCoordinator.timer.getCurrentDate())==0){\n currentJob.setStatus(\"EXPIRED\");\n }\n }\n }",
"public boolean isAfter(AbsTime refEpoch)\n {\n return !isBeforeOrEquals(refEpoch);\n }",
"boolean hasExpiryTimeSecs();",
"public boolean isExpired() {\n\t\t// Return whether the exipred after time has passed in American Samoa\n\t\treturn getSamoaNow().after(this.expiredAfter);\n\t}",
"boolean hasExpired();",
"boolean hasInstant();",
"boolean expired();",
"public void touch()\n {\n ++m_cUses;\n m_dtLastUse = getSafeTimeMillis();\n\n EvictionPolicy policy = OldOldCache.this.getEvictionPolicy();\n if (policy != null)\n {\n policy.entryTouched(this);\n }\n }",
"@Override\n public Date getExpiration()\n {\n return null;\n }",
"public void noteExpired(NoteEvent event) {\n\t\t\t\tassertTrue(\n\t\t\t\t\t\t(System.currentTimeMillis() - start) <303 &&\n\t\t\t\t\t\t(System.currentTimeMillis() - start) > 297\n\t\t\t\t\t\t);\n\t\t\t}",
"public boolean verifyCreated(\r\n long timeToLive,\r\n long futureTimeToLive\r\n ) {\r\n Date validCreation = new Date();\r\n long currentTime = validCreation.getTime();\r\n if (futureTimeToLive > 0) {\r\n validCreation.setTime(currentTime + futureTimeToLive * 1000);\r\n }\r\n // Check to see if the created time is in the future\r\n if (createdDate != null && createdDate.after(validCreation)) {\r\n \r\n validateResult=\"Validation of Timestamp: The message was created in the future!\";\r\n errorVal = 1 ;\r\n return false;\r\n }\r\n \r\n // Calculate the time that is allowed for the message to travel\r\n currentTime -= timeToLive * 1000;\r\n validCreation.setTime(currentTime);\r\n\r\n // Validate the time it took the message to travel\r\n if (createdDate != null && createdDate.before(validCreation)) {\r\n \r\n \tvalidateResult=\"Validation of Timestamp: The message was created too long ago\";\r\n \terrorVal = 1 ;\r\n return false;\r\n }\r\n\r\n \r\n validateResult=\"Validation of Timestamp: Everything is ok\";\r\n \r\n return true;\r\n }",
"public void updateLastSeenTime() {\n\t\tsetLastSeenDate(new Date());\n\t}",
"public boolean isAfter(Date that) {\n return compareTo(that) > 0;\n }",
"public boolean mayHaveExpired() {\n return mayHaveExpired;\n }"
] | [
"0.649122",
"0.6348532",
"0.6069591",
"0.59472847",
"0.5899759",
"0.5799858",
"0.5793902",
"0.57722294",
"0.56730115",
"0.563813",
"0.5604212",
"0.5602229",
"0.5525346",
"0.54732245",
"0.54674155",
"0.5456715",
"0.5454076",
"0.54228514",
"0.53944457",
"0.5382566",
"0.5382566",
"0.5371462",
"0.5366789",
"0.5357668",
"0.53564763",
"0.5350534",
"0.5350534",
"0.5347379",
"0.5342786",
"0.5342786",
"0.53390193",
"0.5332689",
"0.5327578",
"0.53048337",
"0.5300989",
"0.5297596",
"0.52850527",
"0.5271568",
"0.5250522",
"0.5243748",
"0.52327675",
"0.5228627",
"0.5214071",
"0.52138406",
"0.52121294",
"0.52061594",
"0.5205599",
"0.5198869",
"0.5198869",
"0.51916337",
"0.51795053",
"0.5162798",
"0.51595056",
"0.51594406",
"0.51527256",
"0.5142031",
"0.51408625",
"0.5139699",
"0.5138761",
"0.5138157",
"0.5138039",
"0.51165676",
"0.510977",
"0.5103508",
"0.5101771",
"0.50980395",
"0.50977856",
"0.5096843",
"0.50934786",
"0.50894934",
"0.5085314",
"0.50752795",
"0.50752467",
"0.506842",
"0.5067305",
"0.50504255",
"0.5035641",
"0.5035641",
"0.5035641",
"0.5028374",
"0.5026828",
"0.5026179",
"0.5024616",
"0.5022937",
"0.50199175",
"0.5016759",
"0.5002739",
"0.5001384",
"0.49987528",
"0.4992777",
"0.4991938",
"0.4987692",
"0.49797937",
"0.4975816",
"0.497006",
"0.49691245",
"0.49593228",
"0.4952901",
"0.49488628",
"0.49480653"
] | 0.49949747 | 89 |
An entry has been removed to make room for additional elements | void evictedElement(T key); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static public void removeEntry(Entry entry){ getEntryList().removeEntry(entry); }",
"@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}",
"private void removeEntry(CacheEntry entry) {\n\t\tmap.remove(entry.getKey());\n\t\tsize.decrementAndGet();\n\t\tindex.remove(entry.getItem());\n\t\tentry.delete();\n\t}",
"protected void discard()\n {\n if (!isDiscarded())\n {\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cUnits = m_cUnits;\n if (cUnits == -1)\n {\n // entry is discarded; avoid repetitive events\n return;\n }\n\n if (cUnits > 0)\n {\n map.adjustUnits(-cUnits);\n }\n\n m_cUnits = -1;\n }\n\n // issue remove notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_DELETED, getKey(), getValue(), null));\n }\n }\n }",
"@Override\n public void remove() {\n }",
"@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\t\t\tprotected boolean removeEldestEntry(Map.Entry e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn size()>5;\r\n\t\t\t\t\t}",
"protected abstract void remove(E entry);",
"@Override\n public void remove() {\n }",
"@Override\n\tpublic void remove() { }",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"@Override\n\tpublic void remove() {\n\t\t\n\t}",
"public void entryRemoved (TudeySceneModel.Entry oentry)\n {\n // nada\n }",
"@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}",
"@Test\r\n public void testRemove() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n Grocery entry2 = new Grocery(\"Green Tea\", \"Tea\", 6, 1.99f, 2);\r\n Grocery entry3 = new Grocery(\"Lucky Charms\", \"Cereal\", 7, 3.99f, 1);\r\n\r\n // Test element not found case\r\n instance.remove(entry1);\r\n\r\n instance.add(entry1);\r\n assertEquals(1, instance.size());\r\n assertTrue(instance.contains(entry1));\r\n\r\n instance.remove(entry1);\r\n\r\n // Test general case (size)\r\n assertEquals(0, instance.size());\r\n\r\n // Test general case (content)\r\n assertFalse(instance.contains(entry1));\r\n\r\n instance.add(entry1);\r\n instance.add(entry2);\r\n instance.add(entry3);\r\n\r\n // Test remove shifts elements\r\n // Before shift\r\n try {\r\n assertTrue(instance.find(0).equals(entry1));\r\n assertTrue(instance.find(1).equals(entry2));\r\n assertTrue(instance.find(2).equals(entry3));\r\n } catch (EmptyCollectionException e) {\r\n fail(\"Unexpected ECE - testRemove\");\r\n }\r\n\r\n assertTrue(instance.remove(entry1));\r\n\r\n // After shift\r\n try {\r\n assertTrue(instance.find(0).equals(entry2));\r\n assertTrue(instance.find(1).equals(entry3));\r\n } catch (EmptyCollectionException e) {\r\n fail(\"Unexpected ECE - testRemove\");\r\n }\r\n\r\n // Collection bounds changed\r\n try {\r\n instance.find(2);\r\n fail();\r\n } catch (IndexOutOfBoundsException | EmptyCollectionException e) {\r\n assertTrue(e instanceof IndexOutOfBoundsException);\r\n }\r\n }",
"public void remove() {\r\n return;\r\n }",
"protected void removeEldestEntry(){\n Entry lastEntry = header.before;\n\n header.before = header.before.before;\n header.before.after = header;\n\n int index = getIndexForKey(lastEntry.key);\n Entry entries = table[index];\n Entry prevEntry = null;\n for(Entry entry = entries; entry != null; entry = entry.next){\n if(entry.key == lastEntry.key){\n if(prevEntry != null){\n prevEntry.next = entry.next;\n }else{\n table[index] = entry.next;\n }\n }\n prevEntry = entry;\n }\n size--;\n }",
"public void remove() {\n\t }",
"public void remove() {\n\t }",
"public void remove() {\n\t }",
"public void removeAllEntries() {\n }",
"public void removeBtn(){\r\n\t\t\r\n\t\tWorkflowEntry entryToBeRemoved = (WorkflowEntry) tableView.getSelectionModel().getSelectedItem();\r\n\t\t\r\n\t\tdata.remove(entryToBeRemoved);\r\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}",
"public void removeLastEntry(){\r\n\t\tboards.remove(boards.size() -1 );\r\n\t}",
"public void remove() {\r\n super.remove();\r\n }",
"@Override\n public void delete(UltraSearchSessions.Session session, UltraSearchBackendEntry.Row entry) {\n List<Object> idParts = this.idColumnValue(entry.id());\n if (idParts.size() > 1 || entry.columns().size() > 0) {\n super.delete(session, entry);\n return;\n }\n\n // The only element is label\n this.deleteEdgesByLabel(session, entry.id());\n }",
"public void remove() {\n\n }",
"@Override\n public void remove() {\n Entry<T> prev = ((Entry<T>) cursor).prev;\n super.remove();\n if(cursor!=tail){\n ((Entry<T>) cursor.next).prev = prev;\n }\n }",
"public void remove () {}",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void remove() {\n super.remove();\n }",
"public void undoRemove() {\n // Makes the removal dialogue invisible.\n mRemovalDialogue.setAlpha(0.0f);\n mRemovalDialogue.setVisibility(GONE);\n\n // Animates back the favorite contact card.\n final ObjectAnimator fadeIn = ObjectAnimator.ofFloat(mFavoriteContactCard, \"alpha\", 1.f).\n setDuration(mAnimationDuration);\n final ObjectAnimator moveBack = ObjectAnimator.ofFloat(mFavoriteContactCard, \"translationX\",\n 0.f).setDuration(mAnimationDuration);\n\n final AnimatorSet animSet = new AnimatorSet();\n\n animSet.playTogether(fadeIn, moveBack);\n\n animSet.addListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationStart(Animator animation) {\n mParentRow.setHasTransientState(true);\n }\n @Override\n public void onAnimationEnd(Animator animation) {\n if (mParentRow.getItemViewType() == ViewTypes.FREQUENT) {\n SwipeHelper.setSwipeable(mParentRow, true);\n } else {\n SwipeHelper.setSwipeable(PhoneFavoriteTileView.this, true);\n }\n mParentRow.setHasTransientState(false);\n }\n });\n animSet.start();\n // Signals the PhoneFavoritesTileAdapter to undo the potential delete.\n mParentRow.getTileAdapter().undoPotentialRemoveEntryIndex();\n }",
"public void remove() {\r\n //\r\n }",
"public void deleteEntry(Entry e) {\n entries.remove(e.getName());\n }",
"@Override\n\tpublic void removeAt(final int index) {\n\t\tremoveFromInsertionOrder(index);\n\t\tsuper.removeAt(index); // clear key, state, value; adjust size\n\t}",
"@Override\n\tpublic Entry<K, V> remove(Entry<K, V> e) throws InvalidEntryException {\n\t\treturn null;\n\t}",
"@Override\r\n\t\t\tprotected boolean removeEldestEntry(Map.Entry eldest) {\r\n\t\t return size() > 3;\t//every time the eldest element will be removed if size > 3\r\n\t\t }",
"public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}",
"private void removeRow() {\n gridHeight--; \n for (EscapeBlock block : grid.get(gridHeight)) { // for each block from the last row\n block.disconnectAll();\n this.remove(block); // remove it from the UI\n }\n\n grid.remove(gridHeight); // remove the row\n }",
"Entry<Key, Value> remove(Entry<Key, Value> entry);",
"@Override\n\tpublic void remove(Element e) {\n\t\t\n\t}",
"public void remove(Record r) \n\t{\n\t\tfilled--; //reduce load factor\n\t\tif (r.placement != -1){ //if r's expected position isnt null\n\t\t\tRecord newRecord = new Record(\"deleted\"); //make a new record with value \"deleted\n\t\t\tnewRecord.placement = -2; //set position to -1 (as is standard for deleted\n\t\t\tTable[r.placement] = newRecord; //puts deleted slot in table\n\t\t}\t\n\t}",
"public void clearRemovalTag() {\n\t levelOfRemoval = 0;\n\t}",
"public final void remove () {\r\n }",
"public void remove() {\n\t}",
"public void remove() {\n\t}",
"public void removeEntry(ActionEvent event) {\n\t\tnewReport2.removeSample(table.getSelectionModel().getSelectedItem());\n\t\ttable.getItems().removeAll(table.getSelectionModel().getSelectedItem());\n\t\tif(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber())!=-1) {\n\t\t\tconclusionNumbers1.remove(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber()));\n\t\t}\n\t\telse {\n\t\t\tconclusionNumbers2.remove(conclusionNumbers2.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber()));\n\t\t}\n\t}",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"void actuallyRemove() {\n /*\n * // Set the TextViews View v = mListView.getChildAt(mRemovePosition -\n * mListView.getFirstVisiblePosition()); TextView nameView =\n * (TextView)(v.findViewById(R.id.sd_name));\n * nameView.setText(R.string.add_speed_dial);\n * nameView.setEnabled(false); TextView labelView =\n * (TextView)(v.findViewById(R.id.sd_label)); labelView.setText(\"\");\n * labelView.setVisibility(View.GONE); TextView numberView =\n * (TextView)(v.findViewById(R.id.sd_number)); numberView.setText(\"\");\n * numberView.setVisibility(View.GONE); ImageView removeView =\n * (ImageView)(v.findViewById(R.id.sd_remove));\n * removeView.setVisibility(View.GONE); ImageView photoView =\n * (ImageView)(v.findViewById(R.id.sd_photo));\n * photoView.setVisibility(View.GONE); // Pref\n */\n mPrefNumState[mRemovePosition + 1] = \"\";\n mPrefMarkState[mRemovePosition + 1] = -1;\n SharedPreferences.Editor editor = mPref.edit();\n editor.putString(String.valueOf(mRemovePosition + 1), mPrefNumState[mRemovePosition + 1]);\n editor.putInt(String.valueOf(offset(mRemovePosition + 1)),\n mPrefMarkState[mRemovePosition + 1]);\n editor.apply();\n startQuery();\n }",
"public void remove() {\n btRemove().push();\n }",
"public void remove() {\n btRemove().push();\n }",
"public void removed() {\n }",
"private void removeElement(PathwayElement affectedData)\n \t{\n \n \t}",
"@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n//\t\t\t\tif (i == begin || removed)\n//\t\t\t\t\tthrow new IllegalStateException();\n//\t\t\t\telements.set(i-1, null);\n//\t\t\t\tremoved = true;\n\t\t\t}",
"void removeAllEntries();",
"@Override\r\n\tpublic void removeEntry(String key) {\n\t\t\r\n\t}",
"@Override\n protected boolean removeEldestEntry(Map.Entry<String, Bitmap> eldest) {\n \t// Log.w(\"ImageDownloader\", \"removeEldestEntry() has been invoked: \" + eldest.getKey() + \" size()=\" + size());\n \t// Log.w(\"ImageDownloader\", \"Entries are transferred to soft reference cache\"); \n \tif (size() > HARD_CACHE_CAPACITY) {\n \t\tLog.w(\"ImageDownloader\", \"Entries are transferred to soft reference cache\");\n // Entries push-out of hard reference cache are transferred to soft reference cache\n sSoftBitmapCache.put(eldest.getKey(), new SoftReference<Bitmap>(eldest.getValue()));\n return true;\n } else\n \tLog.w(\"ImageDownloader\", \"Entries are Not transferred to soft reference cache\");\n return false;\n }",
"private void onDeleteElement(View view) {\n\n\n Node exist = arSceneView.getScene().findByName(TEMP_LINE_STRING);\n if(exist !=null)\n\n {\n arSceneView.getScene().removeChild(exist);\n\n tempLine = null;\n\n }\n\n if(listElements.size()<1) {\n Toast.makeText(MainActivity.this, \"List empty\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n Description r = listElements.get(listElements.size() - 1);\n if (r != null) {\n arSceneView.getScene().removeChild(r.getNode());\n r.getNode().setParent(null);\n listElements.remove(listElements.size() - 1);\n\n }\n\n\n\n\n\n\n\n\n }",
"public abstract void removedFromWidgetTree();",
"public void doRemoveItem() {\n doRemoveItem(this.mSrcPos - getHeaderViewsCount());\n }",
"@Override\n\tpublic void onRemove() {\n\n\t}",
"@Override\n\t\tpublic void remove() {\n\t\t\tif ( _expectedSize != TOrderedHashMap.this.size() ) { throw new ConcurrentModificationException(); }\n\n\t\t\t// Disable auto compaction during the remove. This is a workaround\n\t\t\t// for bug 1642768.\n\t\t\ttry {\n\t\t\t\tTOrderedHashMap.this.tempDisableAutoCompaction();\n\t\t\t\tTOrderedHashMap.this.removeAt(_indicesByInsertOrder[_index]);\n\t\t\t} finally {\n\t\t\t\tTOrderedHashMap.this.reenableAutoCompaction(false);\n\t\t\t}\n\n\t\t\t_expectedSize--;\n\t\t}",
"public void delete() {\r\n\t\t\tif (!isDeleted && handles.remove(this)) {\r\n\t\t\t\telementsUsed -= count;\r\n\t\t\t\tisDeleted = true;\r\n\t\t\t\tif (elementsUsed < numElements / 4) {\r\n\t\t\t\t\tcompact();\r\n\t\t\t\t\tnumElements = Math.max(10, elementsUsed * 2);\r\n\t\t\t\t}\r\n\t\t\t\tshapePeer.vboHandle = null;\r\n\t\t\t}\r\n\t\t}",
"private static void removeAllElementsInContainer()\n {\n DefaultTableModel dm = (DefaultTableModel) JSoundsMainWindowViewController.table.getModel();\n for (int i = dm.getRowCount() - 1; i >= 0; i--) {\n dm.removeRow(i);\n } \n }",
"protected synchronized void remove_entry( final EntryStorage entry )\r\n throws NotFound\r\n {\r\n\t if( entry == null ) throw new NullPointerException(\r\n\t\t\"Illegal attempt to remove a null entry from a list.\");\r\n\r\n EntryStorage header = header();\r\n if( header == null ) throw new NotFound();\r\n\r\n synchronized( entry )\r\n {\r\n\r\n\t\t// We have a list with at least one entry. Check \r\n\t // if we are removing the header entry or an entry in the \r\n\t\t// body of the list.\r\n\r\n synchronized( header )\r\n {\r\n if( header.equals( entry ) )\r\n {\r\n \r\n // Client is requesting the removal of the header\r\n\t\t\t // which means that either the next entry becomes the \r\n\t // header, or, if no next entry, the header is set to null.\r\n\r\n if( size() == 1 )\r\n {\r\n header( (EntryStorageRef) null );\r\n size( 0 );\r\n }\r\n else\r\n {\r\n EntryStorage next = header.next();\r\n if( next != null ) synchronized( next )\r\n {\r\n // There is a valid next entry in the current header\r\n // which needs to assigned as the new header.\r\n \r\n EntryStorage last = header.prev();\r\n if( last != null ) synchronized( last )\r\n {\r\n next.prev( last.reference() );\r\n header( next.reference() );\r\n size( size() - 1 );\r\n }\r\n\t\t\t else\r\n\t\t\t\t { \r\n\t\t throw new RuntimeException(\r\n\t \"Unexpected null prev entry in list header. \\n\" + this );\r\n\t\t\t\t }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // Client is requesting the removal of an entry somewhere in the\r\n // list beyond the header position. This means that there is\r\n // valid prev entry to be updated, and possibly a next entry unless\r\n // the entry being removed is the last entry in which case we need\r\n // update the header as well.\r\n \r\n EntryStorage prev = entry.prev();\r\n synchronized( prev )\r\n {\r\n EntryStorage next = entry.next();\r\n if( next != null ) synchronized( next )\r\n {\r\n prev.next( next.reference() );\r\n next.prev( prev.reference() );\r\n }\r\n else\r\n {\r\n prev.next( (EntryStorageRef) null );\r\n\t\t\t\t header.prev( prev.reference() );\r\n }\r\n size( size() - 1 );\r\n }\r\n }\r\n entry.destroy_object();\r\n }\r\n }\r\n }",
"public void remove () { this.setAsDown(); n.remove(); }",
"public void untagAsRemoved() {\n\t levelOfRemoval --;\n\t}",
"public T remove(Object entry) {\n return null;\n }",
"public void cleanRemove(Element element){\n\t\tfor(Element el : element.getElements()){\n\t\t\tnifty.removeElement(nifty.getScreen(\"hud\"),el);\n\t\t}\n\t\tnifty.removeElement(nifty.getScreen(\"hud\"), element);\n\t\tnifty.executeEndOfFrameElementActions();\n\t}",
"public boolean removeEldestEntry(Map.Entry entry){\n return size() > capacity;\n }",
"private void removePrecious(CacheRepositoryEntry entry)\n {\n try {\n long size = entry.getSize();\n synchronized (_precious) {\n if (_precious.remove(entry.getPnfsId())) {\n _preciousSpace -= size;\n }\n }\n } catch (CacheException e) {\n _log.error(\"failed to get entry size : \" + e.getMessage());\n }\n }",
"private boolean remove() {\r\n\t\t\treturn removed = true;\r\n\t\t}",
"void removeFullHadith(Object oldFullHadith);",
"@Override\n\tpublic boolean removeEldestEntry(Map.Entry<T,U> element)\n\t{\n\t\t// Remove it if we've hit our capacity (meaning\n\t\t// we've overflowed)\n\t\t//\n\t\treturn size() > maxSize;\n\t}",
"final CacheData<K, V> removeEntry(final Object key) {\r\n // find the place to put it and stuff it in, overwriting what was\r\n // previously there\r\n // synchronization is not needed here, if this value changes to null\r\n // either before or after a client looks at it, it's not a problem\r\n int pos = getKeyPosition(key);\r\n CacheData<K, V> cacheData = getCacheData(pos);\r\n setCacheData(pos, null);\r\n return cacheData;\r\n }",
"private void removeTailElement(){\n JavaBaseTask removed = items.remove(tail.getKey());\n System.out.println(\"element with index : \" + removed.getKey() + \"has been deleted doe to cache eviction\");\n tail = tail.previous;\n var headAu = head;\n while (headAu.next != null){\n headAu = headAu.next;\n }\n headAu = headAu.previous;\n headAu.next = null;\n }",
"@Override\n protected void updateEliminations() {\n\n }",
"void handleChildRemove(MPartSashContainerElement element) {\n\t}",
"private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }",
"public void entryRemoved(EntryEvent<Identifier, SystemMetadata> event) {\n // we don't remove replicas (do we?)\n\n }",
"public void remove() {\r\n // rather than going through replace(), just reinitialize the StyledText,\r\n // letting the old data structures fall on the floor\r\n fCharBuffer = new CharBuffer();\r\n fStyleBuffer = new StyleBuffer(this, AttributeMap.EMPTY_ATTRIBUTE_MAP);\r\n fParagraphBuffer = new ParagraphBuffer(fCharBuffer);\r\n fTimeStamp += 1;\r\n fDamagedRange[0] = fDamagedRange[1] = 0;\r\n }",
"public void compact() {\n Entry<K,V> e;\n Entry<K,V> possibleDup;\n for (final Iterator<Entry<K,V>> itr = entries.iterator(); itr.hasNext(); ) {\n e = itr.next();\n possibleDup = getEntry(e.getKey()); // Returns the newest entry\n if (possibleDup != null && e != possibleDup) {\n itr.remove();\n }\n }\n\n size = entries.size(); // We now know the size\n\n // Compact the underlying array\n entries.trimToSize();\n }",
"public void remove(){\n }"
] | [
"0.6898805",
"0.6747958",
"0.6740799",
"0.6740799",
"0.67309904",
"0.6660401",
"0.6657034",
"0.6645803",
"0.6645803",
"0.6619513",
"0.6610351",
"0.65975714",
"0.6556812",
"0.6551671",
"0.6551671",
"0.6551671",
"0.6551671",
"0.6551671",
"0.6551671",
"0.6551671",
"0.6551671",
"0.6542151",
"0.6462413",
"0.64441496",
"0.64402896",
"0.6413397",
"0.6404882",
"0.6404882",
"0.6404882",
"0.63977903",
"0.6396949",
"0.6373811",
"0.63726026",
"0.6345472",
"0.6339357",
"0.6337048",
"0.6333021",
"0.63119614",
"0.6288578",
"0.6288578",
"0.6288578",
"0.6288578",
"0.6288578",
"0.6288578",
"0.6288578",
"0.62852585",
"0.62662935",
"0.62547255",
"0.62537813",
"0.62498003",
"0.6242363",
"0.6230809",
"0.6227429",
"0.6227186",
"0.6220254",
"0.6211813",
"0.6205673",
"0.6190945",
"0.61902165",
"0.61902165",
"0.61890656",
"0.6181217",
"0.6181217",
"0.6181217",
"0.6181217",
"0.6181217",
"0.6172173",
"0.61645687",
"0.61645687",
"0.6163284",
"0.6140337",
"0.61332107",
"0.6130129",
"0.61225086",
"0.6120305",
"0.611832",
"0.6114241",
"0.611021",
"0.6107187",
"0.6106799",
"0.61005104",
"0.61002475",
"0.60855156",
"0.6083177",
"0.6064746",
"0.60581756",
"0.60469055",
"0.6046689",
"0.6042186",
"0.6040997",
"0.6039769",
"0.60351944",
"0.60313827",
"0.60235494",
"0.6013757",
"0.60102636",
"0.59920603",
"0.59918654",
"0.5986662",
"0.59791785",
"0.59743005"
] | 0.0 | -1 |
Force a shutdown of all scheduled tasks | public static void shutdown() {
logger.warn("Attempting to shut down scheduled LRU cache tasks ...");
scheduler.shutdown();
try {
if (! scheduler.awaitTermination(1000, TimeUnit.MILLISECONDS)) {
logger.warn("Attempting to force shut down scheduled LRU cache tasks ...");
scheduler.shutdownNow();
}
} catch (InterruptedException e) {
logger.warn("Exception shutting down tasks ... " + e.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void forceShutdown()\n {\n taskExecutor.shutdownNow();\n differencingDone.signalAll();\n completed.signalAll();\n }",
"public void shutdown() {\n\t\tfinal List<Runnable> tasks = updater.shutdownNow();\n\t\tif (null == tasks) return;\n\t\tfor (final Runnable t : tasks)\n\t\t\tt.run();\n\t}",
"public final void stopAll() {\n for (BotTaskInterface bt : TASKS) {\n LOG.info(\"Stoping BotTask {}\", bt.getName());\n bt.stop();\n }\n EXECUTOR_SERVICE.shutdown();\n }",
"public synchronized void close() {\r\n\r\n\t\tif (done) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdone = true;\r\n\r\n\t\tabortScheduledTasks();\r\n\t}",
"protected void abortScheduledTasks() {\r\n\r\n\t\tfor (ParallelTask<?> task : scheduledSubtasks) {\r\n\t\t\ttask.cancel();\r\n\t\t}\r\n\r\n\t\tscheduledSubtasks.clear();\r\n\t}",
"public void shutdownNow() {\n }",
"@Override\n protected void shutdown() {\n super.shutdown();\n // Now perform any other shutdown tasks you need.\n // ...\n }",
"public void shutdown() {\n shutdown(false);\n }",
"public void forceShutdown() {\n shutdown(true);\n }",
"public static void shutdown() {\n\t\trunning = false;\n\t\texecutor.shutdown();\n\t\tlog.info(\"### All threads shutdown requested ###\");\n\t\t\n\t\ttry {\n\t\t\tfor (int i = 0; !executor.awaitTermination(10, TimeUnit.SECONDS); i++) {\n\t\t\t\tlog.info(\"### Awaiting for pending task pool termination... ({}) ###\", i);\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\tlog.warn(\"### Exception awaiting for pending task pool termination: {} ###\", e.getMessage());\n\t\t}\n\t\t\n\t\tlog.info(\"### All threads have finished ###\");\n\t}",
"private void stop()\n {\n if(running)\n {\n scheduledExecutorService.shutdownNow();\n running = false;\n }\n }",
"public void shutdown() {\n this.dontStop = false;\n }",
"public List<Runnable> shutdownNow() {\n lock.lock();\n try {\n shutdown();\n List<Runnable> result = new ArrayList<>();\n for (SerialExecutor serialExecutor : serialExecutorMap.values()) {\n serialExecutor.tasks.drainTo(result);\n }\n result.addAll(executor.shutdownNow());\n return result;\n } finally {\n lock.unlock();\n }\n }",
"private void setAutoSelfDestruct() {\n \n try{\n //Sets task to shut server down \n this.timer.schedule(new TimerTask() {\n @Override\n public void run() {\n if(clientHandlers.isEmpty()){\n System.err.println(\"Closing due to inactivity\");\n System.exit(0);\n }else{\n setAutoSelfDestruct();\n }\n }\n }, (60000*3));\n }catch( IllegalStateException e){\n System.err.println(\"Timer is being reset\");\n this.timer = new Timer();\n setAutoSelfDestruct();\n }\n }",
"@Override\n public void shutdownNow() {\n }",
"public void shutdown();",
"public void shutdown();",
"public void shutdown();",
"public void shutdown();",
"public void shutdown() {\n for (BucketMonitor monitor : this.monitors.values()) {\n monitor.shutdown();\n }\n }",
"public static void exitScheduledClear() {\n stopAutoClear();\n }",
"public void shutdown()\n {\n // todo\n }",
"private static void shutdown() {\n\t\tSystem.out.println(\"Shutting down ...\");\n\t\tpool.shutdown();\n\t\tfor (Client client : clientMap.values()) {\n\t\t\tclient.cleanup();\n\t\t}\n\n\t\t// wait until all threads complete\n\t\ttry {\n\t\t\tif (!pool.awaitTermination(30, TimeUnit.SECONDS)) {\n\t\t\t\tSystem.out.println(\"Force shutdown after 30 seconds ...\");\n\t\t\t\tpool.shutdownNow();\n\t\t\t\tif (!pool.awaitTermination(30, TimeUnit.SECONDS)) {\n\t\t\t\t\tSystem.out.println(\"Terminate the process.\");\n\t\t\t\t\tThread.currentThread().interrupt();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\tThread.currentThread().interrupt();\n\t\t}\n\t}",
"public synchronized void abort() {\r\n\t\tif (done) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdone = true;\r\n\r\n\t\tabortScheduledTasks();\r\n\t}",
"public void cleanShutDown () {\n shutdown = true;\n }",
"public static void shutdown() {\n\t}",
"public static void triggerImmediateForcefulShutdown() {\n triggerImmediateForcefulShutdown(1);\n }",
"public void shutdownSilently() {\n shutdownSilently(true);\n }",
"public void shutdown() {\n // For now, do nothing\n }",
"public void shutdown(boolean drain) throws InterruptedException {\n shuttingDown = true;\n reaper.stop();\n if (drain) {\n drain(0);\n }\n ifSet(timeoutScheduler, TaskScheduler::forceExecute);\n ifSet(timeoutScheduler, TaskScheduler::terminate);\n ifSet(backgroundScheduler, TaskScheduler::forceExecute);\n ifSet(backgroundScheduler, TaskScheduler::terminate);\n globalExecutor.shutdown();\n running = false;\n }",
"public void shutdown() {\n // no-op\n }",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"void shutdown();",
"public void shutdown()\n {\n // nothing to do here\n }",
"private void shutdownThreads() {\n\t\tif (backupHeartbeatBroadcaster != null) {\n\t\t\tbackupHeartbeatBroadcaster.cancel();\n\t\t}\n\t\tif (activeHeartbeatTimer != null) {\n\t\t\tactiveHeartbeatTimer.cancel();\n\t\t}\n\t\tif (serverLatencyProcessorTimer != null) {\n\t\t\tserverLatencyProcessorTimer.cancel();\n\t\t}\n\t\tif (backupHeartbeatTimer != null) {\n\t\t\tbackupHeartbeatTimer.cancel();\n\t\t}\n\t\tif (reElectionTimer != null) {\n\t\t\treElectionTimer.cancel();\n\t\t}\n\t\tif (preElectionTimeoutTimer != null) {\n\t\t\tpreElectionTimeoutTimer.cancel();\n\t\t}\n\t}",
"public void shutdown() {\n }",
"public void shutdown() {\n/* 188 */ this.shutdown = true;\n/* */ }",
"protected abstract void shutdown();",
"public void shutDownExecutors(ScheduledExecutorService executorService) {\n try {\n java.lang.System.out.println(\"attempt to shutdown executor\");\n executorService.shutdown();\n executorService.awaitTermination(5, TimeUnit.SECONDS);\n }\n catch (InterruptedException e) {\n java.lang.System.err.println(\"tasks interrupted\");\n }\n finally {\n if (!executorService.isTerminated()) {\n java.lang.System.err.println(\"cancel non-finished tasks\");\n }\n executorService.shutdownNow();\n java.lang.System.out.println(\"shutdown finished\");\n }\n }",
"void startShutdown() {\n closed.set(true);\n regionManager.stopScanners();\n synchronized(toDoQueue) {\n toDoQueue.clear(); // Empty the queue\n delayedToDoQueue.clear(); // Empty shut down queue\n toDoQueue.notifyAll(); // Wake main thread\n }\n serverManager.notifyServers();\n }",
"public void shutdown() {\n fsManager.getOpenFileSystems().forEach(JGitFileSystem::close);\n shutdownSSH();\n forceStopDaemon();\n fsManager.clear();\n }",
"public static void shutdown() {\n\t\t// Ignore\n\t}",
"public void shutdown() {\n\t\t\n\t}",
"public void shutdown() {\n this.isShutdown = true;\n }",
"public void shutdown() {\n\t\tthreadPool.shutdown();\n\t}",
"public void stop() {\n executor.shutdownNow();\n\n Collection<NodeRegistrationContext> allRegistrations = nodeRegistrations.values();\n for (NodeRegistrationContext registration : allRegistrations) {\n sendUnregistrationEvent(registration.resolvedDeployment);\n }\n }",
"public void shutdownNow() {\n\t\tupdater.shutdownNow();\n\t}",
"public void shutdown()\n {\n this.running = false;\n }",
"private void cancelTasks() {\n\t\ttimer.cancel();\n\t\ttimer.purge();\n\t}",
"@After\n public void tearDown()\n throws Exception\n {\n cronTaskEventListenerRegistry.removeListener(this);\n }",
"public abstract void shutdown();",
"public abstract void shutdown();",
"public abstract void shutdown();",
"public abstract void shutdown();",
"public static void main(String args[])\n {\n\t ScheduledExecutorService executorService= Executors.newScheduledThreadPool(2);\n\t Runnable task1=new RunnableChild(\"task1\");\n\t Runnable task2=new RunnableChild(\"task2\");\n\t Runnable task3=new RunnableChild(\"task3\");\n\t executorService.submit(task1);\n\t executorService.submit(task2);\n\t executorService.submit(task3);\n\t executorService.schedule(task1,20, TimeUnit.SECONDS);\n\t System.out.println(\"*******shutting down called\");\n\t executorService.shutdown();\n }",
"public void shutdown() {\n lock.lock();\n try {\n state = State.SHUTDOWN;\n if (serialExecutorMap.isEmpty()) {\n executor.shutdown();\n }\n } finally {\n lock.unlock();\n }\n }",
"void shutdown() throws Exception;",
"protected void kill() {\n\t\tsynchronized (this) // Don't allow shutdown during startup.\n\t\t{\n\t\t\t// Only execute for the first caller.\n\t\t\tif (shutdownMutex.acquire()) {\n\t\t\t\t// Shutdown payer thread.\n\t\t\t\tpayerThread.interrupt();\n\n\t\t\t\tfor (int i = 0; i < sets.length; i++) {\n\t\t\t\t\tsets[i].kill();\n\t\t\t\t}\n\n\t\t\t\t// Shutdown the thread pools.\n\t\t\t\tproducerThreadPool.kill();\n\n\t\t\t\t// Let the GC figure the rest out.\n\t\t\t}\n\t\t}\n\t}",
"public void shutdown() {\n this.runnable.stop = true;\n LockSupport.unpark(this);\n }",
"public synchronized void shutdown() {\n try {\n stop();\n } catch (Exception ex) {\n }\n \n try {\n cleanup();\n } catch (Exception ex) {\n }\n }",
"public void Shutdown()\n {\n eventLoopGroup.shutdownGracefully();\n }",
"public static void stopAllThreads() {\n SystemManager.getAllDistributors().forEach((d) -> {\n d.stopWork();\n });\n SystemManager.getAllUsers().forEach((u) -> {\n u.stopWork();\n });\n Time.stopWork();\n System.out.println(\"[Simulation is ending]\");\n stopWork = true;\n }",
"public void shutdown()\r\n {\r\n debug(\"shutdown() the application module\");\r\n\r\n // Shutdown all the Timers\r\n shutdownWatchListTimers();\r\n // Save Our WatchLists\r\n saveAllVectorData();\r\n // Our Container vectors need to be emptied and clear. \r\n modelVector.removeAllElements();\r\n modelVector = null;\r\n\r\n tableVector.removeAllElements();\r\n tableVector = null;\r\n\r\n // Delete any additional Historic Data that is Serialized to disk\r\n expungeAllHistoricFiles();\r\n\r\n // Shutdown the task that monitors the update tasks\r\n if ( this.monitorTask != null )\r\n {\r\n this.monitorTask.cancel();\r\n this.monitorTask = null;\r\n }\r\n // Null out any reference to this data that may be present\r\n stockData = null;\r\n debug(\"shutdown() the application module - complete\");\r\n\r\n }",
"public void shutdownAll() {\n System.out.println(\"Shutting down network, received halt command!\");\n _poolData.shutdown();\n }",
"public void forceStop() {\n\t\tfor (int i = 0; i < worker_num; i++) {\n\t\t\tif (workThreads[i] == null)\n\t\t\t\tcontinue;\n\t\t\tworkThreads[i].interrupt();\n\t\t\tworkThreads[i] = null;\n\t\t}\n\t\tthreadPool = null;\n\t\ttaskQueue.clear();\n\t}",
"public void shutdown() {\n for (Connection connection : connections) { //Try closing all connections\n closeConnection(connection);\n }\n }",
"@Programmatic\n public void shutdown() {\n LOG.info(\"shutting down {}\", this);\n\n cache.clear();\n }",
"public void shutdown() {\n logger.info(\"Shutting down modules.\");\n for (Module module : modules) {\n module.stop();\n }\n logger.info(\"Shutting down reporters.\");\n for (Reporter reporter : reporters.values()) {\n reporter.stop();\n }\n }",
"public void shutdown() {\r\n ThreadLocalEventLoop.INSTANCE.resetEventLoop$kotlinx_coroutines_core();\r\n this.isCompleted = true;\r\n closeQueue();\r\n do {\r\n } while (processNextEvent() <= 0);\r\n rescheduleAllDelayed();\r\n }",
"public void mo130409d() {\n this.f110664a.dispose();\n Future<?> future = this.f110668e;\n if (future != null) {\n future.cancel(true);\n }\n ScheduledExecutorService scheduledExecutorService = this.f110667d;\n if (scheduledExecutorService != null) {\n scheduledExecutorService.shutdownNow();\n }\n }",
"private void runPeriodic() {\n boolean ok = ScheduledFutureTask.super.runAndReset();\n boolean down = isShutdown();\n // Reschedule if not cancelled and not shutdown or policy allows\n if (ok && !down) {\n updateNextExecutionTime();\n MeasurableScheduler.super.getQueue().add(this);\n }\n // This might have been the final executed delayed\n // task. Wake up threads to check.\n else if (down)\n interruptIdleWorkers();\n }",
"protected void shutdown() {\n\r\n }",
"public void runPendingTasks() {\n/* */ try {\n/* 578 */ this.loop.runTasks();\n/* 579 */ } catch (Exception e) {\n/* 580 */ recordException(e);\n/* */ } \n/* */ \n/* */ try {\n/* 584 */ this.loop.runScheduledTasks();\n/* 585 */ } catch (Exception e) {\n/* 586 */ recordException(e);\n/* */ } \n/* */ }",
"public void shutdown() {\n \t\tfor(Expirator e : expirators) {\n\t\t\te.shutdown();\n \t\t}\n \t\texpirators.clear();\n \t}",
"void stopAll();",
"public synchronized void shutdownInstance() {\n if (this.computationScheduler instanceof SchedulerLifecycle) {\n ((SchedulerLifecycle) this.computationScheduler).shutdown();\n }\n if (this.ioScheduler instanceof SchedulerLifecycle) {\n ((SchedulerLifecycle) this.ioScheduler).shutdown();\n }\n if (this.newThreadScheduler instanceof SchedulerLifecycle) {\n ((SchedulerLifecycle) this.newThreadScheduler).shutdown();\n }\n }",
"public void shutdown()\n\t{\n\t\t; // do nothing\n\t}",
"public abstract void unschedule();",
"public void shutdown() {\n for (TServer server : thriftServers) {\n server.stop();\n }\n try {\n zookeeper.shutdown();\n discovery.close();\n } catch (IOException ex) {\n //don't care\n }\n }",
"public synchronized void resetSchedules() {\n schedules = null;\n }",
"public void shutdown() {\n this.shallRun = false;\n this.interrupt();\n Log.getLog().info(\"catched caretaker termination signal\");\n }",
"@Override\r\n public void close() {\r\n\tsaveZip();\r\n\tsetChanged();\r\n\tnotifyObservers(\"shutting down\");\r\n\tthreadpool.shutdown();\r\n\t// wait 10 seconds over and over again until all running jobs have\r\n\t// finished\r\n\ttry {\r\n\t boolean allTasksCompleted = false;\r\n\t while (!(allTasksCompleted = threadpool.awaitTermination(10, TimeUnit.SECONDS)))\r\n\t\t;\r\n\t setChanged();\r\n\t notifyObservers(\"Server is safely closed\");\r\n\t} catch (InterruptedException e) {\r\n\t e.printStackTrace();\r\n\t}\r\n }",
"public void shutdown() {\n drivers.stream().filter(ClosingAwareWebDriver::isAlive)\n .forEach(ClosingAwareWebDriver::forceShutdown);\n }",
"public void shutdown() {\n executor.shutdown();\n try {\n executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"static void destroyAll()\n {\n synchronized(allSchedulers)\n {\n // destroy all registered schedulers\n Iterator iter = allSchedulers.iterator();\n while (iter.hasNext())\n {\n Scheduler scheduler = (Scheduler) iter.next();\n \n // do not call cancel() since this method modifies allSchedulers\n scheduler.destroy();\n }\n \n if (logger.isInfoEnabled())\n {\n logger.info(allSchedulers.size() + \" scheduler instances destroyed\");\n }\n \n // be sure and clear set\n allSchedulers.clear();\n \n // and set flag that scheduler service ist stopped\n schedulerServiceRunning = false;\n }\n }"
] | [
"0.7646104",
"0.7469352",
"0.73373944",
"0.7068141",
"0.6926492",
"0.6909417",
"0.6865892",
"0.67980593",
"0.67771435",
"0.67008173",
"0.66897184",
"0.6670631",
"0.6584885",
"0.65757567",
"0.65399903",
"0.6538437",
"0.6538437",
"0.6538437",
"0.6538437",
"0.6507811",
"0.64925987",
"0.64808947",
"0.647305",
"0.6457289",
"0.64464283",
"0.64459944",
"0.64322394",
"0.6423651",
"0.6413294",
"0.6410158",
"0.64072007",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.6394287",
"0.63791984",
"0.63773763",
"0.6353318",
"0.633657",
"0.63268197",
"0.63266414",
"0.6323331",
"0.6307555",
"0.6306449",
"0.63020223",
"0.6293648",
"0.6287932",
"0.62842464",
"0.62756157",
"0.626719",
"0.6259896",
"0.62566775",
"0.62455255",
"0.62455255",
"0.62455255",
"0.62455255",
"0.6228759",
"0.62282944",
"0.6214878",
"0.6212348",
"0.6202177",
"0.6197649",
"0.6182776",
"0.6175112",
"0.6174553",
"0.6148237",
"0.61435705",
"0.6132795",
"0.6124252",
"0.6107811",
"0.6105276",
"0.61017525",
"0.60999256",
"0.60927933",
"0.60908663",
"0.6089218",
"0.60826963",
"0.6082581",
"0.6080527",
"0.6076749",
"0.60703987",
"0.60645545",
"0.60482",
"0.6029053",
"0.6027929",
"0.60277444",
"0.6027014"
] | 0.7543445 | 1 |
Create a new LRU cache with a "timetolive" of 10 minutes (600 seconds), and a 30 second delay in cleaning up expired values. | public MyLRUCache(int cacheSizeLimit) {
this(cacheSizeLimit, 600);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MyLRUCache(int cacheSizeLimit, int timeToLive) {\n this(cacheSizeLimit, timeToLive, 30);\n }",
"public MyLRUCache(int cacheSizeLimit, int timeToLive, int cleanupDelay) {\n if (cacheSizeLimit <= 0) {\n throw new IllegalArgumentException(\"Cache-Size-Limit value must be > 0\");\n } else if (timeToLive <= 0) {\n throw new IllegalArgumentException(\"Time-To-Live value must be > 0\");\n } else if (cleanupDelay <= 0) {\n throw new IllegalArgumentException(\"Cleanup-Delay value must be > 0\");\n }\n\n this.cacheSizeLimit = cacheSizeLimit;\n this.cleanupDelay = cleanupDelay;\n this.timeToLive = timeToLive * 1000;\n\n int hashTableCapacity = (int) Math.ceil(cacheSizeLimit / mapLoadFactor) + 1;\n valueMap = new LinkedHashMap<K, CacheableObject>(hashTableCapacity, mapLoadFactor, true) {\n // (an anonymous inner class)\n private static final long serialVersionUID = 1;\n\n @Override\n protected boolean removeEldestEntry(Map.Entry<K, CacheableObject> eldest) {\n boolean retVal = MyLRUCache.this.currentCacheSize > MyLRUCache.this.cacheSizeLimit;\n if (retVal) {\n synchronized(theLock) {\n toEvictMap.put(eldest.getKey(), eldest.getValue());\n if (toEvictMap.size() > 100) {\n scheduler.schedule(\n new Runnable() {\n @Override public void run() {\n removeEvicted();\n }\n },\n 1,\n TimeUnit.SECONDS\n );\n }\n }\n// eldest.getValue().createTime = 0L;\n// MyLRUCache.this.currentCacheSize -= eldest.getValue().containmentCount;\n// synchronized(listeners) {\n// for (CacheListener<K> listener : listeners) {\n// listener.evictedElement(eldest.getKey());\n// }\n// }\n }\n return retVal;\n }\n };\n\n // Run a cache clean-up every 10 seconds, or whatever the user has specified\n scheduler.scheduleWithFixedDelay(\n new Runnable() {\n @Override public void run() {\n removeExpired();\n }\n },\n this.cleanupDelay,\n this.cleanupDelay,\n TimeUnit.SECONDS\n );\n }",
"@SuppressWarnings({\"CallToThreadStartDuringObjectConstruction\", \"SleepWhileInLoop\"})\n public MemoryCache(long timeToLive, final long timerInterval, int maxItems) {\n this.timeToLive = timeToLive * 1000;\n\n cacheMap = new LRUMap(maxItems);\n\n if (timeToLive > 0 && timerInterval > 0) {\n\n Thread t;\n t = new Thread(() -> {\n while (true) {\n try {\n Thread.sleep(timerInterval * 1000);\n } catch (InterruptedException ex) {\n }\n cleanup();\n }\n });\n\n t.setDaemon(true);\n t.start();\n }\n }",
"public LRUCache(int capacity) {\n cache = new LinkedHashMap<>(capacity);\n this.capacity = capacity;\n }",
"public LRUCache(int capacity) {\n this.capacity = capacity;\n cache = new HashMap<Integer, DoubleListNode>();\n head = new DoubleListNode(-1,-1); //dummy\n tail = new DoubleListNode(-1,-1); //dummy\n head.next = tail;\n tail.prev = head;\n }",
"public LRUCache(int maxCapacity) {\n super(16, DEFAULT_LOAD_FACTOR, true);\n this.maxCapacity = maxCapacity;\n }",
"public LRUCache(int initialCapacity, int maxCapacity, float loadFactor) {\n super(initialCapacity, loadFactor, true);\n this.maxCapacity = (maxCapacity >= initialCapacity ? maxCapacity : initialCapacity);\n }",
"public MyLRUCache(int capacity) {\n\t\tthis.capacity = capacity;\n\t}",
"public LRU_cache(int capacity) {\n cap = capacity;\n head.next = tail;\n tail.prev = head;\n }",
"public LRUCache(int initialCapacity, int maxCapacity) {\n super(initialCapacity, 0.75f, true);\n this.maxCapacity = maxCapacity;\n }",
"@Test\n public void expiry10m() {\n Cache<Integer, Integer> c = new Cache2kBuilder<Integer, Integer>() {}\n .expireAfterWrite(10, TimeUnit.MINUTES)\n /* ... set loader ... */\n .build();\n target.setCache(c);\n DefaultResiliencePolicy p = extractDefaultPolicy();\n assertEquals(TimeUnit.MINUTES.toMillis(10), p.getResilienceDuration());\n assertEquals(TimeUnit.MINUTES.toMillis(10), p.getMaxRetryInterval());\n assertEquals(TimeUnit.MINUTES.toMillis(1), p.getRetryInterval());\n }",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"protected void scheduleExpiry()\n {\n long dtExpiry = 0L;\n int cDelay = OldOldCache.this.m_cExpiryDelay;\n if (cDelay > 0)\n {\n dtExpiry = getSafeTimeMillis() + cDelay;\n }\n setExpiryMillis(dtExpiry);\n }",
"public JwkProviderBuilder cached(long cacheSize, long expiresIn, TimeUnit unit) {\n this.cached = true;\n this.cacheSize = cacheSize;\n this.expiresIn = expiresIn;\n this.expiresUnit = unit;\n return this;\n }",
"public OldOldCache(int cUnits, int cExpiryMillis)\n {\n this(cUnits, cExpiryMillis, DEFAULT_PRUNE);\n }",
"public LRUCache(final int cacheSizeValue) {\n\t\tthis.cacheSize = cacheSizeValue;\n\t\tint hashTableCapacity = (int) Math.ceil(cacheSizeValue\n\t\t\t\t/ HASH_TABLE_LOAD_FACTOR) + 1;\n\t\tmap = new LinkedHashMap<K, V>(hashTableCapacity,\n\t\t\t\tHASH_TABLE_LOAD_FACTOR, true) {\n\t\t\t// (an anonymous inner class)\n\t\t\tprivate static final long serialVersionUID = 1;\n\n\t\t\t@Override\n\t\t\tprotected boolean removeEldestEntry(final Map.Entry<K, V> eldest) {\n\t\t\t\t// check if maximum size is exceeded and eldest entry needs to\n\t\t\t\t// be deleted\n\t\t\t\treturn super.size() > LRUCache.this.cacheSize;\n\t\t\t}\n\t\t};\n\t}",
"void initialize(int maxTTISeconds, int maxTTLSeconds, int targetMaxTotalCount, boolean invalidateOnChange,\n boolean localCacheEnabled);",
"public void set(int curtTime, int key, int value, int ttl) {\n int expire = ttl == 0 ? -1 : curtTime + ttl - 1;\n Element elem = new Element(value, expire);\n cache.put(key, elem);\n }",
"public LRU(int max) {\n if (max <= 0) {\n throw new IllegalArgumentException(\"MRU cache must contain at least one entry\");\n }\n _max = max;\n }",
"public OldOldCache(int cUnits)\n {\n this(cUnits, DEFAULT_EXPIRE);\n }",
"public LruSoftCache(int maxSize) {\n\t\tif (maxSize <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"maxSize <= 0\");\n\t\t}\n\t\tthis.maxSize = maxSize;\n\t\tthis.map = new LinkedHashMap<K, SoftReference<V>>(0, 0.75f, true);\n\t}",
"public LRUCache(int capacity) {\n super(capacity + 1, 1.0f, true); // Pass 'true' for accessOrder.\n this.capacity = capacity;\n }",
"private boolean isExpired(CacheableObject value) {\n if (value == null) {\n return false;\n } else {\n return System.currentTimeMillis() - value.createTime > timeToLive;\n }\n }",
"public OldOldCache()\n {\n this(DEFAULT_UNITS);\n }",
"public LRUMapCache(int maxObjects) {\n\t\tthis.maxObjects = maxObjects;\n\t\tcacheMap = new HashMap<K, V>(maxObjects);\n\t\thitMap = new HashMap<K, Integer>();\n\t}",
"private static Cache<DHTKey, LruRetentionInfo> buildEmptyCacheWithCapacity(long capacityBytes) {\n return Caffeine.newBuilder().weigher(cacheWeigher).maximumWeight(capacityBytes).recordStats().build();\n }",
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"private void initializeCache(int cacheSize){\n \t\tlruCache = new LRUCache(cacheSize);\n \t}",
"private static InternalCacheConfig defaultTimestampsCacheConfig() {\n InternalCacheConfig cacheConfig = new InternalCacheConfig();\n cacheConfig.maxIdle = Time.forever();\n cacheConfig.objectCount = -1;\n return cacheConfig;\n }",
"public Builder setTtl(long value) {\n bitField0_ |= 0x00000008;\n ttl_ = value;\n onChanged();\n return this;\n }",
"protected static void expireLocalEntry(Object oKey, NamedCache cache)\n {\n CacheService service = cache.getCacheService();\n BackingMapManagerContext ctx = service.getBackingMapManager().getContext();\n LocalCache mapBM = (LocalCache) ctx.getBackingMap(getCacheName0());\n LocalCache.Entry entry = (LocalCache.Entry)\n mapBM.getEntry(ctx.getKeyToInternalConverter().convert(oKey));\n\n entry.setExpiryMillis(Base.getSafeTimeMillis() - 5000);\n\n try\n {\n // Expiry has a quarter-second granularity; pause this thread to\n // ensure that we don't optimize over the expiry check. See\n // OldCache.m_lNextFlush.\n Blocking.sleep(0x200L);\n }\n catch (InterruptedException e)\n {\n }\n }",
"private Cache configureCache(MemoryStoreEvictionPolicy evictionPolicy) {\n\t\tCacheConfiguration cacheConfiguration = new CacheConfiguration(\n\t\t\t\t\"evictionCache\", 2);\n\t\t// set FIFO eviction policy\n\t\tcacheConfiguration\n\t\t\t\t.setMemoryStoreEvictionPolicyFromObject(evictionPolicy);\n\t\t// set time to idle time\n\t\tcacheConfiguration.setTimeToIdleSeconds(300);\n\t\t// set time to live time\n\t\tcacheConfiguration.setTimeToLiveSeconds(600);\n\n\t\tCacheManager cacheManager = CacheManager.create();\n\t\t// create a new cache\n\t\tCache memoryCache = new Cache(cacheConfiguration);\n\t\tcacheManager.addCache(memoryCache);\n\t\tCache evictionCache = cacheManager.getCache(\"evictionCache\");\n\t\tevictionCache.removeAll();\n\t\treturn evictionCache;\n\t}",
"public MLNKVMemoryCache(String name) {\n this.name = name;\n LRUCountLimit = 10000;\n FIFOCountLimit = 1000;\n memorySizeLimit = 100 << 20;\n releaseOnMainThread = false;\n\n useFIFO = true;\n useLRU = true;\n\n weakMap = new HashMap<>();\n LRUCache = new MLNKVCache();\n FIFOCache = new MLNKVCache();\n\n LRUCache.releaseOnMainThread = releaseOnMainThread;\n FIFOCache.releaseOnMainThread = releaseOnMainThread;\n }",
"public Cache(Integer size) {\n this.size = size;\n recentlyUsed = new ArrayList<K>();\n cache = new HashMap<>();\n }",
"public void setTtl(int ttl) {\n this.ttl = ttl;\n }",
"public FileLRUCache(int maxSize, int maxFileSize, long timeout) {\n\t\tsuper(maxSize, maxFileSize, timeout);\n\t}",
"@SuppressWarnings(\"unused\")\n void expire();",
"public void setTtl(Integer ttl) {\n this.ttl = ttl;\n }",
"@Bean\n public ExpiringMap<String, Integer> cacheMap() {\n final ExpiringMap<String, Integer> map = ExpiringMap.builder().expiration(1, TimeUnit.MINUTES).build();\n return map;\n }",
"public Cache(int size) {\r\n\t\t\r\n\t\tcache = new LinkedList<T>();\r\n\t\tmaxStorage = size;\r\n\t}",
"public OldOldCache(int cUnits, int cExpiryMillis, double dflPruneLevel)\n {\n m_cMaxUnits = cUnits;\n m_dflPruneLevel = dflPruneLevel = Math.min(Math.max(dflPruneLevel, 0.0), 0.99);\n m_cPruneUnits = (int) (dflPruneLevel * cUnits);\n m_cExpiryDelay = Math.max(cExpiryMillis, 0);\n scheduleFlush();\n }",
"public void setTimeToLive(long value) {\n this.timeToLive = value;\n }",
"public LRUMap(int maximumSize){\n\t\tsuper(maximumSize+1,0.75f,true);\n\t\tthis.maximumSize = maximumSize;\n\t}",
"@Test\n\tpublic void test3() throws InterruptedException {\n\t\tDeadElementCallBack<String, Integer> callback = new DeadElementCallBack<String, Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic void notify(String key, Integer elements) {\n\t\t\t}\n\t\t}; \n\t\tLRUCache<String, Integer> cache = new LRUCache<String, Integer>(2000, 2, callback);\n\t\tcache.put(\"hello\", 1);\n\t\tcache.put(\"yo\", 2);\n\t\tcache.put(\"hola\", 4);\n\t\tThread.sleep(1500);\n\t\tcache.get(\"yo\"); // Using a value.\n\t\tThread.sleep(1000);\n\t\tcache.put(\"sup\", 3);\n\t\tassertTrue(cache.size() == 3);\n\t\tassertTrue(cache.get(\"sup\") != null);\n\t\tassertTrue(cache.get(\"yo\") != null);\n\t}",
"public static void main(String args[]){\n LRUCache cache = new LRUCache(2);\n\n cache.put(1, 1);\n cache.put(2, 2);\n System.out.println(cache.get(1)); // returns 1\n cache.put(3, 3); // evicts key 2\n System.out.println(cache.get(2)); // returns -1 (not found)\n cache.put(4, 4); // evicts key 1\n System.out.println(cache.get(1)); // returns -1 (not found)\n System.out.println(cache.get(3)); // returns 3\n System.out.println(cache.get(4)); // returns 4\n }",
"public ICache(int delay, int size, String name) {\n this(null, delay, size, name);\n }",
"public MRUCache(CacheDataFactory<K, V> fact) {\r\n this(DEFAULTSIZE, fact, null);\r\n }",
"public interface Cache<T> {\n\n /**\n * Put the object in the cache with the given <code>key</code>.\n * <p>\n * The object is stored for the default configured time, depending on the\n * cache implementation. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n void put(@NonNull String key, @NonNull T value);\n\n /**\n * Put the object in the cache with the given <code>key</code> for the\n * given <code>duration</code>.\n * <p>\n * The object is stored for the requested duration. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param duration The (not null) duration to store the object for.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull Duration duration);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull LocalDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull ZonedDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for ever.\n * <p>\n * The object is stored and should never be removed. This should overrule configured default\n * expiry time for objects put in the cache. However, the object may still be evicted from\n * the cache, for instance for memory reasons.\n * <p>\n * This method calls Duration.ofMillis(Long.max()) and passes it to the put(key, value, Duration duration).\n * So this method does not persist eternally, but rather persists for a long time.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n default void putEternally(@NonNull final String key, @NonNull final T value) {\n put(key, value, Duration.ofMillis(Long.MAX_VALUE));\n }\n\n /**\n * Retrieve the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The value, or <code>null</code> if the object is not found.\n */\n T get(@NonNull String key);\n\n /**\n * Retrieve an optional for the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The <code>Optional</code> for the value.\n */\n default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }\n\n /**\n * Remove the value associate with the <code>key</code>.\n *\n * @param key The key to remove.\n */\n void remove(@NonNull String key);\n\n}",
"public InMemoryResponseCache() {\n\t\tthis( 250*1024 ); // 250 KB cache\n\t}",
"public HeapCacheBuilder expiry(final long expiry) {\n checkPositive(expiry, \"expiry must be positive\");\n this.expiry = expiry;\n return this;\n }",
"public interface CustomCache<K, V> {\n\n /**\n * gets a value by key\n * returns null if key is expired\n *\n * @param key\n * @return\n */\n V get(K key);\n\n /**\n * puts into cache with given ttl\n *\n * @param key\n * @param value\n */\n void put(K key, V value);\n\n /**\n * averages out the non expired values in cache.\n * to be discussed in interview\n *\n * @return\n */\n double average();\n}",
"public SearchCache() {\n this(CAPACITY, new Ticker());\n }",
"public TopListTimer() {\r\n\t\tsuper(-1, 1000 * 30);\r\n\t}",
"private static void cleanLeaseCache(Map<HashPair, Lease> tc) {\n for (Iterator<Lease> iter = tc.values().iterator(); iter.hasNext(); ) {\n Lease l = iter.next();\n if (l.isExpired(Router.CLOCK_FUDGE_FACTOR))\n iter.remove();\n }\n }",
"public Builder clearTtl() {\n bitField0_ = (bitField0_ & ~0x00000008);\n ttl_ = 0L;\n onChanged();\n return this;\n }",
"@CacheEvict(allEntries = true, cacheNames = { \"airly_now\", \"history\" })\n @Scheduled(fixedDelay = 30000)\n public void reportCacheEvict() {\n }",
"public Cache createCache() throws Exception {\n return createCache(maxEntries, DEFAULT_CACHE_CLASSNAME);\n }",
"@SuppressWarnings(\"unchecked\")\n public WeakIdentityCache() {\n threshold = 16;\n entries = new Entry[threshold];\n }",
"public Builder setMemcacheExpiration(Expiration memcacheExpiration) {\n this.memcacheExpiration = memcacheExpiration;\n return this;\n }",
"public void setTimeToLive(int timeToLive) {\n this.timeToLive = timeToLive;\n }",
"public MemoryCache() {\n\t\t// use 25% of available heap size\n\t\tsetLimit(Runtime.getRuntime().maxMemory() / 10);\n\t}",
"@Scheduled(fixedRate = 30 * 60 * 1000)\n public void clearStaleCache(){\n\n }",
"public TransactionConfiguration cacheStopTimeout(long l) {\n this.cacheStopTimeout = l;\n return this;\n }",
"public JwkProviderBuilder() {\n this.cached = true;\n this.expiresIn = 10;\n this.expiresUnit = TimeUnit.HOURS;\n this.cacheSize = 5;\n }",
"long getExpiration();",
"private void addTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n // insert entry into list\n int index = 0;\n while (index < timeEntries.size())\n {\n SoftReference<TimeEntry> softReference = timeEntries.get(index);\n if ((softReference != null) && softReference.get().spentOn.isBefore(timeEntry.spentOn))\n {\n break;\n }\n index++;\n }\n timeEntries.add(index,new SoftReference<TimeEntry>(timeEntry));\n }\n }",
"private void cancelAndScheduleNewCacheTimerTask(long offset) {\n\n InternalCache cache = GemFireCacheImpl.getInstance();\n\n if (cache != null && !cache.isClosed()) {\n if (cacheTimeTask != null) {\n cacheTimeTask.cancel();\n }\n cacheTimeTask = new CacheTimeTask(offset);\n SystemTimer timer = cache.getCCPTimer();\n timer.scheduleAtFixedRate(cacheTimeTask, 1/* Start after 1ms */ , 2 /* Run task every 2ms */);\n if (logger.isDebugEnabled()) {\n logger.debug(\n \"Started a timer task to suspend cache time for new lower offset of {}ms and current offset is: {}\",\n offset, cacheTimeDelta);\n }\n }\n }",
"public static void startCacheCleaner() {\n TimerTask faultyServiceRectifier = new CacheCleaner();\n timer = new Timer();\n // Retry in 1 minute\n long retryIn = 1000 * 60;\n timer.schedule(faultyServiceRectifier, 0, retryIn);\n }",
"@Nonnull\n\t\tpublic Builder setTtl(@Nonnull Time ttl) {\n\t\t\tthis.ttl = ttl;\n\t\t\treturn this;\n\t\t}",
"public CCache (String name, int initialCapacity)\n\t{\n\t\tthis (name, initialCapacity, 120);\n\t}",
"private void removeExpired() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (isExpired(entry.getValue())) {\n removeMap.put(entry.getKey(), entry.getValue());\n }\n }\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.expiredElement(entry.getKey());\n }\n }\n }",
"@Override\n default UserpostPrx ice_locatorCacheTimeout(int newTimeout)\n {\n return (UserpostPrx)_ice_locatorCacheTimeout(newTimeout);\n }",
"public static LRUResourceCache getCache(String contextName) {\n LRUResourceCache lruCache = null;\n ConcurrentHashMap<String, LRUResourceCache> cacheMap = RuntimeData.getCacheMap();\n KernelProps conf = KernelProps.getInstance();\n \n if (cacheMap.containsKey(contextName)) {\n lruCache = (LRUResourceCache) cacheMap.get(contextName);\n } else {\n lruCache = new LRUResourceCache(conf.getInitialCacheSize(), conf.getCacheLoadFactor(), conf.getCacheCapacity());\n cacheMap.put(contextName, lruCache);\n }\n return lruCache;\n }",
"static int[] implement_LRU_cache(int capacity, int[] query_type, int[] key, int[] value) {\n // Stores the key as key of map and value as position of this provided value in linkedlist\n Map<Integer, Node> cacheMap = new HashMap<Integer, Node>();\n LinkedList keyList = new LinkedList();\n List<Integer> returnedValues = new ArrayList<Integer>();\n for(int i=0;i<query_type.length;i++){\n if(query_type[i]==0){\n // Add the linked list node to head if its accessed\n if(cacheMap.containsKey(key[i])){\n Node valueNode = cacheMap.get(key[i]);\n returnedValues.add(valueNode.value);\n // refresh the position of this element in the list\n keyList.replaceNode(valueNode);\n }else{\n returnedValues.add(-1);\n }\n\n }else{\n Node node = new Node(key[i], value[i]);\n if(cacheMap.containsKey(key[i])) {\n node = cacheMap.get(key[i]);\n node.value = value[i];\n keyList.replaceNode(node);\n }\n else {\n if (capacity > cacheMap.size()) {\n keyList.addFirst(node);\n cacheMap.put(key[i], node);\n\n }else{\n cacheMap.remove(keyList.tail.key);\n keyList.deleteNode();\n\n keyList.addFirst(node);\n cacheMap.put(node.key, node);\n }\n\n }\n }\n }\n int[] returnArray = new int[returnedValues.size()];\n for(int i=0;i<returnedValues.size();i++){\n returnArray[i] = returnedValues.get(i);\n }\n return returnArray;\n }",
"@Override\n public LocalIntCacheStream timeout(long timeout, TimeUnit unit) {\n return this;\n }",
"private ConfigurationBuilder customizeEviction(ConfigurationBuilder currentBuilder, Configuration configuration)\n {\n ConfigurationBuilder builder = currentBuilder;\n\n EntryEvictionConfiguration eec =\n (EntryEvictionConfiguration) getCacheConfiguration().get(EntryEvictionConfiguration.CONFIGURATIONID);\n\n if (eec != null && eec.getAlgorithm() == EntryEvictionConfiguration.Algorithm.LRU) {\n if (eec.containsKey(LRUEvictionConfiguration.MAXENTRIES_ID)) {\n int maxEntries = ((Number) eec.get(LRUEvictionConfiguration.MAXENTRIES_ID)).intValue();\n if (configuration.eviction() == null || configuration.eviction().strategy() != EvictionStrategy.LRU\n || configuration.eviction().maxEntries() != maxEntries) {\n builder = builder(builder, null);\n builder.eviction().strategy(EvictionStrategy.LRU);\n builder.eviction().maxEntries(maxEntries);\n }\n }\n\n if (eec.getTimeToLive() > 0) {\n long maxIdle = eec.getTimeToLive() * 1000L;\n if (configuration.expiration() == null || configuration.expiration().maxIdle() != maxIdle) {\n builder = builder(builder, null);\n builder.expiration().maxIdle(eec.getTimeToLive() * 1000L);\n }\n }\n }\n\n return builder;\n }",
"public HotrodCacheFactory() {\n }",
"int getExpireTimeout();",
"public static interface CacheListener<T> {\n\n /**\n * An entry has outlived its \"time-to-live.\n * \n * @param key entry key of element being removed\n */\n void expiredElement(T key);\n\n\n /**\n * An entry has been removed to make room for additional elements\n * \n * @param key entry key of element being removed\n */\n void evictedElement(T key);\n }",
"public ImcacheCacheManager() {\n this(CacheBuilder.heapCache());\n }",
"interface ICacheUtil {\n void put(Object key, Object value, long expiredTime, TimeUnit unit);\n Object get(Object key);\n void remove(Object key);\n void clear();\n boolean isExists(Object key);\n}",
"public MRUCache(int size, CacheDataFactory<K, V> fact, CacheSource<K,V> source) {\r\n factory = fact;\r\n this.source = source;\r\n buckets = new AtomicReference[nextPrime(size + (int)(size * .15))];\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n buckets[i] = new AtomicReference<CacheData<K, V>>(null);\r\n }\r\n }",
"public Cache() {\n this(null);\n }",
"@Override\n default ManagerPrx ice_locatorCacheTimeout(int newTimeout)\n {\n return (ManagerPrx)_ice_locatorCacheTimeout(newTimeout);\n }",
"@DefaultValue(\"300000\")\n long getNodeGcTtlMs();",
"public ArticleListAdapter(LruCache<String, Bitmap> cache) {\n this.mLruCache = cache;\n }",
"@Test\n\tpublic void executeTTLScenario() throws Exception {\n\t\tCacheConfiguration cacheConfiguration = new CacheConfiguration(\n\t\t\t\t\"ttlCache\", 2);\n\t\t// set FIFO eviction policy\n\t\tcacheConfiguration\n\t\t\t\t.setMemoryStoreEvictionPolicyFromObject(MemoryStoreEvictionPolicy.FIFO);\n\t\t// set time to live time to 3 seconds\n\t\tcacheConfiguration.setTimeToLiveSeconds(3);\n\n\t\tCacheManager cacheManager = CacheManager.create();\n\t\t// create a new cache\n\t\tCache memoryCache = new Cache(cacheConfiguration);\n\t\tcacheManager.addCache(memoryCache);\n\t\tCache ttlCache = cacheManager.getCache(\"ttlCache\");\n\t\tttlCache.removeAll();\n\n\t\t// save a query result to the cache\n\t\tResultRetriever resultRetriever = new ResultRetriever(\n\t\t\t\tConstants.DUMPED_NYTIMES_ENDPOINT,\n\t\t\t\tConstants.SAMPLE_CONSTRUCT_QUERY_1);\n\t\tDirectedCacheQuery directedCacheQuery = new DirectedCacheQuery(\n\t\t\t\tConstants.SAMPLE_CONSTRUCT_QUERY_1,\n\t\t\t\tConstants.DUMPED_NYTIMES_ENDPOINT);\n\t\tElement firstElement = new Element(directedCacheQuery,\n\t\t\t\tresultRetriever.retrieve());\n\t\tttlCache.put(firstElement);\n\n\t\t// get result immediately after saving it\n\t\tassertNotNull(ttlCache.get(directedCacheQuery));\n\n\t\t// sleep 3.5 seconds\n\t\tThread.sleep(3500);\n\n\t\t// get the query result after waiting for TTL value\n\t\tassertNull(ttlCache.get(directedCacheQuery));\n\n\t\t// free the cache\n\t\tttlCache.dispose();\n\t\tCacheManager.create().shutdown();\n\n\t\tThread.sleep(1000);\n\t}",
"private void initialiseTimers() {\r\n for (Map.Entry<String, Feed> entry : feeds.entrySet()) {\r\n String key = entry.getKey();\r\n Timer timer = new Timer();\r\n timer.schedule(new TimerTask() {\r\n @Override\r\n public void run() {\r\n feeds.remove(key);\r\n timers.remove(key);\r\n }\r\n }, 15 * 1000, 15 * 1000);\r\n timers.put(key, timer);\r\n }\r\n }",
"public SessionList() { \n sessions = ExpiringMap.builder().variableExpiration().build();\n }",
"GlobalSecurityConfigurationBuilder securityCacheTimeout(long securityCacheTimeout);",
"@Bean\n\tpublic CacheManager cacheManager() {\n \tCaffeineCacheManager cacheManager = new CaffeineCacheManager();\n \tcacheManager.setCacheSpecification(\"maximumSize=500,expireAfterWrite=60m\");\n \treturn cacheManager;\n\t}",
"public interface EvictionPolicy\n {\n /**\n * This method is called by the cache to indicate that an entry has\n * been touched.\n *\n * @param entry the Cache Entry that has been touched\n */\n public void entryTouched(OldOldCache.Entry entry);\n\n /**\n * This method is called by the cache when the cache requires the\n * eviction policy to evict entries.\n *\n * @param cMaximum the maximum number of units that should remain\n * in the cache when the eviction is complete\n */\n public void requestEviction(int cMaximum);\n }",
"@Scheduled(fixedRate = 60000)\n\tpublic void evictExpiredTokens() {\n\t\tlogger.info(\"Evicting expired tokens.\");\n\t\ttokenCache.evictExpiredElements();\n\t\ttokenCache.flush();\n\t}",
"public void createTimer()\n {\n if (timer != null )\n return;\n \n logger.trace(\"Creating rss timer and task.\");\n RssTimerRefreshFeed refresh = new RssTimerRefreshFeed(this);\n this.timer = new Timer();\n this.timer.scheduleAtFixedRate(refresh, 100, PERIOD_REFRESH_RSS);\n \n logger.trace(\"Done.\");\n }",
"AgentPolicyBuilder setMaxCacheAgeMs(long maxCacheAgeMs);",
"public void put(String key, Object value, int time) {\n customCache.put(key, new TimeExpiredObject(value, time));\n }",
"public interface HomeCache {\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestAllPins(\n Observable<PinListBean> observablePinList,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestAllPinsNext(\n Observable<PinListBean> observablePinList,\n DynamicKey maxPinId,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestFollowingPins(\n Observable<PinListBean> observablePinList,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestFollowingPinsNext(\n Observable<PinListBean> observablePinList,\n DynamicKey maxPinId,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestPopularPins(\n Observable<PinListBean> observablePinList,\n EvictProvider evictProvider);\n\n @LifeCache(duration = 2, timeUnit = TimeUnit.MINUTES)\n Observable<Reply<PinListBean>> getLatestPopularPinsNext(\n Observable<PinListBean> observablePinList,\n DynamicKey maxPinId,\n EvictProvider evictProvider);\n}",
"private void refreshTokenPool() {\n \n\t\tfor (Map.Entry<String, Token> entry : tokenPool.entrySet()) {\t\n\t\t\tToken token = entry.getValue();\n\t\t\tString key = entry.getKey();\n\t\t\tif(token.getExpiry() <= getTimeStampMilliSeconds()) {\n\t\t\t\ttokenPool.remove(key);\n\t\t\t\t//check if it is in live list and remove it\n\t\t\t\tif(liveTokenList.contains(key)) {\n\t\t\t\t\tremoveKeyFromTokenList(key);\n\t\t\t\t}\n\t\t //Add the token if it has never been live or if the current time is more than the last use + the rate \n\t\t\t} else if(token.getLastlive() == 0 || (getTimeStampMilliSeconds() >= token.getLastUsed()+token.getRate())) {\n//\t\t\t\tlogger.info(\"MAKE-LIVE : \" + (token.getLastlive()+token.getRate()) + \", : time : \" + getTimeStampMilliSeconds() + \", last used : \" + token.getLastUsed());\n\t\t\t\tif(!liveTokenList.contains(key)) {\n\t\t\t\t\taddKeyToTokenList(key);\n\t\t\t\t\ttoken.setLastlive(getTimeStampMilliSeconds());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testCoh3710()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run() { getNamedCache(getCacheName0()).clear(); }\n });\n }",
"long getEvictions();"
] | [
"0.73002505",
"0.7275628",
"0.6891372",
"0.6070027",
"0.6039302",
"0.592517",
"0.58324826",
"0.5776685",
"0.5753996",
"0.5741087",
"0.57349676",
"0.57104784",
"0.5669032",
"0.5647223",
"0.56358004",
"0.56300974",
"0.56046945",
"0.55795217",
"0.556906",
"0.55258554",
"0.5517372",
"0.55157363",
"0.55014807",
"0.547098",
"0.54698795",
"0.54196966",
"0.5417305",
"0.53808707",
"0.53434265",
"0.5303742",
"0.5297382",
"0.5237356",
"0.5224466",
"0.5221494",
"0.52113134",
"0.5179113",
"0.51553774",
"0.51549995",
"0.51500034",
"0.5145368",
"0.51372474",
"0.5132624",
"0.51145685",
"0.5105846",
"0.50655055",
"0.50466615",
"0.50461",
"0.50401545",
"0.5038438",
"0.5034162",
"0.5032961",
"0.50192094",
"0.5018535",
"0.49738723",
"0.4969972",
"0.49611178",
"0.49603295",
"0.49373215",
"0.49321148",
"0.49312723",
"0.49306616",
"0.4921817",
"0.4909044",
"0.49079555",
"0.48963416",
"0.48872796",
"0.48782495",
"0.48740634",
"0.48681256",
"0.4867288",
"0.4866433",
"0.48567003",
"0.48539528",
"0.48526728",
"0.48326364",
"0.48199826",
"0.48161253",
"0.48138285",
"0.4804822",
"0.479565",
"0.47911036",
"0.47587505",
"0.474079",
"0.47336355",
"0.4728776",
"0.47261038",
"0.47203755",
"0.47190005",
"0.47133422",
"0.47104132",
"0.47044674",
"0.47042263",
"0.46943423",
"0.46911973",
"0.4687066",
"0.46858996",
"0.4683725",
"0.46835384",
"0.46720105",
"0.4670639"
] | 0.6351543 | 3 |
Create a new LRU cache with a given "timetolive" in seconds, and a 30 second delay in cleaning up expired values. | public MyLRUCache(int cacheSizeLimit, int timeToLive) {
this(cacheSizeLimit, timeToLive, 30);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MyLRUCache(int cacheSizeLimit, int timeToLive, int cleanupDelay) {\n if (cacheSizeLimit <= 0) {\n throw new IllegalArgumentException(\"Cache-Size-Limit value must be > 0\");\n } else if (timeToLive <= 0) {\n throw new IllegalArgumentException(\"Time-To-Live value must be > 0\");\n } else if (cleanupDelay <= 0) {\n throw new IllegalArgumentException(\"Cleanup-Delay value must be > 0\");\n }\n\n this.cacheSizeLimit = cacheSizeLimit;\n this.cleanupDelay = cleanupDelay;\n this.timeToLive = timeToLive * 1000;\n\n int hashTableCapacity = (int) Math.ceil(cacheSizeLimit / mapLoadFactor) + 1;\n valueMap = new LinkedHashMap<K, CacheableObject>(hashTableCapacity, mapLoadFactor, true) {\n // (an anonymous inner class)\n private static final long serialVersionUID = 1;\n\n @Override\n protected boolean removeEldestEntry(Map.Entry<K, CacheableObject> eldest) {\n boolean retVal = MyLRUCache.this.currentCacheSize > MyLRUCache.this.cacheSizeLimit;\n if (retVal) {\n synchronized(theLock) {\n toEvictMap.put(eldest.getKey(), eldest.getValue());\n if (toEvictMap.size() > 100) {\n scheduler.schedule(\n new Runnable() {\n @Override public void run() {\n removeEvicted();\n }\n },\n 1,\n TimeUnit.SECONDS\n );\n }\n }\n// eldest.getValue().createTime = 0L;\n// MyLRUCache.this.currentCacheSize -= eldest.getValue().containmentCount;\n// synchronized(listeners) {\n// for (CacheListener<K> listener : listeners) {\n// listener.evictedElement(eldest.getKey());\n// }\n// }\n }\n return retVal;\n }\n };\n\n // Run a cache clean-up every 10 seconds, or whatever the user has specified\n scheduler.scheduleWithFixedDelay(\n new Runnable() {\n @Override public void run() {\n removeExpired();\n }\n },\n this.cleanupDelay,\n this.cleanupDelay,\n TimeUnit.SECONDS\n );\n }",
"@SuppressWarnings({\"CallToThreadStartDuringObjectConstruction\", \"SleepWhileInLoop\"})\n public MemoryCache(long timeToLive, final long timerInterval, int maxItems) {\n this.timeToLive = timeToLive * 1000;\n\n cacheMap = new LRUMap(maxItems);\n\n if (timeToLive > 0 && timerInterval > 0) {\n\n Thread t;\n t = new Thread(() -> {\n while (true) {\n try {\n Thread.sleep(timerInterval * 1000);\n } catch (InterruptedException ex) {\n }\n cleanup();\n }\n });\n\n t.setDaemon(true);\n t.start();\n }\n }",
"public void set(int curtTime, int key, int value, int ttl) {\n int expire = ttl == 0 ? -1 : curtTime + ttl - 1;\n Element elem = new Element(value, expire);\n cache.put(key, elem);\n }",
"public void setTimeToLive(int timeToLive) {\n this.timeToLive = timeToLive;\n }",
"public void setTimeToLive(long value) {\n this.timeToLive = value;\n }",
"public Builder setTtl(long value) {\n bitField0_ |= 0x00000008;\n ttl_ = value;\n onChanged();\n return this;\n }",
"void initialize(int maxTTISeconds, int maxTTLSeconds, int targetMaxTotalCount, boolean invalidateOnChange,\n boolean localCacheEnabled);",
"public MyLRUCache(int cacheSizeLimit) {\n this(cacheSizeLimit, 600);\n }",
"private boolean isExpired(CacheableObject value) {\n if (value == null) {\n return false;\n } else {\n return System.currentTimeMillis() - value.createTime > timeToLive;\n }\n }",
"default EtcdKeysEndpointBuilder timeToLive(Integer timeToLive) {\n doSetProperty(\"timeToLive\", timeToLive);\n return this;\n }",
"public JwkProviderBuilder cached(long cacheSize, long expiresIn, TimeUnit unit) {\n this.cached = true;\n this.cacheSize = cacheSize;\n this.expiresIn = expiresIn;\n this.expiresUnit = unit;\n return this;\n }",
"@Nonnull\n\t\tpublic Builder setTtl(@Nonnull Time ttl) {\n\t\t\tthis.ttl = ttl;\n\t\t\treturn this;\n\t\t}",
"public void setTtl(int ttl) {\n this.ttl = ttl;\n }",
"public void setTtl(Integer ttl) {\n this.ttl = ttl;\n }",
"default EtcdKeysEndpointBuilder timeToLive(String timeToLive) {\n doSetProperty(\"timeToLive\", timeToLive);\n return this;\n }",
"protected void scheduleExpiry()\n {\n long dtExpiry = 0L;\n int cDelay = OldOldCache.this.m_cExpiryDelay;\n if (cDelay > 0)\n {\n dtExpiry = getSafeTimeMillis() + cDelay;\n }\n setExpiryMillis(dtExpiry);\n }",
"public OldOldCache(int cUnits, int cExpiryMillis)\n {\n this(cUnits, cExpiryMillis, DEFAULT_PRUNE);\n }",
"public LRUCache(int capacity) {\n this.capacity = capacity;\n cache = new HashMap<Integer, DoubleListNode>();\n head = new DoubleListNode(-1,-1); //dummy\n tail = new DoubleListNode(-1,-1); //dummy\n head.next = tail;\n tail.prev = head;\n }",
"public LRUCache(int maxCapacity) {\n super(16, DEFAULT_LOAD_FACTOR, true);\n this.maxCapacity = maxCapacity;\n }",
"public void setTimeToLiveSeconds(int timeToLiveSeconds) {\n this.timeToLiveSeconds=timeToLiveSeconds;\n }",
"public void put(String key, Object value, int time) {\n customCache.put(key, new TimeExpiredObject(value, time));\n }",
"public Builder clearTtl() {\n bitField0_ = (bitField0_ & ~0x00000008);\n ttl_ = 0L;\n onChanged();\n return this;\n }",
"@Override\n default UserpostPrx ice_locatorCacheTimeout(int newTimeout)\n {\n return (UserpostPrx)_ice_locatorCacheTimeout(newTimeout);\n }",
"public LRUCache(int capacity) {\n cache = new LinkedHashMap<>(capacity);\n this.capacity = capacity;\n }",
"@Test\n public void expiry10m() {\n Cache<Integer, Integer> c = new Cache2kBuilder<Integer, Integer>() {}\n .expireAfterWrite(10, TimeUnit.MINUTES)\n /* ... set loader ... */\n .build();\n target.setCache(c);\n DefaultResiliencePolicy p = extractDefaultPolicy();\n assertEquals(TimeUnit.MINUTES.toMillis(10), p.getResilienceDuration());\n assertEquals(TimeUnit.MINUTES.toMillis(10), p.getMaxRetryInterval());\n assertEquals(TimeUnit.MINUTES.toMillis(1), p.getRetryInterval());\n }",
"default Builder withIdleTimeout(int timeout) {\n if (timeout == 0) {\n return makePermanent();\n } else {\n return makeTemporary(timeout);\n }\n }",
"public TimeoutMetadata(long timeout) {\n super(instance);\n this.expiry = System.currentTimeMillis() + timeout;\n }",
"public LRUCache(int initialCapacity, int maxCapacity, float loadFactor) {\n super(initialCapacity, loadFactor, true);\n this.maxCapacity = (maxCapacity >= initialCapacity ? maxCapacity : initialCapacity);\n }",
"public LRU_cache(int capacity) {\n cap = capacity;\n head.next = tail;\n tail.prev = head;\n }",
"public TopListTimer() {\r\n\t\tsuper(-1, 1000 * 30);\r\n\t}",
"public HeapCacheBuilder expiry(final long expiry) {\n checkPositive(expiry, \"expiry must be positive\");\n this.expiry = expiry;\n return this;\n }",
"private void addTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n // insert entry into list\n int index = 0;\n while (index < timeEntries.size())\n {\n SoftReference<TimeEntry> softReference = timeEntries.get(index);\n if ((softReference != null) && softReference.get().spentOn.isBefore(timeEntry.spentOn))\n {\n break;\n }\n index++;\n }\n timeEntries.add(index,new SoftReference<TimeEntry>(timeEntry));\n }\n }",
"int getExpireTimeout();",
"Builder makeTemporary(int timeout);",
"GlobalSecurityConfigurationBuilder securityCacheTimeout(long securityCacheTimeout);",
"Builder withHardTimeout(int timeout);",
"public LRUCache(int initialCapacity, int maxCapacity) {\n super(initialCapacity, 0.75f, true);\n this.maxCapacity = maxCapacity;\n }",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"@SuppressWarnings(\"unused\")\n void expire();",
"public ICache(int delay, int size, String name) {\n this(null, delay, size, name);\n }",
"private void cancelAndScheduleNewCacheTimerTask(long offset) {\n\n InternalCache cache = GemFireCacheImpl.getInstance();\n\n if (cache != null && !cache.isClosed()) {\n if (cacheTimeTask != null) {\n cacheTimeTask.cancel();\n }\n cacheTimeTask = new CacheTimeTask(offset);\n SystemTimer timer = cache.getCCPTimer();\n timer.scheduleAtFixedRate(cacheTimeTask, 1/* Start after 1ms */ , 2 /* Run task every 2ms */);\n if (logger.isDebugEnabled()) {\n logger.debug(\n \"Started a timer task to suspend cache time for new lower offset of {}ms and current offset is: {}\",\n offset, cacheTimeDelta);\n }\n }\n }",
"public FileLRUCache(int maxSize, int maxFileSize, long timeout) {\n\t\tsuper(maxSize, maxFileSize, timeout);\n\t}",
"public TransactionConfiguration cacheStopTimeout(long l) {\n this.cacheStopTimeout = l;\n return this;\n }",
"public LRUCache(final int cacheSizeValue) {\n\t\tthis.cacheSize = cacheSizeValue;\n\t\tint hashTableCapacity = (int) Math.ceil(cacheSizeValue\n\t\t\t\t/ HASH_TABLE_LOAD_FACTOR) + 1;\n\t\tmap = new LinkedHashMap<K, V>(hashTableCapacity,\n\t\t\t\tHASH_TABLE_LOAD_FACTOR, true) {\n\t\t\t// (an anonymous inner class)\n\t\t\tprivate static final long serialVersionUID = 1;\n\n\t\t\t@Override\n\t\t\tprotected boolean removeEldestEntry(final Map.Entry<K, V> eldest) {\n\t\t\t\t// check if maximum size is exceeded and eldest entry needs to\n\t\t\t\t// be deleted\n\t\t\t\treturn super.size() > LRUCache.this.cacheSize;\n\t\t\t}\n\t\t};\n\t}",
"public OldOldCache(int cUnits)\n {\n this(cUnits, DEFAULT_EXPIRE);\n }",
"private static Cache<DHTKey, LruRetentionInfo> buildEmptyCacheWithCapacity(long capacityBytes) {\n return Caffeine.newBuilder().weigher(cacheWeigher).maximumWeight(capacityBytes).recordStats().build();\n }",
"private Cache configureCache(MemoryStoreEvictionPolicy evictionPolicy) {\n\t\tCacheConfiguration cacheConfiguration = new CacheConfiguration(\n\t\t\t\t\"evictionCache\", 2);\n\t\t// set FIFO eviction policy\n\t\tcacheConfiguration\n\t\t\t\t.setMemoryStoreEvictionPolicyFromObject(evictionPolicy);\n\t\t// set time to idle time\n\t\tcacheConfiguration.setTimeToIdleSeconds(300);\n\t\t// set time to live time\n\t\tcacheConfiguration.setTimeToLiveSeconds(600);\n\n\t\tCacheManager cacheManager = CacheManager.create();\n\t\t// create a new cache\n\t\tCache memoryCache = new Cache(cacheConfiguration);\n\t\tcacheManager.addCache(memoryCache);\n\t\tCache evictionCache = cacheManager.getCache(\"evictionCache\");\n\t\tevictionCache.removeAll();\n\t\treturn evictionCache;\n\t}",
"@Override\n public LocalIntCacheStream timeout(long timeout, TimeUnit unit) {\n return this;\n }",
"public MyLRUCache(int capacity) {\n\t\tthis.capacity = capacity;\n\t}",
"@ExperimentalApi(\"https://github.com/grpc/grpc-java/issues/9009\")\n public T permitKeepAliveTime(long keepAliveTime, TimeUnit timeUnit) {\n throw new UnsupportedOperationException();\n }",
"public Builder setExpiryTimeSecs(int value) {\n bitField0_ |= 0x00000008;\n expiryTimeSecs_ = value;\n onChanged();\n return this;\n }",
"AgentPolicyBuilder setMaxCacheAgeMs(long maxCacheAgeMs);",
"protected static void expireLocalEntry(Object oKey, NamedCache cache)\n {\n CacheService service = cache.getCacheService();\n BackingMapManagerContext ctx = service.getBackingMapManager().getContext();\n LocalCache mapBM = (LocalCache) ctx.getBackingMap(getCacheName0());\n LocalCache.Entry entry = (LocalCache.Entry)\n mapBM.getEntry(ctx.getKeyToInternalConverter().convert(oKey));\n\n entry.setExpiryMillis(Base.getSafeTimeMillis() - 5000);\n\n try\n {\n // Expiry has a quarter-second granularity; pause this thread to\n // ensure that we don't optimize over the expiry check. See\n // OldCache.m_lNextFlush.\n Blocking.sleep(0x200L);\n }\n catch (InterruptedException e)\n {\n }\n }",
"public void setLifetime(int seconds) {\n lifetime = seconds;\n }",
"private static void cleanLeaseCache(Map<HashPair, Lease> tc) {\n for (Iterator<Lease> iter = tc.values().iterator(); iter.hasNext(); ) {\n Lease l = iter.next();\n if (l.isExpired(Router.CLOCK_FUDGE_FACTOR))\n iter.remove();\n }\n }",
"@Test\n public void testPutOverrideTTL() throws Exception {\n long beforeCreated = System.currentTimeMillis();\n Thread.sleep(10);\n String originalString = \"The rain in Spain falls mainly on the plain\";\n ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(originalString.getBytes());\n\n assertEquals(404, HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\").getResponseCode());\n Header header = new Header(\"ehcacheTimeToLiveSeconds\", \"10\");\n int status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n HttpURLConnection urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(200, urlConnection.getResponseCode());\n\n Thread.sleep(15000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(404, urlConnection.getResponseCode());\n\n header = new Header(\"ehcacheTimeToLiveSeconds\", \"garbage\");\n status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n //Should have not parsed\n Thread.sleep(15000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(200, urlConnection.getResponseCode());\n\n\n header = new Header(\"ehcacheTimeToLiveSeconds\", null);\n status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n //Should have not parsed\n Thread.sleep(15000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(200, urlConnection.getResponseCode());\n\n //the header is case insensitive\n header = new Header(\"EhcachetImeToLiveSeconds\", \"1\");\n status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n Thread.sleep(5000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(404, urlConnection.getResponseCode());\n\n\n }",
"WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);",
"V setValue(V value, long ttl, TimeUnit ttlUnit);",
"public Builder setSoftTtl(long value) {\n bitField0_ |= 0x00000010;\n softTtl_ = value;\n onChanged();\n return this;\n }",
"long getExpiration();",
"public interface Cache<T> {\n\n /**\n * Put the object in the cache with the given <code>key</code>.\n * <p>\n * The object is stored for the default configured time, depending on the\n * cache implementation. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n void put(@NonNull String key, @NonNull T value);\n\n /**\n * Put the object in the cache with the given <code>key</code> for the\n * given <code>duration</code>.\n * <p>\n * The object is stored for the requested duration. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param duration The (not null) duration to store the object for.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull Duration duration);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull LocalDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull ZonedDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for ever.\n * <p>\n * The object is stored and should never be removed. This should overrule configured default\n * expiry time for objects put in the cache. However, the object may still be evicted from\n * the cache, for instance for memory reasons.\n * <p>\n * This method calls Duration.ofMillis(Long.max()) and passes it to the put(key, value, Duration duration).\n * So this method does not persist eternally, but rather persists for a long time.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n default void putEternally(@NonNull final String key, @NonNull final T value) {\n put(key, value, Duration.ofMillis(Long.MAX_VALUE));\n }\n\n /**\n * Retrieve the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The value, or <code>null</code> if the object is not found.\n */\n T get(@NonNull String key);\n\n /**\n * Retrieve an optional for the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The <code>Optional</code> for the value.\n */\n default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }\n\n /**\n * Remove the value associate with the <code>key</code>.\n *\n * @param key The key to remove.\n */\n void remove(@NonNull String key);\n\n}",
"public LRUMapCache(int maxObjects) {\n\t\tthis.maxObjects = maxObjects;\n\t\tcacheMap = new HashMap<K, V>(maxObjects);\n\t\thitMap = new HashMap<K, Integer>();\n\t}",
"public AddressCacheImplementation(float cacheTime) {\n\t\t// constructor allows the linkedlist within LinkedHashMap to maintain\n\t\t// order\n\t\t// with respect to calls to \"get\", \"put\" and \"putAll\". (i.e. maintaining\n\t\t// the most recently accessed/inserted elements at the front of the\n\t\t// cache)\n\t\tmInetAddressList = new LinkedHashMap<>(10, 0.75f, true);\n\n\t\t// element expiration time (TTL)\n\t\tmCacheTime = cacheTime;\n\n\t\t// zero initial permits\n\t\t// first in, first out distribution of permits as they become available\n\t\tmInetAddressAvailableSemaphore = new Semaphore(0, true);\n\t\tmIsClosed = false;\n\n\t\t// create a cleanup task and schedule it to start after 5 seconds, then\n\t\t// run\n\t\t// every 5 seconds\n\t\tmCleanupTask = new CleanupTask();\n\t\tTimer taskTimer = new Timer();\n\t\ttaskTimer.scheduleAtFixedRate(mCleanupTask, 5000, 5000);\n\t}",
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"public CloudfrontUrlBuilder expireIn(long duration, TimeUnit unit)\n {\n InternalUtils.checkNotNull(duration, \"duration\");\n InternalUtils.checkNotNull(unit, \"unit\");\n\n expireDate.duration = duration;\n expireDate.unit = unit;\n\n return this;\n }",
"public Builder setMemcacheExpiration(Expiration memcacheExpiration) {\n this.memcacheExpiration = memcacheExpiration;\n return this;\n }",
"public LruSoftCache(int maxSize) {\n\t\tif (maxSize <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"maxSize <= 0\");\n\t\t}\n\t\tthis.maxSize = maxSize;\n\t\tthis.map = new LinkedHashMap<K, SoftReference<V>>(0, 0.75f, true);\n\t}",
"public boolean hasExpired(Map params, Date since) \r\n\t{\t\t\r\n \treturn (System.currentTimeMillis() - since.getTime()) > 5000;\r\n\t}",
"public Builder clearExpiryTimeSecs() {\n bitField0_ = (bitField0_ & ~0x00000008);\n expiryTimeSecs_ = 0;\n onChanged();\n return this;\n }",
"public JwkProviderBuilder() {\n this.cached = true;\n this.expiresIn = 10;\n this.expiresUnit = TimeUnit.HOURS;\n this.cacheSize = 5;\n }",
"@Override\n default ManagerPrx ice_locatorCacheTimeout(int newTimeout)\n {\n return (ManagerPrx)_ice_locatorCacheTimeout(newTimeout);\n }",
"public CoreCacheBuilder<K, V> setExpireAfterAccess(long value, TimeUnit timeUnit) {\n Objects.requireNonNull(timeUnit);\n final long expireAfterAccessNanos = timeUnit.toNanos(value);\n if (expireAfterAccessNanos <= 0) {\n throw new IllegalArgumentException(\"expireAfterAccess <= 0\");\n }\n this.expireAfterAccessNanos = expireAfterAccessNanos;\n return this;\n }",
"public LRU(int max) {\n if (max <= 0) {\n throw new IllegalArgumentException(\"MRU cache must contain at least one entry\");\n }\n _max = max;\n }",
"public Cache(Integer size) {\n this.size = size;\n recentlyUsed = new ArrayList<K>();\n cache = new HashMap<>();\n }",
"private static InternalCacheConfig defaultTimestampsCacheConfig() {\n InternalCacheConfig cacheConfig = new InternalCacheConfig();\n cacheConfig.maxIdle = Time.forever();\n cacheConfig.objectCount = -1;\n return cacheConfig;\n }",
"public OldOldCache()\n {\n this(DEFAULT_UNITS);\n }",
"public OldOldCache(int cUnits, int cExpiryMillis, double dflPruneLevel)\n {\n m_cMaxUnits = cUnits;\n m_dflPruneLevel = dflPruneLevel = Math.min(Math.max(dflPruneLevel, 0.0), 0.99);\n m_cPruneUnits = (int) (dflPruneLevel * cUnits);\n m_cExpiryDelay = Math.max(cExpiryMillis, 0);\n scheduleFlush();\n }",
"@Test\n\tpublic void executeTTLScenario() throws Exception {\n\t\tCacheConfiguration cacheConfiguration = new CacheConfiguration(\n\t\t\t\t\"ttlCache\", 2);\n\t\t// set FIFO eviction policy\n\t\tcacheConfiguration\n\t\t\t\t.setMemoryStoreEvictionPolicyFromObject(MemoryStoreEvictionPolicy.FIFO);\n\t\t// set time to live time to 3 seconds\n\t\tcacheConfiguration.setTimeToLiveSeconds(3);\n\n\t\tCacheManager cacheManager = CacheManager.create();\n\t\t// create a new cache\n\t\tCache memoryCache = new Cache(cacheConfiguration);\n\t\tcacheManager.addCache(memoryCache);\n\t\tCache ttlCache = cacheManager.getCache(\"ttlCache\");\n\t\tttlCache.removeAll();\n\n\t\t// save a query result to the cache\n\t\tResultRetriever resultRetriever = new ResultRetriever(\n\t\t\t\tConstants.DUMPED_NYTIMES_ENDPOINT,\n\t\t\t\tConstants.SAMPLE_CONSTRUCT_QUERY_1);\n\t\tDirectedCacheQuery directedCacheQuery = new DirectedCacheQuery(\n\t\t\t\tConstants.SAMPLE_CONSTRUCT_QUERY_1,\n\t\t\t\tConstants.DUMPED_NYTIMES_ENDPOINT);\n\t\tElement firstElement = new Element(directedCacheQuery,\n\t\t\t\tresultRetriever.retrieve());\n\t\tttlCache.put(firstElement);\n\n\t\t// get result immediately after saving it\n\t\tassertNotNull(ttlCache.get(directedCacheQuery));\n\n\t\t// sleep 3.5 seconds\n\t\tThread.sleep(3500);\n\n\t\t// get the query result after waiting for TTL value\n\t\tassertNull(ttlCache.get(directedCacheQuery));\n\n\t\t// free the cache\n\t\tttlCache.dispose();\n\t\tCacheManager.create().shutdown();\n\n\t\tThread.sleep(1000);\n\t}",
"void put(K key, V value, long expireMs);",
"public void setTTL(int t) {\n\t\tthis.ttl = t;\n\t}",
"public LRUCache(int capacity) {\n super(capacity + 1, 1.0f, true); // Pass 'true' for accessOrder.\n this.capacity = capacity;\n }",
"public final void setExpiryTime(long expire) {\n\t\tm_tmo = expire;\n\t}",
"public void setExpiryTime(long expiryTime) {\n this.expiryTime = expiryTime;\n }",
"public Cache(int size) {\r\n\t\t\r\n\t\tcache = new LinkedList<T>();\r\n\t\tmaxStorage = size;\r\n\t}",
"private void removeIfExpired(final Object key, final long now) {\n\tfinal Long expirationTimeObject = expirationMap.get(key);\n\tif (isExpired(now, expirationTimeObject)) {\n\t remove(key);\n\t}\n }",
"public long ttl(String key, TimeUnit unit) {\n return redisTemplate.opsForValue().getOperations().getExpire(key, TimeUnit.MILLISECONDS);\n }",
"@Test\n\tpublic void test3() throws InterruptedException {\n\t\tDeadElementCallBack<String, Integer> callback = new DeadElementCallBack<String, Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic void notify(String key, Integer elements) {\n\t\t\t}\n\t\t}; \n\t\tLRUCache<String, Integer> cache = new LRUCache<String, Integer>(2000, 2, callback);\n\t\tcache.put(\"hello\", 1);\n\t\tcache.put(\"yo\", 2);\n\t\tcache.put(\"hola\", 4);\n\t\tThread.sleep(1500);\n\t\tcache.get(\"yo\"); // Using a value.\n\t\tThread.sleep(1000);\n\t\tcache.put(\"sup\", 3);\n\t\tassertTrue(cache.size() == 3);\n\t\tassertTrue(cache.get(\"sup\") != null);\n\t\tassertTrue(cache.get(\"yo\") != null);\n\t}",
"private void initializeCache(int cacheSize){\n \t\tlruCache = new LRUCache(cacheSize);\n \t}",
"public void createTimer()\n {\n if (timer != null )\n return;\n \n logger.trace(\"Creating rss timer and task.\");\n RssTimerRefreshFeed refresh = new RssTimerRefreshFeed(this);\n this.timer = new Timer();\n this.timer.scheduleAtFixedRate(refresh, 100, PERIOD_REFRESH_RSS);\n \n logger.trace(\"Done.\");\n }",
"@ExperimentalApi(\"https://github.com/grpc/grpc-java/issues/9009\")\n public T keepAliveTimeout(long keepAliveTimeout, TimeUnit timeUnit) {\n throw new UnsupportedOperationException();\n }",
"public void setTimeToLiveSeconds(String timeToLiveSeconds) {\n try {\n setTimeToLiveSeconds(Integer.parseInt(timeToLiveSeconds));\n }\n catch (Exception exception) {\n System.out.println(\"AuthStorageSession.setTimeToLiveSeconds: \"+exception);\n setTimeToLiveSeconds(-1);\n }\n }",
"public FuzzyTimer(long time, long inaccuracy) {\r\n value = new FuzzyValueHolderImpl();\r\n value.value = FuzzyValueHolder.False;\r\n value.validate();\r\n this.time = time;\r\n this.inaccuracy = inaccuracy;\r\n \r\n }",
"public interface CustomCache<K, V> {\n\n /**\n * gets a value by key\n * returns null if key is expired\n *\n * @param key\n * @return\n */\n V get(K key);\n\n /**\n * puts into cache with given ttl\n *\n * @param key\n * @param value\n */\n void put(K key, V value);\n\n /**\n * averages out the non expired values in cache.\n * to be discussed in interview\n *\n * @return\n */\n double average();\n}",
"private ConfigurationBuilder customizeEviction(ConfigurationBuilder currentBuilder, Configuration configuration)\n {\n ConfigurationBuilder builder = currentBuilder;\n\n EntryEvictionConfiguration eec =\n (EntryEvictionConfiguration) getCacheConfiguration().get(EntryEvictionConfiguration.CONFIGURATIONID);\n\n if (eec != null && eec.getAlgorithm() == EntryEvictionConfiguration.Algorithm.LRU) {\n if (eec.containsKey(LRUEvictionConfiguration.MAXENTRIES_ID)) {\n int maxEntries = ((Number) eec.get(LRUEvictionConfiguration.MAXENTRIES_ID)).intValue();\n if (configuration.eviction() == null || configuration.eviction().strategy() != EvictionStrategy.LRU\n || configuration.eviction().maxEntries() != maxEntries) {\n builder = builder(builder, null);\n builder.eviction().strategy(EvictionStrategy.LRU);\n builder.eviction().maxEntries(maxEntries);\n }\n }\n\n if (eec.getTimeToLive() > 0) {\n long maxIdle = eec.getTimeToLive() * 1000L;\n if (configuration.expiration() == null || configuration.expiration().maxIdle() != maxIdle) {\n builder = builder(builder, null);\n builder.expiration().maxIdle(eec.getTimeToLive() * 1000L);\n }\n }\n }\n\n return builder;\n }",
"public Long update(E elem, int timeout) {\n Long prevExpiryTime = elemMap.get(elem);\n long now = Time.currentElapsedTime();\n Long newExpiryTime = roundToNextInterval(now + timeout);\n\n if (newExpiryTime.equals(prevExpiryTime)) {\n // No change, so nothing to update\n return null;\n }\n\n // First add the elem to the new expiry time bucket in expiryMap.\n Set<E> set = expiryMap.get(newExpiryTime);\n if (set == null) {\n // Construct a ConcurrentHashSet using a ConcurrentHashMap\n set = Collections.newSetFromMap(new ConcurrentHashMap<>());\n // Put the new set in the map, but only if another thread\n // hasn't beaten us to it\n Set<E> existingSet = expiryMap.putIfAbsent(newExpiryTime, set);\n if (existingSet != null) {\n set = existingSet;\n }\n }\n set.add(elem);\n\n // Map the elem to the new expiry time. If a different previous\n // mapping was present, clean up the previous expiry bucket.\n prevExpiryTime = elemMap.put(elem, newExpiryTime);\n if (prevExpiryTime != null && !newExpiryTime.equals(prevExpiryTime)) {\n Set<E> prevSet = expiryMap.get(prevExpiryTime);\n if (prevSet != null) {\n prevSet.remove(elem);\n }\n }\n return newExpiryTime;\n }",
"private void purgeObsoleteTempExpKeys( long now) {\n\t\tlong beforeTS = now - getDurationKeepTempExpKeys();\n\t\tif ( Crypto.purgeObsoleteTempExpKeys( beforeTS)) {\n\t\t\t// set time-stamp of last purge\n\t\t\tsetPurgedObsoleteTempExpKeysTS( now);\n\t\t} else {\n\t\t\tlogger.warning( \"failed to purge temporary exposure keys\");\n\t\t}\n\t}",
"void set(K key, V value, LocalDateTime expiresAt) throws CapacityExceededException;",
"public int get(int curtTime, int key) {\n if (!cache.containsKey(key)) {\n return Integer.MAX_VALUE;\n }\n Element elem = cache.get(key);\n if (elem.expire >= curtTime || elem.expire == -1) {\n return elem.value;\n } else {\n return Integer.MAX_VALUE;\n }\n }",
"public MLNKVMemoryCache(String name) {\n this.name = name;\n LRUCountLimit = 10000;\n FIFOCountLimit = 1000;\n memorySizeLimit = 100 << 20;\n releaseOnMainThread = false;\n\n useFIFO = true;\n useLRU = true;\n\n weakMap = new HashMap<>();\n LRUCache = new MLNKVCache();\n FIFOCache = new MLNKVCache();\n\n LRUCache.releaseOnMainThread = releaseOnMainThread;\n FIFOCache.releaseOnMainThread = releaseOnMainThread;\n }",
"private void removeTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n SoftReference<TimeEntry> timeEntrySoftReference = null;\n ListIterator<SoftReference<TimeEntry>> iterator = timeEntries.listIterator();\n while (iterator.hasNext() && (timeEntrySoftReference == null))\n {\n SoftReference<TimeEntry> softReference = iterator.next();\n if ((softReference != null) && softReference.get() == timeEntry)\n {\n timeEntrySoftReference = softReference;\n }\n }\n if (timeEntrySoftReference != null)\n {\n timeEntries.remove(timeEntrySoftReference);\n }\n }\n }"
] | [
"0.69431204",
"0.66277087",
"0.5620287",
"0.5603576",
"0.5424078",
"0.5352819",
"0.53049994",
"0.5292617",
"0.5264843",
"0.52628773",
"0.5224772",
"0.5211039",
"0.51778626",
"0.5121198",
"0.5116158",
"0.5070813",
"0.5068059",
"0.50195897",
"0.4996834",
"0.49645385",
"0.49504328",
"0.49281746",
"0.4917561",
"0.49150997",
"0.49028933",
"0.49013636",
"0.48785052",
"0.48503798",
"0.48487523",
"0.4847522",
"0.48262605",
"0.4820239",
"0.48119047",
"0.4795134",
"0.4785507",
"0.4764554",
"0.47624955",
"0.47548497",
"0.47525382",
"0.47377294",
"0.47303146",
"0.47025356",
"0.4702258",
"0.46948567",
"0.46882936",
"0.46882156",
"0.4681756",
"0.46724343",
"0.46654633",
"0.46591255",
"0.46470067",
"0.463874",
"0.46304765",
"0.4606137",
"0.45997348",
"0.45950302",
"0.4588542",
"0.4580999",
"0.45761746",
"0.45749262",
"0.45710534",
"0.45421538",
"0.45407134",
"0.45398945",
"0.4534136",
"0.45313343",
"0.4522362",
"0.45109728",
"0.4486935",
"0.4483788",
"0.44831783",
"0.4480164",
"0.44793943",
"0.44789",
"0.44707325",
"0.44675502",
"0.44664317",
"0.44660565",
"0.44494608",
"0.44407225",
"0.44385907",
"0.4438502",
"0.4432665",
"0.44288296",
"0.44233355",
"0.44139317",
"0.4405378",
"0.43921056",
"0.43844917",
"0.43809783",
"0.43809628",
"0.43794137",
"0.4375121",
"0.43725142",
"0.43655095",
"0.4361732",
"0.43564513",
"0.43153656",
"0.43134335",
"0.42944056"
] | 0.7172085 | 0 |
Create a new LRU cache with a given "timetolive" in seconds. If a client wants a nonexpiring cache, simply use the default "LRUCache". A negative or zero value for the "cacheSizeLimit", "timeToLive" or "cleanupDelay" will result in an exception. | public MyLRUCache(int cacheSizeLimit, int timeToLive, int cleanupDelay) {
if (cacheSizeLimit <= 0) {
throw new IllegalArgumentException("Cache-Size-Limit value must be > 0");
} else if (timeToLive <= 0) {
throw new IllegalArgumentException("Time-To-Live value must be > 0");
} else if (cleanupDelay <= 0) {
throw new IllegalArgumentException("Cleanup-Delay value must be > 0");
}
this.cacheSizeLimit = cacheSizeLimit;
this.cleanupDelay = cleanupDelay;
this.timeToLive = timeToLive * 1000;
int hashTableCapacity = (int) Math.ceil(cacheSizeLimit / mapLoadFactor) + 1;
valueMap = new LinkedHashMap<K, CacheableObject>(hashTableCapacity, mapLoadFactor, true) {
// (an anonymous inner class)
private static final long serialVersionUID = 1;
@Override
protected boolean removeEldestEntry(Map.Entry<K, CacheableObject> eldest) {
boolean retVal = MyLRUCache.this.currentCacheSize > MyLRUCache.this.cacheSizeLimit;
if (retVal) {
synchronized(theLock) {
toEvictMap.put(eldest.getKey(), eldest.getValue());
if (toEvictMap.size() > 100) {
scheduler.schedule(
new Runnable() {
@Override public void run() {
removeEvicted();
}
},
1,
TimeUnit.SECONDS
);
}
}
// eldest.getValue().createTime = 0L;
// MyLRUCache.this.currentCacheSize -= eldest.getValue().containmentCount;
// synchronized(listeners) {
// for (CacheListener<K> listener : listeners) {
// listener.evictedElement(eldest.getKey());
// }
// }
}
return retVal;
}
};
// Run a cache clean-up every 10 seconds, or whatever the user has specified
scheduler.scheduleWithFixedDelay(
new Runnable() {
@Override public void run() {
removeExpired();
}
},
this.cleanupDelay,
this.cleanupDelay,
TimeUnit.SECONDS
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MyLRUCache(int cacheSizeLimit, int timeToLive) {\n this(cacheSizeLimit, timeToLive, 30);\n }",
"@SuppressWarnings({\"CallToThreadStartDuringObjectConstruction\", \"SleepWhileInLoop\"})\n public MemoryCache(long timeToLive, final long timerInterval, int maxItems) {\n this.timeToLive = timeToLive * 1000;\n\n cacheMap = new LRUMap(maxItems);\n\n if (timeToLive > 0 && timerInterval > 0) {\n\n Thread t;\n t = new Thread(() -> {\n while (true) {\n try {\n Thread.sleep(timerInterval * 1000);\n } catch (InterruptedException ex) {\n }\n cleanup();\n }\n });\n\n t.setDaemon(true);\n t.start();\n }\n }",
"public MyLRUCache(int cacheSizeLimit) {\n this(cacheSizeLimit, 600);\n }",
"public LRUCache(int maxCapacity) {\n super(16, DEFAULT_LOAD_FACTOR, true);\n this.maxCapacity = maxCapacity;\n }",
"public LRUCache(int capacity) {\n cache = new LinkedHashMap<>(capacity);\n this.capacity = capacity;\n }",
"public LRUCache(int initialCapacity, int maxCapacity, float loadFactor) {\n super(initialCapacity, loadFactor, true);\n this.maxCapacity = (maxCapacity >= initialCapacity ? maxCapacity : initialCapacity);\n }",
"public LRUCache(int initialCapacity, int maxCapacity) {\n super(initialCapacity, 0.75f, true);\n this.maxCapacity = maxCapacity;\n }",
"public LRU_cache(int capacity) {\n cap = capacity;\n head.next = tail;\n tail.prev = head;\n }",
"public MyLRUCache(int capacity) {\n\t\tthis.capacity = capacity;\n\t}",
"private void initializeCache(int cacheSize){\n \t\tlruCache = new LRUCache(cacheSize);\n \t}",
"public LRUCache(int capacity) {\n this.capacity = capacity;\n cache = new HashMap<Integer, DoubleListNode>();\n head = new DoubleListNode(-1,-1); //dummy\n tail = new DoubleListNode(-1,-1); //dummy\n head.next = tail;\n tail.prev = head;\n }",
"public LRU(int max) {\n if (max <= 0) {\n throw new IllegalArgumentException(\"MRU cache must contain at least one entry\");\n }\n _max = max;\n }",
"public LRUCache(final int cacheSizeValue) {\n\t\tthis.cacheSize = cacheSizeValue;\n\t\tint hashTableCapacity = (int) Math.ceil(cacheSizeValue\n\t\t\t\t/ HASH_TABLE_LOAD_FACTOR) + 1;\n\t\tmap = new LinkedHashMap<K, V>(hashTableCapacity,\n\t\t\t\tHASH_TABLE_LOAD_FACTOR, true) {\n\t\t\t// (an anonymous inner class)\n\t\t\tprivate static final long serialVersionUID = 1;\n\n\t\t\t@Override\n\t\t\tprotected boolean removeEldestEntry(final Map.Entry<K, V> eldest) {\n\t\t\t\t// check if maximum size is exceeded and eldest entry needs to\n\t\t\t\t// be deleted\n\t\t\t\treturn super.size() > LRUCache.this.cacheSize;\n\t\t\t}\n\t\t};\n\t}",
"public LRUCache(int capacity) {\n super(capacity + 1, 1.0f, true); // Pass 'true' for accessOrder.\n this.capacity = capacity;\n }",
"public void setTimeToLive(int timeToLive) {\n this.timeToLive = timeToLive;\n }",
"void initialize(int maxTTISeconds, int maxTTLSeconds, int targetMaxTotalCount, boolean invalidateOnChange,\n boolean localCacheEnabled);",
"public LruSoftCache(int maxSize) {\n\t\tif (maxSize <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"maxSize <= 0\");\n\t\t}\n\t\tthis.maxSize = maxSize;\n\t\tthis.map = new LinkedHashMap<K, SoftReference<V>>(0, 0.75f, true);\n\t}",
"public LRUMapCache(int maxObjects) {\n\t\tthis.maxObjects = maxObjects;\n\t\tcacheMap = new HashMap<K, V>(maxObjects);\n\t\thitMap = new HashMap<K, Integer>();\n\t}",
"public JwkProviderBuilder cached(long cacheSize, long expiresIn, TimeUnit unit) {\n this.cached = true;\n this.cacheSize = cacheSize;\n this.expiresIn = expiresIn;\n this.expiresUnit = unit;\n return this;\n }",
"default EtcdKeysEndpointBuilder timeToLive(Integer timeToLive) {\n doSetProperty(\"timeToLive\", timeToLive);\n return this;\n }",
"public Cache(int size) {\r\n\t\t\r\n\t\tcache = new LinkedList<T>();\r\n\t\tmaxStorage = size;\r\n\t}",
"public FileLRUCache(int maxSize, int maxFileSize, long timeout) {\n\t\tsuper(maxSize, maxFileSize, timeout);\n\t}",
"public ICache(int delay, int size, String name) {\n this(null, delay, size, name);\n }",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"default EtcdKeysEndpointBuilder timeToLive(String timeToLive) {\n doSetProperty(\"timeToLive\", timeToLive);\n return this;\n }",
"public Builder setTtl(long value) {\n bitField0_ |= 0x00000008;\n ttl_ = value;\n onChanged();\n return this;\n }",
"public Cache(Integer size) {\n this.size = size;\n recentlyUsed = new ArrayList<K>();\n cache = new HashMap<>();\n }",
"private static Cache<DHTKey, LruRetentionInfo> buildEmptyCacheWithCapacity(long capacityBytes) {\n return Caffeine.newBuilder().weigher(cacheWeigher).maximumWeight(capacityBytes).recordStats().build();\n }",
"public void setTimeToLive(long value) {\n this.timeToLive = value;\n }",
"public void set(int curtTime, int key, int value, int ttl) {\n int expire = ttl == 0 ? -1 : curtTime + ttl - 1;\n Element elem = new Element(value, expire);\n cache.put(key, elem);\n }",
"private Cache configureCache(MemoryStoreEvictionPolicy evictionPolicy) {\n\t\tCacheConfiguration cacheConfiguration = new CacheConfiguration(\n\t\t\t\t\"evictionCache\", 2);\n\t\t// set FIFO eviction policy\n\t\tcacheConfiguration\n\t\t\t\t.setMemoryStoreEvictionPolicyFromObject(evictionPolicy);\n\t\t// set time to idle time\n\t\tcacheConfiguration.setTimeToIdleSeconds(300);\n\t\t// set time to live time\n\t\tcacheConfiguration.setTimeToLiveSeconds(600);\n\n\t\tCacheManager cacheManager = CacheManager.create();\n\t\t// create a new cache\n\t\tCache memoryCache = new Cache(cacheConfiguration);\n\t\tcacheManager.addCache(memoryCache);\n\t\tCache evictionCache = cacheManager.getCache(\"evictionCache\");\n\t\tevictionCache.removeAll();\n\t\treturn evictionCache;\n\t}",
"public AddressCacheImplementation(float cacheTime) {\n\t\t// constructor allows the linkedlist within LinkedHashMap to maintain\n\t\t// order\n\t\t// with respect to calls to \"get\", \"put\" and \"putAll\". (i.e. maintaining\n\t\t// the most recently accessed/inserted elements at the front of the\n\t\t// cache)\n\t\tmInetAddressList = new LinkedHashMap<>(10, 0.75f, true);\n\n\t\t// element expiration time (TTL)\n\t\tmCacheTime = cacheTime;\n\n\t\t// zero initial permits\n\t\t// first in, first out distribution of permits as they become available\n\t\tmInetAddressAvailableSemaphore = new Semaphore(0, true);\n\t\tmIsClosed = false;\n\n\t\t// create a cleanup task and schedule it to start after 5 seconds, then\n\t\t// run\n\t\t// every 5 seconds\n\t\tmCleanupTask = new CleanupTask();\n\t\tTimer taskTimer = new Timer();\n\t\ttaskTimer.scheduleAtFixedRate(mCleanupTask, 5000, 5000);\n\t}",
"public ImcacheCacheManager() {\n this(CacheBuilder.heapCache());\n }",
"public Cache createCache() throws Exception {\n return createCache(maxEntries, DEFAULT_CACHE_CLASSNAME);\n }",
"public LRUMap(int maximumSize){\n\t\tsuper(maximumSize+1,0.75f,true);\n\t\tthis.maximumSize = maximumSize;\n\t}",
"public static LRUResourceCache getCache(String contextName) {\n LRUResourceCache lruCache = null;\n ConcurrentHashMap<String, LRUResourceCache> cacheMap = RuntimeData.getCacheMap();\n KernelProps conf = KernelProps.getInstance();\n \n if (cacheMap.containsKey(contextName)) {\n lruCache = (LRUResourceCache) cacheMap.get(contextName);\n } else {\n lruCache = new LRUResourceCache(conf.getInitialCacheSize(), conf.getCacheLoadFactor(), conf.getCacheCapacity());\n cacheMap.put(contextName, lruCache);\n }\n return lruCache;\n }",
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"public MLNKVMemoryCache(String name) {\n this.name = name;\n LRUCountLimit = 10000;\n FIFOCountLimit = 1000;\n memorySizeLimit = 100 << 20;\n releaseOnMainThread = false;\n\n useFIFO = true;\n useLRU = true;\n\n weakMap = new HashMap<>();\n LRUCache = new MLNKVCache();\n FIFOCache = new MLNKVCache();\n\n LRUCache.releaseOnMainThread = releaseOnMainThread;\n FIFOCache.releaseOnMainThread = releaseOnMainThread;\n }",
"public static void main(String args[]){\n LRUCache cache = new LRUCache(2);\n\n cache.put(1, 1);\n cache.put(2, 2);\n System.out.println(cache.get(1)); // returns 1\n cache.put(3, 3); // evicts key 2\n System.out.println(cache.get(2)); // returns -1 (not found)\n cache.put(4, 4); // evicts key 1\n System.out.println(cache.get(1)); // returns -1 (not found)\n System.out.println(cache.get(3)); // returns 3\n System.out.println(cache.get(4)); // returns 4\n }",
"private static InternalCacheConfig defaultTimestampsCacheConfig() {\n InternalCacheConfig cacheConfig = new InternalCacheConfig();\n cacheConfig.maxIdle = Time.forever();\n cacheConfig.objectCount = -1;\n return cacheConfig;\n }",
"public static DiskLruImageCache openCache(Context context, File cacheDir, long maxByteSize)\n {\n // If the cache directory is not yet exist, create one\n if (!cacheDir.exists())\n {\n cacheDir.mkdir();\n }\n\n if (cacheDir.isDirectory() && cacheDir.canWrite())\n {\n return new DiskLruImageCache(cacheDir, maxByteSize);\n }\n\n return null;\n }",
"GlobalSecurityConfigurationBuilder securityCacheTimeout(long securityCacheTimeout);",
"public CCache (String name, int initialCapacity)\n\t{\n\t\tthis (name, initialCapacity, 120);\n\t}",
"public interface Cache<T> {\n\n /**\n * Put the object in the cache with the given <code>key</code>.\n * <p>\n * The object is stored for the default configured time, depending on the\n * cache implementation. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n void put(@NonNull String key, @NonNull T value);\n\n /**\n * Put the object in the cache with the given <code>key</code> for the\n * given <code>duration</code>.\n * <p>\n * The object is stored for the requested duration. See general remarks about cache evictions.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param duration The (not null) duration to store the object for.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull Duration duration);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull LocalDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for until\n * <code>expiresAt</code> has come.\n * <p>\n * The object is stored and should be removed when <code>expiresAt</code> had come.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n * @param expiresAt The (not null) expiry time.\n */\n void put(@NonNull String key, @NonNull T value, @NonNull ZonedDateTime expiresAt);\n\n /**\n * Put the object in the cache with the given <code>key</code> for ever.\n * <p>\n * The object is stored and should never be removed. This should overrule configured default\n * expiry time for objects put in the cache. However, the object may still be evicted from\n * the cache, for instance for memory reasons.\n * <p>\n * This method calls Duration.ofMillis(Long.max()) and passes it to the put(key, value, Duration duration).\n * So this method does not persist eternally, but rather persists for a long time.\n *\n * @param key The (not null) key to store the object under.\n * @param value The (not null) object to store.\n */\n default void putEternally(@NonNull final String key, @NonNull final T value) {\n put(key, value, Duration.ofMillis(Long.MAX_VALUE));\n }\n\n /**\n * Retrieve the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The value, or <code>null</code> if the object is not found.\n */\n T get(@NonNull String key);\n\n /**\n * Retrieve an optional for the object stored under the <code>key</code>.\n *\n * @param key The (never null) key to retrieve the value with.\n * @return The <code>Optional</code> for the value.\n */\n default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }\n\n /**\n * Remove the value associate with the <code>key</code>.\n *\n * @param key The key to remove.\n */\n void remove(@NonNull String key);\n\n}",
"public void setTtl(int ttl) {\n this.ttl = ttl;\n }",
"AgentPolicyBuilder setMaxCacheAgeMs(long maxCacheAgeMs);",
"public Cache() {\n this(null);\n }",
"@Nonnull\n\t\tpublic Builder setTtl(@Nonnull Time ttl) {\n\t\t\tthis.ttl = ttl;\n\t\t\treturn this;\n\t\t}",
"public void setTimeToLiveSeconds(int timeToLiveSeconds) {\n this.timeToLiveSeconds=timeToLiveSeconds;\n }",
"void createCache(String cacheName, Set<CloudCacheStrategy> strategies);",
"public HeapCacheBuilder expiry(final long expiry) {\n checkPositive(expiry, \"expiry must be positive\");\n this.expiry = expiry;\n return this;\n }",
"public void setTtl(Integer ttl) {\n this.ttl = ttl;\n }",
"default Builder withIdleTimeout(int timeout) {\n if (timeout == 0) {\n return makePermanent();\n } else {\n return makeTemporary(timeout);\n }\n }",
"@Test\n public void expiry10m() {\n Cache<Integer, Integer> c = new Cache2kBuilder<Integer, Integer>() {}\n .expireAfterWrite(10, TimeUnit.MINUTES)\n /* ... set loader ... */\n .build();\n target.setCache(c);\n DefaultResiliencePolicy p = extractDefaultPolicy();\n assertEquals(TimeUnit.MINUTES.toMillis(10), p.getResilienceDuration());\n assertEquals(TimeUnit.MINUTES.toMillis(10), p.getMaxRetryInterval());\n assertEquals(TimeUnit.MINUTES.toMillis(1), p.getRetryInterval());\n }",
"public OldOldCache()\n {\n this(DEFAULT_UNITS);\n }",
"public MRUCache(CacheDataFactory<K, V> fact) {\r\n this(DEFAULTSIZE, fact, null);\r\n }",
"public BoundedCache( final int cacheSize ) {\n mCacheSize = cacheSize;\n }",
"@Override\n default UserpostPrx ice_locatorCacheTimeout(int newTimeout)\n {\n return (UserpostPrx)_ice_locatorCacheTimeout(newTimeout);\n }",
"@Override\n public LocalIntCacheStream timeout(long timeout, TimeUnit unit) {\n return this;\n }",
"public AddressCacheImpl() {\n\t\tthis(CACHE_SIZE_DEFAULT, 0L);\n\t}",
"public SearchCache() {\n this(CAPACITY, new Ticker());\n }",
"public OldOldCache(int cUnits, int cExpiryMillis)\n {\n this(cUnits, cExpiryMillis, DEFAULT_PRUNE);\n }",
"@Override\n default ManagerPrx ice_locatorCacheTimeout(int newTimeout)\n {\n return (ManagerPrx)_ice_locatorCacheTimeout(newTimeout);\n }",
"public TransactionConfiguration cacheStopTimeout(long l) {\n this.cacheStopTimeout = l;\n return this;\n }",
"Builder withCacheConcurrency(int concurrency);",
"private static OkHttpClient createCachedClient(final Context context) {\n File httpCacheDirectory = new File(context.getCacheDir(), \"cache_file\");\n Cache cache = new Cache(httpCacheDirectory, 20 * 1024 * 1024);\n OkHttpClient okHttpClient = new OkHttpClient.Builder().addNetworkInterceptor(new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request originalRequest = chain.request();\n String cacheHeaderValue = isNetworkAvailable(context)\n ? \"public, max-age=2419200\"\n : \"public, only-if-cached, max-stale=2419200\";\n Request request = originalRequest.newBuilder().build();\n Response response = chain.proceed(request);\n return response.newBuilder()\n .removeHeader(\"Pragma\")\n .removeHeader(\"Cache-Control\")\n .header(\"Cache-Control\", cacheHeaderValue)\n .build();\n }\n }).cache(cache).build();\n return okHttpClient;\n }",
"private DiskLruImageCache(File cacheDir, long maxByteSize)\n {\n this.cacheDirectory = cacheDir;\n this.maxCacheByteSize = maxByteSize;\n }",
"public void put(String key, Object value, int time) {\n customCache.put(key, new TimeExpiredObject(value, time));\n }",
"public Builder setMemcacheExpiration(Expiration memcacheExpiration) {\n this.memcacheExpiration = memcacheExpiration;\n return this;\n }",
"public HotrodCacheFactory() {\n }",
"private boolean isExpired(CacheableObject value) {\n if (value == null) {\n return false;\n } else {\n return System.currentTimeMillis() - value.createTime > timeToLive;\n }\n }",
"@Override\n default IServerPrx ice_locatorCacheTimeout(int newTimeout)\n {\n return (IServerPrx)_ice_locatorCacheTimeout(newTimeout);\n }",
"private void addTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n // insert entry into list\n int index = 0;\n while (index < timeEntries.size())\n {\n SoftReference<TimeEntry> softReference = timeEntries.get(index);\n if ((softReference != null) && softReference.get().spentOn.isBefore(timeEntry.spentOn))\n {\n break;\n }\n index++;\n }\n timeEntries.add(index,new SoftReference<TimeEntry>(timeEntry));\n }\n }",
"public ArticleListAdapter(LruCache<String, Bitmap> cache) {\n this.mLruCache = cache;\n }",
"public InMemoryResponseCache() {\n\t\tthis( 250*1024 ); // 250 KB cache\n\t}",
"public Cache createCache(int cacacity, String className) \n throws Exception {\n\n // use the context class loader to load class so that any\n // user-defined classes in WEB-INF can also be loaded.\n ClassLoader cl = Thread.currentThread().getContextClassLoader();\n Class cacheClass = cl.loadClass(className);\n\n Cache cacheImpl = (Cache)cacheClass.newInstance();\n cacheImpl.init(maxEntries, cacheProps);\n\n return cacheImpl;\n }",
"public OldOldCache(int cUnits)\n {\n this(cUnits, DEFAULT_EXPIRE);\n }",
"@Test\n\tpublic void test3() throws InterruptedException {\n\t\tDeadElementCallBack<String, Integer> callback = new DeadElementCallBack<String, Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic void notify(String key, Integer elements) {\n\t\t\t}\n\t\t}; \n\t\tLRUCache<String, Integer> cache = new LRUCache<String, Integer>(2000, 2, callback);\n\t\tcache.put(\"hello\", 1);\n\t\tcache.put(\"yo\", 2);\n\t\tcache.put(\"hola\", 4);\n\t\tThread.sleep(1500);\n\t\tcache.get(\"yo\"); // Using a value.\n\t\tThread.sleep(1000);\n\t\tcache.put(\"sup\", 3);\n\t\tassertTrue(cache.size() == 3);\n\t\tassertTrue(cache.get(\"sup\") != null);\n\t\tassertTrue(cache.get(\"yo\") != null);\n\t}",
"public FifoUniqueKeyCachedStorage(int size, String hostname, int port) {\n super(hostname, port);\n cacheSize = size;\n cacheMap = new LinkedHashMap<String, String>(size, 0.75f, false) {\n\n @Override\n protected boolean removeEldestEntry(Map.Entry<String, String> eldest) {\n return (size() > cacheSize);\n }\n };\n }",
"@Test\n public void testPutOverrideTTL() throws Exception {\n long beforeCreated = System.currentTimeMillis();\n Thread.sleep(10);\n String originalString = \"The rain in Spain falls mainly on the plain\";\n ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(originalString.getBytes());\n\n assertEquals(404, HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\").getResponseCode());\n Header header = new Header(\"ehcacheTimeToLiveSeconds\", \"10\");\n int status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n HttpURLConnection urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(200, urlConnection.getResponseCode());\n\n Thread.sleep(15000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(404, urlConnection.getResponseCode());\n\n header = new Header(\"ehcacheTimeToLiveSeconds\", \"garbage\");\n status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n //Should have not parsed\n Thread.sleep(15000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(200, urlConnection.getResponseCode());\n\n\n header = new Header(\"ehcacheTimeToLiveSeconds\", null);\n status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n //Should have not parsed\n Thread.sleep(15000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(200, urlConnection.getResponseCode());\n\n //the header is case insensitive\n header = new Header(\"EhcachetImeToLiveSeconds\", \"1\");\n status = HttpUtil.put(\"http://localhost:9090/ehcache/rest/sampleCache2/1\", \"text/plain\", byteArrayInputStream, header);\n assertEquals(201, status);\n\n Thread.sleep(5000);\n urlConnection = HttpUtil.get(\"http://localhost:9090/ehcache/rest/sampleCache2/1\");\n assertEquals(404, urlConnection.getResponseCode());\n\n\n }",
"public void setTTL(int t) {\n\t\tthis.ttl = t;\n\t}",
"Builder withCacheSizeInMiB(int sizeInMiB);",
"public MRUCache(int size, CacheDataFactory<K, V> fact ) {\r\n this(size,fact,null);\r\n }",
"public Builder clearTtl() {\n bitField0_ = (bitField0_ & ~0x00000008);\n ttl_ = 0L;\n onChanged();\n return this;\n }",
"public Builder setSoftTtl(long value) {\n bitField0_ |= 0x00000010;\n softTtl_ = value;\n onChanged();\n return this;\n }",
"public static void main(String[] args) {\n\t\tLRUCache_HMAPnLL LRUCache = new LRUCache_HMAPnLL(10);\r\n\t\tLRUCache.add(5,\"FIVE\");\r\n\t\t\r\n\t}",
"public void setTimeToLiveSeconds(String timeToLiveSeconds) {\n try {\n setTimeToLiveSeconds(Integer.parseInt(timeToLiveSeconds));\n }\n catch (Exception exception) {\n System.out.println(\"AuthStorageSession.setTimeToLiveSeconds: \"+exception);\n setTimeToLiveSeconds(-1);\n }\n }",
"@Test\n public void eternal_retry0s() {\n Cache<Integer, Integer> c = new Cache2kBuilder<Integer, Integer>() {}\n .eternal(true)\n .retryInterval(0, TimeUnit.SECONDS)\n /* ... set loader ... */\n .build();\n target.setCache(c);\n assertTrue(extractHandler() instanceof TimingHandler.EternalImmediate);\n }",
"private ConfigurationBuilder customizeEviction(ConfigurationBuilder currentBuilder, Configuration configuration)\n {\n ConfigurationBuilder builder = currentBuilder;\n\n EntryEvictionConfiguration eec =\n (EntryEvictionConfiguration) getCacheConfiguration().get(EntryEvictionConfiguration.CONFIGURATIONID);\n\n if (eec != null && eec.getAlgorithm() == EntryEvictionConfiguration.Algorithm.LRU) {\n if (eec.containsKey(LRUEvictionConfiguration.MAXENTRIES_ID)) {\n int maxEntries = ((Number) eec.get(LRUEvictionConfiguration.MAXENTRIES_ID)).intValue();\n if (configuration.eviction() == null || configuration.eviction().strategy() != EvictionStrategy.LRU\n || configuration.eviction().maxEntries() != maxEntries) {\n builder = builder(builder, null);\n builder.eviction().strategy(EvictionStrategy.LRU);\n builder.eviction().maxEntries(maxEntries);\n }\n }\n\n if (eec.getTimeToLive() > 0) {\n long maxIdle = eec.getTimeToLive() * 1000L;\n if (configuration.expiration() == null || configuration.expiration().maxIdle() != maxIdle) {\n builder = builder(builder, null);\n builder.expiration().maxIdle(eec.getTimeToLive() * 1000L);\n }\n }\n }\n\n return builder;\n }",
"@Test\n public void eternal_retry10s() {\n Cache<Integer, Integer> c = new Cache2kBuilder<Integer, Integer>() {}\n .eternal(true)\n .retryInterval(10, TimeUnit.SECONDS)\n /* ... set loader ... */\n .build();\n target.setCache(c);\n DefaultResiliencePolicy p = extractDefaultPolicy();\n assertEquals(0, p.getResilienceDuration());\n assertEquals(TimeUnit.SECONDS.toMillis(10), p.getMaxRetryInterval());\n assertEquals(TimeUnit.SECONDS.toMillis(10), p.getRetryInterval());\n }",
"protected void addTileToCache(ElevationTile tile, BufferWrapper elevations)\n {\n if (tile.getLevelNumber() == 0)\n this.levelZeroTiles.put(tile.getTileKey(), tile);\n else\n this.getMemoryCache().add(tile.getTileKey(), tile, elevations.getSizeInBytes());\n }",
"public interface ApiKeyThrottlingCacheService {\n\t \n\tlong incr(String key, int by, long defaul, int expiration) throws NullPointerException;\n\tboolean isCacheAvailable();\n\tString getCacheHost();\n\tvoid setCacheHost(String cacheHost);\n\tString getCachePort();\n\tvoid setCachePort(String cachePort);\n\t\n}",
"public JwkProviderBuilder() {\n this.cached = true;\n this.expiresIn = 10;\n this.expiresUnit = TimeUnit.HOURS;\n this.cacheSize = 5;\n }",
"WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);",
"public interface ILeveledCache<K, V> extends ICache<K, V>{\n void reCache() throws IOException, ClassNotFoundException;\n Map<K, V> add(K key, V object) throws IOException, ClassNotFoundException;\n List<K> sortedKeys();\n int maxLevel1size();\n Set<K> level1keys();\n}",
"public interface CacheManager {\n\n void init();\n\n void destroy();\n\n void del(String key);\n\n void set(String key, Object value);\n\n void set(String key, Object value, int expireTime);\n\n <T> T get(String key, Class<T> clazz);\n\n void hset(String key, String subKey, Object value);\n\n <T> T hget(String key, String subKey, Class<T> clazz);\n\n <T> Map<String, T> hget(String key, Class<T> clazz);\n\n void hrem(String key, String subKey);\n\n long hincr(String key, String subKey);\n\n void sadd(String key, Object val);\n\n boolean sisMember(String key, Object val);\n\n void srem(String key, Object val);\n\n Set<String> sget(String key);\n\n <T> Set<T> sget(String key, Class<T> clazz);\n\n void zadd(String key, Object val, double score);\n\n boolean zisMember(String key, Object val);\n\n void zrem(String key, Object val);\n\n void zrem(String key, double min, double max);\n\n void zreplace(String key, Object val, double score);\n\n double zincr(String key, Object val, double score);\n\n <T> Set<T> zget(String key, double min, double max, Class<T> clazz);\n\n Set<String> zget(String key, double min, double max);\n}",
"@Test\n\tpublic void executeTTLScenario() throws Exception {\n\t\tCacheConfiguration cacheConfiguration = new CacheConfiguration(\n\t\t\t\t\"ttlCache\", 2);\n\t\t// set FIFO eviction policy\n\t\tcacheConfiguration\n\t\t\t\t.setMemoryStoreEvictionPolicyFromObject(MemoryStoreEvictionPolicy.FIFO);\n\t\t// set time to live time to 3 seconds\n\t\tcacheConfiguration.setTimeToLiveSeconds(3);\n\n\t\tCacheManager cacheManager = CacheManager.create();\n\t\t// create a new cache\n\t\tCache memoryCache = new Cache(cacheConfiguration);\n\t\tcacheManager.addCache(memoryCache);\n\t\tCache ttlCache = cacheManager.getCache(\"ttlCache\");\n\t\tttlCache.removeAll();\n\n\t\t// save a query result to the cache\n\t\tResultRetriever resultRetriever = new ResultRetriever(\n\t\t\t\tConstants.DUMPED_NYTIMES_ENDPOINT,\n\t\t\t\tConstants.SAMPLE_CONSTRUCT_QUERY_1);\n\t\tDirectedCacheQuery directedCacheQuery = new DirectedCacheQuery(\n\t\t\t\tConstants.SAMPLE_CONSTRUCT_QUERY_1,\n\t\t\t\tConstants.DUMPED_NYTIMES_ENDPOINT);\n\t\tElement firstElement = new Element(directedCacheQuery,\n\t\t\t\tresultRetriever.retrieve());\n\t\tttlCache.put(firstElement);\n\n\t\t// get result immediately after saving it\n\t\tassertNotNull(ttlCache.get(directedCacheQuery));\n\n\t\t// sleep 3.5 seconds\n\t\tThread.sleep(3500);\n\n\t\t// get the query result after waiting for TTL value\n\t\tassertNull(ttlCache.get(directedCacheQuery));\n\n\t\t// free the cache\n\t\tttlCache.dispose();\n\t\tCacheManager.create().shutdown();\n\n\t\tThread.sleep(1000);\n\t}",
"public MRUCache(int size, CacheDataFactory<K, V> fact, CacheSource<K,V> source) {\r\n factory = fact;\r\n this.source = source;\r\n buckets = new AtomicReference[nextPrime(size + (int)(size * .15))];\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n buckets[i] = new AtomicReference<CacheData<K, V>>(null);\r\n }\r\n }",
"public CachedItemStore(int initialCapacity, final float loadFactor, int concurrencyLevel) {\n this.store = new TCConcurrentStore<L, CachedItem>(initialCapacity, loadFactor, concurrencyLevel);\n }",
"void setMaximumCacheSize(int maximumCacheSize);"
] | [
"0.77957803",
"0.653686",
"0.6355042",
"0.60015225",
"0.5867542",
"0.5779585",
"0.5762066",
"0.56275594",
"0.5597484",
"0.55494297",
"0.5518889",
"0.5485803",
"0.54313236",
"0.541524",
"0.53762096",
"0.5373898",
"0.5317905",
"0.527785",
"0.52653044",
"0.521337",
"0.5207582",
"0.5110763",
"0.5080137",
"0.5034085",
"0.5032163",
"0.50251514",
"0.5020564",
"0.5017371",
"0.49584478",
"0.49185163",
"0.4911776",
"0.48956925",
"0.48796666",
"0.48677376",
"0.4864071",
"0.4844873",
"0.48169833",
"0.48126885",
"0.47689337",
"0.475373",
"0.47419515",
"0.47380087",
"0.47235438",
"0.4721508",
"0.47193995",
"0.4688202",
"0.46773875",
"0.4668901",
"0.46648973",
"0.46592265",
"0.46527362",
"0.46391514",
"0.46178693",
"0.46004024",
"0.45951438",
"0.45713842",
"0.4569863",
"0.45622945",
"0.45595232",
"0.45481187",
"0.45192924",
"0.44948643",
"0.44834027",
"0.4457753",
"0.44545993",
"0.44465286",
"0.44340834",
"0.44225824",
"0.4380997",
"0.43735808",
"0.43623903",
"0.43574408",
"0.4344305",
"0.43203253",
"0.4319314",
"0.43159077",
"0.4310765",
"0.4305323",
"0.4305314",
"0.43000734",
"0.4289363",
"0.42850605",
"0.42811564",
"0.42797348",
"0.4278937",
"0.42667016",
"0.4257863",
"0.42550528",
"0.42499506",
"0.4242588",
"0.42412272",
"0.4222934",
"0.4205594",
"0.42031577",
"0.41948098",
"0.41895765",
"0.41845986",
"0.418282",
"0.4172134",
"0.417075"
] | 0.7136526 | 1 |
Retrieves an entry from the cache, regardless of its "Expired" status. | public V get(K key) {
CacheableObject cObj;
synchronized(theLock) {
cObj = valueMap.get(key);
}
return cObj == null ? null : cObj.cachedObject;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object get(String key) {\n\n CacheObject cacheObject = cache.get(key).get();\n if (!cacheObject.isExpired()) {\n cacheObject.updateUseTime();\n return cacheObject.getValue();\n } else {\n cache.remove(key);\n queue.add(cacheObject);\n return null;\n }\n }",
"@Override\n\tpublic V retrieve(K key) {\n\t\tcheckNullKey(key);\n\t\treadLock.lock();\n\t\ttry {\n\t\t\treturn cache.get(key);\n\t\t} finally {\n\t\t\treadLock.unlock();\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n public T get(K key) {\n synchronized (cacheMap) {\n CacheObject c = (CacheObject) cacheMap.get(key);\n\n if (c == null) {\n return null;\n } else {\n c.lastAccessed = System.currentTimeMillis();\n return c.value;\n }\n }\n }",
"public Object get(Object key) {\n Entry entry = this.cache.get(key);\n\n if (entry == null)\n return null;\n\n // move the recently accessed Entry to the head of list\n moveToHead(entry);\n return entry.value;\n }",
"public V getIfNotExpired(K key) {\n CacheableObject cObj;\n\n synchronized(theLock) {\n cObj = valueMap.get(key);\n }\n\n if (null != cObj) {\n if (isExpired(cObj)) {\n synchronized(theLock) {\n currentCacheSize -= cObj.containmentCount;\n valueMap.remove(key);\n for (CacheListener<K> listener : listeners) {\n listener.expiredElement(key);\n }\n }\n return null;\n } else {\n return cObj.cachedObject;\n }\n } else {\n return null;\n }\n }",
"public T getIfPresent()\n\t{\n\t\treturn cache.getIfPresent(KEY);\n\t}",
"public T get()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn cache.get(KEY, supplier);\n\t\t}\n\t\tcatch (ExecutionException e)\n\t\t{\n\t\t\tfinal Throwable cause = e.getCause();\n\n\t\t\t// Try to rethrow the actual exception so it's easier to understand\n\t\t\tif (cause == null)\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\telse if (cause instanceof RuntimeException)\n\t\t\t\tthrow (RuntimeException) cause;\n\t\t\telse if (cause instanceof Error)\n\t\t\t\tthrow (Error) cause;\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Unexpected error loading item into cache: \" + cause.getMessage(), cause);\n\t\t}\n\t}",
"@Override\n\tpublic synchronized Entry get(String key) {\n\t\tCacheHeader entry = mEntries.get(key);\n\t\t// if the entry does not exist, return.\n\t\tif (entry == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tFile file = getFileForKey(key);\n\t\tCountingInputStream cis = null;\n\t\ttry {\n\t\t\tcis = new CountingInputStream(new FileInputStream(file));\n\t\t\tCacheHeader.readHeader(cis); // eat header\n\t\t\tbyte[] data = streamToBytes(cis,\n\t\t\t\t\t(int) (file.length() - cis.bytesRead));\n\t\t\treturn entry.toCacheEntry(data);\n\t\t} catch (IOException e) {\n\t\t\tVolleyLog.d(\"%s: %s\", file.getAbsolutePath(), e.toString());\n\t\t\tremove(key);\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tif (cis != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcis.close();\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public Cache.Entry get(String param1) {\n }",
"@Test\n public void testCoh3710_get()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertNull(getNamedCache(getCacheName0()).get(Integer.valueOf(1)));\n }\n });\n }",
"final CacheData<K, V> getEntry(final Object key) {\r\n // validateKey the key in the buckets\r\n\r\n // synchronization is not a problem here\r\n // if someone changes or resets a key/value right before this\r\n // it will be properly handled, either it won't find a validateKey in the if or the\r\n // obj being returned will be null, that is fine and expected for a no-validateKey\r\n // then the client will just validateKey whatever data he was looking for in the buckets\r\n return getCacheData(getKeyPosition(key));\r\n }",
"public CacheEntry getEntry(String key) {\n\t\tCacheEntry entry = map.get(key);\n\t\tif (entry == null) {\n\t\t\ttry {\n\t\t\t\tCacheEntry newEntry = new CacheEntry(key);\n\t\t\t\tCacheEntry oldEntry = map.putIfAbsent(key, newEntry);\n\t\t\t\tif (oldEntry == null) {\n\t\t\t\t\tsize.incrementAndGet();\n\t\t\t\t\tcheckCapacity();\n\t\t\t\t\treturn newEntry;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn oldEntry;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\t//log.error(\"Error creating CacheItem\", e);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn entry;\n\t\t}\n\t}",
"Object getValueFromLocalCache(Object key);",
"@Override\r\n protected ICacheElement<K, V> processGet(final K key)\r\n {\r\n if (!isAlive())\r\n {\r\n log.error(\"{0}: No longer alive so returning null for key = {1}\",\r\n logCacheName, key);\r\n return null;\r\n }\r\n\r\n log.debug(\"{0}: Trying to get from disk: {1}\", logCacheName, key);\r\n\r\n ICacheElement<K, V> object = null;\r\n try\r\n {\r\n storageLock.readLock().lock();\r\n try\r\n {\r\n object = readElement(key);\r\n }\r\n finally\r\n {\r\n storageLock.readLock().unlock();\r\n }\r\n\r\n if (object != null)\r\n {\r\n hitCount.incrementAndGet();\r\n }\r\n }\r\n catch (final IOException ioe)\r\n {\r\n log.error(\"{0}: Failure getting from disk, key = {1}\", logCacheName, key, ioe);\r\n reset();\r\n }\r\n return object;\r\n }",
"@Override\n public V get(K key){\n CacheObject<K, V> cacheObject = this.cache.get(key);\n\n if (cacheObject != null){\n return cacheObject.getObject();\n }\n\n return null;\n }",
"public SafeHashMap.Entry getEntry(Object oKey)\n {\n // check if the cache needs flushing\n checkFlush();\n\n Entry entry = (Entry) getEntryInternal(oKey);\n if (entry == null)\n {\n m_stats.registerMiss();\n }\n else\n {\n m_stats.registerHit();\n entry.touch();\n }\n\n return entry;\n }",
"@Override\n public KVMessage get(String key) {\n KVMessage rtn;\n lock.lock();\n try {\n String valueInCache = cacheMap.get(key);\n // Key exist in cache.\n if (valueInCache != null) {\n rtn = new Message(KVMessage.StatusType.GET_SUCCESS, key, valueInCache, null);\n // Key does not exist in cache.\n } else {\n String valueOnDisk = loadFromDisk(key);\n // Key exists on disk.\n if (valueOnDisk != null) {\n rtn = new Message(KVMessage.StatusType.GET_SUCCESS, key, valueOnDisk, null);\n cacheMap.put(key, valueOnDisk);\n // Key does not exist on disk.\n } else {\n rtn = new Message(KVMessage.StatusType.GET_ERROR, key, null, null);\n }\n }\n } catch (IOException e) {\n rtn = new Message(KVMessage.StatusType.GET_ERROR, key, null, null);\n } finally {\n lock.unlock();\n }\n return rtn;\n }",
"@Override\n\tpublic Object get(String name, Serializable key) throws CacheException {\n\t\treturn null;\n\t}",
"protected String getFromCache(String key) throws KeyDoesntExistException {\n \tif (!map.containsKey(key)) {\n \t\tthrow new KeyDoesntExistException(\"Key not found: \" + key);\n \t}\n \tif (!usageCounter.containsKey(key)) {\n \t\tthrow new RuntimeException(\"Cache and usageCounter out of sync!\");\n \t}\n \tusageCounter.put(key, usageCounter.get(key) + 1);\n \treturn map.get(key);\n }",
"@Override\n public <T> T getEntity(Key<T> key)\n {\n // Check the session first in case we've loaded the entity in another query or 'get' then fall back to the query cache\n return session.getCache().get(key)\n .map(entity -> {\n if (logger.isTraceEnabled())\n {\n logger.trace(\"Session cache hit {0}[{1}]\", key.getType().getSimpleName(), key.getId());\n }\n\n session.getStats().cacheHit();\n stats().incHits();\n return entity;\n })\n .orElseGet(() -> queryCache.getEntity(key));\n }",
"public synchronized V getValue(K key) {\n SoftReference<V> ref = cache.get(key);\n\n // Is the key-value pair absent from the cache?\n if (ref == null) {\n return null;\n }\n\n // Is the reference to the value dead?\n V value = ref.get();\n recentlyUsed.remove(key);\n if (value == null) {\n cache.remove(key);\n } else {\n recentlyUsed.add(0, key);\n }\n return value;\n }",
"private CacheObject<K, V> getCacheObject(K key){\n return this.cache.get(key);\n }",
"public T getObject(T object) {\r\n\t\t\r\n\t\tif(cache.contains(object) == false) //if not in the cache\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Element not found.\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tcache.get(cache.indexOf(object));\r\n\t\t\treturn object;\r\n\t\t\t\r\n\t\t}\r\n\t\t \r\n\t}",
"@Cacheable(\"lastRunInfo\")\n private GeobatchRunInfo getLastRunInfoCache(String id) {\n List<GeobatchRunInfo> search = search(id);\n \n return search != null && !search.isEmpty() ? search.get(0) : null;\n }",
"@Override\n public IBasicEntity get(Class<? extends IBasicEntity> type, String key)\n throws CachingException {\n return EntityCachingServiceLocator.getEntityCachingService().get(type, key);\n }",
"public Serializable get(final Serializable key) throws BlockingCacheException {\n Mutex lock = checkLockExistsForKey(key);\n try {\n if (timeoutMillis == 0) {\n lock.acquire();\n } else {\n boolean acquired = lock.attempt(timeoutMillis);\n if (!acquired) {\n StringBuffer message = new StringBuffer(\"lock timeout attempting to acquire lock for key \")\n .append(key).append(\" on cache \").append(cache.getName());\n throw new BlockingCacheException(message.toString());\n }\n }\n final Element element = cache.get(key);\n if (element != null) {\n //ok let the other threads in\n lock.release();\n return element.getValue();\n } else {\n //don't release the read lock until we write\n return null;\n }\n } catch (InterruptedException e) {\n throw new CacheException(\"Interrupted. Message was: \" + e.getMessage());\n }\n }",
"public Object get(Object key) {\n CacheEntry entry = (CacheEntry)_hash.get(key);\n if (entry != null) {\n touchEntry(entry);\n return entry.getValue();\n } else {\n return null;\n }\n }",
"@Override\n\tpublic Object getObject(String key) {\n\t\tif (mInternalCache.contains(key)) {\n\t\t\ttry {\n\t\t\t\treturn Base64.fromString(mInternalCache.getString(key, null));\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(TAG, \"Failed to get the object from cache !\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic <T> T get(String arg0, long arg1) throws TimeoutException,\n\t\t\tInterruptedException, MemcachedException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic <T> T get(String arg0) throws TimeoutException,\n\t\t\tInterruptedException, MemcachedException {\n\n\t\treturn doGet(arg0);\n\t}",
"DNSRecord queryCache(DNSQuestion question) throws IOException {\n if (cache.containsKey(question)) {\n System.out.println(\"Answer found in cache!\");\n if (cache.get(question).timestampValid()) {\n System.out.println(\"TTL valid!\");\n return cache.get(question);\n }\n else {\n cache.remove(question);\n System.out.println(\"TTL not valid!\");\n }\n }\n return null;\n }",
"@Cacheable(cacheNames = {\"emp\"}/*,keyGenerator = \"myKeyGenerator\"*/)\n public Employee getEmp(Integer id){\n Employee empById = employeeMapper.getEmpById(id);\n System.out.println(\"id\"+id+\"开始查询了\");\n return empById;\n }",
"public Integer get(int key) {\n\t ListNode node = LRUhashtable.get(key); \n\n\t if (node == null) {\n\t return null;\n\t }\n\n\t // the item has been accessed, moved to the front of the cache\n\t moveToHead(node);\n\n\t return node.value;\n\t }",
"public Cache getCache(String name)\r\n/* 39: */ {\r\n/* 40:64 */ return (Cache)this.cacheMap.get(name);\r\n/* 41: */ }",
"public static Object getCache(String key) {\n\t\treturn getCache(key, null);\n\t}",
"public boolean inCache(String key);",
"public static Object getCache(String key) {\n return getCache(key, null);\n }",
"public static Object getCache(String key) {\n return getCache(key, null);\n }",
"CloudCache getCache(String cacheName);",
"@Override\n\tpublic V invalidateEntry(K key) {\n\t\tcheckNullKey(key);\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\treturn cache.remove(key);\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"public interface CustomCache<K, V> {\n\n /**\n * gets a value by key\n * returns null if key is expired\n *\n * @param key\n * @return\n */\n V get(K key);\n\n /**\n * puts into cache with given ttl\n *\n * @param key\n * @param value\n */\n void put(K key, V value);\n\n /**\n * averages out the non expired values in cache.\n * to be discussed in interview\n *\n * @return\n */\n double average();\n}",
"@Override\n\tpublic T retrieveItem(T obj) {\n\t\tif(cache.contains(obj)) {\n\t\t\tfor (T objInSet : cache) {\n\t\t\t\tif (objInSet.equals(obj)) {\n\t\t\t\t\treturn objInSet;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private Cache.Entry parseCache(NetworkResponse response) {\n if (response.headers.get(\"Expires\") != null\n || response.headers.get(\"Cache-Control\") != null\n || response.headers.get(\"ETag\") != null) {\n return HttpHeaderParser.parseCacheHeaders(response);\n } else {\n return null;\n }\n }",
"public IBasicEntity get(EntityIdentifier entityID) throws CachingException {\n return EntityCachingServiceLocator.getEntityCachingService()\n .get(entityID.getType(), entityID.getKey());\n }",
"public V get(Object key) {\r\n if (cacheDelegate != null) {\r\n cacheDelegate.keyLookup(key);\r\n }\r\n\r\n if (key == null) {\r\n return null;\r\n }\r\n\r\n V value;\r\n CacheData<K, V> cacheData = getEntry(key);\r\n if (cacheData != null) {\r\n // see if the key passed in matches this one\r\n if ((value = cacheData.validateKey(key, cacheDelegate)) != null) {\r\n return value;\r\n }\r\n }\r\n // if we made it here and source!=null use the passthrough\r\n if (source!=null) {\r\n value = source.get(key);\r\n put((K)key, value);\r\n return value;\r\n }\r\n return null;\r\n }",
"@Override\n public String get(String key) throws DatabaseException {\n if (key == null) {\n throw new IllegalArgumentException();\n }\n String cachedData = cache.get(key);\n if (cachedData != null) {\n return cachedData;\n }\n\n String data = this.database.get(key);\n if (data != null) {\n cache.put(key, data);\n }\n return data;\n }",
"T get(@NonNull String key);",
"@Override\n public synchronized Object get(Object key) {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n String strkey = key.toString();\n if (this.ignoreCase) {\n strkey = this.keyMap.getProperty(strkey.toLowerCase());\n if (strkey == null)\n return null;\n }\n return super.get(strkey);\n }",
"@Cacheable(value = \"planet\", key = \"#id\", unless = \"#result == null\")\n public Planet findById(String id){\n try{\n Optional<Planet> planetOptional = planetRepository.findById(id);\n return planetOptional.orElse(null);\n }\n catch (Exception ex){\n throw ex;\n }\n }",
"public void cacheResult(DataEntry dataEntry);",
"@Test\n public void retrievedContractor_whenRetrievedAgain_shouldBeAvailableInCache() {\n assertEquals(Optional.of(person), Optional.ofNullable(cacheManager.getCache(\"person2\"))\n .map(cache -> cache.get(\"17a36637-04d4-4357-9c6b-10a755dbbcdd\", Person.class)));\n }",
"public Node<E> getNodeFromCache() {\n if (this.cacheSize == 0) {\n return null;\n }\n Node<E> node = this.firstCachedNode;\n this.firstCachedNode = node.next;\n node.next = null;\n this.cacheSize--;\n return node;\n }",
"public CacheEntry() {\n response = null;\n }",
"private static AvailEntry getAvailEntry(String key) {\n AvailEntry ae = null;\n Map lcache = null;\n if (GET_AVAILABLE_CACHE != null) {\n lcache = (Map) GET_AVAILABLE_CACHE.get();\n if (lcache != null) {\n ae = (AvailEntry) lcache.get(key);\n }\n }\n\n if (ae == null) {\n ae = new AvailEntry(key);\n if (lcache == null) {\n lcache = new HashMap();\n lcache.put(key, ae);\n GET_AVAILABLE_CACHE = new SoftReference(lcache);\n } else {\n lcache.put(key, ae);\n }\n }\n\n return ae;\n }",
"public T get( @Nonnull final Object... args )\n {\n if ( Arez.shouldCheckApiInvariants() )\n {\n apiInvariant( this::isNotDisposed,\n () -> \"Arez-0161: MemoizeCache named '\" + _name + \"' had get() invoked when disposed.\" );\n }\n return getComputableValue( args ).get();\n }",
"protected abstract S get(E entry);",
"T get(String key);",
"protected Cache cache(RequestContext ctx) {\n String serviceId = serviceId(ctx);\n if (serviceId != null) {\n return cacheManager.getCache(serviceId);\n }\n return null;\n }",
"public CacheEntry searchWithCache(String name) {\n CacheEntry entry = cacheHit(name);\n \n if (entry != null) return entry;\n \n // we grab serial number first; the worst that will happen is we cache a later\n // update with an earlier serial number, which would just flush anyway\n Object token = getCacheToken();\n DynamicMethod method = searchMethodInner(name);\n \n return method != null ? addToCache(name, method, token) : addToCache(name, UndefinedMethod.getInstance(), token);\n }",
"@Override\n public V get( final K name )\n {\n final ICacheElement<K, V> element = this.getCacheControl().get( name );\n\n return ( element != null ) ? element.getVal() : null;\n }",
"public int get(int curtTime, int key) {\n if (!cache.containsKey(key)) {\n return Integer.MAX_VALUE;\n }\n Element elem = cache.get(key);\n if (elem.expire >= curtTime || elem.expire == -1) {\n return elem.value;\n } else {\n return Integer.MAX_VALUE;\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic <T> T get(Class<T> clazz, String key) {\n\t\treturn (T) (cacheMap.get(clazz) == null ? null : cacheMap.get(clazz).get(key));\n\t}",
"public V fetch(String name) {\n return mCache.fetch(name, mSource);\n }",
"@Override\n public ICacheElement<K, V> getCacheElement( final K name )\n {\n return this.getCacheControl().get( name );\n }",
"Optional<T> getItem(final long pKey);",
"public String hget(final String key, final String field, int ttl) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n String res = jedis.hget(key, field);\n if (ttl > 0) {\n jedis.expire(key, ttl);\n }\n return res;\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }",
"@Override\n public T get() {\n long nanos = this.expirationNanos;\n long now = nanoTime();\n if (nanos == 0L || now - nanos >= 0L) {\n synchronized(this) {\n if (nanos == this.expirationNanos) {\n ReturnValue<T> t = this.delegate.get();\n if (t.canMemoize())\n this.value = t.value();\n else\n return t.value();\n\n this.expirationNanos = now + this.durationNanos;\n return t.value();\n }\n }\n }\n return this.value;\n }",
"public PlayerContinuousSnap getCache(Player player) {\n\t\treturn this.cached.get(player);\n\t}",
"@Override\n\tpublic CacheResponse get(URI uri, String rqstMethod, Map<String, List<String>> rqstHeaders) throws IOException {\n\t\tSystem.err.println(\"enter MemoryCache.get()\");\n\t\treturn new CacheResponseImpl();\n\t}",
"public int get(int key) {\n ListNode node = hashtable.get(key);\n \n if(node == null){\n return -1;\n }\n \n // Item has been accessed. Move to the front of the cache\n moveToHead(node);\n return node.value;\n }",
"public T get(K key);",
"public V getIfPresent(Object key) {\n V result = null;\n MapSegment.Entry<K, V> entry = segment.getEntry(key);\n\n if (null != entry) {\n entry.setAccessTime(ticker.nextTick());\n result = entry.getValue();\n }\n return result;\n }",
"public Object get(String methodName, CallCacheArgs args) {\n Map<CallCacheArgs, Object> cacheArgs = this.cache.get(methodName);\n return cacheArgs == null ? null : cacheArgs.get(args);\n }",
"T get(String key) throws IOException;",
"public T get() {\n return cache.getUnchecked(clazz);\n }",
"public long retrieve(UUID id) {\n if (id == null) {\n return 0;\n\n } else {\n Long cachedValue = cache.getIfPresent(id);\n if (cachedValue != null && cachedValue > 0) {\n return cachedValue;\n } else {\n return metrics.time(\n StoreMetrics.OP.SERIAL_OF,\n () -> {\n try {\n Long res =\n jdbcTemplate.queryForObject(\n PgConstants.SELECT_SER_BY_ID, new Object[] {id}, Long.class);\n if (res != null && res > 0) {\n cache.put(id, res);\n return res;\n }\n } catch (EmptyResultDataAccessException ignore) {\n // ignore\n }\n return 0L;\n });\n }\n }\n }",
"@CheckForNull\n\t@SuppressFBWarnings(value = \"RV_RETURN_VALUE_IGNORED_BAD_PRACTICE\")\n\tpublic V get(@Nonnull String key) {\n\t\tFile jsonFile = new File(mCacheLocation, key);\n\t\tif (!jsonFile.exists()) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\treturn mObjectMapper.readValue(jsonFile, mModelClass);\n\t\t} catch (IOException e) {\n\t\t\tLogUtils.logException(TAG, \"Exception when reading \" + key, e);\n\t\t\tjsonFile.delete(); // try to delete damaged file\n\t\t\treturn null;\n\t\t}\n\t}",
"Cache<String, YourBean> getMyCache() {\n\treturn myCache;\n }",
"public Object get() {\n while(isLocked() ) {\n try {\n Thread.sleep(10);\n }\n catch(InterruptedException ie) {\n // do nothing\n }\n }\n \n Object retVal = getHead();\n LAST_READ_TIME = now();\n return retVal;\n }",
"@Override\n\tpublic <T> T getAndTouch(String arg0, int arg1) throws TimeoutException,\n\t\t\tInterruptedException, MemcachedException {\n\t\treturn null;\n\t}",
"@Test\n public void testCoh3710_containsKey()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertFalse(getNamedCache(getCacheName0()).containsKey(Integer.valueOf(1)));\n }\n });\n }",
"protected net.sf.ehcache.Ehcache getCache() {\n return cache;\n }",
"@Override\n\tpublic <T> GetsResponse<T> gets(String arg0) throws TimeoutException,\n\t\t\tInterruptedException, MemcachedException {\n\t\treturn null;\n\t}",
"private static Cache getCacheInstance() {\r\n\t\tif( cache == null ) {\r\n\t\t\ttry {\r\n\t\t\t\tCacheFactory cf = CacheManager.getInstance().getCacheFactory();\r\n\t\t\t\tcache = cf.createCache(Collections.emptyMap());\r\n\t\t\t} catch (CacheException e) {\r\n\t\t\t\tlog.log(Level.SEVERE, \"can not initialize cache\", e);\r\n\t\t\t\tcache = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cache;\r\n\t}",
"@Override\n public Object getResource(String resourceKey)\n {\n synchronized(InProcessCache.class) {\n if(!hasResource(resourceKey)) {\n return null;\n }\n\n WeakReference reference = (WeakReference)_cache.get(resourceKey);\n return reference.get();\n }\n }",
"@Override\n\tpublic Bitmap fetch(String key) {\n\t\treturn (Bitmap) mMemoryCache.get(key);\n\t}",
"Object get(String key);",
"Object get(String key);",
"V getEntry(K key);",
"public boolean isCached() {\n return true;\n }",
"protected Entity cacheLoadOrStore(Entity entity) {\n Entity cachedEntity = entityCache.findInCache(entity.getClass(), entity.getId());\n if (cachedEntity != null) {\n return cachedEntity;\n }\n entityCache.put(entity, true);\n return entity;\n }",
"public V getElementByKey(K key) {\n\t\tif (cacheMap.containsKey(key)) {\n\t\t\telementHit(key);\n\t\t}\n\t\treturn cacheMap.get(key);\n\t}",
"public void cacheResult(ua.org.gostroy.guestbook.model.Entry3 entry3);",
"public Drawable getDrawableCache(Integer cacheKey)\n {\n synchronized (mLinkedHashMap)\n {\n Drawable image;\n // Get file from cache\n String file = mLinkedHashMap.get(cacheKey);\n if (file != null)\n {\n image = Drawable.createFromPath(file);\n Log.i(\"DiskLruCache\", \"DiskCacheHit\");\n return image;\n }\n else\n {\n // Construct existing file path\n String cacheKeyStr = String.valueOf(cacheKey);\n String existingFile = createFilePath(cacheDirectory, cacheKeyStr);\n // Get the file using the constructed file path\n assert existingFile != null;\n File existFile = new File(existingFile);\n if (existFile.exists())\n {\n // If the file exists, we will store the the key in reference list\n referenceAdd(cacheKey, existingFile);\n return Drawable.createFromPath(existingFile);\n }\n }\n return null;\n }//synchronized (mLinkedHashMap)\n }",
"public static Long getCacheValue(int distanceLeft, int cacheNumber){\n SuperSavvyTrieHelper2 internalCache = cache.get(cacheNumber).get(distanceLeft);\n if (internalCache != null){\n //long eTime = System.nanoTime();\n //hitCounts[cacheNumber]++;\n //statCollector.addTime(cacheNumber + \": getCacheValueHit\", eTime - sTime);\n return internalCache.get();\n }\n //long eTime = System.nanoTime();\n //missCounts[cacheNumber]++;\n //statCollector.addTime(cacheNumber + \": getCacheValueMiss\", eTime - sTime); //when there's a miss adding nulls to the arraylist takes a long time since they are added on get rather than put\n return null;\n }",
"public V get(final K key) {\n expunge();\n final int hash = hash(key);\n final int index = index(hash, entries.length);\n Entry<K, V> entry = entries[index];\n while (entry != null) {\n if (entry.hash == hash && key == entry.get()) {\n return entry.value;\n }\n entry = entry.nextEntry;\n }\n return null;\n }",
"@Override\n\tpublic <T> GetsResponse<T> gets(String arg0, long arg1)\n\t\t\tthrows TimeoutException, InterruptedException, MemcachedException {\n\t\treturn null;\n\t}",
"@Test\n public void testPutGet() {\n cache.put(\"A\", \"first\");\n cache.put(\"C\", \"second\");\n cache.put(\"C\", \"third\");\n \n assertEquals(\"first\", cache.get(\"A\"));\n assertEquals(\"third\", cache.get(\"C\"));\n }",
"public static <T> T getCacheObject(final String key, Class<T> type) {\n if (isNull(key, type)) {\n throw new NullPointerException(\"You can not use a null\" + (key == null ? \"key\" : \"type\"));\n }\n if (!cacheKeys.contains(key)) {\n return null;\n }\n T value;\n try {\n value = type.cast(cacheValues.get(cacheKeys.indexOf(key)).getValue());\n } catch (ClassCastException exception) {\n exception.printStackTrace();\n throw new ClassCastException(\"Invalid type \" + type.getName() + \" for value!\");\n }\n return value;\n }",
"@Override\n public CacheAPI getCacheAPI() {\n return null;\n }"
] | [
"0.74555403",
"0.7291132",
"0.695521",
"0.6945402",
"0.68400556",
"0.6814867",
"0.6814306",
"0.6752627",
"0.67244124",
"0.6706891",
"0.65965295",
"0.6549518",
"0.6490905",
"0.6466669",
"0.6460047",
"0.63738453",
"0.63622206",
"0.6301591",
"0.6269601",
"0.6264993",
"0.62283665",
"0.6188963",
"0.6164109",
"0.6136297",
"0.6122026",
"0.6119529",
"0.6091633",
"0.60775536",
"0.607199",
"0.6032067",
"0.60240304",
"0.60167974",
"0.6003483",
"0.59769756",
"0.59686273",
"0.5940692",
"0.59204894",
"0.59204894",
"0.5917147",
"0.5902023",
"0.5879448",
"0.58730006",
"0.5871986",
"0.5856255",
"0.58552206",
"0.583533",
"0.5833966",
"0.58161694",
"0.58020586",
"0.57917154",
"0.5791262",
"0.5785366",
"0.57749176",
"0.57701546",
"0.5763301",
"0.57334256",
"0.5721285",
"0.571242",
"0.5707329",
"0.5705516",
"0.57035226",
"0.5697267",
"0.56891966",
"0.56876504",
"0.56844634",
"0.567752",
"0.5672755",
"0.565999",
"0.565495",
"0.5647854",
"0.5631548",
"0.56283295",
"0.5627505",
"0.56184953",
"0.56179994",
"0.5608206",
"0.55985546",
"0.559586",
"0.5577453",
"0.55746394",
"0.5557171",
"0.555277",
"0.555192",
"0.55462044",
"0.55430275",
"0.5530869",
"0.55020213",
"0.55020213",
"0.5494446",
"0.54906774",
"0.5487951",
"0.54798985",
"0.5479596",
"0.5476721",
"0.5474234",
"0.54644835",
"0.5463214",
"0.54582244",
"0.54563606",
"0.5453216"
] | 0.58756363 | 41 |
Retrieves an entry from the cache. The retrieved entry becomes the MRU (most recently used) entry. | public V getIfNotExpired(K key) {
CacheableObject cObj;
synchronized(theLock) {
cObj = valueMap.get(key);
}
if (null != cObj) {
if (isExpired(cObj)) {
synchronized(theLock) {
currentCacheSize -= cObj.containmentCount;
valueMap.remove(key);
for (CacheListener<K> listener : listeners) {
listener.expiredElement(key);
}
}
return null;
} else {
return cObj.cachedObject;
}
} else {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic V retrieve(K key) {\n\t\tcheckNullKey(key);\n\t\treadLock.lock();\n\t\ttry {\n\t\t\treturn cache.get(key);\n\t\t} finally {\n\t\t\treadLock.unlock();\n\t\t}\n\t}",
"public Object get(Object key) {\n Entry entry = this.cache.get(key);\n\n if (entry == null)\n return null;\n\n // move the recently accessed Entry to the head of list\n moveToHead(entry);\n return entry.value;\n }",
"public CacheEntry getEntry(String key) {\n\t\tCacheEntry entry = map.get(key);\n\t\tif (entry == null) {\n\t\t\ttry {\n\t\t\t\tCacheEntry newEntry = new CacheEntry(key);\n\t\t\t\tCacheEntry oldEntry = map.putIfAbsent(key, newEntry);\n\t\t\t\tif (oldEntry == null) {\n\t\t\t\t\tsize.incrementAndGet();\n\t\t\t\t\tcheckCapacity();\n\t\t\t\t\treturn newEntry;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn oldEntry;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\t//log.error(\"Error creating CacheItem\", e);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn entry;\n\t\t}\n\t}",
"public Object get(String key) {\n\n CacheObject cacheObject = cache.get(key).get();\n if (!cacheObject.isExpired()) {\n cacheObject.updateUseTime();\n return cacheObject.getValue();\n } else {\n cache.remove(key);\n queue.add(cacheObject);\n return null;\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public T get(K key) {\n synchronized (cacheMap) {\n CacheObject c = (CacheObject) cacheMap.get(key);\n\n if (c == null) {\n return null;\n } else {\n c.lastAccessed = System.currentTimeMillis();\n return c.value;\n }\n }\n }",
"public T get()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn cache.get(KEY, supplier);\n\t\t}\n\t\tcatch (ExecutionException e)\n\t\t{\n\t\t\tfinal Throwable cause = e.getCause();\n\n\t\t\t// Try to rethrow the actual exception so it's easier to understand\n\t\t\tif (cause == null)\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\telse if (cause instanceof RuntimeException)\n\t\t\t\tthrow (RuntimeException) cause;\n\t\t\telse if (cause instanceof Error)\n\t\t\t\tthrow (Error) cause;\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Unexpected error loading item into cache: \" + cause.getMessage(), cause);\n\t\t}\n\t}",
"@Override\n\tpublic synchronized Entry get(String key) {\n\t\tCacheHeader entry = mEntries.get(key);\n\t\t// if the entry does not exist, return.\n\t\tif (entry == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tFile file = getFileForKey(key);\n\t\tCountingInputStream cis = null;\n\t\ttry {\n\t\t\tcis = new CountingInputStream(new FileInputStream(file));\n\t\t\tCacheHeader.readHeader(cis); // eat header\n\t\t\tbyte[] data = streamToBytes(cis,\n\t\t\t\t\t(int) (file.length() - cis.bytesRead));\n\t\t\treturn entry.toCacheEntry(data);\n\t\t} catch (IOException e) {\n\t\t\tVolleyLog.d(\"%s: %s\", file.getAbsolutePath(), e.toString());\n\t\t\tremove(key);\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tif (cis != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcis.close();\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic T retrieveItem(T obj) {\n\t\tif(cache.contains(obj)) {\n\t\t\tfor (T objInSet : cache) {\n\t\t\t\tif (objInSet.equals(obj)) {\n\t\t\t\t\treturn objInSet;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Cache.Entry get(String param1) {\n }",
"public SafeHashMap.Entry getEntry(Object oKey)\n {\n // check if the cache needs flushing\n checkFlush();\n\n Entry entry = (Entry) getEntryInternal(oKey);\n if (entry == null)\n {\n m_stats.registerMiss();\n }\n else\n {\n m_stats.registerHit();\n entry.touch();\n }\n\n return entry;\n }",
"@Override\n public V get(K key){\n CacheObject<K, V> cacheObject = this.cache.get(key);\n\n if (cacheObject != null){\n return cacheObject.getObject();\n }\n\n return null;\n }",
"Object getValueFromLocalCache(Object key);",
"public T getIfPresent()\n\t{\n\t\treturn cache.getIfPresent(KEY);\n\t}",
"public Integer get(int key) {\n\t ListNode node = LRUhashtable.get(key); \n\n\t if (node == null) {\n\t return null;\n\t }\n\n\t // the item has been accessed, moved to the front of the cache\n\t moveToHead(node);\n\n\t return node.value;\n\t }",
"final CacheData<K, V> getEntry(final Object key) {\r\n // validateKey the key in the buckets\r\n\r\n // synchronization is not a problem here\r\n // if someone changes or resets a key/value right before this\r\n // it will be properly handled, either it won't find a validateKey in the if or the\r\n // obj being returned will be null, that is fine and expected for a no-validateKey\r\n // then the client will just validateKey whatever data he was looking for in the buckets\r\n return getCacheData(getKeyPosition(key));\r\n }",
"public Object get(Object key) {\n CacheEntry entry = (CacheEntry)_hash.get(key);\n if (entry != null) {\n touchEntry(entry);\n return entry.getValue();\n } else {\n return null;\n }\n }",
"public T getObject(T object) {\r\n\t\t\r\n\t\tif(cache.contains(object) == false) //if not in the cache\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Element not found.\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tcache.get(cache.indexOf(object));\r\n\t\t\treturn object;\r\n\t\t\t\r\n\t\t}\r\n\t\t \r\n\t}",
"protected abstract S get(E entry);",
"public Node<E> getNodeFromCache() {\n if (this.cacheSize == 0) {\n return null;\n }\n Node<E> node = this.firstCachedNode;\n this.firstCachedNode = node.next;\n node.next = null;\n this.cacheSize--;\n return node;\n }",
"@Override\n\tpublic Bitmap fetch(String key) {\n\t\treturn (Bitmap) mMemoryCache.get(key);\n\t}",
"public synchronized V getValue(K key) {\n SoftReference<V> ref = cache.get(key);\n\n // Is the key-value pair absent from the cache?\n if (ref == null) {\n return null;\n }\n\n // Is the reference to the value dead?\n V value = ref.get();\n recentlyUsed.remove(key);\n if (value == null) {\n cache.remove(key);\n } else {\n recentlyUsed.add(0, key);\n }\n return value;\n }",
"public V fetch(String name) {\n return mCache.fetch(name, mSource);\n }",
"private CacheObject<K, V> getCacheObject(K key){\n return this.cache.get(key);\n }",
"@Override\n public KVMessage get(String key) {\n KVMessage rtn;\n lock.lock();\n try {\n String valueInCache = cacheMap.get(key);\n // Key exist in cache.\n if (valueInCache != null) {\n rtn = new Message(KVMessage.StatusType.GET_SUCCESS, key, valueInCache, null);\n // Key does not exist in cache.\n } else {\n String valueOnDisk = loadFromDisk(key);\n // Key exists on disk.\n if (valueOnDisk != null) {\n rtn = new Message(KVMessage.StatusType.GET_SUCCESS, key, valueOnDisk, null);\n cacheMap.put(key, valueOnDisk);\n // Key does not exist on disk.\n } else {\n rtn = new Message(KVMessage.StatusType.GET_ERROR, key, null, null);\n }\n }\n } catch (IOException e) {\n rtn = new Message(KVMessage.StatusType.GET_ERROR, key, null, null);\n } finally {\n lock.unlock();\n }\n return rtn;\n }",
"V getEntry(K key);",
"public V get(K key) {\n CacheableObject cObj;\n\n synchronized(theLock) {\n cObj = valueMap.get(key);\n }\n\n return cObj == null ? null : cObj.cachedObject;\n }",
"T get(final UniqueId uniqueId) {\n _readLock.lock();\n try {\n return _uniqueIdMap.get(uniqueId);\n } finally {\n _readLock.unlock();\n }\n }",
"public Cache getCache(String name)\r\n/* 39: */ {\r\n/* 40:64 */ return (Cache)this.cacheMap.get(name);\r\n/* 41: */ }",
"private Bitmap getBitmapFromLruCache(String key) {\r\n return mLruCache.get(key);\r\n }",
"@Override\n\tpublic Object getObject(String key) {\n\t\tif (mInternalCache.contains(key)) {\n\t\t\ttry {\n\t\t\t\treturn Base64.fromString(mInternalCache.getString(key, null));\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.e(TAG, \"Failed to get the object from cache !\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"CloudCache getCache(String cacheName);",
"public V get(final K key) {\n expunge();\n final int hash = hash(key);\n final int index = index(hash, entries.length);\n Entry<K, V> entry = entries[index];\n while (entry != null) {\n if (entry.hash == hash && key == entry.get()) {\n return entry.value;\n }\n entry = entry.nextEntry;\n }\n return null;\n }",
"@Override\r\n protected ICacheElement<K, V> processGet(final K key)\r\n {\r\n if (!isAlive())\r\n {\r\n log.error(\"{0}: No longer alive so returning null for key = {1}\",\r\n logCacheName, key);\r\n return null;\r\n }\r\n\r\n log.debug(\"{0}: Trying to get from disk: {1}\", logCacheName, key);\r\n\r\n ICacheElement<K, V> object = null;\r\n try\r\n {\r\n storageLock.readLock().lock();\r\n try\r\n {\r\n object = readElement(key);\r\n }\r\n finally\r\n {\r\n storageLock.readLock().unlock();\r\n }\r\n\r\n if (object != null)\r\n {\r\n hitCount.incrementAndGet();\r\n }\r\n }\r\n catch (final IOException ioe)\r\n {\r\n log.error(\"{0}: Failure getting from disk, key = {1}\", logCacheName, key, ioe);\r\n reset();\r\n }\r\n return object;\r\n }",
"protected String getFromCache(String key) throws KeyDoesntExistException {\n \tif (!map.containsKey(key)) {\n \t\tthrow new KeyDoesntExistException(\"Key not found: \" + key);\n \t}\n \tif (!usageCounter.containsKey(key)) {\n \t\tthrow new RuntimeException(\"Cache and usageCounter out of sync!\");\n \t}\n \tusageCounter.put(key, usageCounter.get(key) + 1);\n \treturn map.get(key);\n }",
"public T get() {\n return cache.getUnchecked(clazz);\n }",
"public T getEntry(int givenPosition);",
"public long retrieve(UUID id) {\n if (id == null) {\n return 0;\n\n } else {\n Long cachedValue = cache.getIfPresent(id);\n if (cachedValue != null && cachedValue > 0) {\n return cachedValue;\n } else {\n return metrics.time(\n StoreMetrics.OP.SERIAL_OF,\n () -> {\n try {\n Long res =\n jdbcTemplate.queryForObject(\n PgConstants.SELECT_SER_BY_ID, new Object[] {id}, Long.class);\n if (res != null && res > 0) {\n cache.put(id, res);\n return res;\n }\n } catch (EmptyResultDataAccessException ignore) {\n // ignore\n }\n return 0L;\n });\n }\n }\n }",
"public int get(int key) {\n ListNode node = hashtable.get(key);\n \n if(node == null){\n return -1;\n }\n \n // Item has been accessed. Move to the front of the cache\n moveToHead(node);\n return node.value;\n }",
"public CacheEntry searchWithCache(String name) {\n CacheEntry entry = cacheHit(name);\n \n if (entry != null) return entry;\n \n // we grab serial number first; the worst that will happen is we cache a later\n // update with an earlier serial number, which would just flush anyway\n Object token = getCacheToken();\n DynamicMethod method = searchMethodInner(name);\n \n return method != null ? addToCache(name, method, token) : addToCache(name, UndefinedMethod.getInstance(), token);\n }",
"@Override\n public Object getResource(String resourceKey)\n {\n synchronized(InProcessCache.class) {\n if(!hasResource(resourceKey)) {\n return null;\n }\n\n WeakReference reference = (WeakReference)_cache.get(resourceKey);\n return reference.get();\n }\n }",
"public V get(Object key) {\r\n if (cacheDelegate != null) {\r\n cacheDelegate.keyLookup(key);\r\n }\r\n\r\n if (key == null) {\r\n return null;\r\n }\r\n\r\n V value;\r\n CacheData<K, V> cacheData = getEntry(key);\r\n if (cacheData != null) {\r\n // see if the key passed in matches this one\r\n if ((value = cacheData.validateKey(key, cacheDelegate)) != null) {\r\n return value;\r\n }\r\n }\r\n // if we made it here and source!=null use the passthrough\r\n if (source!=null) {\r\n value = source.get(key);\r\n put((K)key, value);\r\n return value;\r\n }\r\n return null;\r\n }",
"public Serializable get(final Serializable key) throws BlockingCacheException {\n Mutex lock = checkLockExistsForKey(key);\n try {\n if (timeoutMillis == 0) {\n lock.acquire();\n } else {\n boolean acquired = lock.attempt(timeoutMillis);\n if (!acquired) {\n StringBuffer message = new StringBuffer(\"lock timeout attempting to acquire lock for key \")\n .append(key).append(\" on cache \").append(cache.getName());\n throw new BlockingCacheException(message.toString());\n }\n }\n final Element element = cache.get(key);\n if (element != null) {\n //ok let the other threads in\n lock.release();\n return element.getValue();\n } else {\n //don't release the read lock until we write\n return null;\n }\n } catch (InterruptedException e) {\n throw new CacheException(\"Interrupted. Message was: \" + e.getMessage());\n }\n }",
"@Cacheable(\"lastRunInfo\")\n private GeobatchRunInfo getLastRunInfoCache(String id) {\n List<GeobatchRunInfo> search = search(id);\n \n return search != null && !search.isEmpty() ? search.get(0) : null;\n }",
"public Object get(String methodName, CallCacheArgs args) {\n Map<CallCacheArgs, Object> cacheArgs = this.cache.get(methodName);\n return cacheArgs == null ? null : cacheArgs.get(args);\n }",
"public static Object getCache(String key) {\n\t\treturn getCache(key, null);\n\t}",
"public static Object getCache(String key) {\n return getCache(key, null);\n }",
"public static Object getCache(String key) {\n return getCache(key, null);\n }",
"@Override\n public V get( final K name )\n {\n final ICacheElement<K, V> element = this.getCacheControl().get( name );\n\n return ( element != null ) ? element.getVal() : null;\n }",
"public T get(K key);",
"public void cacheResult(DataEntry dataEntry);",
"public V get(K key)\n\t{\n\t\tcheckForNulls(key);\n\t\tint n = Math.abs(key.hashCode() % entries.length);\n\t\t\n\t\tif (entries[n] == null)\n\t\t\treturn null;\n\t\t\n\t\tfor (Entry e : entries[n])\n\t\t{\n\t\t\tif (key.equals(e.key) == true)\n\t\t\t\treturn e.value;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"@Override\n public String get(String key) throws DatabaseException {\n if (key == null) {\n throw new IllegalArgumentException();\n }\n String cachedData = cache.get(key);\n if (cachedData != null) {\n return cachedData;\n }\n\n String data = this.database.get(key);\n if (data != null) {\n cache.put(key, data);\n }\n return data;\n }",
"public final V getEntry(K key) {\n\t\tif (size == 0) {\n\t\t\treturn null;\n\t\t}\n\t\tint hash = hash(key);\n\t\tint i = indexFor(hash);\n\t\tEntry<K, V> e0 = table[i];\n\t\tif (e0 != null) {\n\t\t\tif (e0.isFile) {\n\t\t\t\t// 读硬盘\n\t\t\t\treadDisk(e0, dir, i);\n\t\t\t\te0.isFile=false;\n\t\t\t}\n\t\t\tEntry<K, V> e = e0;\n\t\t\twhile (true) {\n\t\t\t\tK k = e.k;\n\t\t\t\tif (e.hash() == hash && (k.compareTo(key) == 0)) {\n\t\t\t\t\tV value = e.v;\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t\tif (e.next == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\te = e.next;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@CheckForNull\n\t@SuppressFBWarnings(value = \"RV_RETURN_VALUE_IGNORED_BAD_PRACTICE\")\n\tpublic V get(@Nonnull String key) {\n\t\tFile jsonFile = new File(mCacheLocation, key);\n\t\tif (!jsonFile.exists()) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\treturn mObjectMapper.readValue(jsonFile, mModelClass);\n\t\t} catch (IOException e) {\n\t\t\tLogUtils.logException(TAG, \"Exception when reading \" + key, e);\n\t\t\tjsonFile.delete(); // try to delete damaged file\n\t\t\treturn null;\n\t\t}\n\t}",
"private Bitmap getBitmapFromMemCache(String key) {\n return mLruCache.get(key);\n }",
"public Drawable getDrawableCache(Integer cacheKey)\n {\n synchronized (mLinkedHashMap)\n {\n Drawable image;\n // Get file from cache\n String file = mLinkedHashMap.get(cacheKey);\n if (file != null)\n {\n image = Drawable.createFromPath(file);\n Log.i(\"DiskLruCache\", \"DiskCacheHit\");\n return image;\n }\n else\n {\n // Construct existing file path\n String cacheKeyStr = String.valueOf(cacheKey);\n String existingFile = createFilePath(cacheDirectory, cacheKeyStr);\n // Get the file using the constructed file path\n assert existingFile != null;\n File existFile = new File(existingFile);\n if (existFile.exists())\n {\n // If the file exists, we will store the the key in reference list\n referenceAdd(cacheKey, existingFile);\n return Drawable.createFromPath(existingFile);\n }\n }\n return null;\n }//synchronized (mLinkedHashMap)\n }",
"public void cacheResult(ua.org.gostroy.guestbook.model.Entry3 entry3);",
"public T get( @Nonnull final Object... args )\n {\n if ( Arez.shouldCheckApiInvariants() )\n {\n apiInvariant( this::isNotDisposed,\n () -> \"Arez-0161: MemoizeCache named '\" + _name + \"' had get() invoked when disposed.\" );\n }\n return getComputableValue( args ).get();\n }",
"public synchronized V get(K primaryKey) {\n try {\n Map<K, V> newBucket = getNewBucket();\n V entry = newBucket.get(primaryKey);\n if (entry == null) {\n Map<K, V> oldBucket = getOldBucket();\n entry = oldBucket.get(primaryKey);\n if (entry != null) {\n oldBucket.remove(primaryKey);\n put(primaryKey, entry);\n return entry;\n } else {\n return null;\n }\n } else {\n return entry;\n }\n // TODO: Is it intended catch all exceptions (including RuntimeException) here?\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }",
"@Override\n public <T> T getEntity(Key<T> key)\n {\n // Check the session first in case we've loaded the entity in another query or 'get' then fall back to the query cache\n return session.getCache().get(key)\n .map(entity -> {\n if (logger.isTraceEnabled())\n {\n logger.trace(\"Session cache hit {0}[{1}]\", key.getType().getSimpleName(), key.getId());\n }\n\n session.getStats().cacheHit();\n stats().incHits();\n return entity;\n })\n .orElseGet(() -> queryCache.getEntity(key));\n }",
"@Override\n\tpublic <T> T get(String arg0, long arg1) throws TimeoutException,\n\t\t\tInterruptedException, MemcachedException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic <T> T get(String arg0) throws TimeoutException,\n\t\t\tInterruptedException, MemcachedException {\n\n\t\treturn doGet(arg0);\n\t}",
"public static Long getCacheValue(int distanceLeft, int cacheNumber){\n SuperSavvyTrieHelper2 internalCache = cache.get(cacheNumber).get(distanceLeft);\n if (internalCache != null){\n //long eTime = System.nanoTime();\n //hitCounts[cacheNumber]++;\n //statCollector.addTime(cacheNumber + \": getCacheValueHit\", eTime - sTime);\n return internalCache.get();\n }\n //long eTime = System.nanoTime();\n //missCounts[cacheNumber]++;\n //statCollector.addTime(cacheNumber + \": getCacheValueMiss\", eTime - sTime); //when there's a miss adding nulls to the arraylist takes a long time since they are added on get rather than put\n return null;\n }",
"private Document findInCache(String userId) {\n \t\tString key;\n \t\tSet<String> keys = lruCache.getKeySet();\n \t\tIterator<String> itr = keys.iterator();\n \t\twhile (itr.hasNext()) {\n \t\t\tkey = itr.next();\n \t\t\tDocument data = lruCache.get(key);\n \t\t\t// check if email in profile object is same as input userId\n \t\t\tString email = \"\";\n \t\t\ttry {\n \t\t\t\temail = DOMUtil.value(data, Profile.xpathMap.get(\"email\"), Profile.nameSpaceCtx);\n \t\t\t} catch (XMLException e) {\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t// cache hit\n \t\t\tif (StringUtil.equalsIgnoreCase(email, userId)) {\n \t\t\t\treturn data;\n \t\t\t}\n \t\t}\n \t\t// Cache miss\n \t\treturn null;\n \t}",
"private static AvailEntry getAvailEntry(String key) {\n AvailEntry ae = null;\n Map lcache = null;\n if (GET_AVAILABLE_CACHE != null) {\n lcache = (Map) GET_AVAILABLE_CACHE.get();\n if (lcache != null) {\n ae = (AvailEntry) lcache.get(key);\n }\n }\n\n if (ae == null) {\n ae = new AvailEntry(key);\n if (lcache == null) {\n lcache = new HashMap();\n lcache.put(key, ae);\n GET_AVAILABLE_CACHE = new SoftReference(lcache);\n } else {\n lcache.put(key, ae);\n }\n }\n\n return ae;\n }",
"DNSRecord queryCache(DNSQuestion question) throws IOException {\n if (cache.containsKey(question)) {\n System.out.println(\"Answer found in cache!\");\n if (cache.get(question).timestampValid()) {\n System.out.println(\"TTL valid!\");\n return cache.get(question);\n }\n else {\n cache.remove(question);\n System.out.println(\"TTL not valid!\");\n }\n }\n return null;\n }",
"private MProduct getProductFromCache(int M_Product_ID)\n {\n \tif (m_prodCache == null)\n \t\tm_prodCache = new MProductCache(getCtx(),get_TrxName());\n \tif (M_Product_ID <=0)\n \t\treturn null;\n \tMProduct p = m_prodCache.get(M_Product_ID);\n \treturn p;\n }",
"public static Item fetchByitem(long requestId, boolean retrieveFromCache) {\n\t\treturn getPersistence().fetchByitem(requestId, retrieveFromCache);\n\t}",
"@Override\n public IBasicEntity get(Class<? extends IBasicEntity> type, String key)\n throws CachingException {\n return EntityCachingServiceLocator.getEntityCachingService().get(type, key);\n }",
"T get(String key);",
"private Document findInCache(String userId) {\n\t\tString key;\n\t\tSet<String> keys = cache.keySet();\n\t\tIterator<String> itr = keys.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tkey = itr.next();\n\t\t\tDocument data = cache.get(key);\n\t\t\t// check if email in profile object is same as input userId\n\t\t\tString email = \"\";\n\t\t\ttry {\n\t\t\t\temail = DOMUtil.value(data, Profile.xpathMap.get(\"email\"), Profile.nameSpaceCtx);\n\t\t\t} catch (XMLException e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// cache hit\n\t\t\tif (StringUtil.equalsIgnoreCase(email, userId)) {\n\t\t\t\treturn data;\n\t\t\t}\n\t\t}\n\t\t// Cache miss\n\t\treturn null;\n\t}",
"private static Cache getCacheInstance() {\r\n\t\tif( cache == null ) {\r\n\t\t\ttry {\r\n\t\t\t\tCacheFactory cf = CacheManager.getInstance().getCacheFactory();\r\n\t\t\t\tcache = cf.createCache(Collections.emptyMap());\r\n\t\t\t} catch (CacheException e) {\r\n\t\t\t\tlog.log(Level.SEVERE, \"can not initialize cache\", e);\r\n\t\t\t\tcache = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cache;\r\n\t}",
"@Override\n public ICacheElement<K, V> getCacheElement( final K name )\n {\n return this.getCacheControl().get( name );\n }",
"public Bitmap getImageCache(Integer cacheKey)\n {\n synchronized (mLinkedHashMap)\n {\n Bitmap bitmap;\n // Get file from cache\n String file = mLinkedHashMap.get(cacheKey);\n if (file != null)\n {\n bitmap = BitmapFactory.decodeFile(file);\n Log.i(\"DiskLruCache\", \"DiskCacheHit for Image with CacheKey: \"+cacheKey.toString());\n return bitmap;\n }\n else\n {\n // Construct existing file path\n String cacheKeyStr = String.valueOf(cacheKey);\n String existingFile = createFilePath(cacheDirectory, cacheKeyStr);\n // Get the file using the constructed file path\n assert existingFile != null;\n File existFile = new File(existingFile);\n if (existFile.exists())\n {\n // If the file exists, we will store the the key in reference list\n referenceAdd(cacheKey, existingFile);\n return BitmapFactory.decodeFile(existingFile);\n }\n }\n return null;\n }//synchronized (mLinkedHashMap)\n }",
"protected Entity cacheLoadOrStore(Entity entity) {\n Entity cachedEntity = entityCache.findInCache(entity.getClass(), entity.getId());\n if (cachedEntity != null) {\n return cachedEntity;\n }\n entityCache.put(entity, true);\n return entity;\n }",
"Optional<T> getItem(final long pKey);",
"@Override\n\tpublic Object get(String name, Serializable key) throws CacheException {\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic <T> T get(Class<T> clazz, String key) {\n\t\treturn (T) (cacheMap.get(clazz) == null ? null : cacheMap.get(clazz).get(key));\n\t}",
"public PlayerContinuousSnap getCache(Player player) {\n\t\treturn this.cached.get(player);\n\t}",
"@Test\n public void testCoh3710_get()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertNull(getNamedCache(getCacheName0()).get(Integer.valueOf(1)));\n }\n });\n }",
"public static LRUResourceCache getCache(String contextName) {\n LRUResourceCache lruCache = null;\n ConcurrentHashMap<String, LRUResourceCache> cacheMap = RuntimeData.getCacheMap();\n KernelProps conf = KernelProps.getInstance();\n \n if (cacheMap.containsKey(contextName)) {\n lruCache = (LRUResourceCache) cacheMap.get(contextName);\n } else {\n lruCache = new LRUResourceCache(conf.getInitialCacheSize(), conf.getCacheLoadFactor(), conf.getCacheCapacity());\n cacheMap.put(contextName, lruCache);\n }\n return lruCache;\n }",
"T get(@NonNull String key);",
"@Override\n public synchronized Object get(Object key) {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n String strkey = key.toString();\n if (this.ignoreCase) {\n strkey = this.keyMap.getProperty(strkey.toLowerCase());\n if (strkey == null)\n return null;\n }\n return super.get(strkey);\n }",
"public int get(int key) {\n Node node = cache.get(key);\n // If the node exists\n if (node != null) {\n // Get the value stored in the node\n int value = node.value;\n // Remove and add the node\n remove(node);\n add(node);\n return value;\n }\n return -1;\n }",
"public int get(int curtTime, int key) {\n if (!cache.containsKey(key)) {\n return Integer.MAX_VALUE;\n }\n Element elem = cache.get(key);\n if (elem.expire >= curtTime || elem.expire == -1) {\n return elem.value;\n } else {\n return Integer.MAX_VALUE;\n }\n }",
"<T> AbstractMultiTenantPool.Entry<T> getEntry();",
"public V getElementByKey(K key) {\n\t\tif (cacheMap.containsKey(key)) {\n\t\t\telementHit(key);\n\t\t}\n\t\treturn cacheMap.get(key);\n\t}",
"public Object get() {\n while(isLocked() ) {\n try {\n Thread.sleep(10);\n }\n catch(InterruptedException ie) {\n // do nothing\n }\n }\n \n Object retVal = getHead();\n LAST_READ_TIME = now();\n return retVal;\n }",
"public static JSONObject get() {\n\t\treturn TUser_CACHE.get();\n\t}",
"@Override\n\t\t\tpublic Bitmap getBitmap(String url) {\n\t\t\t\treturn cache.get(url);\n\t\t\t}",
"public Object get(Vector primaryKey) {\n CacheKey cacheKey = getCacheKeyWithReadLock(primaryKey);\n\n if (cacheKey == null) {\n return null;\n }\n return cacheKey.getObject();\n }",
"public V get(K key)\r\n\t{\r\n\t\tEntry retrieve = data.get(new Entry(key, null));\r\n\t\t\r\n\t\tif(retrieve != null)\r\n\t\t{\r\n\t\t\treturn retrieve.value;\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public Bitmap get(String url) {\n if(url!=null){\n synchronized (mBitmapCache) {\n\n // Get the image from the cache\n final Bitmap bitmap = mBitmapCache.get(url);\n\n // Check if the bitmap is in the cache\n if (bitmap != null) {\n return bitmap;\n }\n }\n }\n\n return null;\n }",
"public Object getValueToPutInCache(AbstractRecord row, AbstractSession session) {\r\n if (isStoredInCache()) {\r\n return row.get(getWriteLockField());\r\n } else {\r\n return null;\r\n }\r\n }",
"public V get(K key)\n\t{\n\t\tif(queue.contains(key))\n\t\t{\n\t\t\tqueue.remove(key);\n\t\t\tqueue.add(0, key);\n\t\t\treturn map.get(key);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"protected abstract T retrieveEntry(PersistentEntity persistentEntity, Serializable key);",
"private String getLocalValue(int key)\n {\n // binary search, since the list is sorted\n int start = 0;\n int end = cache.size() - 1;\n while (start <= end)\n {\n int mid = (start + end) / 2;\n Record currentRecord = cache.get(mid);\n if (key == currentRecord.key())\n {\n return currentRecord.value();\n }\n else if (key < currentRecord.key())\n {\n end = mid - 1;\n }\n else\n {\n start = mid + 1;\n }\n }\n \n // not found\n return null; \n }",
"public synchronized Object get( Object key ) {\n\t\tObject intvalue = mapKeyPos.get(key);\n\t\tif ( intvalue != null ) {\n\t\t\tint pos = ((Integer)intvalue).intValue();\n\t\t\tstatus[pos] = LRU_NEW;\n\t\t\t//System.out.println(\"CountLimiteLRU: get(\"+key+\") = \"+values[pos]);\n\t\t\treturn values[pos];\n\t\t}\n\t\treturn null;\n\t}",
"default T getOrCreate() {\n if(!isPresent()) {\n return create();\n }\n else {\n return get();\n }\n }",
"public Node getNodeByCache(String label)\r\n\t{\r\n\t\treturn cacheNodes.get(label);\r\n\t}",
"final CacheData<K, V> getCacheData(int pos) {\r\n return buckets[pos].get();\r\n }"
] | [
"0.7722205",
"0.741517",
"0.7173657",
"0.7120456",
"0.70929754",
"0.69727343",
"0.6935124",
"0.6770678",
"0.6677737",
"0.66736865",
"0.66284287",
"0.6590365",
"0.65826434",
"0.6577476",
"0.6568203",
"0.6530237",
"0.64758664",
"0.64202726",
"0.6392457",
"0.63405895",
"0.63343894",
"0.6308312",
"0.62333524",
"0.62332267",
"0.6228596",
"0.6226303",
"0.61964107",
"0.6160127",
"0.6118505",
"0.61175615",
"0.6096867",
"0.6093324",
"0.6087868",
"0.60761756",
"0.6069379",
"0.6068552",
"0.60454416",
"0.60298854",
"0.60264784",
"0.6024087",
"0.600228",
"0.59826386",
"0.5958645",
"0.5948967",
"0.5931062",
"0.5897906",
"0.5897906",
"0.58952266",
"0.5879328",
"0.5853721",
"0.58444357",
"0.5840605",
"0.58313376",
"0.58261836",
"0.5812334",
"0.58114755",
"0.58044213",
"0.5799527",
"0.5788544",
"0.57830524",
"0.57711875",
"0.5761391",
"0.5753228",
"0.57483774",
"0.5736142",
"0.57306564",
"0.57267666",
"0.57199216",
"0.57187456",
"0.5718397",
"0.5708646",
"0.57039255",
"0.5694457",
"0.568351",
"0.5657921",
"0.5644214",
"0.5637483",
"0.56335205",
"0.5630955",
"0.5629636",
"0.5626515",
"0.56241703",
"0.56094134",
"0.5606336",
"0.5604138",
"0.5599286",
"0.55981845",
"0.5597517",
"0.55933034",
"0.55887383",
"0.55884504",
"0.558643",
"0.55749774",
"0.556094",
"0.5550659",
"0.5544416",
"0.5533177",
"0.5532597",
"0.5530802",
"0.55220103",
"0.552157"
] | 0.0 | -1 |
Adds an entry to this cache. If the cache is full, the LRU (least recently used) entry is dropped. | public void put(K key, V value, int containedObjectCount) {
synchronized(theLock) {
if (! valueMap.containsKey(key)) {
currentCacheSize += containedObjectCount;
}
valueMap.put(key, new CacheableObject(value, containedObjectCount));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic V add(K key, V value) {\n\t\tcheckNullKey(key);\n\t\tcheckNullValue(value);\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\treturn cache.put(key, value);\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"public boolean add(E anEntry){\n if (size == capacity){\n reallocate();\n }\n theData[size] = anEntry;\n size++;\n\n return true;\n }",
"@Override\n\tpublic void addToCache(T obj) {\n\t\tcache.add(obj);\n\t}",
"public void addObject(T object)\r\n\t{\r\n\t\tif(cache.size() == maxStorage) //if full\r\n\t\t{\r\n\t\t\tif(cache.contains(object)) //if full and already in cache\r\n\t\t\t{\r\n\t\t\t\tcache.remove(object);\r\n\t\t\t\tcache.addFirst(object);\r\n\t\t\t\thits++;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse //if full but not in cache\r\n\t\t\t{\r\n\t\t\t\tcache.removeLast();\r\n\t\t\t\tcache.addFirst(object);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse if(cache.size() < maxStorage) //if there is still room in the cache\r\n\t\t{\r\n\t\t\tif(cache.contains(object)) //if object is already in cache\r\n\t\t\t{\r\n\t\t\t\tcache.remove(object);\r\n\t\t\t\tcache.addFirst(object);\r\n\t\t\t\thits++;\r\n\t\t\t}\r\n\t\t\telse //if object is not already in cache\r\n\t\t\t{\r\n\t\t\t\tcache.addFirst(object);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void put(int key, int value) {\n if (!cache.containsKey(key)) {\n // new entry\n if (cache.size() + 1 > capacity) {\n // remove LRU entry\n int lruKey = cache.keySet().iterator().next();\n cache.remove(lruKey);\n }\n } else {\n // existing entry\n cache.remove(key);\n }\n cache.put(key, value);\n }",
"public void addNodeToCache(Node<E> node) {\n if (!isCacheFull()) {\n Node<E> node2 = this.firstCachedNode;\n node.previous = null;\n node.next = node2;\n node.setValue(null);\n this.firstCachedNode = node;\n this.cacheSize++;\n }\n }",
"private void addTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n // insert entry into list\n int index = 0;\n while (index < timeEntries.size())\n {\n SoftReference<TimeEntry> softReference = timeEntries.get(index);\n if ((softReference != null) && softReference.get().spentOn.isBefore(timeEntry.spentOn))\n {\n break;\n }\n index++;\n }\n timeEntries.add(index,new SoftReference<TimeEntry>(timeEntry));\n }\n }",
"long addEntry(DirectoryEntry newEntry) {\n // Unlink an entry from the free list (or add to the end of the existing\n // directory)\n long pos;\n if (freeEntries.size() > 0) {\n pos = freeEntries.get(0);\n freeEntries.remove(0);\n } else {\n pos = endOfEntries;\n endOfEntries += 32;\n }\n // Put the new entry into it's slot\n dirStream.position(pos);\n newEntry.writeTo(dirStream);\n // Update internal structures to reflect new entry (as if read from\n // disk)\n entries.put(pos, newEntry);\n handleAccessed(true);\n return pos;\n }",
"@Override\n public boolean put(CacheObject<K, V> cacheObject){\n K key = cacheObject.getKey();\n if ((this.maxSize > 0) && !this.cache.containsKey(key) && (this.cache.size() == this.maxSize)){\n // if add new element than exceed maximum limit\n return false;\n }\n\n this.cache.put(key, cacheObject);\n\n return true;\n }",
"public void put(Object key, Object value) {\n Entry entry = this.cache.get(key);\n\n if (entry == null) {\n // cache is fully used\n if (currentSize >= cacheSize) {\n cache.remove(tail.key);\n removeLast();\n }\n else {\n currentSize++;\n }\n\n entry = new Entry();\n }\n\n // update the K/V in the Entry object\n entry.key = key;\n entry.value = value;\n cache.put(key, entry);\n\n // move to the head of list\n moveToHead(entry);\n }",
"public void add(T newEntry) {\r\n add(size(), newEntry);\r\n }",
"public boolean add(T entry) {\n return false;\n }",
"@Override\n public boolean put(K key, V object){\n if ((this.maxSize > 0) && !this.cache.containsKey(key) && (this.cache.size() == this.maxSize)){\n // if add new element than exceed maximum limit\n return false;\n }\n\n CacheObject<K, V> cacheObject = new CacheObject<>(key, object);\n this.cache.put(key, cacheObject);\n\n return true;\n }",
"protected void addEntry(CacheEntry entry) {\n if (_first == null) {\n _first = entry;\n _last = entry;\n } else {\n _last.setNext(entry);\n entry.setPrevious(_last);\n _last = entry;\n }\n }",
"private void putEntry(String key, CacheHeader entry) {\n\t\tif (!mEntries.containsKey(key)) {\n\t\t\tmTotalSize += entry.size;\n\t\t} else {\n\t\t\tCacheHeader oldEntry = mEntries.get(key);\n\t\t\tmTotalSize += (entry.size - oldEntry.size);\n\t\t}\n\t\tmEntries.put(key, entry);\n\t}",
"public boolean addCacheElement(K key, V value) {\n\t\tif (cacheMap.containsKey(key)) {\n\t\t\telementHit(key);\n\t\t\tInputUtils.printConsoleMessage(\"Hit\");\n\t\t\treturn false;\n\t\t} else if (maxObjects > cacheMap.size()) {\n\t\t\tcacheMap.put(key, value);\n\t\t\thitMap.put(key, 0);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tInputUtils.printConsoleMessage(\"Miss\");\n\t\t\tint min = Integer.MAX_VALUE;\n\t\t\tK searchedKey = null;\n\t\t\tfor (K i : hitMap.keySet()) {\n\t\t\t\tint val = hitMap.get(i);\n\t\t\t\tif (min > val) {\n\t\t\t\t\tsearchedKey = i;\n\t\t\t\t\tmin = val;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcacheMap.remove(searchedKey);\n\t\t\thitMap.remove(searchedKey);\n\t\t\tcacheMap.put(key, value);\n\t\t\thitMap.put(key, 0);\n\t\t\treturn true;\n\t\t}\n\t}",
"public void addEntry(Entry entry) {\n entries.add(entry);\n }",
"@Override\r\n public void add(IMObject object) {\r\n cache.add(object);\r\n }",
"protected void addTileToCache(ElevationTile tile, BufferWrapper elevations)\n {\n if (tile.getLevelNumber() == 0)\n this.levelZeroTiles.put(tile.getTileKey(), tile);\n else\n this.getMemoryCache().add(tile.getTileKey(), tile, elevations.getSizeInBytes());\n }",
"public void addEntry(Entry entry) {\n getEntryList().addEntry(entry);\n }",
"public final synchronized void addElement(Object paramObject1, Object paramObject2)\r\n/* 21: */ {\r\n/* 22:111 */ Object localObject = this._table.get(paramObject1);\r\n/* 23:113 */ if (localObject != null)\r\n/* 24: */ {\r\n/* 25:118 */ GenericCacheEntry localGenericCacheEntry = (GenericCacheEntry)localObject;\r\n/* 26:119 */ localGenericCacheEntry._value = paramObject2;\r\n/* 27:120 */ localGenericCacheEntry._key = paramObject1; return;\r\n/* 28: */ }\r\n/* 29: */ int i;\r\n/* 30:126 */ if (!isFull())\r\n/* 31: */ {\r\n/* 32:127 */ i = this._numEntries;\r\n/* 33:128 */ this._numEntries += 1;\r\n/* 34: */ }\r\n/* 35: */ else\r\n/* 36: */ {\r\n/* 37:132 */ i = this.__curent;\r\n/* 38:134 */ if (++this.__curent >= this._cache.length) {\r\n/* 39:135 */ this.__curent = 0;\r\n/* 40: */ }\r\n/* 41:137 */ this._table.remove(this._cache[i]._key);\r\n/* 42: */ }\r\n/* 43:140 */ this._cache[i]._value = paramObject2;\r\n/* 44:141 */ this._cache[i]._key = paramObject1;\r\n/* 45:142 */ this._table.put(paramObject1, this._cache[i]);\r\n/* 46: */ }",
"private <K extends Resource> K addToCache(K res, String uri) {\n\t\tif (res == null)\n\t\t\tnegCache.put(uri, null);\n\t\treturn res;\n\t}",
"public Node<T> add(T element) {\n // Get a free node.\n Node<T> freeNode = getFree();\n if (freeNode != null) {\n // Attach the element.\n return freeNode.attach(element);\n } else {\n // Failed!\n throw new IllegalStateException(\"Capacity exhausted.\");\n }\n }",
"StoreResponse add(CACHE_ELEMENT e);",
"public synchronized void storeValue(K key, V value) {\n SoftReference<V> ref = cache.get(key);\n cache.put(key, new SoftReference<V>(value));\n\n // Is the cache unbounded?\n if (size == null) {\n return;\n }\n\n // Was the key already present in the cache?\n if (ref != null) {\n recentlyUsed.remove(key);\n }\n recentlyUsed.add(0, key);\n\n // Is the cache now overflowing?\n if (recentlyUsed.size() > size) {\n cache.remove(recentlyUsed.get(size));\n recentlyUsed.remove((int)size); // Remove by index, not value.\n }\n }",
"public void put(int key, int value) {\n Node node = cache.get(key);\n // Check if the node already exists\n if (node != null) {\n node.value = value;\n // Accessing a node is considered to update LRU cache\n // Remove the node\n remove(node);\n // Add the node\n add(node);\n } else {\n if (cache.size() == capacity) {\n // Remove from the map\n cache.remove(tail.previous.key);\n // Remove from the linked list\n remove(tail.previous);\n }\n // Create a new node\n Node newNode = new Node();\n newNode.key = key;\n newNode.value = value;\n // Add to map\n cache.put(key, newNode);\n // Add to linked list\n add(newNode);\n }\n }",
"public boolean add(T newEntry);",
"public boolean add(K key, V value){\r\n int loc = find(key);\r\n if(needToRehash()){\r\n rehash();\r\n }\r\n Entry<K,V> newEntry = new Entry<>(key,value);\r\n if(hashTable[loc]!= null && hashTable[loc].equals(key))\r\n return false;\r\n else{\r\n hashTable[loc] = newEntry;\r\n size++;\r\n return true;\r\n }\r\n }",
"public boolean add(int key) {\n Entry tab[] = table;\n int index = (key & 0x7FFFFFFF) % tab.length;\n for (Entry e = tab[index]; e != null; e = e.next) {\n if (e.key == key) {\n return false;\n }\n }\n\n if (count >= threshold) {\n // Rehash the table if the threshold is exceeded\n rehash();\n\n tab = table;\n index = (key & 0x7FFFFFFF) % tab.length;\n }\n\n // Creates the new entry.\n Entry e = new Entry(key, tab[index]);\n tab[index] = e;\n count++;\n return true;\n }",
"protected void onAdd()\n {\n scheduleExpiry();\n\n // update units\n int cNewUnits = calculateUnits(m_oValue);\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cOldUnits = m_cUnits;\n if (cOldUnits == -1)\n {\n // entry is discarded; avoid exception\n return;\n }\n\n if (cNewUnits != cOldUnits)\n {\n map.adjustUnits(cNewUnits - cOldUnits);\n m_cUnits = cNewUnits;\n }\n }\n\n // issue add notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_INSERTED, getKey(), null, getValue()));\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public MapEntryImpl addEntry(MapEntryImpl newEntry, Object key, int hash) {\n int i = indexOfKey(key, hash);\n MapEntryImpl entry = entries[i];\n if (entry != null) return entry; // Entry exists\n entries[i] = newEntry;\n newEntry.key = key;\n newEntry.hash = hash;\n // Check if we need to resize.\n if ((++count << EMPTINESS_LEVEL) > entries.length) {\n resize(entries.length << 1);\n }\n return newEntry;\n }",
"protected void touchEntry(CacheEntry entry) {\n if (_last == entry) {\n return;\n }\n removeEntry(entry);\n addEntry(entry);\n }",
"@Override\n synchronized public void addEntry(Entry e) throws RemoteException {\n if (this.map.containsKey(e.getHash())) {\n return;\n }\n //System.out.println(\"Mapper.addEntry() :: entry=\"+e.getHash()+\",\"+e.getLocation());\n this.map.put(e.getHash(), e.getLocation());\n printAct(\">added entry:\" + e.hash);\n }",
"protected final void addCache(Cache cache)\r\n/* 33: */ {\r\n/* 34:59 */ this.cacheMap.put(cache.getName(), cache);\r\n/* 35:60 */ this.cacheNames.add(cache.getName());\r\n/* 36: */ }",
"public void add(FileSystemEntry entry);",
"public LRUCache(int capacity) {\n cache = new LinkedHashMap<>(capacity);\n this.capacity = capacity;\n }",
"@Override\n\tpublic synchronized void put(String key, Entry entry) {\n\t\tpruneIfNeeded(entry.data.length);\n\t\tFile file = getFileForKey(key);\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\tCacheHeader e = new CacheHeader(key, entry);\n\t\t\te.writeHeader(fos);\n\t\t\tfos.write(entry.data);\n\t\t\tfos.close();\n\t\t\tputEntry(key, e);\n\t\t\treturn;\n\t\t} catch (IOException e) {\n\t\t}\n\t\tboolean deleted = file.delete();\n\t\tif (!deleted) {\n\t\t\tVolleyLog.d(\"Could not clean up file %s\",\n\t\t\t\t\tfile.getAbsolutePath());\n\t\t}\n\t}",
"public void addAtHead(E entry) {\n\t\tLinkedNode<E> temp = new LinkedNode<E>(entry, null);\n\t\tsize++;\n\t\tif(head == null) {\n\t\t\thead = temp;\n\t\t\ttail = head;\n\t\t} else {\n\t\t\ttemp.setNext(head);\n\t\t\thead = temp;\n\t\t}\n\t}",
"@Override\n public void addCache(String cacheName) {\n scanList.add(cacheName);\n }",
"StoreResponse append(CACHE_ELEMENT element);",
"public void addEntry(Entry e) {\n entries.put(e.getName(), e);\n }",
"@Override\n\tpublic void addEntry(E entry) {\n\n\t\t// Determine if the entry already exists in the list\n\t\tE current = this.getHead();\n\t\twhile (current != null) {\n\t\t\tif (this.isEqual(current, entry)) {\n\t\t\t\t// Already in list\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcurrent = current.getNext();\n\t\t}\n\n\t\t// Not in list, so add the entry\n\t\tsuper.addEntry(entry);\n\t}",
"public boolean addEntry(@NotNull Entry<T> entry) {\n if (entries.contains(entry)) {\n return false;\n }\n\n entries.add(entry);\n entry.addValueChangedListener(entryValueChangedListener);\n return true;\n }",
"public V add(K key, V value)\r\n\t{\r\n\t\tint slot = findSlot(key, false); // check if key already exists\r\n\t\tV oldVal = null;\r\n\t\t\r\n\t\tif (slot >= 0)\r\n\t\t{\r\n\t\t\tMapEntry<K, V> e = table[slot];\r\n\t\t\toldVal = e.setValue(value);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tslot = findSlot(key, true); // find empty slot for adding\r\n\t\t\ttable[slot] = new MapEntry<>(key, value);\r\n\t\t\tcount++;\r\n\t\t\tif (count >= maxCount)\r\n\t\t\t{\r\n\t\t\t\trehash();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn oldVal;\r\n\t}",
"private void addPrecious(CacheRepositoryEntry entry)\n {\n try {\n long size = entry.getSize();\n synchronized (_precious) {\n if (_precious.add(entry.getPnfsId())) {\n _preciousSpace += size;\n }\n }\n } catch (CacheException e) {\n _log.error(\"failed to get entry size : \" + e.getMessage());\n }\n }",
"@Override\n public void add(Integer element) {\n if (this.contains(element) != -1) {\n return;\n }\n // when already in use\n int index = this.getIndex(element);\n if(this.data[index] != null && this.data[index] != this.thumbstone){\n int i = index + 1;\n boolean foundFreePlace = false;\n while(!foundFreePlace && i != index){\n if(this.data[i] == null && this.data[i] == this.thumbstone){\n foundFreePlace = true;\n }else{\n if(i == this.data.length - 1){\n // start at beginning.\n i = 0;\n }else{\n i++;\n }\n }\n }\n if(foundFreePlace){\n this.data[i] = element;\n }else{\n throw new IllegalStateException(\"Data Structre Full\");\n }\n }\n }",
"public void add(E e){\n int target = e.hashCode() % this.buckets;\n if(!data[target].contains(e)){\n data[target].add(e);\n }\n }",
"void enqueue(E newEntry);",
"protected UUID add(E entry) {\n\t\treturn add(entry, true);\n\t}",
"public void add(T e) {\n Entry<T> newNode = new Entry<T>(e, null, null);\n newNode.next = cursor.next;\n newNode.prev = ((Entry<T>) cursor);\n if(cursor != tail) {\n ((Entry<T>) cursor.next).prev = newNode;\n }\n else {\n tail = newNode;\n }\n cursor.next = newNode;\n prev = cursor;\n cursor = cursor.next;\n size++;\n ready = false;\n }",
"public void addEntry(KantoDex entry)\n {\n if(entries.isEmpty())\n {\n entries.add(entry);\n }\n else\n {\n boolean notFound = true;\n for(KantoDex entryInit : entries)\n {\n if(entry.getDexNumInt() == entryInit.getDexNumInt())\n {\n System.out.println(\"Error: Attempted to add an entry that already exists, or should not exist.\");\n notFound = false;\n }\n }\n if(notFound)\n {\n entries.add(entry);\n }\n }\n }",
"public boolean add(E e) {\n if (contains(e)) {\n return false;\n }\n int i = hash(e);\n table[i] = new HashNode<E>(e, table[i]);\n size++;\n return true;\n }",
"@Override\n public void add(int index, int element) {\n Entry newElement = new Entry(element);\n Entry tmp = getEntry(index);\n newElement.next = tmp;\n newElement.previous = tmp.previous;\n tmp.previous.next = newElement;\n tmp.previous = newElement;\n size++;\n }",
"public void add(int index, E anEntry){\n if (index < 0 || index > size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n if (size == capacity){\n reallocate();\n }\n // Shift data in elements from index to size ‐ 1\n for (int i = size; i > index; i--){\n theData[i] = theData[i - 1];\n }\n // Insert the new item.\n theData[index] = anEntry;\n size++;\n }",
"public void storeInCache() {\r\n lockValueStored = IN_CACHE;\r\n }",
"public V put(final K key, final V value) {\n expunge();\n final int hash = hash(key);\n final int index = index(hash, entries.length);\n\n for (Entry<K, V> entry = entries[index]; entry != null; entry = entry.nextEntry) {\n if (hash == entry.hash && key == entry.get()) {\n final V oldentry = entry.value;\n if (value != oldentry) {\n entry.value = value;\n }\n return oldentry;\n }\n }\n\n entries[index] = new Entry<K, V>(key, value, refqueue, hash, entries[index]);\n if (++size >= threshold) {\n resize(entries.length * 2);\n }\n return null;\n }",
"public LRUCache(int capacity) {\n super(capacity + 1, 1.0f, true); // Pass 'true' for accessOrder.\n this.capacity = capacity;\n }",
"public CacheEntry checkOrAddToCache(InetAddress clientId, int xid) {\n ClientRequest req = new ClientRequest(clientId, xid);\n CacheEntry e;\n synchronized(map) {\n e = map.get(req);\n if (e == null) {\n // Add an inprogress cache entry\n map.put(req, new CacheEntry());\n }\n }\n return e;\n }",
"public void add(K key, E e){\n\t\tremove(key);\n\t\tnewestIndex = (newestIndex+1)%keys.length;\n\t\tif(keys[newestIndex] == null)\n\t\t\thowMany = howMany + 1;\n\t\tkeys[newestIndex] = key;\n\t\telem[newestIndex] = e;\n\t}",
"public V put(K key,V value) {\n\tif(key==null||value==null) {\n\t throw new NullPointerException();\n\t}\n\telse {\n\tMyEntry addvalue=new MyEntry();\n\taddvalue.key=key;\n\taddvalue.value=value;\n\t\n\tint bucket=Math.abs(key.hashCode()%capacity);\n\t\n\t\n\t//what happens if the same key already exists\n\tfor(MyEntry i:table[bucket]) { \n\t if(i.key==key) {\n\t\tV previousvalue=i.value;\n\t\ttable[bucket].add(addvalue);\n\t\tsize++;\n\t\tif(((float)size/(float)capacity)>loadFactor) {\n\t\t resize();\n\t\t}\n\t\treturn previousvalue;\n\t }\n\t}\n\t\n\t//what happens if the key does not exist\n\ttable[bucket].add(addvalue);\n\tsize++;\n\tif(((float)size/(float)capacity)>loadFactor) {\n\t resize();\n\t}\n\treturn null;\n\t}\n }",
"public void add(T newEntry, int priority)\r\n\t{\n\t\tensureCapacity();\r\n\t\tint location=addLocation(priority);\r\n\t\t\r\n\t\tmakeRoom(location);\r\n\t\t\r\n\t\t//add the new entry and made sure you\r\n\t\t//call the addLocation so it knows which \"slot\"\r\n\t\t//to be placed into number wise\r\n\t\tnormalQueue[location]=newEntry;\r\n\t\tpriorityQueue[location]=priority;\r\n\t}",
"@Override\n public boolean add(E e) {\n return offer(e);\n }",
"@Override\n public V put(final K key, final V value) {\n if (key == null) {\n throw new NullPointerException(\"key\");\n }\n entries.add(new SimpleEntry<K,V>(key, value));\n size = UNKNOWN_SIZE;\n return null;\n }",
"@Override\r\n\tpublic void add(CourseDBElement element) {\r\n\t\tint key = element.hashCode()%getTableSize();\r\n\t\t\r\n\t\tif(hashTable[key] == null) {\r\n\t\t\tLinkedList<CourseDBElement> newList = new LinkedList<CourseDBElement>();\r\n\t\t\tnewList.add(element);\r\n\t\t\thashTable[key] = newList;\r\n\t\t}\r\n\t\telse hashTable[key].add(element);\r\n\t}",
"@Override\n public synchronized void add(E element) {\n if (this.pointer == this.capacity) {\n int newCapacity = this.capacity + (this.capacity >> 1);\n Object[] arr = Arrays.copyOf(this.container, newCapacity);\n this.capacity = newCapacity;\n this.container = arr;\n }\n this.container[this.pointer++] = element;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic void add(T value) {\n\t\t// Append an element to the end of the storage.\n\t\t// Double the capacity if no space available.\n\t\t// Amortized O(1)\n\n\t\tif (size == capacity()) {\n\t\t\tT newData[] = (T[]) new Object[2 * capacity()];\n\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tnewData[i] = data[i];\n\t\t\t}\n\t\t\tdata = newData;\n\t\t}\n\n\t\tdata[size] = value;\n\t\tsize++;\n\t}",
"private void addEntry(final String url, final Bitmap bitmap){\n\n if(url == null || bitmap == null){\n return;\n }\n\n synchronized (mBitmapCache) {\n if(mBitmapCache.get(url) == null){\n mBitmapCache.put(url, bitmap);\n }\n }\n }",
"public CacheEntry getEntry(String key) {\n\t\tCacheEntry entry = map.get(key);\n\t\tif (entry == null) {\n\t\t\ttry {\n\t\t\t\tCacheEntry newEntry = new CacheEntry(key);\n\t\t\t\tCacheEntry oldEntry = map.putIfAbsent(key, newEntry);\n\t\t\t\tif (oldEntry == null) {\n\t\t\t\t\tsize.incrementAndGet();\n\t\t\t\t\tcheckCapacity();\n\t\t\t\t\treturn newEntry;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn oldEntry;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\t//log.error(\"Error creating CacheItem\", e);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn entry;\n\t\t}\n\t}",
"public Entry insert(Object key, Object value) {\n resize();//only if it needs to.\n Entry e = new Entry();\n e.key = key;\n e.value = value;\n int i = compFunction(key.hashCode());\n buckets[i].insertFront(e);\n size++;\n return e;\n }",
"public void add(Key key, Value value) {\n\n\t\tif (2 * this.size > this.capacity) {\n\t\t\tresize(2 * this.capacity);\n\t\t}\n\n\t\t// Add this item to the hash table in the expected location.\n\n\t\tint index = locate(key);\n\t\tthis.keys[index] = key;\n\t\tthis.values[index] = value;\n\t\tthis.size++;\n\t}",
"@Override\r\n\tpublic V putElement(K key, V value) {\n\t\t\r\n\t\tif (capacity == 0)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (hashMap.isEmpty()) {\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t\treturn value;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tV element = getElement(key);\r\n\t\tV returnValue = hashMap.get(que.get(0));\r\n\t\t\r\n\t\tif (element == null) {\r\n\t\t\tif (hashMap.size() == capacity){\r\n\t\t\t\tremoveElement(que.get(0));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t}\r\n\t\t\r\n\t\treturn returnValue;\r\n\t}",
"public void interestCacheInsert(InterestCacheEntry e)\n\t{\n\t\tif ( interestCache_purgeTimer == null ){\n\t\t\tinterestCache_purgeTimer = new DiffTimer(DiffTimer.TIMEOUT_INTEREST_CACHE_PURGE, null) ;\n\t\t\tif ( interestCache_purgeTimer != null ){\n\t\t\t\tinterestCache_purgeTimer.handle = setTimeout(interestCache_purgeTimer, INTEREST_CACHE_PURGE_INTERVAL) ;\n\t\t\t}\n\t\t}\n\t\tinterestCache.put(e.getInterest().getTaskId(),e) ;\n\t}",
"public void put(int key, int value) {\n if(!map.contains(key)){\n // If the cache is full, remove from the end of the deque and the map\n if(deque.size() == cacheSize){\n int lastElement = deque.removeLast();\n map.remove(lastElement);\n }else{\n // The data is found in the cache, but it could be anywhere\n // So iterate the queue and push it forward\n int index = 0, i = 0;\n Iterator<Integer> itr = deque.iterator();\n while(itr.hasNext()){\n if(itr.next() == key){\n index = i;\n break;\n }\n i++;\n }\n // Now index position locates the key in the deque. Remove it and add it\n // to the front of the queue\n deque.remove(index);\n }\n deque.push(key);\n // Add also the key to the map\n map.add(key);\n } \n }",
"@Override\n public void add(IBasicEntity ent) throws CachingException {\n EntityCachingServiceLocator.getEntityCachingService().add(ent);\n }",
"public void add(Object key, Object value){\n\t\tint bucketLoc = key.hashCode() % _numBuckets;\r\n\t\tif(_locate(key) == null){\r\n\t\t\tNode newNode = new Node(key,value,_buckets[bucketLoc]);\r\n\t\t\t_buckets[bucketLoc] = newNode;\r\n\t\t\t_count++;\r\n\t\t\t_loadFactor = (double) _count / (double) _numBuckets;\r\n\t\t\tif(_loadFactor > _maxLoadFactor){\r\n\t\t\t\t_increaseTableSize();\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t_buckets[bucketLoc]._value = value;\r\n\t\t}\r\n\t}",
"private void put(PrimitiveEntry entry) {\n int hashIndex = findHashIndex(entry.getKey());\n entries[hashIndex] = entry;\n }",
"public void add(long key, C value) {\n if(Long.toString(key).length() != 8) {\n \t//System.out.println(\"Sequence Error: Length is not 8.\\n\");\n return;\n }\n\n //clear the old key\n try {\n this.remove(key); \n } catch(Exception e) {\n sequence.add(new Entry<C>(key, value));\n size++;\n return;\n }\n //System.out.println(\"Found duplicate for key \" + key + \".\\n\"); \n sequence.add(new Entry<C>(key, value));\n size++;\n }",
"E add(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\tE obj = nodes[index].add(this, element.hashCode(), element, (byte) 1);\n\t\t\tif (obj == null) {\n\t\t\t\tsize++;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}",
"public Entry insert(Object key, Object value) {\r\n if (size / num_buckets > 0.75) { //table must be resized if load factor is too great\r\n this.resize();\r\n }\r\n Entry new_entry = new Entry();\r\n new_entry.key = key;\r\n new_entry.value = value;\r\n int comp_hash = compFunction(new_entry.key.hashCode()); //compresses key hash code\r\n if (hash_table[comp_hash] == null) { \r\n hash_table[comp_hash] = new DList();\r\n hash_table[comp_hash].insertFront(new_entry);\r\n } else {\r\n hash_table[comp_hash].insertFront(new_entry);\r\n }\r\n size++;\r\n return new_entry;\r\n }",
"@Override\n public boolean add(E e) {\n notNull(e);\n if (size >= elementData.length) {\n int newCapacity = (elementData.length << 1);\n elementData = Arrays.copyOf(elementData, newCapacity);\n }\n elementData[size++] = e;\n return true;\n }",
"@Override\n public void put(K key, V value) {\n int index = Math.floorMod(key.hashCode(), entryArr.length);\n if(containsKey(key)) {\n LinkedList<Entry<K, V>> pointer = entryArr[index];\n for(int i = 0; i < pointer.size(); i++) {\n if(pointer.get(i).keyEquals(new Entry<K, V>(key, null))) {\n pointer.get(i).value = value;\n break;\n }\n }\n } else {\n if(loadFactor()>maxLoad) {\n resize();\n }\n if (entryArr[index] == null) {\n entryArr[index] = new LinkedList<Entry<K, V>>();\n }\n entryArr[index].addLast(new Entry<K, V>(key, value));\n size++;\n }\n }",
"@Override\n\tpublic boolean add(ComparableSimpleEntry e) {\n\t\t// Delete exception and implement here\n\t\tif (elementsLeft > 0) {\n\t\t\telementsLeft--;\n\t\t\tsuper.offer(e);\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\tif (super.peek().compareTo(e) < 0) {\n\t\t\t\tsuper.offer(e);\n\t\t\t\tsuper.poll();\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"protected boolean putIntoCache(String key, String value) throws Exception {\n \t// Ensure the value is in cache. We want to avoid it being in the storage but not\n \t// the cache as this can lead to synchronization errors:\n \tboolean inserted = evictAndReplace(key);\n \t\n \t// Perform an insert:\n map.put(key, value);\n \tusageCounter.put(key, usageCounter.get(key) + 1);\n \t\n \treturn inserted;\n }",
"void addEntry(K key, V value);",
"public void put(Object key, Object value) throws Exception {\n CacheEntry entry = (CacheEntry)_hash.get(key);\n if (entry != null) {\n entry.setValue(value);\n touchEntry(entry);\n } else {\n\n if (_hash.size() == _max) {\n // purge and recycle entry\n entry = purgeEntry();\n entry.setKey(key);\n entry.setValue(value);\n } else {\n entry = new CacheEntry(key, value);\n }\n addEntry(entry);\n _hash.put(entry.getKey(), entry);\n }\n }",
"@Override\n public void addResource(String resourceKey, Object resource)\n {\n synchronized(InProcessCache.class) {\n if(!hasResource(resourceKey)) {\n WeakReference weak = new WeakReference(resource);\n _cache.put(resourceKey, weak);\n }\n }\n }",
"void addEntry(ReadOnlyEntry entry) throws DuplicateEntryException, OverlappingEventException,\n OverlappingAndOverdueEventException, EntryOverdueException;",
"public LRU_cache(int capacity) {\n cap = capacity;\n head.next = tail;\n tail.prev = head;\n }",
"public LRUCache(int capacity) {\n this.capacity = capacity;\n cache = new HashMap<Integer, DoubleListNode>();\n head = new DoubleListNode(-1,-1); //dummy\n tail = new DoubleListNode(-1,-1); //dummy\n head.next = tail;\n tail.prev = head;\n }",
"@Override\n public boolean add(final T element) {\n if (this.size > this.data.length - 1) {\n this.doubleArraySizeBy(2);\n }\n\n this.data[this.size++] = element;\n return true;\n }",
"public V add(K key, V value)\n { \n checkInitialization();\n if ((key == null) || (value == null))\n throw new IllegalArgumentException();\n else\n { \n V result = null; \n int keyIndex = locateIndex(key); \n if ((keyIndex < numberOfEntries) && \n key.equals(dictionary[keyIndex].getKey()))\n {\n // Key found; return and replace entry's value\n result = dictionary[keyIndex].getValue(); // Get old value\n dictionary[keyIndex].setValue(value); // Replace value \n }\n else // Key not found; add new entry to dictionary\n { \n makeRoom(keyIndex);\n dictionary[keyIndex] = new Entry(key, value);\n numberOfEntries++;\n ensureCapacity(); // Ensure enough room for next add\n } // end if \n return result;\n } // end if\n }",
"public void add(T e){\n ensureCapacity(size + 1);\n data[size++] = e;\n }",
"@Override\n public void add(E value) {\n if (value == null){\n throw new NullPointerException();\n }\n if (size + 1 > heap.length){\n alloc();\n }\n heap[size] = value;\n siftUp(size++);\n }",
"public boolean add(ElementType element){\n if(this.contains(element)){\n return false;\n }\n else{\n if(size==capacity){\n reallocate();\n }\n elements[size]=element;\n size++;\n }\n return true;\n }",
"public boolean add (T item){\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\t\t\t\t\n\t\t\t\t// find the item and return false if item is in the AVLTree\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\tif (!table[index].add(item))\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\t// we will add item, so increment modCount\n\t\t\t\tmodCount++;\n\n\t\t\t\thashTableSize++;\n\n\t\t\t\tif (hashTableSize >= tableThreshold)\n\t\t\t\t\trehash(2 * table.length + 1);\n\n\t\t\t\treturn true;\n\t}",
"@Override\n\t\t\tprotected boolean removeEldestEntry(final Map.Entry<K, V> eldest) {\n\t\t\t\treturn super.size() > LRUCache.this.cacheSize;\n\t\t\t}",
"public void incrMetaCacheHit() {\n metaCacheHits.inc();\n }",
"@Override\n public void add(T element) {\n add(size(), element);\n }",
"public void addToCache () {\n ArrayList <Location> gridCache = getGridCache();\n for (Location l : imageLocs) {\n gridCache.add (l);\n }\n }",
"public void add(AddressEntry entry) {\n addressEntryList.add(entry);\n }",
"public void addToMap(){\n\t\tInteger hc = currentQuery.hashCode();\n\t\tif (!hmcache.containsKey(hc)) {\n\t\t\thmcache.put(hc, 0);\n\t\t}else{\n\t\t\tInteger val = hmcache.get(hc) + (currentQuery.getWords().size());\n\t\t\thmcache.put(hc, val);\n\t\t}\n\t}"
] | [
"0.6788811",
"0.65870726",
"0.6531386",
"0.643955",
"0.63973343",
"0.6283783",
"0.6264583",
"0.6222436",
"0.6183346",
"0.6132765",
"0.6095157",
"0.60531867",
"0.60494494",
"0.6028545",
"0.60135144",
"0.59964806",
"0.5984853",
"0.5979338",
"0.59614605",
"0.5933111",
"0.5919192",
"0.5859615",
"0.5852883",
"0.5815465",
"0.57980007",
"0.5794234",
"0.5791872",
"0.57885736",
"0.57681876",
"0.5699272",
"0.5651383",
"0.5631902",
"0.5610431",
"0.5609448",
"0.5600583",
"0.55988616",
"0.55949116",
"0.55835503",
"0.55827785",
"0.55691934",
"0.55669504",
"0.55593085",
"0.55562794",
"0.55529386",
"0.5528078",
"0.5526139",
"0.5512493",
"0.5509295",
"0.55018467",
"0.548042",
"0.5463984",
"0.5451556",
"0.54297256",
"0.54083145",
"0.54053426",
"0.54027504",
"0.53972656",
"0.5393249",
"0.5381642",
"0.5374865",
"0.5372713",
"0.5368782",
"0.53554285",
"0.53477365",
"0.53399694",
"0.53345406",
"0.5331699",
"0.53312296",
"0.5326226",
"0.53212816",
"0.5317748",
"0.53151274",
"0.5292786",
"0.52895045",
"0.52889454",
"0.5287843",
"0.5268307",
"0.52626157",
"0.5250488",
"0.52466834",
"0.52461606",
"0.52414393",
"0.5234392",
"0.5230491",
"0.5224152",
"0.5218564",
"0.5214311",
"0.52137226",
"0.5210701",
"0.5203173",
"0.51994973",
"0.519883",
"0.51987404",
"0.518381",
"0.51834476",
"0.51806355",
"0.51793754",
"0.51759684",
"0.51759064",
"0.51748484",
"0.5174613"
] | 0.0 | -1 |
Remove an entry from the cache, returning the object to which it was associated. | public V remove(K key) {
CacheableObject cObj;
synchronized(theLock) {
cObj = valueMap.remove(key);
if (null != cObj) {
currentCacheSize -= cObj.containmentCount;
}
}
return (cObj == null) ? null : cObj.cachedObject;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T remove(Object entry) {\n return null;\n }",
"final CacheData<K, V> removeEntry(final Object key) {\r\n // find the place to put it and stuff it in, overwriting what was\r\n // previously there\r\n // synchronization is not needed here, if this value changes to null\r\n // either before or after a client looks at it, it's not a problem\r\n int pos = getKeyPosition(key);\r\n CacheData<K, V> cacheData = getCacheData(pos);\r\n setCacheData(pos, null);\r\n return cacheData;\r\n }",
"public Object remove(Object oKey)\n {\n // check if the cache needs flushing\n checkFlush();\n\n synchronized (this)\n {\n // determine if the key is in the cache\n Entry entry = (Entry) getEntryInternal(oKey);\n if (entry == null)\n {\n return null;\n }\n else\n {\n entry.discard();\n removeEntryInternal(entry);\n return entry.getValue();\n }\n }\n }",
"public abstract Object remove(CacheKey cacheKey);",
"public V remove(final Object key) {\r\n if (key == null) {\r\n return null;\r\n }\r\n\r\n CacheData<K, V> cacheData = removeEntry(key);\r\n if (cacheData != null) {\r\n return cacheData.getValue();\r\n }\r\n return null;\r\n }",
"@Override\n public T remove(Object key) {\n // Do I have an entry for it?\n Map.Entry<String, T> entry = entries.get((String) key);\n if (entry != null) {\n entries.remove(key);\n // Change the underlying map.\n return map.remove(prefix + key);\n }\n return null;\n }",
"Entry<Key, Value> remove(Entry<Key, Value> entry);",
"public Entry remove(K key){\r\n int loc = find(key);\r\n if(hashTable[loc]!=null && hashTable[loc].equals(key)){\r\n Entry<K,V> result = hashTable[loc];\r\n hashTable[loc].isDeleted = true;\r\n size--;\r\n return result;\r\n }\r\n else\r\n return null;\r\n }",
"public Entry remove(Object key) {\r\n if (find(key) == null) {\r\n return null;\r\n } else { \r\n try{\r\n int index = compFunction(key.hashCode());\r\n if (hash_table[index].size() == 1) {\r\n Entry entry = (Entry)hash_table[index].front().item();\r\n hash_table[index] = null;\r\n return entry;\r\n } else { \r\n DListNode current = (DListNode) hash_table[index].front();\r\n while(current.isValidNode()){\r\n Entry pair = (Entry) current.item();\r\n if(pair.key().equals(key)){\r\n current.remove();\r\n size--;\r\n return pair;\r\n }\r\n current = (DListNode) current.next();\r\n }\r\n \r\n System.out.println(\"Couldn't find the item\");\r\n return null;\r\n }\r\n \r\n }catch(InvalidNodeException e){\r\n return null;\r\n }\r\n }\r\n }",
"public Entry<C> remove(long key) {\n try {\n int index = search(key);\n Entry<C> temp = sequence.get(index);\n sequence.remove(index);\n size--;\n return temp;\n\n } catch (NullPointerException e) {\n System.out.println(\"Key \" + key + \" does not exist\");\n return null;\n }\n }",
"E remove(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\tE obj = nodes[index].remove(this, element.hashCode(), (byte) 1);\n\t\t\tif (obj != null) {\n\t\t\t\tsize--;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}",
"public Entry remove(Object key) {\n int i = compFunction(key.hashCode());\n SList chain = buckets[i];\n try {\n for (SListNode n = (SListNode) chain.front(); n.isValidNode(); n = (SListNode) n.next()) {\n Entry e = (Entry) n.item();\n if (e.key.equals(key)) {\n n.remove();\n size--;\n return e;\n }\n }\n } catch(InvalidNodeException e) {\n System.out.println(e);\n }\n return null; \n }",
"public V remove(final K key) {\n expunge();\n final int hash = hash(key);\n final int index = index(hash, entries.length);\n Entry<K, V> temp = entries[index];\n Entry<K, V> previous = temp;\n\n while (temp != null) {\n final Entry<K, V> next = temp.nextEntry;\n if (hash == temp.hash && key == temp.get()) {\n size--;\n if (previous == temp) {\n entries[index] = next;\n } else {\n previous.nextEntry = next;\n }\n return temp.value;\n }\n previous = temp;\n temp = next;\n }\n\n return null;\n }",
"public Item getDeletedEntry() {\n Item item = deletedEntries.lastElement();\n deletedEntries.pop();\n return item;\n }",
"@Override\n\tpublic void removeFromCache(T obj) {\n\t\tcache.remove(obj);\n\t}",
"@Override\n\tpublic V invalidateEntry(K key) {\n\t\tcheckNullKey(key);\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\treturn cache.remove(key);\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"public ContentObject remove(\n )\n {\n ContentObject removedObject = objects.remove(index);\n refresh();\n\n return removedObject;\n }",
"@Override\r\n\tpublic E remove() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic E remove() {\n\t\treturn null;\n\t}",
"public Entry<K, V> remove(K key) {\r\n try {\r\n int hash = key.hashCode();\r\n ListNode<Entry<K, V>> node = table[compFunction(hash)].front();\r\n if (node.isValidNode()) {\r\n Entry<K, V> entry = (Entry<K, V>) node.getItem();\r\n node.remove();\r\n return entry;\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Unhashable key: \" + e);\r\n }\r\n return null;\r\n }",
"public Entry remove(Object key) {\n int hashCode = key.hashCode();\n int index = compFunction(hashCode);\n\n if(defTable[index].isEmpty()) {\n return null;\n }\n\n Entry entry = new Entry();\n ListNode current = defTable[index].front();\n try{\n while(true) {\n if(( (Entry) current.item()).key().equals(key)) {\n entry.key = key;\n entry.value = ((Entry) current.item()).value();\n current.remove();\n size--;\n return entry;\n }\n if(current==defTable[index].back()) {\n break;\n }\n current = current.next();\n }\n } catch(Exception err) {\n System.out.println(err);\n }\n return null;\n }",
"public synchronized V remove(Object oKey)\n {\n // COH-6009: map mutations must be synchronized with event dispatch\n // to ensure in-order delivery\n Entry<K, V> entry = (Entry<K, V>) getEntryInternal(oKey);\n if (entry == null)\n {\n return null;\n }\n else\n {\n removeEntryInternal(entry);\n entry.onRemove();\n return entry.getValue();\n }\n }",
"T decache(String key) throws IOException;",
"protected ORecordInternal<?> popRecord(final ORID iRID) {\n\t\tif (maxSize == 0)\n\t\t\t// PRECONDITIONS\n\t\t\treturn null;\n\n\t\tacquireExclusiveLock();\n\t\ttry {\n\t\t\treturn entries.remove(iRID);\n\t\t} finally {\n\t\t\treleaseExclusiveLock();\n\t\t}\n\t}",
"public Object remove();",
"public Object remove(String key);",
"private void removeEntry(CacheEntry entry) {\n\t\tmap.remove(entry.getKey());\n\t\tsize.decrementAndGet();\n\t\tindex.remove(entry.getItem());\n\t\tentry.delete();\n\t}",
"public Object removeItem (String key);",
"protected CacheEntry purgeEntry() throws Exception {\n CacheEntry entry = _first;\n\n // Notify policy listeners first. if any of them throw an\n // eviction exception, then the internal data structure\n // remains untouched.\n CachePolicyListener listener;\n for (int i=0; i<listeners.size(); i++) {\n listener = (CachePolicyListener)listeners.elementAt(i);\n listener.cacheObjectEvicted(entry.getValue());\n }\n\n removeEntry(entry);\n _hash.remove(entry.getKey());\n\n entry.setValue(null);\n return entry;\n }",
"public E remove() {\n\t\t// your code here\n\t\treturn null;\n\t}",
"public E remove();",
"public E remove();",
"public synchronized Object remove( Object key ) {\n\t\tObject intvalue = mapKeyPos.remove(key);\n\t\tif ( intvalue != null ) {\n\t\t\tint pos = ((Integer)intvalue).intValue();\n\t\t\tObject temp = values[pos];\n\t\t\tkeys[pos] = null;\n\t\t\tvalues[pos] = null;\n\t\t\tstatus[pos] = LRU_OLD;\n\t\t\t//System.out.println(\"CountLimiteLRU: remove(\"+key+\") = \"+temp);\n\t\t\treturn temp;\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n public V remove(K key) {\n Entry<K, V> removed = new Entry<>(null, null);\n if(containsKey(key)) {\n LinkedList<Entry<K, V>> pointer = entryArr[Math.floorMod(key.hashCode(), entryArr.length)];\n for(int i = 0; i < pointer.size(); i++) {\n if(pointer.get(i).keyEquals(new Entry<K, V>(key, null))) {\n removed = pointer.get(i);\n pointer.remove(pointer.get(i));\n break;\n }\n }\n size--;\n }\n return removed.value;\n }",
"protected abstract void remove(E entry);",
"public V remove(Object k) {\n\t\tint index = findKeyIndex(k);\n\n\t\t// we found the right position, now do the removal\n\t\tif (keys[index] != null) {\n\t\t\t// we found the object\n\n\t\t\t// same problem here as with put\n\t\t\tV v = values[index];\n\t\t\tkeys[index] = (K) deletedObject;\n\t\t\tvalues[index] = (V) deletedObject;\n\t\t\tmodCount++;\n\t\t\telements--;\n\t\t\treturn v;\n\t\t} else\n\t\t\t// we did not find the key\n\t\t\treturn null;\n\t}",
"@Override\r\n public void remove(IMObject object) {\r\n cache.remove(object);\r\n }",
"public Object remove(int index) {\r\n Entry e = entry(index);\r\n remove(e);\r\n return e.element;\r\n }",
"@Override\n public T remove() {\n //make sure there is something in the set\n if (first == null)\n return null;\n //make a reference to the data in the first node, then\n //update the reference to the second node\n T val = first.value;\n first = first.next;\n //return the data\n numItems--;\n return val;\n }",
"@Override\n public V remove(Object key) {\n \t\n \tLinkedList<Entry> tempBucket = chooseBucket(key);\n \t\n \tfor(int i=0;i<tempBucket.size();i++) {\n\t \tEntry tempEntry = tempBucket.get(i);\n\t \t\t\n\t \tif(tempEntry.getKey() == key) {\n\t \t\tV returnValue = tempEntry.getValue();\n\t \t\ttempBucket.remove(i);\n\t \t\tsize --;\n\t \t\treturn returnValue;\n\t \t}\n\t }\n \t\n \tif(size < buckets.length*BETA) {\n \t\trehash(SHRINK_FACTOR);\n \t}\n \t\n \treturn null;\n }",
"E remove(Id id);",
"@Override\r\n\tpublic Object removeObject(Object key) {\n\t\treturn null;\r\n\t}",
"Object remove();",
"@Override\n\tpublic Entry<K, V> remove(Entry<K, V> e) throws InvalidEntryException {\n\t\treturn null;\n\t}",
"public Object remove(int index) {\n\n\t\tif (index < 0 || index >= this.size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"the index [\" + index\n\t\t\t\t\t+ \"] is not valid for this list with the size [\"\n\t\t\t\t\t+ this.size + \"].\");\n\t\t}\n\t\tObject removed = this.storedObjects[index];\n\t\tfor (int i = index + 1; i < this.size; i++) {\n\t\t\tthis.storedObjects[i - 1] = this.storedObjects[i];\n\t\t}\n\t\tthis.size--;\n\t\tthis.storedObjects[this.size] = null;\n\n\t\treturn removed;\n\t}",
"@Override\n public <T> T delete(String correlationId, String key) {\n if (key == null)\n throw new NullPointerException(\"Key cannot be null\");\n\n // Cleanup the stored states\n this.cleanup();\n\n // Get the entry\n StateEntry entry = this._states.getOrDefault(key, null);\n\n // Remove entry from the cache\n if (entry != null) {\n this._states.remove(key);\n return (T) entry.getValue();\n }\n\n return null;\n }",
"public V remove(K key)\n\t{\n\t\tcheckForNulls(key);\n\t\tint n = Math.abs(key.hashCode() % entries.length);\n\t\t\n\t\tif (entries[n] == null)\n\t\t\treturn null;\n\t\t\n\t\tV ret = null;\n\t\tfor (Entry e : entries[n])\n\t\t{\n\t\t\tif (key.equals(e.key) == true)\n\t\t\t\tret = e.value;\n\t\t}\n\t\t\n\t\tif (ret == null)\n\t\t\treturn null;\n\t\t\n\t\tentries[n].remove(new Entry(key, null));\n\t\treturn ret;\n\t}",
"@Override\n\tpublic V remove(Object key) {\n\t\tkeys.remove(key);\n\t\treturn map.remove(key);\n\t}",
"public Location remove() {\n\t\t//empty set\n\t\tif (head == null){\n\t\t\treturn null;\n\t\t}\n\n\t\t//removes and returns the SquarePosition object from the top of the set\n\t\tLocation removedLocation = head.getElement();\n\t\thead = head.next;\n\t\tsize --;\n\t\treturn removedLocation;\n\t}",
"public void removeObject(T object) {\r\n\t\tif(cache.contains(object) == false) //if not found in cache\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Object not found.\");\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tcache.remove(cache.indexOf(object));\r\n\t\t}\r\n\t\t\r\n\t}",
"public final CMR pop()\n\t{\n\t\tif (cmr_queue_.isEmpty()) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tCMR \tcmr = (CMR) cmr_queue_.firstElement();\n\t\t\tcmr_queue_.removeElementAt(0);\n\t\t\treturn cmr;\n\t\t}\n\t}",
"private void removeTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n SoftReference<TimeEntry> timeEntrySoftReference = null;\n ListIterator<SoftReference<TimeEntry>> iterator = timeEntries.listIterator();\n while (iterator.hasNext() && (timeEntrySoftReference == null))\n {\n SoftReference<TimeEntry> softReference = iterator.next();\n if ((softReference != null) && softReference.get() == timeEntry)\n {\n timeEntrySoftReference = softReference;\n }\n }\n if (timeEntrySoftReference != null)\n {\n timeEntries.remove(timeEntrySoftReference);\n }\n }\n }",
"public static Object remove(String key){\n return getThreadContext().remove(key);\n }",
"public boolean remove(T anEntry);",
"public V remove(K key, V value) {\n if (key == null || !keySet.contains(key))\n return null;\n int index = reduce(key, buckets.size());\n ArrayList<Entry> items = buckets.get(index);\n for (Entry e : items) {\n if (e.key.equals(key)) {\n if (e.value.equals(value)) {\n\n items.remove(e);\n keySet.remove(key);\n numEntries--;\n return e.value;\n }\n }\n }\n return null;\n }",
"V remove(K key);",
"V remove(K key);",
"V remove(K key);",
"public V remove(K k) {\n int i = h(k);\r\n int z = i;\r\n int j = 0;\r\n while ((K)htable[i].key() != k) {\r\n i = (z + p(k, ++j)) % htable.length;\r\n if (j == htable.length) {\r\n return null;\r\n }\r\n while (htable[i] == null) {\r\n i = (z + p(k, ++j)) % htable.length;\r\n if (j == htable.length) {\r\n return null;\r\n }\r\n }\r\n }\r\n KVPair remove = htable[i];\r\n htable[i] = TOMBSTONE;\r\n size--;\r\n //resize table\r\n if (loadFactor() < 0.25 && (htable.length / 2) >= initCap) {\r\n KVPair[] temp = new KVPair[htable.length / 2];\r\n for (int y = 0; y < htable.length; y++) {\r\n if (htable[y] == null || htable[y] == TOMBSTONE) {\r\n continue;\r\n }\r\n i = (htable[y].key().hashCode() + temp.length) % temp.length;\r\n z = i;\r\n j = 0;\r\n while (temp[i] != null && temp[i] != TOMBSTONE) {\r\n i = (z + p(k, ++j)) % temp.length;\r\n if (j == temp.length) {\r\n throw new IllegalStateException();\r\n }\r\n }\r\n temp[i] = htable[y];\r\n }\r\n htable = temp.clone();\r\n }\r\n return (V)remove.value();\r\n }",
"public V remove(final K key)\n {\n // Remove from the map\n final StackElement removedElement = this.hashMap.remove(key);\n\n // If removed, fix the double linked list and update newest and eldest element\n if (removedElement != null)\n {\n this.removeStackElement(removedElement);\n return removedElement.value;\n }\n\n return null;\n }",
"@Override\n public T remove(final int index) {\n this.checkIndex(index);\n T object = this.data[index];\n this.remove(object);\n return object;\n }",
"public synchronized V remove(K k) {\n final int h = getHash(k), hash = h % buckets.length;\n ItemNode<K,V> prev = buckets[hash];\n if (prev == null) \n return null;\n else if (k.equals(prev.k)) { // Delete first ItemNode\n V old = prev.v;\n cachedSize--;\n buckets[hash] = prev.next;\n return old;\n } else { // Search later ItemNodes\n while (prev.next != null && !k.equals(prev.next.k))\n prev = prev.next;\n // Now prev.next == null || k.equals(prev.next.k)\n if (prev.next != null) { // Delete ItemNode prev.next\n V old = prev.next.v;\n cachedSize--; \n prev.next = prev.next.next;\n return old;\n } else\n return null;\n }\n }",
"@Override\r\n\tpublic E removeFirst() {\n\t\treturn null;\r\n\t}",
"public Long remove(E elem) {\n Long expiryTime = elemMap.remove(elem);\n if (expiryTime != null) {\n Set<E> set = expiryMap.get(expiryTime);\n if (set != null) {\n set.remove(elem);\n // We don't need to worry about removing empty sets,\n // they'll eventually be removed when they expire.\n }\n }\n return expiryTime;\n }",
"@Override\n\tpublic T retrieveItem(T obj) {\n\t\tif(cache.contains(obj)) {\n\t\t\tfor (T objInSet : cache) {\n\t\t\t\tif (objInSet.equals(obj)) {\n\t\t\t\t\treturn objInSet;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"protected MapElement removeElement(int key) {\n int index = key % capacity;\n if (index < 0) {\n index = -index;\n }\n\n if (map[index] == null) {\n return null;\n } else {\n MapElement me = map[index];\n MapElement prev = null;\n\n while (true) {\n if (me.getKey() == key) {\n // Keys match\n if (me.beforeRemove()) {\n if (prev == null) {\n // The first element in the chain matches\n map[index] = me.getNext();\n } else {\n // An element further down in the chain matches - \n // delete it from the chain\n prev.setNext(me.getNext());\n }\n contents--;\n }\n return me;\n } else {\n // Keys don't match, try the next element\n prev = me;\n me = me.getNext();\n if (me == null) {\n return null;\n }\n }\n }\n }\n }",
"@Override\n\tpublic V remove(K key) {\n\t\treturn null;\n\t}",
"public Object pop() {\n Object valueToReturn = this.peek();\n this.collection.remove(this.collection.size()-1);\n return valueToReturn;\n }",
"public final synchronized Object removeAttribute(String name) {\n\t if ( m_cache == null)\n\t \treturn null;\n\t return m_cache.remove(name);\n\t}",
"@Override\n\tpublic V remove(K key) {\n\t\t\n\t\tNode currentNode = firstNode;\n\t\tNode previousNode = firstNode;\n\t\t\n\t\twhile(currentNode.key != key){\n\t\t\tif(currentNode.getNextNode() == null){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpreviousNode = currentNode;\n\t\t\t\tcurrentNode = currentNode.getNextNode();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(currentNode == firstNode){\n\t\t\tcurrentNode = currentNode.getNextNode();\n\t\t\tnumberOfEntries--;\n\t\t}\n\t\telse{\n\t\t\tpreviousNode.next = currentNode.getNextNode();\n\t\t\tnumberOfEntries--;\n\t\t}\n\t\t\n\t\treturn (V)currentNode;\n\t}",
"public V remove(String key) {\n if (!containsKey(key)) return null;\n int index = hashOf(key);\n Object value = values[index];\n values[index] = null;\n if (value != null) size--;\n return (V) value;\n }",
"private Entry1 removeEntryForKey(Object key){\n Object k= maskNull(key);\n int i=hCode(key,table.length);\n Entry1 previous=null;\n for(Entry1 e=table[i]; e!=null; e=e.getNext()){\n if(eq(k, maskNull(e.getKey()))){\n if(e==table[i]){\n table[i]=e.getNext();\n } else{\n previous.setNext(e.getNext());\n }\n return e;\n }\n previous=e;\n }\n return null;\n }",
"@Override\n public synchronized E remove(int index) {\n E result = this.get(index);\n if (index < this.size() - 1) {\n System.arraycopy(this.container, index + 1, this.container, index, this.size() - (index + 1));\n }\n this.container[--this.pointer] = null;\n return result;\n }",
"V remove(Object key);",
"public V remove(K key) {\n\tint bucket=Math.abs(key.hashCode()%capacity);\n\t//for(int i=0;i<table[bucket].size()-1;i++){\n\tfor(MyEntry i:table[bucket]) { \n\t if(i.key==key) {\n\t\t//location.remove(key\n\t\tV previousvalue=i.value;\n\t\ttable[bucket].remove(i);\n\t\tsize--;\n\t\t/*if(table[bucket].size()==0) {\n\t\t utilizedbuckets.remove(bucket);\n\t\t}*/\n\t\treturn previousvalue;\n\t }\t\n\t}\n\treturn null;\n }",
"@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic V remove(K key) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t * Iterate through new collection: n\n\t */\n\t\tint j = findIndex(key);\n\t\tif ( j == size() || key.compareTo(map.get(j).getKey()) != 0 ) return null;\n\t\treturn map.remove(j).getValue();\n\t}",
"@Override\n public V remove(Object key) {\n int index = key.hashCode() % table.length;\n if (index < 0) {\n index += table.length;\n }\n if (table[index] == null) {\n return null; // key is not in table\n }\n for (Entry<K, V> entry : table[index]) {\n if (entry.getKey().equals(key)) {\n V value = entry.getValue();\n table[index].remove(entry);\n numKeys--;\n if (table[index].isEmpty()) {\n table[index] = null;\n }\n return value;\n }\n }\n return null;\n }",
"public V remove(K k) {\n final int h = getHash(k), stripe = h % lockCount, hash = h % buckets.length;\n final Holder<V> old = new Holder<V>();\n ItemNode<K,V>[] bs;\n synchronized(locks[stripe]){\n bs = buckets;\n final ItemNode<K,V> node = bs[hash], \n oldNode = ItemNode.delete(node, k, old);\n bs[hash] = oldNode;\n sizes.addAndGet(stripe, oldNode != node ? -1 : 0);\n }\n return old.get();\n }",
"public <T> T remove(Object key) {\n if(attributes == null)\n return null;\n Object value = attributes.remove(key);\n return value == null ? null : (T) value;\n }",
"@Override\n\tpublic V remove(Object key) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic V remove(Object key) {\n\t\treturn null;\n\t}",
"public Object pop() {\n\t\tObject o = get(getSize() - 1);\n\t\tremove(getSize() - 1);\n\t\treturn o;\n\t}",
"@Override\r\n public ValueType remove(KeyType key) {\r\n // if capacity is 0, return null\r\n if (capacity == 0) {\r\n return null;\r\n }\r\n\r\n int index = hashFunction(key); // the index of the pair in the hashTable\r\n\r\n // If the linked list at the index is null, target is not exist, return null\r\n if (hashTable[index] == null) {\r\n return null;\r\n }\r\n\r\n int i = 0; // index tracker\r\n boolean isFound = false; // record whether the key is found\r\n // find the key and record the index of the key (i)\r\n for (HashNode node : hashTable[index]) {\r\n if (node.key.equals(key)) {\r\n isFound = true;\r\n break;\r\n }\r\n i++;\r\n }\r\n\r\n // if the key is found, remove with index of i. Otherwise return null\r\n if (isFound) {\r\n size--;\r\n return hashTable[index].remove(i).value;\r\n } else {\r\n return null;\r\n }\r\n }",
"public E remove(String key) {\n TSTNode<E> node = getNode(key);\n deleteNode(getNode(key));\n return (node != null ? node.data : null);\n }",
"@Override\n\tpublic Object remove(String name) {\n\t\tMap<String, Object> scope = threadLocal.get();\n\t\treturn scope.remove(name);\n\t}",
"public Tile removeTile() {\n if (tileBag.size() == 0) {\n return null;\n }\n return tileBag.remove(0);\n }",
"void evictFromCache( Long id );",
"public V remove(K key)\r\n\t{\r\n\t\t//TODO: add your code here\r\n\t\tV oldVal;\r\n\t\tint slot = findSlot(key, false); // check if it already exists\r\n\t\t// sets the slot in the map to DUMMY value if it exists\r\n\t\tif (slot >= 0)\r\n\t\t{\r\n\t\t\toldVal = table[slot].getValue();\r\n\t\t\ttable[slot] = DUMMY;\r\n\t\t\tcount--;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\toldVal = null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn oldVal;\r\n\t}",
"public V remove(K key);",
"public V remove(K key);",
"public T remove(T value){\n\t return value;\n\t}",
"@Override\n public V remove(K key) {\n return null;\n }",
"@Override\n\tpublic String remove(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key)) {\n\t\t\t\thashArray[hashVal] = deleted;\n\t\t\t\tthis.numOfItems--;\n\t\t\t\treturn key;\n\t\t\t}\n\t\t\thashVal++;\n\t\t\thashVal = hashVal % size;\n\n\t\t}\n\t\treturn null;\n\t}",
"synchronized public V removeOne() {\n int i = 0;\n for (; i < keys.length; i++) {\n if (keys[i] == null || keys[i] == skip) {\n continue;\n }\n break;\n }\n if (i == keys.length) {\n return null;\n }\n return (V) remove(keys[i]);\n }",
"public Object remove(int index) {\r\n return deref(refs.remove(index));\r\n }",
"@Override\n\tpublic V remove(K pLlave) {\n\t\tint posicion = hash(pLlave);\n\t\tSequentialSearchST<K,V> st = map.darElemento(posicion);\n\t\tNodoTabla<K,V> buscado = st.remove(pLlave);\n\t\tif(buscado == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn buscado.darValor();\n\t\t}\n\t}",
"public T remove(int index) {\n return null;\n }",
"@Override\n public V remove(K key) {\n// int index = h.apply(key, this.array.length);\n// LinkedList<Entry<K,V>> chain = this.array[index];\n// for (Entry<K,V> item : chain) {\n// if (item.key == key) {\n// chain.remove(item);\n// itemCount--;\n// return item.value;\n// }\n// }\n// return null; // Throw exception\n for (int i = 0; i < this.array.length; i++) {\n if (this.array[i] != null) {\n for (Entry<K,V> item : this.array[i]) {\n if (item.key == key) {\n this.array[i].remove(item);\n itemCount--;\n return item.value;\n }\n }\n }\n }\n return null;\n }",
"public CourseReading remove(String key) {\n\t\tif (containsKey(key) == true) {\r\n\t\t\tint HashKey = key.hashCode() % 31;\r\n\t\t\tif (HashKey > K.length - 1) {\r\n\t\t\t\twhile (HashKey > K.length - 1) {\r\n\t\t\t\t\tHashKey %= K.length;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (String c : K[HashKey]) {\r\n\t\t\t\tif (c.equals(key)) {\r\n\t\t\t\t\t// get location of key to delete it\r\n\t\t\t\t\tint KeyLocation = K[HashKey].indexOf(key);\r\n\t\t\t\t\tK[HashKey].remove(KeyLocation);\r\n\t\t\t\t\tV[HashKey].remove(KeyLocation);\r\n\t\t\t\t\tsize--;\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"void removeEntry(K key);"
] | [
"0.72286934",
"0.70595056",
"0.6967132",
"0.6647923",
"0.6592157",
"0.6448426",
"0.63981956",
"0.6384716",
"0.6382446",
"0.63500947",
"0.63464767",
"0.63034",
"0.62992084",
"0.62956566",
"0.62035686",
"0.61993724",
"0.6195639",
"0.6183713",
"0.61533356",
"0.61313826",
"0.60920835",
"0.6090731",
"0.6069101",
"0.606292",
"0.6029464",
"0.6028781",
"0.5989767",
"0.59861505",
"0.59833705",
"0.5957104",
"0.59519225",
"0.59519225",
"0.5949181",
"0.594508",
"0.594171",
"0.5941395",
"0.59327364",
"0.5913826",
"0.5884294",
"0.58760846",
"0.5868259",
"0.58628154",
"0.58601624",
"0.58575606",
"0.58563364",
"0.5840867",
"0.583115",
"0.582888",
"0.578247",
"0.57661957",
"0.5765552",
"0.57595116",
"0.57458293",
"0.57439905",
"0.571766",
"0.5715085",
"0.5715085",
"0.5715085",
"0.5712612",
"0.57103366",
"0.5707821",
"0.5702801",
"0.570124",
"0.5701165",
"0.56984365",
"0.5695931",
"0.5695383",
"0.5691018",
"0.5683877",
"0.5680478",
"0.5679577",
"0.5675995",
"0.566643",
"0.56579614",
"0.56470037",
"0.5638327",
"0.56381613",
"0.563626",
"0.5629",
"0.5625452",
"0.5625452",
"0.5625146",
"0.56209564",
"0.5619504",
"0.5616394",
"0.56145793",
"0.5606874",
"0.5592277",
"0.55910933",
"0.55910933",
"0.55896163",
"0.5570836",
"0.5570321",
"0.55658084",
"0.5557104",
"0.5549714",
"0.5544099",
"0.55428296",
"0.5535154",
"0.55302364"
] | 0.6866013 | 3 |
Return the number of nonexpired values in the cache. | public int size() {
int size = 0;
Collection<CacheableObject> values = new HashSet<CacheableObject>();
synchronized(theLock) {
values.addAll(valueMap.values());
}
for (CacheableObject cObj : values) {
if (! this.isExpired(cObj)) {
size++;
}
}
return size;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long get_cachetotnonstoreablemisses() throws Exception {\n\t\treturn this.cachetotnonstoreablemisses;\n\t}",
"public int getNumCacheMiss() {\n return cacheHandler.getCountCacheMiss();\n }",
"int getCachedCount();",
"public int getMissCountExpired() {\n return missCountExpired;\n }",
"long getCacheMisses();",
"public Long get_cachetotpethits() throws Exception {\n\t\treturn this.cachetotpethits;\n\t}",
"public Long get_cachetotnon304hits() throws Exception {\n\t\treturn this.cachetotnon304hits;\n\t}",
"public Long get_cachetotrevalidationmiss() throws Exception {\n\t\treturn this.cachetotrevalidationmiss;\n\t}",
"public Long get_cachetotstoreablemisses() throws Exception {\n\t\treturn this.cachetotstoreablemisses;\n\t}",
"public int getCachedCount() {\n return cached_.size();\n }",
"public Long get_cachetotparameterizednon304hits() throws Exception {\n\t\treturn this.cachetotparameterizednon304hits;\n\t}",
"public int getNumCacheHit() {\n return cacheHandler.getCountCacheHit();\n }",
"public int getCachedCount() {\n return cached_.size();\n }",
"public Long get_cachetotmisses() throws Exception {\n\t\treturn this.cachetotmisses;\n\t}",
"public int size() {\n return cache.size();\n }",
"public Long get_cachetotflashcachemisses() throws Exception {\n\t\treturn this.cachetotflashcachemisses;\n\t}",
"public Long get_cachetotnonparameterizedinvalidationrequests() throws Exception {\n\t\treturn this.cachetotnonparameterizedinvalidationrequests;\n\t}",
"public int size() {\r\n\t\treturn cache.size();\r\n\t}",
"public int sizeNoExpire()\n\t{\n\t\treturn super.size();\n\t}",
"public Long get_cachetotinvalidationrequests() throws Exception {\n\t\treturn this.cachetotinvalidationrequests;\n\t}",
"public Long get_cachepercentstoreablemiss() throws Exception {\n\t\treturn this.cachepercentstoreablemiss;\n\t}",
"public long getNonMissingCount() {\n return nonMissingCount;\n }",
"public Long get_cachetotflashcachehits() throws Exception {\n\t\treturn this.cachetotflashcachehits;\n\t}",
"@Override\n\tpublic int size() {\n\t\treadLock.lock();\n\t\ttry {\n\t\t\treturn cache.size();\n\t\t} finally {\n\t\t\treadLock.unlock();\n\t\t}\n\t}",
"long getCacheHits();",
"public int getUnreadMessagesCount() {\n if (pendingIncomingMessages != null){\n\n /*\n * Return the size of the cache\n */\n return pendingIncomingMessages.size();\n\n }\n\n /*\n * Empty cache return 0\n */\n return 0;\n }",
"int getUnreachableCount();",
"public int get_filesCount() throws YAPI_Exception\n {\n int res;\n synchronized (this) {\n if (_cacheExpiration <= YAPIContext.GetTickCount()) {\n if (load(_yapi._defaultCacheValidity) != YAPI.SUCCESS) {\n return FILESCOUNT_INVALID;\n }\n }\n res = _filesCount;\n }\n return res;\n }",
"int getMissingCount();",
"public Long get_cachecurmisses() throws Exception {\n\t\treturn this.cachecurmisses;\n\t}",
"public Long get_cachetotparameterizedinvalidationrequests() throws Exception {\n\t\treturn this.cachetotparameterizedinvalidationrequests;\n\t}",
"public Long get_cachetotrequests() throws Exception {\n\t\treturn this.cachetotrequests;\n\t}",
"public Long get_cachetothits() throws Exception {\n\t\treturn this.cachetothits;\n\t}",
"public int size() {\n synchronized (cacheMap) {\n return cacheMap.size();\n }\n }",
"public int getCacheCount() {\n DiskCacheManager diskCacheManager = getDiskCacheManager();\n if (diskCacheManager == null) return 0;\n return diskCacheManager.getCacheCount();\n }",
"public Long get_cachetotpetrequests() throws Exception {\n\t\treturn this.cachetotpetrequests;\n\t}",
"public int size()\n {\n // check if the cache needs flushing\n checkFlush();\n\n return super.size();\n }",
"public long getExpiredSessions();",
"public Long get_cacherecentpercentstoreablemiss() throws Exception {\n\t\treturn this.cacherecentpercentstoreablemiss;\n\t}",
"public Long get_cachetot304hits() throws Exception {\n\t\treturn this.cachetot304hits;\n\t}",
"public int getCount() {\n \t Log.i(TAG, \"getCount() called\");\n return provide.getItemCache().getCount();\n }",
"public Long get_cachetotsuccessfulrevalidation() throws Exception {\n\t\treturn this.cachetotsuccessfulrevalidation;\n\t}",
"@Override\n public synchronized int size() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.size();\n }",
"long getEvictions();",
"public static int anonymousSize() {\n\t\tInteger count = new Integer(0);\n\t\tObject object = cache.get(FQN_COUNT, ANONYMOUS_COUNT);\n\t\tif (object != null) {\n\t\t\tcount = (Integer) object;\n\t\t}\n\n\t\treturn (count == null ? 0 : count.intValue());\n\t}",
"int getSize() {\n synchronized (lock) {\n return cache.size();\n }\n }",
"public static int registeredSize() {\n\t\tInteger count = new Integer(0);\n\t\tObject object = cache.get(FQN_COUNT, LOGGED_COUNT);\n\t\tif (object != null) {\n\t\t\tcount = (Integer) object;\n\t\t}\n\n\t\treturn (count == null ? 0 : count.intValue());\n\t}",
"@Override\n\tpublic int getSizeToCache() {\n\t\treturn 0;\n\t}",
"public Long get_cachetotparameterized304hits() throws Exception {\n\t\treturn this.cachetotparameterized304hits;\n\t}",
"int getTotalLength() {\n synchronized (lock) {\n return cache.getTotalLength();\n }\n }",
"public Long get_cachetotexpireatlastbyte() throws Exception {\n\t\treturn this.cachetotexpireatlastbyte;\n\t}",
"public Long get_cachenumcached() throws Exception {\n\t\treturn this.cachenumcached;\n\t}",
"int getNotInCount();",
"public long count() {\n\t\treturn 0;\n\t}",
"public long count() {\n\t\treturn 0;\n\t}",
"public long getMissingCount() {\n return nullCount + nanCount + infinityCount;\n }",
"@Test\n public void testCoh3710_size()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertEquals(0, getNamedCache(getCacheName0()).size());\n }\n });\n }",
"public int getMissCountNotFound() {\n return missCountNotFound;\n }",
"public Long get_cachecurhits() throws Exception {\n\t\treturn this.cachecurhits;\n\t}",
"public Long get_cachestoreablemissesrate() throws Exception {\n\t\treturn this.cachestoreablemissesrate;\n\t}",
"public Long get_cachetotparameterizedrequests() throws Exception {\n\t\treturn this.cachetotparameterizedrequests;\n\t}",
"@Override\r\n\tpublic long count() {\n\t\treturn 0;\r\n\t}",
"public Map<String, Integer> getNumData(){\n\t\treturn numCache;\n\t}",
"public Long get_cachetotparameterizedhits() throws Exception {\n\t\treturn this.cachetotparameterizedhits;\n\t}",
"public int size() {\n processQueue();\n return weakCache.size();\n }",
"@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic long count() {\n\t\treturn 0;\n\t}",
"public long getCacheExpirationSeconds() {\n return cache.getCacheExpirationSeconds();\n }",
"int getSeenInfoCount();",
"public Integer count() {\n\t\tif(cache.nTriples != null)\n\t\t\treturn cache.nTriples;\n\t\treturn TripleCount.count(this);\n\t}",
"protected int numberRemainingTickets()\n\t{\n\t\treturn tickets.size();\n\t}",
"public int getNotYetCount() {\r\n return root.getNotYetCount();\r\n }",
"public long count() { return count.get(); }",
"int getEntryCount();",
"public Long get_cachetotresponsebytes() throws Exception {\n\t\treturn this.cachetotresponsebytes;\n\t}",
"@Override\n public int getG2HashTableNumberOfEntries() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.G2_HASH_TABLE_NUMBER_OF_ENTRIES_);\n return ((Integer)retnValue).intValue ();\n }",
"Integer countForKey(String key);",
"public int getCacheSize() {\n return cache.size();\n }",
"@Override\n public int getRetainedEntries(final boolean valid) {\n if (otherCheckForSingleItem(mem_)) { return 1; }\n final int preLongs = extractPreLongs(mem_);\n final int curCount = (preLongs == 1) ? 0 : extractCurCount(mem_);\n return curCount;\n }",
"int getInvalidLoginCount();",
"public Long get_cacheutilizedmemorykb() throws Exception {\n\t\treturn this.cacheutilizedmemorykb;\n\t}",
"private int sizeForHashTable()\n {\n String compare=\"\";\n int numberOfdates = 0;\n for (int i=0; i <= hourly.size();i++)\n {\n if (i==0)\n {\n numberOfdates +=1;\n compare = data.get(i).getFCTTIME().getPretty();\n }else if(compare != data.get(i).getFCTTIME().getPretty())\n {\n numberOfdates+=1;\n compare = data.get(i).getFCTTIME().getPretty();\n }\n }\n return numberOfdates;\n }",
"public static int performanceCountGet() { return 0; }",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"public Long get_cacheparameterizednon304hitsrate() throws Exception {\n\t\treturn this.cacheparameterizednon304hitsrate;\n\t}",
"@Override\n\tpublic long getCacheSize() {\n\t\treturn 0;\n\t}",
"public int count( K key ) {\n Integer i = map.get( key );\n return i == null ? 0 : i;\n }",
"@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }",
"int getReaultCount();",
"@Override\n\tpublic Long count() {\n\t\treturn null;\n\t}"
] | [
"0.7507637",
"0.74986273",
"0.73533326",
"0.723693",
"0.7171973",
"0.70934397",
"0.7051619",
"0.69373566",
"0.69037694",
"0.6897482",
"0.68918234",
"0.68408483",
"0.6822333",
"0.6755612",
"0.67415935",
"0.6720332",
"0.6693073",
"0.6691998",
"0.6650096",
"0.6601531",
"0.6531435",
"0.64827204",
"0.64685875",
"0.6462427",
"0.6440192",
"0.6437824",
"0.64212215",
"0.6373951",
"0.63339925",
"0.6331808",
"0.63166463",
"0.6316588",
"0.63016194",
"0.62986976",
"0.6293772",
"0.62931913",
"0.62661433",
"0.6239542",
"0.62328345",
"0.6225916",
"0.62135357",
"0.619905",
"0.6189424",
"0.61786413",
"0.61761516",
"0.61752814",
"0.61395437",
"0.61160326",
"0.61147594",
"0.60900396",
"0.6043576",
"0.60427445",
"0.6012481",
"0.5996252",
"0.5996252",
"0.5989487",
"0.59771854",
"0.59656227",
"0.5958794",
"0.5951921",
"0.5949768",
"0.59467715",
"0.5924037",
"0.5909685",
"0.5894607",
"0.5883213",
"0.5883213",
"0.5883213",
"0.5883213",
"0.5883213",
"0.5883213",
"0.5883213",
"0.5883213",
"0.5874449",
"0.58647627",
"0.5850933",
"0.5837117",
"0.5831687",
"0.582199",
"0.58197546",
"0.58054656",
"0.5779751",
"0.57654196",
"0.5744277",
"0.57406324",
"0.5732326",
"0.57246697",
"0.5722915",
"0.5719143",
"0.5718547",
"0.5718547",
"0.5718547",
"0.5718547",
"0.5718547",
"0.5699031",
"0.56988424",
"0.5697082",
"0.5695227",
"0.5686568",
"0.56854075"
] | 0.7400878 | 2 |
Determines if the cache contains the given key. | public boolean containsKey(K key) {
synchronized(theLock) {
return valueMap.containsKey(key) && ! isExpired(valueMap.get(key));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isKeyInCache(Object key);",
"public boolean containsKey(String key) {\n return cacheMap.containsKey(key);\n }",
"public boolean containsKey(Object key)\n {\n // check if the cache needs flushing\n checkFlush();\n\n return getEntryInternal(key) != null;\n }",
"public boolean containsKey(Object key) {\r\n if (cacheDelegate != null) {\r\n cacheDelegate.keyLookup(key);\r\n }\r\n\r\n if (key == null) {\r\n return false;\r\n }\r\n\r\n CacheData<K, V> cacheData = getEntry(key);\r\n if (cacheData != null) {\r\n // see if the key passed in matches this one\r\n if ((cacheData.validateKey(key, cacheDelegate)) != null) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public boolean inCache(String key);",
"public boolean contains(Key key);",
"public boolean contains (String key)\n {\n use (key);\n return map.containsKey (key);\n }",
"public boolean containsKey(String key);",
"public boolean contains(String key);",
"@Override\n public boolean isKeyPresent(K key){\n return (this.cache.get(key) != null);\n }",
"public boolean contains(K key){\r\n int loc = find(key);\r\n if((hashTable[loc]!= null) && hashTable[loc].equals(key))\r\n return true;\r\n else\r\n return false;\r\n }",
"public boolean contains(K key);",
"public boolean containsKey(Key key) ;",
"public boolean contains(String key) {\n return find(key) != null;\n }",
"boolean has(String key);",
"public boolean contains(Key key) {\n return get(key) != null;\n }",
"public boolean contains(Key key) {\n\t\treturn get(key) != null;\n\t}",
"boolean containsKey(K key);",
"boolean containsKey(K key);",
"@Override\n public synchronized boolean containsKey(Object key) {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n if (this.ignoreCase) {\n return this.keyMap.containsKey(key.toString().toLowerCase());\n }\n return super.containsKey(key.toString());\n }",
"public boolean contains(String key)\r\n { return get(key) != null; }",
"private boolean contains(String key) {\n return contains(dict, key);\n }",
"public boolean containsKey(K key) {\n\t\t\n\t\t\n\t\treturn keySet.contains(key);\n }",
"@Override\n public Boolean exists(Key<?> key)\n {\n return session.getCache().contains(key) || queryCache.exists(key);\n }",
"boolean contains(String key);",
"boolean contains(String key);",
"public boolean contains(String key){\r\n\t\treturn get(key) != null;\r\n\t}",
"public boolean containsKey(K key)\r\n\t{\r\n\t\treturn data.contains(new Entry(key,null));\r\n\t}",
"public native Boolean has(K key);",
"boolean hasKey(String key);",
"boolean containsKey(long key);",
"public boolean containsKey(Object key) {\n return map.containsKey(key);\n }",
"public boolean containsKey(Object key) {\n return map.containsKey(key);\n }",
"public final synchronized boolean containsKey(final K key) {\n\t\treturn map.containsKey(key);\n\t}",
"public boolean containsKey(String key) {\n\t\treturn containsKey(entries, key);\n\t}",
"@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn map.containsKey(key);\n\t}",
"public boolean contains(K key) \n {\n boolean result = false;\n int keyIndex = locateIndex(key);\n if ((keyIndex < numberOfEntries) && \n key.equals(dictionary[keyIndex].getKey()))\n result = true;\n return result;\n }",
"public boolean containsKey(K key)\r\n\t{\r\n\t\tint slot = findSlot(key, false);\r\n\t\treturn slot >= 0;\r\n\t}",
"public abstract boolean containsKey(K key);",
"public boolean containsKey(K key) {\n return keys[findIndex(key)] != null;\n }",
"public boolean contains(String key) {\r\n\t\treturn getValue(key) != null;\r\n\t}",
"public boolean contains(int key) {\n if(entry[hashCode(key)]==null) return false;\n return entry[hashCode(key)].contains(key);\n }",
"public boolean contains(int key) {\n return map.containsKey(key);\n }",
"public boolean containsKey(Object key) {\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic boolean contains(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn true;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasKey(String key) {\n return data.containsKey(key);\n }",
"public boolean containsKey(Comparable key) { return this.store.containsKey(key); }",
"public boolean containsKey(K key) {\r\n\t\tif (get(key) == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public boolean containsKey(int key) {\n return getElement(key) != null;\n }",
"@Override\r\n\tpublic boolean containsKey(Object key) {\r\n\t\tif (key == null) throw new NullPointerException();\r\n\t\treturn get(key) != null;\r\n\t}",
"public boolean contains(Key key) {\n return auxContains(root, key);\n }",
"public boolean contains( T key )\n {\n if (key == null) return false;\n for ( int i=0 ; i < size() ; ++i )\n if ( get(i).equals( key ) ) \n return true;\n \n return false;\n }",
"public boolean contains(String key) {\n\t\treturn recContains(head, key);\n\t}",
"public boolean contains(int key) {\n int h = hash(key);\n Iterator<Integer> iterator = data[h].iterator();\n while (iterator.hasNext()) {\n Integer element = iterator.next();\n if (element == key) {\n return true;\n }\n }\n return false;\n }",
"public boolean contains(K key)\n\t{\n\t\tcheckForNulls(key);\n\t\tint n = Math.abs(key.hashCode() % entries.length);\n\t\t\n\t\treturn (entries[n] == null) ? false : entries[n].contains(new Entry(key, null));\n\t}",
"public boolean containsKey(DNA key){\n Node actual_node = this.getReference(key);\n\n if(this.debug)\n System.out.println(\"ExtHash::containsKey >> buscando cadena: \" + key.toString() + \", hashCode: \" + key.hashCode());\n\n int reference_page = actual_node.getReference(), hash = key.hashCode();\n ArrayList<Integer> content = this.fm.read(reference_page); this.in_counter++;\n\n boolean res = false;\n\n while(true) {\n int cant = content.get(0);\n\n for(int i=1; i<=cant; i++) {\n if(content.get(i) == hash) {\n res = true;\n }\n }\n\n if(res)\n break;\n\n if(content.size() != B)\n break;\n\n reference_page = content.get(B-1);\n content = this.fm.read(reference_page); this.in_counter++;\n\n }\n if(this.debug)\n System.out.println(\"ExtHash::containsKey >> cadena encontrada: \" + res);\n\n return res;\n }",
"public boolean contains(int key) {\n\t\tint hashkey = hash(key);\n\t\treturn table[hashkey] != null && table[hashkey][pos(key)];\n\t}",
"public boolean containsKey(Object key)\r\n/* 386: */ {\r\n/* 387:556 */ return this.headers.containsKey(key);\r\n/* 388: */ }",
"public boolean contains(long key){\n for (int i = 0; i < numKeys; i++){\n if (keys[i].key == key){\n return true;\n }\n }\n return false;\n }",
"public boolean existsKey(String inKey);",
"public boolean containsKey(K key)\n {\n AssociationList<K, V> bucket = this.get(this.find(key));\n return (bucket != null) && (bucket.containsKey(key));\n }",
"public boolean contains (String key) {\r\n int arrIndex = hash(key);\r\n\r\n if (hashTableArray[arrIndex] == null) {\r\n hashTableArray[arrIndex] = new LinkedList<>();\r\n }\r\n\r\n for (int i = 0; i < hashTableArray[arrIndex].size(); i++) {\r\n if (hashTableArray[arrIndex].get(i).key.equals(key)){\r\n return true; // returns true when a key already exists\r\n }\r\n }\r\n return false; // returns false when a key does not yet exist\r\n }",
"@Override\n public boolean containsKey(K key) {\n if (key == null) {\n throw new IllegalArgumentException(\"argument to containsKey() is null\");\n }\n return get(key) != null;\n }",
"@Override\n public boolean containsKey(K key) {\n readLock.lock();\n \n try {\n //不存在或已移除\n final CacheObj<K, V> co = cacheMap.get(key);\n if (co == null) {\n return false;\n }\n \n //过期\n if (co.isExpired()) {\n // remove(key); // 此方法无法获得锁\n removeWithoutLock(key);\n missCount++;\n return false;\n }\n \n //命中\n return true;\n } finally {\n readLock.unlock();\n }\n }",
"public boolean containsKey(String key) {\n if (!index.containsKey(key)) return false;\n else if (index.get(key).isEmpty()) return false;\n else return true;\n }",
"@Override\r\n\tpublic boolean exists(T key) {\r\n\t\treturn existsRec(raiz, key);\r\n\t}",
"public boolean containsKey(String key) {\n int index = hashOf(key);\n return index < capacity && values[index] != null;\n }",
"public boolean containsKey(String key) {\n \treturn (getNode(key) != null);\n }",
"public boolean containsKey(String key)\n\t{\n\t\tverifyParseState();\n\t\treturn values.containsKey(key);\n\t}",
"public boolean containsKey(int key) {\r\n\t\ttry {\r\n\t\t\tthis.hashlock.readLock().lock();\r\n\t\t\tint index = index(key);\r\n\t\t\tif (index >= 0) {\r\n\t\t\t\tint pos = (index / FREE.length);\r\n\t\t\t\tthis.claims.position(pos);\r\n\t\t\t\tthis.claims.put((byte) 1);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} catch (Exception e) {\r\n\t\t\tSDFSLogger.getLog().fatal(\"error getting record\", e);\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\tthis.hashlock.readLock().unlock();\r\n\t\t}\r\n\t}",
"@Override\n public boolean containsKey(Object key) {\n LinkedList<Entry> tempBucket = chooseBucket(key);\n \n for(int i=0;i<tempBucket.size();i++) {\n \t\tEntry tempEntry = tempBucket.get(i);\n \t\t\n \t\tif(tempEntry.getKey() == key) {\n \t\t\treturn true;\n \t\t}\n \t}\n \n return false;\n }",
"@Override\n\tpublic boolean contains(K key) {\n\t\treturn false;\n\t}",
"public boolean contains(int key) {\n\t\tint index = getIndex(key);\n\t\tint pos = getPos(key, index);\n\t\treturn pos >= 0;\n\t}",
"@Override\n public boolean contains(String key) {\n if (key == null) {\n throw new IllegalArgumentException(\"argument to contains() is null\");\n }\n return get(root, key, 0) != null;\n }",
"public boolean containsKey(K key) {\n int index = getIndex(getHash(key));\n Entry<K, V> entry = (Entry<K, V>) table[index];\n\n if (entry == null) {\n return false;\n }\n\n while (entry.hasNext()) {\n if (entry.getKey().equals(key))\n return true;\n entry = entry.getNext();\n }\n\n return entry.getKey().equals(key);\n }",
"public boolean containsKey(final K key)\n {\n return this.hashMap.containsKey(key);\n }",
"public boolean containsKey(K key) {\n int keyBucket = hash(key);\n \n HashMapEntry<K, V> temp = table[keyBucket];\n while (temp != null) {\n if ((temp.key == null && key == null) \n || (temp.key != null && temp.key.equals(key))) {\n return true;\n }\n temp = temp.next;\n }\n \n return false;\n }",
"boolean containsKey(CoreLabel key);",
"public boolean containsKey(Object key) {\r\n\t\tif (key == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tint slotIndex = Math.abs(key.hashCode()) % table.length;\r\n\r\n\t\tif (table[slotIndex] == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tTableEntry<K, V> currentElement = table[slotIndex];\r\n\r\n\t\tdo {\r\n\t\t\tif (currentElement.key.equals(key)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentElement = currentElement.next;\r\n\t\t} while (currentElement != null);\r\n\r\n\t\treturn false;\r\n\t}",
"boolean containsKey(int key) throws ContentStoreException;",
"@Override\n public boolean containsKey(Object key) {\n return entries.containsKey(key);\n }",
"public final boolean containsKey(String key)\n {\n\n for (int i = m_firstFree - 1; i >= 0; --i)\n {\n if (m_map[i].get(key) != null)\n return true;\n }\n\n return false;\n }",
"public boolean contains(int key) {\n return s.contains(key);\n }",
"public boolean containsKey(String key) {\n int keyBucket = hash(key);\n \n HashNode temp = table[keyBucket];\n while (temp != null) {\n if ((temp.key == null && key == null) \n || (temp.key != null && temp.key.equals(key))) {\n return true;\n }\n temp = temp.next;\n }\n \n return false;\n }",
"public boolean containsKey(K key) {\n\tint bucket=Math.abs(key.hashCode()%capacity);\n\tfor(MyEntry i:table[bucket]) {\n\t if(i.key.equals(key)) {\n\t\treturn true;\n\t }\n\t}\n\treturn false;\n }",
"boolean exists(Integer key);",
"public boolean hasKey(String key) {\r\n\t\tif (objectMap.containsKey(key))\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}",
"public boolean contains(String key) {\n\t\treturn serialNumber.contains(key);\n\t}",
"public boolean containCache(Integer cacheKey)\n {\n // Check if the cacheKey is in the reference\n if (mLinkedHashMap.containsKey(cacheKey))\n {\n return true;\n }\n\n // Now check if the actual file is exists\n String cacheKeyStr = String.valueOf(cacheKey);\n String existingFilePath = createFilePath(cacheDirectory, cacheKeyStr);\n Boolean isFileExists = new File(existingFilePath).exists();\n if (isFileExists)\n {\n // If the file is found, we have to update the Reference HashMap.\n referenceAdd(cacheKey, existingFilePath);\n\n return true;\n }\n\n return false;\n }",
"public boolean containsKey (String key)\n\t{\n\t\treturn properties.containsKey(key);\n\t}",
"public boolean contains(int key) {\n Entry tab[] = table;\n int index = (key & 0x7FFFFFFF) % tab.length;\n for (Entry e = tab[index]; e != null; e = e.next) {\n if (e.key == key) {\n return true;\n }\n }\n return false;\n }",
"public boolean contains(int key) {\n int h=hash(key);\n if(arr[h]!=null)\n return arr[h].contains(key);\n return false;\n }",
"public synchronized boolean hasKey(K key) {\n return getValue(key) != null;\n }",
"public boolean contains(int key) {\n int hash = key % 7919;\n if (table[hash] == null)\n {\n return false;\n }\n else\n {\n ArrayList<Integer> al = table[hash].al;\n int size = al.size();\n for (int i = 0; i < size; ++i)\n {\n if (al.get(i) == key)\n {\n return true;\n }\n }\n return false;\n }\n }",
"public boolean exists(String key) {\n\t\treturn fileData.containsKey(key);\n\t}",
"@Override\n public boolean containsKey(K key) {\n return containsKeyHelper(root, key);\n }",
"boolean containsKey(Object key) throws NullPointerException;",
"@Override\r\n public boolean containsKey(K key) {\r\n int index = getIndex(key);\r\n if (index != -1) {\r\n IDictionary<K, V> temp = chains[index];\r\n if (temp!= null && temp.containsKey(key)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public boolean containsKey(TKey key) {\n return !(bstFind(key, mRoot) == null);\n }",
"public boolean containsKey(K key) {\r\n int hash = key.hashCode() % data.length;\r\n if (hash < 0){\r\n hash *= -1;\r\n }\r\n Node targetNode = data[hash];\r\n while (targetNode != null) {\r\n if (targetNode.key == key || targetNode.key.equals(key)) {\r\n return true;\r\n }\r\n targetNode = targetNode.next;\r\n }\r\n return false;\r\n }"
] | [
"0.8567934",
"0.84595925",
"0.83952695",
"0.81236374",
"0.8085732",
"0.7983572",
"0.79581034",
"0.79381233",
"0.78731084",
"0.7845138",
"0.78394747",
"0.7828512",
"0.7822464",
"0.7763877",
"0.7715903",
"0.76962364",
"0.7684427",
"0.7680729",
"0.7680729",
"0.7674717",
"0.76735705",
"0.764783",
"0.76251286",
"0.76083446",
"0.7602314",
"0.7602314",
"0.7571811",
"0.75433415",
"0.75367296",
"0.7535251",
"0.7532977",
"0.7529513",
"0.7529513",
"0.7498474",
"0.74788725",
"0.74632907",
"0.746216",
"0.7452476",
"0.7443162",
"0.74420714",
"0.743103",
"0.74133444",
"0.7409814",
"0.74052614",
"0.7399685",
"0.73981696",
"0.738976",
"0.73877174",
"0.7387705",
"0.73803693",
"0.7361279",
"0.73602796",
"0.7344012",
"0.7332875",
"0.73153585",
"0.731466",
"0.7305305",
"0.7303283",
"0.729813",
"0.72920555",
"0.72891736",
"0.7269896",
"0.72471464",
"0.72427434",
"0.72252226",
"0.72244817",
"0.7217362",
"0.7213597",
"0.7212811",
"0.72098225",
"0.72015774",
"0.72000176",
"0.7199851",
"0.71905124",
"0.71864384",
"0.71838325",
"0.7175866",
"0.71693534",
"0.71680367",
"0.71434516",
"0.7135781",
"0.7135678",
"0.71326786",
"0.71280074",
"0.71254325",
"0.71188647",
"0.7111069",
"0.71100694",
"0.7092503",
"0.70781904",
"0.7067507",
"0.70649433",
"0.70642686",
"0.7063947",
"0.7061904",
"0.7055012",
"0.70227325",
"0.7018133",
"0.7009095",
"0.7006243"
] | 0.71044534 | 88 |
Returns a Map that contains a copy of all cache entries that aren't expired. NOTE: This is a potentially expensive operation and should be avoided at all costs. | public Map<K,V> getMap() {
Map<K,V> results = new HashMap<K,V>(valueMap.size());
synchronized(theLock) {
for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {
if (! isExpired(entry.getValue())) {
results.put(entry.getKey(), entry.getValue().cachedObject);
}
}
}
return results;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Map<Long, Set<E>> getExpiryMap() {\n return Collections.unmodifiableMap(expiryMap);\n }",
"@Bean\n public ExpiringMap<String, Integer> cacheMap() {\n final ExpiringMap<String, Integer> map = ExpiringMap.builder().expiration(1, TimeUnit.MINUTES).build();\n return map;\n }",
"private void removeExpired() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (isExpired(entry.getValue())) {\n removeMap.put(entry.getKey(), entry.getValue());\n }\n }\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.expiredElement(entry.getKey());\n }\n }\n }",
"public Map<DHTKey, LruRetentionInfo> getCurrentRetentionMap() {\n retentionMap.cleanUp();\n return Collections.unmodifiableMap(retentionMap.asMap());\n }",
"@Override\n public Set keySet() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.keySet();\n }",
"public Map<String, String> getCache() {\n return cache;\n }",
"public Set<Map.Entry<K, V>> entrySet() {\r\n return new CacheEntrySet<K, V>(this);\r\n }",
"@Override\n public synchronized Enumeration keys() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.keys();\n }",
"public Map<Integer, Integer> getLocalCache() {\n return localCache;\n }",
"synchronized public List<StickyRecord> removeExpired()\n {\n List<StickyRecord> removed = new ArrayList();\n long now = System.currentTimeMillis();\n Iterator<StickyRecord> i = _records.values().iterator();\n while (i.hasNext()) {\n StickyRecord record = i.next();\n if (!record.isValidAt(now)) {\n i.remove();\n removed.add(record);\n }\n }\n return removed;\n }",
"@Override\n public List<CacheObject<K, V>> getAll(){\n return new ArrayList<>(this.cache.values());\n }",
"public Iterator iterator()\n {\n // optimization\n if (OldOldCache.this.isEmpty())\n {\n return NullImplementation.getIterator();\n }\n\n // complete entry set iterator\n Iterator iter = instantiateIterator();\n\n // filter to get rid of expired objects\n Filter filter = new Filter()\n {\n public boolean evaluate(Object o)\n {\n Entry entry = (Entry) o;\n boolean fExpired = entry.isExpired();\n if (fExpired)\n {\n OldOldCache.this.removeExpired(entry, true);\n }\n return !fExpired;\n }\n };\n\n return new FilterEnumerator(iter, filter);\n }",
"protected void invalidateAll() {\n\t\tfor (CacheEntry entry : map.values()) {\n\t\t\tentry.getItem().invalidate();\n\t\t}\n\t}",
"public Collection getAllCaches()\n {\n Set setRef = new HashSet();\n Collection<Map> colLoader = m_mapByName.values();\n\n for (Map mapByLoader : colLoader)\n {\n synchronized (mapByLoader)\n {\n for (Object oHolder : mapByLoader.values())\n {\n if (oHolder instanceof SubjectScopedReference)\n {\n setRef.addAll(((SubjectScopedReference) oHolder).values());\n }\n else if (oHolder instanceof NamedCache)\n {\n setRef.add(oHolder);\n }\n else\n {\n throw new UnsupportedOperationException();\n }\n }\n }\n }\n\n return setRef;\n }",
"@Test\n public void testCoh3710_entrySetFilter()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n Iterator iter = cache.entrySet(AlwaysFilter.INSTANCE).iterator();\n validateIndex(cache);\n\n assertFalse(iter.hasNext());\n }\n });\n }",
"public Collection<V> getAllElements() {\n\t\treturn cacheMap.values();\n\t}",
"public Map<String, Collection<V>> asUnmodifiableMap() {\n return Collections.unmodifiableMap(map);\n }",
"Collection<T> getAll() {\n _readLock.lock();\n try {\n return ImmutableList.copyOf(_toMap.values());\n } finally {\n _readLock.unlock();\n }\n }",
"public Collection<RegionLocations> getAll() {\n return Collections.unmodifiableCollection(cache.values());\n }",
"protected Map<String, T> getDatumCache() {\n\t\treturn datumCache;\n\t}",
"@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }",
"private HashMap< Price, ArrayList<Tradable>> getOldEntries() {\n\t\treturn oldEntries;\n\t}",
"@Test\n public void testCoh3710_entrySetIterator()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n Iterator iter = cache.entrySet().iterator();\n assertFalse(iter.hasNext());\n validateIndex(cache);\n }\n });\n }",
"@VisibleForTesting\n public static Set<String> cachedPaths() {\n requireNonNull(CACHE, \"CACHE\");\n return CACHE.asMap().keySet();\n }",
"public Map<T, V> populateMap() {\n Map<T, V> map = new HashMap<>();\n for (int i = 0; i < entryNumber; i++) {\n cacheKeys[i] = (T) Integer.toString(random.nextInt(1000000000));\n String key = cacheKeys[i].toString();\n map.put((T) key, (V) Integer.toString(random.nextInt(1000000000)));\n }\n return map;\n }",
"@Override\r\n\tpublic Map<String, Object> getMap(String... keys) throws CacheException {\n\t\treturn null;\r\n\t}",
"public Object[] toArray(Object ao[])\n {\n // build list of non-expired keys\n Object[] aoAll;\n int cAll = 0;\n\n // synchronizing prevents add/remove, keeping size() constant\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n // create the array to store the map keys\n int c = map.size();\n aoAll = new Object[c];\n if (c > 0)\n {\n // walk all buckets\n SafeHashMap.Entry[] aeBucket = map.m_aeBucket;\n int cBuckets = aeBucket.length;\n for (int iBucket = 0; iBucket < cBuckets; ++iBucket)\n {\n // walk all entries in the bucket\n Entry entry = (Entry) aeBucket[iBucket];\n while (entry != null)\n {\n if (entry.isExpired())\n {\n removeExpired(entry, true);\n }\n else\n {\n aoAll[cAll++] = entry.getKey();\n }\n entry = entry.getNext();\n }\n }\n }\n }\n\n // if no entries had expired, just return the \"work\" array\n if (ao == null && cAll == aoAll.length)\n {\n return aoAll;\n }\n\n // allocate the necessary array (or stick the null in at the\n // right place) per the Map spec\n if (ao == null)\n {\n ao = new Object[cAll];\n }\n else if (ao.length < cAll)\n {\n ao = (Object[]) Array.newInstance(ao.getClass().getComponentType(), cAll);\n }\n else if (ao.length > cAll)\n {\n ao[cAll] = null;\n }\n\n // copy the data into the array to return and return it\n if (cAll > 0)\n {\n System.arraycopy(aoAll, 0, ao, 0, cAll);\n }\n return ao;\n }",
"public Collection getKeys() throws CacheException {\n return cache.getKeys();\n }",
"private void cleanup() {\n\t\tTreeSet<CacheEntry> entries = new TreeSet<CacheEntry>(map.values());\n\t\tint i = region.getItemsToEvict();\n\t\tIterator<CacheEntry> it = entries.iterator();\n\t\twhile (it.hasNext() && i > 0) {\n\t\t\tremoveEntry(it.next());\n\t\t\ti--;\n\t\t}\n\t}",
"public static Map<String,String> getIndustriesFromCache(){\n\t\tMap<String,String> dataMap=null;\n \t\n \tif(memcache !=null && memcache.contains(ALL_INDUSTRIES_KEY)){\n \t\tdataMap=(Map<String,String>) memcache.get(ALL_INDUSTRIES_KEY);\n \t\tlog.info(\"Memcache getIndustriesFromCache size = \"+dataMap.size());\n \t} \t\n \treturn dataMap;\n\t}",
"private static <N extends Node> SortedMap<ImmutableContextSet, SortedSet<N>> createMap() {\n return new ConcurrentSkipListMap<>(ContextSetComparator.reverse());\n }",
"public Map<String, Entry> getEntries() {\n return entries;\n }",
"private void removeEvicted() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n removeMap.putAll(toEvictMap);\n toEvictMap.clear();\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.evictedElement(entry.getKey());\n }\n }\n }",
"public Object[] toArray(Object ao[])\n {\n // build list of non-expired values\n Object[] aoAll;\n int cAll = 0;\n\n // synchronizing prevents add/remove, keeping size() constant\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n // create the array to store the map values\n int c = map.size();\n aoAll = new Object[c];\n if (c > 0)\n {\n // walk all buckets\n SafeHashMap.Entry[] aeBucket = map.m_aeBucket;\n int cBuckets = aeBucket.length;\n for (int iBucket = 0; iBucket < cBuckets; ++iBucket)\n {\n // walk all entries in the bucket\n Entry entry = (Entry) aeBucket[iBucket];\n while (entry != null)\n {\n if (entry.isExpired())\n {\n removeExpired(entry, true);\n }\n else\n {\n aoAll[cAll++] = entry.getValue();\n }\n entry = entry.getNext();\n }\n }\n }\n }\n\n // if no entries had expired, just return the \"work\" array\n if (ao == null && cAll == aoAll.length)\n {\n return aoAll;\n }\n\n // allocate the necessary array (or stick the null in at the\n // right place) per the Map spec\n if (ao == null)\n {\n ao = new Object[cAll];\n }\n else if (ao.length < cAll)\n {\n ao = (Object[]) Array.newInstance(ao.getClass().getComponentType(), cAll);\n }\n else if (ao.length > cAll)\n {\n ao[cAll] = null;\n }\n\n // copy the data into the array to return and return it\n if (cAll > 0)\n {\n System.arraycopy(aoAll, 0, ao, 0, cAll);\n }\n return ao;\n }",
"@Test\n public void testCoh3710_getAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertEquals(NullImplementation.getMap(),\n getNamedCache(getCacheName0()).getAll(\n Collections.singleton(Integer.valueOf(1))));\n }\n });\n }",
"public static Map<String,String> getKPIsFromCache(){\n\t\tMap<String,String> dataMap=null;\n \t\n \tif(memcache !=null && memcache.contains(ALL_KPI_KEY)){\n \t\tdataMap=(Map<String,String>) memcache.get(ALL_KPI_KEY);\n \t\tlog.info(\"Memcache getKPIsFromCache size = \"+dataMap.size());\n \t} \t\n \treturn dataMap;\n\t}",
"public Set<Map.Entry<K, V>> entrySet() {\n System.out.println(\"SimpleConcurrentHashMap.entrySet()\");\n return mMap.entrySet();\n }",
"@CacheEvict(value = \"exchangeRate\", allEntries = true)\r\n public void evictAllCacheValues() {\r\n }",
"public Collection<String> getCacheNames()\r\n/* 44: */ {\r\n/* 45:68 */ return (Collection)Collections.unmodifiableSet(this.cacheNames);\r\n/* 46: */ }",
"public Map<K, V> toMutableMap() {\n return new HashMap<>(this);\n }",
"@Override\n\tpublic Iterable<Entry<K, V>> entries() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Map<String, Object> getMap(List<String> keyList) throws CacheException {\n\t\treturn null;\r\n\t}",
"protected Map<Long, ScheduledRecording> getDeletedScheduleMap() {\n return mDeletedScheduleMap;\n }",
"@Override\n\tpublic Map loadAll(Iterable keys) throws CacheLoaderException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\tSet<Entry<K, V>> entrySet = map.entrySet();\n\t\tListSet<Entry<K, V>> listSet = new ListSet<Map.Entry<K,V>>();\n\t\tfor (K key : keys) {\n\t\t\t\n\t\t\tfor (Entry<K, V> entry : entrySet) {\n\t\t\t\tif (entry.getKey().equals(key)) {\n\t\t\t\t\tlistSet.add(entry);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn listSet;\n\t}",
"@Override\n public synchronized Enumeration elements() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.elements();\n }",
"public Set entrySet() {\n\treturn new EntrySet(map.entrySet());\n }",
"public void clearInactiveCacheRefs()\n {\n for (Iterator<Map> iterByName = m_mapByName.values().iterator(); iterByName.hasNext(); )\n {\n Map mapByLoader = iterByName.next();\n\n synchronized (mapByLoader)\n {\n for (Iterator iter = mapByLoader.entrySet().iterator(); iter.hasNext(); )\n {\n Map.Entry entry = (Map.Entry) iter.next();\n\n Object oHolder = entry.getValue();\n\n if (oHolder instanceof NamedCache)\n {\n NamedCache cache = (NamedCache) entry.getValue();\n\n if (cache.isDestroyed() || cache.isReleased())\n {\n iter.remove();\n internalReleaseCache(cache);\n }\n }\n else if (oHolder instanceof SubjectScopedReference)\n {\n Collection col = ((SubjectScopedReference) oHolder).values();\n\n if (!col.isEmpty())\n {\n // all the entries in the SubjectScopedReference refer\n // to the same NamedCache instance, so we only need to\n // check the first one\n NamedCache cache = (NamedCache) col.iterator().next();\n if (cache.isDestroyed() || cache.isReleased())\n {\n iter.remove();\n internalReleaseCache(cache);\n }\n }\n }\n }\n\n if (mapByLoader.isEmpty())\n {\n iterByName.remove();\n }\n }\n }\n }",
"private void skipStaleEntries()\n {\n while (this.index < keys.size() && !HashBijectiveMap.this.containsKey(keys.get(this.index)))\n this.index++;\n }",
"public static List<EntryEvent<?, ?>> getInvalidateEvents(\n List<CacheEvent<?, ?>> cacheEvents) {\n return getEntryEventsWithOperation(cacheEvents, Operation::isInvalidate);\n }",
"public static void invalidateCache() {\n\t\tclassCache = new HashMap();\n\t}",
"public static Map<String,String> getGeoTargetsFromCache(){\n\t\tMap<String,String> dataMap=null; \t\n \tif(memcache !=null && memcache.contains(ALL_GEO_TARGETS_KEY)){\n \t\tdataMap=(Map<String,String>) memcache.get(ALL_GEO_TARGETS_KEY);\n \t\tlog.info(\"Memcache getGeoTargetsFromCache size = \"+dataMap.size());\n \t} \t\n \treturn dataMap;\n\t}",
"@Override\n public Map<String, ?> getAll() {\n return Collections.emptyMap();\n }",
"@PostConstruct\n public void initCache() {\n cache = Collections.synchronizedMap(new HashMap<>(cacheCapacity, 1));\n }",
"public List<Map.Entry<String, L>> entries() {\n rwLock.readLock().lock();\n try {\n return new ArrayList<Map.Entry<String, L>>(serversToLoad.entrySet());\n } finally {\n rwLock.readLock().unlock();\n }\n }",
"@Test\n public void testCoh3710_keySetContainsAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().containsAll(\n Collections.singleton(Integer.valueOf(1))));\n validateIndex(cache);\n }\n });\n }",
"public Map<Integer, Item> getAllItems() {\n\t\treturn hashOperations.entries(KEY);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t@External(readonly = true)\n\tpublic Map<String, String> get_todays_games_excess() {\n\t\t/***\n Returns the todays excess of the game. The excess is reset to 0 if it\n remains positive at the end of the day.\n :return: Returns the excess of games at current time\n ***/\n\t\tMap.Entry<String, String>[] games_excess = new Map.Entry[this.get_approved_games().size()];\n\n\t\tfor (int i= 0; i<this.get_approved_games().size(); i++ ) {\n\t\t\tAddress game = this.get_approved_games().get(i);\n\t\t\tgames_excess[i] = Map.entry(game.toString(), String.valueOf(this.todays_games_excess.get(game)));\n\t\t}\n\t\t\n\t\treturn Map.ofEntries(games_excess);\n\t}",
"@SuppressWarnings({\"unchecked\", \"CallToThreadYield\"})\n public void cleanup() {\n\n long now = System.currentTimeMillis();\n ArrayList<K> deleteKey;\n\n synchronized (cacheMap) {\n MapIterator itr = cacheMap.mapIterator();\n\n deleteKey = new ArrayList<>((cacheMap.size() / 2) + 1);\n K key;\n CacheObject c;\n\n while (itr.hasNext()) {\n key = (K) itr.next();\n c = (CacheObject) itr.getValue();\n\n if (c != null && (now > (timeToLive + c.lastAccessed))) {\n deleteKey.add(key);\n }\n }\n }\n\n deleteKey.stream().map((key) -> {\n synchronized (cacheMap) {\n Object remove = cacheMap.remove(key);\n }\n return key;\n }).forEachOrdered((K _item) -> {\n Thread.yield();\n });\n }",
"public synchronized Map<String, Long> getHistory() {\r\n return settings.getMap(HISTORY_SETTING);\r\n }",
"@Contract(value = \" -> new\", pure = true)\n @Nonnull\n @Deprecated\n public static <K, V> Map<K, V> createWeakMap() {\n return Maps.newWeakHashMap(4);\n }",
"@SuppressWarnings(\"unchecked\")\n public WeakIdentityCache() {\n threshold = 16;\n entries = new Entry[threshold];\n }",
"@Override\n @CacheEvict(value=AccountingPeriod.CACHE_NAME,allEntries=true)\n public void clearCache() {\n }",
"@Override\n public void cleanup() {\n for (String key : cache.keySet()) {\n CacheObject co = cache.get(key).get();\n if (co.isExpired()) {\n synchronized (co) {\n if (co.isExpired()) {\n cache.remove(key);\n queue.add(co);\n }\n }\n }\n }\n\n }",
"@Override\n\tpublic Set<T> retrieveAllItems() {\n\t\treturn cache;\n\t}",
"@Override\n public Set<Map.Entry<K, V>> entrySet() {\n return new EntrySet();\n }",
"public void removeExpiredAuctions(){\r\n ArrayList <String> expiredAuction = new ArrayList <String>(super.size());\r\n for(String expiredKey: keySet()){\r\n if(getAuction(expiredKey).getTimeRemaining() == 0){\r\n expiredAuction.add(expiredKey);\r\n }\r\n } \r\n for(String expiredKey: expiredAuction){\r\n super.remove(expiredKey);\r\n }\r\n }",
"public Set<E> poll() {\n long now = Time.currentElapsedTime();\n long expirationTime = nextExpirationTime.get();\n if (now < expirationTime) {\n return Collections.emptySet();\n }\n\n Set<E> set = null;\n long newExpirationTime = expirationTime + expirationInterval;\n if (nextExpirationTime.compareAndSet(expirationTime, newExpirationTime)) {\n set = expiryMap.remove(expirationTime);\n }\n if (set == null) {\n return Collections.emptySet();\n }\n return set;\n }",
"public static Map<String,String> getAdvertisersFromCache(){\n\t\tlog.info(\"getAdvertisersFromCache..\");\n\t\tMap<String,String> advertiserMap=null; \t\n \tif(memcache !=null && memcache.contains(MEDIA_PLAN_ADVERTISERS_KEY)){\n \t\tadvertiserMap=(Map<String,String>) memcache.get(MEDIA_PLAN_ADVERTISERS_KEY);\n \t} \t\n \treturn advertiserMap;\n\t}",
"@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic Iterable<Entry<K, V>> entrySet() {\n\t/* TCJ\n\t * Iterates through potentially entire collection: O(n)\n\t */\n\t\treturn snapShot(0, null);\n\t}",
"public List<Entry<T>> getEntries() {\n return Collections.unmodifiableList(entries);\n }",
"private static void cleanLeaseCache(Map<HashPair, Lease> tc) {\n for (Iterator<Lease> iter = tc.values().iterator(); iter.hasNext(); ) {\n Lease l = iter.next();\n if (l.isExpired(Router.CLOCK_FUDGE_FACTOR))\n iter.remove();\n }\n }",
"public static void clearCache() {\n cacheKeys.clear();\n cacheValues.clear();\n }",
"public Map<CeloContract, String> allAddresses() {\n for (CeloContract contract : CeloContract.values()) {\n this.addressFor(contract);\n }\n return cache;\n }",
"@CacheEvict(allEntries = true, cacheNames = { \"airly_now\", \"history\" })\n @Scheduled(fixedDelay = 30000)\n public void reportCacheEvict() {\n }",
"public Set entrySet() {\n return map.entrySet();\n }",
"public static <K> Object2DoubleSortedMap<K> emptyMap() {\n/* 164 */ return EMPTY_MAP;\n/* */ }",
"public long getCacheExpirationSeconds() {\n return cache.getCacheExpirationSeconds();\n }",
"public static Map<String,String> getAgenciesFromCache(){\n\t\tlog.info(\"getAgenciesFromCache..\");\n\t\tMap<String,String> agencyMap=null; \t\n \tif(memcache !=null && memcache.contains(MEDIA_PLAN_AGENCIES_KEY)){\n \t\tagencyMap=(Map<String,String>) memcache.get(MEDIA_PLAN_AGENCIES_KEY);\n \t} \t\n \treturn agencyMap;\n\t}",
"@External(readonly = true)\n\tpublic Map<String, String> get_yesterdays_games_excess(){\n\t\t\n\t\treturn this.get_games_excess(BigInteger.ONE.negate());\n\t}",
"public Iterable<Entry<K, V>> entrySet() {\n ArrayList<Entry<K, V>> buffer = new ArrayList<>();\n for (int h = 0; h < capacity; h++)\n if (!isAvailable(h)) buffer.add(table[h]);\n return buffer;\n }",
"public abstract Map<IBinder, ClientTransactionItem> getActivitiesToBeDestroyed();",
"protected Map<E, ListenerEntry<? extends E>> createMap() {\n\t\treturn new WeakHashMap<>();\n\t}",
"private static <K, V> Map<K, V> newConcurrentHashMap() {\n return new ConcurrentHashMap<K, V>();\n }",
"@Contract(value = \" -> new\", pure = true)\n @Nonnull\n @Deprecated\n public static <K, V> Map<K, V> createWeakValueMap() {\n return Maps.newWeakValueHashMap();\n }",
"protected void initializeCache() {\n\t\tif (cache == null){\n\t\t\tcache = Collections.synchronizedMap(new HashMap());\n\t\t}\n\t\telse{\n\t\t\tcache.clear();\n\t\t}\n\t}",
"protected abstract Collection<Cache> loadCaches();",
"public Map<DataDate, ArrayList<String>> CloneListDatesFiles()\r\n {\r\n Map<DataDate, ArrayList<String>> filesMap = new HashMap<DataDate, ArrayList<String>>();\r\n ArrayList<String> files;\r\n\r\n if(!mapDatesFilesSet)\r\n {\r\n synchronized(mapDatesFilesSet)\r\n {\r\n if(!mapDatesFilesSet)\r\n {\r\n System.out.println(\"Creating ListDatesFiles map for '\" + mData.Title + \"':'\" + mData.name + \"'.\");\r\n if ((mData.mode).equalsIgnoreCase(\"FTP\"))\r\n {\r\n mapDatesFiles = ListDatesFilesFTP();\r\n };\r\n\r\n if ((mData.mode).equalsIgnoreCase(\"HTTP\"))\r\n {\r\n mapDatesFiles = ListDatesFilesHTTP();\r\n };\r\n System.out.println(\"Finished creating ListDatesFiles map for '\" + mData.Title + \"':'\" + mData.name + \"'.\");\r\n }\r\n mapDatesFilesSet = new Boolean(true);\r\n }\r\n }\r\n\r\n for(DataDate dd : mapDatesFiles.keySet())\r\n {\r\n files = new ArrayList<String>();\r\n for(String file : mapDatesFiles.get(dd))\r\n {\r\n files.add(new String(file));\r\n }\r\n filesMap.put(dd, files);\r\n }\r\n return filesMap;\r\n }",
"@Override\n public NavigableMap<LocalDateTime, List<Gadget>> getGadgetListWithKeys() {\n return Collections.unmodifiableNavigableMap(orders);\n }",
"@Override\n public Map<K, ICacheElement<K, V>> getCacheElements( final Set<K> names )\n {\n return this.getCacheControl().getMultiple( names );\n }",
"synchronized HashMap flushTemporaryPrototypeCache() {\n HashMap c = _pcache;\n _pcache = null;\n return c;\n }",
"public final Map<String, Object> getInternalMap() {\n\t\treturn values;\n\t}",
"private DataCache() {\n this.people = new HashMap<>();\n this.events = new HashMap<>();\n this.personEvents = new HashMap<>();\n this.currentPersonEvents = new HashMap<>();\n this.eventTypes = new ArrayList<>();\n this.childrenMap = new HashMap<>();\n this.maleSpouse = new HashSet<>();\n this.femaleSpouse = new HashSet<>();\n this.paternalAncestorsMales = new HashSet<>();\n this.paternalAncestorsFemales = new HashSet<>();\n this.maternalAncestorsMales = new HashSet<>();\n this.maternalAncestorsFemales = new HashSet<>();\n }",
"public TimeMap() {\n hashMap = new HashMap<String, List<Data>>();\n }",
"@Contract(value = \" -> new\", pure = true)\n @Nonnull\n public static <K, V> Map<K, V> createSoftMap() {\n return Maps.newSoftHashMap();\n }",
"private static InternalCacheConfig defaultTimestampsCacheConfig() {\n InternalCacheConfig cacheConfig = new InternalCacheConfig();\n cacheConfig.maxIdle = Time.forever();\n cacheConfig.objectCount = -1;\n return cacheConfig;\n }",
"private List<itemInfo> getNewEntries() {\n\n final List<itemInfo> entries = new ArrayList<itemInfo>();\n return entries;\n }",
"public static HashMap<UUID, Integer> getSafeLogoutPlayers() {\n return new HashMap<UUID, Integer>(safeLogoutPlayers);\n }",
"public Map<Diff<K>, Diff<V>> getMap() {\r\n return map;\r\n }",
"public HashMap<Integer, CheckersGame> getCurrentGames() {\n HashMap<Integer, CheckersGame> currentGames = new HashMap<>();\n Iterator<Map.Entry<Integer, CheckersGame>> cgit = games.entrySet().iterator();\n\n while (cgit.hasNext()) {\n Map.Entry<Integer, CheckersGame> entry = cgit.next();\n\n // Remove entry if key is null or equals 0.\n if (!entry.getValue().isGameOver()) {\n currentGames.put(entry.getKey(), entry.getValue());\n }\n }\n return currentGames;\n }"
] | [
"0.7157262",
"0.6553892",
"0.6511355",
"0.6317043",
"0.6227059",
"0.62204957",
"0.6127921",
"0.60282254",
"0.60179013",
"0.60090566",
"0.60066986",
"0.59967804",
"0.59182346",
"0.5878738",
"0.58650005",
"0.58117443",
"0.56926435",
"0.56854147",
"0.56626594",
"0.562788",
"0.5606759",
"0.5606735",
"0.56062967",
"0.55565196",
"0.55564487",
"0.55532336",
"0.5519023",
"0.5512582",
"0.54842234",
"0.54700994",
"0.54655206",
"0.54569924",
"0.54339653",
"0.5380329",
"0.5379972",
"0.53755933",
"0.5352958",
"0.53440565",
"0.53361243",
"0.5322384",
"0.5319885",
"0.53064644",
"0.5279192",
"0.5274369",
"0.5269056",
"0.52629197",
"0.52360666",
"0.5235608",
"0.5231978",
"0.5231911",
"0.5230751",
"0.5219738",
"0.5216882",
"0.5215142",
"0.5214612",
"0.5212527",
"0.52113503",
"0.5209899",
"0.5207642",
"0.5203283",
"0.52015424",
"0.51917124",
"0.5186536",
"0.5183233",
"0.51721627",
"0.5171116",
"0.51672614",
"0.51663643",
"0.51636344",
"0.51460385",
"0.5145672",
"0.514284",
"0.5139809",
"0.51322764",
"0.51300913",
"0.5125483",
"0.51219845",
"0.51176286",
"0.5112676",
"0.5111276",
"0.5105928",
"0.50966054",
"0.5092262",
"0.50846344",
"0.5084623",
"0.5079019",
"0.5077598",
"0.5072581",
"0.5033871",
"0.50308466",
"0.50257397",
"0.5019445",
"0.5016869",
"0.5011542",
"0.5009431",
"0.50063187",
"0.5004663",
"0.49962404",
"0.4995891",
"0.49947226"
] | 0.7678634 | 0 |
Determine if a value has expired, i.e., become stale. | private boolean isExpired(CacheableObject value) {
if (value == null) {
return false;
} else {
return System.currentTimeMillis() - value.createTime > timeToLive;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isExpired() {\n return getExpiration() <= System.currentTimeMillis() / 1000L;\n }",
"public boolean isExpired() {\n return System.currentTimeMillis() > this.expiry;\n }",
"public boolean isExpired() {\n return age() > this.timeout;\n }",
"public boolean isExpired()\n {\n long dtExpiry = m_dtExpiry;\n return dtExpiry != 0 && dtExpiry < getSafeTimeMillis();\n }",
"boolean hasExpired();",
"boolean expired();",
"public boolean isExpired() {\n\t\treturn this.maturityDt.before(Calendar.getInstance().getTime());\n\t}",
"public boolean hasExpired() {\n return this.getOriginalTime() + TimeUnit.MINUTES.toMillis(2) < System.currentTimeMillis();\n }",
"boolean isExpired();",
"public boolean isExpired() {\n return expired;\n }",
"public boolean isExpired() {\n return expired;\n }",
"public boolean isExpired() {\n\n return this.expiration.before(new Date());\n }",
"public boolean hasExpired(){\n Date now = new Date();\n return now.after(getExpireTime());\n }",
"@Override\n\tpublic boolean isExpired();",
"public boolean isExpired()\n\t{\n\t\tif (TimeRemaining == 0) \n\t\t\treturn true;\n\t\telse return false;\n\t}",
"@Override\n\tpublic boolean isExpired() {\n\t\treturn model.isExpired();\n\t}",
"boolean checkForExpiration() {\n boolean expired = false;\n\n // check if lease exists and lease expire is not MAX_VALUE\n if (leaseId > -1 && leaseExpireTime < Long.MAX_VALUE) {\n\n long currentTime = getCurrentTime();\n if (currentTime > leaseExpireTime) {\n if (logger.isTraceEnabled(LogMarker.DLS_VERBOSE)) {\n logger.trace(LogMarker.DLS_VERBOSE, \"[checkForExpiration] Expiring token at {}: {}\",\n currentTime, this);\n }\n noteExpiredLease();\n basicReleaseLock();\n expired = true;\n }\n }\n\n return expired;\n }",
"public boolean isExpired() {\n return ((System.currentTimeMillis() - this.createdTime) >= expiryTime);\n }",
"public Boolean isExpired() {\n\t\tCalendar today = Calendar.getInstance();\n\t\treturn today.get(Calendar.DAY_OF_YEAR) != date.get(Calendar.DAY_OF_YEAR);\n\t}",
"public boolean isExpired(){\r\n float empty = 0.0f;\r\n return empty == getAmount();\r\n \r\n }",
"public boolean hasExpired() {\n return (time.milliseconds() - this.lastRecordTime) > this.inactiveSensorExpirationTimeMs;\n }",
"boolean hasExpiry();",
"public boolean expired(){\n return !Period.between(dateOfPurchase.plusYears(1), LocalDate.now()).isNegative();\n }",
"public boolean isExpired() {\r\n if (expiresDate != null) {\r\n Date rightNow = new Date();\r\n return expiresDate.before(rightNow);\r\n }\r\n return false;\r\n }",
"public boolean isExpired() {\n\t\t// Return whether the exipred after time has passed in American Samoa\n\t\treturn getSamoaNow().after(this.expiredAfter);\n\t}",
"public boolean mayHaveExpired() {\n return mayHaveExpired;\n }",
"public boolean hasExpired() {\n return (System.currentTimeMillis() - lastUpdate) > IMAGE_CACHE_EXPIRE;\n }",
"public boolean isExpired() {\n final LocalDateTime now = LocalDateTime.now().minusSeconds(10L);\n return now.isAfter(startTime.plusMinutes(exam.getExamTime())) || endTime != null;\n }",
"private boolean hasCoolOffPeriodExpired(Jwt jwt) {\n\n Date issuedAtTime = jwt.getClaimsSet().getIssuedAtTime();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.set(Calendar.MILLISECOND, 0);\n calendar.add(Calendar.MINUTE, -1);\n\n return calendar.getTime().compareTo(issuedAtTime) > 0;\n }",
"public boolean isLate(){\n Date d = givenBack != null ? givenBack : new Date();\n return expirationDate.before(d);\n }",
"boolean hasExpiryTimeSecs();",
"boolean hasExpirationDate();",
"public boolean isEnd() { return (_dateExpiration - System.currentTimeMillis()) <= 0; }",
"public final boolean isSetOrExpired()\n/* */ {\n/* 111 */ return (this.result != RESULT_NONE) || (this.expired);\n/* */ }",
"public boolean hasExpired(Map params, Date since) \r\n\t{\t\t\r\n \treturn (System.currentTimeMillis() - since.getTime()) > 5000;\r\n\t}",
"public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }",
"public boolean isSecurityTokenExpired() {\n return System.currentTimeMillis() > securityTokenExpiryTime || isExpired();\n }",
"public boolean hasExpire() {\n return result.hasExpire();\n }",
"public boolean hasExpire() {\n return result.hasExpire();\n }",
"public boolean hasExpire() {\n return result.hasExpire();\n }",
"public boolean checkTimeout(){\n\t\tif((System.currentTimeMillis()-this.activeTime.getTime())/1000 >= this.expire){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }",
"@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }",
"@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }",
"boolean isExpire(long currentTime);",
"public boolean hasExpiryTimeSecs() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean isExpiredAt(long ldtNow)\n {\n return m_metaInf.isExpiredAt(ldtNow);\n }",
"public synchronized void checkTokenExpiry() {\n if (this.mExpiryDate != null && this.mExpiryDate.getTime() <= System.currentTimeMillis() + REFRESH_THRESHOLD) {\n acquireTokenAsync();\n }\n }",
"public boolean hasExpiryTimeSecs() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"@java.lang.Override\n public boolean getWaitExpired() {\n return waitExpired_;\n }",
"@java.lang.Override\n public boolean hasExpires() {\n return instance.hasExpires();\n }",
"@java.lang.Override\n public boolean getWaitExpired() {\n return waitExpired_;\n }",
"public static boolean hasExpired(String name, Timeable caller) {\n\t\tnac.setName(name);\n\t\tnac.setCaller(caller);\n\t\tif (!clocks.containsKey(nac)) {\n\t\t\tSystem.err.println(\"No timer with the name: '\" + name + \"' exists\");\n\t\t\treturn false;\n\t\t}\n\t\tlong curTime = System.currentTimeMillis();\n\t\tboolean result = clocks.get(nac) < curTime;\n\t\treturn result;\n\t}",
"public boolean checkTokenExpiry() {\n //System.out.println(\"Checking token expiry...\");\n Date now = new Date();\n long nowTime = now.getTime();\n //Date expire;\n Date tokenEXPClaim;\n long expires;\n try {\n DecodedJWT recievedToken = JWT.decode(currentAccessToken);\n tokenEXPClaim = recievedToken.getExpiresAt();\n expires = tokenEXPClaim.getTime();\n //System.out.println(\"Now is \"+nowTime);\n //System.out.println(\"Expires at \"+expires);\n //System.out.println(\"Expired? \"+(nowTime >= expires));\n return nowTime >= expires;\n } \n catch (Exception exception){\n System.out.println(\"Problem with token, no way to check expiry\");\n System.out.println(exception);\n return true;\n }\n \n }",
"Date getExpiredDate();",
"boolean isAccountNonExpired();",
"boolean isAccountNonExpired();",
"public boolean accessTokenExpired() {\n Date currentTime = new Date();\n if ((currentTime.getTime() - lastAccessTime.getTime()) > TIMEOUT_PERIOD) {\n return true;\n } else {\n return false;\n }\n }",
"void setExpired(boolean expired);",
"public Builder setWaitExpired(boolean value) {\n\n waitExpired_ = value;\n bitField0_ |= 0x00000004;\n onChanged();\n return this;\n }",
"public final boolean hasExpired(long curTime) {\n\t if ( m_tmo == NoTimeout)\n\t \treturn false;\n\t if ( curTime > m_tmo)\n\t \treturn true;\n\t return false;\n\t}",
"@Override\n public boolean isAccountNonExpired() {\n return !locked;\n }",
"public Boolean hasCardExpired(Date currentDate);",
"public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"boolean hasExpires();",
"@Override\r\n public boolean isAccountNonExpired() {\r\n return true;\r\n }",
"public boolean isExpired(long currentTimeMs) {\n return this.contextSet.isExpired(currentTimeMs);\n }",
"@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\r\n\t}",
"public boolean isAlwaysValid() {\n return new Date().before(this.getExpirationDate()) && this.hasNotBeenUsed();\n }",
"public boolean isAccountNonExpired() {\n\t\treturn true;\r\n\t}",
"boolean hasExpireDate();",
"private Boolean isTokenExpired(String token) {\n\t\tfinal Date expiration = getExpirationDateFromToken(token);\n\t\treturn expiration.before(new Date());\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired()\n\t{\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@java.lang.Override\n public boolean hasExpires() {\n return ((bitField0_ & 0x00000004) != 0);\n }",
"public void checkExpiration(){\n //Will grab the time from the timer and compare it to the job expiration\n //Then will grab each jobID that is expired\n //Will then add it to a String array\n //then remove all those jobs in the String array\n //return true if found\n\n for(int i=0; i < jobs.size(); i++){\n currentJob = jobs.get(i);\n if(currentJob.getExpData().compareTo(JobSystemCoordinator.timer.getCurrentDate())==0){\n currentJob.setStatus(\"EXPIRED\");\n }\n }\n }",
"public boolean isAccountNonExpired() {\n\t\treturn false;\r\n\t}",
"@Override\n public boolean isAccountNonExpired() {\n return true;\n }",
"@Override\n public boolean isAccountNonExpired() {\n return true;\n }",
"@Override\n public boolean isAccountNonExpired() {\n return true;\n }",
"public boolean isTooOld(){\n\t\tgetOlder();\n\t\treturn age >= maxAge;\n\t}",
"@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isAccountNonExpired() {\n\t\treturn false;\r\n\t}",
"public boolean isAccountNonExpired() {\n\t\treturn true;\n\t}",
"@Override\n\t\t\t\tpublic boolean isAccountNonExpired() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"@Test\n public void isExpired() throws Exception {\n // session was just created so it should not be expired as long\n // as the test does not take hours to complete\n assertFalse(session.isExpired());\n }"
] | [
"0.7636791",
"0.7562505",
"0.75412065",
"0.7527448",
"0.7513616",
"0.74793494",
"0.74588525",
"0.7457113",
"0.74314547",
"0.74195695",
"0.74195695",
"0.7401423",
"0.73087585",
"0.730105",
"0.72718096",
"0.7248409",
"0.7217545",
"0.721732",
"0.71225417",
"0.70729995",
"0.70521384",
"0.70471066",
"0.7004033",
"0.6952746",
"0.69082344",
"0.6902912",
"0.6766807",
"0.6704584",
"0.668678",
"0.6681177",
"0.66724586",
"0.66611403",
"0.6511497",
"0.6506842",
"0.6476973",
"0.6456648",
"0.6420758",
"0.64172673",
"0.64172673",
"0.64172673",
"0.64002925",
"0.63989073",
"0.63893414",
"0.6376965",
"0.6336777",
"0.630379",
"0.62957454",
"0.62882596",
"0.6276738",
"0.6264921",
"0.6252395",
"0.62338674",
"0.62311584",
"0.6227228",
"0.6195704",
"0.6188122",
"0.6188122",
"0.61762816",
"0.6175061",
"0.61718667",
"0.6150675",
"0.61470014",
"0.6124131",
"0.61136836",
"0.6103574",
"0.6101096",
"0.60847616",
"0.606959",
"0.606959",
"0.6069269",
"0.6067481",
"0.6066128",
"0.60465103",
"0.60459334",
"0.60434484",
"0.60434484",
"0.60434484",
"0.60434484",
"0.60434484",
"0.60434484",
"0.60434484",
"0.60434484",
"0.60434484",
"0.60434484",
"0.60434484",
"0.60434484",
"0.60434484",
"0.60434484",
"0.6034864",
"0.60174644",
"0.6017232",
"0.6014256",
"0.6014256",
"0.6014256",
"0.6008456",
"0.59973526",
"0.59973526",
"0.5997063",
"0.59960544",
"0.5994363"
] | 0.73793817 | 12 |
Remove all expired entries from the underlying map. This process runs on a separate thread, and cedes control of lock between each attempt to remove a value from the map. | private void removeExpired() {
Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);
List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();
// Retrieve a list of everything that's to be removed
synchronized(theLock) {
for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {
if (isExpired(entry.getValue())) {
removeMap.put(entry.getKey(), entry.getValue());
}
}
tempListeners.addAll(listeners);
}
// Remove the entries one-at-a-time, notifying the listener[s] in the process
for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {
synchronized(theLock) {
currentCacheSize -= entry.getValue().containmentCount;
valueMap.remove(entry.getKey());
}
Thread.yield();
for (CacheListener<K> listener : tempListeners) {
listener.expiredElement(entry.getKey());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void removeEvicted() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n removeMap.putAll(toEvictMap);\n toEvictMap.clear();\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.evictedElement(entry.getKey());\n }\n }\n }",
"private void cleanup() {\n\t\tTreeSet<CacheEntry> entries = new TreeSet<CacheEntry>(map.values());\n\t\tint i = region.getItemsToEvict();\n\t\tIterator<CacheEntry> it = entries.iterator();\n\t\twhile (it.hasNext() && i > 0) {\n\t\t\tremoveEntry(it.next());\n\t\t\ti--;\n\t\t}\n\t}",
"synchronized public List<StickyRecord> removeExpired()\n {\n List<StickyRecord> removed = new ArrayList();\n long now = System.currentTimeMillis();\n Iterator<StickyRecord> i = _records.values().iterator();\n while (i.hasNext()) {\n StickyRecord record = i.next();\n if (!record.isValidAt(now)) {\n i.remove();\n removed.add(record);\n }\n }\n return removed;\n }",
"@SuppressWarnings({\"unchecked\", \"CallToThreadYield\"})\n public void cleanup() {\n\n long now = System.currentTimeMillis();\n ArrayList<K> deleteKey;\n\n synchronized (cacheMap) {\n MapIterator itr = cacheMap.mapIterator();\n\n deleteKey = new ArrayList<>((cacheMap.size() / 2) + 1);\n K key;\n CacheObject c;\n\n while (itr.hasNext()) {\n key = (K) itr.next();\n c = (CacheObject) itr.getValue();\n\n if (c != null && (now > (timeToLive + c.lastAccessed))) {\n deleteKey.add(key);\n }\n }\n }\n\n deleteKey.stream().map((key) -> {\n synchronized (cacheMap) {\n Object remove = cacheMap.remove(key);\n }\n return key;\n }).forEachOrdered((K _item) -> {\n Thread.yield();\n });\n }",
"private static void cleanLeaseCache(Map<HashPair, Lease> tc) {\n for (Iterator<Lease> iter = tc.values().iterator(); iter.hasNext(); ) {\n Lease l = iter.next();\n if (l.isExpired(Router.CLOCK_FUDGE_FACTOR))\n iter.remove();\n }\n }",
"@Override\n public void cleanup() {\n for (String key : cache.keySet()) {\n CacheObject co = cache.get(key).get();\n if (co.isExpired()) {\n synchronized (co) {\n if (co.isExpired()) {\n cache.remove(key);\n queue.add(co);\n }\n }\n }\n }\n\n }",
"public synchronized void evict()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n deferFlush();\n\n // walk all buckets\n SafeHashMap.Entry[] aeBucket = m_aeBucket;\n int cBuckets = aeBucket.length;\n for (int iBucket = 0; iBucket < cBuckets; ++iBucket)\n {\n // walk all entries in the bucket\n Entry entry = (Entry) aeBucket[iBucket];\n while (entry != null)\n {\n if (entry.isExpired())\n {\n removeExpired(entry, true);\n }\n entry = entry.getNext();\n }\n }\n\n // schedule next flush\n scheduleFlush();\n }",
"protected void invalidateAll() {\n\t\tfor (CacheEntry entry : map.values()) {\n\t\t\tentry.getItem().invalidate();\n\t\t}\n\t}",
"public void cleanInvalidSession() {\n\t\tIterator<Entry<String, Session>> it = this.entrySet().iterator();\n\t\twhile(it.hasNext()) {\n\t\t\tEntry<String, Session> entry = it.next();\n\t\t\tif(entry.getValue().getExpirationTS().before(new Date())) {\n\t\t\t\tit.remove();\n\t\t\t}\n\t\t}\n\t}",
"public void evictAll() {\n cacheManager.getCache(DomainValueRepository.DomainValueCache.DOMAIN_VALUE_BY_DOMAIN_ID).clear();\n }",
"private static void cleanLeaseSetCache(RouterContext ctx, Map<HashPair, LeaseSet> tc) {\n long now = ctx.clock().now();\n for (Iterator<LeaseSet> iter = tc.values().iterator(); iter.hasNext(); ) {\n LeaseSet l = iter.next();\n if (l.getEarliestLeaseDate() < now)\n iter.remove();\n }\n }",
"void removeAllEntries();",
"public void interestCachePurge()\n\t{\n\t\tdouble currentTime = getTime() ;\n\t\tfor(InterestCacheEntry entry:interestCache.values()){\n\t\t\tentry.setPayable(macroLearner.calcPayable(entry.getInterest(),entry.getMaxGradient().getPayment()));\n\t\t\tentry.gradientListPurge(currentTime) ;\n\t\t\t//microLearner.updateTaskExpectedPrice(entry.getInterest().getTaskId());\n\t\t\t/*if ( entry.IsGradientListEmpty() == true ){\n\t\t\t\tit.remove();\n\t\t\t}\t*/\t\t\n\t\t}\n\t}",
"public void clear() {\r\n\t\tentryMap.clear();\r\n\t}",
"@Scheduled(fixedRate = 60000)\n\tpublic void evictExpiredTokens() {\n\t\tlogger.info(\"Evicting expired tokens.\");\n\t\ttokenCache.evictExpiredElements();\n\t\ttokenCache.flush();\n\t}",
"protected synchronized void removeExpired(Entry entry, boolean fRemoveInternal)\n {\n entry.discard();\n if (fRemoveInternal)\n {\n super.removeEntryInternal(entry);\n }\n }",
"private void m50958c() {\n while (!this.f36886a.isEmpty()) {\n C8667b peek = this.f36886a.peek();\n if (peek != null) {\n if (peek.mo54373e() || this.f36886a.size() > 6) {\n AbstractC8508c.m50239c(\"remove Expired task\");\n this.f36886a.remove(peek);\n } else {\n return;\n }\n }\n }\n }",
"public void execute(){\n Long deadLine = Calendar.getInstance().getTimeInMillis() - sessionTimeOut;\n \n for (Map.Entry<String,SecureEntry> entry : secureMap.entrySet()) {\n if (entry.getValue().timestamp > deadLine){\n secureMap.remove(entry.getKey());\n }\n }\n }",
"private void removeIfExpired(final Object key, final long now) {\n\tfinal Long expirationTimeObject = expirationMap.get(key);\n\tif (isExpired(now, expirationTimeObject)) {\n\t remove(key);\n\t}\n }",
"public void removeExpiredAuctions(){\r\n ArrayList <String> expiredAuction = new ArrayList <String>(super.size());\r\n for(String expiredKey: keySet()){\r\n if(getAuction(expiredKey).getTimeRemaining() == 0){\r\n expiredAuction.add(expiredKey);\r\n }\r\n } \r\n for(String expiredKey: expiredAuction){\r\n super.remove(expiredKey);\r\n }\r\n }",
"@SuppressWarnings(\"unchecked\")\n public void expunge() {\n Entry<K, V> entry;\n while ((entry = (Entry<K, V>) refqueue.poll()) != null) {\n final int index = index(entry.hash, entries.length);\n\n Entry<K, V> temp = entries[index];\n Entry<K, V> previous = temp;\n while (temp != null) {\n final Entry<K, V> next = temp.nextEntry;\n if (temp == entry) {\n if (previous == entry) {\n entries[index] = next;\n } else {\n previous.nextEntry = next;\n }\n entry.nextEntry = null;\n entry.value = null;\n size--;\n break;\n }\n previous = temp;\n temp = next;\n }\n }\n }",
"public void clearTimeEntryCache()\n {\n synchronized(timeEntries)\n {\n for (int i = 0; i < timeEntries.size(); i++)\n {\n timeEntries.set(i,TIME_ENTRY_NULL);\n }\n timeEntriesUpdateTimeStamp = 0L;\n }\n synchronized(timeEntryHoursSumDateMap)\n {\n timeEntryHoursSumDateMap.clear();\n }\n }",
"protected void discard()\n {\n if (!isDiscarded())\n {\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cUnits = m_cUnits;\n if (cUnits == -1)\n {\n // entry is discarded; avoid repetitive events\n return;\n }\n\n if (cUnits > 0)\n {\n map.adjustUnits(-cUnits);\n }\n\n m_cUnits = -1;\n }\n\n // issue remove notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_DELETED, getKey(), getValue(), null));\n }\n }\n }",
"protected void computeEntryRemoved(K key, InternalCacheEntry<K, V> value) {\n // Do nothing by default\n }",
"@Override\n public void run() {\n // let's cache the current time - we do not operate on a millisecond precision anyway\n final long currentTimeMillis = System.currentTimeMillis();\n // iterate through all entries and remove those where the current time is past their expiry\n Set<Map.Entry<Tuple2<JobID, TransientBlobKey>, Long>> entries =\n new HashSet<>(blobExpiryTimes.entrySet());\n for (Map.Entry<Tuple2<JobID, TransientBlobKey>, Long> entry : entries) {\n if (currentTimeMillis >= entry.getValue()) {\n JobID jobId = entry.getKey().f0;\n TransientBlobKey blobKey = entry.getKey().f1;\n\n cleanupCallback.accept(jobId, blobKey);\n }\n }\n }",
"protected CacheEntry purgeEntry() throws Exception {\n CacheEntry entry = _first;\n\n // Notify policy listeners first. if any of them throw an\n // eviction exception, then the internal data structure\n // remains untouched.\n CachePolicyListener listener;\n for (int i=0; i<listeners.size(); i++) {\n listener = (CachePolicyListener)listeners.elementAt(i);\n listener.cacheObjectEvicted(entry.getValue());\n }\n\n removeEntry(entry);\n _hash.remove(entry.getKey());\n\n entry.setValue(null);\n return entry;\n }",
"private static void cleanReplyCache(RouterContext ctx, Map<HashPair, Long> tc) {\n long now = ctx.clock().now();\n for (Iterator<Long> iter = tc.values().iterator(); iter.hasNext(); ) {\n Long l = iter.next();\n if (l.longValue() < now - CLEAN_INTERVAL)\n iter.remove();\n }\n }",
"public void removeAllEntries() {\n }",
"@CacheEvict(value = \"exchangeRate\", allEntries = true)\r\n public void evictAllCacheValues() {\r\n }",
"private void skipStaleEntries()\n {\n while (this.index < keys.size() && !HashBijectiveMap.this.containsKey(keys.get(this.index)))\n this.index++;\n }",
"public void clearInactiveCacheRefs()\n {\n for (Iterator<Map> iterByName = m_mapByName.values().iterator(); iterByName.hasNext(); )\n {\n Map mapByLoader = iterByName.next();\n\n synchronized (mapByLoader)\n {\n for (Iterator iter = mapByLoader.entrySet().iterator(); iter.hasNext(); )\n {\n Map.Entry entry = (Map.Entry) iter.next();\n\n Object oHolder = entry.getValue();\n\n if (oHolder instanceof NamedCache)\n {\n NamedCache cache = (NamedCache) entry.getValue();\n\n if (cache.isDestroyed() || cache.isReleased())\n {\n iter.remove();\n internalReleaseCache(cache);\n }\n }\n else if (oHolder instanceof SubjectScopedReference)\n {\n Collection col = ((SubjectScopedReference) oHolder).values();\n\n if (!col.isEmpty())\n {\n // all the entries in the SubjectScopedReference refer\n // to the same NamedCache instance, so we only need to\n // check the first one\n NamedCache cache = (NamedCache) col.iterator().next();\n if (cache.isDestroyed() || cache.isReleased())\n {\n iter.remove();\n internalReleaseCache(cache);\n }\n }\n }\n }\n\n if (mapByLoader.isEmpty())\n {\n iterByName.remove();\n }\n }\n }\n }",
"void remove(ThreadLocal<?> key) {\n cleanUp();\n\n for (int index = key.hash & mask;; index = next(index)) {\n Object reference = table[index];\n\n if (reference == key.reference) {\n // Success!\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n return;\n }\n\n if (reference == null) {\n // No entry found.\n return;\n }\n }\n }",
"@Override\n\tpublic V invalidateEntry(K key) {\n\t\tcheckNullKey(key);\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\treturn cache.remove(key);\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"protected void removeOldData() {\n if (!storage.isEmpty()) {\n long timeLowerbound = storage.lastKey() - maxStorageTime;\n while (!storage.isEmpty() && storage.firstKey() < timeLowerbound) {\n storage.pollFirstEntry();\n } \n }\n }",
"void cleanUpExpiredSessions() {\n try (TarantoolClient client = clientSource.getClient()) {\n client.select(getSpace(client), SPACE_EXPIRY_INDEX, Integer.MAX_VALUE, 0, Iter.LE);\n client.setLong(System.currentTimeMillis());\n Result result = client.execute();\n Set<UUID> ids = new HashSet<>();\n while (result.next()) {\n ids.add(new UUID(result.getLong(2), result.getLong(3)));\n }\n ids.forEach(id -> deleteById(id, client));\n if (logger.isDebugEnabled()) {\n logger.debug(\"Cleaned up \" + ids.size() + \" expired sessions\");\n }\n }\n }",
"private void removeTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n SoftReference<TimeEntry> timeEntrySoftReference = null;\n ListIterator<SoftReference<TimeEntry>> iterator = timeEntries.listIterator();\n while (iterator.hasNext() && (timeEntrySoftReference == null))\n {\n SoftReference<TimeEntry> softReference = iterator.next();\n if ((softReference != null) && softReference.get() == timeEntry)\n {\n timeEntrySoftReference = softReference;\n }\n }\n if (timeEntrySoftReference != null)\n {\n timeEntries.remove(timeEntrySoftReference);\n }\n }\n }",
"protected void evict(String key) throws Exception {\n \tString value = map.get(key);\n \tkvdb.put(key, value);\n \tmap.remove(key);\n \tusageCounter.remove(key);\n }",
"public void clearExpiredTokens();",
"List<MongoDBEntry<K, V>> removeExpiredData(byte[] lastKey);",
"public void clearMap()\n {\n ++this.versionStamp;\n IntHashMapEntry[] ainthashmapentry = this.slots;\n\n for (int i = 0; i < ainthashmapentry.length; ++i)\n {\n ainthashmapentry[i] = null;\n }\n\n this.count = 0;\n }",
"public void clear() {\n synchronized (LOCK) {\n myValues.clear();\n }\n }",
"public void cleanUp() {\n if(ticker.skipCleanup()) {\n return;\n } \n \n // At this point cleanup is inevitable, so linked list traversal should\n // be performed. \n Entry<K, V> e = segment.head();\n Entry<K, V> end = segment.tail();\n \n int processed = 0;\n long createThreshold = ticker.nextTick() - createTTL;\n long accessThreshold = ticker.nextTick() - accessTTL;\n\n Object removeKey = null;\n while ((e = e.getNext()) != end && processed++ < REMOVE_DEPTH) {\n if (null != removeKey) {\n segment.remove(removeKey);\n removeKey = null;\n }\n\n // both, access and creation thresholds might trigger entry removal \n if (e.getCreationTime() <= createThreshold || e.getAccessTime() <= accessThreshold) {\n removeKey = e.getKey();\n }\n }\n\n if (null != removeKey) {\n segment.remove(removeKey);\n } \n ticker.markCleanup();\n }",
"@Override\r\n protected void processRemovedLRU(final K key, final IndexedDiskElementDescriptor value)\r\n {\r\n addToRecycleBin(value);\r\n log.debug(\"{0}: Removing key: [{1}] from key store.\", logCacheName, key);\r\n log.debug(\"{0}: Key store size: [{1}].\", logCacheName, this.size());\r\n\r\n doOptimizeRealTime();\r\n }",
"public void clear() {\r\n // synchronization is not a problem here\r\n // if this code were to be called while someone was getting or setting data\r\n // in the buckets, it would still work\r\n // in the case of someone setting a value in the buckets, then this coming along\r\n // and resetting the buckets-entry to null is fine, because the client still has the data reference\r\n // in the case of someone getting a value from the buckets while this is being reset\r\n // is fine as well because, if they get the data before it's set, they got it\r\n // if they as for it after it gets set to null, that's fine as well it's null and\r\n // that's a normal expected condition\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n buckets[i] = new AtomicReference<CacheData<K, V>>(null);\r\n }\r\n }",
"public void clean() {\n Long now = System.currentTimeMillis();\n for (Iterator<Long> iterator = this.deleted.iterator(); iterator.hasNext();) {\n Long l = iterator.next();\n if (l < now) {\n iterator.remove();\n }\n }\n }",
"@Override\n\t\tpublic void remove() {\n\t\t\tif ( _expectedSize != TOrderedHashMap.this.size() ) { throw new ConcurrentModificationException(); }\n\n\t\t\t// Disable auto compaction during the remove. This is a workaround\n\t\t\t// for bug 1642768.\n\t\t\ttry {\n\t\t\t\tTOrderedHashMap.this.tempDisableAutoCompaction();\n\t\t\t\tTOrderedHashMap.this.removeAt(_indicesByInsertOrder[_index]);\n\t\t\t} finally {\n\t\t\t\tTOrderedHashMap.this.reenableAutoCompaction(false);\n\t\t\t}\n\n\t\t\t_expectedSize--;\n\t\t}",
"@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tpublic void run() {\n\t\t\tsynchronized (mInetAddressList) {\n\t\t\t\tIterator<?> cacheIterator = mInetAddressList.entrySet().iterator();\n\t\t\t\twhile (cacheIterator.hasNext()) {\n\t\t\t\t\tMap.Entry<String, CacheElement> cacheEntry = (Map.Entry<String, CacheElement>) cacheIterator.next();\n\t\t\t\t\tif (System.currentTimeMillis() - cacheEntry.getValue().getCreateTime() >= mCacheTime * 1000) {\n\t\t\t\t\t\tcacheIterator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void entryEvicted(EntryEvent<Identifier, SystemMetadata> event) {\n // nothing to do, entry remains in backing store\n\n }",
"private synchronized void removeStreams() {\n Iterator<Map.Entry<Query, Long>> it = sheduledRemovals.entrySet().iterator();\n\n while (it.hasNext()) {\n Map.Entry<Query, Long> entry = it.next();\n if (entry.getValue() < System.currentTimeMillis()) {\n it.remove();\n Closeable stream = streams.get(entry.getKey());\n try {\n stream.close();\n }catch (IOException e){\n // TweetStreams can not throw IO-Exceptions on close.\n // Nothing to do here\n }\n streams.remove(entry.getKey());\n counts.remove(entry.getKey());\n }\n }\n }",
"public void clear()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n deferFlush();\n\n synchronized (this)\n {\n while (true)\n {\n try\n {\n // notify cache entries of their impending removal\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n ((Entry) iter.next()).discard();\n }\n\n // verify that the cache maintains its data correctly\n if (m_cCurUnits != 0)\n {\n // soft assertion\n Base.out(\"Invalid unit count after clear: \" + m_cCurUnits);\n m_cCurUnits = 0;\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n // reset the cache storage\n super.clear();\n\n // reset hit/miss stats\n resetHitStatistics();\n\n // schedule next flush\n scheduleFlush();\n }\n }",
"private void processQueue() {\n WeakValue<V, K> weakValue;\n while ((weakValue = (WeakValue<V, K>) queue.poll()) != null) {\n // remove it from the cache\n weakCache.remove(weakValue.key);\n }\n }",
"void evictedElement(T key);",
"Object getValueUnlocked(final TCServerMap map, final Object key) throws AbortedOperationException;",
"public void evictAll()\n {\n}",
"public static void main(String[] args) {\n Map<Integer, Integer> conMap = new HashMap<>();\n for(int i = 1; i < 1000000 ; i ++){\n conMap.put(i,i);\n }\n\n// Thread thread1 = new Thread(() -> {\n// while(true) {\n// for (Map.Entry<Integer, Integer> entry : conMap.entrySet()) {\n// entry.getKey();\n// }\n// }\n// });\n// thread1.start();\n//\n// Thread thread2 = new Thread( () ->{\n// for (Map.Entry<Integer, Integer> entry : conMap.entrySet()) {\n// conMap.remove(entry.getKey());\n// }\n// });\n// thread2.start();\n\n Thread thread3 = new Thread( () ->{\n// for (Map.Entry<Integer, Integer> entry : conMap.entrySet()) {\n// conMap.remove(entry.getKey());\n// }\n Iterator<Map.Entry<Integer,Integer>> iterator = conMap.entrySet().iterator();\n while(iterator.hasNext()){\n iterator.next();\n iterator.remove();\n }\n });\n thread3.start();\n }",
"void expiredElement(T key);",
"public void cleanup() {\n\n\t\tfinal long now = System.currentTimeMillis();\n\n\t\tsynchronized (this.recentlyRemovedChannels) {\n\n\t\t\tfinal Iterator<Map.Entry<ChannelID, Long>> it = this.recentlyRemovedChannels.entrySet().iterator();\n\t\t\twhile (it.hasNext()) {\n\n\t\t\t\tfinal Map.Entry<ChannelID, Long> entry = it.next();\n\t\t\t\tif ((entry.getValue().longValue() + CLEANUP_INTERVAL) < now) {\n\t\t\t\t\tit.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public Set<E> poll() {\n long now = Time.currentElapsedTime();\n long expirationTime = nextExpirationTime.get();\n if (now < expirationTime) {\n return Collections.emptySet();\n }\n\n Set<E> set = null;\n long newExpirationTime = expirationTime + expirationInterval;\n if (nextExpirationTime.compareAndSet(expirationTime, newExpirationTime)) {\n set = expiryMap.remove(expirationTime);\n }\n if (set == null) {\n return Collections.emptySet();\n }\n return set;\n }",
"void exit() {\n\t\tfor (ScopedProvider<?> e : scopedProviders.keySet()) {\n\t\t\tsynchronized(e) {\n\t\t\t\te.values.clear();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t\tfor (Entry<String, TreeMap<Integer, TradeObject>> entryObj : tradeStore.entrySet()) {\n\t\t\tList<TradeObject> expiredTrade = entryObj.getValue().values().parallelStream()\n\t\t\t\t\t.filter(t -> isTradeExpired(t)).map(t -> updatedExpired(t)).collect(Collectors.toList());\n\n\t\t\texpiredTrade.stream().collect(Collectors.toMap(TradeObject::getVersion, tradeObject -> tradeObject));\n\n\t\t\ttradeStore.put(entryObj.getKey(), new TreeMap<Integer, TradeObject>(expiredTrade.stream()\n\t\t\t\t\t.collect(Collectors.toMap(TradeObject::getVersion, tradeObject -> tradeObject))));\n\t\t}\n\t}",
"public void clear()\n\t{\n\t\tthrow new UnsupportedOperationException(\"Read Only Map\");\n\t}",
"void removeRowsLock();",
"@Override\n @CacheEvict(value=AccountingPeriod.CACHE_NAME,allEntries=true)\n public void clearCache() {\n }",
"void removeAllLocks(){\r\n \tpageAccess = new ConcurrentHashMap<String, AccessDetailVO>();\r\n\r\n }",
"final CacheData<K, V> removeEntry(final Object key) {\r\n // find the place to put it and stuff it in, overwriting what was\r\n // previously there\r\n // synchronization is not needed here, if this value changes to null\r\n // either before or after a client looks at it, it's not a problem\r\n int pos = getKeyPosition(key);\r\n CacheData<K, V> cacheData = getCacheData(pos);\r\n setCacheData(pos, null);\r\n return cacheData;\r\n }",
"public void evict(Object oKey)\n {\n Entry entry = (Entry) getEntryInternal(oKey);\n if (entry != null)\n {\n removeExpired(entry, true);\n }\n }",
"public void remove() {\r\n\t\t\trequireModificationCountUnchanged();\r\n\r\n\t\t\tif (currentEntry == null) {\r\n\t\t\t\tthrow new IllegalStateException();\r\n\t\t\t}\r\n\r\n\t\t\tSimpleHashtable.this.remove(currentEntry.key);\r\n\t\t\titeratorModificationCount++;\r\n\t\t\tcurrentEntry = null;\r\n\t\t}",
"@Override\r\n public void clear() {\r\n map.clear();\r\n }",
"@Override\n public void clear()\n {\n super.clear();\n \n /*\n * we handle the aborting timed events here so that it\n * doesn't occur in the write lock which could result\n * in deadlock since the events might have locks of their own\n */\n Collection<ITimedEvent> events = Collections.emptyList();\n try\n {\n getLock().readLock().lock();\n if (_pendingTimedEvents.size() != 0)\n events = new ArrayList<ITimedEvent>(_pendingTimedEvents);\n }\n finally\n {\n getLock().readLock().unlock();\n }\n \n for (ITimedEvent element : events)\n element.abort();\n \n }",
"public void clear() {\n map.clear();\n }",
"void doLogicalRemoveUnlocked(final TCServerMap map, final Object key);",
"@Override\r\n protected void processRemovedLRU(final K key, final IndexedDiskElementDescriptor value)\r\n {\r\n if (value != null)\r\n {\r\n subLengthFromCacheSize(value);\r\n }\r\n\r\n addToRecycleBin(value);\r\n\r\n log.debug(\"{0}: Removing key: [{1}] from key store.\", logCacheName, key);\r\n log.debug(\"{0}: Key store size: [{1}].\", logCacheName, this.size());\r\n\r\n doOptimizeRealTime();\r\n }",
"private void refreshTokenPool() {\n \n\t\tfor (Map.Entry<String, Token> entry : tokenPool.entrySet()) {\t\n\t\t\tToken token = entry.getValue();\n\t\t\tString key = entry.getKey();\n\t\t\tif(token.getExpiry() <= getTimeStampMilliSeconds()) {\n\t\t\t\ttokenPool.remove(key);\n\t\t\t\t//check if it is in live list and remove it\n\t\t\t\tif(liveTokenList.contains(key)) {\n\t\t\t\t\tremoveKeyFromTokenList(key);\n\t\t\t\t}\n\t\t //Add the token if it has never been live or if the current time is more than the last use + the rate \n\t\t\t} else if(token.getLastlive() == 0 || (getTimeStampMilliSeconds() >= token.getLastUsed()+token.getRate())) {\n//\t\t\t\tlogger.info(\"MAKE-LIVE : \" + (token.getLastlive()+token.getRate()) + \", : time : \" + getTimeStampMilliSeconds() + \", last used : \" + token.getLastUsed());\n\t\t\t\tif(!liveTokenList.contains(key)) {\n\t\t\t\t\taddKeyToTokenList(key);\n\t\t\t\t\ttoken.setLastlive(getTimeStampMilliSeconds());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void releaseAll()\n {\n for ( int i = 0; i < exclusiveLockCounts.length; i++ )\n {\n PrimitiveLongIntMap exclusiveLocks = exclusiveLockCounts[i];\n PrimitiveLongIntMap sharedLocks = sharedLockCounts[i];\n\n // Begin releasing exclusive locks, as we may hold both exclusive and shared locks on the same resource,\n // and so releasing exclusive locks means we can \"throw away\" our shared lock (which would normally have been\n // re-instated after releasing the exclusive lock).\n if(exclusiveLocks != null)\n {\n int size = exclusiveLocks.size();\n exclusiveLocks.visitKeys( releaseExclusiveAndClearSharedVisitor.initialize( sharedLocks, lockMaps[i] ));\n if(size <= 32)\n {\n // If the map is small, its fast and nice to GC to clear it. However, if its large, it is\n // 1) Faster to simply allocate a new one and\n // 2) Safer, because we guard against clients getting giant maps over time\n exclusiveLocks.clear();\n }\n else\n {\n exclusiveLockCounts[i] = Primitive.longIntMap();\n }\n }\n\n // Then release all remaining shared locks\n if(sharedLocks != null)\n {\n int size = sharedLocks.size();\n sharedLocks.visitKeys( releaseSharedDontCheckExclusiveVisitor.initialize( lockMaps[i] ) );\n if(size <= 32)\n {\n // If the map is small, its fast and nice to GC to clear it. However, if its large, it is\n // 1) Faster to simply allocate a new one and\n // 2) Safer, because we guard against clients getting giant maps over time\n sharedLocks.clear();\n }\n else\n {\n sharedLockCounts[i] = Primitive.longIntMap();\n }\n }\n }\n }",
"@Override\n\tpublic void clear() {\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\tcache.clear();\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"public void invalidate() {\n boolean hasLock = false;\n while (!hasLock) {\n synchronized (this) {\n if (!lock) {\n lock = true;\n hasLock = true;\n }\n }\n if (!hasLock) try {\n Thread.sleep(1000);\n } catch (Exception e) {\n }\n }\n try {\n if (cacheFile.exists()) cacheFile.delete();\n } finally {\n lock = false;\n }\n }",
"private void removeEntry(CacheEntry entry) {\n\t\tmap.remove(entry.getKey());\n\t\tsize.decrementAndGet();\n\t\tindex.remove(entry.getItem());\n\t\tentry.delete();\n\t}",
"@Override\n public void removeAllValues() {\n Map<String, ?> map = preferences.getAll();\n Iterator<String> iterator = map.keySet().iterator();\n while (iterator.hasNext()) {\n removeValue(iterator.next());\n }\n }",
"public void clear()\r\n {\r\n otherValueMap.clear();\r\n }",
"@Override\r\n\t\tprotected boolean removeEldestEntry(java.util.Map.Entry<K, com.vip.utils.AutoClearnMap.Entry<V>> eldest) {\n\t\t\tlong now = System.currentTimeMillis();\r\n\t\t\tif ((now - eldest.getValue().getLastTime()) > getMaxTime())\r\n\t\t\t\treturn true;\r\n\t\t\t\r\n\t\t\treturn super.removeEldestEntry(eldest);\r\n\t\t}",
"@Override\n\tpublic void clear() {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tmap[i] = new LocalEntry<>();\n\t\t}\n\n\t}",
"public final void clear() { _map.clear(); }",
"public void clear() {\n map.clear();\n }",
"private synchronized void performHouseKeeping() {\r\n\t\tSet<Map.Entry<Integer,QueueManager>> eS = queueManagers.entrySet();\r\n\t\tfor( Iterator<Map.Entry<Integer,QueueManager>> i = eS.iterator(); i.hasNext(); ) {\r\n\t\t\tMap.Entry<Integer,QueueManager> qMME = i.next();\r\n\t\t\tQueueManager qM = qMME.getValue();\r\n\t\t\tif( qM.houseKeepingAndTestForDelete() ) {\r\n\t\t\t\ti.remove();\r\n\t\t\t\tLOGGER.debug(\"Removed QueueManager with magic number \"+qM.getMagicNumber()+\" due to inactivity\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void removeEntry(K key);",
"public void pruneCooldowns() {\n HashMap<String, Long> cooldownsTempList = new HashMap<>();\n cooldownsList.keySet().forEach(key -> {\n long timeRemaining = cooldownDuration - (System.currentTimeMillis() - cooldownsList.get(key));\n if(timeRemaining > 0) {\n cooldownsTempList.put(key, cooldownsList.get(key));\n }\n });\n cooldownsList.clear();\n cooldownsList.putAll(cooldownsTempList);\n }",
"@Override\n public synchronized void clear() {\n this.keyMap.clear();\n super.clear();\n }",
"@Override\n\tpublic void clear() {\n\t\tmap.clear();\n\t\tkeys.clear();\n\t}",
"public void clearCache() {\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\t}",
"void evictFromCache( Long id );",
"public void clear() {\n buckets = new ArrayList<>();\n for (int i = 0; i < numBuckets; i++) {\n buckets.add(new ArrayList<>());\n }\n keySet = new HashSet<>();\n numEntries = 0;\n }",
"public static void purgeExpired()\n {\n Date now = new Date();\n List<DealWatchRecord> allRecords = getAllRecords(null);\n for (int i = 0; i < allRecords.size(); i++)\n {\n DealWatchRecord record = allRecords.get(i);\n if (record != null && record.expiration != null)\n {\n if (record.expiration.getTime() < now.getTime())\n {\n record.delete();\n }\n }\n }\n }",
"Entry<Key, Value> remove(Entry<Key, Value> entry);",
"protected synchronized void prune()\n {\n long ldtStart = Base.getSafeTimeMillis();\n int cCur = getUnits();\n int cMin = getLowUnits();\n if (cCur < cMin)\n {\n return;\n }\n\n int nType = getEvictionType();\n switch (nType)\n {\n default:\n case EVICTION_POLICY_HYBRID:\n {\n // sum the entries' units per priority\n int[] acUnits;\n while (true)\n {\n try\n {\n acUnits = new int[11];\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n Entry entry = (Entry) iter.next();\n int cUnits = entry.getUnits();\n try\n {\n acUnits[entry.getPriority()] += cUnits;\n }\n catch (IndexOutOfBoundsException e)\n {\n acUnits[Math.max(0, Math.min(entry.getPriority(), 10))] += cUnits;\n }\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n int cTotal = 0;\n int nPrunePriority = 0;\n while (nPrunePriority <= 10)\n {\n cTotal += acUnits[nPrunePriority];\n if (cTotal > cMin)\n {\n break;\n }\n ++nPrunePriority;\n }\n\n // build a list of entries to discard\n Entry entryDiscardHead = null;\n Entry entryDiscardTail = null;\n\n // determine the number at the cut-off priority that must be pruned\n int cAdditional = Math.max(0, cTotal - cMin);\n\n while (cCur > cMin)\n {\n try\n {\n for (Iterator iter = entrySet().iterator(); iter.hasNext() && cCur > cMin; )\n {\n Entry entry = (Entry) iter.next();\n int nPriority = entry.getPriority();\n if (nPriority >= nPrunePriority)\n {\n int cUnits = entry.getUnits();\n if (nPriority == nPrunePriority)\n {\n if (cAdditional <= 0)\n {\n continue;\n }\n cAdditional -= cUnits;\n }\n cCur -= cUnits;\n\n // remove the entry from the map\n super.removeEntryInternal(entry);\n\n // link the entry into the list of deferred\n // removals, but without changing its \"next\"\n // reference because the iterator that we are\n // using here is counting on that \"next\" ref\n if (entryDiscardHead == null)\n {\n entryDiscardHead = entry;\n }\n else\n {\n entryDiscardTail.setNext(entry);\n }\n entryDiscardTail = entry;\n }\n }\n\n // seal the end of the linked list of entries to discard\n if (entryDiscardTail != null)\n {\n entryDiscardTail.setNext(null);\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n // process the list of deferred removals\n for (Entry entryDiscard = entryDiscardHead; entryDiscard != null; )\n {\n // unlink it altogether\n Entry entryNext = entryDiscard.getNext();\n entryDiscard.setNext(null);\n\n // discard it\n removeExpired(entryDiscard, false);\n\n entryDiscard = entryNext;\n }\n }\n break;\n\n case EVICTION_POLICY_LRU:\n case EVICTION_POLICY_LFU:\n {\n boolean fLRU = (nType == EVICTION_POLICY_LRU);\n SparseArray array;\n while (true)\n {\n try\n {\n array = new SparseArray();\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n Entry entry = (Entry) iter.next();\n long lOrder = fLRU ? entry.getLastTouchMillis()\n : entry.getTouchCount();\n Object oPrev = array.set(lOrder, entry);\n if (oPrev != null)\n {\n // oops, more than one entry with the same order;\n // make a list of entries\n List list;\n if (oPrev instanceof List)\n {\n list = (List) oPrev;\n }\n else\n {\n list = new ArrayList();\n list.add((Entry) oPrev);\n }\n list.add(entry);\n array.set(lOrder, list);\n }\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n for (Iterator iter = array.iterator();\n getUnits() > cMin && iter.hasNext(); )\n {\n Object o = iter.next();\n if (o instanceof Entry)\n {\n Entry entry = (Entry) o;\n removeExpired(entry, true);\n }\n else\n {\n List list = (List) o;\n for (Iterator iterList = list.iterator();\n getUnits() > cMin && iterList.hasNext(); )\n {\n Entry entry = (Entry) iterList.next();\n removeExpired(entry, true);\n }\n }\n }\n }\n break;\n\n case EVICTION_POLICY_EXTERNAL:\n getEvictionPolicy().requestEviction(cMin);\n break;\n }\n m_stats.registerCachePrune(ldtStart);\n }",
"void evicted(K key, V value);",
"public void\tclear() {\n\t\tmap.clear();\n\t}",
"protected void cleanup() {\n synchronized (tokenToDeleteQueue) {\n long now = getCurrentTimeMillis();\n Pair<Long, String> item = tokenToDeleteQueue.peek();\n if (item == null || item.getLeft() > now) {\n return;\n }\n do {\n item = tokenToDeleteQueue.poll();\n if (item == null) {\n return;\n }\n if (item.getLeft() > now) { // put it back since first one isn't timed out yet, stop.\n tokenToDeleteQueue.add(item);\n return;\n }\n store.remove(item.getRight());\n } while (!tokenToDeleteQueue.isEmpty());\n }\n }",
"private void collectGarbageInCache() {\n CacheReference r;\n while ((r = (CacheReference)queue.poll()) != null) {\n fontCache.remove(r.getKey());\n }\n }",
"private void invalidateCache() {\n\t\tLog.d(TAG, \"invalidateCache() is removing in-memory cache\");\n\t\tpackageMapping.clear();\n\t\tvalidCache = false;\n\t}",
"private void removeFromEnd(){\n ListNode tailItem = tail.prev;\n removeFromList(tailItem);\n \n //remove the entry from hashtable\n hashtable.remove(tailItem.key);\n --totalCacheItems;\n }"
] | [
"0.7501489",
"0.7221725",
"0.6955618",
"0.68983024",
"0.6648819",
"0.66183096",
"0.6614208",
"0.65244883",
"0.6291263",
"0.62525344",
"0.6196266",
"0.60892946",
"0.6055079",
"0.6035226",
"0.6020409",
"0.6004831",
"0.59932154",
"0.5984052",
"0.5969334",
"0.5968375",
"0.5967299",
"0.59644234",
"0.5961379",
"0.59594864",
"0.595679",
"0.59486103",
"0.5934998",
"0.592549",
"0.58811265",
"0.58765805",
"0.58488137",
"0.58421916",
"0.582993",
"0.5827455",
"0.57869774",
"0.57620496",
"0.5759599",
"0.57541203",
"0.5736046",
"0.57125264",
"0.5711791",
"0.5707399",
"0.568951",
"0.5681319",
"0.567847",
"0.56403136",
"0.5639627",
"0.5639451",
"0.5606692",
"0.5603913",
"0.55989665",
"0.55974054",
"0.55952805",
"0.5588799",
"0.55885535",
"0.5587296",
"0.5584842",
"0.5579224",
"0.5571151",
"0.5546737",
"0.5540133",
"0.55398697",
"0.5539026",
"0.5537542",
"0.553222",
"0.5528021",
"0.5520144",
"0.55197227",
"0.5513862",
"0.5512066",
"0.55028933",
"0.5497567",
"0.54853565",
"0.5484976",
"0.54843915",
"0.5478057",
"0.54724085",
"0.5459275",
"0.54564375",
"0.54432046",
"0.54312664",
"0.5427436",
"0.5416684",
"0.5412901",
"0.539034",
"0.5382997",
"0.5376809",
"0.53690106",
"0.53649676",
"0.53623754",
"0.5353199",
"0.53229904",
"0.53215754",
"0.5317492",
"0.5317381",
"0.530686",
"0.5293124",
"0.52919024",
"0.52805495",
"0.52768666"
] | 0.83857185 | 0 |
Remove all evicted entries from the underlying map. This process runs on a separate thread, and cedes control of lock between each attempt to remove a value from the map. | private void removeEvicted() {
Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);
List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();
// Retrieve a list of everything that's to be removed
synchronized(theLock) {
removeMap.putAll(toEvictMap);
toEvictMap.clear();
tempListeners.addAll(listeners);
}
// Remove the entries one-at-a-time, notifying the listener[s] in the process
for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {
synchronized(theLock) {
currentCacheSize -= entry.getValue().containmentCount;
valueMap.remove(entry.getKey());
}
Thread.yield();
for (CacheListener<K> listener : tempListeners) {
listener.evictedElement(entry.getKey());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void cleanup() {\n\t\tTreeSet<CacheEntry> entries = new TreeSet<CacheEntry>(map.values());\n\t\tint i = region.getItemsToEvict();\n\t\tIterator<CacheEntry> it = entries.iterator();\n\t\twhile (it.hasNext() && i > 0) {\n\t\t\tremoveEntry(it.next());\n\t\t\ti--;\n\t\t}\n\t}",
"private void removeExpired() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (isExpired(entry.getValue())) {\n removeMap.put(entry.getKey(), entry.getValue());\n }\n }\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.expiredElement(entry.getKey());\n }\n }\n }",
"public synchronized void evict()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n deferFlush();\n\n // walk all buckets\n SafeHashMap.Entry[] aeBucket = m_aeBucket;\n int cBuckets = aeBucket.length;\n for (int iBucket = 0; iBucket < cBuckets; ++iBucket)\n {\n // walk all entries in the bucket\n Entry entry = (Entry) aeBucket[iBucket];\n while (entry != null)\n {\n if (entry.isExpired())\n {\n removeExpired(entry, true);\n }\n entry = entry.getNext();\n }\n }\n\n // schedule next flush\n scheduleFlush();\n }",
"@SuppressWarnings({\"unchecked\", \"CallToThreadYield\"})\n public void cleanup() {\n\n long now = System.currentTimeMillis();\n ArrayList<K> deleteKey;\n\n synchronized (cacheMap) {\n MapIterator itr = cacheMap.mapIterator();\n\n deleteKey = new ArrayList<>((cacheMap.size() / 2) + 1);\n K key;\n CacheObject c;\n\n while (itr.hasNext()) {\n key = (K) itr.next();\n c = (CacheObject) itr.getValue();\n\n if (c != null && (now > (timeToLive + c.lastAccessed))) {\n deleteKey.add(key);\n }\n }\n }\n\n deleteKey.stream().map((key) -> {\n synchronized (cacheMap) {\n Object remove = cacheMap.remove(key);\n }\n return key;\n }).forEachOrdered((K _item) -> {\n Thread.yield();\n });\n }",
"public void evictAll() {\n cacheManager.getCache(DomainValueRepository.DomainValueCache.DOMAIN_VALUE_BY_DOMAIN_ID).clear();\n }",
"void removeAllEntries();",
"protected void evict(String key) throws Exception {\n \tString value = map.get(key);\n \tkvdb.put(key, value);\n \tmap.remove(key);\n \tusageCounter.remove(key);\n }",
"public void clear() {\r\n\t\tentryMap.clear();\r\n\t}",
"public void removeAllEntries() {\n }",
"protected void computeEntryRemoved(K key, InternalCacheEntry<K, V> value) {\n // Do nothing by default\n }",
"protected void invalidateAll() {\n\t\tfor (CacheEntry entry : map.values()) {\n\t\t\tentry.getItem().invalidate();\n\t\t}\n\t}",
"public void evictAll()\n {\n}",
"@Override\n\t\tpublic void remove() {\n\t\t\tif ( _expectedSize != TOrderedHashMap.this.size() ) { throw new ConcurrentModificationException(); }\n\n\t\t\t// Disable auto compaction during the remove. This is a workaround\n\t\t\t// for bug 1642768.\n\t\t\ttry {\n\t\t\t\tTOrderedHashMap.this.tempDisableAutoCompaction();\n\t\t\t\tTOrderedHashMap.this.removeAt(_indicesByInsertOrder[_index]);\n\t\t\t} finally {\n\t\t\t\tTOrderedHashMap.this.reenableAutoCompaction(false);\n\t\t\t}\n\n\t\t\t_expectedSize--;\n\t\t}",
"protected CacheEntry purgeEntry() throws Exception {\n CacheEntry entry = _first;\n\n // Notify policy listeners first. if any of them throw an\n // eviction exception, then the internal data structure\n // remains untouched.\n CachePolicyListener listener;\n for (int i=0; i<listeners.size(); i++) {\n listener = (CachePolicyListener)listeners.elementAt(i);\n listener.cacheObjectEvicted(entry.getValue());\n }\n\n removeEntry(entry);\n _hash.remove(entry.getKey());\n\n entry.setValue(null);\n return entry;\n }",
"@Override\r\n protected void processRemovedLRU(final K key, final IndexedDiskElementDescriptor value)\r\n {\r\n addToRecycleBin(value);\r\n log.debug(\"{0}: Removing key: [{1}] from key store.\", logCacheName, key);\r\n log.debug(\"{0}: Key store size: [{1}].\", logCacheName, this.size());\r\n\r\n doOptimizeRealTime();\r\n }",
"public void entryEvicted(EntryEvent<Identifier, SystemMetadata> event) {\n // nothing to do, entry remains in backing store\n\n }",
"protected void discard()\n {\n if (!isDiscarded())\n {\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cUnits = m_cUnits;\n if (cUnits == -1)\n {\n // entry is discarded; avoid repetitive events\n return;\n }\n\n if (cUnits > 0)\n {\n map.adjustUnits(-cUnits);\n }\n\n m_cUnits = -1;\n }\n\n // issue remove notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_DELETED, getKey(), getValue(), null));\n }\n }\n }",
"void doLogicalRemoveUnlocked(final TCServerMap map, final Object key);",
"public static void main(String[] args) {\n Map<Integer, Integer> conMap = new HashMap<>();\n for(int i = 1; i < 1000000 ; i ++){\n conMap.put(i,i);\n }\n\n// Thread thread1 = new Thread(() -> {\n// while(true) {\n// for (Map.Entry<Integer, Integer> entry : conMap.entrySet()) {\n// entry.getKey();\n// }\n// }\n// });\n// thread1.start();\n//\n// Thread thread2 = new Thread( () ->{\n// for (Map.Entry<Integer, Integer> entry : conMap.entrySet()) {\n// conMap.remove(entry.getKey());\n// }\n// });\n// thread2.start();\n\n Thread thread3 = new Thread( () ->{\n// for (Map.Entry<Integer, Integer> entry : conMap.entrySet()) {\n// conMap.remove(entry.getKey());\n// }\n Iterator<Map.Entry<Integer,Integer>> iterator = conMap.entrySet().iterator();\n while(iterator.hasNext()){\n iterator.next();\n iterator.remove();\n }\n });\n thread3.start();\n }",
"public void clearMap()\n {\n ++this.versionStamp;\n IntHashMapEntry[] ainthashmapentry = this.slots;\n\n for (int i = 0; i < ainthashmapentry.length; ++i)\n {\n ainthashmapentry[i] = null;\n }\n\n this.count = 0;\n }",
"private void removeEntry(CacheEntry entry) {\n\t\tmap.remove(entry.getKey());\n\t\tsize.decrementAndGet();\n\t\tindex.remove(entry.getItem());\n\t\tentry.delete();\n\t}",
"void remove(ThreadLocal<?> key) {\n cleanUp();\n\n for (int index = key.hash & mask;; index = next(index)) {\n Object reference = table[index];\n\n if (reference == key.reference) {\n // Success!\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n return;\n }\n\n if (reference == null) {\n // No entry found.\n return;\n }\n }\n }",
"void evictedElement(T key);",
"public void remove() {\r\n\t\t\trequireModificationCountUnchanged();\r\n\r\n\t\t\tif (currentEntry == null) {\r\n\t\t\t\tthrow new IllegalStateException();\r\n\t\t\t}\r\n\r\n\t\t\tSimpleHashtable.this.remove(currentEntry.key);\r\n\t\t\titeratorModificationCount++;\r\n\t\t\tcurrentEntry = null;\r\n\t\t}",
"public void interestCachePurge()\n\t{\n\t\tdouble currentTime = getTime() ;\n\t\tfor(InterestCacheEntry entry:interestCache.values()){\n\t\t\tentry.setPayable(macroLearner.calcPayable(entry.getInterest(),entry.getMaxGradient().getPayment()));\n\t\t\tentry.gradientListPurge(currentTime) ;\n\t\t\t//microLearner.updateTaskExpectedPrice(entry.getInterest().getTaskId());\n\t\t\t/*if ( entry.IsGradientListEmpty() == true ){\n\t\t\t\tit.remove();\n\t\t\t}\t*/\t\t\n\t\t}\n\t}",
"public void clear()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n deferFlush();\n\n synchronized (this)\n {\n while (true)\n {\n try\n {\n // notify cache entries of their impending removal\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n ((Entry) iter.next()).discard();\n }\n\n // verify that the cache maintains its data correctly\n if (m_cCurUnits != 0)\n {\n // soft assertion\n Base.out(\"Invalid unit count after clear: \" + m_cCurUnits);\n m_cCurUnits = 0;\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n // reset the cache storage\n super.clear();\n\n // reset hit/miss stats\n resetHitStatistics();\n\n // schedule next flush\n scheduleFlush();\n }\n }",
"protected abstract void evict();",
"@Override\n public void cleanup() {\n for (String key : cache.keySet()) {\n CacheObject co = cache.get(key).get();\n if (co.isExpired()) {\n synchronized (co) {\n if (co.isExpired()) {\n cache.remove(key);\n queue.add(co);\n }\n }\n }\n }\n\n }",
"@Override\r\n protected void processRemovedLRU(final K key, final IndexedDiskElementDescriptor value)\r\n {\r\n if (value != null)\r\n {\r\n subLengthFromCacheSize(value);\r\n }\r\n\r\n addToRecycleBin(value);\r\n\r\n log.debug(\"{0}: Removing key: [{1}] from key store.\", logCacheName, key);\r\n log.debug(\"{0}: Key store size: [{1}].\", logCacheName, this.size());\r\n\r\n doOptimizeRealTime();\r\n }",
"@CacheEvict(value = \"exchangeRate\", allEntries = true)\r\n public void evictAllCacheValues() {\r\n }",
"public void clear() {\n map.clear();\n }",
"private void processQueue() {\n WeakValue<V, K> weakValue;\n while ((weakValue = (WeakValue<V, K>) queue.poll()) != null) {\n // remove it from the cache\n weakCache.remove(weakValue.key);\n }\n }",
"@Override\n\tpublic void clear() {\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\tcache.clear();\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"protected synchronized void prune()\n {\n long ldtStart = Base.getSafeTimeMillis();\n int cCur = getUnits();\n int cMin = getLowUnits();\n if (cCur < cMin)\n {\n return;\n }\n\n int nType = getEvictionType();\n switch (nType)\n {\n default:\n case EVICTION_POLICY_HYBRID:\n {\n // sum the entries' units per priority\n int[] acUnits;\n while (true)\n {\n try\n {\n acUnits = new int[11];\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n Entry entry = (Entry) iter.next();\n int cUnits = entry.getUnits();\n try\n {\n acUnits[entry.getPriority()] += cUnits;\n }\n catch (IndexOutOfBoundsException e)\n {\n acUnits[Math.max(0, Math.min(entry.getPriority(), 10))] += cUnits;\n }\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n int cTotal = 0;\n int nPrunePriority = 0;\n while (nPrunePriority <= 10)\n {\n cTotal += acUnits[nPrunePriority];\n if (cTotal > cMin)\n {\n break;\n }\n ++nPrunePriority;\n }\n\n // build a list of entries to discard\n Entry entryDiscardHead = null;\n Entry entryDiscardTail = null;\n\n // determine the number at the cut-off priority that must be pruned\n int cAdditional = Math.max(0, cTotal - cMin);\n\n while (cCur > cMin)\n {\n try\n {\n for (Iterator iter = entrySet().iterator(); iter.hasNext() && cCur > cMin; )\n {\n Entry entry = (Entry) iter.next();\n int nPriority = entry.getPriority();\n if (nPriority >= nPrunePriority)\n {\n int cUnits = entry.getUnits();\n if (nPriority == nPrunePriority)\n {\n if (cAdditional <= 0)\n {\n continue;\n }\n cAdditional -= cUnits;\n }\n cCur -= cUnits;\n\n // remove the entry from the map\n super.removeEntryInternal(entry);\n\n // link the entry into the list of deferred\n // removals, but without changing its \"next\"\n // reference because the iterator that we are\n // using here is counting on that \"next\" ref\n if (entryDiscardHead == null)\n {\n entryDiscardHead = entry;\n }\n else\n {\n entryDiscardTail.setNext(entry);\n }\n entryDiscardTail = entry;\n }\n }\n\n // seal the end of the linked list of entries to discard\n if (entryDiscardTail != null)\n {\n entryDiscardTail.setNext(null);\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n // process the list of deferred removals\n for (Entry entryDiscard = entryDiscardHead; entryDiscard != null; )\n {\n // unlink it altogether\n Entry entryNext = entryDiscard.getNext();\n entryDiscard.setNext(null);\n\n // discard it\n removeExpired(entryDiscard, false);\n\n entryDiscard = entryNext;\n }\n }\n break;\n\n case EVICTION_POLICY_LRU:\n case EVICTION_POLICY_LFU:\n {\n boolean fLRU = (nType == EVICTION_POLICY_LRU);\n SparseArray array;\n while (true)\n {\n try\n {\n array = new SparseArray();\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n Entry entry = (Entry) iter.next();\n long lOrder = fLRU ? entry.getLastTouchMillis()\n : entry.getTouchCount();\n Object oPrev = array.set(lOrder, entry);\n if (oPrev != null)\n {\n // oops, more than one entry with the same order;\n // make a list of entries\n List list;\n if (oPrev instanceof List)\n {\n list = (List) oPrev;\n }\n else\n {\n list = new ArrayList();\n list.add((Entry) oPrev);\n }\n list.add(entry);\n array.set(lOrder, list);\n }\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n for (Iterator iter = array.iterator();\n getUnits() > cMin && iter.hasNext(); )\n {\n Object o = iter.next();\n if (o instanceof Entry)\n {\n Entry entry = (Entry) o;\n removeExpired(entry, true);\n }\n else\n {\n List list = (List) o;\n for (Iterator iterList = list.iterator();\n getUnits() > cMin && iterList.hasNext(); )\n {\n Entry entry = (Entry) iterList.next();\n removeExpired(entry, true);\n }\n }\n }\n }\n break;\n\n case EVICTION_POLICY_EXTERNAL:\n getEvictionPolicy().requestEviction(cMin);\n break;\n }\n m_stats.registerCachePrune(ldtStart);\n }",
"@Override\n\tpublic void clear() {\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tmap[i] = new LocalEntry<>();\n\t\t}\n\n\t}",
"@Override\n\tpublic V invalidateEntry(K key) {\n\t\tcheckNullKey(key);\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\treturn cache.remove(key);\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}",
"void removeEntry(K key);",
"final CacheData<K, V> removeEntry(final Object key) {\r\n // find the place to put it and stuff it in, overwriting what was\r\n // previously there\r\n // synchronization is not needed here, if this value changes to null\r\n // either before or after a client looks at it, it's not a problem\r\n int pos = getKeyPosition(key);\r\n CacheData<K, V> cacheData = getCacheData(pos);\r\n setCacheData(pos, null);\r\n return cacheData;\r\n }",
"public void evict(Object oKey)\n {\n Entry entry = (Entry) getEntryInternal(oKey);\n if (entry != null)\n {\n removeExpired(entry, true);\n }\n }",
"public final void clear() { _map.clear(); }",
"@Override\n public void releaseAll()\n {\n for ( int i = 0; i < exclusiveLockCounts.length; i++ )\n {\n PrimitiveLongIntMap exclusiveLocks = exclusiveLockCounts[i];\n PrimitiveLongIntMap sharedLocks = sharedLockCounts[i];\n\n // Begin releasing exclusive locks, as we may hold both exclusive and shared locks on the same resource,\n // and so releasing exclusive locks means we can \"throw away\" our shared lock (which would normally have been\n // re-instated after releasing the exclusive lock).\n if(exclusiveLocks != null)\n {\n int size = exclusiveLocks.size();\n exclusiveLocks.visitKeys( releaseExclusiveAndClearSharedVisitor.initialize( sharedLocks, lockMaps[i] ));\n if(size <= 32)\n {\n // If the map is small, its fast and nice to GC to clear it. However, if its large, it is\n // 1) Faster to simply allocate a new one and\n // 2) Safer, because we guard against clients getting giant maps over time\n exclusiveLocks.clear();\n }\n else\n {\n exclusiveLockCounts[i] = Primitive.longIntMap();\n }\n }\n\n // Then release all remaining shared locks\n if(sharedLocks != null)\n {\n int size = sharedLocks.size();\n sharedLocks.visitKeys( releaseSharedDontCheckExclusiveVisitor.initialize( lockMaps[i] ) );\n if(size <= 32)\n {\n // If the map is small, its fast and nice to GC to clear it. However, if its large, it is\n // 1) Faster to simply allocate a new one and\n // 2) Safer, because we guard against clients getting giant maps over time\n sharedLocks.clear();\n }\n else\n {\n sharedLockCounts[i] = Primitive.longIntMap();\n }\n }\n }\n }",
"@Override\r\n public void clear() {\r\n map.clear();\r\n }",
"void evicted(K key, V value);",
"public void clear() {\r\n // synchronization is not a problem here\r\n // if this code were to be called while someone was getting or setting data\r\n // in the buckets, it would still work\r\n // in the case of someone setting a value in the buckets, then this coming along\r\n // and resetting the buckets-entry to null is fine, because the client still has the data reference\r\n // in the case of someone getting a value from the buckets while this is being reset\r\n // is fine as well because, if they get the data before it's set, they got it\r\n // if they as for it after it gets set to null, that's fine as well it's null and\r\n // that's a normal expected condition\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n buckets[i] = new AtomicReference<CacheData<K, V>>(null);\r\n }\r\n }",
"Object getValueUnlocked(final TCServerMap map, final Object key) throws AbortedOperationException;",
"public void removeAll() {\n synchronized (mBitmapCache) {\n mBitmapCache.evictAll();\n }\n }",
"public void clear() {\n map.clear();\n }",
"public abstract void removeFromMap();",
"public void clearCache() {\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\t}",
"void evictFromCache( Long id );",
"public void evict(Object val) throws HibException;",
"private void removeTimeEntryCache(TimeEntry timeEntry)\n {\n synchronized(timeEntries)\n {\n SoftReference<TimeEntry> timeEntrySoftReference = null;\n ListIterator<SoftReference<TimeEntry>> iterator = timeEntries.listIterator();\n while (iterator.hasNext() && (timeEntrySoftReference == null))\n {\n SoftReference<TimeEntry> softReference = iterator.next();\n if ((softReference != null) && softReference.get() == timeEntry)\n {\n timeEntrySoftReference = softReference;\n }\n }\n if (timeEntrySoftReference != null)\n {\n timeEntries.remove(timeEntrySoftReference);\n }\n }\n }",
"public void clearTimeEntryCache()\n {\n synchronized(timeEntries)\n {\n for (int i = 0; i < timeEntries.size(); i++)\n {\n timeEntries.set(i,TIME_ENTRY_NULL);\n }\n timeEntriesUpdateTimeStamp = 0L;\n }\n synchronized(timeEntryHoursSumDateMap)\n {\n timeEntryHoursSumDateMap.clear();\n }\n }",
"boolean doLogicalRemoveUnlocked(final TCServerMap map, final Object key, final Object value, MetaDataDescriptor mdd)\n throws AbortedOperationException;",
"public void clear() {\n synchronized (LOCK) {\n myValues.clear();\n }\n }",
"Entry<Key, Value> remove(Entry<Key, Value> entry);",
"@Override\n public void removeAllValues() {\n Map<String, ?> map = preferences.getAll();\n Iterator<String> iterator = map.keySet().iterator();\n while (iterator.hasNext()) {\n removeValue(iterator.next());\n }\n }",
"public void\tclear() {\n\t\tmap.clear();\n\t}",
"@SuppressWarnings(\"unchecked\")\n public void expunge() {\n Entry<K, V> entry;\n while ((entry = (Entry<K, V>) refqueue.poll()) != null) {\n final int index = index(entry.hash, entries.length);\n\n Entry<K, V> temp = entries[index];\n Entry<K, V> previous = temp;\n while (temp != null) {\n final Entry<K, V> next = temp.nextEntry;\n if (temp == entry) {\n if (previous == entry) {\n entries[index] = next;\n } else {\n previous.nextEntry = next;\n }\n entry.nextEntry = null;\n entry.value = null;\n size--;\n break;\n }\n previous = temp;\n temp = next;\n }\n }\n }",
"public void clearInactiveCacheRefs()\n {\n for (Iterator<Map> iterByName = m_mapByName.values().iterator(); iterByName.hasNext(); )\n {\n Map mapByLoader = iterByName.next();\n\n synchronized (mapByLoader)\n {\n for (Iterator iter = mapByLoader.entrySet().iterator(); iter.hasNext(); )\n {\n Map.Entry entry = (Map.Entry) iter.next();\n\n Object oHolder = entry.getValue();\n\n if (oHolder instanceof NamedCache)\n {\n NamedCache cache = (NamedCache) entry.getValue();\n\n if (cache.isDestroyed() || cache.isReleased())\n {\n iter.remove();\n internalReleaseCache(cache);\n }\n }\n else if (oHolder instanceof SubjectScopedReference)\n {\n Collection col = ((SubjectScopedReference) oHolder).values();\n\n if (!col.isEmpty())\n {\n // all the entries in the SubjectScopedReference refer\n // to the same NamedCache instance, so we only need to\n // check the first one\n NamedCache cache = (NamedCache) col.iterator().next();\n if (cache.isDestroyed() || cache.isReleased())\n {\n iter.remove();\n internalReleaseCache(cache);\n }\n }\n }\n }\n\n if (mapByLoader.isEmpty())\n {\n iterByName.remove();\n }\n }\n }\n }",
"public void clear() {\n buckets = new ArrayList<>();\n for (int i = 0; i < numBuckets; i++) {\n buckets.add(new ArrayList<>());\n }\n keySet = new HashSet<>();\n numEntries = 0;\n }",
"private static void cleanLeaseCache(Map<HashPair, Lease> tc) {\n for (Iterator<Lease> iter = tc.values().iterator(); iter.hasNext(); ) {\n Lease l = iter.next();\n if (l.isExpired(Router.CLOCK_FUDGE_FACTOR))\n iter.remove();\n }\n }",
"@Override\n public synchronized void clear() {\n this.keyMap.clear();\n super.clear();\n }",
"public void clear()\n\t{\n\t\tthrow new UnsupportedOperationException(\"Read Only Map\");\n\t}",
"public void remove(Object key){\n map.remove(key);\n }",
"public void clear() {\n //construct(initialCap, loadFactor);\n \n //MapElement me = null;\n\n for (int i = 0; i < capacity; i++) {\n if (map[i] != null) {\n /*me = map[i];\n for (int j = 0; j < count[i]; j++) {\n MapElement release = me;\n me = me.getNext();\n releaseMapElement(release);\n }*/ \n map[i] = null;\n }\n }\n contents = 0;\n }",
"@Override\n\tpublic void clear() {\n\t\tmap.clear();\n\t\tkeys.clear();\n\t}",
"void removeAllLocks(){\r\n \tpageAccess = new ConcurrentHashMap<String, AccessDetailVO>();\r\n\r\n }",
"public void clear() {\n\t\tmap.clear();\n\t}",
"public void clear() { \r\n\t\tmap.clear();\r\n\t}",
"public void clear() {\n final Object[] items = this.items;\n final ReentrantLock lock = this.lock;\n lock.lock();\n try {\n int k = count;\n if (k > 0) {\n final int putIndex = this.putIndex;\n int i = takeIndex;\n do {\n items[i] = null;\n if (++i == items.length)\n i = 0;\n } while (i != putIndex);\n takeIndex = putIndex;\n count = 0;\n for (; k > 0 && lock.hasWaiters(notFull); k--)\n notFull.signal();\n }\n } finally {\n lock.unlock();\n }\n }",
"private void collectGarbageInCache() {\n CacheReference r;\n while ((r = (CacheReference)queue.poll()) != null) {\n fontCache.remove(r.getKey());\n }\n }",
"public void cleanUp() {\n if(ticker.skipCleanup()) {\n return;\n } \n \n // At this point cleanup is inevitable, so linked list traversal should\n // be performed. \n Entry<K, V> e = segment.head();\n Entry<K, V> end = segment.tail();\n \n int processed = 0;\n long createThreshold = ticker.nextTick() - createTTL;\n long accessThreshold = ticker.nextTick() - accessTTL;\n\n Object removeKey = null;\n while ((e = e.getNext()) != end && processed++ < REMOVE_DEPTH) {\n if (null != removeKey) {\n segment.remove(removeKey);\n removeKey = null;\n }\n\n // both, access and creation thresholds might trigger entry removal \n if (e.getCreationTime() <= createThreshold || e.getAccessTime() <= accessThreshold) {\n removeKey = e.getKey();\n }\n }\n\n if (null != removeKey) {\n segment.remove(removeKey);\n } \n ticker.markCleanup();\n }",
"void removeRowsLock();",
"private void skipStaleEntries()\n {\n while (this.index < keys.size() && !HashBijectiveMap.this.containsKey(keys.get(this.index)))\n this.index++;\n }",
"private void removeEntry(String key) {\n\t\tCacheHeader entry = mEntries.get(key);\n\t\tif (entry != null) {\n\t\t\tmTotalSize -= entry.size;\n\t\t\tmEntries.remove(key);\n\t\t}\n\t}",
"public void clear() {\r\n this.map.clear();\r\n }",
"public void shutdown() {\n map.shutdown();\n }",
"void evictedInServer(Object key);",
"void exit() {\n\t\tfor (ScopedProvider<?> e : scopedProviders.keySet()) {\n\t\t\tsynchronized(e) {\n\t\t\t\te.values.clear();\n\t\t\t}\n\t\t}\n\t}",
"public void deallocate()\n\t{\n\t\t//for(int i = 0; i <= maxsize; i++){\n\t\t//\t notusemap[i].addAll(inusemap[i]);\n\t\t//\t inusemap[i].clear();\n\t\t//}\n\t}",
"public void removeAllChildMaps()\n {\n checkState();\n super.removeAllChildMaps();\n }",
"public void remove(K key) {\n synchronized (cacheMap) {\n cacheMap.remove(key);\n }\n }",
"@Override\n @CacheEvict(cacheNames = \"TripDetails\", allEntries = true)\n public void cacheEvict(){}",
"void doLogicalPutUnlocked(final TCServerMap map, final Object key, final Object value);",
"@SuppressWarnings(\"unchecked\")\n protected void onRemove()\n {\n // issue remove notification\n ObservableHashMap map = ObservableHashMap.this;\n if (map.hasListeners())\n {\n map.dispatchEvent(new MapEvent(map, MapEvent.ENTRY_DELETED,\n getKey(), getValue(), null));\n }\n }",
"@Override\r\n public void processRemoveAll()\r\n {\r\n final ICacheEvent<String> cacheEvent =\r\n createICacheEvent(getCacheName(), \"all\", ICacheEventLogger.REMOVEALL_EVENT);\r\n try\r\n {\r\n reset();\r\n }\r\n finally\r\n {\r\n logICacheEvent(cacheEvent);\r\n }\r\n }",
"@Override\n public Object remove(int k) {\n long startTime = System.currentTimeMillis();\n Object value = super.remove(k);\n long endTime = System.currentTimeMillis();\n if (value == null) {\n elements--;\n startTime = System.currentTimeMillis();\n for (int i = 1; i < super.size() && value == null; i++) {\n int hash = (k + i) % size();\n MapElement me = hashTable[hash];\n if (me == null) {\n value = null;\n } else if (me.getKey() != k) {\n value = null;\n } else {\n hashTable[hash] = null;\n value = me.getValue();\n }\n }\n endTime = System.currentTimeMillis();\n }\n System.out.println(\"------REMOVE------\");\n System.out.println(\"TIME: \" + (endTime - startTime));\n return value;\n }",
"public void remove(int key) {\n int hashedKey = hash(key);\n Entry entry = map.get(hashedKey);\n if (entry.key == -1) {\n return;\n } else if (entry.key == key) {\n if (entry.next != null) map.set(hashedKey, entry.next);\n else entry.key = -1;\n } else if (entry.next != null) {\n Entry pre = entry, cur = entry.next;\n while (cur.next != null && cur.key != key) {\n pre = cur;\n cur = cur.next;\n }\n if (cur.key == key) {\n pre.next = cur.next;\n }\n }\n }",
"@Override\n\tpublic V remove(Object key) {\n\t\tkeys.remove(key);\n\t\treturn map.remove(key);\n\t}",
"public synchronized Object remove( Object key ) {\n\t\tObject intvalue = mapKeyPos.remove(key);\n\t\tif ( intvalue != null ) {\n\t\t\tint pos = ((Integer)intvalue).intValue();\n\t\t\tObject temp = values[pos];\n\t\t\tkeys[pos] = null;\n\t\t\tvalues[pos] = null;\n\t\t\tstatus[pos] = LRU_OLD;\n\t\t\t//System.out.println(\"CountLimiteLRU: remove(\"+key+\") = \"+temp);\n\t\t\treturn temp;\n\t\t}\n\t\treturn null;\n\t}",
"public void clearMap() {\n if (mMap != null) {\n mMap.clear();\n }\n }",
"public void remove(Value v)\n\t{\n\t\tif (this.cache.containsKey(v.getKey()))\n\t\t{\n\t\t\tthis.cache.remove(v.getKey());\n\t\t}\n\t\telse\n\t\t{\n//\t\t\tthis.lock.writeLock().lock();\n\t\t\tthis.db.remove(v.getKey());\n//\t\t\tthis.lock.writeLock().unlock();\n\t\t}\n//\t\tthis.lock.writeLock().lock();\n\t\tthis.keys.remove(v.getKey());\n//\t\tthis.lock.writeLock().unlock();\n\t}",
"public void remove(K key) {\n for (Table.Entry e : entries) {\n if (e.getKey().equals(key)) {\n entries.remove(e);\n return;\n }\n }\n\n\n }",
"public void remove(int key) {\n map.remove(key);\n }",
"@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tpublic void run() {\n\t\t\tsynchronized (mInetAddressList) {\n\t\t\t\tIterator<?> cacheIterator = mInetAddressList.entrySet().iterator();\n\t\t\t\twhile (cacheIterator.hasNext()) {\n\t\t\t\t\tMap.Entry<String, CacheElement> cacheEntry = (Map.Entry<String, CacheElement>) cacheIterator.next();\n\t\t\t\t\tif (System.currentTimeMillis() - cacheEntry.getValue().getCreateTime() >= mCacheTime * 1000) {\n\t\t\t\t\t\tcacheIterator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\r\n public void evict(Object object) {\n\r\n }",
"public void clear()\r\n {\r\n otherValueMap.clear();\r\n }",
"void evictAll(int userId);",
"@Override\n synchronized public void removeKey(Integer key) {\n this.map.remove(key);\n }"
] | [
"0.7617415",
"0.75162446",
"0.69230074",
"0.68351656",
"0.6503041",
"0.64147115",
"0.63659525",
"0.63646597",
"0.63117194",
"0.6255561",
"0.6242259",
"0.62097704",
"0.6195071",
"0.61820006",
"0.6172103",
"0.6165012",
"0.6157947",
"0.61208797",
"0.6103504",
"0.60952824",
"0.6072312",
"0.60658866",
"0.6034223",
"0.60049754",
"0.59987634",
"0.5974542",
"0.5972319",
"0.5954258",
"0.5943493",
"0.59388304",
"0.5927318",
"0.5908015",
"0.59040946",
"0.58957124",
"0.5887246",
"0.5885866",
"0.5876908",
"0.5874787",
"0.58637625",
"0.5856614",
"0.5849125",
"0.5843062",
"0.5831243",
"0.5827248",
"0.5826649",
"0.58243203",
"0.58133334",
"0.5800232",
"0.5798042",
"0.57958883",
"0.57924056",
"0.5765179",
"0.5756789",
"0.5754894",
"0.5732276",
"0.57245654",
"0.5715382",
"0.5714918",
"0.57000905",
"0.5699983",
"0.56917",
"0.56794184",
"0.56792164",
"0.5675244",
"0.5665298",
"0.5664652",
"0.566464",
"0.5659398",
"0.5658267",
"0.56428075",
"0.5622765",
"0.56223583",
"0.5621641",
"0.5620798",
"0.56194717",
"0.5614065",
"0.5606775",
"0.56030816",
"0.5579012",
"0.5567478",
"0.55526876",
"0.55522734",
"0.55508465",
"0.55483854",
"0.55480266",
"0.5540305",
"0.553631",
"0.5512193",
"0.5511714",
"0.54973966",
"0.54912174",
"0.54769903",
"0.5471587",
"0.5469855",
"0.54584414",
"0.54485655",
"0.54431915",
"0.5440562",
"0.543462",
"0.5409677"
] | 0.82827514 | 0 |
Default constructor for movement controller. | public MovementController(Creature owner) {
super(owner);
_movementCompleted = null;
_movementFailed = null;
_destinationLocation = null;
_waypoints = new ConcurrentLinkedQueue<>();
_movementTick = System.currentTimeMillis();
_movementTask = null;
_followTarget = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected WorldController() {\n\t\tthis(new Rectangle(0,0,DEFAULT_WIDTH,DEFAULT_HEIGHT), \n\t\t\t\tnew Vector2(0,DEFAULT_GRAVITY));\n\t}",
"public CourtMovement() {\r\n\t\tsuper();\r\n\t\tstart = 0;\r\n\t\tend = 0;\r\n\t}",
"public DirectionController() {\n }",
"public Controller() {\n\t\tthis(null);\n\t}",
"public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}",
"public ComponentMover() {\n\t}",
"public Move() {\r\n\t}",
"public DecelerationController() {\n\t\tlastCallTimeStamp = -1;\n\t\tlastDistanceToTarget = -1;\n\t}",
"public MotorController() {\n\t\tresetTachometers();\n\t}",
"public Controller() {\n super();\n }",
"public Controller() {\n super();\n }",
"public MoveController(Model m, Window w) {\n this.model = m;\n this.window = w;\n }",
"public Robot() {\t\n\t\tthis.step = myclass.STD_STEP ; \n\t\tthis.speed = myclass.STD_SPEED ; \n\t\tthis.rightM = new EV3LargeRegulatedMotor(myclass.rightP) ; \n\t\tthis.leftM = new EV3LargeRegulatedMotor(myclass.leftP) ; \n\t}",
"public MainController() {\n\t\tcontroller = new Controller(this);\n\t}",
"public GridMapCompassMoves() {\n super();\n }",
"public Controller()\n\t{\n\n\t}",
"public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}",
"protected OpenLoopSpeedController()\r\n\t{\r\n\t\t\r\n\t}",
"public EpisodeController(){\n\t\t//intentionally empty, I think\n\t}",
"private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}",
"public WindowControler(String sname,vector pos) {\n super(sname,pos);\n WindowControler_init();\n }",
"@Override\n\tprotected void init() {\n\t\t//Set movementSpeed in px/s\n\t\tmovementSpeed = 100;\n\t\t//Set previousTime to start at the \n\t}",
"public RobotEngine (){\r\n\t\tthis.fuel = 100;\r\n\t\tthis.recycledMaterial = 0;\r\n\t\tthis.container = new ItemContainer ();\r\n\t\tthis.direction = Direction.NORTH;\r\n\t\tthis.navega = new NavigationModule();\r\n\t}",
"public GUIController() {\n\n }",
"public PorController() {\n window = utils.getWindow();\n storageLocation = null;\n }",
"public Screen() {\n super();\n controller = null;\n }",
"public DriveSubsystem() {\n leftFrontMotor = new TalonSRX(RobotMap.leftFrontMotor);\n rightFrontMotor = new TalonSRX(RobotMap.rightFrontMotor);\n leftBackMotor = new TalonSRX(RobotMap.leftBackMotor);\n rightBackMotor = new TalonSRX(RobotMap.rightBackMotor);\n // rightMotor.setInverted(true); \n direction = 0.75;\n SmartDashboard.putString(\"Direction\", \"Shooter side\");\n }",
"public Controller() {\n\t\tenabled = false;\n\t\tloop = new Notifier(new ControllerTask(this));\n\t\tloop.startPeriodic(DEFAULT_PERIOD);\n\t}",
"public GameController() {\n\t\t\n\t\t\n\t\tGameController.gc = this;\n\t}",
"public ConsoleController() {\n\t\tcommandDispatch = new CommandDispatch();\n\t}",
"public AbstractTtcsCommandController() {\n\t}",
"public MapController() {\r\n\t}",
"public MenuController() {\r\n\t \r\n\t }",
"public Controller() {\n\t\tdoResidu = false;\n\t\tdoTime = false;\n\t\tdoReference = false;\n\t\tdoConstraint = false;\n\t\ttimeStarting = System.nanoTime();\n\t\t\n\t\tsetPath(Files.getWorkingDirectory());\n\t\tsetSystem(true);\n\t\tsetMultithreading(true);\n\t\tsetDisplayFinal(true);\n\t\tsetFFT(FFT.getFastestFFT().getDefaultFFT());\n\t\tsetNormalizationPSF(1);\n\t\tsetEpsilon(1e-6);\n\t\tsetPadding(new Padding());\n\t\tsetApodization(new Apodization());\n\n\t\tmonitors = new Monitors();\n\t\tmonitors.add(new ConsoleMonitor());\n\t\tmonitors.add(new TableMonitor(Constants.widthGUI, 240));\n\n\t\tsetVerbose(Verbose.Log);\n\t\tsetStats(new Stats(Stats.Mode.NO));\n\t\tsetConstraint(Constraint.Mode.NO);\n\t\tsetResiduMin(-1);\n\t\tsetTimeLimit(-1);\n\t\tsetReference(null);\n\t\tsetOuts(new ArrayList<Output>());\n\t}",
"public Drive() {\r\n leftFrontDrive = new Talon(Constants.DRIVE_LEFT_FRONT);\r\n leftRearDrive = new Talon(Constants.DRIVE_LEFT_REAR);\r\n rightFrontDrive = new Talon(Constants.DRIVE_RIGHT_FRONT);\r\n rightRearDrive = new Talon(Constants.DRIVE_RIGHT_REAR);\r\n \r\n robotDrive = new RobotDrive(\r\n leftFrontDrive,\r\n leftRearDrive, \r\n rightFrontDrive, \r\n rightRearDrive);\r\n \r\n driveDirection = 1.0;\r\n \r\n arcadeYRamp = new CarbonRamp();\r\n arcadeXRamp = new CarbonRamp();\r\n tankLeftRamp = new CarbonRamp();\r\n tankRightRamp = new CarbonRamp();\r\n \r\n ui = CarbonUI.getUI();\r\n }",
"public GasesMeasurementsController() {\n\t}",
"public NullGameController()\r\n {\r\n }",
"public UndoController() {\r\n \t}",
"public TaxiInformationController() {\n }",
"public PlaneUIController() {\n this.launcherFacade = new LauncherFacade();\n }",
"public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}",
"public ShipyardController() {\r\n super(SHIPYARD_VIEW_FILE);\r\n\r\n currentShip = player.getShip();\r\n shipGroup = new ToggleGroup();\r\n\r\n fillLabels();\r\n buildShipsList();\r\n }",
"public Controller(BasicBoard basicBoard)\n\t{\n\t\tboard = basicBoard;\n\t\t// What to do when users click on pits\n\t\tMouseListener mouseListener = new MouseListener()\n\t\t{\n\n\t\t\tpublic void mouseClicked(MouseEvent event) {\n\t\t\t\tPit pit = (Pit) event.getSource();\n\t\t\t\tint pick = pit.getIndex();\n\t\t\t\tboard.getDataModel().pick_pit(pick);\n\t\t\t\tboard.stateChanged(new ChangeEvent(this));\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t}\n\n\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t}\n\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t}\n\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t}\n\t\t\t\n\t\t};\n\t\t\n\t\t// What to do when users click on buttons\n\t\tActionListener actionListener = new ActionListener()\n\t\t{\n\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tJButton button = (JButton) event.getSource();\n\t\t\t\tif (button.getText().equals(\"Undo\"))\n\t\t\t\t{\n\t\t\t\t\tboard.getDataModel().undo();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tboard.getDataModel().endTurn();\n\t\t\t\t}\n\t\t\t\tboard.stateChanged(new ChangeEvent(this));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t};\n\t\t\n\t\tboard.attachMouseListener(mouseListener);\n\t\tboard.attachActionListener(actionListener);\n\t}",
"private GameController() {\n\n }",
"public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}",
"public Shooter() {\n setDefaultCommand(new RunCommand(this::stop, this));\n _shooterMotor2.follow(_shooterMotor1);\n _shooterMotor1.setInverted(true);\n _shooterMotor2.setInverted(false);\n\n _shooterMotor1.configFactoryDefault();\n _shooterMotor1.config_kF(0, _kF);\n _shooterMotor1.config_kP(0, _kP);\n _shooterMotor1.setNeutralMode(NeutralMode.Coast);\n }",
"ABcontroller(){\n\t\tsuper(50);\n\t\ttimer = new Timer();\n\t}",
"public VolcanoWorld() {\n this(DEFAULT_WIDTH, DEFAULT_HEIGHT);\n }",
"public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n\n drivetrain.setDefaultCommand(new RunCommand(\n () -> drivetrain.setTank(Math.pow(-joystick1.getY(), 3), Math.pow(joystick2.getY(), 3)), drivetrain));\n\n }",
"public void moveConstructor() {\n this.loopAndAddMoves(1, 1);\n this.loopAndAddMoves(-1, 1);\n this.loopAndAddMoves(1, -1);\n this.loopAndAddMoves(-1, -1);\n this.loopAndAddMoves(0, 1);\n this.loopAndAddMoves(0, -1);\n this.loopAndAddMoves(1, 0);\n this.loopAndAddMoves(-1, 0);\n }",
"protected WorldController(float width, float height, float gravity) {\n\t\tthis(new Rectangle(0,0,width,height), new Vector2(0,gravity));\n\t}",
"public Engine(){\n name = \"Basic Engine\";\n moveDeduction = 1;\n }",
"public MainWindow(Controller ctrl) { //constructor\r\n\t\t\r\n\t\tsuper(\"Physics Simulator\"); //pone de tutulo del JFrame Physics Simulator\r\n\t\t_ctrl = ctrl; //asigna el controler pasado por argumento\r\n\t\tinitGUI(); //inicia la gui\r\n\t\t\r\n\t}",
"public GameController() {\n \t\t// Fill the table empty positions.\n \t\tfor (int i = 0; i < MAX_NUMBER_OF_PILES; i++) {\n \t\t\tmTable.add(i, null);\n \t\t}\n \t\tcreateDeck();\n \t\tgs = new GameState(mTable, pileNames, pileNo);\n \t\tnew Listener(this);\n \t}",
"MoveActionController createMoveActionController();",
"public GetMotorPositionCommand ()\r\n {\r\n }",
"public GameController() {\n GameLoop.getInstance();\n }",
"public SMPFXController() {\n\n }",
"@Model\r\n\tpublic Vector() {\r\n\t\tthis(50,50);\r\n\t}",
"protected JoystickInput() {\n }",
"public MainController() {\n initializeControllers();\n initializeGui();\n runGameLoop();\n }",
"public FilmOverviewController() {\n }",
"public Controller () {\r\n puzzle = null;\r\n words = new ArrayList <String> ();\r\n fileManager = new FileIO ();\r\n }",
"public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}",
"public BoardView(Controller controller)\r\n {\r\n this.controller = controller;\r\n controller.addChangeListener(this);\r\n \r\n addMouseMotionListener(new MouseMotionAdapter()\r\n {\r\n \r\n @Override\r\n public void mouseMoved(MouseEvent e)\r\n {\r\n moved(e);\r\n }\r\n });\r\n \r\n addMouseListener(new MouseAdapter()\r\n {\r\n \r\n @Override\r\n public void mousePressed(MouseEvent e)\r\n {\r\n pressed(e);\r\n }\r\n });\r\n }",
"public Robot(int orientation, Position pos_ini) {\r\n\t\tthis.pos_courante = pos_ini;\r\n\t\tthis.orientation = orientation;\r\n\t\tderniereAction = AUCUNE_ACTION;\r\n\t}",
"public MovementDetector(MovementListener movementListener) {\n this(0.3f, 5000, movementListener);\n }",
"public GripperController() {\n super(GRIPPER, (min + max)/2, min, max);\n }",
"public Player() {\n\t\tsetDimensions(16, 16);\n\t\tsetLocation(512 + 16, 512 + 16);\n\t\tsetKeyBindings();\n\t}",
"public TemplateController() {\n super();\n // get distance sensors and save them in array\n _distanceSensors = new DistanceSensor[] {\n getDistanceSensor(\"ps5\"),\n getDistanceSensor(\"ps6\"),\n getDistanceSensor(\"ps7\"),\n getDistanceSensor(\"ps0\"),\n getDistanceSensor(\"ps1\"),\n getDistanceSensor(\"ps2\"),\n };\n // get light sensors and save them in array\n _lightSensors = new LightSensor[]{\n getLightSensor(\"ls5\"),\n getLightSensor(\"ls6\"),\n getLightSensor(\"ls7\"),\n getLightSensor(\"ls0\"),\n getLightSensor(\"ls1\"),\n getLightSensor(\"ls2\")\n };\n\n //enable the sensors\n for (int i = 0; i < 6; i++){\n _distanceSensors[i].enable(10);\n _lightSensors[i].enable(10);\n }\n }",
"public MovementDAO() { this(CoreDAO.DRIVER_NAME, CoreDAO.URL, CoreDAO.USER, CoreDAO.PASSWORD);\t\t}",
"public Camera(){\n // servoPan = new Servo(PAN);\n servoTilt = new Servo(TILT);\n }",
"public RagdollController() {\n\t\tsuper(DEFAULT_WIDTH,DEFAULT_HEIGHT,WATER_GRAVITY);\n\t\tsetDebug(false);\n\t\tsetComplete(false);\n\t\tsetFailure(false);\n\t\tsoundCounter = 0;\n\t}",
"public MovimientoControl() {\n }",
"public Controller (Game game) {\n fsm = new FiniteStateMachine();\n this.game = game;\n }",
"public PlantillaController() {\n }",
"public Controller() {\n\t\tthis.nextID = 0;\n\t\tthis.data = new HashMap<Integer, T>();\n\t}",
"public ControllerRol() {\n }",
"public IfController()\n\t{\n\n\t}",
"public Controller()\n {\n // Create initial queues and stations\n q0 = new Queue(); //registration q\n \n // p[arameters are id of station, 4 queues, completed q)\n s0 = new Station(0, q0, q1, q2, q3, qx);\n \n //Student soiurce ss is an actor\n \n actors = new ArrayList<>(); \n actors.add(s0); // add all Actor implementors\n //actors.add(myStudentSorce);\n }",
"public DriveSystem() {\n \t\n \tsuper(\"DriveSystem\", 0.5, 0.3, 1.0);//Must be first line of constructor!\n \tultraRangeFinder.setAutomaticMode(true);\n \tultraRangeFinder.setEnabled(true);\n \tultraRangeFinderBack.setAutomaticMode(true);\n \tultraRangeFinderBack.setEnabled(true);\n //double kp = 0.0001;\n \t//double ki = 0.001;\n \t//double kd = 0.01;\n \t//getPIDController().setPID(kp,ki,kd);//Set the PID controller gains.\n this.setInputRange(-180.0, 180.0);//Sets the MIN and MAX values expected from the input and setPoint!\n this.setOutputRange(-1.0, 1.0);//Sets the the MIN and MAX values to write to output\n //this.setAbsoluteTolerance(5.0);//Set the absolute error which is considered tolerable for use with OnTarget()\n //this.setPercentTolerance(10);//Set the percentage error which is considered tolerable for use with OnTarget()\n //this.setSetpoint(45);//Set the where to go to, clears GetAvgError()\n getPIDController().setContinuous(true);//True=input is continuous, calculates shortest route to setPoint()\n //this.enable();//Begin running the PID Controller.\n \n LiveWindow.addActuator(\"DriveSystem\", \"PID DriveSystem\", getPIDController());\n \n // getPIDController().startLiveWindowMode();//Start having this object automatically respond to value changes.\n }",
"public TemplateController()\r\n {\r\n this(false);\r\n }",
"public Camera() {\r\n this(1, 1);\r\n }",
"public Position() {\n\n\t}",
"DefaultAgent(Controller controller) {\r\n\t\tthis.controller = controller;\r\n\t}",
"public ObstacleController(ObstacleModel model){\n this.model = model;\n }",
"public Movement(float n)\n\t{\n\t\tthis.speed = n;\n\t\tthis.vel = new Vector2f(0f, 0f);\n\t}",
"void startMovement();",
"public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }",
"public Controller()\r\n {\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard = new ScoreBoard();\r\n }",
"public LoopController()\r\n\t{\r\n\t\tregulate = true;\r\n\t\tsmooth = true;\r\n\t\tresolution = 10000;\r\n\t\tfps = 60;\r\n\t\tlastCall = Sys.getTime();\r\n\t\tduration = 0;\r\n\t}",
"public TimedActorController(Actor owner, int interval)\r\n\t{\r\n\t\tthis(owner, interval, 0);\r\n\t}",
"public Controller(ViewIF view) {\n\t\tthis.view = view;\n\t\tthis.dao = new DAO();\n\t\tthis.stats = new Statistics(this.dao);\n\t\tthis.gameStarted = false;\n\t}",
"public NearestParksController() {\n this.bn = new BicycleNetwork();\n this.pf = new LocationFacade();\n // this.bn.loadData();\n }",
"public Shape() {\n\t\tthis(DEFAULT_X_POS, DEFAULT_Y_POS, DEFAULT_DELTA_X, DEFAULT_DELTA_Y, DEFAULT_WIDTH, DEFAULT_HEIGHT);\n\t}",
"public PhaseMovement(GameScreen gameScreen) {\n super(gameScreen, TurnPhaseType.MOVEMENT);\n }",
"public Wander() \t\r\n\t{ \r\n\t\tm_pos = new Point2d(30,0); \r\n\t\tm_r = 20; \r\n\t\tm_influence = 1; \r\n\t\tm_seekPoint = new Point2d(0,0);\r\n\t\tm_rate = 10;\r\n\t\tinit();\r\n\t}",
"BasicObject(){\n posX = -1;\n posY = -1;\n velX = 0;\n velY = 0;\n accX = 0;\n accY = 0;\n classOfObejct = 0;\n }",
"public PopulationfosaController() {\n }",
"public KeyboardController(KeyCode moveLeft, KeyCode moveRight, KeyCode aimUp, KeyCode aimDown,KeyCode fire, KeyCode jetpackOn) {\n this.moveLeft = moveLeft;\n this.moveRight = moveRight;\n this.jetpackOn = jetpackOn;\n this.aimUp = aimUp;\n this.aimDown = aimDown;\n this.fireWeapon = fire;\n }"
] | [
"0.7307293",
"0.7088126",
"0.68986106",
"0.6737575",
"0.67217034",
"0.6694231",
"0.6664438",
"0.6612738",
"0.6607113",
"0.65199476",
"0.65199476",
"0.6500844",
"0.64918137",
"0.6468153",
"0.64328444",
"0.64171255",
"0.64046043",
"0.63754606",
"0.63597417",
"0.6345644",
"0.6344314",
"0.6305764",
"0.63034296",
"0.63010865",
"0.6281981",
"0.62700427",
"0.6267707",
"0.6261176",
"0.62514496",
"0.62318844",
"0.6231074",
"0.62309015",
"0.62275714",
"0.6211458",
"0.6196267",
"0.6187928",
"0.61849684",
"0.6184371",
"0.6169174",
"0.6165562",
"0.61462647",
"0.61282295",
"0.6121035",
"0.61197203",
"0.6118977",
"0.6090723",
"0.60814744",
"0.6079698",
"0.60674983",
"0.60576403",
"0.6057124",
"0.60557467",
"0.60548353",
"0.6047185",
"0.6045802",
"0.60352194",
"0.60306686",
"0.60229224",
"0.5991968",
"0.59898853",
"0.59872156",
"0.59844846",
"0.59828115",
"0.5982669",
"0.59817004",
"0.5980704",
"0.59742796",
"0.59739906",
"0.59689283",
"0.5964662",
"0.5961883",
"0.595641",
"0.5955496",
"0.59497213",
"0.5948553",
"0.59481436",
"0.59457654",
"0.5937017",
"0.5930746",
"0.5915582",
"0.5914582",
"0.59124464",
"0.59061563",
"0.5899448",
"0.58932453",
"0.5892644",
"0.5886071",
"0.5885521",
"0.5882939",
"0.58800155",
"0.5877458",
"0.5876416",
"0.58744466",
"0.5869087",
"0.58648264",
"0.58562076",
"0.58491385",
"0.5847473",
"0.5847358",
"0.5846593"
] | 0.69292593 | 2 |
Checks if owner of this controller can move to specified location. | @Override
public boolean canMove(double x, double y) {
return !getOwner().isDead();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean canMove(Location location) {\n if (location == null) return false;\n return location.getWorld().intersects(this, Util.getRectangle(location, size)) == null && location.getY() >= 0 && location.getX() >= 0;\n }",
"public boolean canMove (Location loc) {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return false;\n if (!gr.isValid(loc))\n return false;\n Actor neighbor = gr.get(loc);\n return !(neighbor instanceof Wall);\n }",
"public abstract boolean canMoveTo(Case Location);",
"public boolean canMove(Location loc){\n if(loc.getX() >= theWorld.getX() || loc.getX() < 0){\n System.out.println(\"cant move1\");\n return false;\n }else if(loc.getY() >= theWorld.getY() || loc.getY() < 0){\n System.out.println(\"cant move2\");\n return false;\n }else{\n System.out.println(\"can move\");\n return true;\n }\n }",
"public boolean canMove() {\r\n return (state == State.VULNERABLE || state == State.INVULNERABLE);\r\n\r\n }",
"public boolean canMove() {\n\n\tArrayList<Location> moveLocs = getValid(getLocation());\n\n\tif (isEnd == true) {\n\t return false;\n\t} \n\tif (!moveLocs.isEmpty()) {\n\t \n\t randomSelect(moveLocs);\n\t // selectMoveLocation(moveLocs);\n\t return true;\n\n\t} else {\n\t return false;\n\t}\n }",
"public boolean canMove() {\n\t\tArrayList<Location> loc = getValid(getLocation());\n\t\tif (loc.isEmpty()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tpath.add(getLocation());\n\t\t\tif (loc.size() >= 2) {\n\t\t\t\tcrossLocation.push(path);\n\t\t\t\tpath = new ArrayList<Location>();\n\t\t\t\tnext = betterDir(loc);\n\t\t\t}\n\t\t\tnext = loc.get(0);\n\t\t}\n\t\treturn true;\n\t}",
"public abstract boolean canMove(int originX, int originY, int destX, int destY);",
"public boolean canMove() {\n return (Math.abs(getDist())>=50);\n }",
"public boolean canMoveTo(Actor actor, Coordinate position) {\n\t\treturn canMoveTo(actor, position.x, position.y);\n\t}",
"public boolean canMove(Actor actor)\n\t {\n\t \t//PO: updated the methods after the move from the Bug Class to be called from\n\t \t//PO: the passed actor\n\t Grid<Actor> gr = actor.getGrid();\n\t if (gr == null)\n\t return false;\n\t Location loc = actor.getLocation();\n\t Location next = loc.getAdjacentLocation(actor.getDirection());\n\t if (!gr.isValid(next))\n\t return false;\n\t Actor neighbor = gr.get(next);\n\t return (neighbor == null) || (neighbor instanceof Flower);\n\t // ok to move into empty location or onto flower\n\t // not ok to move onto any other actor\n\t \n\t }",
"boolean canMove();",
"boolean canMoveTo(Vector2d position);",
"public boolean canMove()\n {\n return canMove;\n }",
"public abstract boolean canMove();",
"public abstract boolean isAllowableMovement(int[] location, double[] direction);",
"public boolean canMove() {\n\n if (workers.size() == 0) return true;\n\n return workerCanMove(0) || workerCanMove(1);\n }",
"private boolean canMove() {\n return !(bestMove[0].getX() == bestMove[1].getX() && bestMove[0].getY() == bestMove[1].getY());\n }",
"public boolean canMove(int dir) {\n return true;\n }",
"public abstract boolean canMove(Board board, Spot from, Spot to);",
"public boolean allowMove(Point p, int pos);",
"public boolean canMove ()\n {\n return ((ActiveAdvancer)_advancer).canMove();\n }",
"public boolean canMoveTo(Position position){\n return !isOccupied(position);\n }",
"public boolean canMoveTo(Position position){\n if(position.x > mapSize.x || position.x < 0 || position.y > mapSize.y || position.y < 0){\n return false;\n }\n return !isOccupied(position);\n }",
"public final boolean canMove(Coordinates coordinates) {\n Room room = TextRpg.currentRoom();\n if (!room.inBounds(coordinates))\n return false;\n return canMoveCondition(coordinates);\n }",
"private static boolean canMove() {\n return GameManager.getCurrentTurn();\r\n }",
"public boolean canMoveTo (Coordinate c)\n\t{\n\t\tif (c.x < 0 || c.x >= GRID_SIZE){\n\t\t\treturn false;\n\t\t}\n\t\tif (c.y < 0 || c.y >= GRID_SIZE) {\n\t\t\treturn false;\n\t\t}\n\t\tif (grid[c.x][c.y] == GridChar.AVAILABLE || grid[c.x][c.y] == GridChar.END){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean playerCanMove(Player playerObject) {\n for (int r = 0; r < Board.MAX_ROW; r++) {\n for (int c = 0; c < Board.MAX_COLUMN; c++) {\n Slot slotFrom = boardObject.getSlot(r, c);\n Slot slotRight = boardObject.getSlot(r, c + 2);\n Slot slotLeft = boardObject.getSlot(r, c - 2);\n Slot slotUp = boardObject.getSlot(r - 2, c);\n Slot slotDown = boardObject.getSlot(r + 2, c);\n\n if (isValidMove(slotFrom, slotRight, playerObject.getColor())) {\n return true;\n }\n\n if (isValidMove(slotFrom, slotLeft, playerObject.getColor())) {\n return true;\n }\n\n if (isValidMove(slotFrom, slotUp, playerObject.getColor())) {\n return true;\n }\n\n if (isValidMove(slotFrom, slotDown, playerObject.getColor())) {\n return true;\n }\n }\n }\n\n return false;\n }",
"private boolean canMove(String direction) {\n\t\tif (currentPiece.getLocation() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (Loc loc : currentPiece.getLocation()) {\n\t\t\tLoc nextPoint = nextPoint(loc, direction);\n\t\t\tif (nextPoint == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// if there's someone else's piece blocking you\n\t\t\tif ((new Loc(nextPoint.row, nextPoint.col).isOnBoard())\n\t\t\t\t\t&& boardTiles[nextPoint.row][nextPoint.col] != backgroundColor && !isMyPiece(nextPoint)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public boolean canWalk() {\n\t\treturn rangeBottomLeft != null && !rangeBottomLeft.equals(location)\n\t\t\t\t&& rangeTopRight != null && !rangeTopRight.equals(location);\n\t}",
"public final boolean canMove(Direction direction) {\n return canMoveRelative(direction.getRelativeCoordinates());\n }",
"public MoveResult canMovePiece(Alignment player, Coordinate from, Coordinate to);",
"@Override\r\n\tpublic boolean canMove() {\r\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic boolean movable(Entity obj) {\n\t\tif (!(obj instanceof Player)) return false;\n\t\tPlayer player = (Player) obj;\n\t\t\n\t\tint futureX = this.getX();\n\t\tint futureY = this.getY();\n\t\t\n\t\t\n\t\tint playerX = player.getX();\n\t\tint playerY = player.getY();\n\t\t\n\t\tif (playerX == this.getX()) {\n\t\t\t// player moving either up or down\n\t\t\tif (playerY > this.getY()) {\n\t\t\t\t// player moving up so check what's up of boulder\n\t\t\t\tfutureY = this.getY() - 1;\n\t\t\t} else {\n\t\t\t\t// player moving down ''\n\t\t\t\tfutureY = this.getY() + 1;\n\t\t\t}\n\t\t} else if (playerY == this.getY()) {\n\t\t\t// player moving either left or right\n\t\t\tif (playerX > this.getX()) {\n\t\t\t\t// player moving left ''\n\t\t\t\tfutureX = this.getX() - 1;\n\t\t\t} else {\n\t\t\t\t// player moving right ''\n\t\t\t\tfutureX = this.getX() + 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean result = checkMoveable(futureX, futureY);\n\t\treturn result;\n\t}",
"private boolean isLocationAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\r\n\r\n //If permission is granted returning true\r\n if (result == PackageManager.PERMISSION_GRANTED)\r\n return true;\r\n\r\n //If permission is not granted returning false\r\n return false;\r\n }",
"public boolean moveable() {\n //check reach border\n if (reachBorder()) {\n return false;\n }\n //get the location of the next spot to move to\n //move up\n Point nextLocation = this.getCenterLocation();\n if (direction == 12) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() - speed);\n }\n //move right\n if (direction == 3) {\n nextLocation = new Point(this.getCenterX() + speed,\n this.getCenterY());\n\n }\n //move down\n if (direction == 6) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() + speed);\n\n }\n //move left\n if (direction == 9) {\n nextLocation = new Point(this.getCenterX() - speed,\n this.getCenterY());\n }\n\n // get all objects in a circle of radius tileSize * 2 around the players\n //these objects are those which can possibly colide with the players\n int checkRadius = GameUtility.GameUtility.TILE_SIZE * 2;\n for (GameObject gameObject : GameManager.getGameObjectList()) {\n if (GameUtility.GameUtility.distance(gameObject.getCenterLocation(),\n this.getCenterLocation()) < checkRadius) {\n if ((GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n nextLocation)) && !(GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n this.getCenterLocation())) && gameObject.getType() != GameObjectType.POWER_UP && gameObject.getType() != GameObjectType.MONSTER && gameObject.getType() != GameObjectType.PLAYER) {\n return false;\n }\n }\n }\n return true;\n\n }",
"boolean moveCharacter(Player player, Location.Direction direction) {\n Location currentLocation = player.getLocation();\r\n //check to see if move is possible\r\n Location destination = currentLocation.compass(direction);\r\n if (destination != null)\r\n {\r\n currentLocation.exit(player);\r\n destination.enter(player);\r\n return true;\r\n }\r\n else{\r\n return false;\r\n } \r\n }",
"public boolean isMoveLegal() {\n if (!getGame().getBoard().contains(getFinalCoords())) {\n return false;\n }\n\n // for aero units move must use up all their velocity\n if (getEntity() instanceof Aero) {\n Aero a = (Aero) getEntity();\n if (getLastStep() == null) {\n if ((a.getCurrentVelocity() > 0) && !getGame().useVectorMove()) {\n return false;\n }\n } else {\n if ((getLastStep().getVelocityLeft() > 0) && !getGame().useVectorMove()\n && !(getLastStep().getType() == MovePath.MoveStepType.FLEE\n || getLastStep().getType() == MovePath.MoveStepType.EJECT)) {\n return false;\n }\n }\n }\n\n if (getLastStep() == null) {\n return true;\n }\n\n if (getLastStep().getType() == MoveStepType.CHARGE) {\n return getSecondLastStep().isLegal();\n }\n if (getLastStep().getType() == MoveStepType.RAM) {\n return getSecondLastStep().isLegal();\n }\n return getLastStep().isLegal();\n }",
"public boolean canMoveTo(Actor actor, int x, int y) {\n\t\t// check for out of bounds, etc\n\t\tif (!isWithinBounds(x, y))\n\t\t\treturn false;\n\n\t\tTile tile = map[x][y];\n\t\tif (tile.canPass()) {\n\t\t\treturn actor.onMoveAttempting(this, tile);\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean canMove() {\n ArrayList<Location> valid = canMoveInit();\n if (valid == null || valid.isEmpty()) {\n return false;\n }\n ArrayList<Location> lastCross = crossLocation.peek();\n for (Location loc : valid) {\n Actor actor = (Actor) getGrid().get(loc);\n if (actor instanceof Rock && actor.getColor().equals(Color.RED)) {\n next = loc;\n isEnd = true;\n return false;\n }\n if (!lastCross.contains(loc)) {\n lastCross.add(loc);\n next = loc;\n ArrayList<Location> nextCross = new ArrayList<>();\n nextCross.add(next);\n nextCross.add(last);\n crossLocation.push(nextCross);\n return probabilityAdd();\n }\n }\n next = lastCross.get(1);\n crossLocation.pop();\n return probabilitySub();\n }",
"public boolean isSafe(Location location) {\r\n\r\n\t\tLocation northNeighbor = map.getLocation(location, Direction.NORTH);\r\n\t\tLocation southNeighbor = map.getLocation(location, Direction.SOUTH);\r\n\t\tLocation eastNeighbor = map.getLocation(location, Direction.EAST);\r\n\t\tLocation westNeighbor = map.getLocation(location, Direction.WEST);\r\n\r\n\t\tArrayList<Location> neighbors = new ArrayList<Location>(4);\r\n\t\tneighbors.add(northNeighbor);\r\n\t\tneighbors.add(southNeighbor);\r\n\t\tneighbors.add(eastNeighbor);\r\n\t\tneighbors.add(westNeighbor);\r\n\r\n\t\tif (northNeighbor.getSite().owner == myID && southNeighbor.getSite().owner == myID &&\r\n\t\t\t\teastNeighbor.getSite().owner == myID && westNeighbor.getSite().owner == myID){\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\treturn false;\r\n\r\n\t}",
"public boolean hasLocation()\n {\n return targetLocation != null;\n }",
"@Override\n public boolean isLocationValid(int x, int y)\n {\n return master.isLocationValid(x, y);\n }",
"public boolean move(Location location) {\n return move(location, false);\n }",
"@Override\r\n public boolean canMove() {\r\n Grid<Actor> gr = getGrid();\r\n int dirs[] = {\r\n Location.AHEAD, Location.HALF_CIRCLE, Location.LEFT,\r\n Location.RIGHT };\r\n // 当终点在周围时,不能移动且isEnd应当为true\r\n for (int i = 0; i < dirs.length; i++) {\r\n Location tarLoc = getLocation().getAdjacentLocation(dirs[i]);\r\n if (gr.isValid(tarLoc) && gr.get(tarLoc) != null) {\r\n // Color直接用==计算竟然不可行(真是哔了dog...\r\n if (gr.get(tarLoc) instanceof Rock\r\n && gr.get(tarLoc).getColor().equals(Color.RED)) {\r\n isEnd = true;\r\n return false;\r\n }\r\n }\r\n }\r\n ArrayList<Location> nextLocs = getValid(getLocation());\r\n // 当附近没有可以移动的位置时,不能移动\r\n if (nextLocs.size() == 0) {\r\n return false;\r\n }\r\n // 当可以移动的位置>1时,说明存在一个节点,这个节点应当被新建一个arraylist入栈\r\n if (nextLocs.size() > 1) {\r\n ArrayList<Location> newStackElem = new ArrayList<Location>();\r\n newStackElem.add(getLocation());\r\n crossLocation.push(newStackElem);\r\n }\r\n // 有可以移动的位置时,向概率最高的方向移动\r\n int maxProbLoc = 0;\r\n // 由于nextLocs不一定有4个location,所以只好循环判断取最大值\r\n for (int i = 0; i < nextLocs.size(); i++) {\r\n Location loc = nextLocs.get(i);\r\n int dirNum = getLocation().getDirectionToward(loc) / 90;\r\n if (probablyDir[dirNum] > probablyDir[maxProbLoc]) {\r\n maxProbLoc = i;\r\n }\r\n }\r\n next = nextLocs.get(maxProbLoc);\r\n return true;\r\n }",
"public boolean canEnterDestination(CommandSender sender, MVDestination d) {\n if (!(sender instanceof Player)) {\n return true;\n }\n Player p = (Player) sender;\n if (d == null || d.getLocation(p) == null) {\n return false;\n }\n String worldName = d.getLocation(p).getWorld().getName();\n if (!this.worldMgr.isMVWorld(worldName)) {\n return false;\n }\n if (!canEnterLocation(p, d.getLocation(p))) {\n return false;\n }\n return this.hasPermission(p, d.getRequiredPermission(), false);\n }",
"public boolean isAssignedToLocation() {\n if (location == null) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean isInUseableZone(Game game, MageObject source, GameEvent event) {\n Permanent before = ((ZoneChangeEvent) event).getTarget();\n if (before == null) {\n return false;\n }\n if (!(before instanceof PermanentToken) && !this.hasSourceObjectAbility(game, before, event)) {\n return false;\n }\n // check now it is in graveyard\n if (before.getZoneChangeCounter(game) + 1 == game.getState().getZoneChangeCounter(sourceId)) {\n Zone after = game.getState().getZone(sourceId);\n return after != null && Zone.GRAVEYARD.match(after);\n } else {\n // Already moved to another zone, so guess it's ok\n return true;\n }\n }",
"@objid (\"7f09cb7d-1dec-11e2-8cad-001ec947c8cc\")\n public boolean allowsMove() {\n return true;\n }",
"public static boolean isValidMove(Robot robot) {\r\n\t\t\r\n\t\tint x = robot.getX();\r\n\t\tint y = robot.getY();\r\n\t\t\r\n\t\t//Make sure the next move won't out\r\n\t\t//of bound to the east\r\n\t\tif(robot.facingEast()) {\r\n\t\t\tif(x + 1 < 10) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Make sure the next move won't hit\r\n\t\t//the wall to the west\r\n\t\tif(robot.facingWest()) {\r\n\t\t\tif(x - 1 > 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t//Make sure the next move won't hit\r\n\t\t//the wall to the south\r\n\t\tif(robot.facingSouth()) {\r\n\t\t\tif(y - 1 > 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t//Make sure the next move won't out\r\n\t\t//of the bound to the north\r\n\t\tif(robot.facingNorth()) {\r\n\t\t\tif(y + 1 < 10) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\treturn false;\r\n\t}",
"@Override\n public boolean canMove(int destinationX, int destinationY) {\n int differenceX = Math.abs(destinationX - this.boardCoordinates.x);\n int differenceY = Math.abs(destinationY - this.boardCoordinates.y);\n\n return (destinationX == this.boardCoordinates.x && differenceY == 1) ||\n (destinationY == this.boardCoordinates.y && differenceX == 1) ||\n (differenceX == differenceY && differenceX == 0); //we're handling start=finish coordinates separately\n }",
"public abstract boolean canMove(Rect rect, int xClearance, int yClearance);",
"private boolean checkInsideZone() {\n for (Zone z : shiftZones) {\n if (PolyUtil.containsLocation(userLocation, Arrays.asList(z.getCoords()), true)) {\n return true;\n }\n }\n return false;\n }",
"public boolean canMoveTo(int x, int y) {\n if (x < 0 || x >= dungeon.getWidth() || y < 0 || y >= dungeon.getHeight() || characterStatus.equals(CharacterStatus.DEAD))\n return false;\n boolean canMove = true;\n for (Entity entity : dungeon.getEntities(x, y)) {\n if (entity instanceof FieldObject)\n ((FieldObject) entity).interact(this);\n if (entity instanceof FieldObject && ((FieldObject) entity).isObstacle()) {\n canMove = false;\n break;\n }\n }\n return canMove;\n }",
"public boolean canMove2() {\n\t\tGrid<Actor> gr = getGrid(); \n\t\tif (gr == null) {\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\tLocation loc = getLocation(); \n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (!gr.isValid(next)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!gr.isValid(next2)) {\n\t\t\treturn false;\n\t\t}\n\t\tActor neighbor = gr.get(next2); \n\t\treturn (neighbor == null) || (neighbor instanceof Flower); \n\t}",
"@Override\n boolean canMove(Cell source, Cell destination) {\n return true;\n }",
"public abstract boolean attemptMove(Player currentPlayerObj, Coordinate move);",
"boolean isLegal(Move move) {\r\n return isLegal(move.from(), move.to());\r\n }",
"private boolean legalMove() {\n\n\t\t// empty landing spot\n\t\tif (tilePath.size() == 0) {\n\t\t\tdebug(\"illegal, empty landing spot\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!mBoard.tileIsEmpty(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, tile not empty\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// start doesn't equal end\n\t\tif (tilePath.get(0).equals(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, start doesn't equal end\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public boolean move() {\n\t\tint nextDirection;\n\t\tint pacmanX = parent.getPacManX();\n\t\tint pacmanY = parent.getPacManY();\n\t\t\n\t\tint[] directionPriority = new int[4];\n\t\t/** The direction is added to the priority in order to achieve it once the move is chosen */\n\t\tdirectionPriority[0]=(pacmanX-pixelLocationX)*(10)*state+GameCharacter.RIGHT;\n\t\tdirectionPriority[1]=((pacmanX-pixelLocationX)*(-10)*state+GameCharacter.LEFT);\n\t\tdirectionPriority[2]=(pacmanY-pixelLocationY)*(10)*state+GameCharacter.DOWN;\n\t\tdirectionPriority[3]=((pacmanY-pixelLocationY)*(-10)*state+GameCharacter.UP);\n\t\tArrays.sort(directionPriority);\n\t\t\n\t\tint i=3;\n\t\t\n\t\tdo {\n\t\t\tnextDirection = directionPriority[i]%10;\n\t\t\tif (nextDirection < 0) {\n\t\t\t\tnextDirection += 10;\n\t\t\t}\n\t\t\tif(isLegalMove(nextDirection) && (Math.abs(nextDirection-currentDirection) != 2) || i==0) {\n\t\t\t\tsetDirection(nextDirection);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\t\twhile (i>=0);\n\t\treturn super.move();\n\t}",
"private boolean isThereValidMove() {\n\t\treturn true;\n\t}",
"protected boolean canMove(int pos) {\n\t\tString[] directions = getDirectionsFor(pos).split(\",\");\n\t\tfor(String strlabel : directions){\n\t\t\tint label = Integer.parseInt(strlabel);\n\t\t\tif(label == blank)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public boolean moveIsPossible(Coordinate coord) {\n if(gameState.getTurnState().hasMoved()){\n return false;\n }\n Field field = gameState.getField();\n if(!field.getField().containsKey(coord)){\n return false;\n }\n Cell currentPosition = gameState.getTurnState().getCurrentPlayer()\n .getPosition();\n Cell destination = field.getCell(coord);\n return field.isReachable(currentPosition, destination, 3);\n }",
"@Override\n protected boolean canMove(int playerIdx) {\n if(pgs.getTurnID() == playerIdx){\n return true;\n }\n return false;\n }",
"public boolean canBuild(Location location, Player player) {\n if (!location.getWorld().getEnvironment().equals(Environment.NORMAL)) {\n // If theyre not in the overworld, they cant build\n return false;\n } else if (landIsClaimed(location)) {\n if(isOwner(location,player)) {\n return true;\n } else if(landPermissionCode(location).equals(\"p\")) {\n return true;\n } else if(landPermissionCode(location).equals(\"c\")) {\n String owner_uuid=REDIS.get(\"chunk\" + location.getChunk().getX() + \",\" + location.getChunk().getZ() + \"owner\");\n String owner_clan=REDIS.get(\"clan:\"+owner_uuid);\n String player_clan=REDIS.get(\"clan:\"+player.getUniqueId().toString());\n if(owner_clan.equals(player_clan)) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return true;\n }\n }",
"boolean canMove(Tile t);",
"static boolean tryMoveToLoc(MapLocation loc) throws GameActionException {\n\t\tDirection dir = rc.getLocation().directionTo(loc);\n\t\treturn tryMove(dir);\n\t}",
"@Override\n public boolean isLocationValid(XYCoord coords)\n {\n return master.isLocationValid(coords);\n }",
"public boolean canMove()\n\t{\n\t\tif(delayMove>compareSpeed())\n\t\t{\n\t\t\tdelayMove=0;\n\t\t\treturn true;\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public final boolean canMoveRelative(Coordinates relativeCoordinates) {\n return canMove(getCoordinatesRelative(relativeCoordinates));\n }",
"@Override\n public boolean canMove(double x, double y) {\n double xRec=rectangle.getX();\n double yRec=rectangle.getY();\n rectangle.setLocation((int)(xRec+x*1),(int)(yRec+y*1));\n\n List<Rectangle> staticRectangles= board.getStaticRectangles();\n List<Creature> creatures=board.getCreatures();\n Iterator<Rectangle> itr1=staticRectangles.iterator();\n\n while(itr1.hasNext()){\n Rectangle tmpRectangle =itr1.next();\n if(rectangle.intersects(tmpRectangle)) {\n return false;\n }\n }\n Iterator<Creature> itr2=creatures.iterator();\n while(itr2.hasNext()){\n Creature creature=itr2.next();\n if(creature==this){\n continue;\n }\n else{\n if(rectangle.intersects(creature.getRectangle()))\n return false;\n }\n\n }\n\n return true;\n }",
"public boolean isMoveable() {\n\t\treturn _moveable;\n\t}",
"public boolean canGetLocation() {\r\n return canGetLocation;\r\n }",
"public boolean canMove(Creature c, Integer[] dir){\r\n if(dir[0]==0&&dir[1]==0) return true;\r\n return c.area.tileFree(c.x+dir[0], c.y+dir[1]);\r\n }",
"public boolean isOwner(EntityPlayer player) {\n\t\treturn player.getDisplayName().equals(owner) /*|| Platform.worldType() != Platform.WorldMode.MP*/;\r\n\t}",
"public boolean isPositionValid(){\n\t\t//check overlapping with walls\n\t\tfor(Wall wall : Game.gameField.getWalls()){\n\t\t\tif(wall.overlaps(center))\n\t\t\t\treturn false;\n\t\t}\n\t\t//check overlapping with other balls\n\t\tfor(Ball ball : Game.gameField.getBalls()){\n\t\t\tif(ball == this)\n\t\t\t\tcontinue;\n\t\t\tif(ball.getCenterPoint().distance(center) < RADIUS * 2)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn GameField.FIELD.contains(center);\n\t}",
"public boolean isPossibleOwner(Player player) {\n\t\treturn possibleOwners.contains(player);\n\t}",
"public boolean canReach(Tile dest) {\n if(dest == null || dest.isBlocked())\n return false; \n \n ArrayList<Tile> path = tileRoute(loc, dest);\n \n if(path == null)\n return false;\n \n return path.size() <= moveDistance;\n }",
"protected boolean canMove(int playerIdx) {\n int activePlayer = state.getCurrentTeamsTurn().getTEAMNUMBER();\n return (activePlayer == playerIdx);\n }",
"public boolean checkAndMove() {\r\n\r\n\t\tif(position == 0)\r\n\t\t\tdirection = true;\r\n\r\n\t\tguardMove();\r\n\r\n\t\tif((position == (guardRoute.length - 1)) && direction) {\r\n\t\t\tposition = 0;\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(direction)\r\n\t\t\tposition++;\r\n\t\telse\r\n\t\t\tposition--;\r\n\r\n\t\treturn false;\r\n\t}",
"public boolean checkRep() {\n return location.x() >= 0 && location.x() < board.getWidth() && \n location.y() >= 0 && location.y() < board.getHeight(); \n }",
"public final boolean canMove(Direction direction, int amount) {\n return canMoveRelative(direction.getRelativeCoordinates(amount));\n }",
"public boolean isMoveLegal(int x, int y) {\n\t\tif (rowSize <= x || colSize <= y || x < 0 || y < 0) {\r\n\t\t\t// System.out.print(\"Position (\" + (x + 1) + \", \" + (y + 1) + \") is\r\n\t\t\t// out of range!\\n\");\r\n\t\t\treturn false;\r\n\t\t} else if (!(matrix[x][y] == 0)) {\r\n\t\t\t// System.out.print(\"Position (\" + (x + 1) + \", \" + (y + 1) + \") has\r\n\t\t\t// been occupied!\\n\");\r\n\t\t\treturn false;\r\n\t\t} else\r\n\t\t\treturn true;\r\n\t}",
"public boolean isOwnerKnown() {\n\t\tif (owner == null && possibleOwners.size() == 1)\n\t\t\towner = possibleOwners.get(0);\n\t\t\t\n\t\treturn (owner == null);\n\t}",
"private boolean isLegalPositon(Position checkPosition){\n if (checkPosition.equalPosition(start)||checkPosition.equalPosition(end))\n return true;\n if(checkPosition.getRow()<0 || checkPosition.getCol()<0 || checkPosition.getRow()>=this.rows || checkPosition.getCol() >= this.cols){\n return false;\n }\n\n if(maze[checkPosition.getRow()][checkPosition.getCol()]== WallType.wall){\n return false;\n }\n return true;\n }",
"public boolean isValidMove(Coordinates coordinates) {\n if (grid[coordinates.getRow()][coordinates.getColumn()].getSymbol() != 'X' &&\n grid[coordinates.getRow()][coordinates.getColumn()].getSymbol() != 'O') {\n return true;\n }\n\n return false;\n }",
"@Override\n\tpublic boolean isLegalMove(Square newPosition) {\n\t\treturn false;\n\t}",
"public boolean isMoving() {\n return this.movementComposer.isMoving();\n }",
"public boolean canGetLocation() {\r\n return this.canGetLocation;\r\n }",
"public boolean isLegalMove(int x, int y, int x1, int y1) {\n return field.isLegalMove(x, y, x1, y1);\n }",
"public boolean destinationPermitted(Position p) {\n\n return (p.getX() >= 0 && p.getX() < x_length + 1 && p.getY() >= 0 &&\n p.getY() < y_length + 1 && !isOccupied(p));\n }",
"public boolean canMoveTo(int x, int y) {\n for (Cell c : this.board) {\n if (c.x == x && c.y == y) {\n return !c.isFlooded;\n }\n }\n return false;\n }",
"boolean chkMove(DcMotor motor, int target, int delta)\n {\n int currentPos = motor.getCurrentPosition();\n return ((currentPos >= (target - delta)) && (currentPos <= (target + delta)));\n }",
"public boolean isValidMove(int targetX, int targetY){\n\t\t/*check boundary condition*/\n\t\tif(outBoundary(targetX, targetY)){\n\t\t\treturn false;\n\t\t}\n\t\tint xDiff = Math.abs(getPosition().getFirst()-targetX);\n\t\tint yDiff = Math.abs(getPosition().getSecond()-targetY);\n\t\treturn ((xDiff ==2 && yDiff ==1) ||(xDiff ==1 && yDiff ==2));\n\t}",
"public boolean canInteractWithBlock(Player player, Location location) {\n\t\tif (mayor.equals(player.getUniqueId()) || councils.containsKey(player.getUniqueId())) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tPlot plot = getPlotHere(location);\n\t\t\treturn (inhabitants.contains(player.getUniqueId()) && plot == null) || (plot != null && plot.canBuild(player, location));\n\t\t}\n\t}",
"public boolean isLocationPermissionGranted() {\n return PermissionUtils.isPermissionGranted(mContext, Manifest.permission.ACCESS_COARSE_LOCATION) &&\n PermissionUtils.isPermissionGranted(mContext, Manifest.permission.ACCESS_FINE_LOCATION);\n }",
"public boolean isValidMove(Point orig, Point dest){ \r\n Color playerColor = model.getCurrentPlayer().getColor();\r\n // Validate all point between board limits\r\n if(!isValidPosition(orig) || !isValidPosition(dest)) return false;\r\n // Check for continue move starting piece\r\n if(model.getCheckPiece() != null && !model.getCheckPiece().equals(orig)) return false;\r\n // Validate origin piece to player color\r\n if((isRed(playerColor) && !isRed(orig)) || (isBlack(playerColor) && !isBlack(orig))) return false;\r\n // Only can move to empty Black space\r\n if(!isEmpty(dest)) return false;\r\n // If current player have obligatory eats, then need to eat\r\n if(obligatoryEats(playerColor) && !moveEats(orig,dest)) return false;\r\n // Check move direction and length\r\n int moveDirection = orig.getFirst() - dest.getFirst(); // Direction in Rows\r\n int rLength = Math.abs(moveDirection); // Length in Rows\r\n int cLength = Math.abs(orig.getSecond() - dest.getSecond()); // Length in Columns\r\n int mLength;\r\n // Only acepts diagonal movements in 1 or 2 places (1 normal move, 2 eats move)\r\n if ((rLength == 1 && cLength == 1) || (rLength == 2 && cLength == 2)){\r\n mLength = rLength;\r\n } else {\r\n return false;\r\n }\r\n // 1 Place movement\r\n if (mLength == 1){ \r\n if (isRed(orig) && !isQueen(orig) && moveDirection > 0) return true;\r\n if (isBlack(orig) && !isQueen(orig) && moveDirection < 0) return true;\r\n if ((isRed(orig) && isQueen(orig)) || (isBlack(orig) && isQueen(orig))) return true;\r\n }\r\n // 2 Places movement need checks if eats rivals\r\n if (mLength == 2){\r\n // Compute mid point\r\n Point midPoint = getMidPoint(orig, dest);\r\n // Check move\r\n if ((isRed(orig) && isBlack(midPoint)) || (isBlack(orig) && isRed(midPoint))){\r\n if (isRed(orig) && !isQueen(orig) && moveDirection > 0) return true;\r\n if (isBlack(orig) && !isQueen(orig) && moveDirection < 0) return true;\r\n if ((isRed(orig) && isQueen(orig)) || (isBlack(orig) && isQueen(orig))) return true;\r\n }\r\n }\r\n return false;\r\n }",
"public boolean requestMove() {\r\n if (game != null) {\r\n player.getMove();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public boolean canGetLocation() {\n return this.canGetLocation;\n }",
"public boolean canGetLocation() {\n return this.canGetLocation;\n }"
] | [
"0.73611975",
"0.7309263",
"0.71969664",
"0.68539244",
"0.6613799",
"0.6579334",
"0.6495462",
"0.6474171",
"0.63481754",
"0.6318447",
"0.62440026",
"0.6242544",
"0.62338406",
"0.62330127",
"0.6231069",
"0.62303317",
"0.62196964",
"0.6125927",
"0.61117065",
"0.6110149",
"0.60813594",
"0.6067679",
"0.6066362",
"0.60480934",
"0.6047914",
"0.60295737",
"0.5971168",
"0.595445",
"0.5947986",
"0.5921309",
"0.59176993",
"0.58951116",
"0.58667606",
"0.58570886",
"0.58525616",
"0.5812159",
"0.58054084",
"0.57965785",
"0.5796486",
"0.57956433",
"0.5792736",
"0.57915545",
"0.5791411",
"0.5778323",
"0.5767909",
"0.57649696",
"0.5749369",
"0.5724933",
"0.57225734",
"0.5721686",
"0.57113785",
"0.57108164",
"0.56793815",
"0.5671679",
"0.56704",
"0.56654716",
"0.56444484",
"0.56405836",
"0.56203336",
"0.56151164",
"0.56113136",
"0.56075567",
"0.5604892",
"0.55793035",
"0.5574348",
"0.55675435",
"0.5559865",
"0.55500126",
"0.553424",
"0.5510131",
"0.550969",
"0.549986",
"0.5492138",
"0.54833853",
"0.5477156",
"0.54682344",
"0.54628295",
"0.54596996",
"0.5448054",
"0.54387647",
"0.54380596",
"0.54352677",
"0.54301405",
"0.5424742",
"0.54214525",
"0.54154897",
"0.5409333",
"0.54063946",
"0.5405792",
"0.5392517",
"0.5391634",
"0.5389943",
"0.5387908",
"0.5387139",
"0.53838176",
"0.5382158",
"0.537916",
"0.53705287",
"0.5370109",
"0.5370109"
] | 0.6358539 | 8 |
Starts moving the character to specified destination. | @Override
public void startMove(Collection<Location> destinations, Callable<Boolean> onEnd, Consumer<Method> onExit, ENaviType naviType) {
cancelMoveTask();
if (destinations.isEmpty()) {
onMovementComplete();
return;
}
synchronized (_mutex) {
_movementCompleted = onEnd;
_movementFailed = onExit;
}
getOwner().getAi().setFindPathCompleted(false);
_waypoints.addAll(destinations);
_movementTick = System.currentTimeMillis();
_navigationType = naviType;
if (_movementTask == null || _movementTask.isDone()) {
_movementTask = ThreadPool.getInstance().scheduleAiAtFixedRate(this, 300, 300, TimeUnit.MILLISECONDS);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void move( char direction );",
"public void move(String direction);",
"public void move(String direction) {\n \n }",
"public void startMoving ()\n {\n if (canMove()) {\n ((Mobile)_actor).setDirection(_actor.getRotation());\n _actor.set(Mobile.MOVING);\n }\n }",
"public void startMovingToTarget() \r\n {\n movingToTarget = true;\r\n }",
"void startMovement();",
"public char makeMove(Coordinate move);",
"void moveToStart();",
"public void move() {\n float diffX = cDestination.getX() - getCenterX();\n float diffY = cDestination.getY() - getCenterY();\n\n float newX = cPosition.getX() + cSpeed * Math.signum(diffX);\n float newY = cPosition.getY() + cSpeed * Math.signum(diffY);\n\n cPosition.setX(newX);\n cPosition.setY(newY);\n }",
"public void move(String direction) {\n\tpreviousMove = direction;\n\tout.println(\"MOVE \" + direction);\n}",
"public void goTo(int destination) {\n\t\tdistance=1;\r\n\t\tif(destination == Constants.TO_BACKWARD_CENTER || destination == Constants.TO_BACK)\r\n\t\t{\r\n\t\t\tMove(-Constants.speed);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tMove(Constants.speed);\r\n\t\t}\r\n\t\tApplicationInfo.Destination=destination;\r\n\t\tthread=new DrawThread(glview);\r\n\t\tthread.setRenderingCount(destination, mApplications.get(CurIndex).getZ(),Constants.speed,distance);\r\n\t\tThreadList.add(thread);\r\n\t\tthread.start();\r\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This animal moves forward\");\r\n\t}",
"@Override\r\n\tpublic void move(String from, String to) {\n\t\t\r\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This Tiger moves forward\");\r\n\t}",
"protected void moveToDestination(){\n\t\tqueue.clear();\n\t\twhile (destination[0] < 0){\n\t\t\tqueue.add(\"MOVE S\");\n\t\t\tdestination[0] += 1;\n\t\t}\n\t\twhile (destination[0] > 0){\n\t\t\tqueue.add(\"MOVE N\");\n\t\t\tdestination[0] -= 1;\n\t\t}\n\t\twhile (destination[1] < 0){\n\t\t\tqueue.add(\"MOVE E\");\n\t\t\tdestination[1] += 1;\n\t\t}\n\t\twhile (destination[1] > 0){\n\t\t\tqueue.add(\"MOVE W\");\n\t\t\tdestination[1] -= 1;\n\t\t}\n\t\tdestination = null;\n\t}",
"protected void move()\n {\n // Find a location to move to.\n Debug.print(\"Fish \" + toString() + \" attempting to move. \");\n Location nextLoc = nextLocation();\n\n // If the next location is different, move there.\n if ( ! nextLoc.equals(location()) )\n {\n // Move to new location.\n Location oldLoc = location();\n changeLocation(nextLoc);\n\n // Update direction in case fish had to turn to move.\n Direction newDir = environment().getDirection(oldLoc, nextLoc);\n changeDirection(newDir);\n Debug.println(\" Moves to \" + location() + direction());\n }\n else\n Debug.println(\" Does not move.\");\n }",
"public void move(int distance);",
"public void move(Vector start,Vector dist);",
"@Override\n public void start() {\n this.mob.getNavigation().startMovingTo(\n this.mob.getPositionTarget().getX(),\n this.mob.getPositionTarget().getY(),\n this.mob.getPositionTarget().getZ(),\n this.speed\n );\n }",
"@Override\n public void startExecuting()\n {\n this.entity.getNavigator().tryMoveToXYZ(this.xPosition, this.yPosition, this.zPosition, this.speed);\n }",
"public void move(){\n\t\t\n\t}",
"public void moveCharacter(AStarCharacter character, int destGridX, int destGridY)\r\n\t{\r\n\t\t// make sure we're not moving the current user's character again\r\n\t\tif(!character.getUsername().equals(basicAvatarData.getUsername()))\r\n\t\t{\r\n\t\t\ttheGridView.moveCharacterInRoom(character, destGridX, destGridY);\r\n\t\t}\r\n\t}",
"public void move();",
"public void move();",
"public void toMoving() {\n notifyStartMoving(this.getCurrentTurn().getCurrentPlayer().getNickname());\n if (getCurrentTurn().getCurrentPlayer().isHasSpecialMove()) {\n notifyAskForEffect(currentTurn.getCurrentPlayer().getNickname());\n } else {\n notifyChooseWorker(this.getCurrentTurn().getCurrentPlayer().getNickname(), board);\n }\n }",
"public void move() {\n\r\n\t}",
"public void move() {\n\t\tthis.hero.setPF(1);\n\t\tthis.hero.setState(this.hero.getMoved());\n\t}",
"public void move_to_gantry() {\n\t\tstop_moving();\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmove(gpX, gpY, gpZ);\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This Goose moves forward\");\r\n\t}",
"void move(String direction) {\n \tif (direction.equals(\"A\")) { \n \t\tsetXCoord(getXCoord()-getHSpeed());\n \t} else if (direction.equals(\"D\")) {\n \t\tsetXCoord(getXCoord()+getHSpeed());\n \t}\n }",
"public void playMove(String from, String to, String arrow) {\n\t\tg_board.doMove(from, to, arrow);\n\t}",
"public void move(){\n System.out.println(\"I can't move...\");\n }",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"Driving a airplane!\");\n\t}",
"public void move(Pawn pawn, Point destination) {\n\t\tPoint lastLocation = pawn.getLocation();\r\n\t\tboard[lastLocation.x][lastLocation.y].setEmpty();\r\n\t\tboard[destination.x][destination.y].setTaken();\r\n\t\tpawn.setLocation(destination);\r\n\t\tpawn.setLastLocation(lastLocation);\r\n\t\t\r\n\t\tif(isNeighbor(lastLocation, destination)) {\r\n\t\t\tpawn.setAfterStep();\r\n\t\t}\r\n\t\t\r\n\t\tif(board[destination.x][destination.y].getFieldType().equals(pawn.getTarget())) {\r\n\t\t\tpawn.setInTarget();\r\n\t\t}\r\n\t}",
"public void move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}",
"public void move()\n {\n move(WALKING_SPEED);\n }",
"public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }",
"private static void moveToAttack(MapLocation destination) throws GameActionException {\n BulletInfo[] bullets = rc.senseNearbyBullets();\n RobotInfo[] enemies = rc.senseNearbyRobots(-1, them);\n\n if (enemies.length != 0) {\n int index = priority(enemies);\n if (index != -1) {\n target = enemies[priority(enemies)];\n attack(target);\n }\n }\n else {\n move(bullets, enemies, destination);\n }\n }",
"public void move() {\n\t\tthis.position.stepForwad();\n\t\tthis.position.spin();\n\t}",
"@Override\n\tpublic void excute() {\n\t\tmoveEvent.move(commandinfo.getValue() * 200);\n\t}",
"public void moveToDestination(Move move) {\r\n\t\tx = move.getToX();\r\n\t\ty = move.getToY();\r\n\r\n\t}",
"void move() throws IOException, InterruptedException{\r\n \r\n // if current position and velocity are greater than 0 and less than the right edge of the screen\r\n if (x + xa > 0 && x + xa < 1280-w){\r\n // increase the character position by velocity\r\n x = x + xa;\r\n }\r\n \r\n // if current height and velocity are greater than zero and less than the floor of the game\r\n if (y + ya > 0 && y + ya < 500){\r\n // if jumping up\r\n if (y > 300){\r\n y = y + ya;\r\n } else{ // if falling down, increase velocity to 3\r\n ya = 3;\r\n y = y + ya;\r\n }\r\n }\r\n \r\n // if a collision is detected increase life counter\r\n if (game.collision()){\r\n // increase life counter\r\n count++;\r\n // call game over to load next image or to close game\r\n game.gameOver(count);\r\n } \r\n }",
"public void move() {\n\n }",
"@Override\n public void move()\n {\n System.out.println(\"tightrope walking\");\n }",
"void move();",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"하늘을 날다\");\n\t}",
"void makeMove(Location loc);",
"public void goToStart() {\n\t\tsetPosition(0);\n\t}",
"void moving() {\n\t\tSystem.out.println(\"Moving the car\");\r\n\t}",
"public void move() { \n\t\tSystem.out.println(\"MOVING\");\n\t\tswitch(direction) {\n\t\t\tcase NORTH: {\n\t\t\t\tyloc -= ySpeed;\n\t\t\t}\n\t\t\tcase SOUTH: {\n\t\t\t\tyloc+= xSpeed;\n\t\t\t}\n\t\t\tcase EAST: {\n\t\t\t\txloc+= xSpeed;\n\t\t\t}\n\t\t\tcase WEST: {\n\t\t\t\txloc-= xSpeed;\n\t\t\t}\n\t\t\tcase NORTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase NORTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc+=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc+= ySpeed;\n\t\t\t}\n\t\t}\n\t}",
"boolean moveCharacter(Player player, Location.Direction direction) {\n Location currentLocation = player.getLocation();\r\n //check to see if move is possible\r\n Location destination = currentLocation.compass(direction);\r\n if (destination != null)\r\n {\r\n currentLocation.exit(player);\r\n destination.enter(player);\r\n return true;\r\n }\r\n else{\r\n return false;\r\n } \r\n }",
"@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}",
"public void move() throws InstructionExecutionException\r\n\t{\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tStreet street=this.getHeadingStreet();\r\n\t\t\tif(street==null){\r\n\t\t\t\tString err=\"WALL·E says: There is no street in direction \"+this.getCurrentHeading();\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, err);\r\n\t\t\t\t}\r\n\t\t\t\tthrow new InstructionExecutionException(err);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tPlace nextPlace=street.nextPlace(this.currentPlace);\r\n\t\t\tif (street.isOpen()){\r\n\t\t\t\tthis.currentPlace=nextPlace;\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tthis.navigationPanel.updateCell(currentDirection, nextPlace);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tString err=\"WALL·E says: Arrggg, there is a street but it is closed!\";\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, err);\r\n\t\t\t\t}\r\n\t\t\t\tthrow new InstructionExecutionException(err);\r\n\t\t\t}\r\n\t\t}catch (Exception e){\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public void movePiece(Coordinate from, Coordinate to);",
"public DCursorMove() {\n super(COMMAND);\n }",
"public boolean moveUnit(Position from, Position to);",
"public void move(){\n x+=xDirection;\n y+=yDirection;\n }",
"@Override\n public void movement() {\n if (isAlive()) {\n //Prüfung ob A oder die linke Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_LEFT) || Keyboard.isKeyDown(KeyEvent.VK_A)) {\n //Änder die X Position um den speed wert nach link (verkleinert sie)\n setPosX(getPosX() - getSpeed());\n //Prüft ob der Spieler den linken Rand des Fensters erreicht hat\n if (getPosX() <= 0) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(0);\n }\n }\n //Prüfung ob D oder die rechte Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT) || Keyboard.isKeyDown(KeyEvent.VK_D)) {\n //Änder die X Position um den speed wert nach rechts (vergrößert sie)\n setPosX(getPosX() + getSpeed());\n //Prüft ob der Spieler den rechten Rand des Fensters erreicht hat\n if (getPosX() >= Renderer.getWindowSizeX() - getWight() - 7) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(Renderer.getWindowSizeX() - getWight() - 7);\n }\n }\n //Aktualsiert die Hitbox\n setBounds();\n }\n }",
"public void act() \r\n {\r\n move();\r\n }",
"public void move(int delta);",
"void makeMove(char c0, char r0, char c1, char r1) {\n makeMove(Move.move(c0, r0, c1, r1, null));\n }",
"public void move() {\n spriteBase.move();\n\n Double newX = spriteBase.getXCoordinate() + spriteBase.getDxCoordinate();\n Double newY = spriteBase.getYCoordinate() + spriteBase.getDyCoordinate();\n\n if (!newX.equals(spriteBase.getXCoordinate())\n || !newY.equals(spriteBase.getYCoordinate())) {\n Logger.log(String.format(\"Monster moved from (%f, %f) to (%f, %f)\",\n spriteBase.getXCoordinate(), spriteBase.getYCoordinate(), newX, newY));\n }\n }",
"private static Activity moveInDirection(int x, int y) {\n return Activity.newBuilder()\n .addSubActivity(() -> {\n Position pos = Players.getLocal().getPosition();\n while(pos.isPositionWalkable()) {\n pos = pos.translate(x, y);\n }\n pos = pos.translate(-x, -y);\n while(!Movement.setWalkFlagWithConfirm(pos)) {\n pos = pos.translate(-x, -y);\n }\n Time.sleepUntil(() -> !Movement.isDestinationSet(), 1000 * 10);\n })\n .build();\n }",
"public void move(Instruction instruction) {\n\t\tAction action = instruction.getAction();\n\t\t// System.out.println(\"Instruction: \" + action\n\t\t// + \", Current Position: \"\n\t\t// + this.getCurrentPosition().toString());\n\t\tif (action.equals(Action.I) || action.equals(Action.D)) {\n\t\t\thip.turnDependOnAction(action);\n\t\t} else if (action.equals(Action.A)) {\n\t\t\tif (!isAnExaminedPosition()) {\n\t\t\t\tnotificarSensores();\n\t\t\t}\n\t\t\tmotor.walk();\n\t\t}\n\t}",
"public boolean BeginMoveToXY(int xDestination, int yDestination) {\n\t\tif (command == Command.FollowWaiter) {\n\t\t\tthis.xDestination = xDestination;\n\t\t\tthis.yDestination = yDestination;\n\t\t\tcommand = Command.GoToSeat;\n\t\t\trestPanel.customerSeatOpen[(yWaiting - 50)/30] = true;\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"public void walkToPoint(Point destination) {\n\n\t\tACTION attemptedMove;\n\n\t\tif (coordX != destination.x && coordY != destination.y) {\n\t\t\tSystem.out.println(\"X- \" + coordX + \" Y- \" + coordY);\n\t\t\tSystem.out.println(\"pX- \" + destination.x + \" pY- \" + destination.y);\n\t\t\tthrow new IllegalArgumentException(\"Illegal coordinate. Only move in one direction at a time\");\n\t\t}\n\t\tif (coordX < destination.x) {\n\t\t\tattemptedMove = ACTION.RIGHT;\n\t\t} else if (coordX > destination.x) {\n\t\t\tattemptedMove = ACTION.LEFT;\n\t\t} else if (coordY < destination.y) {\n\t\t\tattemptedMove = ACTION.DOWN;\n\t\t} else if (coordY > destination.y) {\n\t\t\tattemptedMove = ACTION.UP;\n\t\t} else {\n\t\t\treturn; //In case someone issues a move to nowhere\n\t\t}\n\t\tchangeFacing(attemptedMove);\n\t\taction = attemptedMove;\n\t\tpointWalking = true;\n\t\tendPoint = destination;\n\n\t\tif (validMoveEh(action)) {\n\t\t\tmoving = true;\n\t\t\tremainingSteps = STEP_SIZE;\n\t\t\tthis.updateCoordinate(action, true);\n\t\t\tcurrentImage = startAnimation(attemptedMove);\n\t\t}\n\t}",
"private void move() {\n\t\t\tangle += Math.PI/24;\n\t\n\t\t\tcow.locX = Math.sin(angle) * 2.5 + player.getLocation().getX();\n\t\t\tcow.locZ = Math.cos(angle) * 2.5 + player.getLocation().getZ();\n\t\t\t\n\t\t\tLocation loc = new Location(player.getWorld(), cow.locX, player.getLocation().getY() + 1.5, cow.locZ);\n\t\t\tloc.setDirection(player.getLocation().subtract(loc).toVector()); //Look at the player\n\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, cow.getId(), loc);\n\t\t}",
"public abstract void move(int direction, double speed);",
"public void move() {\r\n\t\tmoveCount++;\r\n\t}",
"private void moveToDestination() throws IOException {\n\t\tfloat x = dataInputStream.readFloat();\n\t\tfloat z = dataInputStream.readFloat();\n\t\t\n\t\tLCD.drawString(\"x: \"+x, 0, onLCDPositionY++);\n\t\tLCD.refresh();\n\t\tLCD.drawString(\"z: \"+z, 0, onLCDPositionY++);\n\t\tLCD.refresh();\n\t\t\n\t\tpose = poseProvider.getPose();\n\t\tPoint destination = new Point(x,z);\n\t\tfloat angle = pose.angleTo(destination);\n\t\t\n\t\t\n\t\tLCD.drawInt((int) pose.getHeading(), 0, onLCDPositionY++);\n\t\t\n\t\t\n\t\tclassPilot.rotate(angle - pose.getHeading());\n\t\tclassPilot.travel(pose.distanceTo(destination));\n\t}",
"public void moveTo (Coordinate c) throws Exception\n\t{\n\t\tcurrentLocation = c;\n\t\tgrid[c.x][c.y] = GridChar.VISITED;\n\t}",
"public void Move()\n {\n \n }",
"@Override\r\n\tpublic void move() {\n\t\tPoint target = strategy.search(this.getLocation(), new Point(0,0));\r\n\r\n\t\tint tries = 0;\r\n\t\t\r\n\t\twhile(!state.equals(\"Inactive\") && !game.movement(this, target.x, target.y)){\r\n\t\t\ttarget = strategy.search(new Point(x,y),playerLocation);\r\n\t\t\ttries++;\r\n\t\t\tif(tries > 4) return; // the search strategy has 4 tries to pick a valid location to move to\r\n\t\t}\r\n\t\t\r\n\t\tx = target.x;\r\n\t\ty = target.y;\r\n\r\n\t\tmoveSprite();\r\n\t}",
"public void addMove() {\n\t\tmove = \"mv \" + posX + \" \" + posY;\n\t}",
"public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\t\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (gr.isValid(next2)) {\n\t\t\tmoveTo(next2);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t}",
"@Override\n\tpublic void move() {\n\t\t\n\t}",
"public void move() {\n process(2);\n }",
"public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tif (gr.isValid(next)) {\n\t\t\tsetDirection(getLocation().getDirectionToward(next));\n\t\t\tmoveTo(next);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t\tFlower flower = new Flower(getColor());\n\t\tflower.putSelfInGrid(gr, loc);\n\t}",
"public Move(int from, int to, int step) {\n this.to = to;\n this.from = from;\n this.step = step;\n }",
"private synchronized void startDrag(Point p) {\n this.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));\n beingDragged = true;\n moveSource = p;\n }",
"private void move() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n int newX = -1;\n int newY = -1;\n switch (direction) {\n case EAST:\n newX = currentPosition.getX() + 1;\n newY = currentPosition.getY();\n break;\n case WEST:\n newX = currentPosition.getX() - 1;\n newY = currentPosition.getY();\n break;\n case NORTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() + 1;\n break;\n case SOUTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() - 1;\n break;\n }\n\n if(newX < lowerBound.getX() || newY < lowerBound.getY()\n || newX > upperBound.getX() || newY > upperBound.getY()) {\n System.out.println(\"Cannot move to \" + direction);\n return;\n }\n\n currentPosition.setX(newX);\n currentPosition.setY(newY);\n }",
"public void move(FightCell cell);",
"@Override\r\n public void run() {\r\n move();\r\n }",
"@Override\n\tpublic void moveCharacter(){\n\t\tif (leftBlocked || rightBlocked) {\n\t\t\txSpeed = 0;\n\t\t}\n\t\t\n\t\t/* Applies gravity if falling */\n\t\tif ( isFalling() && this.getCurrentAnimation().isLastFrame() ) {\n\t\t\tfallingSpeed = fallingSpeed + gravity;\n\t\t\tint newySpeed = fallSpeed + fallingSpeed;\n\t\t\t\n//\t\t\tSystem.out.println(\"newySpeed: \" + newySpeed);\n\t\t\t\n\t\t\tif (newySpeed > maxySpeed) {\n\t\t\t\tnewySpeed = maxySpeed;\n\t\t\t}\n\t\t\tySpeed = newySpeed;\n\t\t\t\n\t\t\t// Applies horizontal speed to the fall\n\t\t\tif ( !isStraightFall() && (!isFallCollided() && !isDeadlyFall()) ) {\n\t\t\t\t\n\t\t\t\tif ( isSafeFall() ) {\n\t\t\t\t\t\n\t\t\t\t\tif (this.getOrientation().equals(\"left\")) {\n\t\t\t\t\t\txFrameOffset = -fallxSpeed;\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.getOrientation().equals(\"right\")) {\n\t\t\t\t\t\txFrameOffset = fallxSpeed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( isRiskyFall() ) {\n\t\t\t\t\t\n\t\t\t\t\tif (this.getOrientation().equals(\"left\")) {\n\t\t\t\t\t\txFrameOffset = -fallxSpeed/2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.getOrientation().equals(\"right\")) {\n\t\t\t\t\t\txFrameOffset = fallxSpeed/2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( isFallCollided() ) {\n\t\t\t\txFrameOffset = 0;\n\t\t\t}\n\t\t}\n\t\telse if ( isGrounded() && !this.getCurrentAnimation().getId().equals(\"stairs\")) {\n\n\t\t\t/* Character is on the ground */\n\t\t\tySpeed = 0;\n\t\t\tyFrameOffset = 0;\n\t\t\tfallingSpeed = 0;\n\t\t}\n\t\t\n\t\t/* Moves the character and its bounding box if he is not at the edge*/\n\t\tif (!this.isBlocked()) {\n\t\t\tsetX(x + xSpeed + xFrameOffset);\n\t\t\tsetY(y + ySpeed + yFrameOffset);\n\t\t\tboundingBox.translate(xSpeed + xFrameOffset, ySpeed + yFrameOffset);\n\t\t}\n\t\t\n\t\t/* Play music */\n\t\tif(!sound.equals(\"\")){\n\t\t\tloader.getSound(sound).play();;\n\t\t}\n\t}",
"@Override\r\n\tpublic void move(char c) {\r\n\t\tswitch(this.state) {\r\n\t\tcase WALK:\r\n\t\t\tif(c == 'a') {\r\n\t\t\t\tthis.speed = -30;\r\n\t\t\t\tthis.dir = directionState.LEFT;\r\n\t\t\t}\r\n\t\t\tif(c == 'd') {\r\n\t\t\t\tthis.speed = 30;\r\n\t\t\t\tthis.dir = directionState.RIGHT;\r\n\t\t\t}\r\n\t\t\tif(c == 'f') {\r\n\t\t\t\tthis.state = slugState.ATTACK;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t}\r\n\t\t\tif(c == 'o') {\r\n\t\t\t\tthis.speed = 0;\r\n\t\t\t\tthis.decrementHitpoints();\r\n\t\t\t\tthis.state = slugState.DAMAGE;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase ATTACK:\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase DAMAGE:\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t}",
"public boolean move();",
"public void moveStart(\n )\n {\n index = StartIndex;\n if(state == null)\n {\n if(parentLevel == null)\n {state = new GraphicsState(this);}\n else\n {state = parentLevel.state.clone(this);}\n }\n else\n {\n if(parentLevel == null)\n {state.initialize();}\n else\n {parentLevel.state.copyTo(state);}\n }\n\n notifyStart();\n\n refresh();\n }",
"public void move() {\r\n\t\tx = x + speed;\r\n\t}",
"public abstract void move(Position position);",
"public void move() {\n if (this.nextMove.equals(\"a\")) { // move down\n this.row = row + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"b\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"b\")) { // move right\n this.col = col + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"c\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"c\")) { // move up\n this.row = row - 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"a\";\n progress = 0;\n }\n }\n }",
"public void move() {\n\t\tthis.move(velocity.x, velocity.y);\n\t}",
"public void move() {\n\t\tif (type.equals(\"Fast\")) {\n\t\t\tspeed = 2;\n\t\t}else if (type.equals(\"Slow\")){\n\t\t\tspeed = 4;\n\t\t}\n\t\t\n\t\tif (rand.nextInt(speed) == 1){\n\t\t\tif (currentLocation.x - ChristopherColumbusLocation.x < 0) {\n\t\t\t\tif (currentLocation.x + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.x++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.x != 0) {\t\t\t\t\n\t\t\t\t\tcurrentLocation.x--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (currentLocation.y - ChristopherColumbusLocation.y < 0) {\n\t\t\t\tif (currentLocation.y + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.y++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.y != 0) {\n\t\t\t\t\tcurrentLocation.y--;\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t}",
"public void move(String command) {\n\t\tif(command==\"F\"){\n\t\t\tmoveForwards();\n\t\t}else if(command==\"T\"){\n\t\t\tturnClockwise();\n\t\t}\n\t}",
"public void setDirectionMove(double direction);",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"fly\");\n\n\t}",
"public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }",
"private void moveMower(final char movement) {\n int nextYPosition = this.getPosition().getPositionY();\n int nextXPosition = this.getPosition().getPositionX();\n switch (this.getPosition().getOrientation()) {\n case N:\n nextYPosition++;\n break;\n case S:\n nextYPosition--;\n break;\n case W:\n nextXPosition--;\n break;\n case E:\n default:\n nextXPosition++;\n break;\n }\n if (garden.isPositionAvailable(nextXPosition, nextYPosition)) {\n logger.debug(\"Moving mower : ({}, {}) -> ({}, {})\",\n this.position.getPositionX(), this.position.getPositionY(),\n nextXPosition, nextYPosition);\n this.getPosition().setPositionX(nextXPosition);\n this.getPosition().setPositionY(nextYPosition);\n } else {\n logger.debug(\"Cannot move mower : ({}, {}) -> ({}, {})\",\n this.position.getPositionX(), this.position.getPositionY(),\n this.position.getPositionX(), this.position.getPositionY());\n }\n }",
"void doneMoving();",
"@NotNull\n void move(Direction direction) {\n this.position.move(direction);\n lookingDirection = direction;\n }",
"@Test\n\tpublic final void testMoveTo() {\n\t\tRoom testRoom = new Room(\"247\", 2, \"Computer Lab\");\n\t\t\n\t\tanimal.moveTo(testForest);\n\t\tassertEquals(\"Move To Forest\", animal.location(), testForest);\n\t\t\n\t\tanimal.moveTo(testRoom);\n\t\tassertEquals(\"Move To Room\", animal.location(), testForest);\t\n\t\t\n\t}",
"public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }"
] | [
"0.6609744",
"0.6565297",
"0.64367324",
"0.6266246",
"0.6204821",
"0.6145887",
"0.6144462",
"0.61431843",
"0.61402917",
"0.6096609",
"0.5991871",
"0.5957105",
"0.5932433",
"0.5920227",
"0.58923304",
"0.58857816",
"0.5884283",
"0.58714306",
"0.5844598",
"0.5814474",
"0.58076763",
"0.5777683",
"0.57606816",
"0.57606816",
"0.57319635",
"0.5721302",
"0.5711323",
"0.56888944",
"0.5674328",
"0.56653243",
"0.56628513",
"0.5659105",
"0.5658528",
"0.5657783",
"0.565297",
"0.5637871",
"0.5625509",
"0.5604453",
"0.55880225",
"0.5566734",
"0.5558922",
"0.5554259",
"0.55527246",
"0.55467135",
"0.5539083",
"0.55385303",
"0.55254585",
"0.5523662",
"0.5522879",
"0.55175275",
"0.54997134",
"0.54734397",
"0.547278",
"0.5462642",
"0.54608274",
"0.5449124",
"0.54425293",
"0.544222",
"0.5436716",
"0.5435208",
"0.5431845",
"0.54295224",
"0.5419865",
"0.54154164",
"0.541185",
"0.5410846",
"0.54076207",
"0.5406765",
"0.5400032",
"0.53902316",
"0.5387609",
"0.5386247",
"0.5384284",
"0.53829354",
"0.5375447",
"0.5371562",
"0.53672045",
"0.5364482",
"0.53634316",
"0.53584725",
"0.5352813",
"0.53400874",
"0.53360856",
"0.53351516",
"0.533186",
"0.5330509",
"0.5328755",
"0.53187746",
"0.531851",
"0.53161573",
"0.53132004",
"0.5308132",
"0.5302985",
"0.5302052",
"0.53020227",
"0.5300386",
"0.52996063",
"0.5299022",
"0.5298862",
"0.52927285",
"0.52915287"
] | 0.0 | -1 |
Starts moving the character to specified destination. | @Override
public void startMove(Location destination, Callable<Boolean> movementCompleted, Consumer<Method> movementFailed, ENaviType naviType, boolean moveStraight) {
cancelMoveTask();
if (destination == null || !destination.isValid()) {
onMovementComplete();
return;
}
synchronized (_mutex) {
_movementCompleted = movementCompleted;
_movementFailed = movementFailed;
}
getOwner().getAi().setFindPathCompleted(false);
_waypoints.add(destination);
_movementTick = System.currentTimeMillis();
_navigationType = naviType;
if (_movementTask == null || _movementTask.isDone()) {
_movementTask = ThreadPool.getInstance().scheduleAiAtFixedRate(this, 0, 150, TimeUnit.MILLISECONDS);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void move( char direction );",
"public void move(String direction);",
"public void move(String direction) {\n \n }",
"public void startMoving ()\n {\n if (canMove()) {\n ((Mobile)_actor).setDirection(_actor.getRotation());\n _actor.set(Mobile.MOVING);\n }\n }",
"public void startMovingToTarget() \r\n {\n movingToTarget = true;\r\n }",
"void startMovement();",
"public char makeMove(Coordinate move);",
"void moveToStart();",
"public void move() {\n float diffX = cDestination.getX() - getCenterX();\n float diffY = cDestination.getY() - getCenterY();\n\n float newX = cPosition.getX() + cSpeed * Math.signum(diffX);\n float newY = cPosition.getY() + cSpeed * Math.signum(diffY);\n\n cPosition.setX(newX);\n cPosition.setY(newY);\n }",
"public void move(String direction) {\n\tpreviousMove = direction;\n\tout.println(\"MOVE \" + direction);\n}",
"public void goTo(int destination) {\n\t\tdistance=1;\r\n\t\tif(destination == Constants.TO_BACKWARD_CENTER || destination == Constants.TO_BACK)\r\n\t\t{\r\n\t\t\tMove(-Constants.speed);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tMove(Constants.speed);\r\n\t\t}\r\n\t\tApplicationInfo.Destination=destination;\r\n\t\tthread=new DrawThread(glview);\r\n\t\tthread.setRenderingCount(destination, mApplications.get(CurIndex).getZ(),Constants.speed,distance);\r\n\t\tThreadList.add(thread);\r\n\t\tthread.start();\r\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This animal moves forward\");\r\n\t}",
"@Override\r\n\tpublic void move(String from, String to) {\n\t\t\r\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This Tiger moves forward\");\r\n\t}",
"protected void moveToDestination(){\n\t\tqueue.clear();\n\t\twhile (destination[0] < 0){\n\t\t\tqueue.add(\"MOVE S\");\n\t\t\tdestination[0] += 1;\n\t\t}\n\t\twhile (destination[0] > 0){\n\t\t\tqueue.add(\"MOVE N\");\n\t\t\tdestination[0] -= 1;\n\t\t}\n\t\twhile (destination[1] < 0){\n\t\t\tqueue.add(\"MOVE E\");\n\t\t\tdestination[1] += 1;\n\t\t}\n\t\twhile (destination[1] > 0){\n\t\t\tqueue.add(\"MOVE W\");\n\t\t\tdestination[1] -= 1;\n\t\t}\n\t\tdestination = null;\n\t}",
"protected void move()\n {\n // Find a location to move to.\n Debug.print(\"Fish \" + toString() + \" attempting to move. \");\n Location nextLoc = nextLocation();\n\n // If the next location is different, move there.\n if ( ! nextLoc.equals(location()) )\n {\n // Move to new location.\n Location oldLoc = location();\n changeLocation(nextLoc);\n\n // Update direction in case fish had to turn to move.\n Direction newDir = environment().getDirection(oldLoc, nextLoc);\n changeDirection(newDir);\n Debug.println(\" Moves to \" + location() + direction());\n }\n else\n Debug.println(\" Does not move.\");\n }",
"public void move(int distance);",
"public void move(Vector start,Vector dist);",
"@Override\n public void start() {\n this.mob.getNavigation().startMovingTo(\n this.mob.getPositionTarget().getX(),\n this.mob.getPositionTarget().getY(),\n this.mob.getPositionTarget().getZ(),\n this.speed\n );\n }",
"@Override\n public void startExecuting()\n {\n this.entity.getNavigator().tryMoveToXYZ(this.xPosition, this.yPosition, this.zPosition, this.speed);\n }",
"public void move(){\n\t\t\n\t}",
"public void moveCharacter(AStarCharacter character, int destGridX, int destGridY)\r\n\t{\r\n\t\t// make sure we're not moving the current user's character again\r\n\t\tif(!character.getUsername().equals(basicAvatarData.getUsername()))\r\n\t\t{\r\n\t\t\ttheGridView.moveCharacterInRoom(character, destGridX, destGridY);\r\n\t\t}\r\n\t}",
"public void move();",
"public void move();",
"public void toMoving() {\n notifyStartMoving(this.getCurrentTurn().getCurrentPlayer().getNickname());\n if (getCurrentTurn().getCurrentPlayer().isHasSpecialMove()) {\n notifyAskForEffect(currentTurn.getCurrentPlayer().getNickname());\n } else {\n notifyChooseWorker(this.getCurrentTurn().getCurrentPlayer().getNickname(), board);\n }\n }",
"public void move() {\n\r\n\t}",
"public void move() {\n\t\tthis.hero.setPF(1);\n\t\tthis.hero.setState(this.hero.getMoved());\n\t}",
"public void move_to_gantry() {\n\t\tstop_moving();\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmove(gpX, gpY, gpZ);\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This Goose moves forward\");\r\n\t}",
"void move(String direction) {\n \tif (direction.equals(\"A\")) { \n \t\tsetXCoord(getXCoord()-getHSpeed());\n \t} else if (direction.equals(\"D\")) {\n \t\tsetXCoord(getXCoord()+getHSpeed());\n \t}\n }",
"public void playMove(String from, String to, String arrow) {\n\t\tg_board.doMove(from, to, arrow);\n\t}",
"public void move(){\n System.out.println(\"I can't move...\");\n }",
"public void move(Pawn pawn, Point destination) {\n\t\tPoint lastLocation = pawn.getLocation();\r\n\t\tboard[lastLocation.x][lastLocation.y].setEmpty();\r\n\t\tboard[destination.x][destination.y].setTaken();\r\n\t\tpawn.setLocation(destination);\r\n\t\tpawn.setLastLocation(lastLocation);\r\n\t\t\r\n\t\tif(isNeighbor(lastLocation, destination)) {\r\n\t\t\tpawn.setAfterStep();\r\n\t\t}\r\n\t\t\r\n\t\tif(board[destination.x][destination.y].getFieldType().equals(pawn.getTarget())) {\r\n\t\t\tpawn.setInTarget();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"Driving a airplane!\");\n\t}",
"public void move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}",
"public void move()\n {\n move(WALKING_SPEED);\n }",
"public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }",
"private static void moveToAttack(MapLocation destination) throws GameActionException {\n BulletInfo[] bullets = rc.senseNearbyBullets();\n RobotInfo[] enemies = rc.senseNearbyRobots(-1, them);\n\n if (enemies.length != 0) {\n int index = priority(enemies);\n if (index != -1) {\n target = enemies[priority(enemies)];\n attack(target);\n }\n }\n else {\n move(bullets, enemies, destination);\n }\n }",
"public void move() {\n\t\tthis.position.stepForwad();\n\t\tthis.position.spin();\n\t}",
"@Override\n\tpublic void excute() {\n\t\tmoveEvent.move(commandinfo.getValue() * 200);\n\t}",
"public void moveToDestination(Move move) {\r\n\t\tx = move.getToX();\r\n\t\ty = move.getToY();\r\n\r\n\t}",
"public void move() {\n\n }",
"void move() throws IOException, InterruptedException{\r\n \r\n // if current position and velocity are greater than 0 and less than the right edge of the screen\r\n if (x + xa > 0 && x + xa < 1280-w){\r\n // increase the character position by velocity\r\n x = x + xa;\r\n }\r\n \r\n // if current height and velocity are greater than zero and less than the floor of the game\r\n if (y + ya > 0 && y + ya < 500){\r\n // if jumping up\r\n if (y > 300){\r\n y = y + ya;\r\n } else{ // if falling down, increase velocity to 3\r\n ya = 3;\r\n y = y + ya;\r\n }\r\n }\r\n \r\n // if a collision is detected increase life counter\r\n if (game.collision()){\r\n // increase life counter\r\n count++;\r\n // call game over to load next image or to close game\r\n game.gameOver(count);\r\n } \r\n }",
"@Override\n public void move()\n {\n System.out.println(\"tightrope walking\");\n }",
"void move();",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"하늘을 날다\");\n\t}",
"void makeMove(Location loc);",
"void moving() {\n\t\tSystem.out.println(\"Moving the car\");\r\n\t}",
"public void goToStart() {\n\t\tsetPosition(0);\n\t}",
"public void move() { \n\t\tSystem.out.println(\"MOVING\");\n\t\tswitch(direction) {\n\t\t\tcase NORTH: {\n\t\t\t\tyloc -= ySpeed;\n\t\t\t}\n\t\t\tcase SOUTH: {\n\t\t\t\tyloc+= xSpeed;\n\t\t\t}\n\t\t\tcase EAST: {\n\t\t\t\txloc+= xSpeed;\n\t\t\t}\n\t\t\tcase WEST: {\n\t\t\t\txloc-= xSpeed;\n\t\t\t}\n\t\t\tcase NORTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase NORTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc+=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc+= ySpeed;\n\t\t\t}\n\t\t}\n\t}",
"boolean moveCharacter(Player player, Location.Direction direction) {\n Location currentLocation = player.getLocation();\r\n //check to see if move is possible\r\n Location destination = currentLocation.compass(direction);\r\n if (destination != null)\r\n {\r\n currentLocation.exit(player);\r\n destination.enter(player);\r\n return true;\r\n }\r\n else{\r\n return false;\r\n } \r\n }",
"@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}",
"public void move() throws InstructionExecutionException\r\n\t{\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tStreet street=this.getHeadingStreet();\r\n\t\t\tif(street==null){\r\n\t\t\t\tString err=\"WALL·E says: There is no street in direction \"+this.getCurrentHeading();\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, err);\r\n\t\t\t\t}\r\n\t\t\t\tthrow new InstructionExecutionException(err);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tPlace nextPlace=street.nextPlace(this.currentPlace);\r\n\t\t\tif (street.isOpen()){\r\n\t\t\t\tthis.currentPlace=nextPlace;\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tthis.navigationPanel.updateCell(currentDirection, nextPlace);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tString err=\"WALL·E says: Arrggg, there is a street but it is closed!\";\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, err);\r\n\t\t\t\t}\r\n\t\t\t\tthrow new InstructionExecutionException(err);\r\n\t\t\t}\r\n\t\t}catch (Exception e){\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public void movePiece(Coordinate from, Coordinate to);",
"public DCursorMove() {\n super(COMMAND);\n }",
"public boolean moveUnit(Position from, Position to);",
"public void move(){\n x+=xDirection;\n y+=yDirection;\n }",
"@Override\n public void movement() {\n if (isAlive()) {\n //Prüfung ob A oder die linke Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_LEFT) || Keyboard.isKeyDown(KeyEvent.VK_A)) {\n //Änder die X Position um den speed wert nach link (verkleinert sie)\n setPosX(getPosX() - getSpeed());\n //Prüft ob der Spieler den linken Rand des Fensters erreicht hat\n if (getPosX() <= 0) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(0);\n }\n }\n //Prüfung ob D oder die rechte Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT) || Keyboard.isKeyDown(KeyEvent.VK_D)) {\n //Änder die X Position um den speed wert nach rechts (vergrößert sie)\n setPosX(getPosX() + getSpeed());\n //Prüft ob der Spieler den rechten Rand des Fensters erreicht hat\n if (getPosX() >= Renderer.getWindowSizeX() - getWight() - 7) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(Renderer.getWindowSizeX() - getWight() - 7);\n }\n }\n //Aktualsiert die Hitbox\n setBounds();\n }\n }",
"public void act() \r\n {\r\n move();\r\n }",
"public void move(int delta);",
"void makeMove(char c0, char r0, char c1, char r1) {\n makeMove(Move.move(c0, r0, c1, r1, null));\n }",
"public void move() {\n spriteBase.move();\n\n Double newX = spriteBase.getXCoordinate() + spriteBase.getDxCoordinate();\n Double newY = spriteBase.getYCoordinate() + spriteBase.getDyCoordinate();\n\n if (!newX.equals(spriteBase.getXCoordinate())\n || !newY.equals(spriteBase.getYCoordinate())) {\n Logger.log(String.format(\"Monster moved from (%f, %f) to (%f, %f)\",\n spriteBase.getXCoordinate(), spriteBase.getYCoordinate(), newX, newY));\n }\n }",
"private static Activity moveInDirection(int x, int y) {\n return Activity.newBuilder()\n .addSubActivity(() -> {\n Position pos = Players.getLocal().getPosition();\n while(pos.isPositionWalkable()) {\n pos = pos.translate(x, y);\n }\n pos = pos.translate(-x, -y);\n while(!Movement.setWalkFlagWithConfirm(pos)) {\n pos = pos.translate(-x, -y);\n }\n Time.sleepUntil(() -> !Movement.isDestinationSet(), 1000 * 10);\n })\n .build();\n }",
"public void move(Instruction instruction) {\n\t\tAction action = instruction.getAction();\n\t\t// System.out.println(\"Instruction: \" + action\n\t\t// + \", Current Position: \"\n\t\t// + this.getCurrentPosition().toString());\n\t\tif (action.equals(Action.I) || action.equals(Action.D)) {\n\t\t\thip.turnDependOnAction(action);\n\t\t} else if (action.equals(Action.A)) {\n\t\t\tif (!isAnExaminedPosition()) {\n\t\t\t\tnotificarSensores();\n\t\t\t}\n\t\t\tmotor.walk();\n\t\t}\n\t}",
"public void walkToPoint(Point destination) {\n\n\t\tACTION attemptedMove;\n\n\t\tif (coordX != destination.x && coordY != destination.y) {\n\t\t\tSystem.out.println(\"X- \" + coordX + \" Y- \" + coordY);\n\t\t\tSystem.out.println(\"pX- \" + destination.x + \" pY- \" + destination.y);\n\t\t\tthrow new IllegalArgumentException(\"Illegal coordinate. Only move in one direction at a time\");\n\t\t}\n\t\tif (coordX < destination.x) {\n\t\t\tattemptedMove = ACTION.RIGHT;\n\t\t} else if (coordX > destination.x) {\n\t\t\tattemptedMove = ACTION.LEFT;\n\t\t} else if (coordY < destination.y) {\n\t\t\tattemptedMove = ACTION.DOWN;\n\t\t} else if (coordY > destination.y) {\n\t\t\tattemptedMove = ACTION.UP;\n\t\t} else {\n\t\t\treturn; //In case someone issues a move to nowhere\n\t\t}\n\t\tchangeFacing(attemptedMove);\n\t\taction = attemptedMove;\n\t\tpointWalking = true;\n\t\tendPoint = destination;\n\n\t\tif (validMoveEh(action)) {\n\t\t\tmoving = true;\n\t\t\tremainingSteps = STEP_SIZE;\n\t\t\tthis.updateCoordinate(action, true);\n\t\t\tcurrentImage = startAnimation(attemptedMove);\n\t\t}\n\t}",
"public boolean BeginMoveToXY(int xDestination, int yDestination) {\n\t\tif (command == Command.FollowWaiter) {\n\t\t\tthis.xDestination = xDestination;\n\t\t\tthis.yDestination = yDestination;\n\t\t\tcommand = Command.GoToSeat;\n\t\t\trestPanel.customerSeatOpen[(yWaiting - 50)/30] = true;\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"private void move() {\n\t\t\tangle += Math.PI/24;\n\t\n\t\t\tcow.locX = Math.sin(angle) * 2.5 + player.getLocation().getX();\n\t\t\tcow.locZ = Math.cos(angle) * 2.5 + player.getLocation().getZ();\n\t\t\t\n\t\t\tLocation loc = new Location(player.getWorld(), cow.locX, player.getLocation().getY() + 1.5, cow.locZ);\n\t\t\tloc.setDirection(player.getLocation().subtract(loc).toVector()); //Look at the player\n\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, cow.getId(), loc);\n\t\t}",
"public abstract void move(int direction, double speed);",
"public void move() {\r\n\t\tmoveCount++;\r\n\t}",
"private void moveToDestination() throws IOException {\n\t\tfloat x = dataInputStream.readFloat();\n\t\tfloat z = dataInputStream.readFloat();\n\t\t\n\t\tLCD.drawString(\"x: \"+x, 0, onLCDPositionY++);\n\t\tLCD.refresh();\n\t\tLCD.drawString(\"z: \"+z, 0, onLCDPositionY++);\n\t\tLCD.refresh();\n\t\t\n\t\tpose = poseProvider.getPose();\n\t\tPoint destination = new Point(x,z);\n\t\tfloat angle = pose.angleTo(destination);\n\t\t\n\t\t\n\t\tLCD.drawInt((int) pose.getHeading(), 0, onLCDPositionY++);\n\t\t\n\t\t\n\t\tclassPilot.rotate(angle - pose.getHeading());\n\t\tclassPilot.travel(pose.distanceTo(destination));\n\t}",
"public void Move()\n {\n \n }",
"public void moveTo (Coordinate c) throws Exception\n\t{\n\t\tcurrentLocation = c;\n\t\tgrid[c.x][c.y] = GridChar.VISITED;\n\t}",
"@Override\r\n\tpublic void move() {\n\t\tPoint target = strategy.search(this.getLocation(), new Point(0,0));\r\n\r\n\t\tint tries = 0;\r\n\t\t\r\n\t\twhile(!state.equals(\"Inactive\") && !game.movement(this, target.x, target.y)){\r\n\t\t\ttarget = strategy.search(new Point(x,y),playerLocation);\r\n\t\t\ttries++;\r\n\t\t\tif(tries > 4) return; // the search strategy has 4 tries to pick a valid location to move to\r\n\t\t}\r\n\t\t\r\n\t\tx = target.x;\r\n\t\ty = target.y;\r\n\r\n\t\tmoveSprite();\r\n\t}",
"public void addMove() {\n\t\tmove = \"mv \" + posX + \" \" + posY;\n\t}",
"public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\t\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (gr.isValid(next2)) {\n\t\t\tmoveTo(next2);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t}",
"@Override\n\tpublic void move() {\n\t\t\n\t}",
"public void move() {\n process(2);\n }",
"public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tif (gr.isValid(next)) {\n\t\t\tsetDirection(getLocation().getDirectionToward(next));\n\t\t\tmoveTo(next);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t\tFlower flower = new Flower(getColor());\n\t\tflower.putSelfInGrid(gr, loc);\n\t}",
"public Move(int from, int to, int step) {\n this.to = to;\n this.from = from;\n this.step = step;\n }",
"private synchronized void startDrag(Point p) {\n this.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));\n beingDragged = true;\n moveSource = p;\n }",
"private void move() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n int newX = -1;\n int newY = -1;\n switch (direction) {\n case EAST:\n newX = currentPosition.getX() + 1;\n newY = currentPosition.getY();\n break;\n case WEST:\n newX = currentPosition.getX() - 1;\n newY = currentPosition.getY();\n break;\n case NORTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() + 1;\n break;\n case SOUTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() - 1;\n break;\n }\n\n if(newX < lowerBound.getX() || newY < lowerBound.getY()\n || newX > upperBound.getX() || newY > upperBound.getY()) {\n System.out.println(\"Cannot move to \" + direction);\n return;\n }\n\n currentPosition.setX(newX);\n currentPosition.setY(newY);\n }",
"public void move(FightCell cell);",
"@Override\r\n public void run() {\r\n move();\r\n }",
"@Override\n\tpublic void moveCharacter(){\n\t\tif (leftBlocked || rightBlocked) {\n\t\t\txSpeed = 0;\n\t\t}\n\t\t\n\t\t/* Applies gravity if falling */\n\t\tif ( isFalling() && this.getCurrentAnimation().isLastFrame() ) {\n\t\t\tfallingSpeed = fallingSpeed + gravity;\n\t\t\tint newySpeed = fallSpeed + fallingSpeed;\n\t\t\t\n//\t\t\tSystem.out.println(\"newySpeed: \" + newySpeed);\n\t\t\t\n\t\t\tif (newySpeed > maxySpeed) {\n\t\t\t\tnewySpeed = maxySpeed;\n\t\t\t}\n\t\t\tySpeed = newySpeed;\n\t\t\t\n\t\t\t// Applies horizontal speed to the fall\n\t\t\tif ( !isStraightFall() && (!isFallCollided() && !isDeadlyFall()) ) {\n\t\t\t\t\n\t\t\t\tif ( isSafeFall() ) {\n\t\t\t\t\t\n\t\t\t\t\tif (this.getOrientation().equals(\"left\")) {\n\t\t\t\t\t\txFrameOffset = -fallxSpeed;\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.getOrientation().equals(\"right\")) {\n\t\t\t\t\t\txFrameOffset = fallxSpeed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( isRiskyFall() ) {\n\t\t\t\t\t\n\t\t\t\t\tif (this.getOrientation().equals(\"left\")) {\n\t\t\t\t\t\txFrameOffset = -fallxSpeed/2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.getOrientation().equals(\"right\")) {\n\t\t\t\t\t\txFrameOffset = fallxSpeed/2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( isFallCollided() ) {\n\t\t\t\txFrameOffset = 0;\n\t\t\t}\n\t\t}\n\t\telse if ( isGrounded() && !this.getCurrentAnimation().getId().equals(\"stairs\")) {\n\n\t\t\t/* Character is on the ground */\n\t\t\tySpeed = 0;\n\t\t\tyFrameOffset = 0;\n\t\t\tfallingSpeed = 0;\n\t\t}\n\t\t\n\t\t/* Moves the character and its bounding box if he is not at the edge*/\n\t\tif (!this.isBlocked()) {\n\t\t\tsetX(x + xSpeed + xFrameOffset);\n\t\t\tsetY(y + ySpeed + yFrameOffset);\n\t\t\tboundingBox.translate(xSpeed + xFrameOffset, ySpeed + yFrameOffset);\n\t\t}\n\t\t\n\t\t/* Play music */\n\t\tif(!sound.equals(\"\")){\n\t\t\tloader.getSound(sound).play();;\n\t\t}\n\t}",
"public boolean move();",
"@Override\r\n\tpublic void move(char c) {\r\n\t\tswitch(this.state) {\r\n\t\tcase WALK:\r\n\t\t\tif(c == 'a') {\r\n\t\t\t\tthis.speed = -30;\r\n\t\t\t\tthis.dir = directionState.LEFT;\r\n\t\t\t}\r\n\t\t\tif(c == 'd') {\r\n\t\t\t\tthis.speed = 30;\r\n\t\t\t\tthis.dir = directionState.RIGHT;\r\n\t\t\t}\r\n\t\t\tif(c == 'f') {\r\n\t\t\t\tthis.state = slugState.ATTACK;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t}\r\n\t\t\tif(c == 'o') {\r\n\t\t\t\tthis.speed = 0;\r\n\t\t\t\tthis.decrementHitpoints();\r\n\t\t\t\tthis.state = slugState.DAMAGE;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase ATTACK:\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase DAMAGE:\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t}",
"public void moveStart(\n )\n {\n index = StartIndex;\n if(state == null)\n {\n if(parentLevel == null)\n {state = new GraphicsState(this);}\n else\n {state = parentLevel.state.clone(this);}\n }\n else\n {\n if(parentLevel == null)\n {state.initialize();}\n else\n {parentLevel.state.copyTo(state);}\n }\n\n notifyStart();\n\n refresh();\n }",
"public void move() {\r\n\t\tx = x + speed;\r\n\t}",
"public abstract void move(Position position);",
"public void move() {\n if (this.nextMove.equals(\"a\")) { // move down\n this.row = row + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"b\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"b\")) { // move right\n this.col = col + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"c\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"c\")) { // move up\n this.row = row - 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"a\";\n progress = 0;\n }\n }\n }",
"public void move() {\n\t\tthis.move(velocity.x, velocity.y);\n\t}",
"public void move() {\n\t\tif (type.equals(\"Fast\")) {\n\t\t\tspeed = 2;\n\t\t}else if (type.equals(\"Slow\")){\n\t\t\tspeed = 4;\n\t\t}\n\t\t\n\t\tif (rand.nextInt(speed) == 1){\n\t\t\tif (currentLocation.x - ChristopherColumbusLocation.x < 0) {\n\t\t\t\tif (currentLocation.x + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.x++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.x != 0) {\t\t\t\t\n\t\t\t\t\tcurrentLocation.x--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (currentLocation.y - ChristopherColumbusLocation.y < 0) {\n\t\t\t\tif (currentLocation.y + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.y++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.y != 0) {\n\t\t\t\t\tcurrentLocation.y--;\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t}",
"public void move(String command) {\n\t\tif(command==\"F\"){\n\t\t\tmoveForwards();\n\t\t}else if(command==\"T\"){\n\t\t\tturnClockwise();\n\t\t}\n\t}",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"fly\");\n\n\t}",
"public void setDirectionMove(double direction);",
"void doneMoving();",
"public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }",
"@NotNull\n void move(Direction direction) {\n this.position.move(direction);\n lookingDirection = direction;\n }",
"private void moveMower(final char movement) {\n int nextYPosition = this.getPosition().getPositionY();\n int nextXPosition = this.getPosition().getPositionX();\n switch (this.getPosition().getOrientation()) {\n case N:\n nextYPosition++;\n break;\n case S:\n nextYPosition--;\n break;\n case W:\n nextXPosition--;\n break;\n case E:\n default:\n nextXPosition++;\n break;\n }\n if (garden.isPositionAvailable(nextXPosition, nextYPosition)) {\n logger.debug(\"Moving mower : ({}, {}) -> ({}, {})\",\n this.position.getPositionX(), this.position.getPositionY(),\n nextXPosition, nextYPosition);\n this.getPosition().setPositionX(nextXPosition);\n this.getPosition().setPositionY(nextYPosition);\n } else {\n logger.debug(\"Cannot move mower : ({}, {}) -> ({}, {})\",\n this.position.getPositionX(), this.position.getPositionY(),\n this.position.getPositionX(), this.position.getPositionY());\n }\n }",
"@Test\n\tpublic final void testMoveTo() {\n\t\tRoom testRoom = new Room(\"247\", 2, \"Computer Lab\");\n\t\t\n\t\tanimal.moveTo(testForest);\n\t\tassertEquals(\"Move To Forest\", animal.location(), testForest);\n\t\t\n\t\tanimal.moveTo(testRoom);\n\t\tassertEquals(\"Move To Room\", animal.location(), testForest);\t\n\t\t\n\t}",
"public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }"
] | [
"0.6610274",
"0.6567127",
"0.643831",
"0.6267136",
"0.6206476",
"0.61468875",
"0.6145195",
"0.6143968",
"0.6142812",
"0.60981166",
"0.5993006",
"0.59591544",
"0.5935157",
"0.5922302",
"0.5895253",
"0.5888659",
"0.588658",
"0.5874023",
"0.5845852",
"0.5815178",
"0.58103454",
"0.5778003",
"0.5763572",
"0.5763572",
"0.5734139",
"0.5723739",
"0.571371",
"0.569065",
"0.56767905",
"0.5666573",
"0.56645393",
"0.5660917",
"0.5660746",
"0.5660007",
"0.565515",
"0.5640835",
"0.56273794",
"0.56069267",
"0.558932",
"0.55680287",
"0.55627286",
"0.55550915",
"0.55546576",
"0.55489343",
"0.5542021",
"0.55405796",
"0.552774",
"0.5524449",
"0.5523609",
"0.55200565",
"0.55007374",
"0.5475614",
"0.5474695",
"0.5465282",
"0.54611033",
"0.54511845",
"0.5444492",
"0.544346",
"0.54384696",
"0.54371613",
"0.54320484",
"0.54319525",
"0.54213",
"0.54169446",
"0.5413316",
"0.5412129",
"0.5409316",
"0.54086536",
"0.54025704",
"0.5391251",
"0.538848",
"0.5387638",
"0.5386543",
"0.53843766",
"0.53779715",
"0.53739953",
"0.5369866",
"0.5366446",
"0.53660107",
"0.5358829",
"0.5354863",
"0.53420055",
"0.53378016",
"0.5334781",
"0.5333355",
"0.5332111",
"0.53286934",
"0.5320702",
"0.5320499",
"0.53178424",
"0.5315207",
"0.530971",
"0.5303932",
"0.53036433",
"0.5303169",
"0.530236",
"0.5302334",
"0.5300425",
"0.53003716",
"0.5294934",
"0.5293647"
] | 0.0 | -1 |
Starts moving the character to specified destination. | @Override
public void startFollow(Creature target, Callable<Boolean> onEnd, Consumer<Method> onExit, ENaviType naviType) {
cancelMoveTask();
if (!target.getLocation().isValid()) {
onMovementComplete();
return;
}
synchronized (_mutex) {
_movementCompleted = onEnd;
_movementFailed = onExit;
}
getOwner().getAi().setFindPathCompleted(false);
_followTarget = target;
_destinationLocation = new Location(_followTarget.getLocation());
_isSectorActive = true;
_movementTick = System.currentTimeMillis();
_navigationType = naviType;
if (_movementTask == null || _movementTask.isDone()) {
notifySector(true);
_movementTask = ThreadPool.getInstance().scheduleAiAtFixedRate(this, 150, 150, TimeUnit.MILLISECONDS);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void move( char direction );",
"public void move(String direction);",
"public void move(String direction) {\n \n }",
"public void startMoving ()\n {\n if (canMove()) {\n ((Mobile)_actor).setDirection(_actor.getRotation());\n _actor.set(Mobile.MOVING);\n }\n }",
"public void startMovingToTarget() \r\n {\n movingToTarget = true;\r\n }",
"void startMovement();",
"public char makeMove(Coordinate move);",
"void moveToStart();",
"public void move() {\n float diffX = cDestination.getX() - getCenterX();\n float diffY = cDestination.getY() - getCenterY();\n\n float newX = cPosition.getX() + cSpeed * Math.signum(diffX);\n float newY = cPosition.getY() + cSpeed * Math.signum(diffY);\n\n cPosition.setX(newX);\n cPosition.setY(newY);\n }",
"public void move(String direction) {\n\tpreviousMove = direction;\n\tout.println(\"MOVE \" + direction);\n}",
"public void goTo(int destination) {\n\t\tdistance=1;\r\n\t\tif(destination == Constants.TO_BACKWARD_CENTER || destination == Constants.TO_BACK)\r\n\t\t{\r\n\t\t\tMove(-Constants.speed);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tMove(Constants.speed);\r\n\t\t}\r\n\t\tApplicationInfo.Destination=destination;\r\n\t\tthread=new DrawThread(glview);\r\n\t\tthread.setRenderingCount(destination, mApplications.get(CurIndex).getZ(),Constants.speed,distance);\r\n\t\tThreadList.add(thread);\r\n\t\tthread.start();\r\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This animal moves forward\");\r\n\t}",
"@Override\r\n\tpublic void move(String from, String to) {\n\t\t\r\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This Tiger moves forward\");\r\n\t}",
"protected void moveToDestination(){\n\t\tqueue.clear();\n\t\twhile (destination[0] < 0){\n\t\t\tqueue.add(\"MOVE S\");\n\t\t\tdestination[0] += 1;\n\t\t}\n\t\twhile (destination[0] > 0){\n\t\t\tqueue.add(\"MOVE N\");\n\t\t\tdestination[0] -= 1;\n\t\t}\n\t\twhile (destination[1] < 0){\n\t\t\tqueue.add(\"MOVE E\");\n\t\t\tdestination[1] += 1;\n\t\t}\n\t\twhile (destination[1] > 0){\n\t\t\tqueue.add(\"MOVE W\");\n\t\t\tdestination[1] -= 1;\n\t\t}\n\t\tdestination = null;\n\t}",
"protected void move()\n {\n // Find a location to move to.\n Debug.print(\"Fish \" + toString() + \" attempting to move. \");\n Location nextLoc = nextLocation();\n\n // If the next location is different, move there.\n if ( ! nextLoc.equals(location()) )\n {\n // Move to new location.\n Location oldLoc = location();\n changeLocation(nextLoc);\n\n // Update direction in case fish had to turn to move.\n Direction newDir = environment().getDirection(oldLoc, nextLoc);\n changeDirection(newDir);\n Debug.println(\" Moves to \" + location() + direction());\n }\n else\n Debug.println(\" Does not move.\");\n }",
"public void move(int distance);",
"public void move(Vector start,Vector dist);",
"@Override\n public void start() {\n this.mob.getNavigation().startMovingTo(\n this.mob.getPositionTarget().getX(),\n this.mob.getPositionTarget().getY(),\n this.mob.getPositionTarget().getZ(),\n this.speed\n );\n }",
"@Override\n public void startExecuting()\n {\n this.entity.getNavigator().tryMoveToXYZ(this.xPosition, this.yPosition, this.zPosition, this.speed);\n }",
"public void move(){\n\t\t\n\t}",
"public void moveCharacter(AStarCharacter character, int destGridX, int destGridY)\r\n\t{\r\n\t\t// make sure we're not moving the current user's character again\r\n\t\tif(!character.getUsername().equals(basicAvatarData.getUsername()))\r\n\t\t{\r\n\t\t\ttheGridView.moveCharacterInRoom(character, destGridX, destGridY);\r\n\t\t}\r\n\t}",
"public void move();",
"public void move();",
"public void toMoving() {\n notifyStartMoving(this.getCurrentTurn().getCurrentPlayer().getNickname());\n if (getCurrentTurn().getCurrentPlayer().isHasSpecialMove()) {\n notifyAskForEffect(currentTurn.getCurrentPlayer().getNickname());\n } else {\n notifyChooseWorker(this.getCurrentTurn().getCurrentPlayer().getNickname(), board);\n }\n }",
"public void move() {\n\r\n\t}",
"public void move() {\n\t\tthis.hero.setPF(1);\n\t\tthis.hero.setState(this.hero.getMoved());\n\t}",
"public void move_to_gantry() {\n\t\tstop_moving();\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmove(gpX, gpY, gpZ);\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This Goose moves forward\");\r\n\t}",
"void move(String direction) {\n \tif (direction.equals(\"A\")) { \n \t\tsetXCoord(getXCoord()-getHSpeed());\n \t} else if (direction.equals(\"D\")) {\n \t\tsetXCoord(getXCoord()+getHSpeed());\n \t}\n }",
"public void playMove(String from, String to, String arrow) {\n\t\tg_board.doMove(from, to, arrow);\n\t}",
"public void move(){\n System.out.println(\"I can't move...\");\n }",
"public void move(Pawn pawn, Point destination) {\n\t\tPoint lastLocation = pawn.getLocation();\r\n\t\tboard[lastLocation.x][lastLocation.y].setEmpty();\r\n\t\tboard[destination.x][destination.y].setTaken();\r\n\t\tpawn.setLocation(destination);\r\n\t\tpawn.setLastLocation(lastLocation);\r\n\t\t\r\n\t\tif(isNeighbor(lastLocation, destination)) {\r\n\t\t\tpawn.setAfterStep();\r\n\t\t}\r\n\t\t\r\n\t\tif(board[destination.x][destination.y].getFieldType().equals(pawn.getTarget())) {\r\n\t\t\tpawn.setInTarget();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"Driving a airplane!\");\n\t}",
"public void move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}",
"public void move()\n {\n move(WALKING_SPEED);\n }",
"public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }",
"private static void moveToAttack(MapLocation destination) throws GameActionException {\n BulletInfo[] bullets = rc.senseNearbyBullets();\n RobotInfo[] enemies = rc.senseNearbyRobots(-1, them);\n\n if (enemies.length != 0) {\n int index = priority(enemies);\n if (index != -1) {\n target = enemies[priority(enemies)];\n attack(target);\n }\n }\n else {\n move(bullets, enemies, destination);\n }\n }",
"public void move() {\n\t\tthis.position.stepForwad();\n\t\tthis.position.spin();\n\t}",
"@Override\n\tpublic void excute() {\n\t\tmoveEvent.move(commandinfo.getValue() * 200);\n\t}",
"public void moveToDestination(Move move) {\r\n\t\tx = move.getToX();\r\n\t\ty = move.getToY();\r\n\r\n\t}",
"public void move() {\n\n }",
"void move() throws IOException, InterruptedException{\r\n \r\n // if current position and velocity are greater than 0 and less than the right edge of the screen\r\n if (x + xa > 0 && x + xa < 1280-w){\r\n // increase the character position by velocity\r\n x = x + xa;\r\n }\r\n \r\n // if current height and velocity are greater than zero and less than the floor of the game\r\n if (y + ya > 0 && y + ya < 500){\r\n // if jumping up\r\n if (y > 300){\r\n y = y + ya;\r\n } else{ // if falling down, increase velocity to 3\r\n ya = 3;\r\n y = y + ya;\r\n }\r\n }\r\n \r\n // if a collision is detected increase life counter\r\n if (game.collision()){\r\n // increase life counter\r\n count++;\r\n // call game over to load next image or to close game\r\n game.gameOver(count);\r\n } \r\n }",
"@Override\n public void move()\n {\n System.out.println(\"tightrope walking\");\n }",
"void move();",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"하늘을 날다\");\n\t}",
"void makeMove(Location loc);",
"void moving() {\n\t\tSystem.out.println(\"Moving the car\");\r\n\t}",
"public void goToStart() {\n\t\tsetPosition(0);\n\t}",
"public void move() { \n\t\tSystem.out.println(\"MOVING\");\n\t\tswitch(direction) {\n\t\t\tcase NORTH: {\n\t\t\t\tyloc -= ySpeed;\n\t\t\t}\n\t\t\tcase SOUTH: {\n\t\t\t\tyloc+= xSpeed;\n\t\t\t}\n\t\t\tcase EAST: {\n\t\t\t\txloc+= xSpeed;\n\t\t\t}\n\t\t\tcase WEST: {\n\t\t\t\txloc-= xSpeed;\n\t\t\t}\n\t\t\tcase NORTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase NORTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc+=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc+= ySpeed;\n\t\t\t}\n\t\t}\n\t}",
"boolean moveCharacter(Player player, Location.Direction direction) {\n Location currentLocation = player.getLocation();\r\n //check to see if move is possible\r\n Location destination = currentLocation.compass(direction);\r\n if (destination != null)\r\n {\r\n currentLocation.exit(player);\r\n destination.enter(player);\r\n return true;\r\n }\r\n else{\r\n return false;\r\n } \r\n }",
"@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}",
"public void move() throws InstructionExecutionException\r\n\t{\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tStreet street=this.getHeadingStreet();\r\n\t\t\tif(street==null){\r\n\t\t\t\tString err=\"WALL·E says: There is no street in direction \"+this.getCurrentHeading();\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, err);\r\n\t\t\t\t}\r\n\t\t\t\tthrow new InstructionExecutionException(err);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tPlace nextPlace=street.nextPlace(this.currentPlace);\r\n\t\t\tif (street.isOpen()){\r\n\t\t\t\tthis.currentPlace=nextPlace;\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tthis.navigationPanel.updateCell(currentDirection, nextPlace);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tString err=\"WALL·E says: Arrggg, there is a street but it is closed!\";\r\n\t\t\t\tif(isSwing()){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, err);\r\n\t\t\t\t}\r\n\t\t\t\tthrow new InstructionExecutionException(err);\r\n\t\t\t}\r\n\t\t}catch (Exception e){\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}",
"public void movePiece(Coordinate from, Coordinate to);",
"public DCursorMove() {\n super(COMMAND);\n }",
"public boolean moveUnit(Position from, Position to);",
"public void move(){\n x+=xDirection;\n y+=yDirection;\n }",
"@Override\n public void movement() {\n if (isAlive()) {\n //Prüfung ob A oder die linke Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_LEFT) || Keyboard.isKeyDown(KeyEvent.VK_A)) {\n //Änder die X Position um den speed wert nach link (verkleinert sie)\n setPosX(getPosX() - getSpeed());\n //Prüft ob der Spieler den linken Rand des Fensters erreicht hat\n if (getPosX() <= 0) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(0);\n }\n }\n //Prüfung ob D oder die rechte Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT) || Keyboard.isKeyDown(KeyEvent.VK_D)) {\n //Änder die X Position um den speed wert nach rechts (vergrößert sie)\n setPosX(getPosX() + getSpeed());\n //Prüft ob der Spieler den rechten Rand des Fensters erreicht hat\n if (getPosX() >= Renderer.getWindowSizeX() - getWight() - 7) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(Renderer.getWindowSizeX() - getWight() - 7);\n }\n }\n //Aktualsiert die Hitbox\n setBounds();\n }\n }",
"public void act() \r\n {\r\n move();\r\n }",
"public void move(int delta);",
"void makeMove(char c0, char r0, char c1, char r1) {\n makeMove(Move.move(c0, r0, c1, r1, null));\n }",
"public void move() {\n spriteBase.move();\n\n Double newX = spriteBase.getXCoordinate() + spriteBase.getDxCoordinate();\n Double newY = spriteBase.getYCoordinate() + spriteBase.getDyCoordinate();\n\n if (!newX.equals(spriteBase.getXCoordinate())\n || !newY.equals(spriteBase.getYCoordinate())) {\n Logger.log(String.format(\"Monster moved from (%f, %f) to (%f, %f)\",\n spriteBase.getXCoordinate(), spriteBase.getYCoordinate(), newX, newY));\n }\n }",
"private static Activity moveInDirection(int x, int y) {\n return Activity.newBuilder()\n .addSubActivity(() -> {\n Position pos = Players.getLocal().getPosition();\n while(pos.isPositionWalkable()) {\n pos = pos.translate(x, y);\n }\n pos = pos.translate(-x, -y);\n while(!Movement.setWalkFlagWithConfirm(pos)) {\n pos = pos.translate(-x, -y);\n }\n Time.sleepUntil(() -> !Movement.isDestinationSet(), 1000 * 10);\n })\n .build();\n }",
"public void move(Instruction instruction) {\n\t\tAction action = instruction.getAction();\n\t\t// System.out.println(\"Instruction: \" + action\n\t\t// + \", Current Position: \"\n\t\t// + this.getCurrentPosition().toString());\n\t\tif (action.equals(Action.I) || action.equals(Action.D)) {\n\t\t\thip.turnDependOnAction(action);\n\t\t} else if (action.equals(Action.A)) {\n\t\t\tif (!isAnExaminedPosition()) {\n\t\t\t\tnotificarSensores();\n\t\t\t}\n\t\t\tmotor.walk();\n\t\t}\n\t}",
"public void walkToPoint(Point destination) {\n\n\t\tACTION attemptedMove;\n\n\t\tif (coordX != destination.x && coordY != destination.y) {\n\t\t\tSystem.out.println(\"X- \" + coordX + \" Y- \" + coordY);\n\t\t\tSystem.out.println(\"pX- \" + destination.x + \" pY- \" + destination.y);\n\t\t\tthrow new IllegalArgumentException(\"Illegal coordinate. Only move in one direction at a time\");\n\t\t}\n\t\tif (coordX < destination.x) {\n\t\t\tattemptedMove = ACTION.RIGHT;\n\t\t} else if (coordX > destination.x) {\n\t\t\tattemptedMove = ACTION.LEFT;\n\t\t} else if (coordY < destination.y) {\n\t\t\tattemptedMove = ACTION.DOWN;\n\t\t} else if (coordY > destination.y) {\n\t\t\tattemptedMove = ACTION.UP;\n\t\t} else {\n\t\t\treturn; //In case someone issues a move to nowhere\n\t\t}\n\t\tchangeFacing(attemptedMove);\n\t\taction = attemptedMove;\n\t\tpointWalking = true;\n\t\tendPoint = destination;\n\n\t\tif (validMoveEh(action)) {\n\t\t\tmoving = true;\n\t\t\tremainingSteps = STEP_SIZE;\n\t\t\tthis.updateCoordinate(action, true);\n\t\t\tcurrentImage = startAnimation(attemptedMove);\n\t\t}\n\t}",
"public boolean BeginMoveToXY(int xDestination, int yDestination) {\n\t\tif (command == Command.FollowWaiter) {\n\t\t\tthis.xDestination = xDestination;\n\t\t\tthis.yDestination = yDestination;\n\t\t\tcommand = Command.GoToSeat;\n\t\t\trestPanel.customerSeatOpen[(yWaiting - 50)/30] = true;\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"private void move() {\n\t\t\tangle += Math.PI/24;\n\t\n\t\t\tcow.locX = Math.sin(angle) * 2.5 + player.getLocation().getX();\n\t\t\tcow.locZ = Math.cos(angle) * 2.5 + player.getLocation().getZ();\n\t\t\t\n\t\t\tLocation loc = new Location(player.getWorld(), cow.locX, player.getLocation().getY() + 1.5, cow.locZ);\n\t\t\tloc.setDirection(player.getLocation().subtract(loc).toVector()); //Look at the player\n\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, cow.getId(), loc);\n\t\t}",
"public abstract void move(int direction, double speed);",
"public void move() {\r\n\t\tmoveCount++;\r\n\t}",
"private void moveToDestination() throws IOException {\n\t\tfloat x = dataInputStream.readFloat();\n\t\tfloat z = dataInputStream.readFloat();\n\t\t\n\t\tLCD.drawString(\"x: \"+x, 0, onLCDPositionY++);\n\t\tLCD.refresh();\n\t\tLCD.drawString(\"z: \"+z, 0, onLCDPositionY++);\n\t\tLCD.refresh();\n\t\t\n\t\tpose = poseProvider.getPose();\n\t\tPoint destination = new Point(x,z);\n\t\tfloat angle = pose.angleTo(destination);\n\t\t\n\t\t\n\t\tLCD.drawInt((int) pose.getHeading(), 0, onLCDPositionY++);\n\t\t\n\t\t\n\t\tclassPilot.rotate(angle - pose.getHeading());\n\t\tclassPilot.travel(pose.distanceTo(destination));\n\t}",
"public void Move()\n {\n \n }",
"public void moveTo (Coordinate c) throws Exception\n\t{\n\t\tcurrentLocation = c;\n\t\tgrid[c.x][c.y] = GridChar.VISITED;\n\t}",
"@Override\r\n\tpublic void move() {\n\t\tPoint target = strategy.search(this.getLocation(), new Point(0,0));\r\n\r\n\t\tint tries = 0;\r\n\t\t\r\n\t\twhile(!state.equals(\"Inactive\") && !game.movement(this, target.x, target.y)){\r\n\t\t\ttarget = strategy.search(new Point(x,y),playerLocation);\r\n\t\t\ttries++;\r\n\t\t\tif(tries > 4) return; // the search strategy has 4 tries to pick a valid location to move to\r\n\t\t}\r\n\t\t\r\n\t\tx = target.x;\r\n\t\ty = target.y;\r\n\r\n\t\tmoveSprite();\r\n\t}",
"public void addMove() {\n\t\tmove = \"mv \" + posX + \" \" + posY;\n\t}",
"public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\t\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (gr.isValid(next2)) {\n\t\t\tmoveTo(next2);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t}",
"@Override\n\tpublic void move() {\n\t\t\n\t}",
"public void move() {\n process(2);\n }",
"public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tif (gr.isValid(next)) {\n\t\t\tsetDirection(getLocation().getDirectionToward(next));\n\t\t\tmoveTo(next);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t\tFlower flower = new Flower(getColor());\n\t\tflower.putSelfInGrid(gr, loc);\n\t}",
"public Move(int from, int to, int step) {\n this.to = to;\n this.from = from;\n this.step = step;\n }",
"private synchronized void startDrag(Point p) {\n this.setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));\n beingDragged = true;\n moveSource = p;\n }",
"private void move() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n int newX = -1;\n int newY = -1;\n switch (direction) {\n case EAST:\n newX = currentPosition.getX() + 1;\n newY = currentPosition.getY();\n break;\n case WEST:\n newX = currentPosition.getX() - 1;\n newY = currentPosition.getY();\n break;\n case NORTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() + 1;\n break;\n case SOUTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() - 1;\n break;\n }\n\n if(newX < lowerBound.getX() || newY < lowerBound.getY()\n || newX > upperBound.getX() || newY > upperBound.getY()) {\n System.out.println(\"Cannot move to \" + direction);\n return;\n }\n\n currentPosition.setX(newX);\n currentPosition.setY(newY);\n }",
"public void move(FightCell cell);",
"@Override\r\n public void run() {\r\n move();\r\n }",
"@Override\n\tpublic void moveCharacter(){\n\t\tif (leftBlocked || rightBlocked) {\n\t\t\txSpeed = 0;\n\t\t}\n\t\t\n\t\t/* Applies gravity if falling */\n\t\tif ( isFalling() && this.getCurrentAnimation().isLastFrame() ) {\n\t\t\tfallingSpeed = fallingSpeed + gravity;\n\t\t\tint newySpeed = fallSpeed + fallingSpeed;\n\t\t\t\n//\t\t\tSystem.out.println(\"newySpeed: \" + newySpeed);\n\t\t\t\n\t\t\tif (newySpeed > maxySpeed) {\n\t\t\t\tnewySpeed = maxySpeed;\n\t\t\t}\n\t\t\tySpeed = newySpeed;\n\t\t\t\n\t\t\t// Applies horizontal speed to the fall\n\t\t\tif ( !isStraightFall() && (!isFallCollided() && !isDeadlyFall()) ) {\n\t\t\t\t\n\t\t\t\tif ( isSafeFall() ) {\n\t\t\t\t\t\n\t\t\t\t\tif (this.getOrientation().equals(\"left\")) {\n\t\t\t\t\t\txFrameOffset = -fallxSpeed;\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.getOrientation().equals(\"right\")) {\n\t\t\t\t\t\txFrameOffset = fallxSpeed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( isRiskyFall() ) {\n\t\t\t\t\t\n\t\t\t\t\tif (this.getOrientation().equals(\"left\")) {\n\t\t\t\t\t\txFrameOffset = -fallxSpeed/2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.getOrientation().equals(\"right\")) {\n\t\t\t\t\t\txFrameOffset = fallxSpeed/2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( isFallCollided() ) {\n\t\t\t\txFrameOffset = 0;\n\t\t\t}\n\t\t}\n\t\telse if ( isGrounded() && !this.getCurrentAnimation().getId().equals(\"stairs\")) {\n\n\t\t\t/* Character is on the ground */\n\t\t\tySpeed = 0;\n\t\t\tyFrameOffset = 0;\n\t\t\tfallingSpeed = 0;\n\t\t}\n\t\t\n\t\t/* Moves the character and its bounding box if he is not at the edge*/\n\t\tif (!this.isBlocked()) {\n\t\t\tsetX(x + xSpeed + xFrameOffset);\n\t\t\tsetY(y + ySpeed + yFrameOffset);\n\t\t\tboundingBox.translate(xSpeed + xFrameOffset, ySpeed + yFrameOffset);\n\t\t}\n\t\t\n\t\t/* Play music */\n\t\tif(!sound.equals(\"\")){\n\t\t\tloader.getSound(sound).play();;\n\t\t}\n\t}",
"public boolean move();",
"@Override\r\n\tpublic void move(char c) {\r\n\t\tswitch(this.state) {\r\n\t\tcase WALK:\r\n\t\t\tif(c == 'a') {\r\n\t\t\t\tthis.speed = -30;\r\n\t\t\t\tthis.dir = directionState.LEFT;\r\n\t\t\t}\r\n\t\t\tif(c == 'd') {\r\n\t\t\t\tthis.speed = 30;\r\n\t\t\t\tthis.dir = directionState.RIGHT;\r\n\t\t\t}\r\n\t\t\tif(c == 'f') {\r\n\t\t\t\tthis.state = slugState.ATTACK;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t}\r\n\t\t\tif(c == 'o') {\r\n\t\t\t\tthis.speed = 0;\r\n\t\t\t\tthis.decrementHitpoints();\r\n\t\t\t\tthis.state = slugState.DAMAGE;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase ATTACK:\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase DAMAGE:\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t}",
"public void moveStart(\n )\n {\n index = StartIndex;\n if(state == null)\n {\n if(parentLevel == null)\n {state = new GraphicsState(this);}\n else\n {state = parentLevel.state.clone(this);}\n }\n else\n {\n if(parentLevel == null)\n {state.initialize();}\n else\n {parentLevel.state.copyTo(state);}\n }\n\n notifyStart();\n\n refresh();\n }",
"public void move() {\r\n\t\tx = x + speed;\r\n\t}",
"public abstract void move(Position position);",
"public void move() {\n if (this.nextMove.equals(\"a\")) { // move down\n this.row = row + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"b\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"b\")) { // move right\n this.col = col + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"c\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"c\")) { // move up\n this.row = row - 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"a\";\n progress = 0;\n }\n }\n }",
"public void move() {\n\t\tthis.move(velocity.x, velocity.y);\n\t}",
"public void move() {\n\t\tif (type.equals(\"Fast\")) {\n\t\t\tspeed = 2;\n\t\t}else if (type.equals(\"Slow\")){\n\t\t\tspeed = 4;\n\t\t}\n\t\t\n\t\tif (rand.nextInt(speed) == 1){\n\t\t\tif (currentLocation.x - ChristopherColumbusLocation.x < 0) {\n\t\t\t\tif (currentLocation.x + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.x++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.x != 0) {\t\t\t\t\n\t\t\t\t\tcurrentLocation.x--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (currentLocation.y - ChristopherColumbusLocation.y < 0) {\n\t\t\t\tif (currentLocation.y + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.y++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.y != 0) {\n\t\t\t\t\tcurrentLocation.y--;\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t}",
"public void move(String command) {\n\t\tif(command==\"F\"){\n\t\t\tmoveForwards();\n\t\t}else if(command==\"T\"){\n\t\t\tturnClockwise();\n\t\t}\n\t}",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"fly\");\n\n\t}",
"public void setDirectionMove(double direction);",
"void doneMoving();",
"public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }",
"@NotNull\n void move(Direction direction) {\n this.position.move(direction);\n lookingDirection = direction;\n }",
"private void moveMower(final char movement) {\n int nextYPosition = this.getPosition().getPositionY();\n int nextXPosition = this.getPosition().getPositionX();\n switch (this.getPosition().getOrientation()) {\n case N:\n nextYPosition++;\n break;\n case S:\n nextYPosition--;\n break;\n case W:\n nextXPosition--;\n break;\n case E:\n default:\n nextXPosition++;\n break;\n }\n if (garden.isPositionAvailable(nextXPosition, nextYPosition)) {\n logger.debug(\"Moving mower : ({}, {}) -> ({}, {})\",\n this.position.getPositionX(), this.position.getPositionY(),\n nextXPosition, nextYPosition);\n this.getPosition().setPositionX(nextXPosition);\n this.getPosition().setPositionY(nextYPosition);\n } else {\n logger.debug(\"Cannot move mower : ({}, {}) -> ({}, {})\",\n this.position.getPositionX(), this.position.getPositionY(),\n this.position.getPositionX(), this.position.getPositionY());\n }\n }",
"@Test\n\tpublic final void testMoveTo() {\n\t\tRoom testRoom = new Room(\"247\", 2, \"Computer Lab\");\n\t\t\n\t\tanimal.moveTo(testForest);\n\t\tassertEquals(\"Move To Forest\", animal.location(), testForest);\n\t\t\n\t\tanimal.moveTo(testRoom);\n\t\tassertEquals(\"Move To Room\", animal.location(), testForest);\t\n\t\t\n\t}",
"public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }"
] | [
"0.6610274",
"0.6567127",
"0.643831",
"0.6267136",
"0.6206476",
"0.61468875",
"0.6145195",
"0.6143968",
"0.6142812",
"0.60981166",
"0.5993006",
"0.59591544",
"0.5935157",
"0.5922302",
"0.5895253",
"0.5888659",
"0.588658",
"0.5874023",
"0.5845852",
"0.5815178",
"0.58103454",
"0.5778003",
"0.5763572",
"0.5763572",
"0.5734139",
"0.5723739",
"0.571371",
"0.569065",
"0.56767905",
"0.5666573",
"0.56645393",
"0.5660917",
"0.5660746",
"0.5660007",
"0.565515",
"0.5640835",
"0.56273794",
"0.56069267",
"0.558932",
"0.55680287",
"0.55627286",
"0.55550915",
"0.55546576",
"0.55489343",
"0.5542021",
"0.55405796",
"0.552774",
"0.5524449",
"0.5523609",
"0.55200565",
"0.55007374",
"0.5475614",
"0.5474695",
"0.5465282",
"0.54611033",
"0.54511845",
"0.5444492",
"0.544346",
"0.54384696",
"0.54371613",
"0.54320484",
"0.54319525",
"0.54213",
"0.54169446",
"0.5413316",
"0.5412129",
"0.5409316",
"0.54086536",
"0.54025704",
"0.5391251",
"0.538848",
"0.5387638",
"0.5386543",
"0.53843766",
"0.53779715",
"0.53739953",
"0.5369866",
"0.5366446",
"0.53660107",
"0.5358829",
"0.5354863",
"0.53420055",
"0.53378016",
"0.5334781",
"0.5333355",
"0.5332111",
"0.53286934",
"0.5320702",
"0.5320499",
"0.53178424",
"0.5315207",
"0.530971",
"0.5303932",
"0.53036433",
"0.5303169",
"0.530236",
"0.5302334",
"0.5300425",
"0.53003716",
"0.5294934",
"0.5293647"
] | 0.0 | -1 |
Using Runnable to avoid it from getting stuck and to be able to make it cancellable. | @Override
public void run() {
updateMovement();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"public void run() {\n // no-op.\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\npublic void run() {\n perform();\t\n}",
"@Override\n public void run()\n {\n }",
"@Override\n public void run()\n {\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tno();\n\t\t\t\t}",
"@Override\n public void run() {\n myHandler.cancel(true);\n }",
"@Override\r\n public void run() {}",
"@Override\n\tpublic void run()\n\t{\n\t}",
"@Override\n\tpublic void run()\n\t{\n\n\t}",
"@Override\n public void run() {\n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\t\n\t}",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n\t\tpublic void run() {\n\n\t\t}",
"@Override\n public void run() {\n }",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\n\tpublic void run() {\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\tpublic void run() {\n\t}",
"@Override\r\n\tpublic void run() {\n\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"private void cancel() {\n mFuture.cancel(mMayInterruptIfRunning);\n }",
"@Override\r\n public void run() {\n }",
"@Override\n\tpublic void run() {\n\n\t}",
"@Override\n\tpublic void run() {\n\n\t}",
"@Override\n\tpublic void run() {\n\n\t}",
"@Override\n\tpublic void run() {\n\n\t}",
"@Override\n\tpublic void run() {\n\n\t}",
"@Override\n public void run(){\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\r\n\t\t public void run() {\r\n\t\t\tdayElimVoteTimeout(); // this might need a catch\r\n\r\n\t\t }",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n public void run(){\n\n Thread.currentThread().interrupt();\n }",
"@Override\n\tpublic void run() {\n\t\t\n\t\t\t\t\t\t\n\t}",
"@Override\n public void run() {\n if (!this.m_running) {\n this.m_running = true;\n this.pollingLooper();\n }\n }",
"@Override\n public void run() {\n\n }",
"@Override\n public void run() {\n\n }",
"@Override\n public void run() {\n\n }",
"@Override\n public void run() {\n\n }",
"@Override\n public void run() {\n\n }",
"@Override\n public void run() {\n\n }",
"private void cancelHeavyLifting()\n {\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t\n\t\t\t while ( !bFinished ) {\n\t\t\t \ttry {\n\t\t\t\t\t\t\tThread.sleep(200);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t }\n\t\t\t System.exit(0);\n\t\t\t\t}",
"@Override\n public void run()\n {\n\n }",
"@CallByThread(\"Netty EventLoop\")\n void runCancel() {\n if (referenced > 0) { // is blocking\n incomingPublishService.drain();\n }\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ts.get();\n\t\t\t\t}",
"@Override\n public void run() {\n \t\n }",
"@Override\n public void run() {\n //如果本延迟任务已经执行,那么做个标识标注本清楚任务已经执行,然后手按下的时候那里就不会移除本任务\n b = false;\n cleanLine();\n }"
] | [
"0.6707942",
"0.6707942",
"0.6696447",
"0.66653806",
"0.66653806",
"0.66653806",
"0.6663817",
"0.6663817",
"0.6653595",
"0.6653595",
"0.6653595",
"0.6653595",
"0.6653595",
"0.6653595",
"0.6653595",
"0.66514355",
"0.66514355",
"0.6649358",
"0.66451687",
"0.66451687",
"0.66426325",
"0.66280603",
"0.6627789",
"0.66080034",
"0.6592476",
"0.6582035",
"0.65704954",
"0.6546466",
"0.6537246",
"0.6537246",
"0.6537246",
"0.6537246",
"0.6537246",
"0.6537246",
"0.6537246",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6520747",
"0.6517527",
"0.6517527",
"0.65151983",
"0.6506933",
"0.64894956",
"0.64894956",
"0.64894956",
"0.64894956",
"0.64894956",
"0.64894956",
"0.64894956",
"0.64894956",
"0.64894956",
"0.64828867",
"0.64689225",
"0.64689225",
"0.6462098",
"0.6462098",
"0.6452286",
"0.6452286",
"0.6447198",
"0.642728",
"0.6417404",
"0.6417404",
"0.6417404",
"0.6417404",
"0.6417404",
"0.64034265",
"0.6403295",
"0.6403295",
"0.6403295",
"0.63989776",
"0.638181",
"0.638181",
"0.6374029",
"0.6370297",
"0.6367763",
"0.6360261",
"0.6360261",
"0.6360261",
"0.6360261",
"0.6360261",
"0.6360261",
"0.63562036",
"0.6344754",
"0.6336618",
"0.63282806",
"0.63249546",
"0.63248837",
"0.6293667"
] | 0.0 | -1 |
Private task that updates the movement of current Creature. | private void updateMovement() {
if (_movementTask == null) {
return;
}
if (getOwner().isDead() || _followTarget != null && _followTarget.isDead()) {
cancelMoveTask2(true);
return;
}
// Movement is invalid! Queue a new movement and wait again!
if (_destinationLocation == null)
{
if (_waypoints.peek() != null) {
_destinationLocation = _waypoints.poll();
if (getOwner().getLocation().getGameSector() != null && getOwner().getLocation().getGameSector().hasActiveNeighbours()) {
double validatedZ = GeoService.getInstance().validateZ(_destinationLocation.getX(), _destinationLocation.getY(), _destinationLocation.getZ());
if (validatedZ == Double.MIN_VALUE) {
_movementTick = System.currentTimeMillis();
getOwner().getAi().setFindPathCompleted(false);
cancelMoveTask2(true);
onMovementComplete();
return;
}
if (_destinationLocation != null) {
_destinationLocation.setZ(validatedZ);
}
else {
_movementTick = System.currentTimeMillis();
getOwner().getAi().setFindPathCompleted(false);
cancelMoveTask2(true);
onMovementComplete();
return;
}
_isSectorActive = true;
}
else {
_isSectorActive = false;
}
notifySector(true);
}
else
{
_movementTick = System.currentTimeMillis();
getOwner().getAi().setFindPathCompleted(true);
cancelMoveTask2(true);
onMovementComplete();
return;
}
}
if (_destinationLocation != null) {
// Update current character movement, the location.
float deltaTime = (System.currentTimeMillis() - _movementTick) / 1000.0f;
float movementSpeed = getOwner().getActionStorage().getMoveSpeed();
if (getOwner().getActionStorage().getAction().getActionChartActionT().getApplySpeedBuffType().isMove()) {
movementSpeed *= (getOwner().getGameStats().getMoveSpeedRate().getMoveSpeedRate() + 1_000_000.0f) / 1_000_000.0f;
}
Location ownerLocation = getOwner().getLocation();
double movementDirectionX = _destinationLocation.getX() - ownerLocation.getX();
double movementDirectionY = _destinationLocation.getY() - ownerLocation.getY();
double movementDirectionZ = _destinationLocation.getZ() - ownerLocation.getZ();
double directionLength = Math.sqrt(Math.pow(movementDirectionX, 2) + Math.pow(movementDirectionY, 2) + Math.pow(movementDirectionZ, 2));
movementDirectionX /= directionLength;
movementDirectionY /= directionLength;
movementDirectionZ /= directionLength;
ownerLocation.setXYZ(
ownerLocation.getX() + movementDirectionX * movementSpeed * deltaTime,
ownerLocation.getY() + movementDirectionY * movementSpeed * deltaTime,
ownerLocation.getZ() + movementDirectionZ * movementSpeed * deltaTime
);
if (_isSectorActive && !_navigationType.isAir()) {
double validatedZ = GeoService.getInstance().validateZ(ownerLocation.getX(), ownerLocation.getY(), ownerLocation.getZ());
if (validatedZ == Double.MIN_VALUE) {
getOwner().getAi().setFindPathCompleted(false);
cancelMoveTask2(true);
onMovementComplete();
return;
}
ownerLocation.setZ(validatedZ);
}
if (ownerLocation.isValid() && World.getInstance().getWorldMap().updateLocation(getOwner(), ownerLocation.getX(), ownerLocation.getY())) {
double distanceToPoint = MathUtils.getDistance(ownerLocation, _destinationLocation) - getOwner().getTemplate().getBodySize();
notifyVehicleMovement();
if (_followTarget != null) {
distanceToPoint -= _followTarget.getTemplate().getBodySize();
if (!MathUtils.isInRange(_destinationLocation, _followTarget.getLocation(), 150)) {
_destinationLocation.setLocation(_followTarget.getLocation());
notifySector(true);
} else { // No more waypoint's available. Send movement stop and events.
if (distanceToPoint < 75 || distanceToPoint < getOwner().getTemplate().getAttackRange() && getOwner().getAi().getBehavior().isChase()) {
getOwner().getAi().setFindPathCompleted(true);
cancelMoveTask2(false);
onMovementComplete();
}
}
} else {
// Check if we are near another destination, then we will
// switch to another waypoint instead to continue our journey.
Location nextWaypoint = _waypoints.peek();
if (nextWaypoint != null) {
if (distanceToPoint < 100) {
_destinationLocation = null;
}
} else { // No more waypoint's available. Send movement stop and events.
if (distanceToPoint < 75 || distanceToPoint < getOwner().getTemplate().getAttackRange() && getOwner().getAi().getBehavior().isChase()) {
getOwner().getAi().setFindPathCompleted(true);
cancelMoveTask2(false);
onMovementComplete();
}
}
}
} else {
getOwner().getAi().setFindPathCompleted(false);
cancelMoveTask2(true);
onMovementComplete();
}
}
_movementTick = System.currentTimeMillis();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void run() {\n updateMovement();\n }",
"public void updatemove() {\n\t\tmove = new Movement(getX(), getY(),dungeon,this);\n\t\t//System.out.println(\"Updated\");\n\t\tnotifys();\n\t\tif(this.getInvincible()) {\n\t\t\tsteptracer++;\n\t\t}\n\t\tdungeon.checkGoal();\n\t}",
"public void update() {\n\t\t// shooting and moving! This results in a slower movement, and unit self-targeting.\n\t\tif (action == 3 && !(this instanceof Grenadier) && !(this instanceof Sniper)) { // can't be a tank\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position or reached max distance\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t} else move(xa - xa / 8 * 5, ya - ya / 8 * 5); // SLOWS DOWN MOVEMENT\n\n\t\t\tUnit u = target(); // this is the enemy unit it is targeting.\n\t\t\tif (u != null) {\n\t\t\t\tdir = Math.atan2(u.getY() - y, u.getX() - x);\n\t\t\t\tupdateShooting();\n\t\t\t}\n\t\t}\n\n\t\t// shooting only\n\t\telse if (action == 2) {\n\t\t\tupdateShooting();\n\t\t}\n\t\t\n\t\t// moving only\n\t\telse if (action == 1) {\n\t\t\tif (unitType.equals(\"Assassin\") || unitType.equals(\"Zombie\")) { // these are units that deal with collisions!\n\t\t\t\tunitCollision(); // these three units have methods that specialize in collision\n\t\t\t}\n\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position!\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t\taction = 0;\n\t\t\t} else move(xa, ya); // YOU MUST ROUND TO A CERTAIN NUMBER OF DECIMAL PLACES IN ORDER TO REDUCE CHOPPINESS OF MOVEMENT\n\t\t}\n\t\tupdateAnimation();\n\n\t}",
"protected void execute() {\r\n \tmanipulator.moveElevator(speed);\r\n }",
"public void act(){\n // Removing object, if out of the simulated zone\n if (atWorldEdge()){\n getWorld().removeObject(this);\n return;\n }\n\n //Move Thanos up\n setLocation (getX(), getY() - speed);\n }",
"public void updateTask() {\n/* 137 */ if (this.field_190859_a.func_190718_dR()) {\n/* */ \n/* 139 */ EntityLlama entityllama = this.field_190859_a.func_190716_dS();\n/* 140 */ double d0 = this.field_190859_a.getDistanceToEntity((Entity)entityllama);\n/* 141 */ float f = 2.0F;\n/* 142 */ Vec3d vec3d = (new Vec3d(entityllama.posX - this.field_190859_a.posX, entityllama.posY - this.field_190859_a.posY, entityllama.posZ - this.field_190859_a.posZ)).normalize().scale(Math.max(d0 - 2.0D, 0.0D));\n/* 143 */ this.field_190859_a.getNavigator().tryMoveToXYZ(this.field_190859_a.posX + vec3d.xCoord, this.field_190859_a.posY + vec3d.yCoord, this.field_190859_a.posZ + vec3d.zCoord, this.field_190860_b);\n/* */ } \n/* */ }",
"public void act() \n {\n movement();\n }",
"P applyMovement(M move);",
"protected void execute() {\n\t\tdouble tempSpeed = Math.abs(elSpeed);\n\t\tdirection = newPosition.getValue() > Robot.elevator.getCurrentPosition().getValue()\n\t\t\t\t? RelativeDirection.ZAxis.UP : RelativeDirection.ZAxis.DOWN;\n\n\t\tif (direction == RelativeDirection.ZAxis.DOWN) {\n\t\t\ttempSpeed = -tempSpeed;\n\t\t}\n\n\t\tRobot.elevator.setElevatorSpeed(tempSpeed);\n\t}",
"@Override\n public void update() {\n animate();\n if (alive == false) {\n afterKill();\n return;\n }\n if (alive) {\n calculateMove();\n }\n }",
"public void move()\n {\n x = x + unitVector.getValue(1)*speed;\n y = y + unitVector.getValue(2)*speed;\n }",
"public void act() \r\n {\r\n move(speed); //move at set speed\r\n \r\n if(actCounter < 2) //increases act counter if only 1 act has passed\r\n actCounter++;\r\n\r\n if(actCounter == 1) //if on the first act\r\n {\r\n targetClosestPlanet(); //will target closest planet depending on if it wants to find an unconquered planet, or just the closest one\r\n if(planet == null && findNearestPlanet)\r\n findNearestPlanet = false;\r\n }\r\n \r\n if(health > 0) //if alive\r\n {\r\n if(findNearestPlanet)\r\n targetClosestPlanet();\r\n if(planet != null && planet.getWorld() != null) //if planet exists\r\n moveTowards(); //move toward it\r\n else\r\n moveRandomly(); //move randomly\r\n }\r\n \r\n if(removeMe || atWorldEdge())\r\n getWorld().removeObject(this);\r\n }",
"public final void processMovement() {\r\n\t\tif (isMoving()) {\r\n\t\t\tlong elapsed = System.currentTimeMillis() - moveStart;\r\n\t\t\tmovementPercent = (((float) elapsed) / ((float) movementTime));\r\n\t\t\tif (movementPercent < 1f) {\r\n\t\t\t\txOff = -getWrappedEntity().getDir().getXOff()\r\n\t\t\t\t\t\t* Math.round((1f - movementPercent)\r\n\t\t\t\t\t\t\t\t* TileConstants.TILE_WIDTH);\r\n\t\t\t\tzOff = -getWrappedEntity().getDir().getZOff()\r\n\t\t\t\t\t\t* Math.round((1f - movementPercent)\r\n\t\t\t\t\t\t\t\t* TileConstants.TILE_HEIGHT);\r\n\t\t\t} else {\r\n\t\t\t\tmovementPercent = 0f;\r\n\t\t\t\tmoveStart = -1;\r\n\t\t\t\txOff = 0;\r\n\t\t\t\tzOff = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void act() \n {\n playerMovement();\n }",
"public void move() {\n if(Objects.nonNull(this.position)) {\n Position position = this.getPosition();\n Function<Position, Position> move = moveRobotInDirectionMap.get(position.getDirection());\n this.position = move.apply(position);\n }\n }",
"public void spawnCreature(){\n\t\tif(spawnType.equalsIgnoreCase(\"worm\")){\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"worm\"+spawnId);\n\t\t}else if(spawnType.equalsIgnoreCase(\"antorc\")){\n\t\t\tGdx.app.debug(TamerGame.LOG, this.getClass()\n\t\t\t\t\t.getSimpleName() + \" :: Ant entered\");\t\t\t\n\t\t\t//CHANGE SPAWNING IMPLEMENTATION\n\t\t\tAntOrc orc = new AntOrc();\n\t\t\torc.setPosition(getPosition());\n\t\t\torc.setWaypoint(waypoint);\n\t\t\tenvironment.addNewObject(orc);\n\t\t\tEventPool.addEvent(new tEvent(this,\"spawnCreature\",sleepTime,1));\n\t\t}\n\t\t\t\n\t}",
"public void move() {\n\t\tif (type.equals(\"Fast\")) {\n\t\t\tspeed = 2;\n\t\t}else if (type.equals(\"Slow\")){\n\t\t\tspeed = 4;\n\t\t}\n\t\t\n\t\tif (rand.nextInt(speed) == 1){\n\t\t\tif (currentLocation.x - ChristopherColumbusLocation.x < 0) {\n\t\t\t\tif (currentLocation.x + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.x++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.x != 0) {\t\t\t\t\n\t\t\t\t\tcurrentLocation.x--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (currentLocation.y - ChristopherColumbusLocation.y < 0) {\n\t\t\t\tif (currentLocation.y + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.y++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.y != 0) {\n\t\t\t\t\tcurrentLocation.y--;\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t}",
"private void move() {\n\t\t\tangle += Math.PI/24;\n\t\n\t\t\tcow.locX = Math.sin(angle) * 2.5 + player.getLocation().getX();\n\t\t\tcow.locZ = Math.cos(angle) * 2.5 + player.getLocation().getZ();\n\t\t\t\n\t\t\tLocation loc = new Location(player.getWorld(), cow.locX, player.getLocation().getY() + 1.5, cow.locZ);\n\t\t\tloc.setDirection(player.getLocation().subtract(loc).toVector()); //Look at the player\n\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, cow.getId(), loc);\n\t\t}",
"public void move() {\n spriteBase.move();\n\n Double newX = spriteBase.getXCoordinate() + spriteBase.getDxCoordinate();\n Double newY = spriteBase.getYCoordinate() + spriteBase.getDyCoordinate();\n\n if (!newX.equals(spriteBase.getXCoordinate())\n || !newY.equals(spriteBase.getYCoordinate())) {\n Logger.log(String.format(\"Monster moved from (%f, %f) to (%f, %f)\",\n spriteBase.getXCoordinate(), spriteBase.getYCoordinate(), newX, newY));\n }\n }",
"@Override\n\tpublic void updateEntity() {\n\t\t\n\t\tif (this.mobID != null && !this.worldObj.isRemote) {\n\t\t\t\n\t\t\tif (this.delay > 0) {\n\t\t\t\tthis.delay--;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tEntity entity = EntityList.createEntityByName(this.mobID, this.worldObj);\n\t\t\t\n\t\t\t// L'entity n'existe pas\n\t\t\tif (entity == null) {\n\t\t\t\tModGollumCoreLib.log.warning(\"This mob \"+this.mobID+\" isn't register\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tthis.worldObj.setBlockToAir(this.xCoord , this.yCoord , this.zCoord);\n\t\t\t\n\t\t\tdouble x = (double)this.xCoord + 0.5D;\n\t\t\tdouble y = (double)(this.yCoord);// + this.worldObj.rand.nextInt(3) - 1);\n\t\t\tdouble z = (double)this.zCoord + 0.5D;\n\t\t\tEntityLiving entityLiving = entity instanceof EntityLiving ? (EntityLiving)entity : null;\n\t\t\tentity.setLocationAndAngles(x, y, z, this.worldObj.rand.nextFloat() * 360.0F, this.worldObj.rand.nextFloat() * 360.0F);\n\t\t\tthis.worldObj.spawnEntityInWorld(entity);\n\t\t\t\n\t\t\tif (entityLiving == null || entityLiving.getCanSpawnHere()) {\n\t\t\t\t\n\t\t\t\tthis.worldObj.playSoundEffect (this.xCoord, this.yCoord, this.zCoord, \"dig.stone\", 0.5F, this.worldObj.rand.nextFloat() * 0.25F + 0.6F);\n\t\t\t\t\n\t\t\t\tif (entityLiving != null) {\n\t\t\t\t\tentityLiving.spawnExplosionParticle();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void update() {\n this.move(this.getDX(), this.getDY());\n }",
"@Override\r\n\tpublic Behaviour update(GameContext context) {\n\t\tif (Math.abs(thing.getX() - moveToX) < thing.getSpeed().getXv() / context.getTimeSinceLastUpdate()) {\r\n\t\t\tthing.setX(moveToX);\r\n\t\t}\r\n\t\tif (Math.abs(thing.getY() - moveToY) < thing.getSpeed().getYv() / context.getTimeSinceLastUpdate()) {\r\n\t\t\tthing.setY(moveToY);\r\n\t\t};\r\n\t\t\r\n\t\tif (!isContinueAfterTarget()) {\r\n\t\t\tthing.changeDirection(moveToX, moveToY, thing.getX(), thing.getY());\r\n\t\t}\r\n\t\tthing.updatePositionBasedOnSpeed(context);\r\n\t\t\r\n\t\tif (!isContinueAfterTarget()) {\r\n\t\t\tif ((int) thing.getX() == (int) moveToX) { // && thing.getY() == moveToLocation.y){\r\n\t\t\t\treturn new IdleBehaviour(thing);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t}",
"@Override\r\n public void run() {\r\n move();\r\n }",
"public void setMovement(){\n\t\tfloat distance = GameManager.getInstance().getGameCamera().getWidth();\n\t\tfloat durationTime = distance/this.speed;\n\t\t\n\t\tmoveX = new MoveByModifier(durationTime, -(this.xInicial-this.xFinal), 0);\n\t\t\n\t\tthis.registerEntityModifier(moveX);\n\t}",
"public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turnIndex = generator.nextInt((int)Math.ceil(Genome.numberOfGenes));\n int turn = genome.getGenome().get(turnIndex);\n\n //wywolujemy metode obrotu - dodaje odpowiednio liczbe do aktualnego kierunku\n direction.turn(turn);\n\n //zmieniamy pozycje zwierzaka przez dodanie odpowiedniego wektora\n position = position.add(direction.move());\n //walidacja pozycji tak, by wychodzac za mape byc na mapie z drugiej strony\n position.validatePosition(map.getWidth(),map.getHeight());\n\n moveOnSimulation();\n\n //jesli po ruchu zwierzaczek nie ma juz energii na kolejny ruch\n if(energy < energyLostPerDay )\n {\n this.animalHungry = true;\n }\n }",
"public void act() \n {\n // Add your action code here.\n \n //setRotation();\n setLocation(getX(),getY()+2);\n movement();\n \n }",
"public void moveActor();",
"public void act() \n {\n setLocation(getX() + Hur_Speed, getY());\n }",
"public void move() {\n\t\tthis.position.stepForwad();\n\t\tthis.position.spin();\n\t}",
"public void move()\n {\n move(WALKING_SPEED);\n }",
"public void tick() {\n super.tick();\n BlockPos blockpos = this.dataManager.get(ATTACHED_BLOCK_POS).orElse((BlockPos)null);\n if (blockpos == null && !this.world.isRemote) {\n blockpos = this.getPosition();\n this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos));\n }\n\n if (this.isPassenger()) {\n blockpos = null;\n float f = this.getRidingEntity().rotationYaw;\n this.rotationYaw = f;\n this.renderYawOffset = f;\n this.prevRenderYawOffset = f;\n this.clientSideTeleportInterpolation = 0;\n } else if (!this.world.isRemote) {\n BlockState blockstate = this.world.getBlockState(blockpos);\n if (!blockstate.isAir(this.world, blockpos)) {\n if (blockstate.isIn(Blocks.MOVING_PISTON)) {\n Direction direction = blockstate.get(PistonBlock.FACING);\n if (this.world.isAirBlock(blockpos.offset(direction))) {\n blockpos = blockpos.offset(direction);\n this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos));\n } else {\n this.tryTeleportToNewPosition();\n }\n } else if (blockstate.isIn(Blocks.PISTON_HEAD)) {\n Direction direction3 = blockstate.get(PistonHeadBlock.FACING);\n if (this.world.isAirBlock(blockpos.offset(direction3))) {\n blockpos = blockpos.offset(direction3);\n this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos));\n } else {\n this.tryTeleportToNewPosition();\n }\n } else {\n this.tryTeleportToNewPosition();\n }\n }\n\n Direction direction4 = this.getAttachmentFacing();\n if (!this.func_234298_a_(blockpos, direction4)) {\n Direction direction1 = this.func_234299_g_(blockpos);\n if (direction1 != null) {\n this.dataManager.set(ATTACHED_FACE, direction1);\n } else {\n this.tryTeleportToNewPosition();\n }\n }\n }\n\n float f1 = (float)this.getPeekTick() * 0.01F;\n this.prevPeekAmount = this.peekAmount;\n if (this.peekAmount > f1) {\n this.peekAmount = MathHelper.clamp(this.peekAmount - 0.05F, f1, 1.0F);\n } else if (this.peekAmount < f1) {\n this.peekAmount = MathHelper.clamp(this.peekAmount + 0.05F, 0.0F, f1);\n }\n\n if (blockpos != null) {\n if (this.world.isRemote) {\n if (this.clientSideTeleportInterpolation > 0 && this.currentAttachmentPosition != null) {\n --this.clientSideTeleportInterpolation;\n } else {\n this.currentAttachmentPosition = blockpos;\n }\n }\n\n this.forceSetPosition((double)blockpos.getX() + 0.5D, (double)blockpos.getY(), (double)blockpos.getZ() + 0.5D);\n double d2 = 0.5D - (double)MathHelper.sin((0.5F + this.peekAmount) * (float)Math.PI) * 0.5D;\n double d0 = 0.5D - (double)MathHelper.sin((0.5F + this.prevPeekAmount) * (float)Math.PI) * 0.5D;\n if (this.isAddedToWorld() && this.world instanceof net.minecraft.world.server.ServerWorld) ((net.minecraft.world.server.ServerWorld)this.world).chunkCheck(this); // Forge - Process chunk registration after moving.\n Direction direction2 = this.getAttachmentFacing().getOpposite();\n this.setBoundingBox((new AxisAlignedBB(this.getPosX() - 0.5D, this.getPosY(), this.getPosZ() - 0.5D, this.getPosX() + 0.5D, this.getPosY() + 1.0D, this.getPosZ() + 0.5D)).expand((double)direction2.getXOffset() * d2, (double)direction2.getYOffset() * d2, (double)direction2.getZOffset() * d2));\n double d1 = d2 - d0;\n if (d1 > 0.0D) {\n List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, this.getBoundingBox());\n if (!list.isEmpty()) {\n for(Entity entity : list) {\n if (!(entity instanceof ShulkerEntity) && !entity.noClip) {\n entity.move(MoverType.SHULKER, new Vector3d(d1 * (double)direction2.getXOffset(), d1 * (double)direction2.getYOffset(), d1 * (double)direction2.getZOffset()));\n }\n }\n }\n }\n }\n\n }",
"private void move() {\n acceleration.accelerate(velocity, position);\r\n }",
"public void move() {\n\t\tthis.move(velocity.x, velocity.y);\n\t}",
"public void move() {\n\t\tdouble xv = 0;\r\n\t\tdouble yv = 0;\r\n\t\t//this method allows the entity to hold both up and down (or left and right) and not move. gives for smooth direction change and movement\r\n\t\tif (moveRight) {\r\n\t\t\txv+=getSpeed();\r\n\t\t\torientation = Orientation.EAST;\r\n\t\t}\r\n\t\tif (moveLeft) {\r\n\t\t\txv-=getSpeed();\r\n\t\t\torientation = Orientation.WEST;\r\n\t\t}\r\n\t\tif (moveUp)\r\n\t\t\tyv-=getSpeed();\r\n\t\tif (moveDown)\r\n\t\t\tyv+=getSpeed();\r\n\t\tif (!doubleEquals(xv,0) || !doubleEquals(yv,0)) {\r\n\t\t\t((Player)this).useMana(0.1);\r\n\t\t\tImageIcon img = new ImageIcon(\"lib/assets/images/fireball.png\");\r\n\t\t\tBufferedImage image = new BufferedImage(32,32,BufferedImage.TYPE_INT_ARGB);\r\n\t\t\tGraphics g = image.getGraphics();\r\n\t\t\tg.drawImage(img.getImage(), 0, 0, image.getWidth(), image.getHeight(), null);\r\n\t\t\tColor n = loop[ind%loop.length];\r\n\t\t\tind++;\r\n\t\t\timage = ImageProcessor.scaleToColor(image, n);\r\n\t\t\t//PopMessage.addPopMessage(new PopMessage(image,getX(),getY()));\r\n\t\t}\r\n\t\telse\r\n\t\t\t((Player)this).useMana(-0.1);\r\n\t\tmove(xv,yv);\r\n\t}",
"public void act()\n {\n setPosition(posX + liftDirection[0] * liftSpeed, posY\n + liftDirection[1] * liftSpeed);\n setLocation(posToLoc(posX, posY));\n\n if (posY < 50)\n removeSelf();\n }",
"@Override\n\tpublic void live(long _dt) {\n\t\tList<IPerceivable> surroundingEntities = getPerceptions();\n\n\t\tVector2f newDirection = decide(surroundingEntities);\n\n\t\tmove(newDirection);\n\n\t}",
"public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }",
"public void creatureMoved(long creatureId, float diffX, float diffY, float diffZ, int diffTileX, int diffTileY, boolean passenger) throws NoSuchCreatureException, NoSuchPlayerException {\n/* 2734 */ Creature creature = Server.getInstance().getCreature(creatureId);\n/* */ \n/* 2736 */ int tileX = this.tilex + diffTileX;\n/* 2737 */ int tileY = this.tiley + diffTileY;\n/* 2738 */ boolean changedLevel = false;\n/* 2739 */ if (diffTileX != 0 || diffTileY != 0) {\n/* */ \n/* 2741 */ if (!creature.isPlayer()) {\n/* */ \n/* 2743 */ boolean following = (creature.getLeader() != null || creature.isRidden() || creature.getHitched() != null);\n/* 2744 */ boolean godown = false;\n/* 2745 */ if (this.surfaced && following)\n/* */ {\n/* 2747 */ if (creature.isRidden() || creature.getHitched() != null) {\n/* */ \n/* 2749 */ if (creature.getHitched() != null) {\n/* */ \n/* 2751 */ Creature rider = Server.getInstance().getCreature((creature.getHitched()).pilotId);\n/* 2752 */ if (!rider.isOnSurface())\n/* */ {\n/* 2754 */ godown = true;\n/* */ }\n/* */ } else {\n/* */ \n/* */ \n/* */ try {\n/* */ \n/* 2761 */ if (creature.getMountVehicle() != null) {\n/* */ \n/* 2763 */ Creature rider = Server.getInstance().getCreature((creature.getMountVehicle()).pilotId);\n/* 2764 */ if (!rider.isOnSurface())\n/* */ {\n/* 2766 */ godown = true;\n/* */ }\n/* */ } else {\n/* */ \n/* 2770 */ logger.log(Level.WARNING, \"Mount Vehicle is null for ridden \" + creature.getWurmId());\n/* */ } \n/* 2772 */ } catch (NoSuchCreatureException noSuchCreatureException) {\n/* */ \n/* */ \n/* */ }\n/* 2776 */ catch (NoSuchPlayerException noSuchPlayerException) {}\n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ }\n/* 2782 */ else if (creature.getLeader() != null) {\n/* */ \n/* */ \n/* 2785 */ if (!creature.getLeader().isOnSurface()) {\n/* 2786 */ godown = true;\n/* */ }\n/* */ } \n/* */ }\n/* 2790 */ if (!this.surfaced) {\n/* */ \n/* 2792 */ if (this.isTransition && Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(tileX, tileY)))) {\n/* */ \n/* 2794 */ changedLevel = true;\n/* 2795 */ creature.getStatus().setLayer(0);\n/* */ }\n/* 2797 */ else if (creature.getLeader() != null) {\n/* */ \n/* 2799 */ if (creature.getLeader().isOnSurface())\n/* */ {\n/* 2801 */ if (!this.isTransition)\n/* */ {\n/* */ \n/* 2804 */ changedLevel = true;\n/* 2805 */ creature.getStatus().setLayer(0);\n/* */ }\n/* */ \n/* */ }\n/* */ } \n/* 2810 */ } else if (Tiles.decodeType(Server.surfaceMesh.getTile(tileX, tileY)) == Tiles.Tile.TILE_HOLE.id || (godown && \n/* 2811 */ Tiles.isMineDoor(Tiles.decodeType(Server.surfaceMesh.getTile(tileX, tileY))))) {\n/* */ \n/* 2813 */ changedLevel = true;\n/* 2814 */ creature.getStatus().setLayer(-1);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 2828 */ VolaTile nextTile = Zones.getTileOrNull(tileX, tileY, isOnSurface());\n/* 2829 */ if (nextTile != null)\n/* */ {\n/* 2831 */ if (nextTile.getStructure() != null && creature.getBridgeId() != nextTile.getStructure().getWurmId()) {\n/* */ \n/* 2833 */ if ((nextTile.getBridgeParts()).length > 0)\n/* */ {\n/* 2835 */ for (BridgePart bp : nextTile.getBridgeParts()) {\n/* */ \n/* */ \n/* */ \n/* 2839 */ int ht = Math.max(0, creature.getPosZDirts());\n/* */ \n/* */ \n/* 2842 */ if (Math.abs(ht - bp.getHeightOffset()) < 25)\n/* */ {\n/* 2844 */ if (bp.hasAnExit()) {\n/* 2845 */ creature.setBridgeId(nextTile.structure.getWurmId());\n/* */ }\n/* */ }\n/* */ } \n/* */ }\n/* 2850 */ } else if (creature.getBridgeId() > 0L && (nextTile\n/* 2851 */ .getStructure() == null || nextTile.getStructure().getWurmId() != creature\n/* 2852 */ .getBridgeId())) {\n/* */ \n/* 2854 */ boolean leave = true;\n/* 2855 */ BridgePart[] parts = getBridgeParts();\n/* 2856 */ if (parts != null)\n/* */ {\n/* 2858 */ for (BridgePart bp : parts) {\n/* */ \n/* 2860 */ if (bp.isFinished())\n/* */ {\n/* */ \n/* 2863 */ if (bp.getDir() == 0 || bp.getDir() == 4) {\n/* */ \n/* 2865 */ if (getTileY() == nextTile.getTileY())\n/* */ {\n/* 2867 */ leave = false;\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 2872 */ else if (getTileX() == nextTile.getTileX()) {\n/* */ \n/* 2874 */ leave = false;\n/* */ } \n/* */ }\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* 2881 */ if (leave)\n/* 2882 */ creature.setBridgeId(-10L); \n/* */ } \n/* */ }\n/* */ } \n/* 2886 */ if (!changedLevel && this.zone.covers(tileX, tileY)) {\n/* */ \n/* 2888 */ VolaTile newTile = this.zone.getOrCreateTile(tileX, tileY);\n/* 2889 */ newTile.addCreature(creature, diffZ);\n/* */ } else {\n/* */ \n/* */ \n/* */ try {\n/* */ \n/* 2895 */ this.zone.removeCreature(creature, changedLevel, false);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 2902 */ Zone newZone = Zones.getZone(tileX, tileY, creature.isOnSurface());\n/* 2903 */ newZone.addCreature(creature.getWurmId());\n/* */ \n/* */ \n/* */ }\n/* 2907 */ catch (NoSuchZoneException sex) {\n/* */ \n/* 2909 */ logger.log(Level.INFO, sex.getMessage() + \" this tile at \" + this.tilex + \",\" + this.tiley + \", diff=\" + diffTileX + \", \" + diffTileY, (Throwable)sex);\n/* */ } \n/* */ } \n/* */ \n/* 2913 */ if (!passenger)\n/* 2914 */ this.zone.createTrack(creature, this.tilex, this.tiley, diffTileX, diffTileY); \n/* */ } \n/* 2916 */ if (this.isTransition) {\n/* */ \n/* 2918 */ if (!passenger)\n/* */ {\n/* */ \n/* */ \n/* 2922 */ updateNeighbourTileDoors(creature, this.tilex, this.tiley);\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 2927 */ else if (!passenger) {\n/* 2928 */ doorCreatureMoved(creature, diffTileX, diffTileY);\n/* */ } \n/* 2930 */ if (!changedLevel && !passenger)\n/* */ {\n/* 2932 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 2936 */ if (diffZ * 10.0F <= 127.0F && diffZ * 10.0F >= -128.0F) {\n/* */ \n/* */ \n/* 2939 */ if (vz.creatureMoved(creatureId, diffX, diffY, diffZ, diffTileX, diffTileY))\n/* */ {\n/* 2941 */ logger.log(Level.INFO, \"Forcibly removing watcher \" + vz);\n/* 2942 */ removeWatcher(vz);\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 2947 */ if (logger.isLoggable(Level.FINEST))\n/* */ {\n/* 2949 */ logger.finest(creature.getName() + \" moved more than byte max (\" + '' + \") or min (\" + -128 + \") in z: \" + diffZ + \" at \" + this.tilex + \", \" + this.tiley + \" surfaced=\" + \n/* */ \n/* 2951 */ isOnSurface());\n/* */ }\n/* 2953 */ makeInvisible(creature);\n/* 2954 */ makeVisible(creature);\n/* */ }\n/* */ \n/* 2957 */ } catch (Exception ex) {\n/* */ \n/* 2959 */ logger.log(Level.WARNING, \"Exception when \" + creature.getName() + \" moved at \" + this.tilex + \", \" + this.tiley + \" tile surf=\" + \n/* 2960 */ isOnSurface() + \" cret onsurf=\" + creature.isOnSurface() + \": \", ex);\n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* 2965 */ if (creature instanceof Player && !passenger && creature.getBridgeId() != -10L)\n/* */ {\n/* */ \n/* 2968 */ if (getStructure() != null && getStructure().isTypeBridge()) {\n/* 2969 */ getStructure().setWalkedOnBridge(System.currentTimeMillis());\n/* */ }\n/* */ }\n/* */ }",
"public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\t\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (gr.isValid(next2)) {\n\t\t\tmoveTo(next2);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t}",
"@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}",
"public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }",
"protected void execute() {\n \tif (m_moving)\n \t{\n \t\tdouble direction;\n \tif (Math.abs(Gyro.getYaw() - m_desiredYaw) < m_tolerance)\n \t{\n \t\tdirection = 0;\n \t\tm_moving = false;\n \t\tm_cameraThread = new CameraThread();\n \t\tm_cameraThread.start();\n \t\tRobot.getDriveBase().teleopDrive(0.0, 0.0);\n \t}\n \telse\n \t{\n\t \tif (Gyro.getYaw() < m_desiredYaw)\n\t \t{\n\t \t\tdirection = 1;\n\t \t}\n\t \telse\n\t \t{\n\t \t\tdirection = -1;\n\t \t}\n\t \t\n\t \tif (((Gyro.getYaw() - m_lastYaw) * direction) - (m_degreesPerSecond / 50) > m_intervalTolerance)\n\t \t{\n\t \t\tm_speed -= 0.05;\n\t \t}\n\t \telse if (((Gyro.getYaw() - m_lastYaw) * direction) - (m_degreesPerSecond / 50) < (m_intervalTolerance * -1))\n\t \t{\n\t \t\tm_speed += 0.05;\n\t \t}\n\t \t\n\t \tif (Math.abs((Gyro.getYaw() - m_lastYaw) + Gyro.getYaw() / Math.abs(m_desiredYaw)) >= m_percentDegreesToSlow)\n\t \t{\n\t \t\tm_speed -= 0.007;\n\t \t}\n\t \t\n\t \tif (m_speed < 0)\n\t \t{\n\t \t\tm_speed = 0.0;\n\t \t}\n\t \telse if (m_speed > 1)\n\t \t{\n\t \t\tm_speed = 1.0;\n\t \t}\n\t \t\n\t \tRobot.getDriveBase().teleopDrive(0.0, m_speed * direction);\n\t \tm_lastYaw = Gyro.getYaw();\n \t}\n \t}\n \telse\n \t{\n\t \tif (m_cameraThread.isAlive() == false)\n\t \t{\n\t \t\tif (m_cameraThread.weHaveAShot())\n\t \t\t{\n\t \t\t\tif (Gyro.getYaw() >= CameraThread.desiredLeftYaw() && Gyro.getYaw() <= CameraThread.desiredRightYaw())\n\t \t\t\t{\n\t \t\t\t\tm_onTarget = true;\n\t \t\t\t}\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tm_desiredYaw = CameraThread.desiredCenterYaw();\n\t\t \t\t\tm_moving = true;\n\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tdouble pixels = m_cameraThread.shotAngleError();\n\t \t\t\t//m_desiredYaw = CameraThread.yawWhenPicture() - pixels * 54 / 640;\n\t \t\t\tm_desiredYaw = CameraThread.yawWhenPicture() - pixels * 0.075; //try with 61 / 640\n\t \t\t\tif (Math.abs(Gyro.getYaw() - m_desiredYaw) < m_tolerance)\n\t \t\t\t{\n\t \t\t\t\tm_onTarget = true;\n\t \t\t\t}\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tm_moving = true;\n\t \t\t\t}\n\t \t\t}\n\t \t}\n \t}\n \tSmartDashboard.putNumber(\"Desired Yaw\", m_desiredYaw);\n \t\n \tSystem.out.println(\"speed: \" + m_speed);\n \tSystem.out.println(\"desired yaw: \" + m_desiredYaw);\n \tSystem.out.println(\"is moving: \" + m_moving);\n }",
"public void updateStep() {\n if (level != null) {\n // erst bewegung beenden, dann aktivitaet\n pacman.endMove();\n pacman.update(this);\n checkCollisions();\n // beendet die bewegungen von entities sofort, sonst keine aktivitaet\n GameEntity e;\n for (GameEntity entity : entities) {\n e = entity;\n // erst aktivitaet, dann bewegung beenden\n e.update(this);\n if (e instanceof MovingEntity)\n ((MovingEntity) e).endMove();\n }\n checkCollisions();\n }\n }",
"public void makeMove(Location loc)\n {\n if (loc == null)\n removeSelfFromGrid();\n else\n {\n int newDirection = getLocation().getDirectionToward(loc);\n Location nextLocation = getLocation().getAdjacentLocation(newDirection);\n Actor otherActor = getGrid().get(nextLocation);\n if(otherActor != null)\n {\n if(otherActor instanceof AbstractPokemon)\n {\n AbstractPokemon otherPokemon = (AbstractPokemon) otherActor;\n battle(otherPokemon);\n }\n else\n {\n PokemonTrainer otherTrainer = (PokemonTrainer) otherActor;\n battleTrainer(otherTrainer);\n }\n }\n if(getGrid() != null)\n moveTo(loc);\n }\n }",
"@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}",
"public void act(){\n if (alive) {\n x = x + vx * dt;\n vx = vx * (1. - daempfung); //Luftwiderstand, eventuell muss dass nur in der Spielerklasse implementiert\n //werden, damit die Pilze nicht abgebremst werden.\n if (bewegung == Bewegung.fallen) {\n y = y + vy * dt;\n vy = vy + g * dt;\n }\n }\n }",
"public MovementController(Creature owner) {\n super(owner);\n _movementCompleted = null;\n _movementFailed = null;\n _destinationLocation = null;\n _waypoints = new ConcurrentLinkedQueue<>();\n _movementTick = System.currentTimeMillis();\n _movementTask = null;\n _followTarget = null;\n }",
"@Override\n\tpublic void move() {\n\t\ttry {\n\t\t\tTimeUnit.SECONDS.sleep(new Random().nextInt(5));\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Tank moving...\");\n\t}",
"@Override\n public void execute() {\n ImmutableVector loc = translationalLocationEstimator.estimateLocation();\n ImmutableVector goalPoint = purePursuitMovementStrategy.update(loc, lookahead.getLookahead());\n\n Path path = purePursuitMovementStrategy.getPath();\n PathSegment current = path.getCurrent();\n ImmutableVector closestPoint = current.getClosestPoint(loc);\n absoluteDistanceUsed = current.getAbsoluteDistance(closestPoint);\n speedUsed = current.getSpeed(absoluteDistanceUsed);\n translationalLocationDriveable.driveTowardTransLoc(speedUsed, goalPoint);\n }",
"private void move() {\n\t\t\tx += Math.PI/12;\n\t\t\thead.locY = intensity * Math.cos(x) + centerY;\n\t\t\thead.yaw = spinYaw(head.yaw, 3f);\n\t\t\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, head.getId(), \n\t\t\t\tnew Location(player.getWorld(), head.locX, head.locY, head.locZ, head.yaw, 0));\n\t\t}",
"@Override\n public void move() {\n if (movementCooldown > 0) {\n movementCooldown --;\n } else {\n super.move();\n movementCooldown = MAX_MOVEMENT_COOLDOWN;\n }\n }",
"@Override\n public void move() {\n switch (direction){\n case SOUTH:\n position.setY(position.getY() + currentSpeed);\n break;\n case NORTH:\n position.setY(position.getY() - currentSpeed);\n break;\n case WEST:\n position.setX(position.getX() - currentSpeed);\n break;\n case EAST:\n position.setX(position.getX() + currentSpeed);\n }\n }",
"private void wander(){\n\t\tmonster.moveRandom();\r\n\t\tsaveMove();\r\n\t}",
"@Override\n\tpublic boolean update(){\n\t\tif(dead){ return true; }\n\t\tfieldOfView.setOwnerId(this.ownerId);\n\t\tupdateHealthBar();\n\t\tupdateTexture();\n\t\tregenHealth();\n\t\tadjustAttackspeed();\n\t\tattack();\n\t\treturn false;\n\t}",
"public void move() { \n\t\tSystem.out.println(\"MOVING\");\n\t\tswitch(direction) {\n\t\t\tcase NORTH: {\n\t\t\t\tyloc -= ySpeed;\n\t\t\t}\n\t\t\tcase SOUTH: {\n\t\t\t\tyloc+= xSpeed;\n\t\t\t}\n\t\t\tcase EAST: {\n\t\t\t\txloc+= xSpeed;\n\t\t\t}\n\t\t\tcase WEST: {\n\t\t\t\txloc-= xSpeed;\n\t\t\t}\n\t\t\tcase NORTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase NORTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc+=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc+= ySpeed;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\t\t\t\t\t\n\t\t\t\tswitch(this.direct)\n\t\t\t\t{\n\t\t\t\tcase 0:\n\t\t\t\t\t//说明坦克正在向上移动,坦克在一个方向上走30\n\t\t\t\t\t//再换方向\n\t\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(y>0&&!this.isTouchOtherEnemy())\n\t\t\t\t\t\t{\n\t\t\t\t\t y-=speed;\n\t\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(50);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(x<360&&!this.isTouchOtherEnemy())\n\t\t\t\t\t\t{\n\t\t\t\t x+=speed;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(50);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t break;\n\t\t\t\tcase 2:\n\t\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(y<235&&!this.isTouchOtherEnemy())\n\t\t\t\t\t\t{\n\t\t\t\t\t y+=speed;\n\t\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(50);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tfor(int i=0;i<30;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(x>0&&!this.isTouchOtherEnemy())\n\t\t\t\t\t\t{\n\t\t\t\t\t x-=speed;\n\t\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(50);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//让敌人的额坦克可以连续打子弹\n\t\t\t\tthis.times++;\n\t\t\t\tif(times%2==0)\n\t\t\t\t{\n\t\t\t\t\tif(isLive)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(hcShoot.size()<5)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t Shoot s=null;\n\t\t\t\t\t\t //没有子弹,添加\n\t\t\t\t\t\t\t\t\t\tswitch(direct)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\t\ts=new Shoot(x+10,y,0);\n\t\t\t\t\t\t\t\t\t\t\thcShoot.add(s);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t\t\ts=new Shoot(x+30,y+10,1);\n\t\t\t\t\t\t\t\t\t\t\thcShoot.add(s);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\t\ts=new Shoot(x+10,y+30,2);\n\t\t\t\t\t\t\t\t\t\t\thcShoot.add(s);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\t\t\ts=new Shoot(x,y+10,3);\n\t\t\t\t\t\t\t\t\t\t\thcShoot.add(s);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//启动子弹线程\n\t\t\t\t\t\t\t\t\t\tThread t=new Thread(s);\n\t\t\t\t\t\t\t\t\t\tt.start();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t//让坦克随机产生一个新的方向\n\t\t\t\tthis.direct=(int)(Math.random()*4);\n\t\t\t\t//判断敌人的坦克是否死亡\n\t\t\t\tif(this.isLive==false)\n\t\t\t\t{ \n\t\t\t\t\t//敌人的坦克死亡后退出线程\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t}",
"@Override\n\tpublic void update() {\n\n\t\t//Get current time\n\t\tdouble currentTime = System.currentTimeMillis();\n\t\tdouble movement = ((currentTime - previousTime) * movementSpeed) / 1000.0;\n\t\t\n\t\t//Create a translation vector\n\t\tVector translation = new Vector(2);\n\n\t\tboolean moving = false;\n\t\t\n\t\t//Determine which keys are pressed\n\t\tif(Directory.inputManager.isKeyPressed('w')){\n\t\t\t//Set translation Vector to move up\n\t\t\ttranslation.setComponent(1, translation.getComponent(1)-movement);\n\t\t\tattachedTo.getSprite().playAnimation(3, true);\n\t\t\tmoving = true;\n\t\t}\n\t\tif(Directory.inputManager.isKeyPressed('s')){\n\t\t\t//Set translation vector to move down\n\t\t\ttranslation.setComponent(1, translation.getComponent(1) + movement);\n\t\t\tattachedTo.getSprite().playAnimation(2, true);\n\t\t\tmoving = true;\n\n\t\t}\n\t\tif(Directory.inputManager.isKeyPressed('a')){\n\t\t\t//Set translation Vector to move left\n\t\t\ttranslation.setComponent(0, translation.getComponent(0)-movement);\n\t\t\tattachedTo.getSprite().playAnimation(0, true);\n\t\t\tmoving = true;\n\n\t\t}\n\t\tif(Directory.inputManager.isKeyPressed('d')){\n\t\t\t//Set translation Vector to move right\n\t\t\ttranslation.setComponent(0, translation.getComponent(0)+movement);\n\t\t\tattachedTo.getSprite().playAnimation(1, true);\n\t\t\tmoving = true;\n\n\t\t}\n\t\t\n\t\tif(!moving) attachedTo.getSprite().setRepeating(false);\n\t\t\n\t\t//Move this gameObject\n\t\tgetAttachedMObj().move(translation);\n\t\t\n\t\t//Update previous time\n\t\tpreviousTime = currentTime;\n\t\t\t\n\t}",
"public void update(MazeEventTeleported e) {\r\n }",
"public void act() \r\n {\r\n move();\r\n }",
"public final void doMovement(final boolean isRunning) {\r\n\t\tif (!isMoving()) {\r\n\t\t\tif (isRunning) {\r\n\t\t\t\tmovementTime = EntityConstants.RUN_TIME;\r\n\t\t\t} else {\r\n\t\t\t\tmovementTime = EntityConstants.WALK_TIME;\r\n\t\t\t}\r\n\t\t\tgetWrappedEntity().doMovement();\r\n\t\t\tmoveStart = System.currentTimeMillis();\r\n\t\t\tprocessMovement();\r\n\t\t}\r\n\t}",
"void startMovement();",
"public void move() {\n\t\t// Override move so we don't move, then get location set by owner.\n\t}",
"@Override\r\n\tpublic void move()\r\n\t{\r\n\t\t//Updates the X and Y position by using dx and dy\r\n float x = location.getX() + dx;\r\n float y = location.getY() + dy;\r\n \r\n //Updates the particle emitter's position to the missiles current position\r\n emitter.setPosition(this.getPositionX(), this.getPositionY(),false);\r\n \r\n //Updates the location of the missile\n setLocation(x, y);\n\t}",
"@Override\n public void update(Entity entity, MapManager mapMgr, float delta) {\n\n updateBoundingBoxPosition(nextEntityPosition);\n updatePortalLayerActivation(mapMgr);\n\n if (!isCollisionWithMapLayer(entity, mapMgr) && (!isCollision(entity, mapMgr)) && state == Entity.State.WALKING) {\n setNextPositionToCurrent(entity, mapMgr, delta);\n Camera camera = mapMgr.getCamera();\n camera.position.set(currentEntityPosition.x, currentEntityPosition.y, 0f);\n camera.update();\n } else {\n updateBoundingBoxPosition(currentEntityPosition);\n //if direction key has been lifted stop moving\n\n //TODO bug where if player is walking against a wall switching direction\n //TODO will not break out of the walk\n /*if(motion == Entity.Motion.STANDING)\n {\n entity.sendMessage(MESSAGE.CURRENT_STATE, json.toJson(Entity.State.IDLE));\n }*/\n }\n\n if (isMining) {\n tileToMine = getFacingTile(entity,mapMgr);\n entity.sendMessage(MESSAGE.MINING_GRAPHICS, json.toJson(tileToMine));\n isMining = false;\n }\n if (motion == Entity.Motion.STANDING) {\n //only call calculate position once\n calculateNextPosition(delta);\n }\n tileToMine = getFacingTile(entity, mapMgr);\n //System.out.print(\"Tile x \" + tileToMine.x + \"Tile Y \" + tileToMine.y);\n }",
"@Override\n\tpublic void update(Monster monster) {\n\t\t\n\t}",
"private void movementPhase() {\n ClickObserver.getInstance().setCreatureFlag(\"\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n TheCupGUI.update();\n Board.removeCovers();\n }\n });\n for (Player p : playerList) {\n \tplayer = p;\n player.flipAllUp();\n\t ClickObserver.getInstance().setActivePlayer(player);\n\t ClickObserver.getInstance().setCreatureFlag(\"Movement: SelectMovers\");\n\t InfoPanel.uncover(player.getName());\n\t if (p.getHexesWithPiece().size() > 0) {\n\t \tClickObserver.getInstance().setClickedTerrain(p.getHexesWithPiece().get(0));\n\t }\n\t pause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tClickObserver.getInstance().whenTerrainClicked();\n \t GUI.getHelpText().setText(\"Movement Phase: \" + player.getName()\n + \", Move your armies\");\n \t Game.getRackGui().setOwner(player);\n }\n });\n\t \n\t while (isPaused) {\n \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t }\n\t InfoPanel.cover(player.getName());\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n ClickObserver.getInstance().setCreatureFlag(\"\");\n }",
"@Override\n public void update(long now) {\n if (moveRequested) {\n if (canMove(direction)) {\n doMove(direction);\n }\n }\n moveRequested = false;\n\n if(isDamageTaken()){\n invicibleTimer.StartTimer(now);\n setDamageTaken(false);\n }\n\n this.invicibleTimer.update(now);\n setCanTakeDamage(invicibleTimer.isFinished() || !invicibleTimer.isRunnig());\n\n }",
"@Override\n\tpublic void act(float delta) {\n\t\tsuper.act(delta);\n\t\t\n\t\tif(PWM.instance().pointIsInObstacle(this.getX(), this.getY())){\n\t\t\tif(!PWM.instance().pointIsInObstacle(this.getX(), lastPos.y)){\n\t\t\t\tthis.setPosition(this.getX(), lastPos.y);\n\t\t\t}else if(!PWM.instance().pointIsInObstacle(lastPos.x, this.getY())){\n\t\t\t\tthis.setPosition(lastPos.x, this.getY());\n\t\t\t}else{\n\t\t\t\tthis.setPosition(lastPos.x, lastPos.y);\n\t\t\t}\n\t\t\t\n\t\t\tthis.lastPos.x = this.getX();\n\t\t\tthis.lastPos.y = this.getY();\n\t\t\t\n\t\t}\t\t\t\t\n\t\t\n\t\tmainCameraFollowHero();\n\t\t\n\t\t\n\t}",
"public void move() {\n\t\tthis.hero.setPF(1);\n\t\tthis.hero.setState(this.hero.getMoved());\n\t}",
"public void move() {\n if (!canMove) {\n return;\n }\n int moveX = currDirection == EAST ? PACE : currDirection == WEST ? -PACE : 0;\n int moveY = currDirection == NORTH ? PACE : currDirection == SOUTH ? -PACE : 0;\n if (grid == null || grid.isOutside(currX + moveX, currY + moveY)) {\n return;\n }\n currX += moveX;\n currY += moveY;\n }",
"@Override\n public void update(double millis) throws InvalidDataException {\n myMovable.update(millis);\n }",
"protected final void run(int direction) {\n\t\tint temp_x = x_coord;\n\t\tint temp_y = y_coord;\n\t//Update location (*2 because we move twice in same direction)\t\n\t\tif (!hasMoved) {\n\t\t\ttemp_x += (x_directions[direction] * 2);\n\t\t\ttemp_x += Params.world_width;\n\t\t\ttemp_x %= Params.world_width;\n\t\t\ttemp_y += (y_directions[direction] * 2);\n\t\t\ttemp_y += Params.world_height;\n\t\t\ttemp_y %= Params.world_height;\n\t\t}\n\t//Specific to running during fight\n\t\tif (fightMode) {\n\t\t\tboolean critterInLocation = false;\n\t\t\tfor (Critter c: population) {\n\t\t\t\tif ((c.x_coord == temp_x) && (c.y_coord == temp_y)) {\n\t\t\t\t\tcritterInLocation = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!critterInLocation) {\n\t\t\t\tx_coord = temp_x;\n\t\t\t\ty_coord = temp_y;\n\t\t\t}\n\t\t}\n\t\telse {\t\t\t\t\t//Specific to walking in time step\n\t\t\tx_coord = temp_x;\n\t\t\ty_coord = temp_y;\n\t\t}\n\t//Update energy\n\t\tenergy -= Params.run_energy_cost;\n\t//Update hasMoved\n\t\thasMoved = true;\n\t}",
"public void prisonerUpdate(){\r\n\t\t//check if a enemy has been spotted\r\n\t\tif (checkSight()){\r\n\t\t\tseen = true;\r\n\t\t} if (seen) {\r\n\t\t\tcreature.setSpeed(1.5);\r\n\t\t\tchaseEnemy(seenEnemy, 5);\r\n\t\t\treturn; //if player has been spotted end method here\r\n\t\t}\r\n\t\t//if no enemy has been spotted\r\n\t\tcreature.setSpeed(1);\r\n\t\tcreature.setAttacking(false);\r\n\t\troamArea();\r\n\t\tif (!checkCollision(x, y)) {\r\n\t\tgoToLocation(x, y);\r\n\t\t}\r\n\t}",
"public MoveToTask(final Point start, final Point target, final MapEntity entity, final BlockadeMap blockadeMap) {\n\t\t_start = start;\n\t\t_target = target;\n\t\t_entity = entity;\n\n\t\tPathfindingAlgorithm pathfinder = new AStarPathfinder();\n\t\t_movementQueue = pathfinder.findPath(_start, _target, blockadeMap);\n\n\t\tif (_movementQueue != null) {\n\t\t\t_totalDuration = _movementQueue.size();\n\t\t} else {\n\t\t\tLOG.trace(\"Could not find a valid path.\");\n\t\t\t_totalDuration = 0;\n\t\t}\n\t}",
"public void update()\n\t{\n\t\tif(currentState == moving)\n\t\t{\n\t\t\tx += xSpeed;\n\t\t\ty += ySpeed;\n\t\t\t\n\t\t\tif(x < 0 || x > world.getSIMULATION_WIDTH() - individualSize)\n\t\t\t\trandomizeDirection();\n\t\t\tif(y < 0 || y > world.getSIMULATION_HEIGHT() - individualSize)\n\t\t\t\trandomizeDirection();\n\t\t\t\n\t\t\tif(x < 0)\n\t\t\t\tx = 0;\n\t\t\tif(x > world.getSIMULATION_WIDTH() - individualSize)\n\t\t\t\tx = world.getSIMULATION_WIDTH() - individualSize;\n\t\t\t\n\t\t\tif(y < 0)\n\t\t\t\ty = 0;\n\t\t\tif(y > world.getSIMULATION_HEIGHT() - individualSize)\n\t\t\t\ty = world.getSIMULATION_HEIGHT() - individualSize;\n\t\t}\n\t\tfor(PlayPauseTimer timer: timerList)\n\t\t\ttimer.update();\n\t\tworld.locationUpdate(this);\n\t}",
"public void update() {\n\t\tif (state == AbilityState.INITIALIZING && (initializeAnimation == null || initializeAnimation.isDone())) {\n\t\t\tresetCooldown();\n\t\t\tif (canDamageAnimation != null) {\n\t\t\t\tstate = AbilityState.CAN_DAMAGE;\n\t\t\t} else if (expirationAnimation != null) {\n\t\t\t\tstate = AbilityState.HAS_EXPIRED;\n\t\t\t} else {\n\t\t\t\tstate = AbilityState.IS_DONE;\n\t\t\t}\n\t\t} else if (state == AbilityState.CAN_DAMAGE && (canDamageAnimation == null || canDamageAnimation.isDone())) {\n\t\t\tif (expirationAnimation != null) {\n\t\t\t\tstate = AbilityState.HAS_EXPIRED;\n\t\t\t} else {\n\t\t\t\tstate = AbilityState.IS_DONE;\n\t\t\t}\n\t\t} else if (state == AbilityState.HAS_EXPIRED && (expirationAnimation == null || expirationAnimation.isDone())) {\n\t\t\tstate = AbilityState.IS_DONE;\n\t\t}\n\n\t\tAnimation currentAnimation = null;\n\t\tswitch(state) {\n\t\t\tcase INITIALIZING:\n\t\t\t\tcurrentAnimation = initializeAnimation;\n\t\t\t\tbreak;\n\t\t\tcase CAN_DAMAGE:\n\t\t\t\tcurrentAnimation = canDamageAnimation;\n\t\t\t\tbreak;\n\t\t\tcase HAS_EXPIRED:\n\t\t\t\tcurrentAnimation = expirationAnimation;\n\t\t\t\tbreak;\n\t\t\tcase IS_DONE:\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (currentAnimation != null) {\n\t\t\tcurrentAnimation.update();\n\t\t\tif (!currentAnimation.isDone()) {\n\t\t\t\tint additionalX = entity.getFacingEast()? 0: entity.getImageIcon().getIconWidth()-2*currentAnimation.getOffsetX()-currentAnimation.getSize().width;\n\t\t\t\tcurrentAnimation.setPosition(entity.getPosX()+additionalX, entity.getPosY());\n\t\t\t\tcurrentAnimation.shouldMirror(!entity.getFacingEast());\n\t\t\t}\n\t\t}\n\t}",
"protected void execute() {\n \tlockedOn();\n \tif (lockedOn) {\n \t\tupdateLocked();\n \t} else if (hasLockedOn) {\n \t\tupdateNotLocked();\n \tnew RotateTurretToAngle(angle()).start();\n \t}\n }",
"public void update()\r\n\t{\n\t\t\r\n\t\tif (Game.clock > nextMoveTime)\r\n\t\t{\r\n\t\t\t//If there is a mob in front of the arrow, damage it. Otherwise, move the arrow\r\n\t\t\tTile frontTile = getAdjacentTile(rotation);\r\n\t\t\tMob frontMob = null;\r\n\t\t\tif (frontTile != null)\r\n\t\t\t{\r\n\t\t\t\tfrontMob = frontTile.getMob();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (frontMob != null)\r\n\t\t\t{\r\n\t\t\t\t//damage the mob, then remove this arrow\r\n\t\t\t\tfrontMob.damage(atkDmg);\r\n\t\t\t\tGame.tiles.get(y).get(x).getItems().remove(this);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmove();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//set the next move time (only allow moves during an update check)\r\n\t\t\tnextMoveTime = Game.clock + timePerMove;\r\n\t\t}\r\n\t}",
"public void ghostMovementController() {\n TimerTask taskScapeGhost = new TimerTask() {\n @Override\n public void run() {\n if (!pacman.isEatable()) {\n for (Ghost ghost : ghosts) {\n //ruta de escape\n if (ghost.doesExist()) {\n ghost.searchRouteGhost(pacman);\n }\n seconds++;\n }\n repaint();\n }\n if (seconds > TIME_TO_CHANGE_GHOST) {\n pacman.setEatable();\n for (Ghost ghost : ghosts) {\n //ruta de escape\n if (ghost.doesExist()) {\n ghost.setEatable(false);\n }\n }\n }\n }\n };\n TimerTask task = new TimerTask() {\n @Override\n public void run() {\n if (pacman.isEatable()) {\n for (Ghost ghost : ghosts) {\n if (ghost.doesExist()) {\n ghost.searchRouteGhost(pacman);\n }\n }\n repaint();\n } else {\n for (Ghost ghost : ghosts) {\n if (!ghost.doesExist()) {\n ghost.setEatable(false);\n ghost.live();\n ghost.searchRouteGhost(pacman);\n }\n }\n repaint();\n }\n }\n };\n timer.schedule(taskScapeGhost, DELAY_TIMER, PERIOD_TIMER_GHOST);\n timer.schedule(task, DELAY_TIMER, PERIOD_TIMER);\n }",
"void move() throws IOException, InterruptedException{\r\n \r\n // if current position and velocity are greater than 0 and less than the right edge of the screen\r\n if (x + xa > 0 && x + xa < 1280-w){\r\n // increase the character position by velocity\r\n x = x + xa;\r\n }\r\n \r\n // if current height and velocity are greater than zero and less than the floor of the game\r\n if (y + ya > 0 && y + ya < 500){\r\n // if jumping up\r\n if (y > 300){\r\n y = y + ya;\r\n } else{ // if falling down, increase velocity to 3\r\n ya = 3;\r\n y = y + ya;\r\n }\r\n }\r\n \r\n // if a collision is detected increase life counter\r\n if (game.collision()){\r\n // increase life counter\r\n count++;\r\n // call game over to load next image or to close game\r\n game.gameOver(count);\r\n } \r\n }",
"public void move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}",
"public void moveRaw(Creature c, int x, int y){\r\n if(c.area.map[c.y][c.x] instanceof Door) ((Door)c.area.map[c.y][c.x]).stepOff(c);\r\n c.area.graph.moveOff(c.x, c.y);\r\n if(c.area.map[c.y][c.x] instanceof Water) \r\n Main.animator.addAnimation(new WaterStepAnimation(c.x, c.y));\r\n c.setXY(x, y);\r\n c.area.graph.moveOn(c.x, c.y);\r\n c.area.getGases(c.x, c.y).stream().forEach(gas -> c.addBuff(gas.buff));\r\n if(c.area.map[c.y][c.x] instanceof StepListener){\r\n ((StepListener)c.area.map[c.y][c.x]).steppedOn(c);\r\n }\r\n c.FOV.update(c.x, c.y, c.area);\r\n }",
"public void move() {\n float diffX = cDestination.getX() - getCenterX();\n float diffY = cDestination.getY() - getCenterY();\n\n float newX = cPosition.getX() + cSpeed * Math.signum(diffX);\n float newY = cPosition.getY() + cSpeed * Math.signum(diffY);\n\n cPosition.setX(newX);\n cPosition.setY(newY);\n }",
"public void update() {\n if (!outOfBounds()) {\n super.move(dirVec.mul(ShadowDefend.getTimescale() * speed));\n }\n super.update();\n }",
"@Override\n\tpublic void update() {\n\t\tkeyFrame++;\n\t\tif(keyFrame > 60)\n\t\t\tsetDead(true);\n\t\tif(move)\n\t\t\tif(!isDead())\n\t\t\t\tpositionY += getSpeed();\n\t}",
"@Override\n\tpublic void updatePosition()\n\t{\n\t\tif(!fired && !pathfinding)\n\t\t{\n\t\t\tif(x == destX && y == destY)\n\t\t\t{\n\t\t\t\tfired = true;\n\t\t\t\tvehicle.msgAnimationDestinationReached();\n\t\t\t\tcurrentDirection = MovementDirection.None;\n\t\t\t\t\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\tif(cIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t{\n\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(allowedToMove || drunk)\n\t\t\t{\n\t\t\t\tswitch(currentDirection)\n\t\t\t\t{\n\t\t\t\t\tcase Right:\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Down:\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:\n\t\t\t\t\t\tx--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x % CityPanel.GRID_SIZE == 0 && y % CityPanel.GRID_SIZE == 0 && !moves.isEmpty())\n\t\t\t{\t\n\t\t\t\tif(allowedToMove || drunk)\n\t\t\t\t{\n\t\t\t\t\tcurrentDirection = moves.pop();\n\t\t\t\t\n\t\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\t\n\t\t\t\t\tif(current != next)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrent = next;\n\t\t\t\t\t\n\t\t\t\t\tswitch(currentDirection)\n\t\t\t\t\t{\n\t\t\t\t\tcase Down:next = new Point(current.x,current.y + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:next = new Point(current.x - 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Right:next = new Point(current.x + 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:next = new Point(current.x,current.y - 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:next = current;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[next.y][next.x].tryAcquire())\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(next.y).get(next.x);\n\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Pathfinder.isCrossWalk(next, city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(Gui g : guiList)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(g instanceof PassengerGui)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(nextIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextIntersection.acquireAll();\n\t\t\t\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tguiList.add(this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!allowedToMove && drunk)\n\t\t{\n\t\t\tcity.addGui(new ExplosionGui(x,y));\n\t\t\tSystem.out.println(\"DESTROYING\");\n\t\t\tcity.removeGui(this);\n\t\t\tvehicle.stopThread();\n\t\t\tsetPresent(false);\n\t\t\t\n\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\n\t\t\tif(cIntersection == null)\n\t\t\t{\n\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t{\n\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t{\n\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t}\n\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void execute() {\n sClimber.setMotorSpeed(-stick.getRawAxis(1));\n //sIntake.WristMove(mWristAngle);\n //sElevator.setPositionLowGear(mElevatorHieght);\n // SmartDashboard.putNumber(\"Wrist Volts\", RobotMap.WristMotor.getMotorOutputVoltage());\n }",
"public void execute() {\r\n\t\tif(policy.moveByPolicy(level2d))\r\n\t\titem.move_up(level2d);\r\n\t\telse\r\n\t\t\tSystem.out.println(\"cant do the action\");\r\n\t\t\r\n\t}",
"public void updatePosition(double dt)\n {\n if (!projectedVelocity.equals(Vector3.ZERO))\n {\n projectedPosition = projectedPosition.add(projectedVelocity.multiply(dt));\n }\n }",
"public void onUpdate()\n {\n super.onUpdate();\n this.jumpMovementFactor = 0.0F;\n this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;\n\n if (this.target != null && this.target instanceof EntityLiving)\n {\n EntityLiving var1 = (EntityLiving) this.target;\n\n if (var1.getHealth() <= 0 || !this.canEntityBeSeen(var1))\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n } else\n {\n if (this.target != null && this.target.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n\n if (this.target == null)\n {\n this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);\n\n if (this.target == null)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n\n return;\n }\n }\n }\n\n if (this.posX == (double) this.getOrgX() && this.posY == (double) this.getOrgY() && this.posZ == (double) this.getOrgZ())\n {\n if (!this.isReformed())\n {\n this.setReformed(true);\n }\n\n this.stop();\n this.moveTimer = 0;\n }\n\n if (this.slider == null)\n {\n Vec3 var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n MovingObjectPosition var18 = this.worldObj.rayTraceBlocks(var16, var2);\n var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n\n if (var18 != null)\n {\n var2 = Vec3.createVectorHelper(var18.hitVec.xCoord, var18.hitVec.yCoord, var18.hitVec.zCoord);\n }\n\n if (!this.worldObj.isRemote)\n {\n Object var4 = null;\n List var15 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(4.0D, 4.0D, 4.0D));\n double var6 = 0.0D;\n\n for (int var8 = 0; var8 < var15.size(); ++var8)\n {\n Entity var9 = (Entity) var15.get(var8);\n\n if (var9.canBeCollidedWith() && var9 != this)\n {\n float var10 = 0.3F;\n\n if (var9 instanceof EntitySlider)\n {\n this.slider = (EntitySlider) var9;\n var18 = null;\n }\n\n AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);\n MovingObjectPosition var12 = var11.calculateIntercept(var16, var2);\n\n if (var12 != null)\n {\n double var13 = var16.distanceTo(var12.hitVec);\n\n if (var13 < var6 || var6 == 0.0D)\n {\n var6 = var13;\n }\n }\n }\n }\n }\n\n if (this.slider == null || this.slider.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n }\n } else if (this.slider.target != this.target)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n } else\n {\n this.fallDistance = 0.0F;\n double var17;\n double var5;\n double var3;\n\n if (this.gotMovement)\n {\n if (this.isCollided)\n {\n var17 = this.posX - 0.5D;\n var3 = this.boundingBox.minY + 0.75D;\n var5 = this.posZ - 0.5D;\n\n if (this.crushed)\n {\n this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, \"random.explode\", 3.0F, (0.625F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);\n this.worldObj.playSoundAtEntity(this, \"aeboss.slider.collide\", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));\n }\n\n this.stop();\n } else\n {\n if (this.speedy < 2.0F)\n {\n this.speedy += 0.035F;\n }\n\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n\n if (this.direction == 0)\n {\n this.motionY = (double) this.speedy;\n\n if (this.boundingBox.minY > (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY + 0.35D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 1)\n {\n this.motionY = (double) (-this.speedy);\n\n if (this.boundingBox.minY < (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY - 0.25D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 2)\n {\n this.motionX = (double) this.speedy;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 3)\n {\n this.motionX = (double) (-this.speedy);\n\n if (this.posX < (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 4)\n {\n this.motionZ = (double) this.speedy;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 5)\n {\n this.motionZ = (double) (-this.speedy);\n\n if (this.posZ < (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n }\n }\n } else\n {\n this.motionY = 0.0D;\n\n if (this.moveTimer > 0)\n {\n --this.moveTimer;\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n } else\n {\n var17 = Math.abs(this.posX - (this.reform ? (double) this.getOrgX() : this.target.posX));\n var3 = Math.abs(this.boundingBox.minY - (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY));\n var5 = Math.abs(this.posZ - (this.reform ? (double) this.getOrgZ() : this.target.posZ));\n\n if (var17 > var5)\n {\n this.direction = 2;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX))\n {\n this.direction = 3;\n }\n } else\n {\n this.direction = 4;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ))\n {\n this.direction = 5;\n }\n }\n\n if (var3 > var17 && var3 > var5 || var3 > 0.25D && this.rand.nextInt(5) == 0)\n {\n this.direction = 0;\n\n if (this.posY > (this.reform ? (double) this.getOrgY() : this.target.posY))\n {\n this.direction = 1;\n }\n }\n\n this.gotMovement = true;\n }\n }\n\n if (this.harvey > 0.01F)\n {\n this.harvey *= 0.8F;\n }\n }\n }",
"protected void execute() {\n \tif(Robot.robotState != Robot.RobotState.Climbing)\n \t\tRobot.shooter.speed(speed);\n }",
"public void guardUpdate(){\r\n\t\t//check if a enemy has been spotted\r\n\t\tif (checkSight()){\r\n\t\t\tseen = true;\r\n\t\t} if (seen) {\r\n\t\t\tcreature.setSpeed(1.5);\r\n\t\t\tchaseEnemy(seenEnemy, 5);\r\n\t\t\treturn; //if player has been spotted end method here\r\n\t\t}\r\n\t\t//if no enemy has been spotted\r\n\t\tcreature.setSpeed(1);\r\n\t\tif (creature.getCreature().equals(CreatureType.PGuard) || creature.getCreature().equals(CreatureType.SGuard)){ //Patrol Guards and Stationary Guards\r\n\t\t\tif (index > checkpoints.size()-1){\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t\tgoToLocation (checkpoints.get(index));\r\n\t\t} else if(creature.getCreature().equals(CreatureType.RGuard)){ //Roaming Guards\r\n\t\t\troamArea();\r\n\t\t} if (!checkCollision(x, y)) {\r\n\t\t\tgoToLocation(x, y);\r\n\t\t}\r\n\t}",
"public void updateTimedTasks() {\n if (TimedEventQueue.validTask(this)) {\n String action = TimedEventQueue.getTask().getAction();\n if (action.equals(\"gravityCancelOver\")) {\n this.gravityCancel = false;\n this.yVel = 0;\n } else if (action.equals(\"dodgeCoolDownOver\")) {\n this.dodgeCoolDown = false;\n } else if (action.equals(\"breakSpecialState\")) {\n this.breakSpecialState();\n } else if (action.equals(\"activeAttackState\")) {\n this.activeAttackState = true;\n } else if (action.equals(\"activeAttackStateOver\")) {\n this.activeAttackState = false;\n } else if (action.equals(\"heavySideSpeedUp\")) {\n this.setxTargetSpeed(Util.scaleX(25));\n } else if (action.equals(\"resetXMovement\")) {\n this.resetXMovement();\n }\n } \n }",
"public void updateTask() {}",
"@Override\r\n public void act() \r\n {\n int posx = this.getX();\r\n int posy = this.getY();\r\n //calculamos las nuevas coordenadas\r\n int nuevox = posx + incx;\r\n int nuevoy = posy + incy;\r\n \r\n //accedemos al mundo para conocer su tamaño\r\n World mundo = this.getWorld();\r\n if(nuevox > mundo.getWidth())//rebota lado derecho\r\n {\r\n incx = -incx;\r\n }\r\n if(nuevoy > mundo.getHeight())//rebota en la parte de abajo\r\n {\r\n incy = -incy;\r\n }\r\n \r\n if(nuevoy < 0)//rebota arriba\r\n {\r\n incy = -incy;\r\n }\r\n if(nuevox < 0)//rebota izquierda\r\n {\r\n incx = -incx;\r\n }\r\n //cambiamos de posicion a la pelota\r\n this.setLocation(nuevox,nuevoy);\r\n }",
"public void onLivingUpdate()\n {\n super.onLivingUpdate();\n double moveSpeed = this.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.MOVEMENT_SPEED).getAttributeValue();\n if (timetopee-- < 0 && !bumgave)\n {\n isJumping = false;\n\n if (bumrotation == 999F)\n {\n bumrotation = rotationYaw;\n }\n\n rotationYaw = bumrotation;\n moveSpeed = 0.0F;\n\n if (!onGround)\n {\n motionY -= 0.5D;\n }\n \n /* TODO\n if(worldObj.isRemote)\n {\n \tMCW.proxy.pee(worldObj, posX, posY, posZ, rotationYaw, modelsize);\n } */\n\n if (timetopee < -200)\n {\n timetopee = rand.nextInt(600) + 600;\n bumrotation = 999F;\n int j = MathHelper.floor_double(posX);\n int k = MathHelper.floor_double(posY);\n int l = MathHelper.floor_double(posZ);\n\n for (int i1 = -1; i1 < 2; i1++)\n {\n for (int j1 = -1; j1 < 2; j1++)\n {\n if (rand.nextInt(3) != 0)\n {\n continue;\n }\n\n Block k1 = worldObj.getBlockState(new BlockPos(j + j1, k - 1, l - i1)).getBlock();\n Block l1 = worldObj.getBlockState(new BlockPos(j + j1, k, l - i1)).getBlock();\n\n if (rand.nextInt(2) == 0)\n {\n if ((k1 == Blocks.GRASS || k1 == Blocks.DIRT) && l1 == Blocks.AIR)\n {\n worldObj.setBlockState(new BlockPos(j + j1, k, l - i1), Blocks.YELLOW_FLOWER.getDefaultState());\n }\n\n continue;\n }\n\n if ((k1 == Blocks.GRASS || k1 == Blocks.DIRT) && l1 == Blocks.AIR)\n {\n \tworldObj.setBlockState(new BlockPos(j + j1, k, l - i1), Blocks.RED_FLOWER.getDefaultState());\n }\n }\n }\n }\n }\n }",
"@Override\n public void updateAI(Entity entity, ServerGameModel model, double seconds) {\n BuildingSpawnerStratAIData data = entity.<BuildingSpawnerStratAIData>get(AI_DATA);\n data.elapsedTime += seconds;\n while (data.elapsedTime > timeBetweenSpawns(entity)) {\n data.elapsedTime -= timeBetweenSpawns(entity);\n if (data.spawnCounter < maxActive(entity)) {\n if (!canAttack()) {\n // Find possible spawn points: cells not blocked by hard entities.\n Set<GridCell> neighbors = model.getNeighbors(model.getCell((int) (double) entity.getX(),\n (int) (double) entity.getY()));\n Set<GridCell> passable = neighbors.stream().filter(GridCell::isPassable).collect(Collectors.toSet());\n\n // If cell directly below it is clear, spawn it there. Otherwise, find another\n // open neighboring cell to spawn the entity.\n if (passable.contains(model.getCell((int) (double) entity.getX(), (int) (double) entity.getY() + 1))) {\n Entity newEntity = makeEntity(entity.getX(), entity.getY() + 1, entity.getTeam(), entity, model);\n model.processMessage(new MakeEntityRequest(newEntity));\n newEntity.onDeath((e, serverGameModel) -> {\n data.spawnCounter--;\n data.spawned.remove(e);\n });\n data.spawnCounter++;\n data.spawned.add(newEntity);\n } else if (!passable.isEmpty()) {\n Entity newEntity = makeEntity(passable.iterator().next().getCenterX(),\n passable.iterator().next().getCenterY(), entity.getTeam(), entity, model);\n model.processMessage(new MakeEntityRequest(newEntity));\n newEntity.onDeath((e, serverGameModel) -> {\n data.spawnCounter--;\n data.spawned.remove(e);\n });\n data.spawnCounter++;\n data.spawned.add(newEntity);\n }\n } else {\n Collection<Entity> attackable = attackableEnemies(entity, model);\n if (!attackable.isEmpty()) {\n Entity closest = getClosestEnemy(attackable, entity, model);\n Entity newEntity = makeEntity(closest.getX(), closest.getY(), entity.getTeam(), entity, model);\n model.processMessage(new MakeEntityRequest(newEntity));\n newEntity.onDeath((e, serverGameModel) -> {\n data.spawnCounter--;\n data.spawned.remove(e);\n });\n data.spawnCounter++;\n data.spawned.add(newEntity);\n }\n }\n }\n if (entity.getUpgraded()) {\n for (Entity e : data.spawned) {\n e.setUpgraded(false);\n e.set(LEVEL, entity.get(LEVEL));\n // TODO UP grade other stuff\n }\n }\n }\n }",
"@Override\n public void action(){\n\n Position move=this.findWeed();\n if(move.getX()==0 && move.getY()==0){\n super.action();\n }\n else{\n System.out.println(this.getClass().getSimpleName());\n int actualX = this.position.getX();\n int actualY = this.position.getY();\n int xAction = actualX+move.getX();\n int yAction = actualY+move.getY();\n Organism tmpOrganism = this.WORLD.getOrganism(xAction, yAction);\n if(tmpOrganism==null){\n this.move(move.getX(), move.getY());\n this.WORLD.erasePosition(actualX,actualY);\n }\n else{\n tmpOrganism.collision(this, actualX, actualY, move);\n }\n }\n }",
"protected void updatePosition() {\n\t\tif(motion == null) {\n\t\t\tmotion = new Motion3D(player, true);\n\t\t} else motion.update(player, true);\n\t\t\n\t\tmotion.applyToEntity(this);\n\t\tthis.rotationPitch = player.rotationPitch;\n\t\tthis.rotationYaw = player.rotationYaw;\n\t}",
"public void update(){\n if (bossMoveTime > 10){\n if(random(0,16) <= 8){\n dir = 1;\n }else{\n dir = -1;\n }\n velX *= dir;\n bossMoveTime = 0;\n }\n posY *= 0.8f;\n posX += velX;\n posY += velY;\n angle += 0.04f;\n bossMoveTime++;\n }"
] | [
"0.68343645",
"0.6301684",
"0.60743135",
"0.60702306",
"0.6070025",
"0.6046484",
"0.60330206",
"0.59209824",
"0.58736694",
"0.5856078",
"0.5840566",
"0.583608",
"0.5833726",
"0.5815882",
"0.5777243",
"0.5773958",
"0.57726383",
"0.5744203",
"0.57348806",
"0.57201594",
"0.5715915",
"0.57114846",
"0.56978744",
"0.5686921",
"0.5677142",
"0.56724167",
"0.5650831",
"0.5650238",
"0.5632323",
"0.562865",
"0.56281257",
"0.56207836",
"0.56206983",
"0.5585297",
"0.55840266",
"0.5581496",
"0.5569578",
"0.55654824",
"0.55631787",
"0.55601734",
"0.5547637",
"0.5541573",
"0.5541189",
"0.55385613",
"0.5537847",
"0.55221933",
"0.5518565",
"0.55120355",
"0.5510449",
"0.5503326",
"0.5502336",
"0.54996586",
"0.5497896",
"0.5486454",
"0.548533",
"0.54849964",
"0.5483711",
"0.5482332",
"0.5470748",
"0.54699033",
"0.54681754",
"0.5466478",
"0.54657406",
"0.54607064",
"0.54581916",
"0.545501",
"0.5440681",
"0.5437194",
"0.5435194",
"0.5430929",
"0.54303014",
"0.54206",
"0.5413882",
"0.54103225",
"0.54083496",
"0.54068637",
"0.54067475",
"0.5394141",
"0.53844464",
"0.53843755",
"0.53843105",
"0.53799844",
"0.5374042",
"0.5373678",
"0.5370467",
"0.537003",
"0.536312",
"0.53628",
"0.5362668",
"0.53626114",
"0.5361871",
"0.5361333",
"0.5358324",
"0.53563136",
"0.53551257",
"0.5355013",
"0.53364974",
"0.53360415",
"0.53297085",
"0.5324617"
] | 0.69226795 | 0 |
Sends a vehicle movement update whenever player moves. | private void notifyVehicleMovement() {
if (getOwner() != null && getOwner().isVehicle() && getOwner().getOwner() != null && getOwner().getOwner().isPlayer()) {
// getOwner().sendBroadcastPacket(new SMMoveNonPlayer(getOwner()));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void update(){\n\t\tupdatePlayerPosition();\n\t\thandleCollisions();\n\t}",
"public void update(Player player) {\n\t\t\n\t}",
"protected void doMovement(Player player, float modifier) {\n\t\tplayer.getLocation().x += player.getVelocity().x * modifier;\n\t\tplayer.getLocation().y += player.getVelocity().y * modifier;\n\t}",
"public void move(Entity player, int movement) {\n\n int id = player.getId();\n\n displacement(player, movement, id);\n\n\n }",
"public void updatemove() {\n\t\tmove = new Movement(getX(), getY(),dungeon,this);\n\t\t//System.out.println(\"Updated\");\n\t\tnotifys();\n\t\tif(this.getInvincible()) {\n\t\t\tsteptracer++;\n\t\t}\n\t\tdungeon.checkGoal();\n\t}",
"void playerPositionChanged(Player player);",
"@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)\n\tpublic void onPlayerMove(PlayerMoveEvent event) {\n\t\t\n\t\tlong time = new Date().getTime();\n\t\t\n\t\tthis.edhPlayer.PlayerUpdateLocation(event.getPlayer(),time);\n\t\n\t\tthis.edhPlayer.PlayerMove(event.getPlayer(), event.getPlayer().getVehicle() != null ? event.getPlayer().getVehicle().getClass() : null);\n\t}",
"public void update()\n {\n if (frames_since_update++ < UPDATE_AFTER_FRAMES)\n return;\n frames_since_update = 0;\n\n //For each vehicle in the world, determine which station is the closest.\n Actor[] actors = world.getActors();\n for (Actor actor: actors)\n {\n if (!(actor instanceof Vehicle))\n continue;\n Vehicle vehicle = (Vehicle) actor;\n\n //Iterate over each station until the closest one is found.\n Station closest_station = null;\n float closest_station_distance = Float.MAX_VALUE;\n for (Station station : stations)\n {\n if (station == null)\n continue;\n\n float new_distance = vehicle.distance(station);\n if (new_distance < closest_station_distance)\n {\n closest_station = station;\n closest_station_distance = new_distance;\n }\n }\n\n vehicle.setClosestStation(closest_station);\n }\n }",
"public void updatePlayer() {\n if(this.hasCam) {\n this.camDir.set(cam.getDirection()).multLocal(0.3f);\n this.camLeft.set(cam.getLeft()).multLocal(0.2f);\n //initialize the walkDirection value so it can be recalculated\n walkDirection.set(0,0,0);\n if (this.left) {\n this.walkDirection.addLocal(this.camLeft);\n }\n if (this.right) {\n this.walkDirection.addLocal(this.camLeft.negate());\n }\n if (this.up) {\n this.walkDirection.addLocal(this.camDir);\n }\n if (this.down) {\n this.walkDirection.addLocal(this.camDir.negate());\n }\n this.mobControl.setWalkDirection(this.walkDirection);\n //player.get\n cam.setLocation(this.mobControl.getPhysicsLocation().add(0,1.5f,0));\n this.setRootPos(this.mobControl.getPhysicsLocation().add(0,-0.75f,0));\n this.setRootRot(this.camDir, this.camLeft);\n }\n // If the actor control does not have ownership of cam, do nothing\n }",
"@Override\r\n public void update(Vehicle vehicle) {\n }",
"protected void manageMovement(boolean localUpdate, Player player, PacketBuilder packet) {\n int movementUpdateId = (localUpdate && (player.basicSettings().isTeleporting() || player.basicSettings().isMapRegionUpdate())) ? 3\n : (player.getDirections().getSecondDirection() != null ? 2\n : (player.getDirections().getDirection() != null ? 1\n : (player.getMasks().requiresUpdate() ? 0\n : -1)));\n /*\n * put basic movement header in\n */\n packet.putBits(1, movementUpdateId == -1 ? 0 : 1);\n\n if (movementUpdateId != -1) {\n /*\n * tell the client that our player teleported/changeregion, has movement, or is standing still.\n */\n packet.putBits(2, movementUpdateId);\n if (movementUpdateId == 3) {\n /**\n * Apply custom/scrambled bits for Teleport/region change\n */\n handleRegionChange(player, packet);\n } else if (movementUpdateId > 0) {\n /*\n * Write the primary sprite (i.e. walk direction).\n */\n packet.putBits(3, player.getDirections().getDirection().intValue());\n if (movementUpdateId == 2) {\n /*\n * Write the secondary sprite (i.e. run direction).\n */\n packet.putBits(3, player.getDirections().getSecondDirection().intValue());\n }\n /*\n * Write a flag indicating if a block update happened.\n */\n packet.putBits(1, player.getMasks().requiresUpdate() ? 1 : 0);\n }\n }\n }",
"@Override\n public void run() {\n updateMovement();\n }",
"public void move() {\n float xpos = thing.getX(), ypos = thing.getY();\n int xdir = 0, ydir = 0;\n if (left) xdir -= SPEED; if (right) xdir += SPEED;\n if (up) ydir -= SPEED; if (down) ydir += SPEED;\n xpos += xdir; ypos += ydir;\n\n VeggieCopter game = thing.getGame();\n int w = game.getWindowWidth(), h = game.getWindowHeight();\n int width = thing.getWidth(), height = thing.getHeight();\n if (xpos < 1) xpos = 1; if (xpos + width >= w) xpos = w - width - 1;\n if (ypos < 1) ypos = 1; if (ypos + height >= h) ypos = h - height - 1;\n thing.setPos(xpos, ypos);\n }",
"void updatePlayer(Player player);",
"private void move() {\n resetUpdate();\n\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.resetGameMessage();\n gameMessage.notify(gameMessage);\n\n\n if( liteGame.isWinner() ) endOfTheGame = true;\n }",
"private void move() {\n\t\t\tangle += Math.PI/24;\n\t\n\t\t\tcow.locX = Math.sin(angle) * 2.5 + player.getLocation().getX();\n\t\t\tcow.locZ = Math.cos(angle) * 2.5 + player.getLocation().getZ();\n\t\t\t\n\t\t\tLocation loc = new Location(player.getWorld(), cow.locX, player.getLocation().getY() + 1.5, cow.locZ);\n\t\t\tloc.setDirection(player.getLocation().subtract(loc).toVector()); //Look at the player\n\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, cow.getId(), loc);\n\t\t}",
"@Override\n public void move() {\n switch (direction){\n case SOUTH:\n position.setY(position.getY() + currentSpeed);\n break;\n case NORTH:\n position.setY(position.getY() - currentSpeed);\n break;\n case WEST:\n position.setX(position.getX() - currentSpeed);\n break;\n case EAST:\n position.setX(position.getX() + currentSpeed);\n }\n }",
"public void move() {\n\t\tdouble xv = 0;\r\n\t\tdouble yv = 0;\r\n\t\t//this method allows the entity to hold both up and down (or left and right) and not move. gives for smooth direction change and movement\r\n\t\tif (moveRight) {\r\n\t\t\txv+=getSpeed();\r\n\t\t\torientation = Orientation.EAST;\r\n\t\t}\r\n\t\tif (moveLeft) {\r\n\t\t\txv-=getSpeed();\r\n\t\t\torientation = Orientation.WEST;\r\n\t\t}\r\n\t\tif (moveUp)\r\n\t\t\tyv-=getSpeed();\r\n\t\tif (moveDown)\r\n\t\t\tyv+=getSpeed();\r\n\t\tif (!doubleEquals(xv,0) || !doubleEquals(yv,0)) {\r\n\t\t\t((Player)this).useMana(0.1);\r\n\t\t\tImageIcon img = new ImageIcon(\"lib/assets/images/fireball.png\");\r\n\t\t\tBufferedImage image = new BufferedImage(32,32,BufferedImage.TYPE_INT_ARGB);\r\n\t\t\tGraphics g = image.getGraphics();\r\n\t\t\tg.drawImage(img.getImage(), 0, 0, image.getWidth(), image.getHeight(), null);\r\n\t\t\tColor n = loop[ind%loop.length];\r\n\t\t\tind++;\r\n\t\t\timage = ImageProcessor.scaleToColor(image, n);\r\n\t\t\t//PopMessage.addPopMessage(new PopMessage(image,getX(),getY()));\r\n\t\t}\r\n\t\telse\r\n\t\t\t((Player)this).useMana(-0.1);\r\n\t\tmove(xv,yv);\r\n\t}",
"@Override\n\tpublic void update(){\n\t\tif(right && !left)\n\t\t{\n\t\t\tif(player1.getX() < cm.getGameStateManager().getWidth() - player1.getBounds().getWidth())\n\t\t\t\tplayer1.setX(player1.getX()+8);\n\t\t}\n\t\tif(!right && left)\n\t\t{\n\t\t\tif(player1.getX() > 0)\n\t\t\t\tplayer1.setX(player1.getX()-8);\n\t\t}\n\t\t\n\t\tcheckBarrelBounds();\n\t\ttry{\n\t\t\tcheckPlayerCollision();\t\t\n\t\t\trefreshData();\n\t\t}catch(IOException e){\n\t\t\tSystem.err.println(\"no connection with server\");\n\t\t}\n\t\tplayer1.update();\n\t\tplayer2.update();\n\t\tplayerIndication.update();\n\t}",
"private void updateMovement() {\n if (_movementTask == null) {\n return;\n }\n\n if (getOwner().isDead() || _followTarget != null && _followTarget.isDead()) {\n cancelMoveTask2(true);\n return;\n }\n\n // Movement is invalid! Queue a new movement and wait again!\n if (_destinationLocation == null)\n {\n if (_waypoints.peek() != null) {\n _destinationLocation = _waypoints.poll();\n\n if (getOwner().getLocation().getGameSector() != null && getOwner().getLocation().getGameSector().hasActiveNeighbours()) {\n double validatedZ = GeoService.getInstance().validateZ(_destinationLocation.getX(), _destinationLocation.getY(), _destinationLocation.getZ());\n if (validatedZ == Double.MIN_VALUE) {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n\n if (_destinationLocation != null) {\n _destinationLocation.setZ(validatedZ);\n }\n else {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n _isSectorActive = true;\n }\n else {\n _isSectorActive = false;\n }\n notifySector(true);\n }\n else\n {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n }\n\n if (_destinationLocation != null) {\n // Update current character movement, the location.\n float deltaTime = (System.currentTimeMillis() - _movementTick) / 1000.0f;\n float movementSpeed = getOwner().getActionStorage().getMoveSpeed();\n if (getOwner().getActionStorage().getAction().getActionChartActionT().getApplySpeedBuffType().isMove()) {\n movementSpeed *= (getOwner().getGameStats().getMoveSpeedRate().getMoveSpeedRate() + 1_000_000.0f) / 1_000_000.0f;\n }\n\n Location ownerLocation = getOwner().getLocation();\n\n double movementDirectionX = _destinationLocation.getX() - ownerLocation.getX();\n double movementDirectionY = _destinationLocation.getY() - ownerLocation.getY();\n double movementDirectionZ = _destinationLocation.getZ() - ownerLocation.getZ();\n\n double directionLength = Math.sqrt(Math.pow(movementDirectionX, 2) + Math.pow(movementDirectionY, 2) + Math.pow(movementDirectionZ, 2));\n movementDirectionX /= directionLength;\n movementDirectionY /= directionLength;\n movementDirectionZ /= directionLength;\n\n ownerLocation.setXYZ(\n ownerLocation.getX() + movementDirectionX * movementSpeed * deltaTime,\n ownerLocation.getY() + movementDirectionY * movementSpeed * deltaTime,\n ownerLocation.getZ() + movementDirectionZ * movementSpeed * deltaTime\n );\n\n if (_isSectorActive && !_navigationType.isAir()) {\n double validatedZ = GeoService.getInstance().validateZ(ownerLocation.getX(), ownerLocation.getY(), ownerLocation.getZ());\n if (validatedZ == Double.MIN_VALUE) {\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n\n ownerLocation.setZ(validatedZ);\n }\n\n if (ownerLocation.isValid() && World.getInstance().getWorldMap().updateLocation(getOwner(), ownerLocation.getX(), ownerLocation.getY())) {\n double distanceToPoint = MathUtils.getDistance(ownerLocation, _destinationLocation) - getOwner().getTemplate().getBodySize();\n notifyVehicleMovement();\n\n if (_followTarget != null) {\n distanceToPoint -= _followTarget.getTemplate().getBodySize();\n\n if (!MathUtils.isInRange(_destinationLocation, _followTarget.getLocation(), 150)) {\n _destinationLocation.setLocation(_followTarget.getLocation());\n notifySector(true);\n } else { // No more waypoint's available. Send movement stop and events.\n if (distanceToPoint < 75 || distanceToPoint < getOwner().getTemplate().getAttackRange() && getOwner().getAi().getBehavior().isChase()) {\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(false);\n onMovementComplete();\n }\n }\n } else {\n // Check if we are near another destination, then we will\n // switch to another waypoint instead to continue our journey.\n Location nextWaypoint = _waypoints.peek();\n if (nextWaypoint != null) {\n if (distanceToPoint < 100) {\n _destinationLocation = null;\n }\n } else { // No more waypoint's available. Send movement stop and events.\n if (distanceToPoint < 75 || distanceToPoint < getOwner().getTemplate().getAttackRange() && getOwner().getAi().getBehavior().isChase()) {\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(false);\n onMovementComplete();\n }\n }\n }\n } else {\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n }\n }\n _movementTick = System.currentTimeMillis();\n }",
"@EventHandler\n public void handlePlayerMove(final PlayerMoveEvent event) {\n\n final Player player = event.getPlayer();\n\n // check if the player is affected by the troll.\n if(!playersAffected.contains(player.getUniqueId())) {\n return;\n }\n\n player.setAllowFlight(true);\n player.setVelocity(player.getLocation().getDirection().setZ(.1).setX(.1));\n player.setVelocity(player.getLocation().getDirection().setZ(-.1).setX(-.1));\n player.setVelocity(player.getLocation().getDirection().setY(-9));\n player.setAllowFlight(false);\n player.setWalkSpeed(.000001F);\n\n }",
"public void move() { \n\t\tSystem.out.println(\"MOVING\");\n\t\tswitch(direction) {\n\t\t\tcase NORTH: {\n\t\t\t\tyloc -= ySpeed;\n\t\t\t}\n\t\t\tcase SOUTH: {\n\t\t\t\tyloc+= xSpeed;\n\t\t\t}\n\t\t\tcase EAST: {\n\t\t\t\txloc+= xSpeed;\n\t\t\t}\n\t\t\tcase WEST: {\n\t\t\t\txloc-= xSpeed;\n\t\t\t}\n\t\t\tcase NORTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase NORTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc+=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc+= ySpeed;\n\t\t\t}\n\t\t}\n\t}",
"public void move() {\n\t\tthis.move(velocity.x, velocity.y);\n\t}",
"public Player updatePlayer(Player player);",
"public void update() {\n Dashboard.sendToDash(\"/update Servo \" + id + \" \" + servo.getPosition());\n }",
"private void updatePlayerMovingStatus(){\n // get player's moving status\n if(keyPressed.contains(KeyCode.LEFT)){\n player.setFacing(Direction.LEFT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.RIGHT)){\n player.setFacing(Direction.RIGHT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.UP)){\n player.setFacing(Direction.UP);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.DOWN)){\n player.setFacing(Direction.DOWN);\n player.setIsMoving(true);\n } else {\n player.setIsMoving(false);\n }\n }",
"private void move() {\n acceleration.accelerate(velocity, position);\r\n }",
"@Override\n\tpublic void update() {\n\n\t\t//Get current time\n\t\tdouble currentTime = System.currentTimeMillis();\n\t\tdouble movement = ((currentTime - previousTime) * movementSpeed) / 1000.0;\n\t\t\n\t\t//Create a translation vector\n\t\tVector translation = new Vector(2);\n\n\t\tboolean moving = false;\n\t\t\n\t\t//Determine which keys are pressed\n\t\tif(Directory.inputManager.isKeyPressed('w')){\n\t\t\t//Set translation Vector to move up\n\t\t\ttranslation.setComponent(1, translation.getComponent(1)-movement);\n\t\t\tattachedTo.getSprite().playAnimation(3, true);\n\t\t\tmoving = true;\n\t\t}\n\t\tif(Directory.inputManager.isKeyPressed('s')){\n\t\t\t//Set translation vector to move down\n\t\t\ttranslation.setComponent(1, translation.getComponent(1) + movement);\n\t\t\tattachedTo.getSprite().playAnimation(2, true);\n\t\t\tmoving = true;\n\n\t\t}\n\t\tif(Directory.inputManager.isKeyPressed('a')){\n\t\t\t//Set translation Vector to move left\n\t\t\ttranslation.setComponent(0, translation.getComponent(0)-movement);\n\t\t\tattachedTo.getSprite().playAnimation(0, true);\n\t\t\tmoving = true;\n\n\t\t}\n\t\tif(Directory.inputManager.isKeyPressed('d')){\n\t\t\t//Set translation Vector to move right\n\t\t\ttranslation.setComponent(0, translation.getComponent(0)+movement);\n\t\t\tattachedTo.getSprite().playAnimation(1, true);\n\t\t\tmoving = true;\n\n\t\t}\n\t\t\n\t\tif(!moving) attachedTo.getSprite().setRepeating(false);\n\t\t\n\t\t//Move this gameObject\n\t\tgetAttachedMObj().move(translation);\n\t\t\n\t\t//Update previous time\n\t\tpreviousTime = currentTime;\n\t\t\t\n\t}",
"public void movementStrategy() {\n System.out.println(\"Player has chosen\" + this.playerMovement);\n }",
"public void move(long fps) {\n if (xVelocity != 0) {\n worldLocation.x += xVelocity / fps;\n }\n if (yVelocity != 0) {\n worldLocation.y += yVelocity / fps;\n }\n }",
"public void move()\n {\n move(WALKING_SPEED);\n }",
"public void move()\n {\n if (!alive) {\n return;\n }\n\n if (speedTimer > 0) {\n speedTimer --;\n } else if (speedTimer == 0 && speed != DEFAULT_SPEED) {\n speed = DEFAULT_SPEED;\n }\n\n Location last = playerLocations.get(playerLocations.size()-1);\n Location next = null;\n\n // For the speed, iterate x blocks between last and next\n\n if (direction == UPKEY)\n {\n next = getLocation(last.getX(), (int)(last.getY() - speed * getPixelSize()));\n } else if (direction == DOWNKEY)\n {\n next = getLocation(last.getX(), (int)(last.getY() + speed * getPixelSize()));\n } else if (direction == LEFTKEY)\n {\n next = getLocation((int)(last.getX() - speed * getPixelSize()), last.getY());\n } else if (direction == RIGHTKEY)\n {\n next = getLocation((int)(last.getX() + speed * getPixelSize()), last.getY());\n }\n\n ArrayList<Location> line = getLine(last, next);\n\n if (line.size() == 0) {\n gameOver();\n return;\n }\n\n for (Location loc : line) {\n if (checkCrash (loc)) {\n gameOver();\n return;\n } else {\n // Former bug: For some reason when a player eats a powerup a hole appears in the line where the powerup was.\n Location l2 = getLocation(loc.getX(), loc.getY());\n l2.setType(LocationType.PLAYER);\n l2.setColor(this.col);\n\n playerLocations.add(l2);\n getGridCache().add(l2);\n }\n }\n }",
"@Override\n public void update(Input input, int delta) {\n move(SPEED * delta * (moveRight ? 1 : -1), 0);\n\n // check if the vehicle has moved off the screen\n if (getX() > App.SCREEN_WIDTH + World.TILE_SIZE / 2 || getX() < -World.TILE_SIZE / 2\n || getY() > App.SCREEN_HEIGHT + World.TILE_SIZE / 2 || getY() < -World.TILE_SIZE / 2) {\n setX(getInitialX());\n }\n\n if(getX() <= CHANGE_DIRECTION_1){\n moveRight = !moveRight;\n }\n\n if(getX() >= CHANGE_DIRECTION_2){\n moveRight = !moveRight;\n }\n }",
"public void updateMovement() {\n //if the x speed hasn't reached its max, increase the velocity\n if (Math.abs(this.xVel) < this.xTargetSpeed) {\n this.xVel += this.acceleration*this.dir;\n }\n\n //falling because of gravity -> freefall acceleration\n this.yVel += World.GRAVITY;\n\n //cling onto wall\n if (this.state.equals(\"onLeftWall\")\n || this.state.equals(\"onRightWall\")) {\n this.yVel -= World.GRAVITY/1.2;\n }\n\n this.x += this.xVel;\n \n if (!this.gravityCancel) {\n this.y += this.yVel;\n }\n }",
"@Override\r\n public void setupMove(double localTime) {\n if (mEntityMap.containsKey(mLocalCharId)) {\r\n Character localChar = (Character)mEntityMap.get(mLocalCharId);\r\n localChar.setController(Game.mCamera);\r\n ((Client)mEndPoint).sendUDP(localChar.getControl());\r\n\r\n ChatMessage chat = localChar.getChat();\r\n if (chat != null && chat.s != null) {\r\n System.err.println(\"Sending chat to server:\" + chat.s);\r\n ((Client)mEndPoint).sendTCP(chat);\r\n chat.s = null;\r\n }\r\n }\r\n\r\n // receive world state from server\r\n TransmitPair pair;\r\n for (;;) {\r\n pair = pollHard(localTime, 0);\r\n if (pair == null)\r\n break;\r\n\r\n if (pair.object instanceof StateMessage) {\r\n // Server updates client with state of all entities\r\n StateMessage state = (StateMessage) pair.object;\r\n applyEntityChanges(state.timestamp, state.data);\r\n\r\n // update clock correction based on packet timestamp, arrival time\r\n if (mClockCorrection == Double.MAX_VALUE) {\r\n mClockCorrection = state.timestamp - localTime;\r\n } else {\r\n mClockCorrection = Config.CORRECTION_WEIGHT * (state.timestamp - localTime)\r\n + (1 - Config.CORRECTION_WEIGHT) * mClockCorrection;\r\n }\r\n } else if (pair.object instanceof StartMessage) {\r\n // Server tells client which character the player controls\r\n mLocalCharId = ((StartMessage) pair.object).characterEntity;\r\n System.err.println(\"Client sees localid, \" + mLocalCharId);\r\n } else if (pair.object instanceof ChatMessage) {\r\n ChatMessage chat = (ChatMessage) pair.object;\r\n mChatDisplay.addChat(localTime, chat.s, Color.white);\r\n } else if (pair.object instanceof ChunkMessage) {\r\n ChunkMessage chunkMessage = (ChunkMessage) pair.object;\r\n ChunkModifier.client_putModified(chunkMessage);\r\n }\r\n }\r\n\r\n // move local char\r\n if (mEntityMap.containsKey(mLocalCharId)) {\r\n Character localChar = (Character)mEntityMap.get(mLocalCharId);\r\n localChar.setupMove(localTime);\r\n }\r\n }",
"private void move()\n\t{\n\t\tif(moveRight)\n\t\t{\n\t\t\tif(position.getX() + speedMovement <= width)\n\t\t\t{\n\t\t\t\tposition.setX(position.getX() +speedMovement+speedBoost);\n\t\t\t\tmoveRight = false;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tif(moveLeft)\n\t\t{\n\t\t\tif(position.getX() - speedMovement > 0)\n\t\t\t{\n\t\t\t\tposition.setX(position.getX() -speedMovement - speedBoost + gravitationalMovement);\n\t\t\t\tmoveLeft = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * If a gravitational field is pushing the ship, set the movement accordingly\n\t\t */\n\t\tif(gravitationalMovement>0)\n\t\t{\n\t\t\tif(position.getX()+gravitationalMovement <= width)\n\t\t\t\tposition.setX(position.getX() + gravitationalMovement);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(position.getX() + gravitationalMovement > 0)\n\t\t\t\tposition.setX(position.getX() + gravitationalMovement);\n\t\t}\n\t}",
"private void movePlayer() {\r\n\t\tshipImageView.setX(ship.getCurrentLocation().x * scalingFactor);\r\n\t\tshipImageView.setY(ship.getCurrentLocation().y * scalingFactor);\r\n\t\tship.notifyObservers();\r\n\t}",
"public void update()\n\t{\n\t\tif(currentState == moving)\n\t\t{\n\t\t\tx += xSpeed;\n\t\t\ty += ySpeed;\n\t\t\t\n\t\t\tif(x < 0 || x > world.getSIMULATION_WIDTH() - individualSize)\n\t\t\t\trandomizeDirection();\n\t\t\tif(y < 0 || y > world.getSIMULATION_HEIGHT() - individualSize)\n\t\t\t\trandomizeDirection();\n\t\t\t\n\t\t\tif(x < 0)\n\t\t\t\tx = 0;\n\t\t\tif(x > world.getSIMULATION_WIDTH() - individualSize)\n\t\t\t\tx = world.getSIMULATION_WIDTH() - individualSize;\n\t\t\t\n\t\t\tif(y < 0)\n\t\t\t\ty = 0;\n\t\t\tif(y > world.getSIMULATION_HEIGHT() - individualSize)\n\t\t\t\ty = world.getSIMULATION_HEIGHT() - individualSize;\n\t\t}\n\t\tfor(PlayPauseTimer timer: timerList)\n\t\t\ttimer.update();\n\t\tworld.locationUpdate(this);\n\t}",
"public void move()\n {\n x = x + unitVector.getValue(1)*speed;\n y = y + unitVector.getValue(2)*speed;\n }",
"public void update() {\n\t\t\n\t\t//System.out.println(this.observer);\n\t\t\n\t\tif(this.isCollidable == false){\n\t\t\tthis.x = -500;\n\t\t\tthis.y = -500;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (this.life < this.maxLife && !this.isDead()){\n\t\t\t\n\t\t\tif(recovery >= 1){\n\t\t\t\tthis.setLife(this.life + 1);\n\t\t\t\trecovery = 0;\n\t\t\t}\n\t\t\t\n\t\t\trecovery += 0.01;\n\t\t}\n\t\t\n\t\tsuper.update();\n\t\t\n\t\t//Shield movement\n\t\tInteger horizontalCorrection = (this.width - player.width)/2;\n\t\tInteger verticalCorrection = (this.height - player.height)/2;\n\n\t\t//Adjusting position player with force shield\n\t\tthis.x = player.x - horizontalCorrection;\n\t\tthis.y = player.y - verticalCorrection;\n\t}",
"public void update() {\n \n // move\n // Update velocity\n velocity.add(acceleration);\n // Limit speed\n velocity.limit(maxspeed);\n location.add(velocity);\n // Reset accelertion to 0 each cycle\n acceleration.mult(0);\n \n // decay life\n leftToLive = lifespan - (millis() - birth);\n }",
"public void update() {\n\t\tVec2 newPos = calculatePos();\n\t\t/* energy bar */\n\t\tfloat newEnergy = actor.getEnergy();\n\t\tfloat maxEnergy = actor.getEnergyLimit();\n\t\tenergy.setPosition(newPos.getX(), newPos.getY() + paddingHealth / Application.s_Viewport.getX(), newEnergy,\n\t\t\t\tmaxEnergy);\n\t\t/* health bar */\n\t\tfloat newHealth = actor.getHealth();\n\t\tfloat maxHealth = actor.getHealthLimit();\n\t\thealth.setPosition(newPos.getX(), newPos.getY() + paddingEnergy / Application.s_Viewport.getX(), newHealth,\n\t\t\t\tmaxHealth);\n\t\t/* name label */\n\t\tplayerName.setPosition(newPos.getX(), newPos.getY() + paddingName / Application.s_Viewport.getY());\n\t}",
"public void movement() {\n\n\t\t// If the player wants to move left ie presses 'a' key..\n\t\tif (spaceInvadersGame.getKeyManager().left) {\n\n\t\t\t// If the player is on the left bound of the window do not move.\n\t\t\tif (xPosition <= 0) {\n\n\t\t\t\t// Move the player's xPosition left.\n\t\t\t} else {\n\t\t\t\txPosition -= playerSpeed;\n\t\t\t}\n\n\t\t} else if (spaceInvadersGame.getKeyManager().right) {\n\t\t\tif (xPosition >= 500 - width) {\n\n\t\t\t} else {\n\t\t\t\txPosition += playerSpeed;\n\t\t\t}\n\t\t}\n\t}",
"public String move()\n {\n return \"Vehicle is moving \";\n }",
"@Override\n\tpublic void update() {\n\t\tkeyFrame++;\n\t\tif(keyFrame > 60)\n\t\t\tsetDead(true);\n\t\tif(move)\n\t\t\tif(!isDead())\n\t\t\t\tpositionY += getSpeed();\n\t}",
"public void move() {\n float diffX = cDestination.getX() - getCenterX();\n float diffY = cDestination.getY() - getCenterY();\n\n float newX = cPosition.getX() + cSpeed * Math.signum(diffX);\n float newY = cPosition.getY() + cSpeed * Math.signum(diffY);\n\n cPosition.setX(newX);\n cPosition.setY(newY);\n }",
"public void move()\r\n\t{\r\n\t\tmoveHor(xVel);\r\n\t\tmoveVert(yVel);\r\n\t}",
"public void update(){\n posX += velX;\n posY += velY;\n }",
"@Override\n public void update(float delta) {\n\tif (player.getState() == PlayerState.JUMPING) {\n\t walkingStateTime = 0;\n\t jumpingStateTime += delta;\n\t} else if (player.getState() == PlayerState.WALKING) {\n\t jumpingStateTime = 0;\n\t walkingStateTime += delta;\n\t} else if (player.getState() == PlayerState.IDLE) {\n\t walkingStateTime = 0;\n\t jumpingStateTime = 0;\n\t}\n\t\n }",
"private synchronized void updatePlayer(float deltaTime, float accelX, boolean touchDown) {\n\t\t\t\n\t\t\ttry {\n\t\t\tplayer.velocity.x = (float) (-accelX / 9.8 * Player.PLAYER_MOVE_VELOCITY);\n\t\t\t} catch(Exception e) {}\n\n\t\t\t\n\t\t\tif(touchDown) {\n\t\t\t\tplayer.velocity.y += Player.PLAYER_FLY_VELOCITY;\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif(player.velocity.y > 7) {\n\t\t\t\t\tplayer.velocity.y = 7;\n\t\t\t\t} else if(player.velocity.y < -7) {\n\t\t\t\t\tplayer.velocity.y = -7;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tplayer.update(deltaTime);\n\t\t\t} catch(Exception e) {}\n\t}",
"public void update(boolean updateWorld) {\n println(\"GUI\", \"Updating the UI...\");\n Player p = ToF.getWorld().getPlayer();\n \n if(updateWorld)\n ToF.getWorld().nextTick();\n \n move(p, NORTH, (Shape) MoveNorth);\n move(p, SOUTH, (Shape) MoveSouth);\n move(p, EAST, (Shape) MoveEast);\n move(p, WEST, (Shape) MoveWest);\n move(p, UP, ButtonUpstairs);\n move(p, DOWN, ButtonDownstairs);\n updateMap();\n updateBars();\n updateInventory();\n \n if(ToF.getWorld().getPlayer().isDead())\n ifLose();\n \n UnderAttack.setVisible(ToF.getWorld().getPlayer().getOpponent().isPresent());\n UnderAttack.setText(\"Under Attack \" + ToF.getWorld().selectEntities(\n e -> ToF.getWorld().getPlayer().getLocation().equals(e.getLocation())\n ).count());\n if(p.getOpponent().isPresent()){\n ToF.getWorld().selectEntities(\n e -> ToF.getWorld().getPlayer().getLocation().equals(e.getLocation())\n ).forEach(e -> ToF.getWorld().newMessage(new Message()\n .add(\"Your opponent\")\n .add(e.getName())\n .add(\"has\")\n .add(e.getHealthBar().getCurrent() + \"HP\"))\n );\n }\n \n if(ToF.getWorld().isFullyExplored())\n ifWin();\n \n Message msg;\n while((msg = ToF.getWorld().getNextMessage()) != null){\n Text.setText(msg.toStringSimple() + \"\\n\" + Text.getText()\n .substring(0, min(1000, Text.getText().length())));\n }\n }",
"public void gameUpdate()\n {\n\t\tcheckCollisions();\n\t\t\n\t\tif(up)\t\tcraft.accelerat();\t\t\n\t\tif(left)\tcraft.rotateLeft();\n\t\tif(right) \tcraft.rotateRight();\n\t\t\n\t\tcraft.move();\n\t\tmoveAstroids();\n }",
"void updatePosition() {\n\t\t\n\t\tcoords.x = body.getPosition().x*Simulation.meterToPixel;\n\t\tcoords.y = body.getPosition().y*Simulation.meterToPixel;\n\t\tspeed.x = body.m_linearVelocity.x;\n\t\tspeed.y = body.m_linearVelocity.y;\n\t}",
"@Override\n public void move() {\n this.point.x += vector.x * getCurrentSpeed();\n this.point.y += vector.y * getCurrentSpeed();\n }",
"public void update(MazeEventWon e) {\r\n }",
"public void moveForward(){\n\t\tSystem.out.println(\"Vehicle moved forward\");\n\t}",
"public void update() {\n this.move(this.getDX(), this.getDY());\n }",
"public void playerMove(char move) {\n\n\t\t//Set every game element to have no movement\n\t\tfor (int i = 0; i < 12; i++)\n\t\t\tfor (int j = 0; j < 12; j++)\n\t\t\t\tmoveList[i][j] = Legend.NO_MOVEMENT;\n\n\t\t//Update map\n\t\tcopyMap();\n\n\t\t//Validate the move\n\t\tvalidPlayerMove(move);\n\n\t\t//Only move the mhos if the move wasn't a jump (in which case the player gets to move again)\n\t\tif(move != Legend.JUMP)\n\t\t\tmoveMhos();\n\n\t\t//If all mhos are removed, the player must have won\n\t\tif(mhoLocations.size() == 0) {\n\t\t\tgameOver();\n\t\t\twin = true;\n\t\t}\n\n\t\t//Signal that the board can be animated\n\t\tboard.toggleAnimating();\n\t}",
"public void move ()\n\t{\n\t\t//Let's try this...\n\t\tchangeFallSpeed (turnInt);\n\t\t\n\t\t\n\t\tsetX_Pos (getX_Pos () + getHSpeed ());\t//hSpeed is added onto x_pos\n\t\t//The xDimensions are updated by having hSpeed added onto them.\n\t\txDimension1 += getHSpeed ();\n\t\txDimension2 += getHSpeed ();\n\t\txDimension3 += getHSpeed ();\n\t\t\n\t\t//The if statement below ensures that the PaperAirplane does not move\n\t\t//after reaching the 300 y point. The walls around the PaperAirplane,\n\t\t//however, start to move up, creating the illusion that the\n\t\t//PaperAirplane is still falling.\n\t\tif (getY_Pos () < 300)\n\t\t{\n\t\t\tsetY_Pos (getY_Pos () + getVSpeed ());//vSpeed is added onto y_pos\n\t\t\t//The yDimensions are updated by having vSpeed added onto them.\n\t\t\tyDimension1 += getVSpeed ();\n\t\t\tyDimension2 += getVSpeed ();\n\t\t\tyDimension3 += getVSpeed ();\n\t\t}\n\t}",
"@SuppressWarnings(\"deprecation\")\n\tpublic void player_move(Player p) {\n\t\tif (w.getBlockAt(p.getLocation().add(0, -1, 0)).getType() == Material.PISTON_BASE) {\n\t\t\tp.setVelocity(new Vector(0, 0.75, 0));\n\t\t\tp.playSound(p.getLocation(), Sound.PISTON_EXTEND, 1, 1);\n\t\t} else \tif (w.getBlockAt(p.getLocation().add(0, -1, 0)).getType() == Material.PISTON_STICKY_BASE) {\n\t\t\tp.setVelocity(new Vector(0, 0.75, 0));\n\t\t\tp.playSound(p.getLocation(), Sound.PISTON_EXTEND, 1, 1);\n\t\t} else if (w.getBlockAt(p.getLocation()).getType() == Material.CARPET) {\n\t\t\tBlock b = w.getBlockAt(p.getLocation());\n\t\t\tsynchronized (timers) {\n\t\t\t\ttimers.put(b.getData(), 6);\n\t\t\t}\n\t\t\tgameTick();\n\t\t}\n\t}",
"public void Obstaclemove() {\n for (int i = 0; i < getNumberObstacles(); i++) {\n if (ObstacleDeplace.class.isInstance(getObstacle()[i])) {\n getObstacle()[i].setX(getObstacle()[i].getX() - getObstacle()[i].getSpeed());\n\n if (getObstacle()[i].getX() < -200) {\n getObstacle()[i].setX(600);\n getObstacle()[i].setSpeed(randomGenerator.nextFloat());\n }\n }\n setChanged();\n notifyObstacle(i, getObstacle()[i].getX(), getObstacle()[i].getY());\n }\n }",
"public void update()\n\t{\n\t\tgameTime++;\n\t\tfor(int i = 0; i<gameObj.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < gameObj[i].size(); j++)\n\t\t\t{\n\t\t\t\t/*If the object implements movable\n\t\t\t\t * call the move method in each object\n\t\t\t\t */\n\t\t\t\tif(gameObj[i].get(j) instanceof Imovable)\n\t\t\t\t\t((MovableObject)gameObj[i].get(j)).move();\n\t\t\t\t/*call CheckBlink() method in SpaceStation\n\t\t\t\t * if the time % blinkRate == 0\n\t\t\t\t * the visibility with be switched\n\t\t\t\t */\n\t\t\t\tif(gameObj[i].get(j) instanceof SpaceStation)\n\t\t\t\t\t((SpaceStation)gameObj[i].get(j)).checkBlink(gameTime);\n\t\t\t\t/*check if missiles are out of fuel\n\t\t\t\tand remove if fuel = 0\n\t\t\t\t*/\n\t\t\t\tif(gameObj[i].get(j) instanceof Missile)\n\t\t\t\t\tif(((Missile)gameObj[i].get(j)).getFuel() <= 0)\n\t\t\t\t\t\tgameObj[i].remove(j);\n\t\t\t}\n\t\t}\t\t\n\t\tSystem.out.println(\"World updated\");\n\t}",
"public void updatePlayerLocation() {requires new property on gamestate object\n //\n }",
"public void updatePosition(double timestep){\n\t\tx = x + vx * timestep;\n\t y = y + vy * timestep;\n\t}",
"public void update(MazeEventTeleported e) {\r\n }",
"public void updatePlayer(float deltaTime){\n\n this.sprite.setPosition(body.getPosition().x * GameInfo.PPM, body.getPosition().y * GameInfo.PPM);\n this.feet.getPosition().set(pos.x * GameInfo.PPM, pos.y * GameInfo.PPM);\n\n if(this.isInAir)\n inAirTime += deltaTime;\n }",
"public synchronized void sendMove(String s, ServerPlayer player) {\n if (player == current) {\n \tcurrent = current.getOpponent();\n System.out.println(current.getColor().toString());\n current.otherPlayerMoved(s);\n }\n }",
"public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}",
"abstract void updatePlayer();",
"public void move() {\n\tupdateSwapTime();\n\tupdateAttackTime();\n\n\tif (enemyNear) {\n\t if (moved) {\n\t\tstopMove();\n\t\tmoved = false;\n\t }\n\t} else {\n\t if (!moved) {\n\t\tcontinueMove();\n\t\tmoved = true;\n\t }\n\n\t x += dx;\n\t y += dy;\n\n\t if (x < speed) {\n\t\tx = speed;\n\t\tdx = (-1) * dx;\n\t }\n\n\t if (y < speed) {\n\t\ty = speed;\n\t\tdy = (-1) * dy;\n\t }\n\n\t if (x > MapSize.getSIZE().getWidth() - 40) {\n\t\tx = MapSize.getSIZE().getWidth() - 40;\n\t\tdx = (-1) * dx;\n\t }\n\n\t if (y > MapSize.getSIZE().getHeight() - 40) {\n\t\ty = MapSize.getSIZE().getHeight() - 40;\n\t\tdy = (-1) * dy;\n\t }\n\t}\n }",
"public void moving()\n {\n if(onPlatform()&&endPlatform()){\n direction();\n }\n if(onPlatform()&&!endPlatform()){\n changeDirection();\n direction();\n }\n collideMoveLocation(horzVelocity,1);\n //sharaz\n if(isTouching(PushObject.class)){\n changeDirection();\n direction();\n }\n \n \n }",
"private void sendUpdates() {\n\n List<PeerUpdateMessage.Part> parts = new ArrayList<PeerUpdateMessage.Part>();\n for (ActivePlayer peer : player.getSavedNeighbors()) {\n PeerUpdateMessage.Part part = new PeerUpdateMessage.Part(\n peer.character.id, peer.character.getExtrapolatedMotionState());\n parts.add(part);\n }\n\n if (!parts.isEmpty()) {\n PeerUpdateMessage msg = new PeerUpdateMessage(parts);\n new ToClientMessageSink(player.session).sendWithoutConfirmation(msg);\n }\n }",
"@Override\n\tpublic void update() {\n\n\t\ttimer++;\n\t\tupdatePlayer();\n\t\tupdateScreen();\n\t\tupdateLives();\n\n\t}",
"public void update(){\n\t\t//Arm up (spool out cable from winch while going up)\n\t\tif(Robot.stick.getRawButton(4)){\n\t\t\ttalonArm.set(SmartDashboard.getNumber(\"Climber Arm Speed: \", 0.5));\n\t\t\twinchGroup.set(-SmartDashboard.getNumber(\"Climber Winch Speed: \", 0.25));\n\t\t}\n\t\t//Arm down\n\t\telse if(Robot.stick.getRawButton(2)){\n\t\t\ttalonArm.set(-SmartDashboard.getNumber(\"Climber Arm Speed: \", 0.5));\n\t\t}\n\t\t//Stop moving\n\t\telse{\n\t\t\ttalonArm.set(0);\n\t\t\twinchGroup.set(0);\n\t\t}\n\t\t//Climb with winch\n\t\tif(Robot.stick.getRawButton(1)){\n\t\t\twinchGroup.set(SmartDashboard.getNumber(\"Climber Winch Speed: \", 0.25));\n\t\t}\n\t}",
"@Override\r\n\tpublic void update(Player unitPlayer, double dX, double dY) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tthis.setXPos(this.getXPos()+dX);\r\n\t\tthis.setYPos(this.getYPos()+dY);\r\n\t\t\r\n\t\tifAttackedByPlayer(unitPlayer);\r\n\t\tattackPlayer(unitPlayer);\r\n\t\tcheckHealth(unitPlayer);\r\n\t}",
"public void updatePlayer(Player player) {\n\t\t// update the flag GO TO JAIL in Player class\n\t}",
"public void move(float deltaTime) {\n }",
"public synchronized void follow(Vehicle vehicle){\n \n distance = distance - (float)((float)vehicle.getCurrentSpeed()*1000f/3600f)/100f;\n \n //System.out.println(\"Distance to drive: \" + distance);\n if (distance <= 0){\n \n Settings.messageLog.AddMessage(\"Reached end of path\");\n //System.out.println(\"weg.size() == \" + weg.size());\n try{\n vehicle.setPosition(weg.get(weg.size()-1));\n }\n catch(Exception e){vehicle.setPosition(new Vector3f(10.3f, 5.5f, 156.2f));}\n vehicle.stopDriving();\n if (destinationPlatform == null && destinationParkingSpot == null){}\n else if (destinationParkingSpot == null){\n //motionpath from waypoint to platform\n //platform sign in\n vehicle.setCurrentPlatform(destinationPlatform);\n \n } //meldt aan voor platform nieuwe route\n else {\n \n //motionpath from waypoint to parkingspot\n if (destinationPlatform == null)\n {\n try\n {\n this.destinationParkingSpot.ParkVehicle(vehicle);\n vehicle.setPosition(this.destinationParkingSpot.getPosition());\n Settings.messageLog.AddMessage(\"Park vehicle\");\n }\n catch(Exception e)\n {\n \n ErrorLog.logMsg(e.getMessage());\n }\n \n }\n \n //hier kraan geparkeerd ... ga unload\n try\n {\n this.destinationParkingSpot.ParkVehicle(vehicle);\n vehicle.setPosition(this.destinationParkingSpot.getPosition());\n }\n catch(InvalidVehicleException ie)\n {\n System.out.println(ie.getMessage());\n \n }\n\n }\n \n }\n }",
"public abstract void changePlayerAt(ShortPoint2D pos, Player player);",
"public void update(Observable o, Object arg) {\n\t\tConnect4MoveMessage message = (Connect4MoveMessage) arg;\n\t\t\n\t\t// determine if this is a real move, or just a board clearing action\n\t\tboolean trivialUpdate = false;\n\t\tif (message.getColor() ==0) {\n\t\t\ttrivialUpdate = true;\n\t\t}\n\t\t\n\t\t// COMMON OPS TO ALL UPDATES:\n\t\t// update view:\n\t\tupdateView(message);\n\t\t// check for game end:\n\t\tcheckForGameEnd();\n\t\t\n\t\t// SINGLE PLAYER GAME:\n\t\tif (!networkGame && !trivialUpdate) {\n\t\t\t// if computer has made move, allow human player to move\n\t\t\tif (!gameFinished && message.getColor()==1) {\n\t\t\t\tcontroller.move();\n\t\t\t}\n\t\t}\n\t\t// NETWORK GAME\n\t\telse if (networkGame && !trivialUpdate){\n\t\t\t// if our turn to read, then read move\n\t\t\tif (reader && message.getColor()!=playerType) {\n\t\t\t\treadNetMessage();\n\t\t\t\t// move... (?)\n\t\t\t\tcontroller.move();\n\t\t\t}\n\t\t\t\n\t\t\t// send message over network if it's our move\n\t\t\tif (!reader && message.getColor()==this.playerType) {\n\t\t\t\tsendNetMessage(message);\n\t\t\t\treader = true;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void update(GameContainer gc, double deltaTime) {\n if (player.collidesWith(player2.getEllipse())) {\n player.setCanMove(false);\n } else {\n player.setCanMove(true);\n }\n\n if (player.canMove()) {\n player.move(deltaTime);\n updateCamera((int) player.getX() + player.getWidth() / 2\n - gc.getCamera().getViewportSizeX() / 2,\n (int) player.getY() + player.getHeight() / 2\n - gc.getCamera().getViewportSizeY() / 2);\n }\n\n if (player2.canMove()) {\n player2.moveP2(deltaTime);\n }\n }",
"public void update(MazeEventWalked e) {\r\n }",
"@Override\n public void update(Move move) {\n System.out.println(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\");\n if (move == null) {\n printBoard();\n System.out.println(\"Opponent Passed\");\n return;\n }\n System.out.println(\"Your turn: \"+player);\n board.update(move, enemy.player);\n printBoard();\n\n }",
"public void update() {\n\t\tupdateController();\n\t\tupdateTimer();\n\t\tupdateTrifecta();\n\t\tupdateGyro();\n\t\tupdateGameTime();\n\t\t//updateTilt();\n\t}",
"protected void updatePosition() {\n\t\tif(motion == null) {\n\t\t\tmotion = new Motion3D(player, true);\n\t\t} else motion.update(player, true);\n\t\t\n\t\tmotion.applyToEntity(this);\n\t\tthis.rotationPitch = player.rotationPitch;\n\t\tthis.rotationYaw = player.rotationYaw;\n\t}",
"private void updateRemote(boolean force) {\n if(force || SystemClock.uptimeMillis() - mLastUpdate > REMOTE_MAX_TRANSMIT_SPEED){\n //Make sure channel is set\n String channel = this.mRemoteRobotId;\n if(channel != null){\n //Mark the time\n mLastUpdate = SystemClock.uptimeMillis();\n //Send to the remote robot\n final SensorData sensorData = mRobotInterface.getSensorData();\n RemoteControl.get().send(sensorData.getControl());\n }\n }\n }",
"void move() {\n\t\tif (reachedEdge()) {\n\t\t\tvelocityX = velocityX * -1;\n\t\t\ty = y + 50;\n\t\t}\n\t\tif (reachedLeft()) {\n\t\t\tvelocityX = velocityX * -1;\n\t\t\ty = y + 50;\n\t\t}\n\n\t\tx = x + velocityX;\n\t}",
"@Override\r\n\tpublic void update() {\n\t\tListIterator<Player> it = players.listIterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tit.next().update();\r\n\t\t}\r\n\t\t// Logica del juego, etc\r\n\t\tcontrolMenu();\r\n\t}",
"private void updateMotors() {\n\t\t//Pass filtered values to ChopperStatus.\n\t\tmStatus.setMotorFields(mMotorSpeed);\n\t\tString logline = Long.toString(System.currentTimeMillis()) + \" \" + mMotorSpeed[0] + \" \" + mMotorSpeed[1] + \" \" + mMotorSpeed[2] + \" \" + mMotorSpeed[3] + \"\\n\";\n\t\ttry {\n\t\t\tif (logfile != null) {\n\t\t\t\tlogfile.write(logline);\n\t\t\t\tlogfile.flush();\n\t\t\t}\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\t//Log.e(TAG, \"Cannot write to logfile\");\n\t\t}\n\t\t//Pass motor values to motor controller!\n\t\tMessage msg = Message.obtain();\n\t\tmsg.what = SEND_MOTOR_SPEEDS;\n\t\tmsg.obj = mMotorSpeed;\n\t\tmBt.sendMessageToHandler(msg);\n\t\t//Log.i(TAG, \"Guidance sending message.\");\n\t\t\n\t}",
"public void update()\n\t{\n\t\tif (active)\n\t\t{\n\t\t\t// Increases speed to accelerate.\n\t\t\tif (speed < max_speed) speed += acceleration;\n\n\t\t\tif (speed > max_speed) speed = max_speed;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Negates speed to slow down.\n\t\t\tif (speed > 0) speed = -speed;\n\t\t\tif (speed < 0) speed += acceleration;\n\n\t\t\tif (speed > 0) speed = 0;\n\t\t}\n\n\t\t// Sets the speed for thrust.\n\t\thost.momentum.addVelocity(new Displacement(speed * Math.cos(angle), speed * Math.sin(angle)));\n\t}",
"public void move(long delta) {\n // update the location of the gameObject based on move speeds\n x += (delta * dx) / 1000;\n y += (delta * dy) / 1000;\n }",
"@Override\n protected void update(Engine engine) {\n\t\trs = (GL4RenderSystem) engine.getRenderSystem();\n\t\t\n\t\telapsTime += engine.getElapsedTimeMillis();\n\t\telapsTimeSec = Math.round(elapsTime/1000.0f);\n\t\telapsTimeStr = Integer.toString(elapsTimeSec);\n\t\t\n\t\t//player.update(elapsTimeSec);\n\t\tSceneNode dragon = engine.getSceneManager().getSceneNode(\"dragonNPCNode\");\n\t\t\n\t\tdIter++;\n\t\t//if(dIter == 200)\n\t\t//{\n\t\t\t//dir = dir*-1;\n\t\t\t//dIter = 0;\n\t\t//}\n\t\tif(dIter <= 200)\n\t\tdragon.moveBackward(dir);\n\t\t\n\t\tif(dIter > 200 && dIter <= 400 )\n\t\t\tdragon.moveLeft(dir);\n\t\t\n\t\tif(dIter > 400 && dIter <= 600 )\n\t\t\tdragon.moveForward(dir);\n\t\t\n\t\tif(dIter > 600 && dIter <= 800 )\n\t\t\tdragon.moveRight(dir);\n\t\t\n\t\tif(dIter == 800 )\n\t\t\tdIter = 0;\n\t\t//SkeletalEntity dragonSE =\n\t\t\t\t//(SkeletalEntity) engine.getSceneManager().getEntity(\"dragonSkeleton\");\n\t\t//dragonSE.update();\n\t\t\n\t\tfloat time = engine.getElapsedTimeMillis();\n\t\t\n\t\tfloat playerFloat[] = player.getNode().getLocalTransform().toFloatArray();\n\t\t//playerFloat[7] = player.getNode().getLocalPosition().y();\n\t\tdouble playerMat[] = toDoubleArray(playerFloat);\n\t\tMatrix4 mat3;\n\t\tmat3 = Matrix4f.createFrom(toFloatArray(player.getNode().getPhysicsObject().getTransform()));\n\t\t//player.getNode().setLocalPosition(playerFloat[3],mat3.value(1,3), playerFloat[11]);\n\t\t//double playerMat[] = toDoubleArray(player.getNode().getLocalTransform().toFloatArray());\n\t\tplayerFloat = player.getNode().getLocalTransform().toFloatArray();\n\t\t//playerFloat[7] = player.getNode().getLocalPosition().y();\n\t\tplayerFloat[7] = mat3.value(1,3);//set y coordinate to physics world\n\t\tplayerMat = toDoubleArray(playerFloat);\n\t\tSystem.out.println(\"player.getNode().getLocalTransform(): \" + player.getNode().getLocalTransform());\n\t player.getNode().getPhysicsObject().setTransform(playerMat);\n\t \n\t player.update(elapsTimeSec);\n\t SkeletalEntity manSE =\n \t\t(SkeletalEntity) engine.getSceneManager().getEntity(\"knightSkeleton\");\n \t\tmanSE.update();\n\n\t \n\t\tif (running)\n\t\t{ \n\t\t\tMatrix4 mat;\n\t\t\tphysicsEng.update(time);\n\t\t\tfor (SceneNode s : engine.getSceneManager().getSceneNodes())\n\t\t\t{ \n\t\t\t\t//if (s.getPhysicsObject() != null && s.getName() != player.getNode().getName())\n\t\t\t\t//if (s.getPhysicsObject() != null /*&& s.getName() != player.getNode().getName()*/)\n\t\t\t\t{ \n\t\t\t\t\tmat = Matrix4f.createFrom(toFloatArray(s.getPhysicsObject().getTransform()));\n\t\t\t\t\ts.setLocalPosition(mat.value(0,3),mat.value(1,3), mat.value(2,3));\n\t\t\t\t} \n\t\t\t} \n\t\t}\n\n\t\tdispStr=\"Time = \" + elapsTimeStr + \" Score: \"+player.getScore();\n\t\trs.setHUD(dispStr, 15, 15);\n\t\tif(player.isBoostActive()) dispStr+=\" Boost Active!\";\n\t\tim.update(elapsTime);\n\t\tprocessNetworking(elapsTime);\n\t\t\n\t\tcheckForCollisions();\n\t\t//player.update(elapsTimeSec);\n\t\tSystem.out.println(\"ball transform: \" + ball2Node.getLocalTransform() );\n\t\tSystem.out.println(\"ball physycs object transform: \" + ball2Node.getPhysicsObject().getTransform()[0] + ',' \n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[1] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[2] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[3] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[4] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[5] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[6] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[7] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[8] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[9] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[10] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[11] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[12] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[13] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[14] + ','\n\t\t\t\t+ ball2Node.getPhysicsObject().getTransform()[15] + ',');\n\t\tSystem.out.println(\"ball linear velocity: \" + ball2Node.getPhysicsObject().getLinearVelocity());\n\t\tif(distanceTo(player.getNode().getLocalPosition(),ball2Node.getLocalPosition()) <= 4)\n\t\t{\n\t\t\tball2Node.setLocalPosition(0,10,0);\n\t\t\tfloat velocityArray[] = { 0, 5, 0};\n\t\t\tball2Node.getPhysicsObject().setLinearVelocity(velocityArray);\n\t\t\tfloat floTemp[] = ball2Node.getLocalTransform().toFloatArray();\n\t\t\tdouble dubTemp[] = {(double)floTemp[0], (double)floTemp[1], (double)floTemp[2], (double)floTemp[3], (double)floTemp[4],\n\t\t\t\t\t(double)floTemp[5],(double)floTemp[6],(double)floTemp[7], (double)floTemp[8], (double)floTemp[9], (double)floTemp[10], (double)floTemp[11]\n\t\t\t\t\t\t\t, (double)floTemp[12], (double)floTemp[13], (double)floTemp[14], (double)floTemp[15] };\n\t\t\t\n\t\t\tdouble dubTemp2[] = toDoubleArray(floTemp);\n\n\n\t\t\t Matrix4 mat2;\n\t\t\tball2Node.getPhysicsObject().setTransform(dubTemp2);\n\t\t\t\n\t\t\t//mat2 = Matrix4f.createFrom(toDoubleArray( ball2Node.getLocalTransform().toFloatArray()))\n\t\t\t//ball2Node.getPhysicsObject().setTransform(dubTemp2);\n\t\t\t//ball2Node.setPhysicsObject(ball2PhysObj);\n\t\t\t//ball2Node.getPhysicsObject().getTransform().\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t//player.playWalkAnimation();\n\t\t\n\t\t\n\t\t\n\t\t/*ball2Node.getPhysicsObject().setTransform(ball2Node.getLocalTransform());\n\t\t//ball2PhysObj.set\n\t\tphysicsEng.\n\t\ttemptf = toDoubleArray(ball1Node.getLocalTransform().toFloatArray());\n \tball1PhysObj = physicsEng.addSphereObject(physicsEng.nextUID(),\n \tmass, temptf, 2.0f);\n \tball1PhysObj.setBounciness(1.0f);\n \tball1Node.setPhysicsObject(ball1PhysObj);*/\n\t\t\n\t\t/* check if player jumped*/\n\t\t\n\t}",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"Driving a airplane!\");\n\t}",
"public void move() {\n spriteBase.move();\n\n Double newX = spriteBase.getXCoordinate() + spriteBase.getDxCoordinate();\n Double newY = spriteBase.getYCoordinate() + spriteBase.getDyCoordinate();\n\n if (!newX.equals(spriteBase.getXCoordinate())\n || !newY.equals(spriteBase.getYCoordinate())) {\n Logger.log(String.format(\"Monster moved from (%f, %f) to (%f, %f)\",\n spriteBase.getXCoordinate(), spriteBase.getYCoordinate(), newX, newY));\n }\n }",
"public void update(){\n\t\tx+=xspeed; \n\t\ty+=yspeed;\t\n\t}",
"public void update() {\n\t\tint xa = 0, ya = 0; \n\t\tif(game.getPlayer().x < 0){\n\t\t\txa -= 2;\n\t\t}else if(game.getPlayer().x + 32 > game.getScreen().width){\n\t\t\txa += 2;\n\t\t}\n\t\tif(game.getPlayer().y < 0){\n\t\t\tya -= 2;\n\t\t}else if(game.getPlayer().y + 32 > game.getScreen().height){\n\t\t\tya +=2;\n\t\t}\n\t\t\n\t\tif (xa != 0 || ya!= 0) move(xa, ya);\n\t\t\n\t\t//detects if the mouse is clicking on the interface\n\t\t/*if(Mouse.getButton() == 1 && Mouse.getX() >= 0 && Mouse.getX() <= 1200 && Mouse.getY() > 525 && Mouse.getY() < 675) {\n\t\t\tclicked = true;\n\t\t} else {\n\t\t\tclicked = false;\n\t\t}*/\n\t\t\n\t\treturn;\n\t}",
"public void update() {\n\n //Updates all the modules\n for(Module module : modules.values())\n module.update();\n\n //Applies all the forces that can act on this mobile (gravity, air resistance etc)\n for(Force force : forces)\n force.apply();\n\n position = position.add(velocity.multiply(deltaTime()));\n rotation = rotation.multiply(angularVelocity.copy().quaternion().scale(deltaTime()));\n }",
"private void movementPhase() {\n ClickObserver.getInstance().setCreatureFlag(\"\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n TheCupGUI.update();\n Board.removeCovers();\n }\n });\n for (Player p : playerList) {\n \tplayer = p;\n player.flipAllUp();\n\t ClickObserver.getInstance().setActivePlayer(player);\n\t ClickObserver.getInstance().setCreatureFlag(\"Movement: SelectMovers\");\n\t InfoPanel.uncover(player.getName());\n\t if (p.getHexesWithPiece().size() > 0) {\n\t \tClickObserver.getInstance().setClickedTerrain(p.getHexesWithPiece().get(0));\n\t }\n\t pause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tClickObserver.getInstance().whenTerrainClicked();\n \t GUI.getHelpText().setText(\"Movement Phase: \" + player.getName()\n + \", Move your armies\");\n \t Game.getRackGui().setOwner(player);\n }\n });\n\t \n\t while (isPaused) {\n \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t }\n\t InfoPanel.cover(player.getName());\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n ClickObserver.getInstance().setCreatureFlag(\"\");\n }",
"@Override\n\tpublic void update(MyAIController controller) {\n\t\t// Update Map\n\t\tmap.update(controller.getView());\n\t\tWorldSpatial.Direction orientation = controller.getOrientation();\n\t\tCoordinate pos = new Coordinate(controller.getPosition());\n\n\t\tSystem.out.println(state);\n\n\t\tswitch (state) {\n\t\tcase NORMAL:\n\t\t\tupdateNormal(controller, pos, orientation);\n\t\t\tbreak;\n\t\tcase WALL_FOLLOWING:\n\t\t\tupdateWallFollowing(controller, pos, orientation);\n\t\t\tbreak;\n\t\t// Checks car has moved tiles before going back to WALL_FOLLOWING state\n\t\tcase JUST_TURNED_LEFT:\n\t\t\tupdateJustTurnedLeft(controller, pos, orientation);\n\t\t\tbreak;\n\t\tcase PASSING_TRAP:\n\t\t\tupdatePassingTrap(controller, pos, orientation);\n\t\t\tbreak;\n\t\t}\n\t}",
"private void handleMovement() {\n if (movements.isEmpty()) return;\n try {\n switch (movements.peek()) {\n case MOVE_UP:\n game.movePlayer(Direction.N);\n break;\n case MOVE_LEFT:\n game.movePlayer(Direction.W);\n break;\n case MOVE_DOWN:\n game.movePlayer(Direction.S);\n break;\n case MOVE_RIGHT:\n game.movePlayer(Direction.E);\n break;\n }\n } catch (Exception ignored) { }\n }"
] | [
"0.6830276",
"0.67994",
"0.6632154",
"0.6630143",
"0.65937024",
"0.65763766",
"0.65624475",
"0.65612936",
"0.6481873",
"0.64620256",
"0.6458017",
"0.64538527",
"0.64456445",
"0.64386106",
"0.64332914",
"0.6404847",
"0.64014417",
"0.6372405",
"0.6365488",
"0.6332998",
"0.6303374",
"0.6301254",
"0.6288348",
"0.62883013",
"0.6284797",
"0.62834644",
"0.6266306",
"0.62661153",
"0.62640184",
"0.62544227",
"0.6242748",
"0.6230799",
"0.62286043",
"0.62118053",
"0.6205157",
"0.6186236",
"0.6170548",
"0.6169442",
"0.61611253",
"0.6157801",
"0.6151848",
"0.6151627",
"0.6150337",
"0.6149187",
"0.6146135",
"0.6142054",
"0.6133821",
"0.61315894",
"0.6102385",
"0.61001265",
"0.60866165",
"0.6083568",
"0.60817766",
"0.60489845",
"0.60396165",
"0.6012886",
"0.6011684",
"0.60045826",
"0.5983811",
"0.5982597",
"0.5975437",
"0.59735525",
"0.5970176",
"0.5967486",
"0.5959913",
"0.5944102",
"0.5941909",
"0.5930535",
"0.5916203",
"0.59061927",
"0.59029764",
"0.590006",
"0.5897554",
"0.5894389",
"0.58938175",
"0.58912486",
"0.58856857",
"0.58721226",
"0.5872068",
"0.587154",
"0.58680195",
"0.5867502",
"0.5867313",
"0.5865431",
"0.5864917",
"0.58619785",
"0.5858898",
"0.58586186",
"0.58563155",
"0.584176",
"0.5837123",
"0.58352447",
"0.5830521",
"0.58292943",
"0.5828525",
"0.58250445",
"0.5819421",
"0.58190733",
"0.5811847",
"0.5802515"
] | 0.6729636 | 2 |
Notifies current game sector if movement should be started or stopped. | private void notifySector(boolean movementStart) {
GameSector gameSector = getOwner().getLocation().getGameSector();
if (gameSector != null && gameSector.hasActiveNeighbours()) {
if (movementStart) {
// getOwner().sendBroadcastPacket(new SMStartCharacterMoving(getOwner()));
}
else {
// getOwner().sendBroadcastPacket(new SMStopNonPlayerMoving(getOwner()));
}
_isSectorActive = true;
}
else {
_isSectorActive = false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void update() {\n\t\tcanBuild = true;\n\t\tfor (Ship s : SceneManager.sm.currSector.ships) {\n\t\t\tif (!s.isPlayer) {\n\t\t\t\tif (s.cm.distanceTo(p.cm) < 2500) {\n\t\t\t\t\tcanBuild = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (SceneManager.sm.endSector.clear && SceneManager.sm.currSector.pos.isSame(SceneManager.sm.endSector.pos)) {\n\t\t\tSystem.out.println(\"Game WON\");\n\t\t\tthis.setActive(false);\n\t\t\tSceneManager.ws.setActive(true);\n\t\t}\n\t\tif (p.destroyed) {\n\t\t\tSystem.out.println(\"Game LOST\");\n\t\t\tthis.setActive(false);\n\t\t\tSceneManager.ls.setActive(true);\n\t\t}\n\n\t\tshipYard.update();\n\t\tstarMap.update();\n\n\t\t// TODO remove before flight: to draw where mouse is - temp\n\t\t// if (InputManager.mouse[2]) {\n\t\t// System.out.println(InputManager.mPos.toString());\n\t\t// }\n\n\t\tif (InputManager.keys[81])\n\t\t\tp.cmdRotate(false);\n\t\tif (InputManager.keys[69])\n\t\t\tp.cmdRotate(true);\n\t\tif (InputManager.keys[87])\n\t\t\tp.cmdMove(0, 1);\n\t\tif (InputManager.keys[83])\n\t\t\tp.cmdMove(2, 1);\n\t\tif (InputManager.keys[65])\n\t\t\tp.cmdMove(3, 1);\n\t\tif (InputManager.keys[68])\n\t\t\tp.cmdMove(1, 1);\n\t\tif (InputManager.keys[38]) {\n\t\t\tCamera.yOff += 10 * (1 / Camera.scale);\n\t\t\tcamFocus = null;\n\t\t\teyeFocused = false;\n\t\t}\n\t\tif (InputManager.keys[40]) {\n\t\t\tCamera.yOff -= 10 * (1 / Camera.scale);\n\t\t\tcamFocus = null;\n\t\t\teyeFocused = false;\n\t\t}\n\t\tif (InputManager.keys[39]) {\n\t\t\tcamFocus = null;\n\t\t\teyeFocused = false;\n\t\t\tCamera.xOff -= 10 * (1 / Camera.scale);\n\t\t}\n\t\tif (InputManager.keys[37]) {\n\t\t\tcamFocus = null;\n\t\t\teyeFocused = false;\n\t\t\tCamera.xOff += 10 * (1 / Camera.scale);\n\t\t}\n\n\t\t// key to go to build area - b\n\t\tif (canBuild && InputManager.keysReleased[66] || shipYard.clicked) {\n\t\t\tswtichToBuild();\n\t\t}\n\t\tif (InputManager.keysReleased[77] || starMap.clicked) {\n\t\t\tswtichToStarMap();\n\t\t}\n\t\t\n\t\t// key to select a ship - no use atm\n\t\tif (InputManager.mouse[1]) {\n\t\t\t//selected = SceneManager.sm.currSector.getClickShip();\n\t\t\t// now have a ship selected\n\t\t}\n\t\t\n\t\tif(InputManager.keysReleased[32]) {\n\t\t\tcamFocus = p.cm;\n\t\t}\n\n\t\t// key to move the camera to a ship or area\n\t\tif (InputManager.mouseReleased[2]) {\n\t\t\teyeFocused = false;\n\t\t\tif(SceneManager.sm.currSector.getClickShip() != null)\n\t\t\t{\n\t\t\t\tcamFocus = SceneManager.sm.currSector.getClickShip().cm;\n\t\t\t}else if(Camera.toScreen(eyeLoc).distanceTo(InputManager.mPos) < 40){\n\t\t\t\tcamFocus = eyeLoc;\n\t\t\t\teyeFocused = true;\n\t\t\t}else {\n\t\t\t\tcamFocus = Camera.toMap(InputManager.mPos.x, InputManager.mPos.y);\n\t\t\t}\n\t\t}\n\t\tif (partTarget != null && partTarget.health <= 0)\n\t\t\tpartTarget = null;\n\n\t\tif (partTarget == null && target != null)\n\t\t\tp.shoot(target);\n\n\t\tif (partTarget == null && target == null)\n\t\t\tp.ceaseFire();\n\n\t\tif (target != null && InputManager.mouseReleased[3] && !target.destroyed) {\n\t\t\tpartTarget = SceneManager.sm.currSector.getClickShipPart(target);\n\t\t\tp.shoot(partTarget);\n\t\t}\n\n\t\tif (InputManager.mouseReleased[3]) {\n\t\t\ttarget = SceneManager.sm.currSector.getClickShip();\n\t\t\tif (target != null && partTarget == null) {\n\t\t\t\tp.shoot(target);\n\t\t\t}\n\t\t}\n\t\tif (target != null && (target.destroyed || target.isPlayer)) {\n\t\t\ttarget = null;\n\t\t\tpartTarget = null;\n\t\t\tp.ceaseFire();\n\t\t}\n\n\t\tif (camFocus != null)\n\t\t\tCamera.focus(camFocus);\n\t\t// if(selected != null) selected.vel.print();\n\n\t\tSceneManager.sm.currSector.update();\n\t}",
"public void update() {\n\n if (!isSelected){\n goalManagement();\n }\n\n if (chair != null){ // si une chaise lui est désigné\n if (!hasAGoal && !isSelected){ // et qu'il n'a pas d'objectif\n setSit(true);\n position.setX(chair.getX());\n }\n\n if (isSit){\n chair.setChairState(Chair.ChairState.OCCUPIED);\n }else {\n chair.setChairState(Chair.ChairState.RESERVED);\n }\n }\n\n if (tired > 0 ){\n tired -= Constants.TIRED_LOSE;\n }\n\n if (isSit && comfort>0){\n comfort -= Constants.COMFORT_LOSE;\n }\n\n if (isSitOnSofa && comfort<100){\n comfort += Constants.COMFORT_WIN;\n }\n\n if (!hasAGoal && moveToCoffee && coffeeMachine!=null){\n moveToCoffee = false;\n tired=100;\n\n coffeeMachine.setCoffeeTimer(new GameTimer()) ;\n coffeeMachine.getCoffeeTimer().setTimeLimit(Constants.COFFEE_TIME_TO_AVAILABLE);\n coffeeMachine = null;\n backToSpawn();\n }\n\n if (!hasAGoal && moveToSofa){\n moveToSofa = false;\n isSitOnSofa = true;\n dir = 0 ;\n position.setY(position.getY()-Constants.TILE_SIZE);\n }\n\n if (isSelected){\n flashingColor ++;\n if (flashingColor > 2 * flashingSpeed){\n flashingColor = 0;\n }\n }\n\n }",
"public void didIWinOrLose() {\n\n\t}",
"private void cancelMoveTask2(boolean shouldNotifySector) {\n if (_movementTask != null && !_movementTask.isDone()) {\n _movementTask.cancel(true);\n\n if (shouldNotifySector) {\n notifySector(false);\n }\n }\n }",
"public void updatemove() {\n\t\tmove = new Movement(getX(), getY(),dungeon,this);\n\t\t//System.out.println(\"Updated\");\n\t\tnotifys();\n\t\tif(this.getInvincible()) {\n\t\t\tsteptracer++;\n\t\t}\n\t\tdungeon.checkGoal();\n\t}",
"public boolean isMovementChanged() {\n return movementChanged;\n }",
"@Override\n public void onStationary() {\n showToast(\"设备停止移动\");\n LogUtil.e(\"stop_move\");\n }",
"void startMovement();",
"public boolean isMovement() {\n return isMovementEvent;\n }",
"public void setMovementChanged(boolean movementChanged) {\n this.movementChanged = movementChanged;\n }",
"public void update() {\n\tif(myGlass != null && continueGlassMoving == true) \n\t\tmyGlass.moveLaterally(FactoryPart.WEST, 1);\n\tif(myGlass != null && isBreaking == true)\n\t{\n\t\tmyGlass.breakGlass();\n\t}\n if(myGlass != null && myGlass.getXCoord() /*+ myGlass.getWidth()*/ <= baseXCoord && continueGlassMoving == true)\n {\n \tisOn = false;\n \tcontinueGlassMoving = false;\n \t//getPart(FactoryPart.WEST).receiveGlass(myGlass,FactoryPart.EAST);\n \tcontroller.doneJob();\n \t\n \t\n }\n}",
"@Override\n\tpublic void gameStarted() {\n\t\tupdatePosition(0,0,0);\n//\t\tstartSendingPositionsThread();\n\t}",
"private void movementPhase() {\n ClickObserver.getInstance().setCreatureFlag(\"\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n TheCupGUI.update();\n Board.removeCovers();\n }\n });\n for (Player p : playerList) {\n \tplayer = p;\n player.flipAllUp();\n\t ClickObserver.getInstance().setActivePlayer(player);\n\t ClickObserver.getInstance().setCreatureFlag(\"Movement: SelectMovers\");\n\t InfoPanel.uncover(player.getName());\n\t if (p.getHexesWithPiece().size() > 0) {\n\t \tClickObserver.getInstance().setClickedTerrain(p.getHexesWithPiece().get(0));\n\t }\n\t pause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tClickObserver.getInstance().whenTerrainClicked();\n \t GUI.getHelpText().setText(\"Movement Phase: \" + player.getName()\n + \", Move your armies\");\n \t Game.getRackGui().setOwner(player);\n }\n });\n\t \n\t while (isPaused) {\n \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t }\n\t InfoPanel.cover(player.getName());\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n ClickObserver.getInstance().setCreatureFlag(\"\");\n }",
"@Override\n\tpublic void tick() {\n\t\tif(game.getKeyManager().up) {\n\t\t\tmoveUp();\n\t\t}\n\t\tif(game.getKeyManager().down) {\n\t\t\tmoveDown();\n\t\t}\n\t\tif(game.getKeyManager().right) {\n\t\t\tmoveRight();\n\t\t}\n\t\tif(game.getKeyManager().left) {\n\t\t\tmoveLeft();\n\t\t}\n\t\tscore(); //calls score method\n\t\thasKey(); //calls hasKey method\n\t\thasHammer(); //calls hasHammer method\n\t\thasEnded(Integer.parseInt(getCurrentPositionX()),Integer.parseInt(getCurrentPositionY())); //calls hasEnded method\n\t\tcheckEnemy(); //calls checkEnemy method\n\t}",
"public boolean moveOn() {\n\t\t\n\t}",
"private void inAvanti() {\n\t\tif (Game.getInstance().isOnGround) {\n\t\t\tjump=false;\n\t\t\tGame.getInstance().getPersonaggio().setStato(Protagonista.RUN);\n\t\t\tGraficaProtagonista.getInstance().cambiaAnimazioni(Protagonista.RUN);\n\t\t}\n\t}",
"public void move() {\n\t\tSystem.out.println(\"Robot Can Move\");\n\t}",
"public synchronized void moveStarted(Move move, MoveProvider mp) {\n\t\tangle0 = 0;\n\t\tdistance0 = 0;\n\t\tcurrent = false;\n\t\tthis.m_mover = mp;\n\t}",
"public abstract void tellStarting();",
"public boolean isStartable () ;",
"@Override\n\tpublic void Update(float dt) {\n\t\tif (mouse.buttonDown()) {\n\t\t\ttarget.reposition(mouse.getPosition());\n\t\t\ttship.setPosition(mouse.getPosition().replicate().add(offset));\n\t\t}\n\t\teffectHandler.update(dt);\n\t\tif (!effectHandler.effectsRunning() && Keyboard.isKeyDown(GLFW.GLFW_KEY_A)) {\n\t\t\teffectHandler.addScript(origin, action, false);\n\t\t}\n\t\tif (!effectHandler.effectsRunning() && Keyboard.isKeyDown(GLFW.GLFW_KEY_D)) {\n\t\t\teffectHandler.addScript(origin, action, true);\n\t\t}\n\t\tif (buttonToggle && !Keyboard.isKeyDown(GLFW.GLFW_KEY_SPACE)) {\n\t\t\tbuttonToggle = false;\n\t\t}\n\t\tif (!buttonToggle && Keyboard.isKeyDown(GLFW.GLFW_KEY_SPACE)) {\n\t\t\tbuttonToggle = true;\n\t\t\tif (WeaponCheck.checkArc(origin, tship, weapon)) {\n\t\t\t\tSystem.out.println(\"in arc\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"out of arc\");\n\t\t\t}\n\t\t}\n\t}",
"public void update(float dt) {\r\n\t\tif (pauseMenuActive() || isComplete() || isFailure()) return;\r\n\t\taction = movementController.update();\r\n\t\tplatformController.update(dt);\r\n\r\n\t\tCharacterModel lead = movementController.getLead();\r\n\t\tCharacterModel avatar = movementController.getAvatar();\r\n\t\tholdingHands = movementController.isHoldingHands();\r\n\r\n\t\tif (movementController.getSwitchedCharacters()) {\r\n\t\t\tswitching = !switching;\r\n\r\n\t\t}\r\n\t\t// Increase animation frame of background\r\n\t\tbackgroundAnimeframe += backgroundAnimationSpeed;\r\n\t\tif (backgroundAnimeframe >= backgroundNumAnimFrames) {\r\n\t\t\tbackgroundAnimeframe = 0;\r\n\t\t}\r\n\r\n\t\tif(holdingHands){\r\n\t\t\tif(lead == somni){\r\n\t\t\t\t// draw somni, phobia, and the hands\r\n\t\t\t\tcombined.setTexture(somnisTexture[action], animationSpeed[action], framePixelWidth[action], offsetsX[action], offsetsY[action],\r\n\t\t\t\t\t\tphobiasTexture[action], animationSpeed[action], framePixelWidth[action], secOffsetsX[action], secOffsetsY[action],\r\n\t\t\t\t\t\tsomniPhobiaHandsTexture, thirdOffsetsX[action], thirdOffsetsY[action]);\r\n\t\t\t}else{\r\n\t\t\t\t// draw phobia, somni, and the hands\r\n\t\t\t\tcombined.setTexture(phobiasTexture[action], animationSpeed[action], framePixelWidth[action], offsetsX[action], offsetsY[action],\r\n\t\t\t\t\t\tsomnisTexture[action], animationSpeed[action], framePixelWidth[action], secOffsetsX[action], secOffsetsY[action],\r\n\t\t\t\t\t\tphobiaSomniHandsTexture, thirdOffsetsX[action], thirdOffsetsY[action]);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(avatar == somni){\r\n\t\t\t\t// draw somni\r\n\t\t\t\tif ((action == 2 || action ==3 || action ==5)&& !avatar.justPropelled()) {\r\n\t\t\t\t\tint facing = somni.isFacingRight()? 1:-1;\r\n\t\t\t\t\t//draw somni with small dash ring\r\n\t\t\t\t\tsomni.setTexture(somnisTexture[action], animationSpeed[action], framePixelWidth[action], 0, 0,\r\n\t\t\t\t\t\t\tyellowRingSmallTexture, 0.2f, 128, 0, -5, facing * dashAngles[action]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (movementController.canHoldHands()){\r\n\t\t\t\t\t\t// somni reaches out hand when phobia within distance\r\n\t\t\t\t\t\tint f = movementController.faceTowards();\r\n\t\t\t\t\t\tsomni.setTexture(somnisTexture[action], animationSpeed[action], framePixelWidth[action], 0, 0,\r\n\t\t\t\t\t\t\t\tsomniHandsTextures[f], thirdOffsetsX[action+6*(f+1)], thirdOffsetsY[action]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// only draw somni\r\n\t\t\t\t\t\tsomni.setTexture(somnisTexture[action], animationSpeed[action], framePixelWidth[action]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// draw phobia\r\n\t\t\t\tif (action == 2 && somni.justPropelled()){\r\n\t\t\t\t\t// draw phobia and a propelling hand\r\n\t\t\t\t\tphobia.setTexture(phobiaIdleTexture, animationSpeed[0], framePixelWidth[0], 0, 0,\r\n\t\t\t\t\t\t\tblueRingBigTexture, 0.2f, 128, secOffsetsX[action], secOffsetsY[action], propelAngles[action]);\r\n\t\t\t\t} else if ((action == 3 || action == 5) && somni.justPropelled()) {\r\n\t\t\t\t\t// draw phobia and an upward propelling hand\r\n\t\t\t\t\tint facing = phobia.isFacingRight()? 1:-1;\r\n\t\t\t\t\tphobia.setTexture(phobiaIdleTexture, animationSpeed[0], framePixelWidth[0], 0, 0,\r\n\t\t\t\t\t\t\tblueRingBigTexture, 0.2f, 128, secOffsetsX[action], secOffsetsY[action], facing*propelAngles[action]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// only draw phobia\r\n\t\t\t\t\tphobia.setTexture(phobiaIdleTexture, animationSpeed[0], framePixelWidth[0]);\r\n\t\t\t\t}\r\n\r\n\t\t\t}else{\r\n\t\t\t\t// draw the leading character phobia\r\n\t\t\t\tif ((action == 2 || action == 3 || action == 5) && !avatar.justPropelled()){\r\n\t\t\t\t\tint facing = phobia.isFacingRight()? 1:-1;\r\n\t\t\t\t\t// draw phobia with small dash ring\r\n\t\t\t\t\tphobia.setTexture(phobiasTexture[action], animationSpeed[action], framePixelWidth[action], 0, 0,\r\n\t\t\t\t\t\t\tblueRingSmallTexture, 0.2f, 128, 0, -5, facing*dashAngles[action]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (movementController.canHoldHands()){\r\n\t\t\t\t\t\t// phobia reaches out hand when somni within distance\r\n\t\t\t\t\t\tint f = movementController.faceTowards();\r\n\t\t\t\t\t\tphobia.setTexture(phobiasTexture[action], animationSpeed[action], framePixelWidth[action], 0, 0,\r\n\t\t\t\t\t\t\t\tphobiaHandsTextures[f], thirdOffsetsX[action+6*(f+1)], thirdOffsetsY[action]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// only draw phobia\r\n\t\t\t\t\t\tphobia.setTexture(phobiasTexture[action], animationSpeed[action], framePixelWidth[action]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// draw the idle character somni\r\n\t\t\t\tif (action == 2 && phobia.justPropelled()){\r\n\t\t\t\t\t// draw somni with a propelling hand\r\n\t\t\t\t\tsomni.setTexture(somniIdleTexture, animationSpeed[0], framePixelWidth[0],0, 0,\r\n\t\t\t\t\t\t\tyellowRingBigTexture, 0.2f, 128, secOffsetsX[action], secOffsetsY[action], propelAngles[action]);\r\n\t\t\t\t} else if ( (action == 3 || action ==5 ) && phobia.justPropelled()) {\r\n\t\t\t\t\tint facing = somni.isFacingRight()? 1:-1;\r\n\t\t\t\t\tsomni.setTexture(somniIdleTexture, animationSpeed[0], framePixelWidth[0], 0, 0,\r\n\t\t\t\t\t\t\tyellowRingBigTexture, 0.2f, 128, secOffsetsX[action], secOffsetsY[action], facing*propelAngles[action]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// only draw somni\r\n\t\t\t\t\tsomni.setTexture(somniIdleTexture, animationSpeed[0], framePixelWidth[0]);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tmovementController.setJustSeparated(false);\r\n\t\t\tmovementController.setJustPropelled(false);\r\n\t\t}\r\n\r\n\t\t// Set camera position bounded by the canvas size\r\n\t\tcamera = canvas.getCamera();\r\n\r\n\t\tif (cameraCenter == null) {\r\n\t\t\tcameraCenter = new Vector2(avatar.getX(), avatar.getY());\r\n\t\t\tcameraCenter.x = avatar.getX();\r\n\t\t\tcameraCenter.y = avatar.getY();\r\n\t\t}\r\n\r\n\t\tfloat PAN_DISTANCE = 100f;\r\n\t\tfloat CAMERA_SPEED = 10f;\r\n\r\n\t\tfloat newX = avatar.getX() * canvas.PPM;\r\n\t\tfloat camX = InputController.getInstance().getCameraHorizontal();\r\n\t\tif (camX != 0) {\r\n\t\t\tpanMovement.x = camX * CAMERA_SPEED * canvas.PPM;\r\n\t\t} else {\r\n\t\t\tpanMovement.x = 0;\r\n\t\t}\r\n\r\n\t\tfloat camY = InputController.getInstance().getCameraVertical();\r\n\t\tif (camY != 0) {\r\n\t\t\tpanMovement.y = camY * CAMERA_SPEED * canvas.PPM;\r\n\t\t} else {\r\n\t\t\tpanMovement.y = 0;\r\n\t\t}\r\n\r\n\t\tfloat newY = avatar.getY() * canvas.PPM;\r\n\r\n\t\tnewX = Math.min(newX, widthUpperBound);\r\n\t\tnewX = Math.max(canvas.getWidth() / 2, newX);\r\n\t\tfloat displacementX = newX - camera.position.x;\r\n\t\tfloat lerpDisplacementX = Math.abs(displacementX + panMovement.x) < PAN_DISTANCE * canvas.PPM ?\r\n\t\t\t\tdisplacementX + panMovement.x : displacementX;\r\n\t\tcamera.position.x += lerpDisplacementX * LERP * dt;\r\n\r\n\t\tnewY = Math.min(newY, heightUpperBound);\r\n\t\tnewY = Math.max(canvas.getHeight() / 2, newY);\r\n\t\tfloat displacementY = newY - camera.position.y;\r\n\t\tfloat lerpDisplacementY = Math.abs(displacementY + panMovement.y) < PAN_DISTANCE * canvas.PPM ?\r\n\t\t\t\tdisplacementY + panMovement.y : displacementY;\r\n\t\tcamera.position.y += lerpDisplacementY * LERP * dt;\r\n\r\n\t\tcamera.update();\r\n\r\n\t}",
"public void isStillInCombat() {\n isInCombat = enemiesInCombat.size() > 0;\n }",
"void collisionHappened(int position);",
"public void seekInterrupt ()\r\n\t{\r\n\t\tthis.simTime = this.sim.getTimer();\r\n\t\t//Debug/System.out.println(Fmt.time(simTime)\r\n\t\t//Debug/\t+ \": <seekInterrupt> \" + request);\r\n\r\n\t\t//\tSet the cylinder, head, and sector.\r\n\t\tthis.cylinder = this.request.getCylinder();\r\n\t\tthis.head = this.request.getHead();\r\n\t\t//\tBased on simulated time, determine current sector.\r\n\t\tthis.setCurrSector();\r\n\t\tif (this.sector != this.request.getSector())\r\n\t\t\tthis.simTime += this.calcRotTime(this.request.getSector());\r\n\t\tthis.sim.addEvent(new Event(Event.ROT_SATISFIED, this.simTime));\r\n\t}",
"@Override\n\tpublic void updatePosition()\n\t{\n\t\tif(!fired && !pathfinding)\n\t\t{\n\t\t\tif(x == destX && y == destY)\n\t\t\t{\n\t\t\t\tfired = true;\n\t\t\t\tvehicle.msgAnimationDestinationReached();\n\t\t\t\tcurrentDirection = MovementDirection.None;\n\t\t\t\t\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\tif(cIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t{\n\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(allowedToMove || drunk)\n\t\t\t{\n\t\t\t\tswitch(currentDirection)\n\t\t\t\t{\n\t\t\t\t\tcase Right:\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Down:\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:\n\t\t\t\t\t\tx--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x % CityPanel.GRID_SIZE == 0 && y % CityPanel.GRID_SIZE == 0 && !moves.isEmpty())\n\t\t\t{\t\n\t\t\t\tif(allowedToMove || drunk)\n\t\t\t\t{\n\t\t\t\t\tcurrentDirection = moves.pop();\n\t\t\t\t\n\t\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\t\n\t\t\t\t\tif(current != next)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrent = next;\n\t\t\t\t\t\n\t\t\t\t\tswitch(currentDirection)\n\t\t\t\t\t{\n\t\t\t\t\tcase Down:next = new Point(current.x,current.y + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:next = new Point(current.x - 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Right:next = new Point(current.x + 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:next = new Point(current.x,current.y - 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:next = current;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[next.y][next.x].tryAcquire())\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(next.y).get(next.x);\n\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Pathfinder.isCrossWalk(next, city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(Gui g : guiList)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(g instanceof PassengerGui)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(nextIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextIntersection.acquireAll();\n\t\t\t\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tguiList.add(this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!allowedToMove && drunk)\n\t\t{\n\t\t\tcity.addGui(new ExplosionGui(x,y));\n\t\t\tSystem.out.println(\"DESTROYING\");\n\t\t\tcity.removeGui(this);\n\t\t\tvehicle.stopThread();\n\t\t\tsetPresent(false);\n\t\t\t\n\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\n\t\t\tif(cIntersection == null)\n\t\t\t{\n\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t{\n\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t{\n\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t}\n\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected boolean isFinished() {\n SmartDashboard.putNumber(\"TurnCommand Current Heading\", Robot.m_drivetrain.getAngle());\n SmartDashboard.putNumber(\"TurnCommand Target\", Start + TurnGoal);\n if (IsLeft) {\n return Robot.m_drivetrain.getAngle() <= Start + TurnGoal;\n } else {\n return Robot.m_drivetrain.getAngle() >= Start + TurnGoal;\n }\n }",
"public void onCombatStarted() {\n\t\tbehaviour.onCombatStarted();\n\t}",
"private void checkMovement()\n {\n if (frames % 600 == 0)\n {\n \n ifAllowedToMove = true;\n \n \n }\n \n }",
"public void act() \n {\n \n checkKey();\n platformAbove();\n \n animationCounter++;\n checkFall();\n }",
"private void checkMovement() {\n\n if (getYVelocity() < 0) state = PlayerState.JUMPING;\n if (getYVelocity() == 0) /*|| getXVelocity() == 0)*/ state = PlayerState.STANDING;\n if (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\n if (!falling && !floating()) {\n\n if (getYVelocity() >= 0) {\n this.addY(-72);\n }\n\n }\n }\n\n if (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n this.addX((float) -5);\n state = PlayerState.WALKLEFT;\n }\n if (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n this.addX((float) 5);\n state = PlayerState.WALKRIGHT;\n }\n if (getYVelocity() > 0) state = PlayerState.FALLING;\n }",
"public void updateLogic(){\n\t\t\n\t\tif(gameMode){\n\t\t\tif(firstTouchdown){\n\t\t\t\t//linear x movement of the cube \n\t\t\t\tthis.applyBodyForceToCenter(Gsing.get().cSpeed, 0, true); \n\t\t\t\tthis.setBodyLinearDamping(0.3f); \n\t\t\t}\n\t\t\t\n\t\t\tif(!stopInc){\n\t\t\t\tthis.applyBodyForceToCenter(0, 50*this.getBodyMass(), true);\n\t\t\t}\n\t\t\t\n\t\t\tif(jump && isTouching){\n\t\t\t\tjump = false; \n\t\t\t\tisTouching = false; \n\t\t\t\tcheckInAirRotation = true; \n\t\t\t\tpos = this.getBodyWorldCenter();\n//\t\t\t\tthis.setBodyLinearVelocity(this.getBodyLinearVelocity().x, 17); \n\t\t\t\tthis.applyBodyLinearImpulse(new Vector2(0, Gsing.get().cImpulse), pos, true);\n\t\t\t}\n\t\t\t\n\t\t\tif(flyMode){\n\t\t\t\tpos = this.getBodyWorldCenter();\n\t\t\t\tthis.applyBodyForceToCenter(0, 35*this.getBodyMass(), true);\n\t\t\t\t\n\t\t\t\tif(fly){\n\t\t\t\t\tfly = false; \n\t\t\t\t\tthis.applyBodyForceToCenter(0, Gsing.get().cForce, true); \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(specialJump && isTouching){\n\t\t\t\tangle = Math.random()*Math.PI*2; \n\t\t\t\tspecialJump = false; \n\t\t\t\tisTouching = false; \n\t\t\t\tpos = this.getBodyWorldCenter(); \n\t\t\t\tthis.applyBodyLinearImpulse(specialImpulse, pos, true); \n\t\t\t\tLogger.log(\"jumped in a special way\"); \n\t\t\t}\n\t\t\t\n\t\t\tif(checkInAirRotation){\n\t\t\t\tsetDrawAngle(); \n\t\t\t}\n\t\t\t\n\t\t\tif(cubeDamageCnt == 6){\n\t\t\t\tcubeDead = true; \n\t\t\t}\n\t\t\t\n\t\t\t//check if the cube has encountered an obstacle\n\t\t\tif(isHurt)\n\t\t\t{\n\t\t\t\temitParticle(); \n\t\t\t}\n\t\t\t\n\t\t\tif(cubeDead){\n\t\t\t\tScreenHub.s.transitionTo(2, ScreenManager.TransactionType.SLICE); \n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse{\n\t\t\t\n\t\t\tif(this.getBodyLinearVelocity().x < .1 && !itsTheEnd){\n\t\t\t\tif(this.getBodyWorldCenter().y <= Gdx.graphics.getHeight()*.75){\n\t\t\t\t\tthis.applyBodyForceToCenter(0, 700f, true);\n//\t\t\t\t\tthis.getBody().setTransform(this.getBodyPosition(), 0);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\temitParticle(); \n\t\t\t\t\titsTheEnd = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcheckParticles4Destruction();\n\t}",
"protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"Can Move\");\n\t}",
"public boolean isOnWhenMovementDetected() {\n return onWhenMovementDetected;\n }",
"@Override\r\n\tpublic MyVector Move(GameVisibleActionEntity c, BeeWaveMap m) {\n\t\tsuper.Move(c, m);\r\n\t\t\r\n\t\tMyVector v = new MyVector();\r\n\r\n\t\tif(mSubMotion.size() == 0)\r\n\t\t{\r\n\t\t\tmMovingState = (mMovingState + 1) % NUMBER_MOVE_STATE;\r\n\t\t\tif(mMovingState == FINISHED_APPREAR)\r\n\t\t\t{\r\n\t\t\t\tmListener.OnFinishedAppear();\r\n\t\t\t\tmMovingState = (mMovingState + 1) % NUMBER_MOVE_STATE;\r\n\t\t\t\tMotionStrategy move = new Stand(4f);\r\n\t\t\t\tmSubMotion.add(move);\r\n\t\t\t}\r\n\t\t\tif(mMovingState == FINISHED_STAND)\r\n\t\t\t{\r\n\t\t\t\tmListener.OnFinishedStand();\r\n\t\t\t\tmMovingState = (mMovingState + 1) % NUMBER_MOVE_STATE;\r\n\t\t\t\tMotionStrategy move = new Stand(1f);\r\n\t\t\t\tmSubMotion.add(move);\r\n\t\t\t}\r\n\t\t\tif(mMovingState == FINISHED_DISAPPEAR)\r\n\t\t\t{\r\n\t\t\t\tmListener.OnFinishedDisappear();\r\n\t\t\t\tmMovingState = (mMovingState + 1) % NUMBER_MOVE_STATE;\r\n\t\t\t\tMotionStrategy move = new Stand(3f);\r\n\t\t\t\tmSubMotion.add(move);\r\n\t\t\t}\r\n\t\t\tif(mMovingState == FINISHED_HIDE)\r\n\t\t\t{\r\n\t\t\t\tmListener.OnFinihsedHide();\r\n\t\t\t\tmMovingState = (mMovingState + 1) % NUMBER_MOVE_STATE;\t\r\n\t\t\t\tMotionStrategy move = new Stand(1f);\r\n\t\t\t\tmSubMotion.add(move);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(mSubMotion.get(0).IsExpired())\r\n\t\t\t\tmSubMotion.clear();\r\n\t\t\telse\r\n\t\t\t\tv = mSubMotion.get(0).Move(c, m);\r\n\t\t}\r\n\t\t\r\n\t\treturn v;\r\n\t}",
"@Override\n\tpublic void tick() {\n\t\tif(levelOver) {\n\t\t\tif(this.getY()+this.getHeight() > flag.getY() + flag.getBounds().getHeight() - 60) {\n\t\t\t\tthis.setVelY(0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ty += velY;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(y > Window.HEIGHT + 2000) {\n\t\t\tif(!played) {\n\t\t\t\tAudioHandler.getMusic(\"theme\").pause();\n\t\t\t\tAudioHandler.getSound(\"died\").play();\n\t\t\t\tplayed = true;\n\t\t\t}\n\t\t\tDrawingCanvas.gameState = GameState.End;\n\t\t\treturn;\n\t\t}\n\n\t\tif(!died) {\n\t\t\t\n\t\t\tif(velX > 0 || KeyBoard.cameraVelX < 0) {\n\t\t\t\tcountRight += 0.5;\n\t\t\t\tif(countRight >= 6) countRight = 0;\n\t\t\t\tfacingRight = true;\n\t\t\t\tfacingLeft = false;\n\t\t\t} else if(velX < 0 || KeyBoard.cameraVelX > 0) {\n\t\t\t\tcountLeft += 0.5;\n\t\t\t\tif(countLeft >= 6) countLeft = 0;\n\t\t\t\tfacingRight = false;\n\t\t\t\tfacingLeft = true;\n\t\t\t} \n\t\t\t\n\t\t//\tSystem.out.println(\"dPressed: \"+KeyBoard.dPressed+\" aPressed: \"+KeyBoard.aPressed);\n\t\t\t\n\t\t\t\n\t\t\tx += velX;\n\t\t\ty += velY;\n\t\t\t\n\t\t\t/*if(!collideCheck()) {\n\t\t\t\tvelY -= accY;\n\t\t\t\t\n\t\t\t}*/\n\t\t\t\n\t\t\tvelY+=accY;\n\t\t\tcollideCheck();\n\t\t\t\n\t\t\t//if(jumping) velY += accY;\n\t//\t\tif(velX > 0) velX += accX;\n\t//\t\telse if(velX < 0) velX -= accX;\n\t\t\t\n\t\t\tvelY = Window.clamp(80, -30, velY);\n\t\t} else if(died) {\n\t\t\ty += velY;\n\t\t\tvelY += accY;\n\t\t}\n\t\t\n\t}",
"void moving() {\n\t\tSystem.out.println(\"Moving the car\");\r\n\t}",
"@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"Driving a airplane!\");\n\t}",
"@Override\n\tpublic void act(float delta) {\n\t\tsuper.act(delta);\n\t\t\n\t\tif(PWM.instance().pointIsInObstacle(this.getX(), this.getY())){\n\t\t\tif(!PWM.instance().pointIsInObstacle(this.getX(), lastPos.y)){\n\t\t\t\tthis.setPosition(this.getX(), lastPos.y);\n\t\t\t}else if(!PWM.instance().pointIsInObstacle(lastPos.x, this.getY())){\n\t\t\t\tthis.setPosition(lastPos.x, this.getY());\n\t\t\t}else{\n\t\t\t\tthis.setPosition(lastPos.x, lastPos.y);\n\t\t\t}\n\t\t\t\n\t\t\tthis.lastPos.x = this.getX();\n\t\t\tthis.lastPos.y = this.getY();\n\t\t\t\n\t\t}\t\t\t\t\n\t\t\n\t\tmainCameraFollowHero();\n\t\t\n\t\t\n\t}",
"public void update() {\n\t\tint xa = 0, ya = 0; \n\t\tif(game.getPlayer().x < 0){\n\t\t\txa -= 2;\n\t\t}else if(game.getPlayer().x + 32 > game.getScreen().width){\n\t\t\txa += 2;\n\t\t}\n\t\tif(game.getPlayer().y < 0){\n\t\t\tya -= 2;\n\t\t}else if(game.getPlayer().y + 32 > game.getScreen().height){\n\t\t\tya +=2;\n\t\t}\n\t\t\n\t\tif (xa != 0 || ya!= 0) move(xa, ya);\n\t\t\n\t\t//detects if the mouse is clicking on the interface\n\t\t/*if(Mouse.getButton() == 1 && Mouse.getX() >= 0 && Mouse.getX() <= 1200 && Mouse.getY() > 525 && Mouse.getY() < 675) {\n\t\t\tclicked = true;\n\t\t} else {\n\t\t\tclicked = false;\n\t\t}*/\n\t\t\n\t\treturn;\n\t}",
"public void updateGame(Mark mark) {\n if (board.hasWon(mark)) { // check de winaar\n currentState = (mark == Mark.CROSS) ? GameState.CROSS_WON : GameState.NOUGHT_WON;\n } else if (board.isDraw()) { // check gelijkspel\n currentState = GameState.DRAW;\n }\n }",
"public void setGameStarted(boolean gameStarted) {\n this.gameStarted = gameStarted; \n }",
"@Override\n\tpublic boolean act(float delta) {\n\t\tif(!isRunning) return true;\n\t\t\n\t\t\n\t\treturn false;\n\t}",
"boolean isMoving();",
"public final boolean isMoving() {\r\n\t\treturn moveStart > 0;\r\n\t}",
"public void beginGame() {\r\n data.gameState = 3;\r\n data.gameStartFlag = true;\r\n setChanged();\r\n notifyObservers(data);\r\n data.gameStartFlag = false; //Set the gameStart flag to false so the relevant update lines aren't ever run a second time\r\n }",
"public void onMoveGestureStarted()\n\t{\n\t\tfireEvent(TiC.EVENT_MOVE_START, null);\n\t}",
"public boolean onTouchEvent(MotionEvent event) {\n int action = MotionEventCompat.getActionMasked(event);\n switch (action) {\n\n case MotionEvent.ACTION_DOWN: {\n\n if(CheckIfInside(event.getX(), event.getY())) {\n this.playMoving = true;\n }\n break;\n }\n case MotionEvent.ACTION_MOVE: {\n if (!this.playMoving)\n return true;\n\n if (CheckForLimit(event.getX(), event.getY())) {\n this.x = event.getX();\n this.y = event.getY();\n invalidate();\n ///////////////////////////////////////////////////\n double normalizedX = normalizeAileron(x);\n double normalizedY = normalizeElevator(y);\n TcpClient tcpClient = TcpClient.getInstance();\n tcpClient.sendMessage(\"set controls/flight/aileron \" + normalizedX + \"\\r\\n\");\n tcpClient.sendMessage(\"set controls/flight/elevator \" + normalizedY + \"\\r\\n\");\n }\n break;\n }\n //user input's is finished\n case MotionEvent.ACTION_UP :\n this.playMoving = false;\n returnDefault();\n //call on draw\n invalidate();\n }\n return true;\n }",
"@Override\n\tpublic void action() {\n\t\tsuppressed = false;\n\t\tSettings.readState = true;\n\t\tSettings.atStartOfMaze = false;\n\t\tpilot.travel(-5);\n\t\tpilot.rotate(100);\n\t\twhile( pilot.isMoving() && !suppressed );\n\t\tpilot.stop();\n\t}",
"public void update()\n {\n done = false;\n if(data.size()==0)\n {\n data.add('0');\n data.add('0');\n data.add('0');\n data.add('0');\n data.add('0');\n }\n\n boolean isPressed = shot;\n\n keyUP = data.get(0) == '1';\n keyDOWN = data.get(1) == '1';\n keyLEFT = data.get(2) == '1';\n keyRIGHT = data.get(3) == '1';\n shot = data.get(4) == '1';\n\n if(!shot && isPressed)\n {\n if (canShot)\n {\n status.setShot(true);\n if (getBulletType ().equals (\"Laser\"))\n {\n bullets.add (new LaserBulletMulti (getCanonStartX (), getCanonStartY (),\n getDegree (), System.currentTimeMillis (), walls, tanks,canonPower,this.code,kills));\n setBulletType (\"Normal\");\n } else\n {\n bullets.add (new BulletMulti (getCanonStartX (), getCanonStartY (),\n getDegree (), System.currentTimeMillis (), walls, tanks,canonPower,this.code,kills));\n }\n\n canShot = false;\n shot = true;\n new Thread (new Runnable () {\n @Override\n public void run () {\n try {\n Thread.sleep (100);\n shot = false;\n } catch (InterruptedException e) {\n e.printStackTrace ();\n }\n }\n }).start ();\n new Thread (new Runnable () {\n @Override\n public void run () {\n try {\n Thread.sleep (500);\n canShot = true;\n } catch (InterruptedException e) {\n e.printStackTrace ();\n }\n }\n }).start ();\n }\n }\n\n int forX = (int) (6 * Math.cos (Math.toRadians (this.getDegree ())));\n int forY = (int) (6 * Math.sin (Math.toRadians (this.getDegree ())));\n\n if(keyUP && canMove(forX , forY) && isEmpty(forX,forY,1))\n {\n this.addLocX(forX);\n this.addLocY(forY);\n }\n if(keyDOWN && canMove(-1*forX , -1*forY) && isEmpty(forX,forY,-1))\n {\n this.addLocX(-1*forX);\n this.addLocY(-1*forY);\n }\n\n checkPrize();\n\n if(keyRIGHT && !keyLEFT)\n this.increaseDegree();\n\n if(!keyRIGHT && keyLEFT)\n this.decreaseDegree();\n\n\n this.setLocX(Math.max(this.getLocX(), 0));\n this.setLocX(Math.min(this.getLocX(), GameFrameMulti.GAME_WIDTH - 30));\n this.setLocY(Math.max(this.getLocY(), 0));\n this.setLocY(Math.min(this.getLocY(), GameFrameMulti.GAME_HEIGHT - 30));\n done = true;\n }",
"void beforeStop();",
"public void isShooting(GameContainer gc) throws LineUnavailableException{\r\n\t\tif(gc.getInput().isKeyPressed(Input.KEY_SPACE) || gc.getInput().isKeyPressed(Input.KEY_UP)){\r\n\t\t\tif(!this.bullet.isMoved()){\r\n\t\t\t\tthis.playSound();\r\n\t\t\t\tanimation = this.shooting;\r\n\t\t\t\tthis.bullet.position.x = super.getShape().getCenterX();\r\n\t\t\t\tthis.bullet.position.y = super.getShape().getCenterY();\r\n\t\t\t\tthis.getBullet().setMoved(true);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.getBullet().isMoved()){\r\n\t\t\tthis.bullet.move();\r\n\t\t}\r\n\t}",
"public void tick(){\n\t\t//first check if blocked\n\t\tsuper.tick();\n\t\ttickTimers();\n\t\tapplySpecialAbilitiesWithinDuration();\n\t\tif(sequence!=null){\n\t\t\tsequence.tick();\n\t\t}\n\t\tif(adjustToBlockageAndReturnTrueIfBlocked()||atEdge) {\n\t\t\tif(atEdge){\n\t\t\t\tcheckIfAtEdge();\n\t\t\t}\n\t\t\tif(charging) stopCharge();\n\t\t\tif(animation!=ANIMATION.DYING&&animation!=ANIMATION.DAMAGED) {\n\t\t\t\tif(animation!=ANIMATION.STAND) {\n\t\t\t\t\tanimation=ANIMATION.STAND;\n\t\t\t\t\tif(stand!=null) sequence.startSequence(stand);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif(buttonReleased){\n\t\t\tif(targetPositionReached()){\n\t\t\t\tvelX=0;\n\t\t\t\tvelY=0;\n\t\t\t\tmoving=false;\n\t\t\t\tif(animation!=ANIMATION.DYING&&animation!=ANIMATION.DAMAGED) {\n\t\t\t\t\tif(animation!=ANIMATION.STAND) {\n\t\t\t\t\t\tanimation=ANIMATION.STAND;\n\t\t\t\t\t\tif(stand!=null) sequence.startSequence(stand);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdirection=\"stand\";\n\t\t\t}\n\t\t}\n\t\tif(damaged){\n\t\t\tif(animation!=ANIMATION.DYING) {\n\t\t\t\tif(animation!=ANIMATION.DAMAGED) {\n\t\t\t\t\tanimation=ANIMATION.DAMAGED;\n\t\t\t\t\tif(damage!=null) sequence.startSequence(damage,stand);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetVelX(0);\n\t\t\tsetVelY(0);\n\t\t}\n\t\t\n\t\tx+=velX;\n\t\ty+=velY;\n\t\tupdatePosition();\n\t\tcheckIfAtEdge();\n\t\t\n\t\t\n\t}",
"@Override\n public void update()\n {\n if(!Rect.intersects(spriteBounds, gameRegion) || wasTouched)\n {\n destroy();\n }\n else\n {\n spriteBounds.offset(0, speed);\n }\n }",
"@Override\r\n public void tick() {\n playerNextTo();\r\n if (playerContact() && isCollisioned()) {\r\n if (!((GameState) game.getGameState()).getWorld().getTile((int) (x + xMove), (int) (y + yMove)).isSolid()\r\n && isValidMove(xMove, yMove)) {\r\n x += xMove;\r\n y += yMove;\r\n }\r\n }\r\n }",
"@Override\n public void onMovement() {\n showToast(\"设备移动\");\n LogUtil.e(\"move\");\n }",
"void move() throws IOException, InterruptedException{\r\n \r\n // if current position and velocity are greater than 0 and less than the right edge of the screen\r\n if (x + xa > 0 && x + xa < 1280-w){\r\n // increase the character position by velocity\r\n x = x + xa;\r\n }\r\n \r\n // if current height and velocity are greater than zero and less than the floor of the game\r\n if (y + ya > 0 && y + ya < 500){\r\n // if jumping up\r\n if (y > 300){\r\n y = y + ya;\r\n } else{ // if falling down, increase velocity to 3\r\n ya = 3;\r\n y = y + ya;\r\n }\r\n }\r\n \r\n // if a collision is detected increase life counter\r\n if (game.collision()){\r\n // increase life counter\r\n count++;\r\n // call game over to load next image or to close game\r\n game.gameOver(count);\r\n } \r\n }",
"public interface SnakeGame {\n\n /**\n * Starts the game given a certain level of complexity\n * @param level level of complexity\n * @return Status of the game at the start.\n */\n StartGameStatus start(Level level);\n\n /**\n * Timer event which occurs during every interval of the game.\n * The logic needs to check if the snake has hit the wall or its tail.\n * Also if the snake consumes food at this step, the snake needs to grow by 1.\n * Game could end of the snake hits the wall or its tail. Also game could be won\n * if the snake has grown by a certain configurable size.\n * \n * @return Status of the timer operation.\n */\n TimerStatus onTimer();\n\n /**\n * Direction change has been requested by the player.\n * \n * @param direction direction that is requested.\n */\n void onDirectionChanged(Direction direction);\n \n \n}",
"public abstract boolean changeMove();",
"boolean isMoveFinished(int tick);",
"@Override\n public void update(long now) {\n if (moveRequested) {\n if (canMove(direction)) {\n doMove(direction);\n }\n }\n moveRequested = false;\n\n if(isDamageTaken()){\n invicibleTimer.StartTimer(now);\n setDamageTaken(false);\n }\n\n this.invicibleTimer.update(now);\n setCanTakeDamage(invicibleTimer.isFinished() || !invicibleTimer.isRunnig());\n\n }",
"public void caughtCheating(){\n\t\tinGoodStanding = false;\n\t}",
"@Override\n\tvoid update(){\n\n\t\t\tif(Frogger.flag==1){\n\t\t\t\tif(orientation == Orientation.UP) y -= step;\n\t\t\t\telse if (orientation == Orientation.DOWN) y += step;\n\t\t\t\telse if (orientation == Orientation.RIGHT) x += step;\n\t\t\t\telse if (orientation == Orientation.LEFT) x -= step;\n\t\t}\n\t\tsetChanged();\n\t\tnotifyObservers();\n\t}",
"static void moving() throws GameActionException {\n\n\t\tcheckLumberjack();\n\n\t\trc.setIndicatorLine(myLocation, myLocation.add(robotDirection), 0, 0, 0);\n\n\t\tif (rc.canBuildRobot(RobotType.SCOUT, robotDirection)\n\t\t\t\t&& rc.readBroadcast(Channels.COUNT_SCOUT) < Constants.MAX_COUNT_SCOUT) {\n\t\t\trc.buildRobot(RobotType.SCOUT, robotDirection);\n\t\t\tCommunication.countMe(RobotType.SCOUT);\n\t\t\treturn;\n\t\t}\n\t\t// } else if (rc.canBuildRobot(RobotType.SOLDIER, buildDirection) &&\n\t\t// rc.readBroadcast(Channels.COUNT_SOLDIER) <\n\t\t// Constants.MAX_COUNT_SOLDIER) {\n\t\t// rc.buildRobot(RobotType.SOLDIER, buildDirection);\n\t\t// Communication.countMe(RobotType.SOLDIER);\n\t\t// return;\n\t\t// }\n\n\t}",
"private void action() {\r\n moveSnake();\r\n if (hasEatenPowerUp() == false) checkForCollisionWithSelf();\r\n if (hasHitBoundry() == false) redraw();\r\n }",
"public synchronized void tellAt(){\n\t\tnotifyAll();\n\t}",
"private void movement()\n {\n if(gameOverBool==false)\n {\n if(Greenfoot.isKeyDown(\"up\"))\n {\n setLocation(getX(), getY()-6);\n setRotation(2);\n } else if (Greenfoot.isKeyDown(\"down\")){\n setLocation(getX(), getY()+6); \n setRotation(8);\n } else{\n setRotation(5);\n } \n }\n }",
"public final void processMovement() {\r\n\t\tif (isMoving()) {\r\n\t\t\tlong elapsed = System.currentTimeMillis() - moveStart;\r\n\t\t\tmovementPercent = (((float) elapsed) / ((float) movementTime));\r\n\t\t\tif (movementPercent < 1f) {\r\n\t\t\t\txOff = -getWrappedEntity().getDir().getXOff()\r\n\t\t\t\t\t\t* Math.round((1f - movementPercent)\r\n\t\t\t\t\t\t\t\t* TileConstants.TILE_WIDTH);\r\n\t\t\t\tzOff = -getWrappedEntity().getDir().getZOff()\r\n\t\t\t\t\t\t* Math.round((1f - movementPercent)\r\n\t\t\t\t\t\t\t\t* TileConstants.TILE_HEIGHT);\r\n\t\t\t} else {\r\n\t\t\t\tmovementPercent = 0f;\r\n\t\t\t\tmoveStart = -1;\r\n\t\t\t\txOff = 0;\r\n\t\t\t\tzOff = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic boolean updatePos(Physical_passive map) {\n\t\tupdate_animSpeed();\n\t\t// if (!map.getPhysicalRectangle().contains(getPhysicalShape()))\n\t\t// return false;\n\t\tif (!isDead()) {\n\t\t\tResolveUnreleasedMovements();\n\t\t\tgetWeapon().update();\n\t\t\tupdatePush();\n\t\t\t/*\n\t\t\t * if (!isBlock_down()) { // Por lo visto esto controla el salto if\n\t\t\t * (getJumpTTL() != 0) { moveJump(); } else // Y este 3 es la\n\t\t\t * gravedad., lo paso a un metodo de actor // para decirle q empiece\n\t\t\t * a caer fall(); // ; }\n\t\t\t */\n\t\t\t// Aqui es donde realmente cambiamos la posicion una vez calculado\n\t\t\t// donde va a ir.\n\t\t\t// updateLegsRotation(getSpeed().add(getPosition()));\n\t\t\tgetLegs().setLocation(new Point((int) getPosition().x(), (int) getPosition().y()));\n\t\t\tsetPosition(getPosition().add(getSpeed().add(getPush())));\n\t\t\tgetTorax().setLocation(new Point((int) getPosition().x(), (int) getPosition().y()));\n\t\t\t// setPosition(getPosition().add(getSpeed().add(getPush()))); //\n\t\t\t// CAmbiado;\n\t\t\tLine2D line = new Line2D.Float((float) getKillTracer().getTrace().getLine().getX1(),\n\t\t\t\t\t(float) getKillTracer().getTrace().getLine().getY1(), (float) getSpeed().x(),\n\t\t\t\t\t(float) getSpeed().y());\n\t\t\tgetKillTracer().getTrace().setLine(line);\n\t\t\tArrayList<Entity> hits = getKillTracer().getCollision(getMap());\n\t\t\tfor (Entity ent : hits) {\n\t\t\t\tif (ent instanceof Player && ent != this) {\n\t\t\t\t\tPlayer plent = (Player) ent;\n\t\t\t\t\tplent.die();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"void idle()\n {\n\n elevatorOffset = 0;\n motorTimeline.pause();\n }",
"@Override\n public void onMove(boolean absolute) {\n \n }",
"public void tick() \n\t{\n\t\tif (handler.getMouseManager().checkLeftPressed() \n\t\t\t\t&& handler.getMouseManager().getMousePosX() > 285 \n\t\t\t\t&& handler.getMouseManager().getMousePosX() < 515)\n\t\t{\n\t\t\tif (handler.getMouseManager().getMousePosY() > 177 && handler.getMouseManager().getMousePosY() <254)\n\t\t\t{\n\t\t\t\tsetState(handler.getGame().getSelectCharacterState());\n\t\t\t}\n\t\t\telse if (handler.getMouseManager().getMousePosY() > 345 && handler.getMouseManager().getMousePosY() < 422)\n\t\t\t{\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t}",
"private void updatePlayerMovingStatus(){\n // get player's moving status\n if(keyPressed.contains(KeyCode.LEFT)){\n player.setFacing(Direction.LEFT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.RIGHT)){\n player.setFacing(Direction.RIGHT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.UP)){\n player.setFacing(Direction.UP);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.DOWN)){\n player.setFacing(Direction.DOWN);\n player.setIsMoving(true);\n } else {\n player.setIsMoving(false);\n }\n }",
"public void statusChanged(GameStatusEvent e) {\n gameRunning = false;\n if(e.isGameOver()) {\n gameWon = false;\n hauptfenster.getSounds().playGameOver(); // abspielen der Sounds\n } else if(e.isGameWon()) {\n gameWon = true;\n hauptfenster.getSounds().playGameWon(); // abspielen der Sounds\n }\n hauptfenster.getSpielfeld().drawNew(); // Spielfeld neu zeichnen\n hauptfenster.getToolbar().updateToolbar(hauptfenster.getDionaRapModel().getShootAmount(), hauptfenster.getDionaRapModel().getScore(), hauptfenster.getProgress());\n hauptfenster.getSpielfeld().gameStatusEnd(hauptfenster.getPlayer(), gameWon); // das Icon bei gewonnen oder verloren setzen\n hauptfenster.getToolbar().setEnabled(); // den \"Neues Spiel\"-Button auf aktiv setzen\n hauptfenster.getMenubar().setGameSettingsEnabled(); // den \"Spieleinstellungen\"-Button auf aktiv setzen\n\n int end_position = HighScoreFile.SCORE_TO_LOW_FOR_HIGHSCORE;\n try{\n end_position = HighScoreFile.getInstance().getScorePosition(hauptfenster.getDionaRapModel().getScore()); // auslesen der Position\n } catch (IOException ex) {\n System.err.println(\"File kann nicht gelesen werden: \" + ex);\n }\n if(end_position != HighScoreFile.SCORE_TO_LOW_FOR_HIGHSCORE && gameWon) {\n addBestlist(); // Bestenliste Dialog zeichnen\n }\n addDialog(gameWon); // den Dialog zeichnen\n }",
"@Override\r\n public void update(MiniGame game){\r\n PathXDataModel data = (PathXDataModel) game.getDataModel();\r\n \r\n //Check if 10 seconds has past since activating steal\r\n if (getSpecialState().equals(PathXSpriteState.STEALING.toString())){\r\n GregorianCalendar newTime = new GregorianCalendar();\r\n long timePast = newTime.getTimeInMillis() - getSpecialTimer().getTimeInMillis();\r\n if ((timePast / 1000) >= 10){\r\n game.getGUIButtons().get(PathXConstants.STEAL_BUTTON_TYPE).setState(PathXSpriteState.VISIBLE.toString());\r\n setSpecialState(\"\");\r\n setSpecialTimer(null);\r\n }\r\n \r\n }\r\n \r\n //Check if 10 seconds has past since activating Intangibility\r\n if (getSpecialState().equals(PathXSpriteState.INTANGIBLE.toString())){\r\n GregorianCalendar newTime = new GregorianCalendar();\r\n long timePast = newTime.getTimeInMillis() - getSpecialTimer().getTimeInMillis();\r\n if ((timePast / 1000) >= 10){\r\n game.getGUIButtons().get(PathXConstants.INTANGIBILITY_BUTTON_TYPE).setState(PathXSpriteState.VISIBLE.toString());\r\n setSpecialState(\"\");\r\n setSpecialTimer(null);\r\n }\r\n \r\n }\r\n \r\n //Check if 10 seconds has past since activating God Mode\r\n if (getSpecialState().equals(PathXSpriteState.GOD_MODE.toString())){\r\n GregorianCalendar newTime = new GregorianCalendar();\r\n long timePast = newTime.getTimeInMillis() - getSpecialTimer().getTimeInMillis();\r\n if ((timePast / 1000) >= 10){\r\n game.getGUIButtons().get(PathXConstants.GOD_MODE_BUTTON_TYPE).setState(PathXSpriteState.VISIBLE.toString());\r\n setSpecialState(\"\");\r\n setSpecialTimer(null);\r\n }\r\n \r\n }\r\n\r\n if (getSpecialState().equals(PathXSpriteState.STEALING.toString())) {\r\n ArrayList<Car> otherCars = new ArrayList();\r\n otherCars.addAll(data.getCops());\r\n otherCars.addAll(data.getBandits());\r\n otherCars.addAll(data.getZombies());\r\n\r\n for (Car car : otherCars) {\r\n if (aabbsOverlap(car)) {\r\n if (!car.isStolen()) {\r\n data.getRecord().balance += 20;\r\n car.setStolen(true);\r\n }\r\n }\r\n }\r\n }\r\n \r\n super.update(game);\r\n \r\n PathXDataModel dataModel = (PathXDataModel) game.getDataModel();\r\n PathXNode safeHouse = dataModel.getNodes().get(1);\r\n if (getIntersection() == safeHouse)\r\n dataModel.endGameAsWin();\r\n }",
"public void actionPerformed(ActionEvent e) {\n keyCheck();\n LevelIntermissionCount++;\n \n if (LevelIntermissionCount > 50 && LevelIntermission == true && checkGameOver() == false) {\n LevelIntermission = false;\n LevelIntermissionCount = 0;\n reset();\n }\n if (startMenu == false && LevelIntermission == false && checkGameOver() == false){\n respawnShip();\n SwitchCount++;\n /*\n * calling functions that update all the positions of objects\n */\n UpdateShip();\n UpdateRock();\n UpdateBigRock();\n UpdateTrackerRock();\n UpdateBossRock();\n UpdateBullets();\n UpdateEnergyBlaster();\n UpdateGrenades();\n UpdateDebris();\n UpdateGrenadeBullets();\n\n checkDestruction();\n checkGernadeExplosion();\n checkCollisions();\n bossMinions();\n checkBossHP();\n checkWin();\n }\n }",
"@Override\n\t public void actionPerformed(ActionEvent e) {\n\t\t isPlayerDead();\n\t\t isGameRunning();\n\n\t updatePlayer();\n\t updateCentipede();\n\t updateMissiles();\n\t\t updateMushrooms();\n\t updateSpider();\n\n\t checkCollisions();\n\t repaint();\n\t }",
"public abstract void systemActionStarts(long ms);",
"@Override\n\tpublic void onScannedRobot(ScannedRobotEvent e)\n\t{\n\t\tif(this.running)\n\t\t{\n\n\t\t\tdouble angleToEnemy = e.getBearing();\n\t\t\tdouble angleToEnemyRadians = e.getBearingRadians();\n\t\n\t // Calculate the angle to the scanned robot\n\t \tdouble angle = Math.toRadians((this.robotStatus.getHeading() + angleToEnemy) % 360);\n\t\n\t // Calculate the coordinates of the robot\n\t \tdouble enemyX = (this.robotStatus.getX() + Math.sin(angle) * e.getDistance());\n\t \tdouble enemyY = (this.robotStatus.getY() + Math.cos(angle) * e.getDistance());\n\t \tdouble enemyDistance = e.getDistance();\n\t \t\n\t \t//Saving enemy position variables in a list of object class.\n\t \t//Only enemy positions from different quadrants, that were never reached will be saved.\n\t \tif((getQuadrant(getX(), getY()) != getQuadrant(enemyX, enemyY)) && (!quadrants.contains((double)getQuadrant(enemyX, enemyY))))\n\t\t\t\tthis.positions.add(new Position<Double>(enemyX, enemyY, enemyDistance, angleToEnemyRadians));\n\t\t}\n\t}",
"void setMoving(boolean isMoving);",
"@Override\r\n\tpublic void onMovableChanged(Movable movable) {\r\n\t\tControllerEventSource.notifyMovableChanged(movable);\r\n\t}",
"public void update(float delta)\r\n\t{\n\t\tposition.add(velocity.cpy().scl(delta));\r\n\t\t\t\t\r\n\t\t// Move the rectangle to the new position\r\n\t\tcollisionRect.setPosition(position);\r\n\t\t\r\n\t\tif (position.x + width >= xMax)\r\n\t\t{\r\n\t\t\tsetDirection(Constants.DIRECTION.DOWN_LEFT);\r\n\t\t\tSystem.out.println(\"im moving left!\");\r\n\t\t}\r\n\t\telse if(position.x <= xMin)\r\n\t\t{\r\n\t\t\tsetDirection(Constants.DIRECTION.DOWN_RIGHT);\r\n\t\t\tSystem.out.println(\"im movin right!\");\r\n\t\t}\r\n\t\t\r\n\t\t// If the Scrollable object is no longer visible:\r\n\t\tif (((position.y + height) > 480 + height) || (((position.x + width < 0) || position.x - width > Constants.TRUE_WIDTH))) \r\n\t\t{\r\n\t\t\tisScrolledDown = true;\r\n\t\t}\r\n\t}",
"public void startGame() {\n status = Status.COMPLETE;\n }",
"public void update(MazeEventWalkedKilled e) {\r\n }",
"public void tick()\r\n\t{\r\n\t\tsuper.tick();\r\n\t\t\r\n\t\tswitch(state) {\r\n\t\tcase ENTERING:\r\n\t\t\tif (speed() == 0) {\r\n\t\t\t\tsetSpeed(speed);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase STOPPED:\r\n\t\t\tif (speed() > 0) {\r\n\t\t\t\tsetSpeed(0);\r\n\t\t\t}\r\n\t\t\t//Remain in same state\r\n\t\t\tbreak;\r\n\t\tcase EXITING:\r\n\t\t\tif (speed() == 0) {\r\n\t\t\t\tsetSpeed(speed);\r\n\t\t\t}\r\n\t\t\t//turn();\r\n\t\t\t//Remain in same state\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t// Check to see if enity has entered a box\r\n\t\tBox box = getBox();\r\n\t\tif( box != null){\r\n\t\t//check to see if the box contains the vehicle, and check ot see if the pedsetrian is already in the box\r\n\t\t//if so add it to the box\r\n\t\t\tif( box.insideBox(this) && !inBox && state == State.EXITING){ \r\n\t\t\t\tbox.addEntity(this);\r\n\t\t\t\tinBox = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\t//Check for boundary crossing\r\n\t\tif ((x() < lane.road().getIntersection().getMinX() || x() > lane.road().getIntersection().getMaxX()) || (y() < lane.road().getIntersection().getMinY() || y() > lane.road().getIntersection().getMaxY())) {\r\n\t\t\tlane.removePedestrian(this);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public void update() {\n if (!hasStarted) {\n //drive.setAutonStraightDrive();\n hasStarted = true;\n } else {\n if (Math.abs((Math.abs(rotations) - (Math.abs(drive.getRightSensorValue() / 4096)))) <= TOLERANCE) {\n drive.setBrakeMode(true);\n setFinished(true);\n }\n }\n\n }",
"@Override\n public void update(Entity entity, MapManager mapMgr, float delta) {\n\n updateBoundingBoxPosition(nextEntityPosition);\n updatePortalLayerActivation(mapMgr);\n\n if (!isCollisionWithMapLayer(entity, mapMgr) && (!isCollision(entity, mapMgr)) && state == Entity.State.WALKING) {\n setNextPositionToCurrent(entity, mapMgr, delta);\n Camera camera = mapMgr.getCamera();\n camera.position.set(currentEntityPosition.x, currentEntityPosition.y, 0f);\n camera.update();\n } else {\n updateBoundingBoxPosition(currentEntityPosition);\n //if direction key has been lifted stop moving\n\n //TODO bug where if player is walking against a wall switching direction\n //TODO will not break out of the walk\n /*if(motion == Entity.Motion.STANDING)\n {\n entity.sendMessage(MESSAGE.CURRENT_STATE, json.toJson(Entity.State.IDLE));\n }*/\n }\n\n if (isMining) {\n tileToMine = getFacingTile(entity,mapMgr);\n entity.sendMessage(MESSAGE.MINING_GRAPHICS, json.toJson(tileToMine));\n isMining = false;\n }\n if (motion == Entity.Motion.STANDING) {\n //only call calculate position once\n calculateNextPosition(delta);\n }\n tileToMine = getFacingTile(entity, mapMgr);\n //System.out.print(\"Tile x \" + tileToMine.x + \"Tile Y \" + tileToMine.y);\n }",
"private static void shooting() {\n if (m_gamepad.getStartButton() || shootOverride) { //If the start button is pressed\n if (Math.abs(kVelocitySetpoint - -flywheelMaster.getSelectedSensorVelocity()) <= kFlywheelTolerance) { // ... and we're close enough to the desired RPM ...\n SmartDashboard.putBoolean(\"AUTO SHOOT READY\", true); //Alert driver that the shooting is ready\n runConveyor(); //Convey balls into the flywheel\n } else { //If we are NOT within our tolerance\n SmartDashboard.putBoolean(\"AUTO SHOOT READY\", false); //Alert the operator\n }\n if (velocityDipped && -flywheelMaster.getSelectedSensorVelocity() >= kVelocitySetpoint) {\n powerCellCount--;\n velocityDipped = false;\n }\n\n if (-flywheelMaster.getSelectedSensorVelocity() <= kDip /*Placeholder value*/) {\n velocityDipped = true;\n }\n PID(); //Calculate PIDF loop\n flywheelMaster.set(ControlMode.PercentOutput, -speed); //Run the motor at the calculated level\n } else { //If start button is NOT pressed\n flywheelMaster.set(ControlMode.PercentOutput, m_gamepad.getY(GenericHID.Hand.kLeft)); //Set flywheel manually with joystick\n SmartDashboard.putBoolean(\"AUTO SHOOT READY\", false); //Alert operator\n }\n }",
"void currentStateChanged();",
"@Override\r\n\tpublic void update(float delta) {\r\n\t\tswitch(this.state) {\r\n\t\tcase DAMAGE:\r\n\t\t\tdamageTime += delta;\r\n\t\t\tif(damageTime > (3 * 0.18f)) {\r\n\t\t\t\tdamageTime = 0;\r\n\t\t\t\tthis.state = slugState.WALK;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t\tif(this.dir == directionState.LEFT) {\r\n\t\t\t\t\tthis.speed = -30;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.speed = 30;\r\n\t\t\t\t}\r\n\t\t\t\tif(this.hitpoints <= 0) {\r\n\t\t\t\t\tthis.setFlaggedForRemoval(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\tcase ATTACK:\r\n\t\t\tattackTime += delta;\r\n\t\t\tif(attackTime > (5 * 0.18f)) {\r\n\t\t\t\tattackTime = 0;\r\n\t\t\t\tthis.stateTime = 0;\r\n\t\t\t\tthis.state = slugState.WALK;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif(!alert) {\r\n\t\t\tif(this.xStart - x > 72) {\r\n\t\t\t\tthis.move('d');\r\n\t\t\t}\r\n\t\t\telse if(x - this.xStart > 72) {\r\n\t\t\t\tthis.move('a');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public void update(MazeEventEnemyWalkedKilled e) {\r\n }",
"public void notifyTurn()\n {\n playerObserver.onTurnStart();\n }",
"public void update() {\n\t\t\n\t\t//System.out.println(this.observer);\n\t\t\n\t\tif(this.isCollidable == false){\n\t\t\tthis.x = -500;\n\t\t\tthis.y = -500;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (this.life < this.maxLife && !this.isDead()){\n\t\t\t\n\t\t\tif(recovery >= 1){\n\t\t\t\tthis.setLife(this.life + 1);\n\t\t\t\trecovery = 0;\n\t\t\t}\n\t\t\t\n\t\t\trecovery += 0.01;\n\t\t}\n\t\t\n\t\tsuper.update();\n\t\t\n\t\t//Shield movement\n\t\tInteger horizontalCorrection = (this.width - player.width)/2;\n\t\tInteger verticalCorrection = (this.height - player.height)/2;\n\n\t\t//Adjusting position player with force shield\n\t\tthis.x = player.x - horizontalCorrection;\n\t\tthis.y = player.y - verticalCorrection;\n\t}",
"public boolean isMoving() {\n\t\treturn state.getDirection() != Direction.STATIONARY;\n\t}",
"public void onMissionStart() {\n\n }",
"protected boolean hasGameStarted() {\r\n return super.hasGameStarted();\r\n }",
"public boolean isMoving() {\n\t\treturn moveProgress > 0;\n\t}",
"public void moving()\n {\n if(onPlatform()&&endPlatform()){\n direction();\n }\n if(onPlatform()&&!endPlatform()){\n changeDirection();\n direction();\n }\n collideMoveLocation(horzVelocity,1);\n //sharaz\n if(isTouching(PushObject.class)){\n changeDirection();\n direction();\n }\n \n \n }",
"@Test\n void moveWithinPLAYING() {\n getGame().start();\n assertThat(getGame().isInProgress()).isTrue();\n getGame().move(getPlayer(), Direction.EAST);\n assertThat(getPlayer().isAlive()).isTrue();\n verifyZeroInteractions(observer);\n assertThat(getGame().isInProgress()).isTrue();\n }"
] | [
"0.56184053",
"0.55551684",
"0.5514953",
"0.5320478",
"0.5312309",
"0.52830076",
"0.5265114",
"0.526215",
"0.52349156",
"0.5212018",
"0.52060467",
"0.51497376",
"0.5143562",
"0.5128458",
"0.5128246",
"0.51190865",
"0.51190734",
"0.5118269",
"0.5116647",
"0.51015884",
"0.50901604",
"0.50886494",
"0.50870556",
"0.50802064",
"0.5078126",
"0.507355",
"0.50607",
"0.50605583",
"0.5058841",
"0.505632",
"0.504712",
"0.504385",
"0.5032599",
"0.50325584",
"0.5031474",
"0.5022662",
"0.5003572",
"0.5001916",
"0.4989771",
"0.49895427",
"0.49843973",
"0.4967992",
"0.49647093",
"0.49548748",
"0.49508324",
"0.4941898",
"0.49406603",
"0.49278596",
"0.49153346",
"0.49084058",
"0.49066538",
"0.4899098",
"0.48929003",
"0.4890311",
"0.4884869",
"0.4878919",
"0.48752496",
"0.48751763",
"0.4867942",
"0.48647258",
"0.4862741",
"0.48586038",
"0.48535442",
"0.48489767",
"0.48418552",
"0.48356366",
"0.4835139",
"0.48333737",
"0.48304677",
"0.4826914",
"0.48254415",
"0.48216838",
"0.4821421",
"0.48176983",
"0.48140052",
"0.48097408",
"0.48083583",
"0.48073304",
"0.48066914",
"0.4805393",
"0.48027033",
"0.4796696",
"0.47932872",
"0.479228",
"0.4790087",
"0.47885475",
"0.47884327",
"0.47869942",
"0.4785758",
"0.4785159",
"0.4784995",
"0.47849104",
"0.4783728",
"0.47825417",
"0.4781904",
"0.4781426",
"0.477979",
"0.47783768",
"0.47746775",
"0.47692433"
] | 0.7786479 | 0 |
Checks if the controller is currently moving. | @Override
public boolean isMoving() {
return _movementTask != null && !_movementTask.isDone();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final boolean isMoving() {\r\n\t\treturn moveStart > 0;\r\n\t}",
"public boolean isMoving() {\n return this.movementComposer.isMoving();\n }",
"public boolean isMoving() {\n\t\treturn moveProgress > 0;\n\t}",
"public boolean isMoving() {\n\t\treturn state.getDirection() != Direction.STATIONARY;\n\t}",
"public boolean isMoving()\n\t{\n\t\treturn (mode == MotorPort.FORWARD || mode == MotorPort.BACKWARD);\n\t}",
"public boolean isMoving() {\r\n\t\treturn moving;\r\n\t}",
"public boolean isMoving() {\n return moving;\n }",
"public boolean hasMoved(){\n\t\treturn getGame().getCurrentPlayer().hasMoved();\n\t}",
"boolean isMoving();",
"public boolean canMove()\n\t{\n\t\tif(delayMove>compareSpeed())\n\t\t{\n\t\t\tdelayMove=0;\n\t\t\treturn true;\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean canMove() {\n return (Math.abs(getDist())>=50);\n }",
"public boolean isMovementChanged() {\n return movementChanged;\n }",
"private static boolean canMove() {\n return GameManager.getCurrentTurn();\r\n }",
"public boolean isNavigating() {\n\t\treturn leftMotor.isMoving() || rightMotor.isMoving();\n\t}",
"public boolean canMove()\n {\n return canMove;\n }",
"public boolean isMovement() {\n return isMovementEvent;\n }",
"private boolean isMove() {\n return this.getMoves().size() != 0;\n }",
"public boolean takeControl() {\n\t\treturn Project2a.curState == Project2a.RobotState.Forward && Project2a.getCurTime() - 500 > MoveForward.startTime;\n\t}",
"public boolean canMove() {\r\n return (state == State.VULNERABLE || state == State.INVULNERABLE);\r\n\r\n }",
"public boolean onFirstMove() {\n\t\treturn (PawnMoveInformation.NOT_MOVED_YET == this.info);\n\t}",
"public boolean canMove() {\n\n\tArrayList<Location> moveLocs = getValid(getLocation());\n\n\tif (isEnd == true) {\n\t return false;\n\t} \n\tif (!moveLocs.isEmpty()) {\n\t \n\t randomSelect(moveLocs);\n\t // selectMoveLocation(moveLocs);\n\t return true;\n\n\t} else {\n\t return false;\n\t}\n }",
"public boolean isRocketMoving(){\n\t\tif(mLevel.startGravity){\n\t\t\tif(mState == GameState.STARTING_LVL || mState == GameState.PLANNING_LVL){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}//if game is running then rocket is moving no matter what\n\t\tif(mState == GameState.RUNNING_LVL){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"boolean canMove();",
"public boolean isOnWhenMovementDetected() {\n return onWhenMovementDetected;\n }",
"public boolean isFreeMoving() {\n\t\treturn _freeMoving;\n\t}",
"private void checkMovement() {\n\n if (getYVelocity() < 0) state = PlayerState.JUMPING;\n if (getYVelocity() == 0) /*|| getXVelocity() == 0)*/ state = PlayerState.STANDING;\n if (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\n if (!falling && !floating()) {\n\n if (getYVelocity() >= 0) {\n this.addY(-72);\n }\n\n }\n }\n\n if (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n this.addX((float) -5);\n state = PlayerState.WALKLEFT;\n }\n if (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n this.addX((float) 5);\n state = PlayerState.WALKRIGHT;\n }\n if (getYVelocity() > 0) state = PlayerState.FALLING;\n }",
"private boolean movingLeft() {\n return this.velocity.sameDirection(Vector2D.X_UNIT.opposite());\n }",
"public boolean hasMoved() {\n return moved;\n }",
"public boolean hasMoved(){\r\n\t\treturn this.moved;\r\n\t}",
"public boolean canMove ()\n {\n return ((ActiveAdvancer)_advancer).canMove();\n }",
"@Override\r\n\tpublic boolean canMove() {\r\n\t\treturn false;\r\n\t}",
"public boolean canMove(int dir) {\n return true;\n }",
"public boolean isProvidesMovement() {\n\t\treturn providesMovement;\n\t}",
"public boolean justMoved() {\n\n\t\tdouble[] scores = compareFrames(length-1, length-2);\n\n\t\tSystem.out.println(scores[0]);\n\n\t\treturn scores[0] > MOVEMENT_THRESHOLD; // || scores[1] > ROTATION_THRESHOLD;\n\t}",
"public boolean isMoveLeft() {\n return moveLeft;\n }",
"public boolean isAnimating() {\n return (mState != 0);\n }",
"public boolean isMoveable() {\n\t\treturn _moveable;\n\t}",
"public boolean canMove() {\n\n if (workers.size() == 0) return true;\n\n return workerCanMove(0) || workerCanMove(1);\n }",
"public Boolean getMovingState()\r\n\t{\r\n\t\tObject[] result = pParent.status.requestOne(TuxAPIConst.ST_NAME_FLIPPERS_MOTOR_ON);\r\n\t\tif (result[0] == null)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (result[0].equals(\"False\"))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"private boolean canMove() {\n\t\tif (System.currentTimeMillis() - lastTrunTime < 300) {// move time is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 300ms before\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// last move\n\t\t\treturn false;\n\t\t}\n\t\tboolean status = false;\n\t\tif(stage == 1){\n\t\t\tmap = GameView.map;\n\t\t}else if(stage == 2){\n\t\t\tmap = GameViewStage2.map;\n\t\t}else {\n\t\t\tmap = GameViewStage3.map;\n\t\t}\n\t\tif (direction == UP) {// when tank moves up\n\t\t\tif (centerPoint.getY() - speed >= 0) {\n\t\t\t\tif (map[(centerPoint.getY() - speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == DOWN) {\n\t\t\tif (centerPoint.getY() + tankBmp.getHeight() + speed < screenHeight) {\n\t\t\t\tif (map[(centerPoint.getY() + 2 * UNIT + speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == LEFT) {\n\n\t\t\tif (centerPoint.getX() - speed >= 0) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX() - speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == RIGHT) {\n\t\t\tif (centerPoint.getX() + tankBmp.getWidth() + speed < screenWidth) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX()\n\t\t\t\t\t\t+ 2 * UNIT + speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (status)\n\t\t\tlastTrunTime = System.currentTimeMillis();\n\t\treturn status;\n\t}",
"protected boolean isFinished() {\n \tif (moving) return Robot.armPiston.getMajor() != PistonPositions.Moving; /* && Robot.armPiston.getMinor() != PistonPositions.Moving; */\n \treturn true;\n }",
"public boolean checkAndMove() {\r\n\r\n\t\tif(position == 0)\r\n\t\t\tdirection = true;\r\n\r\n\t\tguardMove();\r\n\r\n\t\tif((position == (guardRoute.length - 1)) && direction) {\r\n\t\t\tposition = 0;\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(direction)\r\n\t\t\tposition++;\r\n\t\telse\r\n\t\t\tposition--;\r\n\r\n\t\treturn false;\r\n\t}",
"public boolean isNotMoved() {\n return notMoved;\n }",
"public boolean move() {\r\n\t\tif (direction == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tint newPosX = this.posX;\r\n\t\tint newPosY = this.posY;\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tnewPosY++;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tnewPosX--;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tnewPosY--;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tnewPosX++;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tboolean canMoveToNewPosition = tabletop.canMove(newPosX, newPosY);\r\n\t\tif (!canMoveToNewPosition) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.posX = newPosX;\r\n\t\tthis.posY = newPosY;\r\n\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic Boolean hasMoved() {\n\t\treturn moved;\n\t}",
"public boolean requestMove() {\r\n if (game != null) {\r\n player.getMove();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public boolean isMoveUp() {\n return moveUp;\n }",
"public boolean isFinished() {\n return !rightMotor.isMoving() && !leftMotor.isMoving();\n }",
"public boolean isAnimating() {\n\t\treturn animationTimer.isRunning();\n\t}",
"@Override\n public boolean currentPlayerHavePotentialMoves() {\n return !checkersBoard.getAllPotentialMoves(getCurrentPlayerIndex()).isEmpty();\n }",
"protected boolean isFinished() {\n logger.info(\"Ending left drive\");\n \treturn timer.get()>howLongWeWantToMove;\n }",
"boolean chkMove(DcMotor motor, int target, int delta)\n {\n int currentPos = motor.getCurrentPosition();\n return ((currentPos >= (target - delta)) && (currentPos <= (target + delta)));\n }",
"private boolean canMove() {\n return !(bestMove[0].getX() == bestMove[1].getX() && bestMove[0].getY() == bestMove[1].getY());\n }",
"public boolean canMove() {\n\t\tArrayList<Location> loc = getValid(getLocation());\n\t\tif (loc.isEmpty()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tpath.add(getLocation());\n\t\t\tif (loc.size() >= 2) {\n\t\t\t\tcrossLocation.push(path);\n\t\t\t\tpath = new ArrayList<Location>();\n\t\t\t\tnext = betterDir(loc);\n\t\t\t}\n\t\t\tnext = loc.get(0);\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isCurrentState() {\n return currentState;\n }",
"public boolean canMoveForward()\n {\n boolean ans = true;\n\n Iterator<WallMulti> walls = this.walls.iterator();\n\n while(walls.hasNext ())\n {\n WallMulti wall = walls.next();\n\n if(wall.getType ().equals (\"H\"))\n {\n if(locX>=wall.getX()-15 && locX<=wall.getX()+wall.getLength()+15)\n {\n if(wall.getY()-locY<=50 && wall.getY()-locY>=0 && degree>=0 && degree<=150)\n {\n ans=false;\n }\n if(locY-wall.getY()<=8 && locY-wall.getY()>=0 && degree>=180 && degree<=360)\n {\n ans=false;\n }\n }\n }\n\n if(wall.getType ().equals (\"V\"))\n {\n if(locY>=wall.getY()-15 &&locY<=wall.getY()+wall.getLength()+15)\n {\n if(wall.getX()-locX<=50 && wall.getX()-locX>=0 &&\n ((degree>=0 && degree<=90)||(degree>=270 && degree<=360)) )\n {\n ans=false;\n }\n if(locX-wall.getX()<=8 && locX-wall.getX()>=0 &&\n degree>=90 && degree<=270 )\n {\n ans=false;\n }\n }\n }\n }\n return ans;\n }",
"private boolean isThereValidMove() {\n\t\treturn true;\n\t}",
"@objid (\"7f09cb7d-1dec-11e2-8cad-001ec947c8cc\")\n public boolean allowsMove() {\n return true;\n }",
"public synchronized boolean isInPosition(){\r\n\t\tSystem.out.println(\"wheel: \" + flywheel.isFlywheelAtSpeed() + \r\n\t\t\t\t\" hood: \" + hood.isInPosition() + \r\n\t\t\t\t\" turret: \" + turret.isInPosition() + \r\n\t\t\t\t\" kicker: \" + kicker.isInPosition());\r\n\t\treturn flywheel.isFlywheelAtSpeed() && \r\n\t\t\t\thood.isInPosition() && \r\n\t\t\t\tturret.isInPosition() && \r\n\t\t\t\tkicker.isInPosition();\r\n\t}",
"private boolean isMovement(Command cmd) {\n return Arrays.asList(MOVE_UP, MOVE_DOWN, MOVE_LEFT, MOVE_RIGHT).contains(cmd);\n }",
"public boolean moveStep() {\n\t\t// TODO: take orientation into account\n\t\t\n\t\t// Work out the distance to the destination\n\t\tDouble2D delta = destination.subtract(getPosition());\n//\t\tSystem.out.println(this.toString() + \"has \" + delta.length() + \" to go.\"); // Debug\n\t \n\t // If this is below a small value, we have arrived, return true\n\t if (delta.length() < 4) return true;\n\t \n\t // FIXME: a better model allow different speed for different vehicle class\n\t // update the speed of vehicle\n\t velocity.setTo(delta.x * 0.004, delta.y * 0.004);;\n\t \n\t // FIXME: avoidance?\n\t \n\t // FIXME: orientation?\n//\t\torientation += angularRate;\n\t // update the vehicle location\n\t\tDouble2D location = _siteState.getArea().getObjectLocation(this);\n\t\t_siteState.getArea().setObjectLocation(this, location.add(new Double2D(velocity)));\n\t \n\t\treturn false;\n\t}",
"@Override\n public boolean isControllerVisible() {\n checkAvailable();\n return impl.isControllerVisible();\n }",
"public boolean isPlaying() {\n return isPlaying(mController);\n }",
"public final boolean canMove(Direction direction) {\n return canMoveRelative(direction.getRelativeCoordinates());\n }",
"public abstract boolean canMove();",
"public boolean isMoveDown() {\n return moveDown;\n }",
"public boolean isForward()\n {\n return (state == AnimationState.FORWARD);\n }",
"protected boolean isFinished() {\n\t\treturn Robot.elevator.isInPosition(newPosition, direction);\n\t}",
"private boolean doMovement(double dt) {\n // set the dt\n this.differenceTime = dt;\n\n if (this.keyboard.isPressed(KeyboardSensor.LEFT_KEY)) {\n moveLeft();\n }\n\n if (this.keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) {\n moveRight();\n }\n\n return !this.velocity.isZero();\n }",
"public boolean isSolvable() {\n return finalMove != null;\n }",
"public boolean isSuccessiveMove() {\n return successiveMove;\n }",
"private boolean movingRight() {\n return this.velocity.sameDirection(Vector2D.X_UNIT);\n }",
"private void checkMovement()\n {\n if (frames % 600 == 0)\n {\n \n ifAllowedToMove = true;\n \n \n }\n \n }",
"public boolean onGround() {\n return getLocation().getY() <= 0 || (interactingWithY != null && interactingWithY.getLocation().getY() + interactingWithY.size.height <= getLocation().getY());\n }",
"public boolean canMove() {\n ArrayList<Location> valid = canMoveInit();\n if (valid == null || valid.isEmpty()) {\n return false;\n }\n ArrayList<Location> lastCross = crossLocation.peek();\n for (Location loc : valid) {\n Actor actor = (Actor) getGrid().get(loc);\n if (actor instanceof Rock && actor.getColor().equals(Color.RED)) {\n next = loc;\n isEnd = true;\n return false;\n }\n if (!lastCross.contains(loc)) {\n lastCross.add(loc);\n next = loc;\n ArrayList<Location> nextCross = new ArrayList<>();\n nextCross.add(next);\n nextCross.add(last);\n crossLocation.push(nextCross);\n return probabilityAdd();\n }\n }\n next = lastCross.get(1);\n crossLocation.pop();\n return probabilitySub();\n }",
"public boolean isOnGround() {\n return this.sim_pos.getY() <= 2;\n }",
"private boolean validMove(int dir) {\n return !(dir == UPKEY && direction == DOWNKEY || dir == DOWNKEY && direction == UPKEY || dir == LEFTKEY && direction == RIGHTKEY || dir == RIGHTKEY && direction == LEFTKEY);\n }",
"boolean isMoveFinished(int tick);",
"@Override\r\n\t\tpublic boolean isCurrent()\r\n\t\t{\n\t\t\treturn true;\r\n\t\t}",
"private void updatePlayerMovingStatus(){\n // get player's moving status\n if(keyPressed.contains(KeyCode.LEFT)){\n player.setFacing(Direction.LEFT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.RIGHT)){\n player.setFacing(Direction.RIGHT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.UP)){\n player.setFacing(Direction.UP);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.DOWN)){\n player.setFacing(Direction.DOWN);\n player.setIsMoving(true);\n } else {\n player.setIsMoving(false);\n }\n }",
"protected boolean isFinished() {\n\t\treturn RobotMap.VisionDistanceLeftPIDController.onTarget() && RobotMap.VisionDistanceRightPIDController.onTarget() || !hasStarted;\n\t}",
"protected boolean isFinished() {\n\tif(this.motionMagicEndPoint >0) {\n \tif(Math.abs(RobotMap.motorLeftTwo.get() )< 0.09 && Math.abs(RobotMap.motorRightTwo.get() )> -0.09&& Timer.getFPGATimestamp()-starttime > 10) {\n \t\treturn true;\n \t}\n\t}\n\t\n return false;\n }",
"public boolean isStopped(){\n return (currentSpeed == 0);\n }",
"protected boolean isFinished() {\n \tif(Math.abs(Robot.driveTrain.getHeading() - targetDirection) < 2) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"@Override\r\n public boolean canMove() {\r\n Grid<Actor> gr = getGrid();\r\n int dirs[] = {\r\n Location.AHEAD, Location.HALF_CIRCLE, Location.LEFT,\r\n Location.RIGHT };\r\n // 当终点在周围时,不能移动且isEnd应当为true\r\n for (int i = 0; i < dirs.length; i++) {\r\n Location tarLoc = getLocation().getAdjacentLocation(dirs[i]);\r\n if (gr.isValid(tarLoc) && gr.get(tarLoc) != null) {\r\n // Color直接用==计算竟然不可行(真是哔了dog...\r\n if (gr.get(tarLoc) instanceof Rock\r\n && gr.get(tarLoc).getColor().equals(Color.RED)) {\r\n isEnd = true;\r\n return false;\r\n }\r\n }\r\n }\r\n ArrayList<Location> nextLocs = getValid(getLocation());\r\n // 当附近没有可以移动的位置时,不能移动\r\n if (nextLocs.size() == 0) {\r\n return false;\r\n }\r\n // 当可以移动的位置>1时,说明存在一个节点,这个节点应当被新建一个arraylist入栈\r\n if (nextLocs.size() > 1) {\r\n ArrayList<Location> newStackElem = new ArrayList<Location>();\r\n newStackElem.add(getLocation());\r\n crossLocation.push(newStackElem);\r\n }\r\n // 有可以移动的位置时,向概率最高的方向移动\r\n int maxProbLoc = 0;\r\n // 由于nextLocs不一定有4个location,所以只好循环判断取最大值\r\n for (int i = 0; i < nextLocs.size(); i++) {\r\n Location loc = nextLocs.get(i);\r\n int dirNum = getLocation().getDirectionToward(loc) / 90;\r\n if (probablyDir[dirNum] > probablyDir[maxProbLoc]) {\r\n maxProbLoc = i;\r\n }\r\n }\r\n next = nextLocs.get(maxProbLoc);\r\n return true;\r\n }",
"public boolean messagesMoving() {\n\t\t\n\t\t//Loop each message\n\t\tfor (Message m : messages) {\n\t\t\t\n\t\t\t//If the message is not at the destination\n\t\t\tif (m.getNode() != m.getDestination())\n\t\t\t\t\n\t\t\t\t//Messages are still moving, return true\n\t\t\t\treturn true;\n\t\t}\n\t\t\n\t\t//All messages are at the destination\n\t\treturn false;\n\t\t\n\t}",
"private boolean checkTransitionToClimbing() {\n if (mOperatorInterface.climbStart() && Config.getInstance().getBoolean(Key.CLIMBER__ENABLED)) {\n mRobotLogger.log(\"Changing to climbing\");\n\n /** Disables intake if transitioning from intake */\n switch (mState) {\n case INTAKE:\n mIntake.stop();\n mStorage.stop();\n mIntakeState = IntakeState.IDLE;\n break;\n default:\n break;\n }\n\n /** Sets the climbing state to idle if it's not already */\n mState = State.CLIMBING;\n\n mDrive.setClimbingSpeed(true);\n\n if (mClimbingState == ClimbingState.IDLE) {\n mClimbingState = ClimbingState.WAIT;\n }\n return true;\n } else {\n return false;\n }\n }",
"public boolean isMoveLegal() {\n if (!getGame().getBoard().contains(getFinalCoords())) {\n return false;\n }\n\n // for aero units move must use up all their velocity\n if (getEntity() instanceof Aero) {\n Aero a = (Aero) getEntity();\n if (getLastStep() == null) {\n if ((a.getCurrentVelocity() > 0) && !getGame().useVectorMove()) {\n return false;\n }\n } else {\n if ((getLastStep().getVelocityLeft() > 0) && !getGame().useVectorMove()\n && !(getLastStep().getType() == MovePath.MoveStepType.FLEE\n || getLastStep().getType() == MovePath.MoveStepType.EJECT)) {\n return false;\n }\n }\n }\n\n if (getLastStep() == null) {\n return true;\n }\n\n if (getLastStep().getType() == MoveStepType.CHARGE) {\n return getSecondLastStep().isLegal();\n }\n if (getLastStep().getType() == MoveStepType.RAM) {\n return getSecondLastStep().isLegal();\n }\n return getLastStep().isLegal();\n }",
"boolean canMoveTo(Vector2d position);",
"public boolean takeControl() {\n\t\tif (Squirrel.us.getDistance() <= 30 && Squirrel.notDetected)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"private void updateJustTurnedLeft(MyAIController controller, Coordinate pos, WorldSpatial.Direction orientation) {\n\t\t// Check car has moved positions\n\t\tif (controller.getPosition() != previousPosition) {\n\t\t\tif (checkFollowingWall(pos, orientation)) {\n\t\t\t\tstate = ExplorerState.WALL_FOLLOWING;\n\t\t\t}\n\t\t}\n\t}",
"public boolean isLegalMove() {\n return iterator().hasNext();\n }",
"protected boolean isFinished() {\n\t\tboolean beyondTarget = Robot.wrist.getCurrentPosition() > safePosition;\n\t\treturn isSafe || beyondTarget;\n\t}",
"public boolean status() {\n return DecoratedController != null;\n }",
"public void moving()\n {\n if(onPlatform()&&endPlatform()){\n direction();\n }\n if(onPlatform()&&!endPlatform()){\n changeDirection();\n direction();\n }\n collideMoveLocation(horzVelocity,1);\n //sharaz\n if(isTouching(PushObject.class)){\n changeDirection();\n direction();\n }\n \n \n }",
"public boolean moveOn() {\n\t\t\n\t}",
"public synchronized boolean isMotorStarted() {\n return isMotorStarted;\n }",
"public boolean isMove(int dir){\n\t if(0> dir && dir > 3){\n\t\tSystem.out.println(\"direction is failed\");\t \n\t\treturn false;\n\t }\n\t if(dir == 0 ){\n\t\tif(0<= (this.y-1) && (this.y-1)<=5)\n\t\t return true;\n\t }else if(dir == 1){\n\t\tif(0<= (this.y+1) && (this.y+1)<=5)\n\t\t return true;\n\t }else if(dir == 2){\n\t\tif(0<= (this.x+1) && (this.x+1)<=5)\n\t\t return true;\n\t }else if(dir == 3){\n\t\tif(0<= (this.x-1) && (this.x-1)<=5)\n\t\t return true;\n\t }\n\t return false;\n\t}",
"private boolean canMove(String direction) {\n\t\tif (currentPiece.getLocation() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (Loc loc : currentPiece.getLocation()) {\n\t\t\tLoc nextPoint = nextPoint(loc, direction);\n\t\t\tif (nextPoint == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// if there's someone else's piece blocking you\n\t\t\tif ((new Loc(nextPoint.row, nextPoint.col).isOnBoard())\n\t\t\t\t\t&& boardTiles[nextPoint.row][nextPoint.col] != backgroundColor && !isMyPiece(nextPoint)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"@Override\n public boolean canMove() {\n return storage.isRampClosed();\n }"
] | [
"0.79315466",
"0.7867975",
"0.7668762",
"0.76511407",
"0.7638439",
"0.76132464",
"0.7595488",
"0.71758044",
"0.70856535",
"0.69435483",
"0.6883029",
"0.682089",
"0.6738206",
"0.67149615",
"0.663417",
"0.6631971",
"0.66233015",
"0.6550735",
"0.65495545",
"0.6501427",
"0.64579624",
"0.64264566",
"0.6393703",
"0.6390794",
"0.6381839",
"0.6377438",
"0.6362743",
"0.63502675",
"0.63352746",
"0.63167167",
"0.6272416",
"0.6269647",
"0.6267542",
"0.62547374",
"0.62448114",
"0.62439185",
"0.6203107",
"0.61917204",
"0.61785316",
"0.61768717",
"0.6171789",
"0.6165314",
"0.61431646",
"0.61198246",
"0.61088836",
"0.60920507",
"0.60574174",
"0.60468054",
"0.60167515",
"0.6009489",
"0.6005284",
"0.60020375",
"0.5991163",
"0.5987501",
"0.59787107",
"0.5968628",
"0.59657884",
"0.59651214",
"0.5953132",
"0.5945404",
"0.593043",
"0.5926733",
"0.59169865",
"0.5906437",
"0.5905586",
"0.5904671",
"0.58969134",
"0.5881373",
"0.58798504",
"0.587891",
"0.5864014",
"0.5859754",
"0.58531475",
"0.5830358",
"0.5811732",
"0.5801969",
"0.5792703",
"0.5783462",
"0.5772362",
"0.57668704",
"0.5766562",
"0.5754264",
"0.5751416",
"0.5743148",
"0.5742571",
"0.57363826",
"0.5727466",
"0.57232785",
"0.5723213",
"0.5721907",
"0.57072634",
"0.5704602",
"0.5700992",
"0.57004166",
"0.5690473",
"0.56882155",
"0.5687588",
"0.5687263",
"0.56835365",
"0.5677271"
] | 0.7387545 | 7 |
Returns the location from where the character has started moving. | @Override
public Location getOrigin() {
return getOwner().getLocation();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Point getCharacterPosition() {\n\t\treturn this.characterPosition;\n\t}",
"org.mojolang.mojo.lang.Position getStartPosition();",
"public ImPoint getCurrentLoc() {\n \treturn this.startLoc;\n }",
"public Location getStartingLocation() {\r\n return startingLocation;\r\n }",
"public Point getStartPosition()\r\n\t{\r\n\t\treturn startPosition;\r\n\t}",
"public Location getStartLocation() {\r\n \treturn new Location(0,0);\r\n }",
"int getStartPosition();",
"int getStartPosition();",
"public int getStartingPos ()\r\n {\r\n if ((getThickness() >= 2) && !getLine()\r\n .isVertical()) {\r\n return getLine()\r\n .yAt(getStart());\r\n } else {\r\n return getFirstPos() + (getThickness() / 2);\r\n }\r\n }",
"public int getMovementOffset() {\n\t\treturn movementOffset;\n\t}",
"public int getStartPosition() {\n return startPosition_;\n }",
"public Position getStartPosition()\r\n\t{\r\n\t\treturn startPosition;\r\n\t}",
"public Coordinate getStart( )\n\t{\n\t\treturn startLocation;\n\t}",
"public Position getStartPosition() throws IllegalStateException{\r\n for (int i = 0; i < mazeData.length; i++) {\r\n for (int j = 0; j < mazeData[i].length; j++) {\r\n if (mazeData[i][j] == START)\r\n return new Position(i, j);\r\n }\r\n }\r\n throw new IllegalStateException(\"Could not find a start-point\");\r\n }",
"public PointF getPosition()\n {\n return getMazeSprite().getPosition();\n }",
"public int getStartPosition() {\n return startPosition_;\n }",
"public WotlasLocation getLocation() {\n return this.getBasicChar().getLocation();\n }",
"public Coordinate getPosition();",
"@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}",
"public Coordinate getMoveTo();",
"public Position getStartPosition() {\n return start;\n }",
"public abstract int getStartPosition();",
"public Position getStartPosition() {\n return startPosition;\n }",
"public int getStartPos() {\n return startPos;\n }",
"public XYPoint getSnakeHeadStartLocation();",
"public StarSystem getCurrentLocation() {\n\t\treturn player.getLocation();\n\t}",
"public Point getPlayerStart() {\r\n\t\treturn this.playerStart;\r\n\t}",
"public Vector3f getStartPosition()\n {\n return startPosition;\n }",
"public Point getLocation() {\n return currentLocation;\n }",
"@Override\n public double getLocationX() {\n return myMovable.getLocationX();\n }",
"@Override\n public double getPosition()\n {\n final String funcName = \"getPosition\";\n double pos = getMotorPosition() - zeroPosition;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", pos);\n }\n\n return pos;\n }",
"@Override\n public long getPosition() {\n return startPosition + super.getPosition();\n }",
"public Vector2D getStartPos(){\n\t\treturn startPos;\n\t}",
"public Position getStart() {\r\n return start;\r\n }",
"Tile getPosition();",
"private int currentPosition() {\n return robot.leftBack.getCurrentPosition();\n }",
"public final BlockPos getPos() {\n\t\treturn baseTile.getPos();\n\t}",
"public Point getLocation() {\n return pos;\n }",
"public int getStart ()\r\n {\r\n return glyph.getBounds().x;\r\n }",
"public DVector getPosition()\n\t{\n\t\treturn this.screenPos;\n\t}",
"void positionToStart () {\n currentRow = 0 - currentPiece.getOffset();\n currentColumn = board.columns / 2 - currentPiece.width / 2;\n }",
"public int getCurrentLocation() {\n\t\treturn currentLocation;\n\t}",
"@Override\n public PosDeg getPosition() {\n return tracker.getPosition();\n }",
"public PixelPoint getStartPoint ()\r\n {\r\n Point start = glyph.getLag()\r\n .switchRef(\r\n new Point(getStart(), line.yAt(getStart())),\r\n null);\r\n\r\n return new PixelPoint(start.x, start.y);\r\n }",
"Position getPosition();",
"Position getPosition();",
"public double getDistanceToStart() {\r\n return startDistance;\r\n }",
"Object getPosition();",
"Location getPlayerLocation();",
"public int getCurrentSpinePos() {\n return currentSpinePos;\n }",
"public Location getOffset() {\n\t\treturn gfPos;\n\t}",
"@Override\n public int[] getStartPosition() {\n if(maze != null){\n int[] position = new int[2];\n position[0] = maze.getStartPosition().getRowIndex();\n position[1] = maze.getStartPosition().getColumnIndex();\n return position;\n }\n return null;\n }",
"Point getPosition();",
"Point getPosition();",
"public Location getOffset() {\n\t\treturn pos;\n\t}",
"IntPoint getLocation();",
"public double getPosition()\n {\n return position * FPS;\n }",
"public int getCurrentPos() {\n return currentPos;\n }",
"public Coordinate getPosition() {\n return cPosition;\n }",
"public Point getStartPoint() {\n // First, this is Settler's location\n UnitList units = unitService.findByClassUuid(Settlers.CLASS_UUID);\n if (units != null && !units.isEmpty()) {\n return units.getAny().getLocation();\n }\n\n // If Settlers were destroyed then it is the first city's location\n City city = cityService.getAny();\n if (city != null) {\n return city.getLocation();\n }\n\n // If there is no cities, then the first Unit's location\n AbstractUnit unit = unitService.getAny();\n if (unit != null) {\n return unit.getLocation();\n }\n\n // If there is no units then (0, 0)\n return new Point(0, 0);\n }",
"public int getCurrentMoveIndex() {\n return boardIterator.getPos();\n }",
"public void startPosition();",
"public int getStartOffset() {\n return startPosition.getOffset();\n }",
"public Vector2f getLocation() {\r\n\t\treturn location.getLocation();\r\n\t}",
"public int startOffset();",
"int getPosition();",
"private SourcePosition getTreeStartLocation() {\n return peekToken().location.start;\n }",
"public Point getLocation ( )\r\n\t{\r\n\t\treturn new Point ( currentCol, currentRow );\r\n\t}",
"public Point getPosition();",
"public Location getCurrentLocation() { return entity.getLocation(); }",
"public Point getLocation();",
"public Coordinate getLocation();",
"public abstract Vec2 startPosition();",
"@Override\n\tpublic Position getPosition() {\n\t\treturn player.getPosition();\n\t}",
"public float getInitialBattlePosition()\n {\n return initialBattlePosition;\n }",
"@Override\n\tpublic Direction getMove() {\n if (ticks < MAX_TICKS_PER_ROUND - 100) {\n Direction[] dirs = Direction.values();\n return dirs[random.nextInt(dirs.length)];\n } else {\n // Move towards boat\n int deltaX = 0;\n int deltaY = 0;\n if (currentLocation.getX() < 0)\n deltaX = 1;\n else if (currentLocation.getX() > 0)\n deltaX = -1;\n\n if (currentLocation.getY() < 0)\n deltaY = 1;\n else if (currentLocation.getY() > 0)\n deltaY = -1;\n\n if (deltaX > 0 && deltaY == 0) {\n return Direction.E;\n } else if (deltaX > 0 && deltaY > 0) {\n return Direction.NE;\n } else if (deltaX > 0 && deltaY < 0) {\n return Direction.SE;\n } else if (deltaX == 0 && deltaY == 0) {\n return Direction.STAYPUT;\n } else if (deltaX == 0 && deltaY < 0) {\n return Direction.N;\n } else if (deltaX == 0 && deltaY > 0) {\n return Direction.S;\n } else if (deltaX < 0 && deltaY == 0) {\n return Direction.W;\n } else if (deltaX < 0 && deltaY > 0) {\n return Direction.NW;\n } else if (deltaX < 0 && deltaY < 0) {\n return Direction.NE;\n } else {\n throw new RuntimeException(\"I HAVE NO IDEA\");\n }\n }\n\t}",
"public Point getLocalPosition() {\n return getLocalLowerLeft();\n }",
"public Point getMinimapLocation() {\n Actor c = getAccessor();\n int cX = methods.client.getBaseX() + (c.getLocalLocation().getX() / 32 - 2) / 4;\n int cY = methods.client.getBaseY() + (c.getLocalLocation().getY() / 32 - 2) / 4;\n return methods.calc.worldToMinimap(cX, cY);\n }",
"String getLawnPosition();",
"public PVector getLocation()\n\t{\n\t\treturn location;\n\t}",
"MapLocation getPosition(Unit unit);",
"@Override\r\n \tpublic final int getOffset() {\r\n \t\tAssert.isTrue(hasSourceRangeInfo());\r\n \t\treturn getStartPos();\r\n \t}",
"public Vector2F getScreenLocation() {\n\t\treturn new Vector2F(xPos, yPos);\n\t}",
"public Point getLocation() { return loc; }",
"public Point getRobotLocation();",
"public Point start() {\r\n return this.start;\r\n }",
"@Override\n\tpublic Position getPosition() \n\t{\n\t\treturn currentPosition;\n\t}",
"public String getInitialPosition() {\n\t\treturn initPos;\n\t}",
"MazePoint getExpectedMovementPosition(MazePoint point, Direction dir);",
"BlockPos getPosTarget() {\n BlockPosDim loc = LocationGpsCard.getPosition(inventory.getStackInSlot(0));\n if (loc != null && loc.getPos() != null) {\n return loc.getPos();\n }\n return this.getBlockPos();\n }",
"@Override\r\n \tpublic final int getStartPos() {\r\n \t\treturn sourceStart;\r\n \t}",
"public Point getLocation() {\r\n\t\treturn this.center;\r\n\t}",
"public Point getThisPosition() {\n \n return location_;\n \n }",
"public int getCurrentPosition() {\n\t\treturn currentPosition;\n\t}",
"public String getStartPoint()\n\t{\n\t\tString getStart;\n\t\tgetStart = (this.startPoint.xPosition + \",\" + this.startPoint.yPosition);\n\t\treturn getStart;\n\t}",
"public int getPosition();",
"public int getLocation() {\n\t\treturn 0;\n\t}",
"public float getDistanceToStart() {\n\t\treturn distanceToStart;\n\t}",
"String getPosX();",
"public Position getRobotPadPosition();",
"public int getPosition() {\n log.log(Level.FINE, \"position: \" + position + \"ms\");\n return position;\n }"
] | [
"0.69069374",
"0.6892559",
"0.680781",
"0.6780766",
"0.6735798",
"0.6695824",
"0.66135955",
"0.66135955",
"0.6601196",
"0.65500176",
"0.65474975",
"0.65394145",
"0.6536451",
"0.65173584",
"0.64987683",
"0.6477596",
"0.64448714",
"0.6437707",
"0.6435641",
"0.6428883",
"0.64142716",
"0.64025986",
"0.63831306",
"0.6379857",
"0.63620514",
"0.6355575",
"0.6325779",
"0.62857115",
"0.62831193",
"0.62781256",
"0.627707",
"0.62768745",
"0.6276004",
"0.6262724",
"0.62245107",
"0.62220454",
"0.62123966",
"0.62098205",
"0.6208683",
"0.6202302",
"0.61942136",
"0.61899066",
"0.61857176",
"0.6174116",
"0.61623913",
"0.61623913",
"0.615304",
"0.61485434",
"0.61475456",
"0.6147266",
"0.61388236",
"0.6133522",
"0.61295074",
"0.61295074",
"0.61285025",
"0.61210716",
"0.6120417",
"0.61203384",
"0.6112045",
"0.61085224",
"0.6092072",
"0.6089995",
"0.6079584",
"0.60794455",
"0.60773283",
"0.6071964",
"0.6071585",
"0.60689294",
"0.6060249",
"0.6059823",
"0.60579634",
"0.6055588",
"0.6049922",
"0.6044465",
"0.60385567",
"0.6036046",
"0.6033485",
"0.6032122",
"0.6030507",
"0.60214776",
"0.60182923",
"0.6014922",
"0.6011913",
"0.600368",
"0.6002422",
"0.5997938",
"0.5986487",
"0.59822273",
"0.5976504",
"0.59716994",
"0.59692013",
"0.59676874",
"0.5967011",
"0.596579",
"0.5965634",
"0.59637684",
"0.59599483",
"0.5945603",
"0.594541",
"0.59438634",
"0.59380716"
] | 0.0 | -1 |
Returns the destination to where the character is currently moving. | @Override
public Location getDestination() {
return _destinationLocation != null ? _destinationLocation : getOrigin();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public double getDestinationY() {\n return myMovable.getDestinationY();\n }",
"public Coordinate getDestination() {\n return cDestination;\n }",
"@Override\n public Point3D getDestination() {\n return myMovable.getDestination();\n }",
"@Override\n\tpublic Direction getMove() {\n if (ticks < MAX_TICKS_PER_ROUND - 100) {\n Direction[] dirs = Direction.values();\n return dirs[random.nextInt(dirs.length)];\n } else {\n // Move towards boat\n int deltaX = 0;\n int deltaY = 0;\n if (currentLocation.getX() < 0)\n deltaX = 1;\n else if (currentLocation.getX() > 0)\n deltaX = -1;\n\n if (currentLocation.getY() < 0)\n deltaY = 1;\n else if (currentLocation.getY() > 0)\n deltaY = -1;\n\n if (deltaX > 0 && deltaY == 0) {\n return Direction.E;\n } else if (deltaX > 0 && deltaY > 0) {\n return Direction.NE;\n } else if (deltaX > 0 && deltaY < 0) {\n return Direction.SE;\n } else if (deltaX == 0 && deltaY == 0) {\n return Direction.STAYPUT;\n } else if (deltaX == 0 && deltaY < 0) {\n return Direction.N;\n } else if (deltaX == 0 && deltaY > 0) {\n return Direction.S;\n } else if (deltaX < 0 && deltaY == 0) {\n return Direction.W;\n } else if (deltaX < 0 && deltaY > 0) {\n return Direction.NW;\n } else if (deltaX < 0 && deltaY < 0) {\n return Direction.NE;\n } else {\n throw new RuntimeException(\"I HAVE NO IDEA\");\n }\n }\n\t}",
"public Direction getMove(){\n\t\tif (diam < 3){\n\t\t\tdiam++;\n\t\t\tjustnow = \"east\";\n\t\t\treturn Direction.EAST;\n\t\t}\n\t\telse if (diam < 6){\n\t\t\tdiam++;\n\t\t\tjustnow = \"south\";\n\t\t\treturn Direction.SOUTH;\n\t\t}\n\t\telse if (diam < 9){\n\t\t\tdiam++;\n\t\t\tjustnow = \"west\";\n\t\t\treturn Direction.WEST;\n\t\t}\n\t\telse if (diam < 12){\n\t\t\tdiam++;\n\t\t\tjustnow = \"north\";\n\t\t\treturn Direction.NORTH;\n\t\t}\n\t\telse {\n\t\t\tdiam = 0;\n\t\t\tdiam++;\n\t\t\tjustnow = \"east\";\n\t\t\treturn Direction.EAST;\n\t\t}\t\n\t}",
"private Point getMoveDestination(Building b)\n\t{\n\t\tObjectType buildType = b.getObjectType();\n\t\tPoint workPoint = b.getPosition();\n\t\tfor (int i = workPoint.getX(); i < workPoint.getX()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType) - 1; i++)\n\t\t{\n\t\t\tPoint p1 = new Point(i, workPoint.getY() - 1);\n\t\t\tif (p1.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p1.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p1.getY()])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(i, workPoint.getY()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType));\n\t\t\tif ((p2.getY() < getMyPlayer().getMyMap().getMapBlocks()[0].length)\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[i][p2.getY()]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[i][p2.getY()])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\tfor (int j = workPoint.getY(); j < workPoint.getY()\n\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(buildType); j++)\n\t\t{\n\t\t\tPoint p1 = new Point(workPoint.getX() - 1, j);\n\t\t\tif (p1.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p1.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p1.getX()][j])))\n\t\t\t\treturn p1;\n\t\t\tPoint p2 = new Point(workPoint.getX()\n\t\t\t\t\t+ getMyPlayer().getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t\t.get(buildType), j);\n\t\t\tif (p2.getX() < getMyPlayer().getMyMap().getMapBlocks().length\n\t\t\t\t\t&& (getMyPlayer().getMyMap().getMapBlocks()[p2.getX()][j]\n\t\t\t\t\t\t\t.isWalkableByWorker() || (!getMyPlayer()\n\t\t\t\t\t\t\t.getMapVisiblity()[p2.getX()][j])))\n\t\t\t\treturn p2;\n\n\t\t}\n\t\treturn null;\n\t}",
"public double getDirectionMove();",
"@Override\n public double getDestinationX() {\n return myMovable.getDestinationX();\n }",
"public String getDirectionMove() {\n\t\treturn directionMove;\n\t}",
"char getLastMove() {\n int length = this.prevMoves.length();\n if (length > 0) {\n return prevMoves.charAt(length - 1);\n }\n return ' ';\n }",
"public Location getDestination()\r\n\t{ return this.destination; }",
"public Vector getDestination(GameMove gameMove) {\n\t\tif (gameMove == null) {\n\t\t\tthrow new NullPointerException(\"GameMove must not be null.\");\n\t\t}\n\t\tif (gameMove.getMovedToken() == null) {\n\t\t\tthrow new NullPointerException(\"Moved token can not be null.\");\n\t\t}\n\t\t// fetch starting position of token, the game board must hold the old state\n\t\tVector startPosition = this.getPositionOf(gameMove.getMovedToken());\n\t\tif (startPosition == null) {\n\t\t\tthrow new NullPointerException(\"Token was not found on board.\");\n\t\t}\n\t\t\n\t\tif (gameMove.getSelectedMove()== null || gameMove.getMovedToken().getPlayer() == null) {\n\t\t\tthrow new NullPointerException(\"Selected move is null or token has no player\");\n\t\t}\n\t\t\n\t\t// rotate the selected movePossibility of the card\n\t\tVector shift = gameMove.getSelectedMove().rotate(gameMove.getMovedToken().getPlayer());\n\t\t\n\t\treturn startPosition.addTo(shift);\n\t}",
"public String destination() {\n return this.destination;\n }",
"public Location getDestination() {\r\n return destination;\r\n }",
"public Location getDestination(){\n\t\treturn destination;\n\t}",
"public Sommet destination() {\n return destination;\n }",
"public String getMove() {\n\t\treturn move;\n\t}",
"public Coordinate getMoveTo();",
"public String getDestLocation() {\r\n return this.destPath.getText();\r\n }",
"@Override\n\tpublic Direction getMove() {\n\t\t//Equal probability for each of the 8 compass direction, as well as staying stationary\n\t\treturn choices[this.random.nextInt(9)];\n\t}",
"@Override\n public double getDestinationZ() {\n return myMovable.getDestinationZ();\n }",
"public int getDestination() {\r\n\t\treturn destination;\r\n\t}",
"public Square destination() {\n return destination;\n }",
"public int getMovementOffset() {\n\t\treturn movementOffset;\n\t}",
"public String getDestination() {\r\n\t\treturn this.destination;\r\n\t}",
"public int getCurrentDirection() {\r\n return currentDirection;\r\n }",
"public String getDestination(){\r\n\t\treturn route.getDestination();\r\n\t}",
"public Position destination(Position ep) throws InvalidPositionException;",
"public WorldPixel move() {\n this.lastMoveDirection = getDirection();\n\n WorldPixel head = getTrail().peekLast();\n int oldX = head.getX();\n int oldY = head.getY();\n\n int newX = oldX + getDirection().getXDelta();\n int newY = oldY + getDirection().getYDelta();\n if (newX < getSector().getWorldXStart() || newX >= getSector().getWorldXEnd()\n || newY < getSector().getWorldYStart() || newY >= getSector().getWorldYEnd())\n return null;\n\n WorldPixel newPos = getWorld().getPixel(newX, newY);\n getTrail().addLast(newPos);\n return newPos;\n }",
"public Point getEndPosition() {\n return this.movementComposer.getTargetPosition();\n }",
"public static int offset_dest() {\n return (0 / 8);\n }",
"protected int getMove(){\r\n\t\treturn this.move;\r\n\t}",
"protected int getMove() \t\t\t\t{\treturn move;\t\t}",
"public Town getDestination() {\r\n\t\treturn this.destination;\r\n\t}",
"public String getLastMove() {\n\t\treturn lastMove;\r\n\t}",
"public MoveDirection getDirection() {\n\t\treturn direction;\n\t}",
"String getDestination() {\n if (isSeparateFolder()) {\n return destination.getText();\n } else {\n return null;\n }\n }",
"public int getDestination() {\n\t\treturn finalDestination;\n\t}",
"public int getCurrentMoveIndex() {\n return boardIterator.getPos();\n }",
"int getDestination();",
"public String getDestination() {\r\n\t\treturn destination;\r\n\t}",
"public Direction getCurrentDirection() {\n synchronized (f_lock) {\n return f_currentDirection;\n }\n }",
"public String getDestination() {\n return this.destination;\n }",
"public float getTimeToMove()\n\t{\n\t\treturn this.timeToMove;\n\t}",
"public Direction getDirect() {\n \tif(xMoving && yMoving){\n \t\tif(right && down)\n \t\t\tdir = Direction.SOUTHEAST;\n \t\telse if(right && !down)\n \t\t\tdir = Direction.NORTHEAST;\n \t\telse if(!right && down)\n \t\t\tdir = Direction.SOUTHWEST;\n \t\telse\n \t\t\tdir = Direction.NORTHWEST;\n \t}\n \telse if(xMoving){\n \t\tdir = right ? Direction.EAST : Direction.WEST;\n \t}\n \telse if(yMoving){\n \t\tdir = down ? Direction.SOUTH : Direction.NORTH;\n \t}\n \treturn dir;\n }",
"public Location getDest() {\n return ticketsCalculator.getDest();\n }",
"public Integer getDestination() {\n\t\treturn new Integer(destination);\n\t}",
"public int getWhoseMove() {\n\t\treturn playerToMove;\n\t}",
"public String getDestination() {\r\n return this.destination;\r\n }",
"int getTargetPos();",
"public String getDestination() {\r\n return destination;\r\n }",
"public Direction getDirection() {\n return currentDirection;\n }",
"public String getDestination() {\n\t\treturn destination;\n\t}",
"public int getDest(){\r\n\t\treturn this.dest;\r\n\t}",
"public Point getCharacterPosition() {\n\t\treturn this.characterPosition;\n\t}",
"private int backwardPosition() {\n\t\tif(getPosition() > 0) {\n\t\t\treturn getPosition() - 1;\n\t\t} else {\n\t\t\treturn getMaxPosition();\n\t\t}\n\t}",
"private Direction moveToGoal() throws GameActionException {\n Direction toGoal = location.directionTo(goal);\n if (rc.canMove(toGoal)) {\n return toGoal;\n } else {\n return getHandOnWall();\n }\n }",
"public java.lang.String getDestination() {\n return destination;\n }",
"public java.lang.String getDestination()\n {\n return this._destination;\n }",
"@Override\r\n\tpublic String moveDown() {\n\t\tif((0<=x && x<=50) && (0<y && y<=10) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (40<y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (0<y && y<=50) && (0<=z && z<=10))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=10) && (0<y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\telse if((0<=x && x<=50) && (0<y && y<=50) && (40<=z && z<=50))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\telse if((40<=x && x<=50) && (0<y && y<=50) && (0<=z && z<=50))\r\n\t\t{\r\n\t\t\ty--;\r\n\t\t}\r\n\t\treturn getFormatedCoordinates();\r\n\t}",
"public String getDestination() {\n return destination;\n }",
"private int currentPosition() {\n return robot.leftBack.getCurrentPosition();\n }",
"public Move lastCommittedMove() {return lastCommittedMove; }",
"public Direction getMove() {\n\n // If 'count' is >= 3, then reset 'value' for next random direction.\n if (this.count >= 3) {\n this.value = this.generator.nextInt(4); // new value\n this.count = 0; // reset count to 0\n }\n \n ++this.count; // increment count for each call\n if (this.value == 0) {\n return Direction.NORTH;\n }\n else if (this.value == 1) {\n return Direction.SOUTH;\n }\n else if (this.value == 2) {\n return Direction.WEST;\n }\n else { // if value == 3\n return Direction.EAST;\n }\n }",
"public Move getLastMove() {\n return lastMove;\n }",
"public Vertex getDestination() {\n return destination;\n }",
"Destination getDestination();",
"public ElevatorStatus getCurrentDirection() {\n\t\treturn currentDirection;\n\t}",
"private Point getEnd() {\n if (goal == null) {\n if (target == null) {\n return null;\n }\n return target.getPosition();\n } else {\n return goal;\n }\n }",
"public Location getAdjacentLocation(char direction)\n\t{\n\t\tswitch (direction) {\n\t\t\tcase 'l': // location to left of current\n\t\t\t\treturn new Location(x - 1, y, Block.EMPTY);\n\t\t\tcase 'r': // location to the right of current\n\t\t\t\treturn new Location(x + 1, y, Block.EMPTY);\n\t\t\tcase 'u': // location above current\n\t\t\t\treturn new Location(x, y - 1, Block.EMPTY);\n\t\t\tcase 'd': // location below current, only option left\n\t\t\tdefault:\n\t\t\t\treturn new Location(x, y + 1, Block.EMPTY);\n\t\t}\n\t}",
"protected final Direction getDirection() {\n\t\treturn tile.getDirection();\n\t}",
"public Actor getDestination()\r\n\t{\r\n\t\treturn destinationActor;\t\r\n\t}",
"public V getDestination() {\r\n\r\n\t\tV result = null;\r\n\t\tif ((counter <= links.size()) && (counter > 0)) {\r\n\t\t\tresult = succNodes.get(counter - 1);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"Location getPlayerLocation();",
"@Override\n\tpublic String getDest() {\n\t\treturn dest;\n\t}",
"public static Image movePoint()\n\t{\n\t\treturn movePoint;\n\t}",
"public String getDst() {\r\n\t\treturn dst;\r\n\t}",
"public String getDestination()\n\t{\n\t\treturn notification.getString(Attribute.Request.DESTINATION);\n\t}",
"public char makeMove(Coordinate move);",
"public Location up() {\n return new Location(row - 1, column);\n }",
"public java.lang.String getDestination() {\n java.lang.Object ref = destination_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n destination_ = s;\n return s;\n }\n }",
"public int jump() {\n if (Ylocation > 475) {\n Ylocation -= Ydir;\n }\n\n return Ylocation;\n }",
"public LatLng getDestination () {\n return destination;\n }",
"public float getYDest()\n {\n return yDest;\n }",
"@Override\n public double getLocationY() {\n return myMovable.getLocationY();\n }",
"public java.lang.String getDestination() {\n java.lang.Object ref = destination_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n destination_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"protected void moveToDestination(){\n\t\tqueue.clear();\n\t\twhile (destination[0] < 0){\n\t\t\tqueue.add(\"MOVE S\");\n\t\t\tdestination[0] += 1;\n\t\t}\n\t\twhile (destination[0] > 0){\n\t\t\tqueue.add(\"MOVE N\");\n\t\t\tdestination[0] -= 1;\n\t\t}\n\t\twhile (destination[1] < 0){\n\t\t\tqueue.add(\"MOVE E\");\n\t\t\tdestination[1] += 1;\n\t\t}\n\t\twhile (destination[1] > 0){\n\t\t\tqueue.add(\"MOVE W\");\n\t\t\tdestination[1] -= 1;\n\t\t}\n\t\tdestination = null;\n\t}",
"public double getLastMoved();",
"public void getMove(){\n\t\t\n\t}",
"public Player getPlayerToMove()\n {\n return playerToMove;\n }",
"public Direction moveClyde(Ghost g);",
"public Optional<Boolean> isDestinationPositionAfter();",
"public int getDst() {\n\t\treturn dst;\n\t}",
"public int getNextDest() {\n\t\treturn nextDestination;\n\t}",
"@Override\n public Point3D getLocation() {\n return myMovable.getLocation();\n }",
"public Movement getDir() {\n\t\treturn dir;\n\t}",
"public Node getDestination() {\n return this.destination;\n }",
"public Location to_the(Direction d) {\n return destinations.get(d);\n }",
"public void moveDown() {\n locY = locY - 1;\n }",
"boolean moveCharacter(Player player, Location.Direction direction) {\n Location currentLocation = player.getLocation();\r\n //check to see if move is possible\r\n Location destination = currentLocation.compass(direction);\r\n if (destination != null)\r\n {\r\n currentLocation.exit(player);\r\n destination.enter(player);\r\n return true;\r\n }\r\n else{\r\n return false;\r\n } \r\n }"
] | [
"0.66449594",
"0.6592417",
"0.64727926",
"0.643999",
"0.6437682",
"0.6338454",
"0.6337497",
"0.6332478",
"0.6262462",
"0.62379265",
"0.6229875",
"0.62092817",
"0.61704445",
"0.61626554",
"0.61461294",
"0.61456245",
"0.6127986",
"0.6106735",
"0.60792625",
"0.6065521",
"0.6045879",
"0.60128367",
"0.60017323",
"0.5995265",
"0.5985581",
"0.5971444",
"0.5959262",
"0.5954558",
"0.59371257",
"0.59295344",
"0.592254",
"0.5897014",
"0.58860224",
"0.58777034",
"0.58761775",
"0.5872004",
"0.58694786",
"0.5869125",
"0.5855666",
"0.5854213",
"0.5853839",
"0.58461165",
"0.58398426",
"0.58372694",
"0.58339024",
"0.58317506",
"0.5829461",
"0.5829399",
"0.58217096",
"0.58043075",
"0.5801697",
"0.5798427",
"0.5794759",
"0.577909",
"0.5762788",
"0.57581913",
"0.5757928",
"0.5750146",
"0.5748596",
"0.5747649",
"0.5746552",
"0.5730375",
"0.5716429",
"0.57154113",
"0.57053757",
"0.5686976",
"0.56800807",
"0.56797385",
"0.56785285",
"0.5677084",
"0.5657651",
"0.56474817",
"0.5646567",
"0.5632057",
"0.56227845",
"0.5611375",
"0.560449",
"0.55982184",
"0.5595412",
"0.558394",
"0.55810857",
"0.5579865",
"0.5573699",
"0.5570243",
"0.5569988",
"0.5569672",
"0.5563569",
"0.555845",
"0.55457056",
"0.5544063",
"0.5522034",
"0.5519809",
"0.550951",
"0.5509242",
"0.55089617",
"0.5507525",
"0.5503844",
"0.5501603",
"0.54874253",
"0.54800224"
] | 0.632252 | 8 |
Cancels a movement task, when no movement is needed, or we need to forcibly stop a moving player. | @Override
public void cancelMoveTask() {
if (_movementTask != null) {
cancelMoveTask2(true);
_movementTask = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void cancelMoveTask2(boolean shouldNotifySector) {\n if (_movementTask != null && !_movementTask.isDone()) {\n _movementTask.cancel(true);\n\n if (shouldNotifySector) {\n notifySector(false);\n }\n }\n }",
"public void cancelTask(){\n\t\tif(main.teleporting.containsKey(teleporter.getName())){\n\t\t\tmain.teleporting.remove(teleporter.getName());\n\t\t}\n\t\tthis.cancel();\n\t}",
"public void stopMovement() {\r\n this.canMove = false;\r\n }",
"public void stopMovement() {\n this.movementComposer.stopMovement();\n }",
"public\tboolean cancelMovement(Util util) {\n \tboolean result = false; \t\n \ttry {\n \t\t// Go to main rallypoint page\n \t\tString page = util.httpGetPage(getUrlString(), false);\n\t\t\tString baseUrl = util.getBaseUrl();\n String\tpattern = \"rallyPoint.cancel\";\n\t\t\tPattern p = util.getPattern(pattern);\n\t\t\tMatcher m = p.matcher(page);\n\t\t\t// cancel any movements\n\t\t\twhile (m.find()) {\n\t\t\t\t/* \n\t\t\t\tString dInfo = \"\";\n\t for (int i = 0 ; i++ < m.groupCount() ; ) { dInfo = dInfo.concat(\",\"+m.group(i)); }\n\t EventLog.log(pattern+\": \"+dInfo);\n\t\t\t\t*/\n\t \n\t\t\t\tString cancelUrl = m.group(1);\n\t\t\t\tpage = util.httpGetPage(baseUrl+cancelUrl);\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\tif (!result) {\n\t\t\t\tlog.warn(\"cannot find any troop movement in valid state to cancel\");\n\t\t\t\tutil.saveTestPattern(pattern, p, page);\n\t\t\t}\n\t\t} catch (ConversationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \treturn result;\n }",
"public void cancel() {\n target.setAllowFlight(false);\n target.setWalkSpeed(0.01F);\n target.setFlySpeed(0.01F);\n targets.remove(target);\n\n JavaUtils.broadcastStage(\"done\",this);\n }",
"public void cancelTask(String id);",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tmoving = false;\n\t\t}",
"public static void cancelTask() {\n try {\n if (Utils.isNotNull(tt)) {\n tt.cancel();\n }\n if (Utils.isNotNull(t)) {\n t.cancel();\n }\n } catch (Throwable e) {\n //Utils.debugModePrintStack(e, \"FMap\", \"cancelTask\");\n } finally {\n tt = null;\n t = null;\n }\n timeoutValue = 0;\n }",
"private void updateMovement() {\n if (_movementTask == null) {\n return;\n }\n\n if (getOwner().isDead() || _followTarget != null && _followTarget.isDead()) {\n cancelMoveTask2(true);\n return;\n }\n\n // Movement is invalid! Queue a new movement and wait again!\n if (_destinationLocation == null)\n {\n if (_waypoints.peek() != null) {\n _destinationLocation = _waypoints.poll();\n\n if (getOwner().getLocation().getGameSector() != null && getOwner().getLocation().getGameSector().hasActiveNeighbours()) {\n double validatedZ = GeoService.getInstance().validateZ(_destinationLocation.getX(), _destinationLocation.getY(), _destinationLocation.getZ());\n if (validatedZ == Double.MIN_VALUE) {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n\n if (_destinationLocation != null) {\n _destinationLocation.setZ(validatedZ);\n }\n else {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n _isSectorActive = true;\n }\n else {\n _isSectorActive = false;\n }\n notifySector(true);\n }\n else\n {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n }\n\n if (_destinationLocation != null) {\n // Update current character movement, the location.\n float deltaTime = (System.currentTimeMillis() - _movementTick) / 1000.0f;\n float movementSpeed = getOwner().getActionStorage().getMoveSpeed();\n if (getOwner().getActionStorage().getAction().getActionChartActionT().getApplySpeedBuffType().isMove()) {\n movementSpeed *= (getOwner().getGameStats().getMoveSpeedRate().getMoveSpeedRate() + 1_000_000.0f) / 1_000_000.0f;\n }\n\n Location ownerLocation = getOwner().getLocation();\n\n double movementDirectionX = _destinationLocation.getX() - ownerLocation.getX();\n double movementDirectionY = _destinationLocation.getY() - ownerLocation.getY();\n double movementDirectionZ = _destinationLocation.getZ() - ownerLocation.getZ();\n\n double directionLength = Math.sqrt(Math.pow(movementDirectionX, 2) + Math.pow(movementDirectionY, 2) + Math.pow(movementDirectionZ, 2));\n movementDirectionX /= directionLength;\n movementDirectionY /= directionLength;\n movementDirectionZ /= directionLength;\n\n ownerLocation.setXYZ(\n ownerLocation.getX() + movementDirectionX * movementSpeed * deltaTime,\n ownerLocation.getY() + movementDirectionY * movementSpeed * deltaTime,\n ownerLocation.getZ() + movementDirectionZ * movementSpeed * deltaTime\n );\n\n if (_isSectorActive && !_navigationType.isAir()) {\n double validatedZ = GeoService.getInstance().validateZ(ownerLocation.getX(), ownerLocation.getY(), ownerLocation.getZ());\n if (validatedZ == Double.MIN_VALUE) {\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n\n ownerLocation.setZ(validatedZ);\n }\n\n if (ownerLocation.isValid() && World.getInstance().getWorldMap().updateLocation(getOwner(), ownerLocation.getX(), ownerLocation.getY())) {\n double distanceToPoint = MathUtils.getDistance(ownerLocation, _destinationLocation) - getOwner().getTemplate().getBodySize();\n notifyVehicleMovement();\n\n if (_followTarget != null) {\n distanceToPoint -= _followTarget.getTemplate().getBodySize();\n\n if (!MathUtils.isInRange(_destinationLocation, _followTarget.getLocation(), 150)) {\n _destinationLocation.setLocation(_followTarget.getLocation());\n notifySector(true);\n } else { // No more waypoint's available. Send movement stop and events.\n if (distanceToPoint < 75 || distanceToPoint < getOwner().getTemplate().getAttackRange() && getOwner().getAi().getBehavior().isChase()) {\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(false);\n onMovementComplete();\n }\n }\n } else {\n // Check if we are near another destination, then we will\n // switch to another waypoint instead to continue our journey.\n Location nextWaypoint = _waypoints.peek();\n if (nextWaypoint != null) {\n if (distanceToPoint < 100) {\n _destinationLocation = null;\n }\n } else { // No more waypoint's available. Send movement stop and events.\n if (distanceToPoint < 75 || distanceToPoint < getOwner().getTemplate().getAttackRange() && getOwner().getAi().getBehavior().isChase()) {\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(false);\n onMovementComplete();\n }\n }\n }\n } else {\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n }\n }\n _movementTick = System.currentTimeMillis();\n }",
"public void stop()\n {\n if (task == -1) {\n return;\n }\n\n library.getPlugin().getServer().getScheduler().cancelTask(task);\n task = -1;\n }",
"@Override\n protected Void doInBackground(Void... v) {\n try {\n repeating = ServerCom.removeTask(mAptID, tempTask.getDescription(), tempTask.getAssignee());\n } catch (Exception e) {\n this.exception = e;\n }\n\n return null;\n }",
"protected void stopTimeTask() {\n\t\tif (chatAsyncTask!=null) {\n\t\t\tchatAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (liveAsyncTask!=null) {\n\t\t\tliveAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (timerTask!=null) {\n\t\t\ttimerTask.cancel();\n\t\t\ttimerTask = null;\n\t\t}\n\t\t\n\t\tif (timer!=null) {\n\t\t\ttimer.cancel();\n\t\t\ttimer = null;\n\t\t}\n\t\t\n\t\t\n\t}",
"public void cancelRunnable() {\n\t\tif (taskID != null) {\n\t\t\tplugin.getServer().getScheduler().cancelTask(taskID);\n\t\t}\n\t}",
"public abstract boolean attemptMove(Player currentPlayerObj, Coordinate move);",
"private void cancelTasks() {\n\t\ttimer.cancel();\n\t\ttimer.purge();\n\t}",
"abstract protected void cancelCommands();",
"@Override\n\tpublic void excute() {\n\t\tmoveEvent.move(commandinfo.getValue() * 200);\n\t}",
"public void stop(){\r\n\t\tmyTask.cancel();\r\n\t\ttimer.cancel();\r\n\t}",
"public void notifyCancel() {\n Player senderPlayer = this.getToTeleport().getPlayerReference(Player.class),\n targetPlayer = this.getTarget().getPlayerReference(Player.class);\n\n if (senderPlayer == null || targetPlayer == null) {\n return;\n }\n\n MainData.getIns().getMessageManager().getMessage(\"TPA_CANCELLED\").sendTo(senderPlayer);\n MainData.getIns().getMessageManager().getMessage(\"TPA_SELF_CANCELLED\").sendTo(targetPlayer);\n\n }",
"@Override\n\tdefault void onExecution(Player player, Position start, Position end) {\n\n\t\tForceMovement forceMovement = new ForceMovement(player.getPosition(),\n\t\t\t\tnew Position(player.getX(), player.getY() - 3, player.getHeight()), 12, 2, Direction.SOUTH);\n\t\tWorld.schedule(new ForceMovementTask(player, 0, forceMovement, new Animation(5043)) {\n\t\t\t@Override\n\t\t\tprotected void onCancel(boolean logout) {\n\t\t\t\tsuper.onCancel(logout);\n\t\t\t\tWorld.schedule(new Task(1) {\n\t\t\t\t\tint ticks = 0;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void execute() {\n\t\t\t\t\t\tswitch (ticks++) {\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tplayer.move(new Position(player.getX(), player.getY(), player.getHeight() + 1));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\tplayer.move(end);\n\t\t\t\t\t\t\tcancel();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void run() {\n BlockPos cachePosition = teleportee.getPosition();\n while (cachePosition.equals(teleportee.getPosition()) || pendingTeleports.containsKey(originalSender)) {/*block execution until move or teleport*/}\n if (pendingTeleports.containsKey(originalSender)) { //has not teleported\n pendingTeleports.remove(sender.getName(), originalSender);\n sender.addChatMessage(new TextComponentString(TextFormatting.RED + \"Teleport canceled.\"));\n teleportee.addChatMessage(new TextComponentString(TextFormatting.RED + \"Teleport canceled.\"));\n }\n }",
"public void cancelTask() {\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save?\", null,\r\n JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTask();\r\n }\r\n todoListGui();\r\n }",
"private void cancelAllTasks() {\n if(artistTask != null) {\n artistTask.cancel(true);\n artistTask = null;\n }\n }",
"public void tryMove() {\n if(!currentPlayer.getHasPlayed()){\n if (!currentPlayer.isEmployed()) {\n String destStr = chooseNeighbor();\n\n currentPlayer.moveTo(destStr, getBoardSet(destStr));\n if(currentPlayer.getLocation().getFlipStage() == 0){\n currentPlayer.getLocation().flipSet();\n }\n refreshPlayerPanel();\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"Since you are employed in a role, you cannot move but you can act or rehearse if you have not already\");\n }\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end turn your turn.\");\n }\n view.updateSidePanel(playerArray);\n }",
"@Override\n public PlayerMove move() {\n\n return null;\n }",
"public void stopTask() {\r\n\t\tquit = true;\r\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n cancelCurrentTask();\n }",
"public void stopTask() {\n if(canRunTaskThread != null)\n canRunTaskThread.set(false);\n }",
"public abstract boolean cancel();",
"public void InvalidMove();",
"@Override\n\tpublic void execute() {\n\t\tif (!Variables.decreaseTask) {\n\t\t\tVariables.decreaseTask = true;\n\t\t} else {\n\t\t\tVariables.taskAmount--;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Killing npcs\");\n\t\t\n\t\tif (Variables.status != \"Completing task...\") {\n\t\tVariables.status = \"Completing task...\";\n\t\t}\n\t\t\n\t\tNpc[] slayerMonster = Npcs.getNearest(slayerMonsterFilter);\n\n\t\ttry {\n\t\tslayerMonster[0].interact(1);\n\t\t} catch (ArrayIndexOutOfBoundsException | NullPointerException e) {\n\t\t\t\n\t\t} \n\t\t\n\t\tTime.sleep(new SleepCondition() {\n\t\t\t@Override\n\t\t\tpublic boolean isValid() {\n\t\t\t\treturn Players.getMyPlayer().isInCombat();\n\t\t\t}\n\t\t}, 5000);\n\t\t\n\t\tTime.sleep(new SleepCondition() {\n\t\t\t@Override\n\t\t\tpublic boolean isValid() {\n\t\t\t\treturn !Players.getMyPlayer().isInCombat();\n\t\t\t}\n\t\t}, 5000);\n\t}",
"public synchronized void abort() {\r\n\t\tif (done) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdone = true;\r\n\r\n\t\tabortScheduledTasks();\r\n\t}",
"@Override\n\t\tpublic boolean isCanceled() {\n\t\t\treturn false;\n\t\t}",
"@Override\r\n\tpublic boolean isCanceled() {\n\t\treturn false;\r\n\t}",
"public void checkCancel() throws CancellationException;",
"protected void cancelTimerTask() {\n ScheduledTimerTask scheduledTimerTask = this.scheduledTimerTask;\n if (null != scheduledTimerTask) {\n this.scheduledTimerTask = null;\n scheduledTimerTask.cancel();\n }\n }",
"@Override\n\t\t\tpublic boolean isCanceled() {\n\t\t\t\treturn false;\n\t\t\t}",
"public void updateTimedTasks() {\n if (TimedEventQueue.validTask(this)) {\n String action = TimedEventQueue.getTask().getAction();\n if (action.equals(\"gravityCancelOver\")) {\n this.gravityCancel = false;\n this.yVel = 0;\n } else if (action.equals(\"dodgeCoolDownOver\")) {\n this.dodgeCoolDown = false;\n } else if (action.equals(\"breakSpecialState\")) {\n this.breakSpecialState();\n } else if (action.equals(\"activeAttackState\")) {\n this.activeAttackState = true;\n } else if (action.equals(\"activeAttackStateOver\")) {\n this.activeAttackState = false;\n } else if (action.equals(\"heavySideSpeedUp\")) {\n this.setxTargetSpeed(Util.scaleX(25));\n } else if (action.equals(\"resetXMovement\")) {\n this.resetXMovement();\n }\n } \n }",
"public void moveEveryoneExcept(Player player) throws IOException, InterruptedException { }",
"public static void stopMoving()\n {\n //System.out.println(\"player stopped moving\");\n runSound.stop();\n walkSound.stop();\n }",
"void killPlayerByPlayerMove()\n {\n movePlayerToCell(getMonsterCell());\n }",
"public void gravityCancel(int delay) {\n this.gravityCancel = true;\n TimedEventQueue.addTask(new TimedTask(this, \"gravityCancelOver\", delay));\n }",
"void cancel(@NonNull java.lang.Runnable command, boolean mayInterruptIfRunning);",
"@Test\n void invalidWON() {\n win();\n getGame().move(getPlayer(), Direction.NORTH);\n getGame().stop();\n getGame().start();\n assertThat(getGame().isInProgress()).isFalse();\n verifyNoMoreInteractions(observer);\n }",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void endMove()\n\t{\n\t\tBMTron.delayed += 50;\n\t\tif (delayed == 2000)\n\t\t{\n\t\t\tfor (int i = 0; i < 5; i++) \n\t\t\t{\n\t\t\t\tif (players[i].exist)\n\t\t\t\t{\n\t\t\t\t\tmove[i].interrupt();\n\t\t\t\t}\n\t\t\t}\n\t\t\trepaint.interrupt();\n\t\t\tBMTron.frame.setVisible(false);\n\t\t\tSelection.frame.setVisible(true);\n\t\t\tdelayed = 0;\n\t\t}\n\t}",
"public void invalidMovePrompt() {\n\t\tinvalidPrompted = true;\n\t\tSystem.out.println(\"Invalid move. Please try again\");\n\t}",
"public void stop() {\n if (this.runningTaskId != -1) {\n plugin.getServer().getScheduler().cancelTask(this.runningTaskId);\n }\n reset(true);\n running = false;\n }",
"public boolean cancel();",
"public void cancel();",
"private void cancelPressed() {\n\t\tVideoPlayer.mediaPlayer.stop();\n\t\tl.clear();\n\t\tpaths.clear();\n\t\tsizes.clear();\n\t\tcancelPlayingList.setEnabled(false);\n\t\tplayTheList.setEnabled(true);\n\t}",
"@Override\n public void stopTask(TrcRobot.RunMode runMode)\n {\n stop();\n }",
"public void AskForMove();",
"@Override\n public boolean isMoving() {\n return _movementTask != null && !_movementTask.isDone();\n }",
"@Override\n\tpublic void pause() {\n\t\tstopTask();\n\t}",
"public boolean cancel(boolean mayInterruptIfRunning)\r\n/* 351: */ {\r\n/* 352:433 */ Object result = this.result;\r\n/* 353:434 */ if ((isDone0(result)) || (result == UNCANCELLABLE)) {\r\n/* 354:435 */ return false;\r\n/* 355: */ }\r\n/* 356:438 */ synchronized (this)\r\n/* 357: */ {\r\n/* 358:440 */ result = this.result;\r\n/* 359:441 */ if ((isDone0(result)) || (result == UNCANCELLABLE)) {\r\n/* 360:442 */ return false;\r\n/* 361: */ }\r\n/* 362:445 */ this.result = CANCELLATION_CAUSE_HOLDER;\r\n/* 363:446 */ if (hasWaiters()) {\r\n/* 364:447 */ notifyAll();\r\n/* 365: */ }\r\n/* 366: */ }\r\n/* 367:451 */ notifyListeners();\r\n/* 368:452 */ return true;\r\n/* 369: */ }",
"@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }",
"public void stop_moving() {\n\t\tlogger.info(\"Human stop requested!\");\n\t\tPublisher move_base = new Publisher(\"/ariac_human/stop\", \"std_msgs/Bool\", bridge);\t\t\n\t\tmove_base.publish(new Bool(true)); \n\t}",
"private void invalidMove(){\n setMsgText(\"That's a invalid move\");\n playSound(WRONG_SOUND);\n }",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(route.size()==0)\n\t\t\t\t{\n\t\t\t\t\tifMoveEnd=true;\n\t\t\t\t\ttimer.cancel();\n\t\t\t\t}else {\n\t\t\t\t\tsetRoleCoordinate(route.get(0),false);\n\t\t\t\t\troute.remove(0);\n\t\t\t\t}\n\t\t\t\n\t\t\t}",
"@Override\n void movePhase() throws IOException, InterruptedException, IOExceptionFromController {\n boolean godPower = false;\n ArrayList<Cell> possibleMoves = findPossibleMoves(activeWorker.getPosition());\n Cell movePosition = client.chooseMovePosition(possibleMoves);\n CellView startView = new CellView(activeWorker.getPosition());\n CellView endView = new CellView(movePosition);\n CellView startView2 = null;\n CellView endView2 = null;\n // + allow pushing away opponents\n if (movePosition.hasWorker()) {\n godPower = true;\n Worker pushedWorker = movePosition.getWorker();\n Cell nextCell;\n int nextX = movePosition.getPosX() + (movePosition.getPosX() - activeWorker.getPosition().getPosX());\n int nextY = movePosition.getPosY() + (movePosition.getPosY() - activeWorker.getPosition().getPosY());\n nextCell = board.getCell(nextX, nextY);\n startView2 = endView;\n endView2 = new CellView(nextCell);\n try {\n pushedWorker.move(nextCell);\n } catch (IllegalMoveException e) {\n gameController.logError(e.getMessage());\n return;\n }\n //\n }\n try {\n activeWorker.move(movePosition);\n } catch (IllegalMoveException e) {\n gameController.logError(e.getMessage());\n }\n if (godPower) displayMove(startView, endView, startView2, endView2, card);\n else displayMove(startView, endView, null);\n }",
"public void resetTask() {}",
"@Override\n public void run() {\n if (time == 0) {\n // wait has ended time to teleport\n if (!Utils.homeExists(homeOwner, homeName)) {\n // the has since been deleted whilst waiting\n p.sendMessage(\"There was an error teleporting you.\");\n cancel();\n return;\n }\n Utils.teleportPlayer((Player) sender, homeOwner, homeName);\n sender.sendMessage(Utils.chat(plugin.getConfig().getString(\"teleport-color\") + plugin.getConfig().getString(\"teleport-message\")));\n cancel();\n return;\n }\n Location currentLocation = ((Player) sender).getLocation();\n if (initialLocation.getX() != currentLocation.getX() ||\n initialLocation.getY() != currentLocation.getY() ||\n initialLocation.getZ() != currentLocation.getZ()) {\n // they've moved and the config says to cancel on move\n sender.sendMessage(Utils.chat(plugin.getConfig().getString(\"move-cancel-message\")));\n cancel();\n }\n else {\n sender.sendMessage(Utils.chat(plugin.getConfig().getString(\"countdown-message\").replace(\"<time>\", Integer.toString(time))));\n time--;\n }\n }",
"@Override\n protected void checkCanceled() {\n long l = System.currentTimeMillis();\n if (l >= myTime) {\n throw new ProcessCanceledException();\n }\n }",
"public void cancelExecution() {\n \n \t\tcancelOrKillExecution(true);\n \t}",
"@Test\n void invalidPAUSED() {\n getGame().start();\n getGame().stop();\n // this has no effect (sneak paths)\n getGame().move(getPlayer(), Direction.EAST);\n getGame().move(getPlayer(), Direction.EAST);\n getGame().stop();\n }",
"private void stopSpawning()\n {\n if (spawnThread != null)\n {\n Bukkit.getServer().getScheduler().cancelTask(spawnThread.getTaskId());\n Bukkit.getServer().getScheduler().cancelTask(spawnTaskId);\n Bukkit.getServer().getScheduler().cancelTask(sheepTaskId);\n spawnTaskId = -1;\n sheepTaskId = -1;\n spawnThread = null;\n currentWave = null;\n }\n else System.out.println(\"--------- THE SPAWNTHREAD IS NULL! ----------\");\n \n // Restore spawn flags.\n MAUtils.setSpawnFlags(plugin, world, spawnMonsters, allowMonsters, allowAnimals);\n }",
"private void unintelligentDecideMove() {\n\t\twander();\r\n\t}",
"public void resume() {\n moveStop = true;\n }",
"public void halt() {\n\t\t// Task can not currently be halted.\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t\tif (mt != null && mt.getStatus() == AsyncTask.Status.RUNNING) {\r\n\t\t\tmt.cancel(true);\r\n\t\t}\r\n\t}",
"public void cancel() {\r\n\t\tcanceled = true;\r\n\t\ttry {\r\n\t\t\tThread.sleep(51);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"boolean prepareToMove();",
"protected boolean processIllegalMove(String moveString, String reason){return false;}",
"public void move(){\n System.out.println(\"I can't move...\");\n }",
"public void cancel() {\n\t\tassertRunningInJobMasterMainThread();\n\t\twhile (true) {\n\n\t\t\tExecutionState current = this.state;\n\n\t\t\tif (current == CANCELING || current == CANCELED) {\n\t\t\t\t// already taken care of, no need to cancel again\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// these two are the common cases where we need to send a cancel call\n\t\t\telse if (current == RUNNING || current == DEPLOYING) {\n\t\t\t\t// try to transition to canceling, if successful, send the cancel call\n\t\t\t\tif (startCancelling(NUM_CANCEL_CALL_TRIES)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\n\t\t\telse if (current == FINISHED) {\n\t\t\t\t// finished before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\t// a pipelined partition whose consumer has never been deployed could still be buffered on the TM\n\t\t\t\t// release it here since pipelined partitions for FINISHED executions aren't handled elsewhere\n\t\t\t\t// covers the following cases:\n\t\t\t\t// \t\ta) restarts of this vertex\n\t\t\t\t// \t\tb) a global failure (which may result in a FAILED job state)\n\t\t\t\tsendReleaseIntermediateResultPartitionsRpcCall();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == FAILED) {\n\t\t\t\t// failed before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == CREATED || current == SCHEDULED) {\n\t\t\t\t// from here, we can directly switch to cancelled, because no task has been deployed\n\t\t\t\tif (cancelAtomically()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new IllegalStateException(current.name());\n\t\t\t}\n\t\t}\n\t}",
"@Test\n void invalidCREATED() {\n // when not started, nothing can be done.\n getGame().move(getPlayer(), Direction.EAST);\n assertThat(getGame().isInProgress()).isFalse();\n verifyNoMoreInteractions(observer);\n }",
"public void moveStopped()\n {\n for (GraphElement element : elements) {\n if(element instanceof Moveable) {\n Moveable moveable = (Moveable) element;\n moveable.setPositionToGhost();\n }\n } \n }",
"private void cancelarMovimientos(Presupuesto presupuesto) throws Exception {\n }",
"public void stoptimertask() {\n if (timer != null) {\r\n timer.cancel();\r\n timer = null;\r\n }}",
"@Test\n void checkDoMove() {\n abilities.doMove(turn, board.getCellFromCoords(1, 1));\n assertEquals(turn.getWorker().getCell(), board.getCellFromCoords(1, 1));\n Worker forcedWorker = turn.getWorker();\n for (Worker other : turn.getOtherWorkers()) {\n if (other.getCell() == board.getCellFromCoords(2, 2)) {\n forcedWorker = other;\n }\n }\n\n assertEquals(forcedWorker.getCell(), board.getCellFromCoords(2, 2));\n\n // Can't move anymore after having already moved\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(0, 0)));\n }",
"private void processCancelReservation() {\n System.out.println(\"Which reservation would you want to cancel? (the number associated to the reservation)\");\n\n boolean keepgoing = true;\n int command = 0;\n while (keepgoing) {\n command = input.nextInt();\n if (command > 0 && command < pickedAccount.getReservations().size() + 1) {\n keepgoing = false;\n } else {\n System.out.println(\"Invalid number, try again.\");\n }\n }\n pickedAccount.getReservations().get(command - 1).cancel();\n pickedAccount.getReservations().remove(command - 1);\n System.out.println(\"Reservation Cancelled\");\n }",
"void doneMoving();",
"@Override\n public boolean cancel(boolean mayInterruptIfRunning) {\n callable.kill();\n\n return super.cancel(mayInterruptIfRunning);\n }",
"@Override\n\tpublic void handleDone(Player player, Task task, Game game) {\n\t\t\n\t}",
"@Override\n\tpublic void updatePosition()\n\t{\n\t\tif(!fired && !pathfinding)\n\t\t{\n\t\t\tif(x == destX && y == destY)\n\t\t\t{\n\t\t\t\tfired = true;\n\t\t\t\tvehicle.msgAnimationDestinationReached();\n\t\t\t\tcurrentDirection = MovementDirection.None;\n\t\t\t\t\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\tif(cIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t{\n\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(allowedToMove || drunk)\n\t\t\t{\n\t\t\t\tswitch(currentDirection)\n\t\t\t\t{\n\t\t\t\t\tcase Right:\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Down:\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:\n\t\t\t\t\t\tx--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x % CityPanel.GRID_SIZE == 0 && y % CityPanel.GRID_SIZE == 0 && !moves.isEmpty())\n\t\t\t{\t\n\t\t\t\tif(allowedToMove || drunk)\n\t\t\t\t{\n\t\t\t\t\tcurrentDirection = moves.pop();\n\t\t\t\t\n\t\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\t\n\t\t\t\t\tif(current != next)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrent = next;\n\t\t\t\t\t\n\t\t\t\t\tswitch(currentDirection)\n\t\t\t\t\t{\n\t\t\t\t\tcase Down:next = new Point(current.x,current.y + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:next = new Point(current.x - 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Right:next = new Point(current.x + 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:next = new Point(current.x,current.y - 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:next = current;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[next.y][next.x].tryAcquire())\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(next.y).get(next.x);\n\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Pathfinder.isCrossWalk(next, city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(Gui g : guiList)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(g instanceof PassengerGui)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(nextIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextIntersection.acquireAll();\n\t\t\t\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tguiList.add(this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!allowedToMove && drunk)\n\t\t{\n\t\t\tcity.addGui(new ExplosionGui(x,y));\n\t\t\tSystem.out.println(\"DESTROYING\");\n\t\t\tcity.removeGui(this);\n\t\t\tvehicle.stopThread();\n\t\t\tsetPresent(false);\n\t\t\t\n\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\n\t\t\tif(cIntersection == null)\n\t\t\t{\n\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t{\n\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t{\n\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t}\n\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void stopTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<java.lang.Boolean> callback );",
"protected void execute() {\n \tif (m_moving)\n \t{\n \t\tdouble direction;\n \tif (Math.abs(Gyro.getYaw() - m_desiredYaw) < m_tolerance)\n \t{\n \t\tdirection = 0;\n \t\tm_moving = false;\n \t\tm_cameraThread = new CameraThread();\n \t\tm_cameraThread.start();\n \t\tRobot.getDriveBase().teleopDrive(0.0, 0.0);\n \t}\n \telse\n \t{\n\t \tif (Gyro.getYaw() < m_desiredYaw)\n\t \t{\n\t \t\tdirection = 1;\n\t \t}\n\t \telse\n\t \t{\n\t \t\tdirection = -1;\n\t \t}\n\t \t\n\t \tif (((Gyro.getYaw() - m_lastYaw) * direction) - (m_degreesPerSecond / 50) > m_intervalTolerance)\n\t \t{\n\t \t\tm_speed -= 0.05;\n\t \t}\n\t \telse if (((Gyro.getYaw() - m_lastYaw) * direction) - (m_degreesPerSecond / 50) < (m_intervalTolerance * -1))\n\t \t{\n\t \t\tm_speed += 0.05;\n\t \t}\n\t \t\n\t \tif (Math.abs((Gyro.getYaw() - m_lastYaw) + Gyro.getYaw() / Math.abs(m_desiredYaw)) >= m_percentDegreesToSlow)\n\t \t{\n\t \t\tm_speed -= 0.007;\n\t \t}\n\t \t\n\t \tif (m_speed < 0)\n\t \t{\n\t \t\tm_speed = 0.0;\n\t \t}\n\t \telse if (m_speed > 1)\n\t \t{\n\t \t\tm_speed = 1.0;\n\t \t}\n\t \t\n\t \tRobot.getDriveBase().teleopDrive(0.0, m_speed * direction);\n\t \tm_lastYaw = Gyro.getYaw();\n \t}\n \t}\n \telse\n \t{\n\t \tif (m_cameraThread.isAlive() == false)\n\t \t{\n\t \t\tif (m_cameraThread.weHaveAShot())\n\t \t\t{\n\t \t\t\tif (Gyro.getYaw() >= CameraThread.desiredLeftYaw() && Gyro.getYaw() <= CameraThread.desiredRightYaw())\n\t \t\t\t{\n\t \t\t\t\tm_onTarget = true;\n\t \t\t\t}\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tm_desiredYaw = CameraThread.desiredCenterYaw();\n\t\t \t\t\tm_moving = true;\n\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tdouble pixels = m_cameraThread.shotAngleError();\n\t \t\t\t//m_desiredYaw = CameraThread.yawWhenPicture() - pixels * 54 / 640;\n\t \t\t\tm_desiredYaw = CameraThread.yawWhenPicture() - pixels * 0.075; //try with 61 / 640\n\t \t\t\tif (Math.abs(Gyro.getYaw() - m_desiredYaw) < m_tolerance)\n\t \t\t\t{\n\t \t\t\t\tm_onTarget = true;\n\t \t\t\t}\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tm_moving = true;\n\t \t\t\t}\n\t \t\t}\n\t \t}\n \t}\n \tSmartDashboard.putNumber(\"Desired Yaw\", m_desiredYaw);\n \t\n \tSystem.out.println(\"speed: \" + m_speed);\n \tSystem.out.println(\"desired yaw: \" + m_desiredYaw);\n \tSystem.out.println(\"is moving: \" + m_moving);\n }",
"private void cancelSchedule() {\n\n if (timer == null)\n return;\n // timer.cancel();\n }"
] | [
"0.71123904",
"0.6521165",
"0.62326336",
"0.602829",
"0.60156786",
"0.6001275",
"0.5947565",
"0.59130037",
"0.58070284",
"0.5802636",
"0.5800809",
"0.5747992",
"0.57057047",
"0.56949866",
"0.5656076",
"0.560652",
"0.5603663",
"0.5592073",
"0.55868506",
"0.5581986",
"0.55594826",
"0.5550518",
"0.55438036",
"0.55428237",
"0.55128324",
"0.5482485",
"0.54445636",
"0.5435179",
"0.5432874",
"0.543164",
"0.54239565",
"0.5375348",
"0.53729236",
"0.537266",
"0.53721493",
"0.53721416",
"0.5368027",
"0.53643113",
"0.5358349",
"0.53582805",
"0.53387064",
"0.5332546",
"0.53298354",
"0.53292155",
"0.53258395",
"0.5322885",
"0.5322885",
"0.5322885",
"0.5322885",
"0.5322885",
"0.5322885",
"0.5321824",
"0.5320301",
"0.5292179",
"0.5282286",
"0.5277249",
"0.5269623",
"0.5264798",
"0.5261383",
"0.5249915",
"0.5247706",
"0.52341527",
"0.52273715",
"0.52266234",
"0.5226613",
"0.52265275",
"0.52265275",
"0.52265275",
"0.52265275",
"0.52265275",
"0.52169156",
"0.52158844",
"0.52117896",
"0.5211435",
"0.52043545",
"0.51963246",
"0.51949793",
"0.5188694",
"0.51873726",
"0.51765203",
"0.51695156",
"0.5166622",
"0.5158329",
"0.5154966",
"0.51498634",
"0.51460856",
"0.51449645",
"0.5128401",
"0.5123013",
"0.5121281",
"0.5121101",
"0.5113746",
"0.51106524",
"0.51030445",
"0.5097593",
"0.50935054",
"0.5087204",
"0.5084417",
"0.5083227",
"0.50811285"
] | 0.8219835 | 0 |
Cancels a movement task that is currently running and notifies the game sector that the movement has stopped. | private void cancelMoveTask2(boolean shouldNotifySector) {
if (_movementTask != null && !_movementTask.isDone()) {
_movementTask.cancel(true);
if (shouldNotifySector) {
notifySector(false);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void cancelMoveTask() {\n if (_movementTask != null) {\n cancelMoveTask2(true);\n _movementTask = null;\n }\n }",
"public void cancelTask(){\n\t\tif(main.teleporting.containsKey(teleporter.getName())){\n\t\t\tmain.teleporting.remove(teleporter.getName());\n\t\t}\n\t\tthis.cancel();\n\t}",
"public void stop(){\r\n\t\tmyTask.cancel();\r\n\t\ttimer.cancel();\r\n\t}",
"public void stop()\n {\n if (task == -1) {\n return;\n }\n\n library.getPlugin().getServer().getScheduler().cancelTask(task);\n task = -1;\n }",
"public void stopTask() {\r\n\t\tquit = true;\r\n\t}",
"public void stop() {\n if (this.runningTaskId != -1) {\n plugin.getServer().getScheduler().cancelTask(this.runningTaskId);\n }\n reset(true);\n running = false;\n }",
"public void cancelTask(String id);",
"public void stopTask() {\n if(canRunTaskThread != null)\n canRunTaskThread.set(false);\n }",
"public static void cancelTask() {\n try {\n if (Utils.isNotNull(tt)) {\n tt.cancel();\n }\n if (Utils.isNotNull(t)) {\n t.cancel();\n }\n } catch (Throwable e) {\n //Utils.debugModePrintStack(e, \"FMap\", \"cancelTask\");\n } finally {\n tt = null;\n t = null;\n }\n timeoutValue = 0;\n }",
"public void cancel() {\n target.setAllowFlight(false);\n target.setWalkSpeed(0.01F);\n target.setFlySpeed(0.01F);\n targets.remove(target);\n\n JavaUtils.broadcastStage(\"done\",this);\n }",
"public void cancelRunnable() {\n\t\tif (taskID != null) {\n\t\t\tplugin.getServer().getScheduler().cancelTask(taskID);\n\t\t}\n\t}",
"private void cancelTasks() {\n\t\ttimer.cancel();\n\t\ttimer.purge();\n\t}",
"protected void stopTimeTask() {\n\t\tif (chatAsyncTask!=null) {\n\t\t\tchatAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (liveAsyncTask!=null) {\n\t\t\tliveAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (timerTask!=null) {\n\t\t\ttimerTask.cancel();\n\t\t\ttimerTask = null;\n\t\t}\n\t\t\n\t\tif (timer!=null) {\n\t\t\ttimer.cancel();\n\t\t\ttimer = null;\n\t\t}\n\t\t\n\t\t\n\t}",
"public void stopTask()\n {\n viewer.stopViewer(); \n }",
"@Override\n public void stopTask(TrcRobot.RunMode runMode)\n {\n stop();\n }",
"void endTask();",
"public void interruptTask() {\n }",
"public void interruptTask() {\n }",
"void stopTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<java.lang.Boolean> callback );",
"public void cancelTask() {\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save?\", null,\r\n JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTask();\r\n }\r\n todoListGui();\r\n }",
"public long stop() {\n return timer.stop(task);\n }",
"public void stopTimerTask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }",
"public synchronized boolean cancel(String taskKey)\n {\n \t// the complete scheduler has already been canceled?\n \tif (timer == null)\n \t\treturn false;\n \t\n \tSchedulerTimerTask timerTask = (SchedulerTimerTask) scheduledTimerTasks.remove(taskKey);\n \tif (null == timerTask)\n \t{\n \t\treturn false;\n \t}\n \t\n // delete from HSQL if visible\n if (timerTask.schedulerTask.isVisible())\n {\n IDataAccessor accessor = AdminApplicationProvider.newDataAccessor();\n IDataTransaction transaction = accessor.newTransaction();\n try\n {\n IDataTable table = accessor.getTable(Enginetask.NAME);\n table.qbeClear();\n table.qbeSetKeyValue(Enginetask.schedulerid, getId());\n table.qbeSetKeyValue(Enginetask.taskid, taskKey);\n if (table.search() > 0)\n {\n table.getRecord(0).delete(transaction);\n transaction.commit();\n }\n }\n catch (Exception ex)\n {\n // convert exception\n throw new RuntimeException(ex);\n }\n finally\n {\n transaction.close();\n }\n }\n\n // and really cancel\n return timerTask.cancel();\n }",
"public synchronized void abort() {\r\n\t\tif (done) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdone = true;\r\n\r\n\t\tabortScheduledTasks();\r\n\t}",
"protected void cancelTimerTask() {\n ScheduledTimerTask scheduledTimerTask = this.scheduledTimerTask;\n if (null != scheduledTimerTask) {\n this.scheduledTimerTask = null;\n scheduledTimerTask.cancel();\n }\n }",
"public void finish() {\n\t\ttask.run();\n\t\ttask.cancel();\n\t}",
"@Override\n\tpublic void pause() {\n\t\tstopTask();\n\t}",
"public void stopMovement() {\n this.movementComposer.stopMovement();\n }",
"@Override\n public boolean onStopJob(JobParameters job) {\n if (mTasksData != null) {\n mTasksData.cancel(true);\n }\n return true;\n }",
"public void cancel() {\n\t\tassertRunningInJobMasterMainThread();\n\t\twhile (true) {\n\n\t\t\tExecutionState current = this.state;\n\n\t\t\tif (current == CANCELING || current == CANCELED) {\n\t\t\t\t// already taken care of, no need to cancel again\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// these two are the common cases where we need to send a cancel call\n\t\t\telse if (current == RUNNING || current == DEPLOYING) {\n\t\t\t\t// try to transition to canceling, if successful, send the cancel call\n\t\t\t\tif (startCancelling(NUM_CANCEL_CALL_TRIES)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\n\t\t\telse if (current == FINISHED) {\n\t\t\t\t// finished before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\t// a pipelined partition whose consumer has never been deployed could still be buffered on the TM\n\t\t\t\t// release it here since pipelined partitions for FINISHED executions aren't handled elsewhere\n\t\t\t\t// covers the following cases:\n\t\t\t\t// \t\ta) restarts of this vertex\n\t\t\t\t// \t\tb) a global failure (which may result in a FAILED job state)\n\t\t\t\tsendReleaseIntermediateResultPartitionsRpcCall();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == FAILED) {\n\t\t\t\t// failed before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == CREATED || current == SCHEDULED) {\n\t\t\t\t// from here, we can directly switch to cancelled, because no task has been deployed\n\t\t\t\tif (cancelAtomically()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new IllegalStateException(current.name());\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void stop() {\n\t\tstopTask();\n\t\tmPlaybillPath = null;\n\t\tmResPlaybill = null;\n\t}",
"@Override\n protected Void doInBackground(Void... v) {\n try {\n repeating = ServerCom.removeTask(mAptID, tempTask.getDescription(), tempTask.getAssignee());\n } catch (Exception e) {\n this.exception = e;\n }\n\n return null;\n }",
"public void stopTracking() {\n trackingTask.cancel(true);\n }",
"public void cancel() {\r\n\t\tbStop = true;\r\n\t}",
"public void stopMovement() {\r\n this.canMove = false;\r\n }",
"@Override\n\tpublic int exec_task (PendingTask task) {\n\t\treturn exec_cleanup_pdl_stop (task);\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n cancelCurrentTask();\n }",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tmoving = false;\n\t\t}",
"public void stop(){\n running = false;\n }",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tLog.d(\"cancel\", \"cancel my task\");\n\t\t\n\t\t}",
"void cancel(@NonNull java.lang.Runnable command, boolean mayInterruptIfRunning);",
"public void stop() {\n _running = false;\n }",
"final void interruptTask() {\n/* 82 */ Thread currentRunner = this.runner;\n/* 83 */ if (currentRunner != null) {\n/* 84 */ currentRunner.interrupt();\n/* */ }\n/* 86 */ this.doneInterrupting = true;\n/* */ }",
"public void cancel() {\r\n\t\tcanceled = true;\r\n\t\ttry {\r\n\t\t\tThread.sleep(51);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void onTaskCompletion(Task<?> task)\n {\n m_RunningTasks.remove(task);\n }",
"public final void stop() {\n running = false;\n \n \n\n }",
"public void cancel(){\n cancelled = true;\n }",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"void stopReportingTask();",
"public void cancelExecution() {\n \n \t\tcancelOrKillExecution(true);\n \t}",
"void deleteDoneTask(ReadOnlyTask floatingTask) throws TaskNotFoundException;",
"public boolean cancel();",
"public synchronized void cancel() {\n this.executionState = JobExecutionState.CANCELLED;\n this.finished = Instant.now();\n }",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }",
"public void cancel();",
"private void cancel() {\n mFuture.cancel(mMayInterruptIfRunning);\n }",
"public void uncheckTask() {\n isDone = false;\n }",
"@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t\tif (mt != null && mt.getStatus() == AsyncTask.Status.RUNNING) {\r\n\t\t\tmt.cancel(true);\r\n\t\t}\r\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n // dismiss the progress dialog\n MyTask.this.cancel(true);\n finish();\n pDialog.dismiss();\n // Tell the system about cancellation\n\n }",
"private void cancelAllTasks() {\n if(artistTask != null) {\n artistTask.cancel(true);\n artistTask = null;\n }\n }",
"public void stop() {\r\n running = false;\r\n }",
"public abstract boolean cancel();",
"public\tboolean cancelMovement(Util util) {\n \tboolean result = false; \t\n \ttry {\n \t\t// Go to main rallypoint page\n \t\tString page = util.httpGetPage(getUrlString(), false);\n\t\t\tString baseUrl = util.getBaseUrl();\n String\tpattern = \"rallyPoint.cancel\";\n\t\t\tPattern p = util.getPattern(pattern);\n\t\t\tMatcher m = p.matcher(page);\n\t\t\t// cancel any movements\n\t\t\twhile (m.find()) {\n\t\t\t\t/* \n\t\t\t\tString dInfo = \"\";\n\t for (int i = 0 ; i++ < m.groupCount() ; ) { dInfo = dInfo.concat(\",\"+m.group(i)); }\n\t EventLog.log(pattern+\": \"+dInfo);\n\t\t\t\t*/\n\t \n\t\t\t\tString cancelUrl = m.group(1);\n\t\t\t\tpage = util.httpGetPage(baseUrl+cancelUrl);\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t\tif (!result) {\n\t\t\t\tlog.warn(\"cannot find any troop movement in valid state to cancel\");\n\t\t\t\tutil.saveTestPattern(pattern, p, page);\n\t\t\t}\n\t\t} catch (ConversationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \treturn result;\n }",
"void cancel() {\n\tsleepThread.interrupt();\n }",
"public void stoptimertask() {\n if (timer != null) {\r\n timer.cancel();\r\n timer = null;\r\n }}",
"public synchronized void cancelExecution() {\n this.status = EXECUTION_CANCELED;\n if (this.context != null)\n context.close(true);\n }",
"public final void stopRunning() {\n\t\t_running = false;\n\t}",
"public synchronized void stop() {\n this.running = false;\n }",
"void notifyStop();",
"public synchronized void cancel() {\n }",
"public void cancel() {\n\t\tcancelled = true;\n\t}",
"private void stop()\n {\n if(running)\n {\n scheduledExecutorService.shutdownNow();\n running = false;\n }\n }",
"public void cancel() {\n\t\tinterrupt();\n\t}",
"public void cancel() {\n if( this.attachedThread != null ) {\n this.attachedThread.interrupt();\n }\n else {\n this.attachedFuture.cancel( true );\n\n if( this.attachedHipanFuture != null ) {\n this.attachedHipanFuture.fail( new InterruptedException( \"Task was canceled\" ) );\n }\n }\n }",
"@Override\n\t\t\tpublic boolean isCanceled() {\n\t\t\t\treturn false;\n\t\t\t}",
"public boolean cancel(String experimentID, String taskID, String gatewayID, String tokenId)throws GFacException;",
"public void stop() {\n running = false;\n }",
"public void terminate(long id) {\n\t\t// Terminate a task. This is most useful with infinite-duration tasks,\r\n\t\t// but\r\n\t\t// it is also handy to delete finite tasks prematurely. It would be a\r\n\t\t// simple\r\n\t\t// matter to add a \"suspend task\" option which suspends a task instead\r\n\t\t// of\r\n\t\t// removing it.\r\n\t\t//\r\n\t\t// Terminate marks the task for deletion rather than just removing it,\r\n\t\t// since it may be called while ExecuteFrame is iterating through the\r\n\t\t// list.\r\n\t\t// Marked tasks are swept up at the end of each frame.\r\n\t\t//\r\n\t\t// Since all task ID's are unique, this method stops looking after it\r\n\t\t// finds\r\n\t\t// a matching task.\r\n\t\t//\r\n\t\tboolean found = false;\r\n\r\n\t\tif (id == RENDER_TASK_ID) {\r\n\t\t\trenderTask.pTask = null;\r\n\t\t\tfound = true;\r\n\t\t}\r\n\r\n\t\tTaskInfo pTaskInfo = m_pTaskList;\r\n\t\twhile (pTaskInfo != null && !found) {\r\n\t\t\tif (pTaskInfo.id == id) {\r\n\t\t\t\tpTaskInfo.status = TASK_DELETE;\r\n\t\t\t\tpTaskInfo.pTask.finish(pTaskInfo.id, m_clock.getTime(), pTaskInfo.pUser);\r\n\t\t\t\tfound = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tpTaskInfo = pTaskInfo.pNext;\r\n\t\t}\r\n\t\tpTaskInfo = m_pFrameList;\r\n\t\twhile (pTaskInfo != null && !found) {\r\n\t\t\tif (pTaskInfo.id == id) {\r\n\t\t\t\tpTaskInfo.status = TASK_DELETE;\r\n\t\t\t\tpTaskInfo.pTask.finish(pTaskInfo.id, m_clock.getTime(), pTaskInfo.pUser);\r\n\t\t\t\tfound = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tpTaskInfo = pTaskInfo.pNext;\r\n\t\t}\r\n\t}",
"public void stopRunning() {\n try {\n _running = false;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void cancel()\n\t{\n\t}",
"public void stop()\n {\n running = false;\n }",
"public void halt() {\n\t\t// Task can not currently be halted.\n\t}",
"public void removeTasks() {\n\t\t\r\n\t}",
"public void quit() {\r\n\t\trunning = false;\r\n\t\tt= null;\r\n\t}",
"public void pauseMyTask() {\n pause = true;\n }",
"public void deleteTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n myTodo.getTodo().remove(task.getHashKey());\r\n playSound(\"click.wav\");\r\n }\r\n todoListGui();\r\n }",
"@Override\n\t\tpublic boolean isCanceled() {\n\t\t\treturn false;\n\t\t}",
"private void doRemoveTask() {\n System.out.println(\n \"Select the task you would like to remove by entering the appropriate index number.\");\n int index = input.nextInt();\n todoList.removeTask(index);\n System.out.println(\"The selected task has been successfully removed.\");\n }",
"public void stop()\n\t{\n\t\trunning = false;\n\t}",
"public synchronized void stop(){\n\t\tif (tickHandle != null){\n\t\t\ttickHandle.cancel(false);\n\t\t\ttickHandle = null;\n\t\t}\n\t}"
] | [
"0.77014697",
"0.7047064",
"0.6810064",
"0.68091977",
"0.6670438",
"0.64990056",
"0.6460903",
"0.62465364",
"0.6239907",
"0.62169915",
"0.61857265",
"0.6181793",
"0.61694854",
"0.6105565",
"0.6065903",
"0.5989621",
"0.59438396",
"0.59438396",
"0.5940969",
"0.5906966",
"0.58981377",
"0.5837085",
"0.58190864",
"0.5817153",
"0.580897",
"0.57708603",
"0.576127",
"0.57592523",
"0.57576007",
"0.5748936",
"0.5725311",
"0.572389",
"0.56881523",
"0.56672716",
"0.56612015",
"0.5655236",
"0.56481403",
"0.5643237",
"0.56378335",
"0.56134117",
"0.56010914",
"0.5594204",
"0.5576262",
"0.5575016",
"0.5565038",
"0.55513144",
"0.554856",
"0.55388135",
"0.55388135",
"0.55388135",
"0.55388135",
"0.55388135",
"0.55388135",
"0.55257684",
"0.5520868",
"0.5518392",
"0.55089873",
"0.55002016",
"0.54936194",
"0.54936194",
"0.54936194",
"0.54936194",
"0.54936194",
"0.54850256",
"0.5477958",
"0.5474077",
"0.5467913",
"0.54526603",
"0.54494697",
"0.54471225",
"0.54456365",
"0.5435247",
"0.54189765",
"0.5409819",
"0.54047877",
"0.54047185",
"0.53975385",
"0.53957915",
"0.5395687",
"0.5386738",
"0.53846353",
"0.5381837",
"0.5378772",
"0.5376738",
"0.5376361",
"0.5369932",
"0.53634393",
"0.5356674",
"0.5355697",
"0.53541744",
"0.5353968",
"0.53529954",
"0.53456634",
"0.5343733",
"0.5343356",
"0.53427744",
"0.5341593",
"0.53415734",
"0.5338653",
"0.53290117"
] | 0.7055079 | 1 |
An event fired whenever movement controller has finished the task. | private void onMovementComplete() {
Callable<Boolean> movementCompleted;
Consumer<Method> movementFailed;
synchronized (_mutex) {
movementCompleted = _movementCompleted;
movementFailed = _movementFailed;
_movementCompleted = null;
_movementFailed = null;
}
boolean bMovementCompleted = false;
if (movementCompleted != null) {
try {
bMovementCompleted = movementCompleted.call();
} catch (Exception e) {
_log.error("An error occurred while completing a movement.", e);
}
}
if (!bMovementCompleted && movementFailed != null) {
movementFailed.accept(null);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onMoveGestureEnded()\n\t{\n\t\tfireEvent(TiC.EVENT_MOVE_END, null);\n\t}",
"public void notifyMoveAnimationFinished();",
"@Override\n\tpublic void onMoveCompleted(MoveEvent arg0) {\n\t\t\n\t}",
"public void taskFinished(BuildEvent event) {\n }",
"@Override\n\tprotected void done()\n\t{\n\t\tgetController().done();\n\t}",
"@Override\n\tpublic void eventFinished() {\n\t\tstatus=EventCompleted;\n\t}",
"void doneMoving();",
"private void handleAutomatonEnded() {\n Platform.runLater(() -> {\n canvas.scheduleUpdate();\n goEndState();\n alertAutomatonEnded();\n });\n }",
"@Override\r\n public void tasksFinished()\r\n {\n }",
"@Override\n public boolean isFinished() {\n return controller.atSetpoint();\n }",
"@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}",
"public void completeTask() {\n completed = true;\n }",
"public void finished() {\r\n\t\t// Mark ourselves as finished.\r\n\t\tif (finished) { return; }\r\n\t\tfinished = true;\r\n\t\tif (ic != null) {\r\n\t\t\tjvr.removeEventListener(ic);\r\n\t\t\ttry {\r\n\t\t\t\tdx.stopch(dxdev,dx.EV_ASYNC);\r\n\t\t\t}\r\n\t\t\tcatch (JVRException e) { logger.throwing(getClass().getName(),\"finished\",e); }\r\n\t\t}\r\n\t\t// Notify any \"waiters\" that we are done.\r\n\t\tsynchronized (this) { notifyAll(); }\r\n\t\t// Fire an event for asynchronous JVR event listeners.\r\n\t\tnew JVREvent(this,\"finished\").fire();\r\n\t\t// For debugging only.\r\n\t\t// logger.info(\"(FINISHED)\\n\" + this);\r\n\t}",
"@Override\n\tpublic void handleDone(Player player, Task task, Game game) {\n\t\t\n\t}",
"public void finish() {\n/* 187 */ this.mTouchEventSubject.onComplete();\n/* */ }",
"@Override\n\tpublic void moveExecFinished(ReadOnlyBoard board, Counter player,\n\t\t\tCounter nextPlayer) {\n\n\t}",
"public void finishTask() {\n\t\t\n\t}",
"public void taskComplete() {\n mTasksLeft--;\n if ((mTasksLeft==0) & mHasCloRequest){\n onAllTasksCompleted();\n }\n }",
"public void onFinished();",
"@Override\n protected void succeeded() {\n eventService.publish(new TaskEndedEvent(this));\n\n }",
"protected void end() {\n \tif (waitForMovement) Robot.intake.setHopperTracker(deploy ? Status.deployed : Status.stowed);\n }",
"void TaskFinished(Task task) {\n\n repository.finishTask(task);\n }",
"@Override\r\n public void run() {\r\n move();\r\n }",
"protected void end() {\n \tRobot.telemetry.setAutonomousStatus(\"Finishing \" + commandName + \": \" + distance);\n Robot.driveDistancePID.disable();\n \tRobot.drivetrain.arcadeDrive(0.0, 0.0);\n }",
"public void finish() {\n\t\tPositionVo v = new PositionVo(1d, 0d, 0d, 0d, 0d, 0d, 0d);\n\t\tmanager.canvas.setJoneDoe(v, new Point(0, 0), Direction.NONE);\n\t\tstopTimer();\n\t\tfree();\n\t\tmanager.iWait();\n\t}",
"@Override\n public void run() {\n updateMovement();\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(route.size()==0)\n\t\t\t\t{\n\t\t\t\t\tifMoveEnd=true;\n\t\t\t\t\ttimer.cancel();\n\t\t\t\t}else {\n\t\t\t\t\tsetRoleCoordinate(route.get(0),false);\n\t\t\t\t\troute.remove(0);\n\t\t\t\t}\n\t\t\t\n\t\t\t}",
"@Override\n\t\tpublic void onComplete() {\n\t\t\tSystem.out.println(\"onComplete\");\n\t\t}",
"public void onComplete() {\r\n\r\n }",
"private void updateMovement() {\n if (_movementTask == null) {\n return;\n }\n\n if (getOwner().isDead() || _followTarget != null && _followTarget.isDead()) {\n cancelMoveTask2(true);\n return;\n }\n\n // Movement is invalid! Queue a new movement and wait again!\n if (_destinationLocation == null)\n {\n if (_waypoints.peek() != null) {\n _destinationLocation = _waypoints.poll();\n\n if (getOwner().getLocation().getGameSector() != null && getOwner().getLocation().getGameSector().hasActiveNeighbours()) {\n double validatedZ = GeoService.getInstance().validateZ(_destinationLocation.getX(), _destinationLocation.getY(), _destinationLocation.getZ());\n if (validatedZ == Double.MIN_VALUE) {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n\n if (_destinationLocation != null) {\n _destinationLocation.setZ(validatedZ);\n }\n else {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n _isSectorActive = true;\n }\n else {\n _isSectorActive = false;\n }\n notifySector(true);\n }\n else\n {\n _movementTick = System.currentTimeMillis();\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n }\n\n if (_destinationLocation != null) {\n // Update current character movement, the location.\n float deltaTime = (System.currentTimeMillis() - _movementTick) / 1000.0f;\n float movementSpeed = getOwner().getActionStorage().getMoveSpeed();\n if (getOwner().getActionStorage().getAction().getActionChartActionT().getApplySpeedBuffType().isMove()) {\n movementSpeed *= (getOwner().getGameStats().getMoveSpeedRate().getMoveSpeedRate() + 1_000_000.0f) / 1_000_000.0f;\n }\n\n Location ownerLocation = getOwner().getLocation();\n\n double movementDirectionX = _destinationLocation.getX() - ownerLocation.getX();\n double movementDirectionY = _destinationLocation.getY() - ownerLocation.getY();\n double movementDirectionZ = _destinationLocation.getZ() - ownerLocation.getZ();\n\n double directionLength = Math.sqrt(Math.pow(movementDirectionX, 2) + Math.pow(movementDirectionY, 2) + Math.pow(movementDirectionZ, 2));\n movementDirectionX /= directionLength;\n movementDirectionY /= directionLength;\n movementDirectionZ /= directionLength;\n\n ownerLocation.setXYZ(\n ownerLocation.getX() + movementDirectionX * movementSpeed * deltaTime,\n ownerLocation.getY() + movementDirectionY * movementSpeed * deltaTime,\n ownerLocation.getZ() + movementDirectionZ * movementSpeed * deltaTime\n );\n\n if (_isSectorActive && !_navigationType.isAir()) {\n double validatedZ = GeoService.getInstance().validateZ(ownerLocation.getX(), ownerLocation.getY(), ownerLocation.getZ());\n if (validatedZ == Double.MIN_VALUE) {\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n return;\n }\n\n ownerLocation.setZ(validatedZ);\n }\n\n if (ownerLocation.isValid() && World.getInstance().getWorldMap().updateLocation(getOwner(), ownerLocation.getX(), ownerLocation.getY())) {\n double distanceToPoint = MathUtils.getDistance(ownerLocation, _destinationLocation) - getOwner().getTemplate().getBodySize();\n notifyVehicleMovement();\n\n if (_followTarget != null) {\n distanceToPoint -= _followTarget.getTemplate().getBodySize();\n\n if (!MathUtils.isInRange(_destinationLocation, _followTarget.getLocation(), 150)) {\n _destinationLocation.setLocation(_followTarget.getLocation());\n notifySector(true);\n } else { // No more waypoint's available. Send movement stop and events.\n if (distanceToPoint < 75 || distanceToPoint < getOwner().getTemplate().getAttackRange() && getOwner().getAi().getBehavior().isChase()) {\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(false);\n onMovementComplete();\n }\n }\n } else {\n // Check if we are near another destination, then we will\n // switch to another waypoint instead to continue our journey.\n Location nextWaypoint = _waypoints.peek();\n if (nextWaypoint != null) {\n if (distanceToPoint < 100) {\n _destinationLocation = null;\n }\n } else { // No more waypoint's available. Send movement stop and events.\n if (distanceToPoint < 75 || distanceToPoint < getOwner().getTemplate().getAttackRange() && getOwner().getAi().getBehavior().isChase()) {\n getOwner().getAi().setFindPathCompleted(true);\n cancelMoveTask2(false);\n onMovementComplete();\n }\n }\n }\n } else {\n getOwner().getAi().setFindPathCompleted(false);\n cancelMoveTask2(true);\n onMovementComplete();\n }\n }\n _movementTick = System.currentTimeMillis();\n }",
"public void notifyFinish() {\n setBackground(getResources().getDrawable(R.drawable.fs_gesture_finish_bg, (Resources.Theme) null));\n this.mTitleView.setVisibility(4);\n this.mSummaryView.setTranslationY(this.mSummaryView.getTranslationX() - 15.0f);\n this.mSummaryView.setText(R.string.fs_gesture_finish);\n this.mSkipView.setVisibility(8);\n }",
"protected boolean isFinished() {\n //return controller.onTarget();\n return true;\n }",
"@Override\n\tpublic void excute() {\n\t\tmoveEvent.move(commandinfo.getValue() * 200);\n\t}",
"public void onMissionEnd() {\n\n }",
"@Override\n\tpublic void onEvent() {\n\t\tSystem.out.println(\"Performing callback after synchronous task!\");\n\t}",
"@Override\n public void finish() {\n ((MotorController)master).stopMotor();\n }",
"public void handleFinish()\n {\n }",
"public abstract void finished();",
"public void finished();",
"@Override\r\n protected boolean isFinished() {\r\n \t// we're done when distance pid is done\r\n boolean distFin = mDistController.isFinished() ;\r\n if (distFin) {\r\n Robot.drivetrain.tankDrive(0, 0);\r\n mDistController.stop();\r\n mBearingController.stop();\r\n }\r\n return distFin ; \r\n }",
"@Override\n public void notifyEndMove() {\n try {\n if (getClientInterface() != null)\n getClientInterface().notifyEndMove();\n }\n catch (RemoteException e) {\n System.out.println(\"remote sending end move error\");\n }\n }",
"protected void execute() {\n \tRobot.driveTrain.arcadeNoConstants(MOVE_SPEED_PERCENT, Robot.driveTrain.gyroPReturn(direction));\n }",
"void animationFinished();",
"@Override\n\t\tpublic void onFinish() {\n\t\t\tfinalizar();\n\t\t}",
"void Finished(Task task, Action<TResult> lastFinishedAction);",
"@Override\n\tpublic void onSimulationComplete()\n\t{\n\t}",
"@Override\n protected void execute() {\n m_currentTime = Timer.getFPGATimestamp();\n// used for more precise calculations\n m_currentError = m_desiredDistance - Robot.m_drive.Position();\n// ^^ tells how much further the Robot goes\n m_derivative = (m_currentError - m_oldError) / (m_currentTime - m_oldTime);\n// ^^ PID formula stuff. The change of error / change of time to be more precise\n m_output = m_currentError * constants.kP + constants.kD * m_derivative;\n// tells how much power the motor will change\n Robot.m_drive.SetPower(m_output);\n// changes motor power\n\n m_oldError = m_currentError;\n// how error distance updates so it won't repeat old mistake\n m_oldTime = m_currentTime;\n// same as line above\n }",
"public void targetFinished(BuildEvent event) {\n }",
"protected void execute() {\n \tshooterWheel.shooterWheelSpeedControllerAft.Pause();\n \tshooterWheel.shooterWheelSpeedControllerFwd.Pause();\n \t\n }",
"public void complete() {\n\t}",
"protected void end() {\n\t\t// we are ending the, stop moving the robot\n\t\tRobot.driveSubsystem.arcadeDrive(0, 0);\n\t}",
"boolean isMoveFinished(int tick);",
"public void msgAnimationDone() {\n\t\t//print(\"done Animating!!!!!\");\n\t\tguiControl.release();\n\t\t\n\t}",
"private void HandleOnMoveEnd(Board board, Piece turn, boolean success){\n\t}",
"void endTask();",
"@Override\n\tdefault void onExecution(Player player, Position start, Position end) {\n\n\t\tForceMovement forceMovement = new ForceMovement(player.getPosition(),\n\t\t\t\tnew Position(player.getX(), player.getY() - 3, player.getHeight()), 12, 2, Direction.SOUTH);\n\t\tWorld.schedule(new ForceMovementTask(player, 0, forceMovement, new Animation(5043)) {\n\t\t\t@Override\n\t\t\tprotected void onCancel(boolean logout) {\n\t\t\t\tsuper.onCancel(logout);\n\t\t\t\tWorld.schedule(new Task(1) {\n\t\t\t\t\tint ticks = 0;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void execute() {\n\t\t\t\t\t\tswitch (ticks++) {\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tplayer.move(new Position(player.getX(), player.getY(), player.getHeight() + 1));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\tplayer.move(end);\n\t\t\t\t\t\t\tcancel();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}",
"public void onFinish() {\n\n Log.i(\"Done!\", \"Coundown Timer Finished\");\n\n }",
"@Override\n public void onComplete() {\n System.out.println (\"Suree onComplete\" );\n }",
"protected void end() {\n\t\tRobot.elevator.setCurrentPosition(newPosition);\n\t}",
"void onComplete();",
"public void handleSimStatusCompleted() {\n }",
"protected void execute() {\n finished = true;\n }",
"public void simulationFinished() {\n\t\t// Stop sending regular repaint messages\n\t\tautoUpdater.stop();\n\t\t// Ensure display is up-to-date\n\t\trepaint();\n\t\t// Start following the mouse again\n\t\taddMouseListener(mouseFollower);\n\t}",
"@Override\n public void onComplete(long dt) {\n }",
"public interface OnActionFinishedListener<TResult> {\n /* will be called for each Action (which in a Task action chain by continuation) finished its execution\n */\n void Finished(Task task, Action<TResult> lastFinishedAction);\n}",
"@Override\r\n public void run() {\r\n if (event.getEventType().equals(DrivingEventType.OVERSPEED)) {\r\n overspeedStartTimestamp = System.currentTimeMillis();\r\n LocationController.addListenerToContainer(this);\r\n } else {\r\n AccelerometerValuesController.addListenerToContainer(this);\r\n }\r\n }",
"@Override\n\t\tpublic void onTaskComplete(Vehicle vh) {\n\t\t\tVehicleActivity.this.onTaskCompleteDelete(vh);\n\t\t}",
"@Override\r\n protected void execute() {\r\n // get deltaT in seconds for the controller\r\n double now = System.currentTimeMillis();\r\n double elapsed = (now - mPreviousTime) / 1000.0 ; \r\n mPreviousTime = now; \r\n \r\n // get inputs to the two PIDs\r\n double dist = Robot.visionSubSys.getDistFt() ;\r\n double bearing = Robot.visionSubSys.getBearingDegCW() ;\r\n double orient = Robot.drivetrain.getOrientDegCCW() ; \r\n \r\n // update and get control output from the two PIDs\r\n double distControl = mDistController.update(dist, bearing, elapsed) ;\r\n double bearingControl = mBearingController.update(dist, bearing, orient, elapsed);\r\n // combine them\r\n double left = (distControl+bearingControl) ; // / 2.0 ;\r\n double right = (distControl-bearingControl) ; // / 2.0 ;\r\n \r\n // command the drivetrain\r\n Robot.drivetrain.tankDrive(left, right);\r\n }",
"public void CompleteTask() {\n\t\tCompletionDate = new Date();\n\t}",
"@Override\n public void onFinished() {\n\n }",
"void onTaskComplete(T result);",
"@Override\n\tpublic void videoComplete() {\n\t\t\n\t}",
"public void finalizeMove() {\n return;\n }",
"public void endMove()\n\t{\n\t\tBMTron.delayed += 50;\n\t\tif (delayed == 2000)\n\t\t{\n\t\t\tfor (int i = 0; i < 5; i++) \n\t\t\t{\n\t\t\t\tif (players[i].exist)\n\t\t\t\t{\n\t\t\t\t\tmove[i].interrupt();\n\t\t\t\t}\n\t\t\t}\n\t\t\trepaint.interrupt();\n\t\t\tBMTron.frame.setVisible(false);\n\t\t\tSelection.frame.setVisible(true);\n\t\t\tdelayed = 0;\n\t\t}\n\t}",
"public void onFinish() {\n\n\t}",
"@Override\n \tpublic void finished()\n \t{\n \t}",
"public void onFinish() {\n }",
"@Override\n public void onSequenceFinish() {\n // Yay\n mShowingTour = false;\n mPresenter.showCaseFinished();\n }",
"public abstract void onFinish();",
"@Override\n public void onFinished() {\n\n }",
"public void completeTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n myTodo.getTodo().get(task.getHashKey()).setComplete(true);\r\n showCompleted = true;\r\n playSound(\"c1.wav\");\r\n }\r\n todoListGui();\r\n }",
"public void timestepCompleted(Simulation simulation) {\n }",
"@Override\n\t\t\t\t\tpublic void onComplete() {\n\t\t\t\t\t}",
"protected boolean isFinished() {\n\t\treturn Robot.elevator.isInPosition(newPosition, direction);\n\t}",
"protected boolean isFinished() {\n \tif (moving) return Robot.armPiston.getMajor() != PistonPositions.Moving; /* && Robot.armPiston.getMinor() != PistonPositions.Moving; */\n \treturn true;\n }",
"@Override\n\tpublic void completed() {\n\t\tSystem.out.println(\"Message Completed: \" + toString());\n\t\tscheduler.putResourceIdle();\n\t\ttry {\n\t\t\tscheduler.applyScheduling();\n\t\t} catch (Exception e) {\n\t\t\t// this should be logged or on a GUI show a dialog of the error\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\r\n\tpublic void moveSuccessfullyExecuted(Move move) {\n\t\tSystem.out.println(\"executed: \"+move);\r\n\t}",
"public void onFinish() {\n }",
"@Override\n public void onFinished() {\n }",
"@Override\n public void onFinished() {\n }",
"public abstract void notifyMoveResult(boolean hasMoved);",
"public interface TaskListener {\n void onFinished(boolean result);\n }",
"@Override\n public void run()\n {\n //Log.d(TAG ,\"==========>Task Run In!\");\n updateDroneLocation();\n }",
"@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}",
"void onNewTaskComplete(String name, String notes, int position);",
"@Override\n public void onSequenceFinish() {\n // Yay\n }",
"protected void end() {\n\t\tRobot.drivetrain.tankDrive(0, 0);\n\t}",
"void onAnimationEnd();",
"public void finish() {\n\t\ttask.run();\n\t\ttask.cancel();\n\t}"
] | [
"0.6688537",
"0.6556762",
"0.6491812",
"0.62030685",
"0.6135386",
"0.6100619",
"0.6023432",
"0.5983751",
"0.59458697",
"0.5945389",
"0.5901922",
"0.58683884",
"0.58616817",
"0.5852403",
"0.58259064",
"0.5788937",
"0.57792413",
"0.57681876",
"0.57501847",
"0.57430756",
"0.5716276",
"0.5711442",
"0.5706039",
"0.5703222",
"0.5700686",
"0.56872344",
"0.5686524",
"0.56837577",
"0.5677463",
"0.5671917",
"0.56598556",
"0.5654899",
"0.5640778",
"0.56338286",
"0.56108135",
"0.56021726",
"0.55938244",
"0.5588212",
"0.5586313",
"0.5585329",
"0.5581934",
"0.55623686",
"0.55417144",
"0.55407184",
"0.55372196",
"0.55352366",
"0.5534079",
"0.55339015",
"0.55330044",
"0.552256",
"0.5513571",
"0.55027187",
"0.55010486",
"0.5499527",
"0.54911685",
"0.5480834",
"0.5478999",
"0.54641926",
"0.54626834",
"0.5460194",
"0.5459808",
"0.5455203",
"0.54549116",
"0.5451987",
"0.5445212",
"0.54444116",
"0.54417306",
"0.54355675",
"0.54289705",
"0.5424958",
"0.541776",
"0.54059803",
"0.5401438",
"0.53975135",
"0.5393076",
"0.53890514",
"0.538618",
"0.53860575",
"0.5384028",
"0.53813714",
"0.5364399",
"0.5362615",
"0.5350726",
"0.5348304",
"0.53479105",
"0.5345207",
"0.53344977",
"0.53340924",
"0.5330967",
"0.5330967",
"0.5328853",
"0.5327439",
"0.53263503",
"0.53255945",
"0.53255945",
"0.5321212",
"0.53206646",
"0.5319328",
"0.53151596",
"0.5314502"
] | 0.7269688 | 0 |
Override the paint() method | @Override
public void paint(Graphics g) {
plotSampleData((Graphics2D) g);
plotClusters((Graphics2D) g);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\r\n\t\t}",
"@Override\n public void paint(Graphics g) {\n }",
"@Override\r\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t\r\n\t\r\n\t}",
"@Override\n public void paintComponent(Graphics g) \n {\n super.paintComponent(g);\n doDrawing(g);\n }",
"public void draw() {\n\t\tsuper.repaint();\n\t}",
"@Override\r\n\tpublic void paint(float deltaTime) {\n\t\t\r\n\t}",
"public void draw(){\n super.repaint();\n }",
"protected abstract void paint(Painter painter);",
"public void paint (Graphics g){\n \r\n }",
"@Override\n protected void paint2d(Graphics2D g) {\n \n }",
"@Override\r\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\r\n\t\trender(g);\r\n\t}",
"@Override\r\n\tpublic void paint(Graphics g, JComponent c) {\n\t\tsuper.paint(g, c);\r\n\t}",
"public void paint(Graphics g) {\n super.paint(g);\n\n }",
"public abstract void paint(Graphics g);",
"public void paint (Graphics g)\r\n {\n }",
"@Override\n public void paint(Graphics g) {\n g2 = (Graphics2D) g;\n drawBackground();\n drawSquares();\n drawLines();\n gui.hint = new TreeSet<>();\n }",
"@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n paintBackground(g);\n }",
"@Override\n public void onPaint(Graphics2D g) {\n\n }",
"public void paint(Graphics g) {\n }",
"public void paint(Graphics g) {\n }",
"@Override\r\n public void repaint() {\r\n }",
"@Override\r\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\r\n\t\tsetRedBorder(decoratedShape);\r\n\t}",
"public void paint(Graphics g){\n\t\t\n\t}",
"@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n render(g);\n }",
"public void paint(Graphics g) {\n\t\t\n\t}",
"protected void paintComponent(Graphics g)\n\t{\n\t}",
"@Override\r\n\tpublic void repaint() {\n\t\tsuper.repaint();\r\n\t}",
"@Override\r\n\tpublic void repaint() {\n\t\tsuper.repaint();\r\n\t}",
"public abstract void paint(Graphics2D g);",
"public abstract void paint(Graphics g, int width, int height);",
"@Override //paint component is overridden to allow super.paintCompnent to be called\r\n public void paintComponent(Graphics g) {\n \tsuper.paintComponent(g); //The super.paintComponent() method calls the method of the parent class, prepare a component for drawing\r\n doDrawing(g); //The drawing is delegated inside the doDrawing() method\r\n }",
"@Override\r\n public void draw() {\n }",
"@Override\n\tpublic void repaint() {\n\t\tsuper.repaint();\n\t}",
"void paintComponent();",
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}",
"public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}",
"public void paint(Graphics g){\n g.setColor(Color.LIGHT_GRAY);\n g.drawRoundRect(0, 0, getWidth()-1, getHeight()-1, 20, 20);\n try{\n super.paint(g);}\n catch(Exception e){\n ij.IJ.showMessage(\"Paint Error\");\n }\n }",
"@Override public void draw(){\n // this take care of applying all styles (colors/stroke)\n super.draw();\n // draw our shape\n pg.ellipseMode(PGraphics.CORNER); // TODO: make configurable\n pg.ellipse(0,0,getSize().x,getSize().y);\n }",
"@Override\n public void draw()\n {\n }",
"@Override\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\n\t}",
"@Override\r\n\tpublic void paintComponent(Graphics g)\r\n {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(getForeground());\r\n\t\tg.fillOval(0,0, this.getWidth(),this.getHeight());\r\n }",
"@Override\n\tpublic void setPaint() {\n\t\tisPaint = true;\n\t}",
"public void paint (Graphics g) {\n super.paint(g);\n // g.setColor(Color.BLUE);\n // g.drawRect(0, 0, 100, 100);\n }",
"public void paintComponent(Graphics g);",
"public abstract void selfPaint(Graphics g);",
"public void paint(Graphics g) {\n\n \t\n \tsuper.paint(g);\n \n \tg.drawRect(0, 0, \n \t\t getSize().width - 1,\n \t\t getSize().height - 1); \t\n \t\n\n }",
"public abstract void paint(Graphics2D g2d);",
"@Override\r\n \tpublic void paintComponent(Graphics g) {\r\n \t\tsuper.paintComponent(g);\r\n \t\tdrawSnake(g);\r\n \t}",
"public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n draw(g);\n }",
"public void paintControl(PaintEvent event) {\n\t\t\t}",
"@Override\n public void draw() {\n }",
"public void paint() {\n paintStrategy.paintImmediately();\n }",
"public void paint(Graphics g) {\n super.paint(g);\n update(g);\n }",
"DrawShape(){\r\n super();\r\n setBackground(Color.WHITE);\r\n addMouseListener(this);\r\n }",
"public void paintComponent(Graphics g)\r\n\t{\n\t}",
"protected abstract void paint(Graphics g, Object iDrawSurfaceID);",
"@Override\n\tpublic void draw(Graphics canvas) {}",
"public void paintComponent(Graphics myGraphic) \n\t{\n\t\tsuper.paintComponent(myGraphic);\t\n\t}",
"@Override\n\tpublic void draw() {\n\n\t}",
"@Override\n\tpublic void draw() {\n\n\t}",
"@Override\n public void update(Graphics g) {\n paint(g);\n }",
"@Override\n\tpublic void draw() {\n\t\t\n\t}",
"@Override\n\tpublic void draw() {\n\t\t\n\t}",
"@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t \n\t\t GradientPaint gp = new GradientPaint(0, 0,\n\t\t Const.BACKGROUND_COLOR.brighter(), 0, getHeight(),\n\t\t Color.BLUE);\n\t\t \n\t\t g2d.setPaint(gp);\n\t\t g2d.fillRect(0, 0, getWidth(), getHeight());\n\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t}",
"@Override\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\n\t\t\n\t\tsetBackground(Color.white); // Imposto il colore di sfondo\n\t\tsetForeground(Color.black); // Imposto il colore dell'etichetta\n\t}",
"@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}",
"@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}",
"@Override\n\tpublic void draw() {\n\t}",
"@Override\n public void paintComponent(Graphics g) {\n g.setColor(Color.WHITE);\n g.fillRect(0,0,super.getWidth(),super.getHeight());\n\n for (DrawableVector instruction : instructions){\n instruction.draw(g, getWidth(), getHeight());\n }\n if (currentInstruction != null){\n currentInstruction.draw(g, getWidth(), getHeight());\n }\n }",
"public void paint(Graphics g) {\n\tupdate(g);\n }",
"void paintComponent(Graphics g);",
"protected abstract void draw();",
"@Override\r\n\tprotected void onDraw() {\n\t\t\r\n\t}",
"@Override\n\tprotected void draw() {\n\t\tif(p != null) {\n\t\t\tp.pushStyle();\n\t\t\tp.noStroke();\n\t\t\tp.textAlign(PApplet.CENTER,PApplet.CENTER);\n\t\t\tp.textSize(12);\n\t\t\tif(this.isPressed) {\n\t\t\t\tp.fill(122, 138, 153);\n\t\t\t\tp.rect(x,y,width,height);\n\t\t\t\tp.fill(181, 206, 228);\n\t\t\t\tp.rect(x+2,y+2,width-4,height-4);\n\t\t\t\tp.fill(Color.BLACK.getRGB());\n\t\t\t\tp.text(text, x, y,width,height);\n\t\t\t}else {\n\t\t\t\tif(this.isHovered) {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+2,y+2,width-5,height-5,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}else {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+1,y+1,width-3,height-3,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.popStyle();\n\t\t}\n\t}",
"@Override \n\tpublic void update(Graphics g) \n\t{\n\t\tpaint(g); \n\t}",
"@Override\r\n protected void paintComponent(Graphics g) {\r\n\r\n Graphics2D g2d = (Graphics2D) g;\r\n\r\n g2d.setColor(new Color(52, 73, 94));\r\n g2d.fillRect(0, 0, getWidth(), getHeight());\r\n }",
"@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tGraphics2D g2 = (Graphics2D) g; \n\t\tg2.setColor(Color.lightGray);\n\t\tg2.fill(model.bg);\n\t\tg2.setColor(Color.darkGray);\n\t\tg2.fillPolygon(model.terrain);\n\t\tg2.setColor(Color.gray);\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tg2.draw(model.circles.get(i));\n\t\t}\n\t\tif (model.curCircleSel != -1) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.circles.get(model.curCircleSel));\n\t\t}\n\t\tg2.setColor(Color.RED);\n\t\tg2.fill(model.pad);\n\t\tif (curPadSel) {\n\t\t\tg2.setColor(Color.white);\n\t\t\tg2.setStroke(new BasicStroke(3));\n\t\t\tg2.draw(model.pad);\n\t\t}\n\t}",
"@Override\r\n public void draw()\r\n {\n\r\n }",
"@Override\n protected void paintInternal(IGraphicsTarget target,\n PaintProperties paintProps) throws VizException {\n }",
"public void repaint() {\n setBackground(Color.white);\n super.repaint();\n setVisible(true);\n\n }",
"@Override\n public void paint(Graphics g) {\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n warehouseView.paint(g2);\n if (clickedObject == null)\n infoPanel.paint(g2);\n else if (clickedObject instanceof Transporter)\n infoPanel.paint(g2, (Transporter) clickedObject);\n else if (clickedObject instanceof Shelf)\n infoPanel.paint(g2, (Shelf) clickedObject);\n }",
"public void paintComponent(Graphics arg0) {\n\t\tsuper.paintComponent(arg0);\n\t\targ0.setColor(Color.BLACK); \n\t\tboard(arg0); \n\t\tdrawStone(arg0);\n\t}",
"@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制圆形\");\n\t}",
"public void paintControl(PaintEvent e) {\n\t\t\t\te.gc.setAntialias(SWT.ON);\n\t\t\t\te.gc.setForeground(((Text) e.widget).getForeground());\n\t\t\t\tif (editable)\n\t\t\t\t\te.gc.drawRoundRectangle(e.x, e.y, e.width - 1, e.height - 1, 6, 6);\n\t\t\t}",
"@Override\n public boolean shouldPaint() {\n return false;\n }",
"@Override\r\n\tpublic void paint(Graphics g) {\r\n\t\tif (isShowing() && g != null) {\r\n\t\t\tpaintNonGraphArea(g);\r\n\t\t\tpaintGraphArea(g);\r\n\t\t}\r\n\t}",
"@Override\n public void paint(Graphics g) {\n g.drawImage(imgFond.getImage(), 0, 0, getWidth(), getHeight(),this);\n setOpaque(false);\n super.paint(g);\n }",
"public void paint (Graphics g) {\n updateReport();\n super.paint(g);\n }",
"@Override\n public synchronized void paint(Graphics g) {\n if (!shouldPaint()) {\n return;\n }\n\n if (g instanceof Graphics2D) {\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHints(argoRenderingHints);\n\t double scale = getScale();\n g2.scale(scale, scale);\n }\n getLayerManager().paint(g);\n //getLayerManager().getActiveLayer().paint(g);\n if (_canSelectElements) {\n _selectionManager.paint(g);\n _modeManager.paint(g);\n }\n }",
"@Override\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\n\t\tcheckLoadMore();\n\t}",
"@Override\n public void paint(Graphics g) {\n super.paint(g);\n\n // update the text area lenght\n updateTextAreaLenght();\n\n // update tha number of bars\n updateBars();\n \n // draw internal borders\n drawBorders(g);\n\n // draw the text area\n drawTextArea(g);\n\n // draw the content area\n drawContentArea(g);\n\n // draw bars\n drawBars(g);\n\n }",
"@Override\n\tpublic void draw(Graphics g, JPanel panel) {\n\t\t\n\t}",
"@Override\n\t\tpublic void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {\n\t\t\tsuper.paintBorder(c, g, x, y, width + 1, height);\n\t\t}",
"private void paint(){\n ;\n }",
"@Override\r\n\tpublic void paintComponent(Graphics g)\r\n\t{\r\n\t\tif(_StartFinish)\r\n\t\t\tsetBackground(Color.WHITE);\r\n\t\telse\r\n\t\t\tsetBackground(Color.DARK_GRAY);\r\n\t\t\r\n\t\tsuper.paintComponent(g);\r\n\t}",
"public void paint (Graphics g) {\n updateReport();\n super.paint(g);\n }",
"protected void paint(Graphics g) {\n mymidlet.paint(g);\n }",
"@Override\n\tpublic void redraw() {\n\t\t\n\t}",
"@Override\n\tpublic void paint(Graphics2D g) {\n\t\tg.setColor(Color.WHITE);\n\t\tg.drawOval(this.x,this.y, width,height);\n\t\tg.fillOval(this.x,this.y, width,height);\n\t}"
] | [
"0.7996027",
"0.78912514",
"0.7787825",
"0.76258636",
"0.7601909",
"0.75625473",
"0.7547896",
"0.749573",
"0.7492491",
"0.7473082",
"0.74621457",
"0.74507713",
"0.7441813",
"0.7441522",
"0.73847806",
"0.72576725",
"0.7250057",
"0.72494197",
"0.7241189",
"0.7241189",
"0.72254425",
"0.722058",
"0.72070134",
"0.7186289",
"0.71826094",
"0.7157464",
"0.7133954",
"0.7133954",
"0.7113131",
"0.7110073",
"0.71017087",
"0.7095697",
"0.7090771",
"0.7077562",
"0.7070098",
"0.7070098",
"0.7058463",
"0.7058463",
"0.70574963",
"0.70519054",
"0.70394564",
"0.70369637",
"0.70261",
"0.70234406",
"0.700756",
"0.69992065",
"0.69991356",
"0.6981313",
"0.69808567",
"0.69799554",
"0.6968805",
"0.69672287",
"0.6943676",
"0.6942253",
"0.6931701",
"0.6923366",
"0.6921434",
"0.6913717",
"0.69049877",
"0.6904166",
"0.69023985",
"0.69023985",
"0.6887385",
"0.68716145",
"0.68716145",
"0.68662393",
"0.6865864",
"0.6862969",
"0.6862969",
"0.6862019",
"0.6803768",
"0.68033874",
"0.6800234",
"0.679423",
"0.6772058",
"0.67669255",
"0.676363",
"0.6741861",
"0.67388463",
"0.6723917",
"0.6722329",
"0.6721717",
"0.670973",
"0.67030936",
"0.6700521",
"0.6685645",
"0.6685082",
"0.66705936",
"0.66636723",
"0.66618615",
"0.66590023",
"0.66554266",
"0.6648476",
"0.66439086",
"0.6641926",
"0.6641389",
"0.6640923",
"0.6634931",
"0.6630693",
"0.6618336",
"0.66175693"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.