query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Get whether the session is connected or not.
public boolean isConnected() { return connectionId != GatewayProcess.NO_CONNECTION_ID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isConnected() {\n return (this.session != null && this.session.isConnected());\n }", "public static boolean isConnected()\r\n\t{\r\n\t\t return Globals.connected ;\r\n\t}", "public boolean isConnected() {\n\t\treturn conn != null;\n\t}", "public boolean isConnected() {\n if (mState == STATE_CONNECTED) {\n return true;\n }\n return false;\n }", "public boolean isConnected() {\n if (client == null) {\n return false;\n }\n return client.isConnected();\n }", "public boolean isConnected() {\n\t\treturn sock != null;\n\t}", "@Override\n public boolean isConnected() {\n boolean result = false;\n synchronized (CONN_SYNC) {\n result = ((system != null) && system.isConnected());\n }\n return result;\n }", "public boolean isConnected() {\n return connectionSocket.isConnected();\n }", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected()\n {\n return isConnected;\n }", "public boolean isConnected() {\n\t\treturn this.isConnected;\n\t}", "public boolean isConnected(){\r\n\t\treturn connected;\r\n\t}", "public boolean isConnected() {\n return isConnected;\n }", "public final boolean isConnected() {\n\t\t// retornamos si existe una conexion\n\t\treturn this.getConnection() != null;\n\t}", "public boolean isConnected() {\n \t\treturn connected;\n \t}", "public boolean isConnected() {\n boolean status = false;\n try {\n status = connection != null && !connection.isClosed();\n } catch (SQLException ex) {\n LOGGER.log(Level.SEVERE, \"Unable to check connection status: {0}\", ex);\n }\n\n return status;\n }", "public boolean isConnected() {\n\t\treturn connected;\n\t}", "public boolean isConnected() {\n\t\treturn connected;\n\t}", "public boolean isConnected()\n {\n return connected;\n }", "protected boolean isConnected() {\n\t\tif (channel == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn channel.isOpen();\n\t\t}\n\t}", "public static boolean isConnected() {\n return (getCon() != null);\n }", "public boolean isConnected() {\r\n\treturn connected;\r\n }", "public static boolean isConnected() { return irc != null && irc.isConnected(); }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\r\n return connected;\r\n }", "public boolean isConnected() {\n return this.connected;\n }", "public boolean isConnected() {\n return this.connected;\n }", "public boolean isConnected(){\n return isConnected;\n }", "public boolean isConnected() {\n\t\tfinal String METHOD = \"isConnected\";\n\t\tboolean connected = false;\n\t\tif (mqttAsyncClient != null) {\n\t\t\tconnected = mqttAsyncClient.isConnected();\n\t\t} else if (mqttClient != null) {\n\t\t\tconnected = mqttClient.isConnected();\n\t\t}\n\t\tLoggerUtility.log(Level.FINEST, CLASS_NAME, METHOD, \"Connected(\" + connected + \")\");\n\t\treturn connected;\n\t}", "public boolean isConnected(){\n return connected;\n }", "public boolean isConnected() {\n return mConnectionSocket.isConnected() && !mConnectionSocket.isClosed();\n }", "public boolean isConnected() {\n PublishSubscriber<T> c = state.current;\n return c.connected && !c.done && !c.isDisposed();\n }", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "private boolean isConnected() {\n if (skylinkConnection != null) {\n return skylinkConnection.isConnected();\n }\n return false;\n }", "public boolean connectionActive() {\n\t\tif (socketConnection == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn socketConnection.isConnected();\n\t\t}\n\t}", "public static boolean hasConnected() {\n return sHasConnected;\n }", "public boolean isConnected() {\n\t\t\treturn (m_soundManager instanceof RemoteSoundManager);\n\t\t}", "public boolean getIsConnected() {\n return isConnected;\n }", "public boolean isConnected() {\n \tContext context = this.getApplicationContext();\n \t/** Create, if not exists, the preference GraviolaMOB. */\n SharedPreferences settings = context.getSharedPreferences(\"GraviolaMOB\", MODE_PRIVATE);\n /** Check the preference connectivity and return false if is not set. */\n return settings.getBoolean(\"connectivity\", false);\n }", "public boolean isConnected() {\r\n\t\treturn backend != null;\r\n\t}", "public boolean isConnected() {\n HiLog.info(LOG_LABEL, \"isConnected: %{public}b\", new Object[]{Boolean.valueOf(this.mIsConnected)});\n return this.mIsConnected;\n }", "public boolean isConnected() {\n\t\treturn isCreated() && mqttClient.isConnected();\n\t}", "private boolean isConnected() {\n\t\treturn (this.serverConnection!=null); \n }", "public boolean isConnected() {\n\t\tif (m == null) return false;\n\t\telse return true;\n\t}", "public boolean isConnected() {\n return metricDB.isConnected();\n }", "public static boolean isConnected() {\r\n\t\treturn dfl != null;\r\n\t}", "public boolean isConnected() {\n return mConnected;\n }", "public boolean isOnline()\n\t{\t\t\n\t\treturn chatConnection.isConnected();\n\t}", "public boolean isConnecting() {\n PublishSubscriber<T> c = state.current;\n return c.connecting && !c.connected && !c.done && !c.isDisposed();\n }", "public boolean isConnected() {\n\t\treturn juraMqttClient != null && juraMqttClient.isConnected();\n\t}", "public boolean isConnecting ()\r\n\t{\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\treturn _roboCOM!=null;\r\n\t\t}\r\n\t}", "private boolean isConnected() {\n if (mStarted && mClient != null && !mClient.isConnected()) {\n Log.e(LOG_TAG, \"MQTT Client not connected.\");\n if (DEBUG) {\n\tLog.e(LOG_TAG, \"isConnected[mStarted:\" + mStarted + \", mClient:\" + mClient + \"]\");\n }\n }\n\n return mClient != null && (mStarted && mClient.isConnected());\n }", "public boolean isConnected() {\n return dataChannel != null && dataChannel.isConnected();\n }", "public boolean isConnected() {\n return (this.bluetoothSocket != null);\n }", "public Boolean connected() {\n return this.connected;\n }", "@Override\n public boolean isConnected() {\n return connected;\n }", "@Override\n public boolean isConnected()\n {\n return connected;\n }", "private Boolean isConnected() {\r\n ConnectivityManager cm = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\r\n Boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting();\r\n return isConnected;\r\n }", "protected abstract boolean isConnected();", "public boolean isConnectedToRemoteDevice() {\n return mConnectionManager.isConnected();\n }", "public boolean isConnected() {\n ConnectivityManager manager = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo info = manager.getActiveNetworkInfo();\n if (info != null && info.isConnected()) {\n return true;\n } else {\n return false;\n }\n }", "private boolean isConnected() {\n try {\n return (conn != null) && conn.isValid(0);\n } catch (SQLException ex) {\n Logger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "boolean hasSession();", "public boolean isConnectionActive(){\n return this.connectionActive;\n }", "boolean isConnected() {\n \t\tif (fConnected == null)\n \t\t\treturn false;\n \t\treturn !fConnected.isEmpty();\n \t}", "public static boolean isConnected(Context ctx) {\n\t\tSharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\treturn preferences.getLong(PreferenceConstants.ACCOUNT_ID, 0L) != 0;\n\t}", "public boolean hasSession() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasSession() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean isConnectedToGame() {\n return this.isConnectedToGame;\n }", "synchronized public boolean getLoggedin()\n\t{\n\t\treturn userInfo.isSessionValid();\n\t}", "public boolean isConnected (HttpServletRequest request) {\n // Check if the HTTP session exists\n String consumerSession = getConsumerSession(request);\n if (consumerSession == null) {\n return false;\n }\n \n // Check if the HTTP session refers to a valid entry\n SecureEntry entry = secureMap.get(consumerSession);\n if (entry == null) {\n return false;\n }\n \n // Update the timer if the entry is not outdated\n if (entry.timestamp < Calendar.getInstance().getTimeInMillis() + sessionTimeOut) {\n entry.updateTimer();\n return true;\n } else {\n return false;\n }\n \n }", "public boolean isConnecting() {\n if (mState == STATE_CONNECTING) {\n return true;\n }\n return false;\n }", "private boolean checkConnection() {\n return isConnected = ConnectionReceiver.isConnected();\n }", "private boolean checkConnection() {\n return isConnected = ConnectionReceiver.isConnected();\n }", "boolean hasDisconnect();", "boolean isConnectionLost()\n\t{\n\t\tboolean lost = false;\n\n\t\tif (m_session != null && !m_session.isConnected())\n\t\t\tlost = true;\n\n\t\treturn lost;\n\t}", "@Override\n public boolean isOnline() {\n if(mSocket != null && mSocket.isConnected())\n return true;\n return false;\n }", "boolean hasAvailableConnection();", "public Boolean getConnected() { return this.connected; }", "@Override\r\n\tpublic boolean isConnected() {\n\t\treturn false;\r\n\t}", "public boolean CheckConnected() {\n return (tcp.Status() == TCP._CONNECTED);\n }", "private boolean isInSession()\n {\n return EngagementActivityManager.getInstance().getCurrentActivityAlias() != null;\n }", "protected final boolean isSessionOpen() {\n return sessionTracker.getOpenSession() != null;\n }", "protected boolean isConnected() {\n/* 160 */ return this.delegate.isConnected();\n/* */ }", "public static boolean isGpsconnected(){\n return gpsconnected;\n }" ]
[ "0.8677639", "0.78783596", "0.7872739", "0.78229725", "0.7822865", "0.78194904", "0.78093034", "0.7795745", "0.776317", "0.776317", "0.776317", "0.776317", "0.776317", "0.7761872", "0.7754449", "0.7739927", "0.77165574", "0.77075136", "0.7704421", "0.76973504", "0.7689004", "0.7689004", "0.76825845", "0.76717913", "0.7671656", "0.7664632", "0.7660105", "0.7649252", "0.7649252", "0.7649252", "0.7649252", "0.7649252", "0.7646528", "0.7629296", "0.7629296", "0.76270086", "0.76156145", "0.76042557", "0.7589181", "0.75817096", "0.7577931", "0.7577931", "0.7577931", "0.7577931", "0.7577931", "0.7577931", "0.7577931", "0.7577931", "0.75560105", "0.7546914", "0.75388736", "0.7521433", "0.75090516", "0.75060946", "0.74791276", "0.74605733", "0.7446165", "0.74149334", "0.7390929", "0.7358199", "0.73539716", "0.73511", "0.7310722", "0.72722006", "0.72451544", "0.7218174", "0.7216671", "0.72096926", "0.71932185", "0.71779245", "0.71612895", "0.7154057", "0.71412754", "0.71257985", "0.71063644", "0.70869184", "0.70842016", "0.7040676", "0.70215344", "0.70069593", "0.7003941", "0.6968439", "0.69346285", "0.6926534", "0.6916705", "0.6916489", "0.6914289", "0.6905122", "0.6905122", "0.6903797", "0.6898763", "0.6890039", "0.6889941", "0.68748116", "0.6827123", "0.6811772", "0.68105024", "0.6778395", "0.6750458", "0.673063" ]
0.76442015
33
Gets whether the session is slow or not. If the session is not currently connected then this method will return true.
public boolean isSlow() { return isSlow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isHighPerformanceNeeded() { return highPerformanceNeeded; }", "public boolean isNetworkSlow() {\n long nanoTime = System.nanoTime();\n if (nanoTime - this.mLastUpdateTime > 2000000000) {\n this.mIsNetworkSlow = ImageInitBusinss.getInstance() != null && ImageInitBusinss.getInstance().getStrategySupport().isNetworkSlow();\n this.mLastUpdateTime = nanoTime;\n }\n return this.mIsNetworkSlow;\n }", "public boolean isConnected() {\n return (this.session != null && this.session.isConnected());\n }", "public static boolean isConnectionMetered(Context context){\n ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n return manager != null && manager.isActiveNetworkMetered();\n }", "public static boolean isConnectedFast(Context context){\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n return (info != null && info.isConnected() && Connectivity.isConnectionFast(info.getType(),info.getSubtype()));\n }", "public boolean isConnected() {\n return metricDB.isConnected();\n }", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "boolean hasSpeed();", "public boolean isConnected() {\r\n\t\treturn backend != null;\r\n\t}", "public boolean isConnectionActive(){\n return this.connectionActive;\n }", "public boolean isTimedOut() {\n\t\treturn timedOut.get();\n\t}", "public boolean isConnected() {\n \tContext context = this.getApplicationContext();\n \t/** Create, if not exists, the preference GraviolaMOB. */\n SharedPreferences settings = context.getSharedPreferences(\"GraviolaMOB\", MODE_PRIVATE);\n /** Check the preference connectivity and return false if is not set. */\n return settings.getBoolean(\"connectivity\", false);\n }", "@Override\n public boolean isConnected() {\n boolean result = false;\n synchronized (CONN_SYNC) {\n result = ((system != null) && system.isConnected());\n }\n return result;\n }", "boolean hasSimspeed();", "public boolean isSession() {\n\t\treturn config.getBoolean(QuestConfigurationField.SESSION.getKey(), \n\t\t\t\t(boolean) QuestConfigurationField.SESSION.getDefault());\n\t}", "boolean hasMPPerSecond();", "public boolean isConnected() {\n HiLog.info(LOG_LABEL, \"isConnected: %{public}b\", new Object[]{Boolean.valueOf(this.mIsConnected)});\n return this.mIsConnected;\n }", "public boolean isAutoConnect() {\n return agentConfig.getAutoConnect();\n }", "public boolean isConnected() {\n\t\treturn sock != null;\n\t}", "protected final boolean isSessionOpen() {\n return sessionTracker.getOpenSession() != null;\n }", "public boolean isConnected() {\n\t\treturn conn != null;\n\t}", "public static boolean isTimingPaused() {\n return SimulatorJNI.isTimingPaused();\n }", "private boolean isConnected() {\n\t\treturn (this.serverConnection!=null); \n }", "public boolean getIsConnected() {\n return isConnected;\n }", "boolean hasHPPerSecond();", "public boolean hasSession() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean isConnected(){\n return isConnected;\n }", "public boolean isConnected()\n {\n return isConnected;\n }", "public boolean isCleanSession() {\n\t\tboolean enabled = true;\n\t\tString value = options.getProperty(\"Clean-Session\");\n\t\tif(value == null) {\n\t\t\tvalue = options.getProperty(\"clean-session\");\n\t\t}\n\t\tif(value != null) {\n\t\t\tenabled = Boolean.parseBoolean(trimedValue(value));\n\t\t} \n\t\treturn enabled;\n\t}", "public boolean isConnected() {\n boolean status = false;\n try {\n status = connection != null && !connection.isClosed();\n } catch (SQLException ex) {\n LOGGER.log(Level.SEVERE, \"Unable to check connection status: {0}\", ex);\n }\n\n return status;\n }", "public boolean isConnectable(){\n\t\tif((System.currentTimeMillis() - this.lastTry) > retryBackoff){\n\t\t\tthis.lastTry = System.currentTimeMillis();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasSession() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean isConnected() {\n return isConnected;\n }", "public boolean getNotSoFast() {\n return this.notSoFast;\n }", "boolean hasQueryTimeSec();", "public boolean isOnline()\n\t{\t\t\n\t\treturn chatConnection.isConnected();\n\t}", "private boolean isConnected() {\n if (skylinkConnection != null) {\n return skylinkConnection.isConnected();\n }\n return false;\n }", "public boolean isOnline() {\n return this.online;\n }", "public static boolean isConnected()\r\n\t{\r\n\t\t return Globals.connected ;\r\n\t}", "private boolean timeout() {\n long time = SystemClock.currentThreadTimeMillis();\n while (bluetoothSync.getState() != BluetoothSync.STATE_CONNECTED) {\n if (SystemClock.currentThreadTimeMillis() > time + Constants.Bluetooth.CONNECTION_TIMEOUT) {\n return false;\n }\n }\n return true;\n }", "private boolean hasStableConnection() {\n ConnectivityManager cm =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n return activeNetwork != null && activeNetwork.isConnectedOrConnecting();\n }", "public boolean getPingOnIdle()\n {\n return _isPing;\n }", "public boolean isConnected() {\n\t\t\treturn (m_soundManager instanceof RemoteSoundManager);\n\t\t}", "public boolean isConnected()\n {\n return connectionId != GatewayProcess.NO_CONNECTION_ID;\n }", "private Boolean isConnected() {\r\n ConnectivityManager cm = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\r\n Boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting();\r\n return isConnected;\r\n }", "public boolean isPing()\n {\n return _isPing;\n }", "public boolean isStopFast() {\n return stopFast;\n }", "public boolean isConnected() {\n\t\treturn this.isConnected;\n\t}", "public boolean isEfficient() {\n return efficient;\n }", "public static boolean isActiveNetworkMetered(Context context) {\n return false;\n // by tfling\n }", "public boolean isConnected() {\n if (client == null) {\n return false;\n }\n return client.isConnected();\n }", "boolean hasQueryTimeNsec();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean connectionActive() {\n\t\tif (socketConnection == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn socketConnection.isConnected();\n\t\t}\n\t}", "public boolean isConnected() {\n if (mState == STATE_CONNECTED) {\n return true;\n }\n return false;\n }", "public boolean isMonitoringEnabled(){\n return (selectorThread != null ?\n selectorThread.isMonitoringEnabled() : false);\n }", "public boolean isConnected(){\r\n\t\treturn connected;\r\n\t}", "public final boolean isConnected() {\n\t\t// retornamos si existe una conexion\n\t\treturn this.getConnection() != null;\n\t}", "boolean hasSession();", "public static boolean isConnected() {\n return (getCon() != null);\n }", "public boolean isTimeoutEnabled() {\n return timeoutEnabled;\n }", "public boolean isConnected() {\n\t\tfinal String METHOD = \"isConnected\";\n\t\tboolean connected = false;\n\t\tif (mqttAsyncClient != null) {\n\t\t\tconnected = mqttAsyncClient.isConnected();\n\t\t} else if (mqttClient != null) {\n\t\t\tconnected = mqttClient.isConnected();\n\t\t}\n\t\tLoggerUtility.log(Level.FINEST, CLASS_NAME, METHOD, \"Connected(\" + connected + \")\");\n\t\treturn connected;\n\t}", "public boolean isOnline() {\n return isOnline;\n }", "public boolean isStartConnected() {\r\n return startConnected;\r\n }", "boolean isOnline() {\n\t\treturn online;\n\t}", "public boolean isConnected() {\n return this.connected;\n }", "public boolean isConnected() {\n return this.connected;\n }", "public boolean isConnected(){\n return connected;\n }", "public boolean isConnected() {\n\t\treturn juraMqttClient != null && juraMqttClient.isConnected();\n\t}", "public final boolean hasNoTimeout() {\n\t\treturn m_tmo == NoTimeout ? true : false;\n\t}", "public static boolean hasConnected() {\n return sHasConnected;\n }", "public boolean isConnectedToRemoteDevice() {\n return mConnectionManager.isConnected();\n }", "public boolean getAutoConnect() {\n return agentConfig.getAutoConnect();\n }", "protected boolean isConnected() {\n\t\tif (channel == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn channel.isOpen();\n\t\t}\n\t}", "public boolean isConnectionActive ()\r\n\t{\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\treturn _bbCanSend;\r\n\t\t}\r\n\t}", "private boolean isOnline() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) owner.getBaseContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public boolean isConnected() {\n return connectionSocket.isConnected();\n }", "private boolean isInSession()\n {\n return EngagementActivityManager.getInstance().getCurrentActivityAlias() != null;\n }", "private boolean isConnected() {\n try {\n return (conn != null) && conn.isValid(0);\n } catch (SQLException ex) {\n Logger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }", "public boolean isOnline() {\n boolean connected = false;\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState() == NetworkInfo.State.CONNECTED || connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState() == NetworkInfo.State.CONNECTED) {\n connected = true;\n } else {\n connected = false;\n }\n return connected;\n }", "public boolean isConnected() {\n ConnectivityManager manager = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo info = manager.getActiveNetworkInfo();\n if (info != null && info.isConnected()) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isHeadless() {\n return m_Headless;\n }", "public boolean isOnline() {\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnectedOrConnecting();\n }", "public boolean isOnline() {\r\n\t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\r\n\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\r\n\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isOnline() {\n\t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean isOnline() {\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = cm.getActiveNetworkInfo();\n\n // Check now for connectivity\n if (networkInfo != null && networkInfo.isConnectedOrConnecting()) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isConnected()\n {\n return connected;\n }", "public boolean isIsOnlineResult() {\n return isOnlineResult;\n }", "public boolean isOnline() {\n\n\t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "@Override\n public boolean isStatisticsEnabled() {\n return counter != null && counter.isStatisticsEnabled();\n }", "protected boolean getIsAlive() {\n\t\treturn isAlive;\n\t}", "public Long getSlowThreshold() {\n\t\treturn slowThreshold;\n\t}" ]
[ "0.6375545", "0.6344724", "0.61864835", "0.6060473", "0.6052299", "0.59635544", "0.5952106", "0.5952106", "0.5952106", "0.5952106", "0.5952106", "0.5952106", "0.59471065", "0.5883393", "0.5859438", "0.5857664", "0.58187413", "0.58127403", "0.5775565", "0.57337826", "0.57319486", "0.57025063", "0.5689151", "0.56848097", "0.5679107", "0.56575346", "0.5640801", "0.5634076", "0.5632855", "0.56313914", "0.5629955", "0.5622453", "0.5616363", "0.56067884", "0.5595282", "0.5590454", "0.55900913", "0.55714995", "0.5565933", "0.55618536", "0.55592126", "0.55573267", "0.5548577", "0.5547501", "0.5537047", "0.55333686", "0.5532756", "0.5532027", "0.55314356", "0.55272907", "0.5517042", "0.5516847", "0.55141586", "0.5512322", "0.5510967", "0.55108243", "0.5501508", "0.5501508", "0.5501508", "0.5501508", "0.5501508", "0.54953116", "0.5476022", "0.5465572", "0.54620075", "0.5460033", "0.5448609", "0.5444842", "0.5443436", "0.54396456", "0.5433338", "0.5432483", "0.5428", "0.54275435", "0.54275435", "0.5424597", "0.5412469", "0.5408927", "0.5405807", "0.5400607", "0.53983134", "0.538654", "0.5382396", "0.5376392", "0.5374157", "0.5371755", "0.53692764", "0.5365699", "0.53593373", "0.5350149", "0.53500634", "0.5345871", "0.5343207", "0.5340424", "0.53403157", "0.5339365", "0.5339259", "0.53385955", "0.5337651", "0.5336849" ]
0.72138196
0
/ renamed from: a
public final void mo77070a(String str, String str2, String str3, View view) { C32569u.m150519b(str, C6969H.m41409d("G6B96C613B135B83AD217804D")); C32569u.m150519b(str2, C6969H.m41409d("G7A88C033BB")); C32569u.m150519b(str3, C6969H.m41409d("G658ADB118A22A7")); C32569u.m150519b(view, C6969H.m41409d("G7F8AD00D")); C30167Za.log(ZaLogEntry.EnumC31331b.Event).mo122570a(new C14699b(str, str2, str3)).mo122569a(view).mo122575a(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.6249669", "0.6242452", "0.61399835", "0.6117525", "0.61137056", "0.6089649", "0.6046804", "0.6024678", "0.6020427", "0.5975322", "0.59474325", "0.5912173", "0.5883731", "0.58788097", "0.58703065", "0.58670723", "0.5864566", "0.58566767", "0.5830755", "0.58286554", "0.58273774", "0.5795474", "0.5789155", "0.5783806", "0.57760274", "0.5770078", "0.57680553", "0.57531226", "0.569103", "0.56793714", "0.56700987", "0.56654674", "0.56597596", "0.5659196", "0.56579614", "0.5654381", "0.56449133", "0.5640629", "0.56392074", "0.56302243", "0.5617243", "0.56158006", "0.5606678", "0.56051916", "0.56014943", "0.55958104", "0.55910474", "0.5590642", "0.5574573", "0.5556904", "0.5555496", "0.55513936", "0.5550494", "0.5545024", "0.55376655", "0.5529486", "0.55293244", "0.55268556", "0.55256003", "0.5522323", "0.551999", "0.5510038", "0.55079377", "0.5488427", "0.5486585", "0.54819757", "0.5481469", "0.54804444", "0.54803044", "0.54776204", "0.54668623", "0.5463463", "0.5450725", "0.5443272", "0.54416984", "0.54404145", "0.5431594", "0.5423848", "0.54228616", "0.5418331", "0.5403878", "0.5400301", "0.539958", "0.5394461", "0.53896564", "0.5389041", "0.53753597", "0.53690916", "0.53597134", "0.5356917", "0.5355392", "0.535527", "0.53550094", "0.5350454", "0.5341916", "0.532629", "0.53219014", "0.5321064", "0.5316172", "0.5312055", "0.5298763" ]
0.0
-1
/ renamed from: a
public final void mo77069a(String str) { C32569u.m150519b(str, C6969H.m41409d("G658ADB118A22A7")); C30167Za.log(ZaLogEntry.EnumC31331b.CardShow).mo122570a(new C14698a(str)).mo122575a(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ArrayList cores = new ArrayList(); cores.add("Vermelho"); cores.add("Azul"); cores.add("Verde");
@FXML public void initialize() { cbCores.getItems().add("Azul"); cbCores.getItems().add("Vermelho"); cbCores.getItems().add("Verde"); cbCores1.getItems().add("Azul"); cbCores1.getItems().add("Vermelho"); cbCores1.getItems().add("Verde"); //cbCores.setItems(FXCollections.observableArrayList(cbCores)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<String> listarProgramas();", "public static void main(String[] args) {\n List<String> res = lcs(\"LCLC\",\"CLCL\");\r\n for(String s:res){\r\n \t System.out.print(s +\",\");\r\n }\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tArrayList<String> l=new ArrayList<>();\r\n\t\tl.add(\"Selenium\");\r\n\t\tl.add(\"Krish\");\r\n\t\tl.add(\"Infosys\");\r\n\t\tl.add(\"Hyderabad\");\r\n\t\t\r\n\t\tSystem.out.println(l.size()); // To print the size of an array\r\n\t\tfor (int i = 0; i < l.size(); i++) {\r\n\t\t\tSystem.out.println(l.get(i)); //To Print the elements in the array\r\n\t\t}\r\n\t}", "java.util.List<java.lang.String>\n getProcessorList();", "private static Computer[] loadComputers(ArrayList<String> OSList, int infect) {\n Computer[] computers = new Computer[OSList.size()];\n\n for (int i = 0; i < OSList.size(); i++) {\n computers[i] = new Computer(OSList.get(i), random);\n }\n computers[infect - 1].infect();\n\n return computers;\n }", "public static void main(String[] args) {\n List<String> gerentes = new ArrayList<>();\r\n \r\n\r\n // Adding new elements to the ArrayList\r\n gerentes.add(\"jorge\");\r\n gerentes.add(\"Juan\");\r\n \r\n for (int x = 0; x < 2; x++) {\r\n System.out.println(\"el gerente del equipo \" +(x+1) +\" es \"+ gerentes.get(x)); \r\n }\r\n \r\n \r\n\r\n // Adding an element at a particular index in an ArrayList\r\n \r\n\r\n }", "public static void main(String[] args) {\n\t\tArrayList<String>list=new ArrayList<String>(Arrays.asList(\"c\",\"c++\",\"java\",\"python\",\"html\"));\r\n\t\tStringJoiner sj=new StringJoiner(\",\",\"{\",\"}\");\r\n\t\tlist.forEach(e->sj.add(e));\r\n\t\tSystem.out.println(sj);\r\n\t}", "public static void main(String[] args) {\n\t\tArrayList arl=new ArrayList();\n\t\tarl.add(\"Red\");\n\t\tarl.add(\"Pink\");\n\t\tarl.add(\"Blue\");\n\t\tSystem.out.println(arl);\n\n\t}", "public void tacoArray() {\n\n\n ArrayList<String> tacos = new ArrayList<>();\n tacos.add(\"blah\");\n tacos.add(\"blah2\");\n tacos.add(\"blah3\");\n tacos.add(\"blah4\");\n tacos.add(\"blah5\");\n }", "public void setCourses(ArrayList value);", "public static void main(String args[]){\n ArrayList<String> heroes = new ArrayList<String>();\n heroes.add(\"ironman\");\n heroes.add(\"spider\");\n heroes.add(\"antman\");\n heroes.add(0,\"capt.america\");\n System.out.println(\"My super Hero : \"+heroes.get(0));\n \n }", "public static void main(String[] args) {\n BMW bmw = new BMW();\n Tesla tesla = new Tesla();\n Toyota toyota = new Toyota();\n Jeep jeep = new Jeep();\n\n bmw.start();\n tesla.start();\n toyota.start();\n jeep.start();\n\n // create an arraylist of car, and store 3 toyota objetc, 3 bmw objects and 3 Tesla objects\n\n Car car1 = new BMW();\n Car car2 = new Tesla();\n Car car3 = new Toyota();\n Car car4 = new Jeep();\n\n ArrayList<Car> cars = new ArrayList<>();\n cars.addAll(Arrays.asList(car1, car2, car3, car4, bmw, tesla, toyota, jeep));\n\n System.out.println();\n\n }", "String getCpusetcpus();", "public static void main(String[] args) {\n ArrayList list = new ArrayList();\n new GeometricalSequence().listFactorization(10,list);\n System.out.println(list);\n// new GeometricalSequence().listReward(10,list);\n }", "public TaskList (ArrayList<Task> tasks){ this.tasks = tasks;}", "@Override\npublic ArrayList<String> courses() {\n\tArrayList<String> studentCourses = new ArrayList<String>();\n\tstudentCourses.add(\"CMPE - 273\");\n\tstudentCourses.add(\"CMPE - 206\");\n\tstudentCourses.add(\"CMPE - 277\");\n\tSystem.out.println(this.name+\" has take these courses\");\n\tfor(int i = 0 ; i < studentCourses.size() ; i++){\n\t\tSystem.out.println( studentCourses.get(i));\n\t}\n\treturn null;\n}", "public ComandosJuego() //constructor\n\t{\n\t\tlista = new ArrayList<String>();\n\t}", "public List<String> iterateProgramPageList();", "public void setComUnits(ArrayList value);", "public static void main(String[] args) {\n\t\tArrayList<String> myArrayList =new ArrayList <String>();\r\n\t\tmyArrayList.add(\"New York\");\r\n\t\tmyArrayList.add(\"New Jersey\");\r\n\t\tmyArrayList.add(\"Virgina\");\r\n\t\tmyArrayList.add(\"Maine\");\r\n\t\tmyArrayList.add(\"Mariland\");\r\n\t\t\r\n\tint\tTotalStateName =myArrayList.size();\r\n\tSystem.out.println(TotalStateName);\r\n\t\tString StateName =myArrayList.get(0);\r\n\t\tSystem.out.println(StateName);\r\n\t\t\r\n\tArrayList<Integer> scores =new ArrayList<>();\r\n\t\t\r\n\t\t\tscores.add(500);\r\n\t\t\tscores.add(320);\r\n\t\t\tscores.add(125);\r\n\t\t\tscores.add(400);\r\n\t\t\tSystem.out.println(scores.size());\r\n\t\t\tSystem.out.println(scores.get(0));\r\n\t}", "public ListTest() {\n this.console = new Scanner(System.in);\n this.coursesToSelect = new ArrayList();\n }", "public static void main(String[] args) {\n List<Integer> id = new ArrayList<>();\r\n for(int i=0 ; i<=10 ;i++){\r\n \t id.add(i);\r\n }\r\n System.out.println(id);\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tList<String> list = Arrays.asList(\"Mukesh\", \"Vishal\", \"Amar\");\n\t\tString result = list.parallelStream().collect(StringBuilder::new,\n\t\t\t\t(response, element) -> response.append(\" \").append(element),\n\t\t\t\t(response1, response2) -> response1.append(\",\").append(response2.toString())).toString();\n\t\tSystem.out.println(\"Result: \" + result);\n\t}", "static void constructor(){\n /*SK*/ /*CZ*/ /*EN*/ \n /*0*/ SK.add(\"Základné nastavenia a konštanty\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); //language String value at position \n/*1*/ SK.add(\"A :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*2*/ SK.add(\"Z :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*3*/ SK.add(\"Dľžka rozpätia \"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*4*/ SK.add(\"Počítaná vzdialenosť od osi vedenia\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*5*/ SK.add(\"\\u0394l \"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*6*/ SK.add(\"Dľžka elementu reťazovky\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*7*/ SK.add(\"Aplikovať terén\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*8*/ SK.add(\"Aplikovat modelovaný terén?\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*9*/ SK.add(\"A/Z hranice\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*10*/ SK.add(\"hranice priestoru su v tvare obdlžnika dopočítaneho na základe hodnôt konštánt AZ\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\");\n/*11*/ SK.add(\"Generované hranice\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*12*/ SK.add(\"hranice priestoru sú generovane an základe vstupných bodov pozn. Comlex Hull\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*13*/ SK.add(\"Teren\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*14*/ SK.add(\"Model terénu\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*15*/ SK.add(\"Hlavná os rozpätia\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*16*/ SK.add(\"X1 :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*17*/ SK.add(\"X-sová súradnica stožiara 1\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n /*18*/ SK.add(\"Z1 :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*19*/ SK.add(\"Z-sová súradnica stožiara 1\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*20*/ SK.add(\"X2 :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*21*/ SK.add(\"X-sová súradnica stožiara 2\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n /*22*/ SK.add(\"Z2 :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*23*/ SK.add(\"Z-sová súradnica stožiara 2\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*24*/ SK.add(\"Ukažka terenu\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*25*/ SK.add(\"Y :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*26*/ SK.add(\"Výškový offset\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*27*/ SK.add(\"block offset\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*28*/ SK.add(\"Blokuje daný ofset \"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*29*/ SK.add(\"Strana počitaneho štvorca\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\");\n/*30*/ SK.add(\"H :\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n/*31*/ SK.add(\"Vyska pre vertikalne mapovanie\"); \n CZ.add(\"MT3 software, SAG Elektrovod, autoři Jozef Bendík & Matej Cenký 2016 1.release\"); \n EN.add(\"MT3 software, SAG Elektrovod, created by Jozef Bendík & Matej Cenký 2016 1.release\"); \n \n \n \n \n \n \n \n \n \n \n \n \n // language_main_frame.LangLabel(constants.getLanguage_option(),0) \n inicializovane = true;\n}", "public static void main(String[] args) {\n\t\tList<Horse>horses=new ArrayList<>();\n\t\tfor(int i=0;i<8;i++){\nHorse h =new Horse();\nhorses.add(h);\nh.start();\n\t}\n\n}", "public ArrayList<String> menuComBox();", "StringList createStringList();", "public static void main(String[] args) {\n\t\tString[] prog = {\"Java\", \"C\", \"C#\", \"C++\", \"Python\", \"R\"};\r\n\t\t\r\n\t\tArrayList<String> prog2 = new ArrayList<String>();\r\n\t\tfor (int i=0; i<prog.length; i++) {\r\n\t\t\tprog2.add(prog[i]);\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i=0; i<prog2.size(); i++) {\r\n\t\t\tSystem.out.println(prog2.get(i));\r\n\t\t}\r\n\t\t\r\n\t\t/* for (String word: prog2) {\r\n\t\t\tSystem.out.println(word);\r\n\t\t} */\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Task2: copy the array list in Task 1 and create an array list \"prog3\";\r\n\t\t\r\n\t\tArrayList<String> prog3 = new ArrayList<String>(prog2);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Task3: create an array list of integers 0,1,4,9,16,25 using for loop and print\r\n\t\t\r\n\t\tArrayList<Integer> numbers = new ArrayList<Integer>();\r\n\t\tfor (int x=0; x<=5; x++) {\r\n\t\t\tnumbers.add(x*x);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t\t// Task4: from prog3, remove strings with length <=2. Use for loop.\r\n\t\t\r\n\t\tint i=0;\r\n\t\twhile (i<prog3.size()) {\r\n\t\t\tString word = prog3.get(i);\r\n\t\t\tif(word.length()<=2) {\r\n\t\t\t\tprog3.remove(i);\r\n\t\t\t} else {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args){\n\n Ejercicio4 ejercicio4 = new Ejercicio4();\n\n ArrayList<Integer> resultado = ejercicio4.listaDePrimerosCienPositivos();\n\n for (Integer i = 0; i < resultado.size(); i++) {\n System.out.println(resultado.get(i));\n }\n }", "@Override\r\n\tpublic void run() {\n\t\tString [] kod = {\"STIA\",\"STQM\",\"STID\",\"STIJ\",\"STIX\",\"STIN\",\"STIK\",\"STIW\",\"STQS\"};\r\n\t\tsuper.run();\r\n\t\t\r\n\t\tfor(int i=0;i<text.length;i++) {\r\n\t\t\tfor(int j=1000;j<=5000;j++) {\r\n\t\t\t\tfor(int k=0;k<kod.length;k++) {\r\n\t\t\t\t\tif(text[i].contains(kod[k]+j)) {\r\n\t\t\t\t\t\tSystem.out.println(\"Thread-3: List of courses from SOC: \"+text[i]);\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\t}\r\n\t\r\n\t\t}\r\n\t\tSystem.out.println(\"\");\r\n\t\t}", "public void setStages(ArrayList value);", "public ArrayList getCourses();", "@Override\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tname = \"arror\" + i + 1;\n\t\t\tlist.add(name);\n\t\t}\n\t}", "public static void main(String[] args) {\n System.out.print(\"Initialize list of languages ... \");\r\n ArrayList<Language> listLanguages = new ArrayList<>();\r\n listLanguages.add(new Language(\"čestiná\", \"cs\"));\r\n listLanguages.add(new Language(\"français\", \"fr\"));\r\n System.out.println(\"OK\");\r\n // Create shell\r\n Shell shell = new Shell(listLanguages);\r\n shell.run();\r\n }", "public List<String> runParallelCharacters() throws InterruptedException, ExecutionException {\n ExecutorService executor = Executors.newFixedThreadPool(10);\r\n\r\n // create a list to hold the Future object associated with Callable\r\n List<Future<String>> list = new ArrayList<>();\r\n list.add(executor.submit(new FetchResourceCallable(\"https://dueinator.dk/jwtbackend/api/car/all\")));\r\n executor.shutdown();\r\n List<String> urlStr = new ArrayList<>();\r\n for (Future<String> future : list) {\r\n urlStr.add(future.get());\r\n }\r\n return urlStr;\r\n }", "void mo9148a(int i, ArrayList<C0889x> arrayList);", "ArrayList<String> getLabels();", "public static void main(String[] args) {\nArrayList<String>mylist =new ArrayList<String>();\r\nmylist.add(\"anu\");\r\nmylist.add(\"ammu\");\r\nmylist.add(\"renu\");\r\nSystem.out.println(mylist);\r\nfor(int i=0;i<3;i++)\r\n{\r\n\tSystem.out.println(i+\"=\" + mylist.get(i));\r\n}\r\n\t}", "public void split(int cores) {\n\t\tint counter = 0;\n\t\tthis.container = new AI[cores][POPULATION_SIZE / cores];\n\t\tfor (AI ai : this.individuals) {\n\t\t\tai.fitness = 0;\n\t\t}\n\t\tfor (int x = 0; x < cores; x++) {\n\t\t\tfor (int y = 0; y < POPULATION_SIZE / cores; y++) {\n\t\t\t\tthis.container[x][y] = this.individuals[counter];\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t}", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "public TaskProgram() {\n initComponents();\n list=new ArrayList();\n li=list.listIterator();\n curtask=0;\n tottask=0;\n }", "public static void main(String[] args) {\n\tlistasimple lista;\n\tlista = new listasimple();\n\tfor(int i=0; i<8; i++){\n\t\tlista.insertarDatos(i);\n\t\tlista.mostrarDatos();\n\t}\n}", "public static void main(String[] args) {\n\t\tArrayList a=new ArrayList();\n\t\ta.add(\"hello\");\n\t\tSystem.out.println(a);\n\n\t}", "public static void main(String[] args) {\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\t\n\t\tString s = new String(\"PL_in_JAVA\");\n\t\tlist.add(s);\n\t\t\n//\t\tString str = (String)list.get(0);\n\t\tString str = list.get(0);\n\t\tSystem.out.println(str);\n\t}", "ArrayList<String> createList(String finalInput);", "void showProcessList(TimelyResultProcessor resultProcessor);", "public static void main(String[] args){\r\n Language myLang = new Language(\"Willish\", 5, \"Mars\", \"verb-noun-verb-adjective\");\r\n Mayan mayan = new Mayan(\"Ki'che'\", 2330000);\r\n SinoTibetan sino1 = new SinoTibetan(\"Chinese Tibetan\", 100000);\r\n SinoTibetan sino2 = new SinoTibetan(\"Tibetan\", 200000);\r\n ArrayList<Language> langList = new ArrayList<Language>();\r\n langList.add(myLang);\r\n langList.add(mayan);\r\n langList.add(sino1);\r\n langList.add(sino2);\r\n \r\n for (Language allLangs : langList){\r\n allLangs.getInfo();\r\n }\r\n }", "void outPut(ArrayList<SanPham> list);", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "public static void main(String[] args) {\n ArrayList<String> cities = new ArrayList<>(Arrays.asList(\"ROME\", \"LONDON\", \"NAIROBI\", \"CALIFORNIA\", \"ZURICH\",\n \"NEW DELHI\", \"AMSTERDAM\", \"ABU DHABI\", \"PARIS\"));\n\n System.out.println(getAICities(cities));\n }", "public abstract void init(ArrayList<String> ary);", "private List<String> build() {\n List<String> ags = new ArrayList<>();\n ags.add(\"European Union Chromosome 3 Arabidopsis Sequencing Consortium\");\n ags.add(\"Institute for Genomic Research\");\n ags.add(\"Kazusa DNA Research Institute\");\n return ags;\n }", "public static void setEnaComp(ArrayList<Component> enaComp) {\r\n PCCTRL.enaComp = enaComp;\r\n }", "public void addCourseName(String courseName) {\r\n\tCoursesList = new ArrayList<String>();\r\n\tCoursesList.add(courseName);\r\n}", "public static void main(String[] args) {\n\t\tConcesionario listaconce=new Concesionario();\n\t\t//aņado coches\n\t\tlistaconce.addCoche(new coches(\"'6592 pgk'\",100,5,1500));\n\t\tSystem.out.println(listaconce);\n\t\t//otra forma\n\t\tcoches c1=(new coches(\"'5858 asd'\",120, 3, 1455));\n\t\tlistaconce.addCoche(c1);\n\t\tSystem.out.println(listaconce);\n\t\t\n\n\t}", "private void setJList(LinkedTaskList myList) {\n masTasks = new String[myList.size()+5];\n for (int i = 0; i < myList.size(); i++) {\n masTasks[i] = myList.getTask(i).toString2();\n }\n taskList = new JList(masTasks);\n }", "private void createClinicList(){\n\n ArrayList<Clinic> clinics = LogIn.clinicDAO.getAllClinics();\n for(Clinic cn : clinics){\n double avgRating = LogIn.rateDAO.getAvgRating(cn.getClinicID());\n clinicList.add(new ClinicItem(cn.getClinicName(), drawable.clinic_logo, \"Singapore\", Double.toString(avgRating)));\n }\n }", "public void listar() {\n\t\t\n\t}", "List<String> getFeatures();", "public static void main(String[] args) {\n\t\tArrayList<String> list1=new ArrayList<String> ();\r\n\t\tlist1.add(\"Black\");\r\n\t\tlist1.add(\"White\");\r\n\t\tlist1.add(\"Red\");\r\n\t\tlist1.add(\"yellow\");\r\n\tSystem.out.println(list1.get(2));\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tVector v1=new Vector(2,8);\n\t\tSystem.out.println(v1.capacity());\n\t\tv1.add(10);\n\t\tv1.add(20);\nv1.add(30);\n\tv1.add(40);\n\tv1.add(50);\n\tv1.add(60);\n\tv1.add(70);\n\tv1.add(80);\n\tv1.add(90);\n\t\tv1.add(10);\n\t\tv1.add(11);\n\t\tArrayList a1=new ArrayList(v1);\n\t\ta1.add(200);\n\t\tSystem.out.println(a1);\n\t\n\n\n\t}", "public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}", "public List<CPU> getCPU() {\n\t\tCPU cpu;\n\t\tList<CPU> listCPUInfoModel = new ArrayList<CPU>();\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tcpu = new CPU();\n\n\t\t\tcpu.setVendor(\"Intel\");\n\t\t\tcpu.setClock(i + 1);\n\t\t\tcpu.setTotalCores(i + 1);\n\t\t\tcpu.setModel(\"Intel 4004\");\n\n\t\t\tlistCPUInfoModel.add(cpu);\n\t\t}\n\n\t\treturn listCPUInfoModel;\n\t}", "private String literal(Array list) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"(\");\n for (int i = 0; i < list.size(); i++) {\n if (i > 0) {\n buffer.append(\",\");\n }\n buffer.append(literal(list.get(i)));\n }\n buffer.append(\")\");\n return buffer.toString();\n }", "java.util.List<java.lang.String> getFeaturesList();", "public static void main(String[] args) {\n\t\t\n\t\tString city1, city2, city3, city4, city5, city6;\n\n\t\ttry (Scanner introduir=new Scanner(System.in)){\n\t\t\n\t\t\t//Solicitamos al usuario los nombres de 6 ciudades\n\t\t\t\n\t\t\tSystem.out.println(\"Introduir ciutat nš:1\");\n\t\t\tcity1= introduir.nextLine();\n\t\t\tSystem.out.println(\"Introduir ciutat nš:2\");\n\t\t\tcity2= introduir.nextLine();\n\t\t\tSystem.out.println(\"Introduir ciutat nš:3\");\n\t\t\tcity3= introduir.nextLine();\n\t\t\tSystem.out.println(\"Introduir ciutat nš:4\");\n\t\t\tcity4= introduir.nextLine();\n\t\t\tSystem.out.println(\"Introduir ciutat nš:5\");\n\t\t\tcity5= introduir.nextLine();\n\t\t\tSystem.out.println(\"Introduir ciutat nš:6\");\n\t\t\tcity6= introduir.nextLine();\n\t\t} \n\t\t\t//Mostramos por consola el valor de las 6 variables\n\t\t\t\n\t\t\tSystem.out.println(city1);\n\t\t\tSystem.out.println(city2);\n\t\t\tSystem.out.println(city3);\n\t\t\tSystem.out.println(city4);\n\t\t\tSystem.out.println(city5);\n\t\t\tSystem.out.println(city6);\n\t\t\t\n\t\t\t\n\t\t\t//Definimos y asignamos valores a la ArrayList\n\t\t\t\n\t\t\tArrayList<String> arrayCiutats = new ArrayList<>();\n\t\t\t\n\t\t\tarrayCiutats.add(city1);\n\t\t\tarrayCiutats.add(city2);\n\t\t\tarrayCiutats.add(city3);\n\t\t\tarrayCiutats.add(city4);\n\t\t\tarrayCiutats.add(city5);\n\t\t\tarrayCiutats.add(city6);\n\t\t\t\n\t\t\t//Ordenamos el ArrayList y lo mostramos por consola\n\t\t\tCollections.sort(arrayCiutats);\n\t\t\tfor(Object o:arrayCiutats) {\n\t\t\t\tSystem.out.println(o);\n\t\t\t}\n\t\t\t\n\t\t\t// Cambiamos les vocals\"a\" por el 4 y guardamos \n\t\t\t// en una nueva array.\n\t\t\t\n\t\t\tArrayList<String> ArrayCiutatsModificades = new ArrayList<>();\n\t\t\t\n\t\t\tfor(Object o:arrayCiutats) {\n\t\t\t\tString valor=o.toString().replace('a', '4'); \n\t\t\t\tArrayCiutatsModificades.add(valor);\n\t\t\t}\n\t\t\tSystem.out.println(ArrayCiutatsModificades);\n\t\t\t\n\t\t\t\n\t\t\t//Llamamos al metodo creaArray tantas veces como\n\t\t\t// el bucle for dure. Mostramos por consola y\n\t\t\t// invertimos el orden de las palabras.\n\t\t\t\n\t\t\tfor(Object o:arrayCiutats) {\n\t\t\t\tcreaArray(o.toString().length(),o.toString());\n\t\t\t}\n\t}", "public void setcomponenten(ArrayList<Componenten> a){\r\n this.database= a;\r\n }", "public List<Compte> getComptesClient(int numeroClient);", "private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }", "public void setSchools(ArrayList value);", "public void loadCompliments(){\n compliments = getResources().getStringArray(R.array.compliments_array);\n }", "public static void main(String[] args) {\n\t\tList list =new ArrayList();\r\n\t\tlist.add(\"one\");\r\n\t\tlist.add(\"two\");\r\n\t\tlist.add(\"three\");\r\n\t\tlist.add(\"four\");\r\n\t\t\r\n\t\tSystem.out.println(list.size());\r\n\t\t\r\n\t\tSystem.out.println(list.get(1));\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String args[]){\n featureBase Engine = new featureEngine(\"Engine!\",\n \"This is an engine test!\", 356.99,1.0, 24.5,1000.0);\n\n featureBase Wheels = new featureWheels(\"Wheels\",\n \"This is a wheels test!\", 359.9,1.0,\"Somber\", 21.0);\n\n featureBase Color = new featureColor(\"Test part!\",\n \"This is a test part cool huh?\",364.99,1.0,\"Stylish\");\n\n //Constructing a new nodeArray\n nodeArray test = new nodeArray();\n\n //inserting the objects into the array (Duplicate to test the LLL as well)\n test.insert(Wheels);\n test.insert(Engine);\n test.insert(Color);\n\n System.out.print(test.display());\n }", "public static void main(String[] args) {\n\t\tArrayList<String> planetList = new ArrayList<String>();\n\t Scanner console = new Scanner(System.in);\n\t System.out.println(\" \\nEnter your favouurate planet: \" );\n\t String planet = console.next();\n\n\t console.close(); \n\t\t//Add user input to the list\n\t\tplanetList.add(planet);\n\t\t//Add a string to the list\n\t\tplanetList.add(\"Gliese 581 c\");\n\t\tSystem.out.println(\" \\nTwo cool planets: \" + planetList);\n\t}", "@Override\n public ArrayList<String> Crear(){\n setVida(3500);\n Creado.add(0, Integer.toString(getVida()));\n Creado.add(1,\"150\");\n Creado.add(2,\"100\");\n Creado.add(3,\"70\");\n return Creado;\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = new FileInputStream(\"G:\\\\Prog\\\\arraylist.txt\");\n\t\t\tint i;\n\t\t\twhile((i = fileInputStream.read()) != -1)\n\t\t\t{\n\t\t\t\tSystem.out.print((char)i);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfileInputStream.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\n\tList l = new ArrayList();\n\t l.toArray();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private String constructList(String[] elements) throws UnsupportedEncodingException {\n if (null == elements || 0 == elements.length)\n return null;\n StringBuffer elementList = new StringBuffer();\n\n for (int i = 0; i < elements.length; i++) {\n if (0 < i)\n elementList.append(\",\");\n elementList.append(elements[i]);\n }\n return elementList.toString();\n }", "public static void main(String[] args) {\n\t\tList mylist = new ArrayList<>();\n\n\t}", "public List init(List list) {\n Iterator it = components.iterator();\n PortletComponent comp;\n while (it.hasNext()) {\n comp = (PortletComponent) it.next();\n comp.setTheme(theme);\n list = comp.init(list);\n }\n System.err.println(\"Made a components list!!!! \" + list.size());\n for (int i = 0; i < list.size(); i++) {\n ComponentIdentifier c = (ComponentIdentifier) list.get(i);\n System.err.println(\"id: \" + c.getComponentID() + \" : \" + c.getClassName() + \" : \" + c.hasPortlet());\n \n }\n componentIdentifiers = list;\n return componentIdentifiers;\n }", "public static void main(String[] args) {\n\t\tList<String> ls=new ArrayList<String>();\r\n\t\tls.add(\"xyz\");\r\n\t\tls.add(\"abc\");\r\n\t\tls.add(\"pqr\");\r\n\t\tls.add(\"uvw\");\r\n\t\tls.add(\"mno\");\r\n\t\tfor(String element:ls) {\r\n\t\t\tSystem.out.println(element);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString values[] = {\"A\",\"B\",\"C\",\"D\",\"E\"};\n\t\tSeqList<String> lista = new SeqList<String>(values);\t//类的实例化\n\t\tSystem.out.println(lista.toString());\n\t\tlista.insert(2, \"C\");\n\t\tSystem.out.println(lista.toString());\n\t\tlista.insert(\"F\");\n\t\tSystem.out.println(lista.toString());\n\t\tlista.remove(2);\n\t\tSystem.out.println(lista.toString());\n\n\t}", "Object getCclist();", "public List<String> verCarrito(){\n\t\treturn this.compras;\n\t}", "List<C1114c> mo5883h(String str);", "public CreationMenuModele(ArrayList<String> listPredefinedCourse,ArrayList<String> listCourseName){\n this.listPredefinedCourse = listPredefinedCourse;\n this.listCourseName = listCourseName;\n }", "public void affichageList(List<Integer> list) {\n\t\tint nbrCols = list.size(); \n\t\tprocessusGP.setMaxWidth(list.size()*50);\n\t\t\n\t\taddColsRows(processusGP, nbrCols, 0);\n\t\t// Add grid\n\t\tfor(int i=0; i<nbrCols; i++) {\n\t\t\tPane pane = new Pane(); \n\t\t\tpane.setStyle(\"-fx-border-color: black; -fx-border-width: 1 1 1 1;\");\n\t\t\tprocessusGP.add(pane, i, 0);\n\t\t}\n\n\t\t// Affichage du résultat\n\t\tfor(int i=0; i<list.size();i++) {\n\t\t\tInteger p = list.get(i); \n\t\t\tLabel label = new Label(\"\" + p);\n\t\t\tprocessusGP.add(label, i, 0);\n\t\t\tGridPane.setHalignment(label, HPos.CENTER);\n\t\t}\n\n\t}", "public void init(){\n\t\tcoreNumber = this.readIntValueFromFile(MAX_CORE_ID) + 1;\n\t\tparseAvailableFrequencies();\n\t\t\n\t\tmBaseCpuSpeedTimes = new long[cpuFrequencies.length];\n\t\tmRelCpuSpeedTimes = new long[cpuFrequencies.length];\t\t\t\t\n\t\tcores = new Core[coreNumber];\n\t\tfor(int i = 0; i < coreNumber; i++){\n\t\t\tcores[i] = new Core(i);\n\t\t\tcores[i].init();\n\t\t}\n\t}", "List<String> mo5876c();", "void mo100443a(List<String> list);", "public static void main(String[] args)\n {\n ArrayList<String> nameList = new ArrayList<String>();\n \n // Dodawanie imion do obiektu typu ArrayList.\n nameList.add(\"Jacek\");\n nameList.add(\"Celina\");\n nameList.add(\"Borys\");\n\n // Wyświetlanie wielkości obiektu typu ArrayList.\n System.out.println(\"W tym obiekcie typu ArrayList zapisano \" +\n nameList.size() +\n \" elementy.\");\n\n // Wyświetlanie elementów z obiektu nameList.\n for (int index = 0; index < nameList.size(); index++)\n System.out.println(nameList.get(index));\n }", "ArrayList<Product> ListOfProducts();", "public String[] getCourses();", "GARoute(){\n cityIndex = new ArrayList<Integer>();\n }", "public static void main(String[] args) {\n ArrayList<String> cars = new ArrayList<String>();\n cars.add(\"Volvo\");\n cars.add(\"BMW\");\n cars.add(\"Ford\");\n cars.add(\"Mazda\");\n System.out.println(cars);\n\n //gets array index 0\n cars.get(0);\n //sets array index 0 to contain \"Opel\"\n cars.set(0, \"Opel\");\n //removes array index 0\n cars.remove(0);\n //remove all cars strings\n cars.clear();\n //get cars array size\n cars.size();\n\n //Declare new object bikes\n //add bike strings\n //sout all strings in array\n ArrayList<String> bikes = new ArrayList<String>();\n bikes.add(\"Trek\");\n bikes.add(\"Cube\");\n bikes.add(\"Kid Bike\");\n bikes.add(\"Mustang\");\n for (int i = 0; i < bikes.size(); i++) {\n System.out.println(bikes.get(i));\n }\n\n for (String i : bikes) {\n System.out.println(i);\n }\n }", "public static void main(String[] args) {\n\t\t\t\n\t\t\tMultiSet<String> ms = new MultiSetDecorator<>(new HashMultiSet<>());\n\t\t\tChrono chronoHash = new Chrono();\n\t\t\twordcount(ms);\n\t\t\tchronoHash.stop();\n\t\t\tSystem.out.println(\"avec ArrayList\");\n\t\t\tMultiSet<String> naif = new MultiSetDecorator<>(new NaiveMultiSet<String>());\n\t\t\tChrono chronoNaif = new Chrono();\n\t\t\twordcount(naif);\n\t\t\tchronoNaif.stop();\n\t\t\t\n\t\t}", "public static void main(String[] args) {\n List<String> names = new ArrayList<>();\n\n }", "Dialogue(ArrayList<String> text){\n this.text = text;\n }", "void inPut(ArrayList<SanPham> list);", "public TaskList(List<String> lines) {\n tasks = lines\n .stream()\n .map(str -> TaskList.decode(str))\n .collect(Collectors.toList());\n }", "@Override\r\n public String[] getProcessList() {\n\r\n return new String[0];\r\n }", "@RequestLine(\"GET\")\n @Headers({\n \"Accept: application/json\",\n })\n List<Feature> listFeaturesCourses(URI uri);" ]
[ "0.5495486", "0.54661685", "0.537602", "0.5356463", "0.52427924", "0.5224411", "0.52210516", "0.5220104", "0.52168953", "0.5181123", "0.5148032", "0.51256776", "0.51186913", "0.5115936", "0.5100612", "0.50868106", "0.50826174", "0.5071229", "0.50550187", "0.5021227", "0.50149256", "0.50104815", "0.50071204", "0.49860367", "0.49703327", "0.49566588", "0.49428546", "0.49285465", "0.4926163", "0.4923886", "0.49189413", "0.49107423", "0.49087843", "0.49036872", "0.49018082", "0.4889865", "0.48890966", "0.4887915", "0.48864827", "0.4874994", "0.48749462", "0.48708296", "0.4870218", "0.4855431", "0.48496377", "0.48490846", "0.4841107", "0.48289067", "0.48238766", "0.48115826", "0.48037598", "0.48028412", "0.4799022", "0.47968596", "0.47966218", "0.47966015", "0.4796506", "0.47938466", "0.4791664", "0.47912782", "0.4790747", "0.47855604", "0.47847223", "0.4779662", "0.47731683", "0.47730866", "0.47650832", "0.47629002", "0.47598588", "0.4755634", "0.47538802", "0.4751051", "0.47375587", "0.47341803", "0.47319272", "0.47303593", "0.47300714", "0.47272778", "0.47241312", "0.47240862", "0.47225732", "0.47218534", "0.4715939", "0.47138226", "0.47127017", "0.471125", "0.47094247", "0.47081488", "0.47042438", "0.4702267", "0.46997428", "0.46980304", "0.4695505", "0.46936056", "0.4693442", "0.4689173", "0.46880773", "0.4684688", "0.4678693", "0.46786803", "0.46752658" ]
0.0
-1
/ public ElasticSearchDictator createSearchDictator(AggregateRequestDto dto, String tenant) throws Exception ; public ElasticSearchDictator createSearchDictator(AggregateRequestDto dto, String indexName, String documentType, String filterDateField) throws Exception ;
public ElasticSearchDictator createSearchDictatorV2(AggregateRequestDto dto, String indexName, String documentType, String filterDateField);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void factory(Dictionary dictionary, Suggester suggester, IndexFacade aprioriIndex, String aprioriIndexField, Analyzer aprioriAnalyzer, IndexWriter.MaxFieldLength mfl) throws IOException, QueryException;", "public static Map<String, Object> getDocumentMapping(String indexPrefix, String indexPostfix) {\n\n Map<String, Object> indexFieldProperties = new HashMap<String, Object>();\n\n if (indexPrefix.equals(EsConstants.GATEWAY_INDEX_NAME)) {\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_VERSION, indexFieldProperties);\n }\n // rule for gateway and manager\n if (indexPostfix.equals(EsConstants.INDEX_APIS)) {\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n }\n // rule for gateway and manager\n if (indexPostfix.equals(EsConstants.INDEX_CLIENTS)) {\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n }\n if (indexPrefix.equals(EsConstants.METRICS_INDEX_NAME)) {\n // set keyword types\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ORG_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ORG_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_PLAN_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_VERSION, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_VERSION, indexFieldProperties);\n\n addBooleanTypeToIndexField(EsConstants.ES_FIELD_ERROR, indexFieldProperties);\n addBooleanTypeToIndexField(EsConstants.ES_FIELD_FAILURE, indexFieldProperties);\n\n // set date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_REQUEST_START, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_REQUEST_END, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_API_START, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_API_END, indexFieldProperties);\n\n // set ip type\n addIpTypeToIndexField(EsConstants.ES_FIELD_REMOTE_ADDR, indexFieldProperties);\n }\n\n if (indexPrefix.equals(EsConstants.MANAGER_INDEX_NAME)) {\n\n switch (indexPostfix) {\n case EsConstants.INDEX_MANAGER_POSTFIX_API:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_API_VERSION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_STATUS, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_PUBLISHED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_RETIRED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_CLIENT:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_CLIENT_VERSION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_STATUS, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_PUBLISHED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_RETIRED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_AUDIT_ENTRY:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ENTITY_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ENTITY_TYPE, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_ORGANIZATION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n setFieldDataToIndexTextField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_USER:\n setFieldDataToIndexTextField(EsConstants.ES_FIELD_FULL_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_JOINED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_PLUGIN:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_GROUP_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ARTIFACT_ID, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_POLICY_DEF:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_CONTRACT:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_VERSION, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_PLAN:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_PLAN_VERSION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_PLAN_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_STATUS, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_LOCKED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_GATEWAY:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_ROLE:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n setFieldDataToIndexTextField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_ROLE_MEMBERSHIP:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_DEVELOPER:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_METADATA:\n addDateTypeToIndexField(EsConstants.ES_FIELD_EXPORTED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_IMPORTED_ON, indexFieldProperties);\n default:\n break;\n }\n }\n\n return indexFieldProperties;\n }", "private static void addDateTypeToIndexField(String fieldName, Map<String, Object> indexFieldProperties) {\n // create keyword type property\n Map<String, Object> keywordTypeProperty = new HashMap<>();\n keywordTypeProperty.put(\"type\", \"date\");\n addFieldMapping(fieldName, keywordTypeProperty, indexFieldProperties);\n }", "public interface Feeder {\n\n Client client();\n\n /**\n * Index document\n *\n * @param index the index\n * @param type the type\n * @param id the id\n * @param source the source\n * @return this\n */\n Feeder index(String index, String type, String id, String source);\n\n /**\n * Index document\n *\n * @param indexRequest the index request\n * @return this\n */\n Feeder index(IndexRequest indexRequest);\n\n /**\n * Delete document\n *\n * @param index the index\n * @param type the type\n * @param id the id\n * @return this\n */\n Feeder delete(String index, String type, String id);\n\n Feeder delete(DeleteRequest deleteRequest);\n\n\n}", "private Document createMapping() {\n return getIndexOperations().createMapping();\n }", "public interface AprioriCorpusFactory {\n \n /**\n * Initializes and populates an a priori index with documents whos text is known to be correct.\n *\n * @param dictionary dictionary to extract data from.\n * @param suggester suggester used to navigate the dictionary.\n * @param aprioriIndex lucene index, will be created/reinitialized.\n * @param aprioriIndexField index field used to store the a priori text.\n * @param aprioriAnalyzer analyzer used to tokenize a priori text.\n * @throws IOException\n * @throws QueryException\n */\n public abstract void factory(Dictionary dictionary, Suggester suggester, IndexFacade aprioriIndex, String aprioriIndexField, Analyzer aprioriAnalyzer, IndexWriter.MaxFieldLength mfl) throws IOException, QueryException;\n \n }", "public EntityType getCreateEntity(DtoType dto) throws ClassNotFoundException, InstantiationException, IllegalAccessException;", "public static Object convertToDataTransferObject(Object dto, String prefix, Map<String, Object> record,\n Class<?> dtoType, String[] filter) {\n if (null != record && null != dtoType) {\n if (null == dto) {\n dto = newDataTransferObjectInstance(dtoType);\n }\n List<Field> dtoFields = ObjectUtils.getFields(dtoType, true);\n for (Field dtoField : dtoFields) {\n try {\n Object value = null;\n if (hasData(record, prefix, getEntityMappingFieldPath(dtoField))) {\n value = convertToFieldOfDataTransferObject(dto, prefix, record, dtoField, filter);\n }\n ObjectUtils.setValueForField(dto, dtoField.getName(), value, true);\n } catch (IllegalAccessException e) {\n throw new FieldInaccessibleException(\"Cannot set value for field \"\n + dtoType.getSimpleName() + \".\" + dtoField.getName(), e);\n }\n }\n }\n return dto;\n }", "private static Searcher createSearcher(String[] args) {\n if (args.length > 1 && \"duden\".equals(args[1])) {//Use DWDS by default, Duden only on explicit request\n return SearcherFactory.newDuden();\n } else {\n return SearcherFactory.newDwds();\n }\n }", "DistributedSearchType createDistributedSearchType();", "default <T> void constructTemplate(ElasticsearchIndexType indexType, String indexName, String docId){\n builder().append(String.format(\"{\\\"%s\\\":{\\\"_index\\\":\\\"%s\\\",\\\"_id\\\":\\\"%s\\\",\\\"_type\\\":\\\"_doc\\\",\\\"_retry_on_conflict\\\":%d}}\",\n indexType.getDisplayName(), indexName, docId, RETRY_ON_CONFLICT));\n }", "public NewDocumentRequestDto() {\n }", "public Indexer() {\n }", "SearchResultsType createSearchResultsType();", "private DTOFactory() {\r\n \t}", "public interface ElasticSearchCriteria {\n\n public void inGroup(String groupName);\n\n public void addParameterMatch(String parameter, String value);\n public void addParameterNotMatch(String parameter, String value);\n public void addParameterComparison(String parameter, String operator, Object value);\n public void addComplexFilter(JSONObject filter);\n\n public JSONObject toJSONObject();\n\n}", "interface Factory {\n KeyExtractor create(Class<?> entity);\n }", "public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch);", "SearchResponse search(Pageable pageable, QueryBuilder query, Collection<AggregationBuilder> aggregations);", "public static XContentBuilder toRiverMapping(String type, String analyzer) {\r\n\t\tXContentBuilder xbMapping = null;\r\n\t\ttry {\r\n xbMapping = jsonBuilder().prettyPrint().startObject();\r\n\r\n // Type\r\n xbMapping.startObject(type);\r\n\r\n // Manage _source\r\n // We store binary source as a stored field so we don't need it in _source\r\n xbMapping.startObject(\"_source\").array(\"excludes\", FsRiverUtil.Doc.ATTACHMENT).endObject();\r\n\r\n xbMapping.startObject(\"properties\");\r\n\r\n // Doc content\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.CONTENT, analyzer);\r\n\r\n // Doc source\r\n addBinary(xbMapping, FsRiverUtil.Doc.ATTACHMENT);\r\n\r\n // Meta\r\n xbMapping.startObject(FsRiverUtil.Doc.META).startObject(\"properties\");\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.AUTHOR);\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.TITLE);\r\n addDate(xbMapping, FsRiverUtil.Doc.Meta.DATE);\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.KEYWORDS);\r\n xbMapping.endObject().endObject(); // End Meta\r\n\r\n // File\r\n xbMapping.startObject(FsRiverUtil.Doc.FILE).startObject(\"properties\");\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.File.CONTENT_TYPE);\r\n addDate(xbMapping, FsRiverUtil.Doc.File.LAST_MODIFIED);\r\n addDate(xbMapping, FsRiverUtil.Doc.File.INDEXING_DATE);\r\n addLong(xbMapping, FsRiverUtil.Doc.File.FILESIZE);\r\n addLong(xbMapping, FsRiverUtil.Doc.File.INDEXED_CHARS);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.File.FILENAME);\r\n addNotIndexedString(xbMapping, FsRiverUtil.Doc.File.URL);\r\n xbMapping.endObject().endObject(); // End File\r\n\r\n // Path\r\n xbMapping.startObject(FsRiverUtil.Doc.PATH).startObject(\"properties\");\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.ENCODED);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.VIRTUAL);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.ROOT);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.REAL);\r\n xbMapping.endObject().endObject(); // End Path\r\n\r\n xbMapping.endObject().endObject().endObject(); // End Type\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Log when error\r\n\t\t}\r\n\t\treturn xbMapping;\r\n\t}", "IndexedDocument indexDocument(\n String name,\n String type,\n String id,\n CharSequence document,\n long epochMillisUtc) throws ElasticException;", "@Override\r\n JSONObject doPerform(HttpServletRequest req, HttpServletResponse response) throws Exception {\r\n JSONObject jo = new JSONObject();\r\n try {\r\n JSONObject json;\r\n if (req.getMethod().equals(\"POST\")) {\r\n String js = IOUtils.toString(req.getInputStream(), \"UTF-8\");\r\n json = new JSONObject(js);\r\n } else {\r\n json = new JSONObject(req.getParameter(\"json\"));\r\n }\r\n OfferRecord or = OfferRecord.fromJSON(json);\r\n JSONObject ret = new JSONObject(SolrIndexerCommiter.indexJSON(new JSONObject(JSON.toJSONString(or)), \"offersCore\"));\r\n\r\n// Indexer indexer = new Indexer();\r\n// indexer.indexWanted(or.doc_code,\r\n// UsersController.toKnihovna(req).getCode(),\r\n// or.chci);\r\n return ret;\r\n\r\n } catch (Exception ex) {\r\n LOGGER.log(Level.SEVERE, null, ex);\r\n jo.put(\"error\", ex.toString());\r\n }\r\n return jo;\r\n\r\n }", "public Dict findByDictType(String dictType);", "IndexedDocument indexDocument(String name, String type, String id, CharSequence document)\n throws ElasticException;", "public interface DepositSearchRepository extends ElasticsearchRepository<Deposit, Long> {\n}", "public interface DroitaccesDocumentSearchRepository extends ElasticsearchRepository<DroitaccesDocument, Long> {\n}", "@Test\n public void testCreateIndexMapping() throws Exception {\n String json = EsJsonUtils.generateItemMapping();\n System.out.println(json);\n elasticSearchDao.createIndexMapping(TENANT_ID+Constants.INDEX_SPLIT+ Constants.ITEM,json);\n }", "public static void main(String[] args) throws Exception {\n\t\tClient client = ESClient.createClientShield();\n//\t\tXContentBuilder builder = XContentFactory.jsonBuilder()\n//\t\t .startObject()\n//\t\t .field(\"user\", \"kimchy\")\n//\t\t .field(\"postDate\", new Date())\n//\t\t .field(\"message\", \"trying out Elasticsearch\")\n//\t\t .endObject();\n//\t\tIndexResponse response = client.prepareIndex(\"twitter\", \"tweet\")\n// .setSource(builder.string())\n// .get();\n\t\tclient.close();\n\t\t\n\t}", "public interface PerCompanySearchRepository extends ElasticsearchRepository<PerCompany, Long> {\n}", "TSearchQuery createSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);", "public interface IIndexBuilder {\n\n public IIndex getIndex( Class<?> searchable ) throws BuilderException;\n\n public IFieldVisitor getFieldVisitor();\n\n public void setFieldVisitor( IFieldVisitor visitor );\n\n}", "public SimpleIndexFactory() {\n\t}", "public static void main(String[] args) throws IOException {\n\n JSONObject log = new JSONObject();\n log.put(\"A\", \"A\");\n IndexRequest indexRequest = new IndexRequest().index(\"key\").type(\"doc\").id(UUID.randomUUID().toString())\n .source(log.toJSONString(), XContentType.JSON);\n Map<String, Object> map1 = indexRequest.sourceAsMap();\n map1.put(\"_id\", indexRequest.id());\n map1.forEach((k, v) -> {\n System.out.println(\"key:\" + k + \">v:\" + v);\n });\n\n }", "public SimpleIndexFactory(Directory directory,Analyzer analyzer) {\n\t\tsetDirectory(directory);\n\t\tsetAnalyzer(analyzer);\n\t}", "private Indexers()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n public static Object convertToFieldOfDataTransferObject(Object dto, String prefix, Map<String, Object> record, Field field, String[] filter) {\n Object reValue = null;\n if (null != record && null != field) {\n String entityFieldPath = getEntityMappingFieldPath(field);\n if (!StringUtils.isEmpty(prefix)) {\n entityFieldPath = prefix + Constants.DOT + entityFieldPath;\n }\n\n Class<?> fieldType = MappingUtils.getFieldType(field);\n if (validate(fieldType)) {\n Object innerDTO = null;\n try {\n if (ObjectUtils.fieldIsCollection(field)) {\n Collection collection = ObjectUtils.getValueOfField(dto, field.getName(), Collection.class);\n if (null == collection) {\n collection = ObjectUtils.newInstanceCollection(field.getType());\n } else {\n for (Object obj : collection) {\n String keyOne = getKey(fieldType, obj);\n String keyTwo = getKey(entityFieldPath, fieldType, record);\n if (keyOne.equals(keyTwo)) {\n innerDTO = obj;\n break;\n }\n }\n }\n\n Object value = convertToDataTransferObject(innerDTO, entityFieldPath, record, fieldType, filter);\n\n if (null == innerDTO) {\n collection.add(value);\n }\n reValue = collection;\n } else {\n reValue = convertToDataTransferObject(null, entityFieldPath, record, fieldType, filter);\n }\n } catch (NoSuchMethodException e) {\n throw new ConstructorInvalidException(\"Cannot new collection instance for field \"\n + dto.getClass().getSimpleName() + \".\" + field.getName(), e);\n } catch (IllegalAccessException e) {\n throw new FieldInaccessibleException(\"Cannot get value for field \"\n + dto.getClass().getSimpleName() + \".\" + field.getName(), e);\n }\n } else if (MappingUtils.isKeepField(entityFieldPath, filter)) {\n Class<?> fieldConverter = getFieldConverterType(field);\n reValue = convertField(fieldConverter, record.get(entityFieldPath));\n }\n }\n return reValue;\n }", "public CalccustoRequest(UserContext userContext, Tenant tenant)\r\n\t{\r\n\t\tsuper(userContext, tenant);\r\n\t}", "void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "public interface TypeMedicationSearchRepository extends ElasticsearchRepository<TypeMedication, Long> {\n}", "public ServiceIndexesPerDateRecord() {\n super(ServiceIndexesPerDate.SERVICE_INDEXES_PER_DATE);\n }", "public generateIndex() {\n\n\t\tthis.analyzer = \"StandardAnalyzer\";\n\t}", "public interface WalletWithdrawalSearchRepository extends ElasticsearchRepository<WalletWithdrawal, Long> {\n}", "BlogdslFactory getBlogdslFactory();", "public String createDSIndex(String dsID, String dschemaID, String attriName);", "@SuppressWarnings(\"WeakerAccess\")\n public ClinicalTrialSearchEngine(String indexPath, String defaultFieldName,\n DocumentFactory<T> factory) {\n super(indexPath,\n new EnglishAnalyzer(),\n defaultFieldName,\n factory);\n }", "public interface IndexCreator {\n\n /**\n * Creates indexes for specified persistent entity\n *\n * @param type persistent entity class, e.g. class annotated {@link org.springframework.data.mongodb.core.mapping.Document}\n * @return empty {@link Mono}\n */\n Mono<Void> createIndexes(Class<?> type);\n\n /**\n * Creates indexes for all persistent entities presented in {@link org.springframework.data.mongodb.core.mapping.MongoMappingContext}\n *\n * @return empty {@link Mono}\n */\n Mono<Void> createIndexes();\n}", "public AgreementIndex indexOnCreate(AgreementRequest agreementRequest) {\r\n\t\t\r\n\t\tAgreement agreement = agreementRequest.getAgreement();\r\n\t\tRequestInfo requestInfo = agreementRequest.getRequestInfo();\r\n\t\tAgreementDetailsEs agreementDetailsEs = new AgreementDetailsEs();\r\n\t\tAgreementIndex agreementIndex = new AgreementIndex();\r\n\t\tDemand agreementDemand = null;\r\n\t\t\r\n\t\tAsset asset = assetRepository.getAsset(agreement.getAsset().getId(),agreement.getTenantId());\r\n\t\tAllottee allottee = allotteeRepository.getAllottee(agreement.getAllottee().getId(),agreement.getTenantId(),requestInfo);\r\n\t\tCity city = tenantRepository.fetchTenantByCode(agreement.getTenantId());\r\n\t\tif(agreement.getDemands() != null){\r\n\t\tagreementDemand = demandRepository.getDemandBySearch(agreement.getDemands().get(0), agreement.getTenantId());\r\n\t\tagreementIndex.setDemandDetails(getDemandDetails(agreementDemand.getDemandDetails()));\r\n\t\t}\r\n\t\tagreementDetailsEs.setAsset(asset);\r\n\t\tagreementDetailsEs.setAgreement(agreement);\r\n\t\tagreementDetailsEs.setAllottee(allottee);\r\n\t\tagreementDetailsEs.setCity(city);\r\n\t\tagreementDetailsEs.setBoundaryDetails(asset.getLocationDetails(), boundaryRepository.getBoundariesById(agreement,asset));\r\n\t\tif(agreementDemand != null){\r\n\t\tlogger.info(\"setting rent details\");\r\n\t\tagreementDetailsEs.setRent(agreementDemand.getDemandDetails(),getCurrentInstallment(agreementRequest),propertiesManager.getDemandReasonRent());\r\n\t\tlogger.info(\"rent details are added to indexer\");\r\n\t\t}\r\n\t\tagreementIndex.setAgreementDetails(agreementDetailsEs);\r\n\t\t\r\n\t\treturn agreementIndex;\r\n\t}", "private static void addKeywordTypeToIndexField(String fieldName, Map<String, Object> indexFieldProperties) {\n // create keyword type property\n Map<String, Object> keywordTypeProperty = new HashMap<>();\n keywordTypeProperty.put(\"type\", \"keyword\");\n addFieldMapping(fieldName, keywordTypeProperty, indexFieldProperties);\n }", "public SearchDocuments(String indexPath) throws IOException{\r\n this.setIndexPath(indexPath); \r\n \r\n //TO DO : add config.properties file\r\n //read configuration file and update static variables adequately\r\n// readConf();\r\n\r\n // Supported index Fields and their pubmed counterpart (\"Title\",\"ArticleTitle\") \r\n supportedIndexFields.put(\"Title\", \"ArticleTitle\");\r\n supportedIndexFields.put(\"TI\", \"ArticleTitle\");\r\n supportedIndexFields.put(\"Abstract\", \"AbstractText\");\r\n supportedIndexFields.put(\"AB\", \"AbstractText\");\r\n supportedIndexFields.put(\"PMID\", \"PMID\");\r\n supportedIndexFields.put(\"UID\", \"PMID\");\r\n //TO DO : add all supported index fields\r\n //TO DO : special words (i.e. nothascommenton etc) \r\n \r\n // Lucene objects\r\n \r\n /* Sorting */\r\n // Fields used for reverse chronological sorting of results\r\n // This Fields are indexed with no tokenization (for each element a StringField AND a SortedDocValuesField are added)\r\n // Using SortField.Type.STRING is valid (as an exception) beacause years are 4-digit numbers resulting in identical String-sorting and number-sorting.\r\n SortField sortFieldYear = new SortField(\"PubDate-Year\", SortField.Type.STRING, true);\r\n \r\n //TO DO : make custom comparators for the rest fields where lexilogical comparison is not valid\r\n // OR, store Pud Date as Date and use date comparison\r\n // Idealy one \"complex-field\" should be used for sorting, taking into account Year, Month, Day, Season and MedlineDate together)\r\n// SortField sortFieldMonth = new SortField(\"PubDate-Month\",SortField.Type.STRING,true);\r\n// SortField sortFieldDay = new SortField(\"PubDate-Day\",SortField.Type.STRING,true);\r\n// SortField sortFieldSeason = new SortField(\"PubDate-Season\",SortField.Type.STRING,true);\r\n// SortField sortFieldMedlineDate = new SortField(\"PubDate-MedlineDate\",SortField.Type.STRING,true);\r\n// this.setSort(new Sort(sortFieldYear, sortFieldMonth, sortFieldDay, sortFieldSeason, sortFieldMedlineDate));\r\n this.setSort(new Sort(sortFieldYear));\r\n \r\n /* Reading the index */\r\n// this.setReader(DirectoryReader.open(FSDirectory.open(Paths.get(getIndexPath()))));\r\n this.setReader(DirectoryReader.open(MMapDirectory.open(Paths.get(getIndexPath()))));\r\n this.setSearcher(new IndexSearcher(getReader()));\r\n this.setAnalyzer(new StandardAnalyzer());\r\n \r\n /* Caching */\r\n // these cache and policy instances can be shared across several queries and readers\r\n // it is fine to eg. store them into static variables\r\n // TO DO: Use stored (old) expert-queries (from mongoDB) and MESH terms to \"prepare\" cache.\r\n queryCache = new LRUQueryCache(maxNumberOfCachedQueries, maxRamBytesUsed);\r\n// defaultCachingPolicy = new UsageTrackingQueryCachingPolicy();\r\n defaultCachingPolicy = new QueryCachingPolicy.CacheOnLargeSegments(minIndexSize, minSizeRatio);\r\n this.getSearcher().setQueryCache(queryCache);\r\n this.getSearcher().setQueryCachingPolicy(defaultCachingPolicy);\r\n \r\n /* All fields as default for search */\r\n Iterator <String> allFieldsIterator = org.apache.lucene.index.MultiFields.getFields(reader).iterator();\r\n ArrayList <String> a = new ArrayList();\r\n String current = \"\";\r\n while(allFieldsIterator.hasNext()){\r\n current = allFieldsIterator.next();\r\n if(!current.startsWith(\"PubDate-\")){\r\n a.add(current);\r\n }\r\n }\r\n \r\n String[] allFields = new String[a.size()];\r\n allFields = a.toArray(allFields); //All index fields to be used as default search fields\r\n this.setParser( new MultiFieldQueryParser( allFields, getAnalyzer())); \r\n }", "public KeyedFilter(StreamInput in) throws IOException {\n key = in.readString();\n filter = in.readNamedWriteable(QueryBuilder.class);\n }", "void createSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO);", "public interface EvDiagramSearchRepository extends ElasticsearchRepository<EvDiagram, Long> {\n}", "public interface MedicalCaseSearchRepository extends ElasticsearchRepository<MedicalCase, Long> {\n}", "private XContentBuilder prepareLoanIndexMapping() throws IOException {\n\t\tXContentBuilder loanMapping = XContentFactory.jsonBuilder()\n\t\t\t\t// entity..\n\t\t\t\t.startObject().startObject(TYPE_ENTITY).startObject(PROPERTIES)\n\t\t\t\t// identification no..\n\t\t\t\t.startObject(Tag.IDENTIFICATION_NO).field(TYPE, KEYWORD).endObject()\n\t\t\t\t// name..\n\t\t\t\t.startObject(Tag.NAME).field(TYPE, TEXT).endObject()\n\t\t\t\t// surname..\n\t\t\t\t.startObject(Tag.SURNAME).field(TYPE, TEXT).endObject()\n\t\t\t\t// monthly income..\n\t\t\t\t.startObject(Tag.MONTHLY_INCOME).field(TYPE, DOUBLE).endObject()\n\t\t\t\t// phone no..\n\t\t\t\t.startObject(Tag.PHONE_NO).field(TYPE, TEXT).endObject()\n\t\t\t\t// credit limit..\n\t\t\t\t.startObject(Tag.CREDIT_RESULT).field(TYPE, BOOLEAN).endObject()\n\t\t\t\t// credit limit..\n\t\t\t\t.startObject(Tag.CREDIT_LIMIT).field(TYPE, DOUBLE).endObject()\n\t\t\t\t// credit score..\n\t\t\t\t.startObject(Tag.CREDIT_SCORE).field(TYPE, DOUBLE).endObject().endObject().endObject().endObject();\n\t\treturn loanMapping;\n\t}", "public interface FiltreSearchRepository extends ElasticsearchRepository<Filtre, Long> {\n}", "public interface ElasticsearchTemplate {\n\n /**\n * Logback logger.\n */\n final static Logger logger = LoggerFactory.getLogger(ElasticsearchTemplate.class);\n\n /**\n * Constant prefix.\n */\n final String PREFIX = \"_\";\n\n /**\n * Constant default doc type for default _doc.\n */\n final String DEFAULT_DOC = \"_doc\";\n\n /**\n * Constant retry on conflict for default three times.\n */\n final Integer RETRY_ON_CONFLICT = 3;\n\n /**\n * Constant elasticsearch template doc as upsert for default true.\n */\n final Boolean DOC_AS_UPSERT = true;\n\n /**\n * Constant elasticsearch template doc basic system properties.\n */\n final String [] templateProperties = {\n \"index\", \"id\", \"type\"\n };\n\n /**\n * Judge current elasticsearch template whether exists.\n * @return no exists.\n */\n default Boolean isEmpty(){\n return builder().length() == 0;\n }\n\n ThreadLocal<StringBuilder> templateBuilder = new ThreadLocal<>();\n\n /**\n * Build or Reset current elasticsearch template.\n */\n default void refactoring() {\n templateBuilder.set(new StringBuilder());\n }\n\n /**\n * Get current elasticsearch template.\n * @return current elasticsearch template.\n */\n default StringBuilder builder() {\n return templateBuilder.get();\n }\n\n /**\n * Construct a elasticsearch template basic system properties.\n * @param indexType Current elasticsearch index type.\n * @param templateProperty Current elasticsearch template property.\n * @param <T> Serializable.\n */\n default <T> void constructTemplate(ElasticsearchIndexType indexType, T templateProperty){\n builder().append(String.format(\"{\\\"%s\\\":\", indexType.getDisplayName()));\n java.lang.Class<?> templatePropertyClass = templateProperty.getClass();\n java.lang.invoke.MethodHandles.Lookup lookup = MethodHandles.lookup();\n try {\n for (String templateProp : templateProperties) {\n VarHandle varHandle = lookup.findVarHandle(templatePropertyClass, PREFIX + templateProp, String.class);\n Object value = varHandle.get(templateProperty);\n if(StringUtils.isEmpty(value)){\n if(templateProp.equals(\"type\")){\n value = PREFIX + DEFAULT_DOC;\n }else if(templateProp.equals(\"id\")){\n value = UUID.randomUUID().toString();\n }\n }\n if(!StringUtils.isEmpty(value)){\n builder().append(String.format(\"\\\"%s%s\\\":\\\"%s\\\"\", PREFIX, templateProp, value));\n }\n }\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (NoSuchFieldException e) {\n e.printStackTrace();\n }\n builder().append(\"}\");\n }\n\n /**\n * Construct a elasticsearch template basic system properties.\n * @param indexType Current elasticsearch index type.\n * @param indexName Current elasticsearch template property.\n * @param docId Current elasticsearch template doc id.\n * @param <T> Serializable.\n */\n default <T> void constructTemplate(ElasticsearchIndexType indexType, String indexName, String docId){\n builder().append(String.format(\"{\\\"%s\\\":{\\\"_index\\\":\\\"%s\\\",\\\"_id\\\":\\\"%s\\\",\\\"_type\\\":\\\"_doc\\\",\\\"_retry_on_conflict\\\":%d}}\",\n indexType.getDisplayName(), indexName, docId, RETRY_ON_CONFLICT));\n }\n\n /**\n * Append property of Current Elasticsearch index to String builder.\n * @param propertyName property Name.\n * @param propertyValue property Value.\n */\n default void append(String propertyName, Object propertyValue){\n builder().append(String.format(\"\\\"%s\\\":\\\"%s\\\"\",propertyName, URLDecoder.decode(URLEncoder.encode(propertyValue.toString(), Charset.forName(\"UTF-8\")), Charset.forName(\"UTF-8\")).replace(\"%0A\", \"\")));\n }\n\n /**\n * Append current template properties of Current Elasticsearch index to String builder.\n * @param cursor a query cursor.\n * @param templateProperties current template properties.\n */\n default void append(QueryCursor cursor, String... templateProperties){\n int i = 0, len = templateProperties.length;\n for (; i < len; i++) {\n String propertyName = templateProperties[i];\n String value = null;\n try {\n value = cursor.getString(propertyName);\n }catch (Throwable t){\n logger.error(\"according column name to result set to get column value find a fail, {}\", t);\n }\n if(StringUtils.isEmpty(value)){\n value = \"\";\n }\n append(propertyName, value);\n builder().append(\",\");\n }\n }\n\n /**\n * According query cursor and index name and template properties to created a elasticsearch template.\n * @param cursor a query cursor.\n * @param indexName Current index name.\n * @param templateProperties Current template properties.\n * @throws SQLException Throw SQL exception.\n */\n void create(QueryCursor cursor, String indexName, String... templateProperties) throws SQLException;\n\n}", "public abstract Query<T> buildFilter(Query<T> builder, T exampleObj);", "public interface SaldoAppSearchRepository extends ElasticsearchRepository<SaldoApp, Long> {\n}", "public interface MedCheckDetSearchRepository extends ElasticsearchRepository<MedCheckDet, Long> {\n}", "TSearchResults createSearchResults(TSearchQuery searchQuery);", "@Override\r\n\tpublic <T> SearchResult<T> search(String index, String type, String query, Class<T> clz) throws ElasticSearchException{\r\n\t\tQuery esQuery = getQuery(this.indexName, type, query);\r\n\t\tQueryResponse response = query(esQuery);\r\n\t\t\r\n\t\tSearchResult<T> result = new SearchResult<T>();\t\t\r\n\t\tresult.setHits(response.getHits(clz));\r\n\t\t\r\n\t\tif(response.hasAggregations())\r\n\t\t\tresult.setAggregations(response.getAggregations());\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public interface HrDepartmentHeadSetupSearchRepository extends ElasticsearchRepository<HrDepartmentHeadSetup, Long> {\n}", "private XContentBuilder createMappingObject() throws IOException {\n return XContentFactory.jsonBuilder()\n .startObject()\n .startObject(type)\n .startObject(ES_PROPERTIES)\n .startObject(\"externalId\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"sourceUri\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"kind\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"name\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"fields\")\n .field(ES_TYPE, ES_TYPE_NESTED)\n .startObject(ES_PROPERTIES)\n .startObject(\"name\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .startObject(\"value\")\n .field(ES_TYPE, ES_TYPE_STRING)\n .endObject()\n .endObject()\n .endObject()\n .endObject()\n .endObject()\n .endObject();\n }", "public void addDocument(Document d) throws IndexerException {\n\t\t\n\t//if (!isvaliddir) {System.out.println(\"INVALID PATH/execution !\");return;}\n\t\n\t\n\t//Tokenizing\n\t//one thgread\n\tDocID did=new DocID(d.getField(FieldNames.FILEID),\n\t\t\td.getField(FieldNames.CATEGORY),\n\t\t\td.getField(FieldNames.AUTHOR));\n\t\n\tTokenStream stream=tokenize(FieldNames.CATEGORY,d);\n\tAnalyzer analyz=analyze(FieldNames.CATEGORY, stream);\n\tCategoryIndex.getInst().doIndexing(did.getdID(), stream);\n\t/*\t}catch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);\n\t}\n\ttry{*/TokenStream stream1=tokenize(FieldNames.AUTHOR,d);\n\tAnalyzer analyz1=analyze(FieldNames.AUTHOR, stream1);\n\tAuthorIndex.getInst().doIndexing(did.getdID(), stream1);\n\t/*}catch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);}\n\ttry{*/TokenStream stream2=tokenize(FieldNames.PLACE,d);\n\tAnalyzer analyz2=analyze(FieldNames.PLACE, stream2);\n\tPlaceIndex.getInst().doIndexing(did.getdID(), stream2);\n/*}catch(Exception e)\n\t{\n\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t);}\n\ttry{*/tkizer = new Tokenizer();\n\tTokenStream stream3=tokenize(FieldNames.CONTENT,d);\n\tfactory = AnalyzerFactory.getInstance();\n\tAnalyzer analyz3=analyze(FieldNames.CONTENT, stream3);\n\tnew Indxr(IndexType.TERM).doIndexing(did, stream3);\n\t/*}\tcatch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);}\n\t*/\n\tdocs.add(did==null?\" \":did.toString());\n\t \n\t\na_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.AUTHOR);\nc_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.CATEGORY);\np_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.PLACE);\nt_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.TERM);\n\t\t}", "public interface PaymentSettingsSearchRepository extends ElasticsearchRepository<PaymentSettings, Long> {\n}", "@Cacheable(value = \"getTypeDescription\", key = \"{#root.target.dateIndexTableName,#root.target.auths,#dateType,#begin,#end,#datatypeFilter}\",\n cacheManager = \"dateIndexHelperCacheManager\")\n public DateTypeDescription getTypeDescription(String dateType, Date begin, Date end, Set<String> datatypeFilter) throws TableNotFoundException {\n log.debug(\"cache fault for getTypeDescription(\" + dateIndexTableName + \", \" + auths + \", \" + dateType + \", \" + begin + \", \" + end + \", \"\n + datatypeFilter + \")\");\n if (log.isTraceEnabled()) {\n this.showMeDaCache(\"before getTypeDescription\");\n }\n long startTime = System.currentTimeMillis();\n\n DateTypeDescription desc = new DateTypeDescription();\n\n BatchScanner bs = ScannerHelper.createBatchScanner(client, dateIndexTableName, auths, numQueryThreads);\n try {\n\n // scan from begin to end\n bs.setRanges(Arrays.asList(new Range(DateIndexUtil.format(begin), DateIndexUtil.format(end) + '~')));\n\n // restrict to our date type\n bs.fetchColumnFamily(new Text(dateType));\n\n Iterator<Entry<Key,Value>> iterator = bs.iterator();\n\n while (iterator.hasNext()) {\n Entry<Key,Value> entry = iterator.next();\n Key k = entry.getKey();\n\n String[] parts = StringUtils.split(k.getColumnQualifier().toString(), '\\0');\n if (datatypeFilter == null || datatypeFilter.isEmpty() || datatypeFilter.contains(parts[1])) {\n desc.fields.add(parts[2]);\n String date = parts[0];\n if (desc.dateRange[0] == null) {\n desc.dateRange[0] = date;\n desc.dateRange[1] = date;\n } else {\n if (date.compareTo(desc.dateRange[0]) < 0) {\n desc.dateRange[0] = date;\n }\n if (date.compareTo(desc.dateRange[1]) > 0) {\n desc.dateRange[1] = date;\n }\n }\n }\n }\n } finally {\n bs.close();\n }\n\n // if the dates are still empty, then default to the incoming dates\n if (desc.dateRange[0] == null) {\n desc.dateRange[0] = DateIndexUtil.format(begin);\n desc.dateRange[1] = DateIndexUtil.format(end);\n }\n\n if (log.isDebugEnabled()) {\n long endTime = System.currentTimeMillis();\n log.debug(\"getTypeDescription from table: \" + dateIndexTableName + \", \" + auths + \", \" + dateType + \", \" + begin + \", \" + end + \", \"\n + datatypeFilter + \" returned \" + desc + \" in \" + (endTime - startTime) + \"ms\");\n }\n\n return desc;\n }", "public MagicSearch createMagicSearch();", "public Dto() {\n \t\n }", "public interface OptionTypeSearchRepository extends ElasticsearchRepository<OptionType, Long> {\n}", "SearchResponse search(Pageable pageable, QueryBuilder query, AggregationBuilder aggregation);", "public interface ILuceneIndexDAO extends IStatefulIndexerSession {\n // ===================================================================\n // The domain of indexing creates a separation between\n // readers and writers. In lucene, these are searchers\n // and writers. This DAO creates the more familiar DAO-ish interface\n // for developers to use and attempts to hide the details of\n // the searcher and write.\n // Calls are stateless meaning calling a find after a save does\n // not guarantee data will be reflected for the instance of the DAO\n // ===================================================================\n\n /**\n * Updates a document by first deleting the document(s) containing a term and then adding the new document. A Term is created by termFieldName, termFieldValue.\n *\n * @param termFieldName - Field name of the index.\n * @param termFieldValue - Field value of the index.\n * @param document - Lucene document to be updated.\n * @return - True for successful addition.\n */\n boolean saveDocument(String termFieldName, String termFieldValue, Document document);\n\n /**\n * Generates a BooleanQuery from the given fields Map and uses it to delete the documents matching in the IndexWriter.\n *\n * @param fields - A Map data structure containing a field(Key) and text(value) pair.\n * @return - True for successful deletion.\n */\n boolean deleteDocuments(Map<String, String> fields);\n\n /**\n * Find the documents in the IndexSearcher matching the Terms generated from fields.\n *\n * @param fields - A Map data structure contains the field(Key) and text(value).\n * @return - Collection of Documents obtained from the search.\n */\n Set<Document> findDocuments(Map<String, String> fields);\n\n /**\n * Find the documents in the IndexSearcher matching the Terms generated from fields. Offset is the starting position for the search and numberOfResults\n * is the length from offset position.\n *\n * @param fields - A Map data structure containing a field(Key) and text(value) pair.\n * @param offset - Starting position of the search.\n * @param numberOfResults - Number of documents to be searched from an offset position.\n * @return - Collection of Documents obtained from the search.\n */\n Set<Document> findDocuments(Map<String, String> fields, int offset, int numberOfResults);\n\n /**\n * Return the count of the documents present in the IndexSearcher.\n *\n * @return - Integer representing the count of documents.\n */\n int getDocumentCount();\n\n}", "private ScoreCardSearchDTO populateSearchDataForIndex(String orgId, String toolId, String projectId) {\n\t\tMetricSearchDTO mData = null;\n\t\tArrayList<MetricSearchDTO> mList = new ArrayList<MetricSearchDTO>();\n\t\tScoreCardSearchDTO srchData = new ScoreCardSearchDTO();\n\t\tsrchData.setToolId(toolId);\n\t\tsrchData.setOrgId(orgId);\n\t\tsrchData.setProjectId(projectId);\n\t\tsrchData.setQuesDetailsReq(true);\n\t\tmData = new MetricSearchDTO();\n\t\tmData.setEntityType(CommonConstants.ORGANISATION);\n\t\tmData.setEntityIdReq(true);\n\t\tmData.setEntityId(orgId);\n\t\tmData.setDimensionType(CommonConstants.RESPONSE_METRIC);\n\t\tmData.setDimIdReq(false);\n\t\tmData.setMetricName(CommonConstants.OTEMPS);\n\t\tmList.add(mData);\n\t\tsrchData.setMetricList(mList);\n\t\tlogger.debug(\"populateSearchDataForIndex: SearchData \" + srchData);\n\t\treturn srchData;\n\t}", "@Override\r\n\tpublic List<CatelistDto> Getsearch(SearchDto dto) throws Exception {\n\t\treturn searchdao.Getsearch(dto);\r\n\t}", "Documentable createDocumentable();", "public interface ISearchEngine {\n\n enum SearchParam {\n CORE,\n EXPERIMENT,\n HOST,\n PORT\n }\n\n /**\n * Query engine for searching relevant documents\n * @return\n */\n SearchResponse query(SearchRequest request, Map<SearchParam, String> params);\n\n /**\n * Query search engine for spell correction\n * @param request: spell check request\n * @return\n */\n SpellResponse spellQuery(SearchRequest request, Map<SearchParam, String> params);\n}", "@Ignore \n @Test\n public void testPutMappingToIndex() {\n System.out.println(\"putMappingToIndex\");\n \n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n String indexName = \"datastore_100_1_data_event_yearmonth_000000_1\";\n String indexType = \"AAA666_type\";\n \n try\n { \n ESUtil.createIndexWithoutType(client, indexName);\n \n DataobjectType dataobjectType = Util.getDataobjectTypeByIndexTypeName(platformEm, indexType);\n\n XContentBuilder typeMapping = ESUtil.createTypeMapping(platformEm, dataobjectType, true);\n \n ESUtil.putMappingToIndex(client, indexName, indexType, typeMapping);\n }\n catch(Exception e)\n {\n System.out.print(\" failed! e=\"+e);\n }\n }", "public EntityType initUpdateEntity(DtoType dto) throws ClassNotFoundException, IllegalArgumentException, IllegalAccessException;", "ExchangeRateDto getByDate(ExchangeRateDateFilter filter);", "public abstract D convertToDto(T entity);", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "public interface ElasticSearchClientService {\n\n public void add(TodoItem todoItem);\n\n public String search(String searchString);\n\n public void update(String id, TodoItem todoItem);\n\n public void delete(String id);\n\n}", "FieldType createFieldType();", "public interface OrderConsigneeSearchRepository extends ElasticsearchRepository<OrderConsignee, Long> {\n}", "public void createIndex() {\n String indexName = INDEX_BASE + \"-\" +\n LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyyMMddHHmmss\"));\n\n Settings settings = Settings.builder()\n .put(\"number_of_shards\", 1)\n .put(\"number_of_replicas\", 0)\n .build();\n CreateIndexRequest request = new CreateIndexRequest(indexName, settings);\n\n String mapping = \"{\\n\" +\n \" \\\"article\\\": {\\n\" +\n \" \\\"properties\\\": {\\n\" +\n \" \\\"title\\\": {\\n\" +\n \" \\\"type\\\": \\\"text\\\"\\n\" +\n \" },\\n\" +\n \" \\\"author\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"issue\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"link\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"description\\\": {\\n\" +\n \" \\\"type\\\": \\\"text\\\"\\n\" +\n \" },\\n\" +\n \" \\\"postDate\\\": {\\n\" +\n \" \\\"type\\\": \\\"date\\\",\\n\" +\n \" \\\"format\\\": \\\"yyyy-MM-dd\\\"\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\";\n\n request.mapping(\"article\", mapping, XContentType.JSON);\n request.alias(new Alias(INDEX_BASE));\n\n try {\n CreateIndexResponse createIndexResponse = this.client.admin().indices().create(request).get();\n if (!createIndexResponse.isAcknowledged()) {\n throw new ElasticExecutionException(\"Create java_magazine index was not acknowledged\");\n }\n } catch (InterruptedException | ExecutionException e) {\n logger.error(\"Error while creating an index\", e);\n throw new ElasticExecutionException(\"Error when trying to create an index\");\n }\n }", "default WorkdayEndpointBuilder tenant(String tenant) {\n doSetProperty(\"tenant\", tenant);\n return this;\n }", "public interface SearchTypeSearchRepository extends ElasticsearchRepository<SearchType, Long> {\n}", "default WorkdayEndpointConsumerBuilder tenant(String tenant) {\n doSetProperty(\"tenant\", tenant);\n return this;\n }", "WordDtoImpl convertFromDomainImpl(Word word);", "public interface BoostingIndexer {\r\n\t/**\r\n\t * Add a new {@link Document} to the Index or update an existing one.<br> \r\n\t * When adding a document, its dynamic boosts values must be set. Specifying the values is accomplished by\r\n\t * passing the dynamicBoosts parameter with a Map from the boost index (zero based) to the boost value (a <code>double</code>).\r\n\t * In this map, no index can be larger than the number of available boosts the {@link IndexEngine}'s {@link Scorer} has, minus one (since it is zero based).\r\n\t * The value for any available boost index not specified in the map is defaulted to zero. \r\n\t * \r\n\t * @param docId external (customer) identifier of the document to add\r\n\t * @param document the {@link Document} to add\r\n\t * @param timestampBoost a <code>float</code> representing the time of the document (the younger the document, the larger the boost should be)\r\n\t * @param dynamicBoosts a Map from the boost index (zero based) to the boost value (a <code>double</code>).\r\n\t * @throws {@link IllegalArgumentException} if an invalid index is passed for a boost \r\n\t */\r\n\tpublic void add(String docId, Document document, int timestampBoost, Map<Integer, Double> dynamicBoosts);\r\n\r\n\t/**\r\n\t * Remove a document from the index.\r\n\t * \r\n\t * @param docId external (customer) identifier of the document to remove\r\n\t */\r\n\tpublic void del(String docId);\r\n\t\r\n\t/**\r\n\t * Update the special boost for the timestamp\r\n\t * \r\n\t * @param docId external (customer) identifier of the document\r\n\t * @param timestampBoost a <code>float</code> representing the time of the document (the younger the document, the larger the boost should be)\r\n\t */\r\n\tpublic void updateTimestamp(String docId, int timestampBoost);\r\n\t\r\n\t/**\r\n\t * Update one or more of the dynamic boosts values.\r\n\t * \r\n\t * @param docId external (customer) identifier of the document\r\n\t * @param updatedBoosts a Map from the boost index (zero based) to the boost value (a <code>double</code>). No index can be larger than the available boosts the {@link IndexEngine}'s {@link Scorer} has, minus one (since it is zero based)\r\n\t * @throws {@link IllegalArgumentException} if an invalid index is passed for a boost \r\n\t */\r\n\tpublic void updateBoosts(String docId, Map<Integer, Double> updatedBoosts);\r\n\r\n public void updateCategories(String docId, Map<String, String> categories);\r\n\t/**\r\n\t * Promote a document to be the first result for a specific query.\r\n\t * \r\n\t * @param docId external (customer) identifier of the document\r\n\t * @param query the exact query the document must be promoted to the first result for\r\n\t */\r\n public void promoteResult(String docId, String query);\r\n\r\n /**\r\n * Dumps the current state to disk.\r\n */\r\n public void dump() throws IOException;\r\n\r\n public void addScoreFunction(int functionIndex, String definition) throws Exception;\r\n\r\n public void removeScoreFunction(int functionIndex);\r\n\r\n public Map<Integer,String> listScoreFunctions();\r\n \r\n public Map<String, String> getStats();\r\n\r\n}", "indexSet createindexSet();", "public interface BlogRepository extends ElasticsearchRepository<Blog, String>{\n\n /**\n * 分页查询博客(去重)\n * @param title\n * @param tag\n * @param content\n * @return\n */\n Page<Blog> findDistinctBlogByTitleContainingOrTagContainingOrContentContaining(String title, String tag, String content, Pageable pageable);\n\n}", "public void search(Indexer indexer, CityIndexer cityIndexer, Ranker ranker, String query, boolean withSemantic, ArrayList<String> chosenCities, ObservableList<String> citiesByTag, boolean withStemming, String saveInPath, String queryId, String queryDescription) {\n String[] originalQueryTerms = query.split(\" \");\n String originQuery = query;\n docsResults = new HashMap<>();\n parser = new Parse(withStemming, saveInPath, saveInPath);\n HashSet<String> docsOfChosenCities = new HashSet<>();\n query = \"\" + query + queryDescription;\n HashMap<String, Integer> queryTerms = parser.parseQuery(query);\n HashMap<String, ArrayList<Integer>> dictionary = indexer.getDictionary();\n if (!withStemming){\n setDocsInfo(saveInPath + \"\\\\docsInformation.txt\");\n }\n else{\n setDocsInfo(saveInPath + \"\\\\docsInformation_stemming.txt\");\n }\n\n\n //add semantic words of each term in query to 'queryTerms'\n if(withSemantic) {\n HashMap<String,ArrayList<String>> semanticWords = ws.connectToApi(originQuery);\n }\n\n //give an ID to query if it's a regular query (not queries file)\n if(queryId.equals(\"\")){\n queryId = \"\" + Searcher.queryID;\n Searcher.queryID++;\n }\n\n String postingDir;\n if (!withStemming) {\n postingDir = \"\\\\indexResults\\\\postingFiles\";\n } else {\n postingDir = \"\\\\indexResults\\\\postingFiles_Stemming\";\n }\n int pointer = 0;\n\n //find docs that contain the terms in the query in their text\n HashMap<String, Integer> queryTermsIgnoreCase = new HashMap<>();\n for (String term : queryTerms.keySet()) {\n String originTerm = term;\n if (!dictionary.containsKey(term.toUpperCase()) && !dictionary.containsKey(term.toLowerCase())) {\n continue;\n }\n if(dictionary.containsKey(term.toLowerCase())){\n term = term.toLowerCase();\n }\n else {\n term = term.toUpperCase();\n }\n queryTermsIgnoreCase.put(term,queryTerms.get(originTerm));\n pointer = dictionary.get(term).get(2);\n String chunk = (\"\" + term.charAt(0)).toUpperCase();\n\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + postingDir + \"\\\\posting_\" + chunk + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsResults'\n if(line != null) {\n findDocsFromLine(line, term);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //find docs that contain the chosen cities in their text\n for (String cityTerm : chosenCities) {\n if (!dictionary.containsKey(cityTerm) && !dictionary.containsKey(cityTerm.toLowerCase())) {\n continue;\n }\n if(dictionary.containsKey(cityTerm.toLowerCase())){\n cityTerm = cityTerm.toLowerCase();\n }\n pointer = dictionary.get(cityTerm).get(2);\n // char chunk = indexer.classifyToPosting(term).charAt(0);\n String chunk = (\"\" + cityTerm.charAt(0)).toUpperCase();\n\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + postingDir + \"\\\\posting_\" + chunk + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsOfChosenCities'\n String docs = line.substring(0, line.indexOf(\"[\") - 1); //get 'docsListStr'\n String[] docsArr = docs.split(\";\");\n for (String docInfo : docsArr) {\n String doc = docInfo.substring(0, docInfo.indexOf(\": \"));\n while(doc.charAt(0) == ' '){\n doc = doc.substring(1);\n }\n docsOfChosenCities.add(doc);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //find docs that contain the chosen cities in their city tag\n if(!chosenCities.isEmpty()){\n for (String cityDicRec: chosenCities) {\n //get pointer to posting from cityDictionary\n try {\n pointer = cityIndexer.getCitiesDictionary().get(cityDicRec);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n }\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + \"\\\\cityIndexResults\" + \"\\\\posting_city\" + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsOfChosenCities'\n String docs = line.substring(line.indexOf(\"[\") + 1, line.indexOf(\"]\")); //get 'docsListStr'\n String[] docsArr = docs.split(\"; \");\n for (String doc : docsArr) {\n docsOfChosenCities.add(doc);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n\n ranker.rank(docsResults, docsOfChosenCities, queryTermsIgnoreCase, dictionary, docsInfo,entities, queryId);\n }", "public interface SysDictDataMapper\n{\n /**\n * Query dictionary data page by condition\n * \n * @param dictData Dictionary data information\n * @return Dictionary data collection information\n */\n public List<SysDictData> selectDictDataList(SysDictData dictData);\n\n /**\n * Query dictionary data according to dictionary type\n * \n * @param dictType Dictionary type\n * @return Dictionary data collection information\n */\n public List<SysDictData> selectDictDataByType(String dictType);\n\n /**\n * Query dictionary data information according to dictionary type and dictionary key value\n * \n * @param dictType Dictionary type\n * @param dictValue Dictionary key\n * @return Dictionary tag\n */\n public String selectDictLabel(@Param(\"dictType\") String dictType, @Param(\"dictValue\") String dictValue);\n\n /**\n * Query information based on dictionary data ID\n * \n * @param dictCode Dictionary data ID\n * @return Dictionary data\n */\n public SysDictData selectDictDataById(Long dictCode);\n\n /**\n * Query dictionary data\n * \n * @param dictType Dictionary type\n * @return Dictionary data\n */\n public int countDictDataByType(String dictType);\n\n /**\n * Delete dictionary data information by dictionary ID\n * \n * @param dictCode Dictionary data ID\n * @return result\n */\n public int deleteDictDataById(Long dictCode);\n\n /**\n * Delete dictionary data in bulk\n * \n * @param ids Data to be deleted\n * @return result\n */\n public int deleteDictDataByIds(String[] ids);\n\n /**\n * New dictionary data information\n * \n * @param dictData Dictionary data information\n * @return result\n */\n public int insertDictData(SysDictData dictData);\n\n /**\n * Modify dictionary data information\n * \n * @param dictData Dictionary data information\n * @return result\n */\n public int updateDictData(SysDictData dictData);\n\n /**\n * Synchronously modify dictionary type\n * \n * @param oldDictType Old dictionary type\n * @param newDictType New and old dictionary types\n * @return result\n */\n public int updateDictDataType(@Param(\"oldDictType\") String oldDictType, @Param(\"newDictType\") String newDictType);\n}", "public Payment fromDto(PaymentRequestDTO dto) {\n Category category = categoryService.findById(dto.getCategoryId());\n PaymentType paymentType = paymentTypeService.findById(dto.getPaymentTypeId());\n Person person = personService.findById(dto.getOwnerId());\n //TODO: make a global date format\n DateTimeFormatter dateFm = DateTimeFormatter.ofPattern(\"yyyy-MM-d\");\n Payment payment = new Payment(category, dto.getAmountCents())\n .transactionDate(LocalDate.parse(dto.getTransactionDate(), dateFm))\n .person(person)\n .paymentType(paymentType);\n return payment;\n }", "public interface PermissionSearchRepository extends ElasticsearchRepository<Permission, Long> {\n}", "public IndexData generateIndexData(String orgId, String toolId, String projectId) {\n\n\t\tArrayList<ScoreCardDTO> scData = null;\n\t\tArrayList<IndexKPIData> kpiList = null;\n\t\tIndexKPIData kpiData = null;\n\n\t\tlogger.debug(\"generateIndexData: The input Parameters {\" + orgId + \",\" + toolId + \",\" + projectId + \"}\");\n\t\tIndexData indexData = new IndexData();\n\t\tindexData.setTitle(\"SST Brexit Index \");\n\t\tindexData.setType(\"Guage\");\n\t\tindexData.setDescription(\n\t\t\t\t\"SST Brexit Index (Combined Factor Score) is one of the Key Performance Indicator (KPI) expressed as a percentage score against the benchmark\");\n\n\t\t/*\n\t\t * ScoreCardDao scoreCardDao =\n\t\t * DataServiceFactory.getDaoFactoryInstance().getScoreCardDao(); //scData =\n\t\t * scoreCardDao.getSSTIndexKPIData(orgId, toolId, projectId); ScoreCardSearchDTO\n\t\t * srchData = populateSearchDataForKPIIndex(orgId, toolId, projectId); scData =\n\t\t * scoreCardDao.getScoreCardDetails(srchData);\n\t\t * \n\t\t * logger.debug(\" KPI Index Data from DB \" + scData.toString());\n\t\t * \n\t\t * kpiList = new ArrayList<>(); for (Iterator iterator = scData.iterator();\n\t\t * iterator.hasNext();) { ScoreCardDTO dbData = (ScoreCardDTO) iterator.next();\n\t\t * kpiData = new IndexKPIData(); if\n\t\t * (CommonConstants.RESPONSE_METRIC.equalsIgnoreCase(dbData.getDimensionType()))\n\t\t * { kpiData.setKpiName(dbData.getMetricName() + \" \" +\n\t\t * dbData.getResponseMetricData().getResponseMetricName()); } else {\n\t\t * kpiData.setKpiName(dbData.getMetricName()); }\n\t\t * kpiData.setKpiValue(dbData.getMetricValue());\n\t\t * kpiData.setKpiBenchmark(dbData.getBenchMark());\n\t\t * populateIndexStaticData(kpiData); kpiList.add(kpiData); }\n\t\t * \n\t\t * indexData.setKpiData(kpiList);\n\t\t */\n\n\t\tScoreCardSearchDTO searchdata = populateSearchDataForIndex(orgId, toolId, projectId);\n\t\tIndexKPIData indexStaticData = populateIndexStaticData();\n\t\tindexData = indexDashboardService.generateIndexData(searchdata, indexData, indexStaticData);\n\t\tlogger.debug(\"generateIndexData: Index data from the index service \" + indexData);\n\n\t\twriteToFileAndUpdateDashboard(indexData, orgId, toolId, projectId, CommonConstants.SSTBR_KPIINDEX_DASHBOARD_ID);\n\t\tlogger.debug(\"generateIndexData: Completed Writing the index json file for SST Brexit in the specified folder\");\n\n\t\treturn indexData;\n\t}", "public interface RelatedDocumentSearchRepository extends ElasticsearchRepository<RelatedDocument, Long> {\n}", "default WorkdayEndpointProducerBuilder tenant(String tenant) {\n doSetProperty(\"tenant\", tenant);\n return this;\n }", "@Override\n public void createIndex(String field, int type) {\n try {\n switch (type) {\n case 1:\n collection.createIndex(Indexes.ascending(field));\n break;\n case -1:\n collection.createIndex(Indexes.descending(field));\n break;\n default:\n collection.createIndex(Indexes.ascending(field));\n break;\n }\n } catch (MongoException e) {\n System.err.println(e.getCode() + \" \" + e.getMessage());\n }\n }", "private synchronized Analyzer getAnalizerPadrao() throws Exception{\r\n\t\t//TODO: ponto de acesso ao analizador usado na indexação e busca\r\n\t\tCharArraySet set = new CharArraySet(getStopWords(), false);\r\n//\t\treturn new ArabicAnalyzer(set);\r\n\t\treturn new MTDAnalyzer(set);\r\n\t}" ]
[ "0.56579524", "0.51336765", "0.4789629", "0.47443652", "0.47167933", "0.47076207", "0.46923736", "0.46709412", "0.4648345", "0.46293518", "0.46012333", "0.4594815", "0.45815456", "0.45794192", "0.45652428", "0.4542786", "0.453294", "0.45201677", "0.44971937", "0.44963014", "0.44918784", "0.44632038", "0.44538444", "0.44522172", "0.44455165", "0.4444747", "0.44434845", "0.44386572", "0.442682", "0.44137147", "0.4412321", "0.44074222", "0.44025427", "0.43838662", "0.4377055", "0.4376917", "0.4376763", "0.43616652", "0.4359036", "0.43583122", "0.43572274", "0.43471357", "0.4342939", "0.433868", "0.43377268", "0.43369877", "0.43096724", "0.43048605", "0.42946395", "0.42937356", "0.4287624", "0.42871872", "0.42540827", "0.42475152", "0.42470926", "0.42373756", "0.4227604", "0.42097312", "0.42085657", "0.42077786", "0.42072046", "0.4203745", "0.42025602", "0.41983905", "0.41969448", "0.41952354", "0.41933036", "0.41909158", "0.4184784", "0.41828313", "0.418115", "0.41766754", "0.4176219", "0.41757712", "0.417558", "0.41745207", "0.41731706", "0.4169066", "0.41665003", "0.41646382", "0.41644418", "0.41635036", "0.4155294", "0.4155004", "0.41527066", "0.41500923", "0.41429746", "0.41315472", "0.41259298", "0.41220886", "0.41214985", "0.41202265", "0.41159305", "0.41154552", "0.41147545", "0.41121545", "0.411004", "0.41084233", "0.41052732", "0.41003922" ]
0.9065199
0
public ElasticSearchDictator createSearchDictator(String indexName, String documentType, CummulativeDataRequestDto dto, String tenant) throws Exception ;
MultiSearchResponse executeMultiSearchRequest(List<SearchRequest> searchRequestList, Boolean primaryOrNot);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ElasticSearchDictator createSearchDictatorV2(AggregateRequestDto dto, String indexName, String documentType,\n\t\t\tString filterDateField);", "public abstract void factory(Dictionary dictionary, Suggester suggester, IndexFacade aprioriIndex, String aprioriIndexField, Analyzer aprioriAnalyzer, IndexWriter.MaxFieldLength mfl) throws IOException, QueryException;", "public EntityType getCreateEntity(DtoType dto) throws ClassNotFoundException, InstantiationException, IllegalAccessException;", "default <T> void constructTemplate(ElasticsearchIndexType indexType, String indexName, String docId){\n builder().append(String.format(\"{\\\"%s\\\":{\\\"_index\\\":\\\"%s\\\",\\\"_id\\\":\\\"%s\\\",\\\"_type\\\":\\\"_doc\\\",\\\"_retry_on_conflict\\\":%d}}\",\n indexType.getDisplayName(), indexName, docId, RETRY_ON_CONFLICT));\n }", "public interface Feeder {\n\n Client client();\n\n /**\n * Index document\n *\n * @param index the index\n * @param type the type\n * @param id the id\n * @param source the source\n * @return this\n */\n Feeder index(String index, String type, String id, String source);\n\n /**\n * Index document\n *\n * @param indexRequest the index request\n * @return this\n */\n Feeder index(IndexRequest indexRequest);\n\n /**\n * Delete document\n *\n * @param index the index\n * @param type the type\n * @param id the id\n * @return this\n */\n Feeder delete(String index, String type, String id);\n\n Feeder delete(DeleteRequest deleteRequest);\n\n\n}", "public static Map<String, Object> getDocumentMapping(String indexPrefix, String indexPostfix) {\n\n Map<String, Object> indexFieldProperties = new HashMap<String, Object>();\n\n if (indexPrefix.equals(EsConstants.GATEWAY_INDEX_NAME)) {\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_VERSION, indexFieldProperties);\n }\n // rule for gateway and manager\n if (indexPostfix.equals(EsConstants.INDEX_APIS)) {\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n }\n // rule for gateway and manager\n if (indexPostfix.equals(EsConstants.INDEX_CLIENTS)) {\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n }\n if (indexPrefix.equals(EsConstants.METRICS_INDEX_NAME)) {\n // set keyword types\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ORG_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ORG_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_PLAN_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_VERSION, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_VERSION, indexFieldProperties);\n\n addBooleanTypeToIndexField(EsConstants.ES_FIELD_ERROR, indexFieldProperties);\n addBooleanTypeToIndexField(EsConstants.ES_FIELD_FAILURE, indexFieldProperties);\n\n // set date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_REQUEST_START, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_REQUEST_END, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_API_START, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_API_END, indexFieldProperties);\n\n // set ip type\n addIpTypeToIndexField(EsConstants.ES_FIELD_REMOTE_ADDR, indexFieldProperties);\n }\n\n if (indexPrefix.equals(EsConstants.MANAGER_INDEX_NAME)) {\n\n switch (indexPostfix) {\n case EsConstants.INDEX_MANAGER_POSTFIX_API:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_API_VERSION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_STATUS, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_PUBLISHED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_RETIRED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_CLIENT:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_CLIENT_VERSION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_STATUS, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_PUBLISHED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_RETIRED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_AUDIT_ENTRY:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ENTITY_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ENTITY_TYPE, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_ORGANIZATION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n setFieldDataToIndexTextField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_USER:\n setFieldDataToIndexTextField(EsConstants.ES_FIELD_FULL_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_JOINED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_PLUGIN:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_GROUP_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ARTIFACT_ID, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_POLICY_DEF:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_CONTRACT:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_API_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_CLIENT_VERSION, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_PLAN:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_NAME, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_PLAN_VERSION:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_PLAN_ID, indexFieldProperties);\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_STATUS, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_LOCKED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_GATEWAY:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_MODIFIED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_ROLE:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n setFieldDataToIndexTextField(EsConstants.ES_FIELD_NAME, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_ROLE_MEMBERSHIP:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ORGANIZATION_ID, indexFieldProperties);\n // date types\n addDateTypeToIndexField(EsConstants.ES_FIELD_CREATED_ON, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_DEVELOPER:\n addKeywordTypeToIndexField(EsConstants.ES_FIELD_ID, indexFieldProperties);\n break;\n case EsConstants.INDEX_MANAGER_POSTFIX_METADATA:\n addDateTypeToIndexField(EsConstants.ES_FIELD_EXPORTED_ON, indexFieldProperties);\n addDateTypeToIndexField(EsConstants.ES_FIELD_IMPORTED_ON, indexFieldProperties);\n default:\n break;\n }\n }\n\n return indexFieldProperties;\n }", "IndexedDocument indexDocument(String name, String type, String id, CharSequence document)\n throws ElasticException;", "public Dict findByDictType(String dictType);", "IndexedDocument indexDocument(\n String name,\n String type,\n String id,\n CharSequence document,\n long epochMillisUtc) throws ElasticException;", "public NewDocumentRequestDto() {\n }", "public EntityType initUpdateEntity(DtoType dto) throws ClassNotFoundException, IllegalArgumentException, IllegalAccessException;", "public interface AprioriCorpusFactory {\n \n /**\n * Initializes and populates an a priori index with documents whos text is known to be correct.\n *\n * @param dictionary dictionary to extract data from.\n * @param suggester suggester used to navigate the dictionary.\n * @param aprioriIndex lucene index, will be created/reinitialized.\n * @param aprioriIndexField index field used to store the a priori text.\n * @param aprioriAnalyzer analyzer used to tokenize a priori text.\n * @throws IOException\n * @throws QueryException\n */\n public abstract void factory(Dictionary dictionary, Suggester suggester, IndexFacade aprioriIndex, String aprioriIndexField, Analyzer aprioriAnalyzer, IndexWriter.MaxFieldLength mfl) throws IOException, QueryException;\n \n }", "private Document createMapping() {\n return getIndexOperations().createMapping();\n }", "public DataHandler getDoc(String requestType, String billSysId, String accNo, String billNo, String issueDate, int pageLimit, int pageRange, String id, String pw) throws TelJIesRpcServiceFault, RemoteException {\n\t\tif(log.isDebugEnabled()){log.debug(\"Entering getDoc()\"+accNo+\" : \"+billNo+\" : \"+issueDate);}\n\t\t\n\t\tSystem.setProperty(\"javax.net.ssl.keyStore\", keyStore);\n System.setProperty(\"javax.net.ssl.keyStoreType\", keyStoreType);\n System.setProperty(\"javax.net.ssl.keyStorePassword\", keyStorePassword);\n System.setProperty(\"javax.net.ssl.trustStore\", trustStore);\n System.setProperty(\"javax.net.ssl.trustStoreType\", trustStoreType);\n System.setProperty(\"javax.net.ssl.trustStorePassword\", trustStorePassword);\n\t\t\n\t\tTelJIesRpcService_Impl locator = new TelJIesRpcService_Impl();\n\t\tStub stub = (Stub)locator.getTelJIesRpcServiceIFPort();\n\n\t\tif(requestType.equals(REQUEST_TYPE_BULK)){\n\t\t\tstub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,endpointAddress2);\n\t\t} else {\n\t\t\tstub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,endpointAddress1);\n\t\t}\n\t stub._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, username);\n\t stub._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, password);\n\t TelJIesRpcServiceIF wsAdapter = (TelJIesRpcServiceIF)stub;\n\t \t \n\t\tDataHandler handler = wsAdapter.getDoc(requestType, billSysId, accNo, billNo, issueDate, pageLimit, pageRange, id, pw);\n\t\tif(log.isDebugEnabled()){log.debug(\"Exiting getDoc() with : \"+handler);}\n\t\treturn handler;\n\t}", "public CalccustoRequest(UserContext userContext, Tenant tenant)\r\n\t{\r\n\t\tsuper(userContext, tenant);\r\n\t}", "Document getDocument(Long documentID, Integer type) throws EntityNotFoundException;", "DistributedSearchType createDistributedSearchType();", "public interface ElasticsearchTemplate {\n\n /**\n * Logback logger.\n */\n final static Logger logger = LoggerFactory.getLogger(ElasticsearchTemplate.class);\n\n /**\n * Constant prefix.\n */\n final String PREFIX = \"_\";\n\n /**\n * Constant default doc type for default _doc.\n */\n final String DEFAULT_DOC = \"_doc\";\n\n /**\n * Constant retry on conflict for default three times.\n */\n final Integer RETRY_ON_CONFLICT = 3;\n\n /**\n * Constant elasticsearch template doc as upsert for default true.\n */\n final Boolean DOC_AS_UPSERT = true;\n\n /**\n * Constant elasticsearch template doc basic system properties.\n */\n final String [] templateProperties = {\n \"index\", \"id\", \"type\"\n };\n\n /**\n * Judge current elasticsearch template whether exists.\n * @return no exists.\n */\n default Boolean isEmpty(){\n return builder().length() == 0;\n }\n\n ThreadLocal<StringBuilder> templateBuilder = new ThreadLocal<>();\n\n /**\n * Build or Reset current elasticsearch template.\n */\n default void refactoring() {\n templateBuilder.set(new StringBuilder());\n }\n\n /**\n * Get current elasticsearch template.\n * @return current elasticsearch template.\n */\n default StringBuilder builder() {\n return templateBuilder.get();\n }\n\n /**\n * Construct a elasticsearch template basic system properties.\n * @param indexType Current elasticsearch index type.\n * @param templateProperty Current elasticsearch template property.\n * @param <T> Serializable.\n */\n default <T> void constructTemplate(ElasticsearchIndexType indexType, T templateProperty){\n builder().append(String.format(\"{\\\"%s\\\":\", indexType.getDisplayName()));\n java.lang.Class<?> templatePropertyClass = templateProperty.getClass();\n java.lang.invoke.MethodHandles.Lookup lookup = MethodHandles.lookup();\n try {\n for (String templateProp : templateProperties) {\n VarHandle varHandle = lookup.findVarHandle(templatePropertyClass, PREFIX + templateProp, String.class);\n Object value = varHandle.get(templateProperty);\n if(StringUtils.isEmpty(value)){\n if(templateProp.equals(\"type\")){\n value = PREFIX + DEFAULT_DOC;\n }else if(templateProp.equals(\"id\")){\n value = UUID.randomUUID().toString();\n }\n }\n if(!StringUtils.isEmpty(value)){\n builder().append(String.format(\"\\\"%s%s\\\":\\\"%s\\\"\", PREFIX, templateProp, value));\n }\n }\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (NoSuchFieldException e) {\n e.printStackTrace();\n }\n builder().append(\"}\");\n }\n\n /**\n * Construct a elasticsearch template basic system properties.\n * @param indexType Current elasticsearch index type.\n * @param indexName Current elasticsearch template property.\n * @param docId Current elasticsearch template doc id.\n * @param <T> Serializable.\n */\n default <T> void constructTemplate(ElasticsearchIndexType indexType, String indexName, String docId){\n builder().append(String.format(\"{\\\"%s\\\":{\\\"_index\\\":\\\"%s\\\",\\\"_id\\\":\\\"%s\\\",\\\"_type\\\":\\\"_doc\\\",\\\"_retry_on_conflict\\\":%d}}\",\n indexType.getDisplayName(), indexName, docId, RETRY_ON_CONFLICT));\n }\n\n /**\n * Append property of Current Elasticsearch index to String builder.\n * @param propertyName property Name.\n * @param propertyValue property Value.\n */\n default void append(String propertyName, Object propertyValue){\n builder().append(String.format(\"\\\"%s\\\":\\\"%s\\\"\",propertyName, URLDecoder.decode(URLEncoder.encode(propertyValue.toString(), Charset.forName(\"UTF-8\")), Charset.forName(\"UTF-8\")).replace(\"%0A\", \"\")));\n }\n\n /**\n * Append current template properties of Current Elasticsearch index to String builder.\n * @param cursor a query cursor.\n * @param templateProperties current template properties.\n */\n default void append(QueryCursor cursor, String... templateProperties){\n int i = 0, len = templateProperties.length;\n for (; i < len; i++) {\n String propertyName = templateProperties[i];\n String value = null;\n try {\n value = cursor.getString(propertyName);\n }catch (Throwable t){\n logger.error(\"according column name to result set to get column value find a fail, {}\", t);\n }\n if(StringUtils.isEmpty(value)){\n value = \"\";\n }\n append(propertyName, value);\n builder().append(\",\");\n }\n }\n\n /**\n * According query cursor and index name and template properties to created a elasticsearch template.\n * @param cursor a query cursor.\n * @param indexName Current index name.\n * @param templateProperties Current template properties.\n * @throws SQLException Throw SQL exception.\n */\n void create(QueryCursor cursor, String indexName, String... templateProperties) throws SQLException;\n\n}", "public AgreementIndex indexOnCreate(AgreementRequest agreementRequest) {\r\n\t\t\r\n\t\tAgreement agreement = agreementRequest.getAgreement();\r\n\t\tRequestInfo requestInfo = agreementRequest.getRequestInfo();\r\n\t\tAgreementDetailsEs agreementDetailsEs = new AgreementDetailsEs();\r\n\t\tAgreementIndex agreementIndex = new AgreementIndex();\r\n\t\tDemand agreementDemand = null;\r\n\t\t\r\n\t\tAsset asset = assetRepository.getAsset(agreement.getAsset().getId(),agreement.getTenantId());\r\n\t\tAllottee allottee = allotteeRepository.getAllottee(agreement.getAllottee().getId(),agreement.getTenantId(),requestInfo);\r\n\t\tCity city = tenantRepository.fetchTenantByCode(agreement.getTenantId());\r\n\t\tif(agreement.getDemands() != null){\r\n\t\tagreementDemand = demandRepository.getDemandBySearch(agreement.getDemands().get(0), agreement.getTenantId());\r\n\t\tagreementIndex.setDemandDetails(getDemandDetails(agreementDemand.getDemandDetails()));\r\n\t\t}\r\n\t\tagreementDetailsEs.setAsset(asset);\r\n\t\tagreementDetailsEs.setAgreement(agreement);\r\n\t\tagreementDetailsEs.setAllottee(allottee);\r\n\t\tagreementDetailsEs.setCity(city);\r\n\t\tagreementDetailsEs.setBoundaryDetails(asset.getLocationDetails(), boundaryRepository.getBoundariesById(agreement,asset));\r\n\t\tif(agreementDemand != null){\r\n\t\tlogger.info(\"setting rent details\");\r\n\t\tagreementDetailsEs.setRent(agreementDemand.getDemandDetails(),getCurrentInstallment(agreementRequest),propertiesManager.getDemandReasonRent());\r\n\t\tlogger.info(\"rent details are added to indexer\");\r\n\t\t}\r\n\t\tagreementIndex.setAgreementDetails(agreementDetailsEs);\r\n\t\t\r\n\t\treturn agreementIndex;\r\n\t}", "@Override\r\n JSONObject doPerform(HttpServletRequest req, HttpServletResponse response) throws Exception {\r\n JSONObject jo = new JSONObject();\r\n try {\r\n JSONObject json;\r\n if (req.getMethod().equals(\"POST\")) {\r\n String js = IOUtils.toString(req.getInputStream(), \"UTF-8\");\r\n json = new JSONObject(js);\r\n } else {\r\n json = new JSONObject(req.getParameter(\"json\"));\r\n }\r\n OfferRecord or = OfferRecord.fromJSON(json);\r\n JSONObject ret = new JSONObject(SolrIndexerCommiter.indexJSON(new JSONObject(JSON.toJSONString(or)), \"offersCore\"));\r\n\r\n// Indexer indexer = new Indexer();\r\n// indexer.indexWanted(or.doc_code,\r\n// UsersController.toKnihovna(req).getCode(),\r\n// or.chci);\r\n return ret;\r\n\r\n } catch (Exception ex) {\r\n LOGGER.log(Level.SEVERE, null, ex);\r\n jo.put(\"error\", ex.toString());\r\n }\r\n return jo;\r\n\r\n }", "public IndexData generateIndexData(String orgId, String toolId, String projectId) {\n\n\t\tArrayList<ScoreCardDTO> scData = null;\n\t\tArrayList<IndexKPIData> kpiList = null;\n\t\tIndexKPIData kpiData = null;\n\n\t\tlogger.debug(\"generateIndexData: The input Parameters {\" + orgId + \",\" + toolId + \",\" + projectId + \"}\");\n\t\tIndexData indexData = new IndexData();\n\t\tindexData.setTitle(\"SST Brexit Index \");\n\t\tindexData.setType(\"Guage\");\n\t\tindexData.setDescription(\n\t\t\t\t\"SST Brexit Index (Combined Factor Score) is one of the Key Performance Indicator (KPI) expressed as a percentage score against the benchmark\");\n\n\t\t/*\n\t\t * ScoreCardDao scoreCardDao =\n\t\t * DataServiceFactory.getDaoFactoryInstance().getScoreCardDao(); //scData =\n\t\t * scoreCardDao.getSSTIndexKPIData(orgId, toolId, projectId); ScoreCardSearchDTO\n\t\t * srchData = populateSearchDataForKPIIndex(orgId, toolId, projectId); scData =\n\t\t * scoreCardDao.getScoreCardDetails(srchData);\n\t\t * \n\t\t * logger.debug(\" KPI Index Data from DB \" + scData.toString());\n\t\t * \n\t\t * kpiList = new ArrayList<>(); for (Iterator iterator = scData.iterator();\n\t\t * iterator.hasNext();) { ScoreCardDTO dbData = (ScoreCardDTO) iterator.next();\n\t\t * kpiData = new IndexKPIData(); if\n\t\t * (CommonConstants.RESPONSE_METRIC.equalsIgnoreCase(dbData.getDimensionType()))\n\t\t * { kpiData.setKpiName(dbData.getMetricName() + \" \" +\n\t\t * dbData.getResponseMetricData().getResponseMetricName()); } else {\n\t\t * kpiData.setKpiName(dbData.getMetricName()); }\n\t\t * kpiData.setKpiValue(dbData.getMetricValue());\n\t\t * kpiData.setKpiBenchmark(dbData.getBenchMark());\n\t\t * populateIndexStaticData(kpiData); kpiList.add(kpiData); }\n\t\t * \n\t\t * indexData.setKpiData(kpiList);\n\t\t */\n\n\t\tScoreCardSearchDTO searchdata = populateSearchDataForIndex(orgId, toolId, projectId);\n\t\tIndexKPIData indexStaticData = populateIndexStaticData();\n\t\tindexData = indexDashboardService.generateIndexData(searchdata, indexData, indexStaticData);\n\t\tlogger.debug(\"generateIndexData: Index data from the index service \" + indexData);\n\n\t\twriteToFileAndUpdateDashboard(indexData, orgId, toolId, projectId, CommonConstants.SSTBR_KPIINDEX_DASHBOARD_ID);\n\t\tlogger.debug(\"generateIndexData: Completed Writing the index json file for SST Brexit in the specified folder\");\n\n\t\treturn indexData;\n\t}", "void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;", "private DocumentInterceptor(Context ctx) {\n }", "@Ignore \n @Test\n public void testIndexDocument() {\n System.out.println(\"IndexDocument\");\n Client client = null;\n String indexName = \"\";\n String indexTypeName = \"\";\n String docId = \"\";\n Map<String, Object> jsonMap = null;\n long expResult = 0L;\n //long result = ESUtil.indexDocument(client, indexName, indexTypeName, docId, jsonMap);\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 }", "public interface DocumentService {\n Document create(Long userId, Document document);\n\n Document update(Long userId, Document document);\n\n Page<Document> findAll(Long userId, Integer documentType, RestPageRequest pageRequest);\n\n Page<Document> findAll(Long userId, Long parentId, Integer documentType, RestPageRequest pageRequest);\n\n Page<Document> findAll(Long userId, Long businessPartnerId, Integer businessPartnerType, Integer documentType, RestPageRequest pageRequest);\n\n List<Document> getAll(Long userId, Integer documentType);\n\n Document findOne(Long userId, Integer documentType, Long recordId);\n\n Document findOne(Long userId, Long recordId);\n\n Document findByDocNumber(Long userId, Integer documentType, String docNumber);\n\n Document findByOrderRefNumber(Long userId, Integer documentType, String orderRefNumber);\n\n Document findByDocNumber(Long userId, Integer documentType, Integer childDocumentType, String docNumber);\n\n void updateAmounts(Double totalTax, Double amountWithoutTax, Double totalAll, Integer quantity, Long userId, Long documentId);\n\n Double getBusinessPartnerBalance(Long userId, Long businessPartnerId);\n\n Double getDocumentAmount(Long userId, Long documentId);\n\n Double getAmountByDocumentByBusinessPartner(Long userId, Long businessPartnerId, Integer documentType, Integer childDocumentType);\n\n Double getInvoicePaymentsTotal(Long userId, Long businessPartnerId, Integer documentType, Integer childDocumentType, Long parentId);\n\n void updateDocumentBalance(Long userId, Long documentId);\n\n Double getSumByTenant(Long userId, Integer documentType, Integer status);\n\n Double getSumByTenantByDate(Long userId, Integer documentType, Integer status, DateTime startDate, DateTime endDate);\n\n Integer getQuantityByTenantByDate(Long userId, Integer documentType, Integer status, DateTime startDate, DateTime endDate);\n\n Double getSumByTenantByDateByBusinessUnit(Long userId, Integer documentType, Integer status, DateTime startDate, DateTime endDate,Long businessUnitId);\n\n Integer getQuantityByTenantByDateByBusinessUnit(Long userId, Integer documentType, Integer status, DateTime startDate, DateTime endDate,Long businessUnitId);\n\n Long countByTenant(Long userId, Integer documentType, Integer status);\n}", "public ServiceBindingType getServiceBindingForDocType(String tenantId, String docType) {\n \t\tString key = getTenantQualifiedIdentifier(tenantId, docType);\n \t\treturn docTypes.get(key);\n \t}", "@Override\n public Document createState(Payload payload) {\n // TODO: Use a pool of Documents so that they can be reused\n // TODO: Consider moving this to super class\n return new org.apache.lucene.document.Document();\n }", "Documentable createDocumentable();", "public ODocument create(@Generic(\"T\") final Class<?> type) {\n dbProvider.get();\n return new ODocument(type.getSimpleName());\n }", "public JestResult createNewDocument(GTData data) throws IOException {\n Gson gson = new Gson();\n String json = gson.toJson(data);\n Index request = new Index.Builder(json)\n .index(INDEX_NAME)\n .type(data.getClass().toString())\n .id(data.getObjectID())\n .build();\n\n JestResult result = client.execute(request);\n return result;\n }", "public static XContentBuilder toRiverMapping(String type, String analyzer) {\r\n\t\tXContentBuilder xbMapping = null;\r\n\t\ttry {\r\n xbMapping = jsonBuilder().prettyPrint().startObject();\r\n\r\n // Type\r\n xbMapping.startObject(type);\r\n\r\n // Manage _source\r\n // We store binary source as a stored field so we don't need it in _source\r\n xbMapping.startObject(\"_source\").array(\"excludes\", FsRiverUtil.Doc.ATTACHMENT).endObject();\r\n\r\n xbMapping.startObject(\"properties\");\r\n\r\n // Doc content\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.CONTENT, analyzer);\r\n\r\n // Doc source\r\n addBinary(xbMapping, FsRiverUtil.Doc.ATTACHMENT);\r\n\r\n // Meta\r\n xbMapping.startObject(FsRiverUtil.Doc.META).startObject(\"properties\");\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.AUTHOR);\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.TITLE);\r\n addDate(xbMapping, FsRiverUtil.Doc.Meta.DATE);\r\n addAnalyzedString(xbMapping, FsRiverUtil.Doc.Meta.KEYWORDS);\r\n xbMapping.endObject().endObject(); // End Meta\r\n\r\n // File\r\n xbMapping.startObject(FsRiverUtil.Doc.FILE).startObject(\"properties\");\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.File.CONTENT_TYPE);\r\n addDate(xbMapping, FsRiverUtil.Doc.File.LAST_MODIFIED);\r\n addDate(xbMapping, FsRiverUtil.Doc.File.INDEXING_DATE);\r\n addLong(xbMapping, FsRiverUtil.Doc.File.FILESIZE);\r\n addLong(xbMapping, FsRiverUtil.Doc.File.INDEXED_CHARS);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.File.FILENAME);\r\n addNotIndexedString(xbMapping, FsRiverUtil.Doc.File.URL);\r\n xbMapping.endObject().endObject(); // End File\r\n\r\n // Path\r\n xbMapping.startObject(FsRiverUtil.Doc.PATH).startObject(\"properties\");\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.ENCODED);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.VIRTUAL);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.ROOT);\r\n addNotAnalyzedString(xbMapping, FsRiverUtil.Doc.Path.REAL);\r\n xbMapping.endObject().endObject(); // End Path\r\n\r\n xbMapping.endObject().endObject().endObject(); // End Type\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Log when error\r\n\t\t}\r\n\t\treturn xbMapping;\r\n\t}", "interface Factory {\n KeyExtractor create(Class<?> entity);\n }", "public void createIndex(String dataDirPath, String txType) throws IOException {\n\t\ttry {\n\t\t\tString inLoc = \"/mnt/3TB/in.csv\";\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(inLoc), \"UTF-8\"));\n\n\t\t\tString line;\n\t\t\tboolean first = true;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] items = line.split(\",\");\n\t\t\t\tif (items.length > 3) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tDocument doc = makeTx(items[0], items[1], Long.parseLong(items[2]), txType);\n\t\t\t\twriter.addDocument(doc);\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@POST\n\t@Path(\"{projectId}\")\n\t@Consumes({ \"application/json+nxentity\", \"application/json\" })\n\tpublic Response doPost(DocumentModel inputDoc, @PathParam(\"projectId\") String projectId) {\n\t\tCoreSession session = ctx.getCoreSession();\n\n\t\tif (StringUtils.isBlank(inputDoc.getType()) || StringUtils.isBlank(inputDoc.getName())) {\n\t\t\treturn Response.status(Status.BAD_REQUEST).entity(\"type or name property is missing\").build();\n\t\t}\n\n\t\tDocumentModel parent = getProjectContainer(projectId);\n\n\t\tString parentPath = parent.getPathAsString();\n\n\t\tif (\"AI_Model\".equals(inputDoc.getType())) {\n\t\t\tparentPath = parent.getPath().append(\"models\").toString();\n\t\t} else if (\"AI_Corpus\".equals(inputDoc.getType())) {\n\t\t\tparentPath = parent.getPath().append(\"datasets\").toString();\n\t\t} else if (\"AI_Training\".equals(inputDoc.getType())) {\n\t\t\tparentPath = parent.getPath().append(\"trainings\").toString();\n\t\t} else {\n\t\t\treturn Response.status(Status.BAD_REQUEST).entity(\"Unexpected Document Type\").build();\n\t\t}\n\n\t\tDocumentModel createdDoc = session.createDocumentModel(parentPath, inputDoc.getName(), inputDoc.getType());\n\t\tDocumentModelJsonReader.applyPropertyValues(inputDoc, createdDoc);\n\t\tcreatedDoc = session.createDocument(createdDoc);\n\t\tsession.save();\n\t\treturn Response.ok(createdDoc).status(Status.CREATED).build();\n\t}", "WordDtoImpl convertFromDomainImpl(Word word);", "@SuppressWarnings(\"WeakerAccess\")\n public ClinicalTrialSearchEngine(String indexPath, String defaultFieldName,\n DocumentFactory<T> factory) {\n super(indexPath,\n new EnglishAnalyzer(),\n defaultFieldName,\n factory);\n }", "@Ignore\n @Test\n public void testGetDocument() throws Exception\n {\n \n int organizationId = 100;\n \n Util.commonServiceIPs=\"127.0.0.1\";\n EntityManager em = Util.getEntityManagerFactory(100).createEntityManager();\n \n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client esClient = ESUtil.getClient(em, platformEm, 1, false);\n \n String dataobjectId = \"081E9AB4157A5F628E93436DB994A1F1EADCF3EA\";\n \n JSONObject obj = ESUtil.getDocument(esClient,organizationId, dataobjectId, null);\n \n int k;\n }", "public interface IDictionaryTypeService extends IBaseService<DictionaryType> {\n\n /**\n * 根据菜单查找字典\n * @param menuType 菜单类型\n * @return\n */\n List<DictionaryType> findByMenuType(String menuType);\n}", "@Test\n public void testCreateIndexMapping() throws Exception {\n String json = EsJsonUtils.generateItemMapping();\n System.out.println(json);\n elasticSearchDao.createIndexMapping(TENANT_ID+Constants.INDEX_SPLIT+ Constants.ITEM,json);\n }", "public static void main(String[] args) {\n String document = \"Ich programmiere gern in Java\";\n// String document = \"Me gusta programar en java\";\n String language = \"german\";\n DictionaryFactory dictionaryFactory = createFactoryByLanguage(language);\n Dictionary dict = dictionaryFactory.getDictionary();\n System.out.println(translateDocument(document, dict));\n }", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "public interface DroitaccesDocumentSearchRepository extends ElasticsearchRepository<DroitaccesDocument, Long> {\n}", "public Payment fromDto(PaymentRequestDTO dto) {\n Category category = categoryService.findById(dto.getCategoryId());\n PaymentType paymentType = paymentTypeService.findById(dto.getPaymentTypeId());\n Person person = personService.findById(dto.getOwnerId());\n //TODO: make a global date format\n DateTimeFormatter dateFm = DateTimeFormatter.ofPattern(\"yyyy-MM-d\");\n Payment payment = new Payment(category, dto.getAmountCents())\n .transactionDate(LocalDate.parse(dto.getTransactionDate(), dateFm))\n .person(person)\n .paymentType(paymentType);\n return payment;\n }", "public void makeWord(String inputText,String pageId,createIndex createindex,String contentType)\n {\n int length,i;\n char c;\n boolean linkFound=false;\n int count1,count2,count3,count4,count5,count6,count7,count8,count9;\n\n\n\n StringBuilder word=new StringBuilder();\n // String finalWord=null,stemmedWord=null;\n docId=Integer.parseInt(pageId.trim());\n\n ci=createindex;\n // Stemmer st=new Stemmer();\n //createIndex createindex=new createIndex();\n\n length=inputText.length();\n\n for(i=0;i<length;i++)\n {\n c=inputText.charAt(i);\n if(c<123 && c>96)\n {\n word.append(c);\n }\n\n else if(c=='{')\n {\n if ( i+9 < length && inputText.substring(i+1,i+9).equals(\"{infobox\") )\n {\n\n StringBuilder infoboxString = new StringBuilder();\n\n count1 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n infoboxString.append(c);\n if ( c == '{') {\n count1++;\n }\n else if ( c == '}') {\n count1--;\n }\n if ( count1 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {infoboxString.deleteCharAt(infoboxString.length()-1);}\n break;\n }\n }\n\n processInfobox(infoboxString);\n\n }\n\n else if ( i+8 < length && inputText.substring(i+1,i+8).equals(\"{geobox\") )\n {\n\n StringBuilder geoboxString = new StringBuilder();\n\n count2 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n geoboxString.append(c);\n if ( c == '{') {\n count2++;\n }\n else if ( c == '}') {\n count2--;\n }\n if ( count2 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {geoboxString.deleteCharAt(geoboxString.length()-1);}\n break;\n }\n }\n\n // processGeobox(geoboxString);\n }\n\n else if ( i+6 < length && inputText.substring(i+1,i+6).equals(\"{cite\") )\n {\n\n /*\n * Citations are to be removed.\n */\n\n count3 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count3++;\n }\n else if ( c == '}') {\n count3--;\n }\n if ( count3 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n else if ( i+4 < length && inputText.substring(i+1,i+4).equals(\"{gr\") )\n {\n\n /*\n * {{GR .. to be removed\n */\n\n count4 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count4++;\n }\n else if ( c == '}') {\n count4--;\n }\n if ( count4 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equals(\"{coord\") )\n {\n\n /**\n * Coords to be removed\n */\n\n count5 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '{') {\n count5++;\n }\n else if ( c == '}') {\n count5--;\n }\n if ( count5 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n //System.out.println(\"process infobox\");\n }\n else if(c=='[')\n {\n // System.out.println(\"process square brace\");\n\n if ( i+11 < length && inputText.substring(i+1,i+11).equalsIgnoreCase(\"[category:\"))\n {\n\n StringBuilder categoryString = new StringBuilder();\n\n count6 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n categoryString.append(c);\n if ( c == '[') {\n count6++;\n }\n else if ( c == ']') {\n count6--;\n }\n if ( count6 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {categoryString.deleteCharAt(categoryString.length()-1);}\n break;\n }\n }\n\n // System.out.println(\"category string=\"+categoryString.toString());\n processCategories(categoryString);\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"[image:\") ) {\n\n /**\n * Images to be removed\n */\n\n count7 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '[') {\n count7++;\n }\n else if ( c == ']') {\n count7--;\n }\n if ( count7 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equalsIgnoreCase(\"[file:\") ) {\n\n /**\n * File to be removed\n */\n\n count8 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '[') {\n count8++;\n }\n else if ( c == ']') {\n count8--;\n }\n if ( count8 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n }\n else if(c=='<')\n {\n //System.out.println(\"Process < >\");\n\n if ( i+4 < length && inputText.substring(i+1,i+4).equalsIgnoreCase(\"!--\") ) {\n\n /**\n * Comments to be removed\n */\n\n int locationClose = inputText.indexOf(\"-->\" , i+1);\n if ( locationClose == -1 || locationClose+2 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+2;\n }\n\n }\n else if ( i+5 < length && inputText.substring(i+1,i+5).equalsIgnoreCase(\"ref>\") ) {\n\n /**\n * References to be removed\n */\n int locationClose = inputText.indexOf(\"</ref>\" , i+1);\n if ( locationClose == -1 || locationClose+5 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+5;\n }\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"gallery\") ) {\n\n /**\n * Gallery to be removed\n */\n int locationClose = inputText.indexOf(\"</gallery>\" , i+1);\n if ( locationClose == -1 || locationClose+9 > length) {\n i = length-1;\n }\n else {\n i = locationClose+9;\n }\n }\n\n }\n else if ( c == '=' && i+1 < length && inputText.charAt(i+1) == '=')\n {\n\n linkFound = false;\n i+=2;\n while ( i < length && ((c = inputText.charAt(i)) == ' ' || (c = inputText.charAt(i)) == '\\t') )\n {\n i++;\n }\n\n if ( i+14 < length && inputText.substring(i , i+14 ).equals(\"external links\") )\n {\n //System.out.println(\"External link found\");\n linkFound = true;\n i+= 14;\n }\n\n }\n else if ( c == '*' && linkFound == true )\n {\n\n //System.out.println(\"Link found\");\n count9 = 0;\n boolean spaceParsed = false;\n StringBuilder link = new StringBuilder();\n while ( count9 != 2 && i < length )\n {\n c = inputText.charAt(i);\n if ( c == '[' || c == ']' )\n {\n count9++;\n }\n if ( count9 == 1 && spaceParsed == true)\n {\n link.append(c);\n }\n else if ( count9 != 0 && spaceParsed == false && c == ' ')\n {\n spaceParsed = true;\n }\n i++;\n }\n\n StringBuilder linkWord = new StringBuilder();\n for ( int j = 0 ; j < link.length() ; j++ )\n {\n char currentCharTemp = link.charAt(j);\n if ( (int)currentCharTemp >= 'a' && (int)currentCharTemp <= 'z' )\n {\n linkWord.append(currentCharTemp);\n }\n else\n {\n\n // System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n }\n if ( linkWord.length() > 1 )\n {\n //System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n\n }\n else\n {\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n }\n }\n\n\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n /*\n if(word.length()>0)\n {\n finalWord=new String(word);\n if(!(checkStopword(finalWord)))\n {\n st.add(finalWord.toCharArray(),finalWord.length());\n stemmedWord=st.stem();\n\n createindex.addToTreeSet(stemmedWord,docId);\n\n }\n\n word.delete(0, word.length());\n } */\n\n }", "public void addDocument(Document d) throws IndexerException {\n\t\t\n\t//if (!isvaliddir) {System.out.println(\"INVALID PATH/execution !\");return;}\n\t\n\t\n\t//Tokenizing\n\t//one thgread\n\tDocID did=new DocID(d.getField(FieldNames.FILEID),\n\t\t\td.getField(FieldNames.CATEGORY),\n\t\t\td.getField(FieldNames.AUTHOR));\n\t\n\tTokenStream stream=tokenize(FieldNames.CATEGORY,d);\n\tAnalyzer analyz=analyze(FieldNames.CATEGORY, stream);\n\tCategoryIndex.getInst().doIndexing(did.getdID(), stream);\n\t/*\t}catch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);\n\t}\n\ttry{*/TokenStream stream1=tokenize(FieldNames.AUTHOR,d);\n\tAnalyzer analyz1=analyze(FieldNames.AUTHOR, stream1);\n\tAuthorIndex.getInst().doIndexing(did.getdID(), stream1);\n\t/*}catch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);}\n\ttry{*/TokenStream stream2=tokenize(FieldNames.PLACE,d);\n\tAnalyzer analyz2=analyze(FieldNames.PLACE, stream2);\n\tPlaceIndex.getInst().doIndexing(did.getdID(), stream2);\n/*}catch(Exception e)\n\t{\n\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t);}\n\ttry{*/tkizer = new Tokenizer();\n\tTokenStream stream3=tokenize(FieldNames.CONTENT,d);\n\tfactory = AnalyzerFactory.getInstance();\n\tAnalyzer analyz3=analyze(FieldNames.CONTENT, stream3);\n\tnew Indxr(IndexType.TERM).doIndexing(did, stream3);\n\t/*}\tcatch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);}\n\t*/\n\tdocs.add(did==null?\" \":did.toString());\n\t \n\t\na_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.AUTHOR);\nc_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.CATEGORY);\np_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.PLACE);\nt_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.TERM);\n\t\t}", "public interface DepositSearchRepository extends ElasticsearchRepository<Deposit, Long> {\n}", "public Entry ingestDeposit(DepositRequest deposit, Context context) throws SWORDException;", "public static <T> void createIndex(Geography<T> geog, Class<T> clazz)\n\t{\n\t\tIndex<T> i = new Index<T>(geog, clazz);\n\t\tSpatialIndexManager.indices.put(geog, i);\n\t}", "public interface PerCompanySearchRepository extends ElasticsearchRepository<PerCompany, Long> {\n}", "@Override\r\n\tprotected void indexDocument(PluginServiceCallbacks callbacks, JSONResponse jsonResults, HttpServletRequest request,\r\n\t\t\tIndexing indexing) throws Exception {\n\t\t\r\n\t}", "public Document buildDocument(JSONObject jsonObject) {\n Document doc = new Document();\n\n //Add text field so that the text is what is searchable\n doc.add(new TextField(\"text\",(String) jsonObject.get(\"Text\"), Field.Store.YES));\n //Add tweet id field for unique tweet check and embedding in front end\n doc.add(new StoredField(\"id\", (String) (\"\" + jsonObject.get(\"ID\") )));\n //convert long data type to string (concatenate \"\" with long)\n\n // Give timestamp field to boost on most recent tweets\n doc.add(new NumericDocValuesField(\"timestamp\", (long) jsonObject.get(\"Timestamp\")));\n\n // Add as numeric field (twitter 4j suggestion)\n doc.add(new LongPoint(\"time\", (long) jsonObject.get(\"Timestamp\")));\n\n return doc;\n }", "public static void main(String[] args) throws Exception {\n\t\tClient client = ESClient.createClientShield();\n//\t\tXContentBuilder builder = XContentFactory.jsonBuilder()\n//\t\t .startObject()\n//\t\t .field(\"user\", \"kimchy\")\n//\t\t .field(\"postDate\", new Date())\n//\t\t .field(\"message\", \"trying out Elasticsearch\")\n//\t\t .endObject();\n//\t\tIndexResponse response = client.prepareIndex(\"twitter\", \"tweet\")\n// .setSource(builder.string())\n// .get();\n\t\tclient.close();\n\t\t\n\t}", "trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument();", "trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument();", "trinsic.services.common.v1.CommonOuterClass.JsonPayload getDocument();", "public interface IIndexBuilder {\n\n public IIndex getIndex( Class<?> searchable ) throws BuilderException;\n\n public IFieldVisitor getFieldVisitor();\n\n public void setFieldVisitor( IFieldVisitor visitor );\n\n}", "public SimpleIndexFactory() {\n\t}", "public static void main(String[] args) throws IOException {\n\n JSONObject log = new JSONObject();\n log.put(\"A\", \"A\");\n IndexRequest indexRequest = new IndexRequest().index(\"key\").type(\"doc\").id(UUID.randomUUID().toString())\n .source(log.toJSONString(), XContentType.JSON);\n Map<String, Object> map1 = indexRequest.sourceAsMap();\n map1.put(\"_id\", indexRequest.id());\n map1.forEach((k, v) -> {\n System.out.println(\"key:\" + k + \">v:\" + v);\n });\n\n }", "public DXExporterFromA3 setDocumentType(String DocumentType)\n\t{\n\t\tthis.despatchAdviceDocumentType = DocumentType;\n\n\t\treturn this;\n\t}", "public CouchDoc() {\n super();\n docType = getClass().getSimpleName();\n }", "@Override\r\n\tpublic int createAdvertisement(AdvertisementDto dto) {\n\t\treturn session.insert(\"kdc.advertisement.createAdvertisement\", dto);\r\n\t}", "public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch);", "public interface TypeMedicationSearchRepository extends ElasticsearchRepository<TypeMedication, Long> {\n}", "public DtoType getDto(EntityType entity, Class<DtoType> myClass) throws ClassNotFoundException, InstantiationException, IllegalAccessException;", "default <T> void constructTemplate(ElasticsearchIndexType indexType, T templateProperty){\n builder().append(String.format(\"{\\\"%s\\\":\", indexType.getDisplayName()));\n java.lang.Class<?> templatePropertyClass = templateProperty.getClass();\n java.lang.invoke.MethodHandles.Lookup lookup = MethodHandles.lookup();\n try {\n for (String templateProp : templateProperties) {\n VarHandle varHandle = lookup.findVarHandle(templatePropertyClass, PREFIX + templateProp, String.class);\n Object value = varHandle.get(templateProperty);\n if(StringUtils.isEmpty(value)){\n if(templateProp.equals(\"type\")){\n value = PREFIX + DEFAULT_DOC;\n }else if(templateProp.equals(\"id\")){\n value = UUID.randomUUID().toString();\n }\n }\n if(!StringUtils.isEmpty(value)){\n builder().append(String.format(\"\\\"%s%s\\\":\\\"%s\\\"\", PREFIX, templateProp, value));\n }\n }\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (NoSuchFieldException e) {\n e.printStackTrace();\n }\n builder().append(\"}\");\n }", "public interface IndexCreator {\n\n /**\n * Creates indexes for specified persistent entity\n *\n * @param type persistent entity class, e.g. class annotated {@link org.springframework.data.mongodb.core.mapping.Document}\n * @return empty {@link Mono}\n */\n Mono<Void> createIndexes(Class<?> type);\n\n /**\n * Creates indexes for all persistent entities presented in {@link org.springframework.data.mongodb.core.mapping.MongoMappingContext}\n *\n * @return empty {@link Mono}\n */\n Mono<Void> createIndexes();\n}", "public abstract ClinicalDocumentDto findClinicalDocumentDto(String usrename, long documentId);", "public interface WalletWithdrawalSearchRepository extends ElasticsearchRepository<WalletWithdrawal, Long> {\n}", "public CreateDocumentController() {\n }", "public List<SysDictData> selectDictDataByType(String dictType);", "Document newWithdrawal(String reason, String expenseCategory,\n double amount, String effectiveDate);", "public DocumentController(String date, String content) {\n document = new DocumentSchema();\n document.setDocumentStr(content);\n document.setPublicationDate(date);\n document.setDocId(UUID.randomUUID().toString());\n }", "public interface InvertedIndex extends Serializable {\n\n\n /**\n * Sampling for creating mini batches\n * @return the sampling for mini batches\n */\n double sample();\n\n /**\n * Iterates over mini batches\n * @return the mini batches created by this vectorizer\n */\n Iterator<List<VocabWord>> miniBatches();\n\n /**\n * Returns a list of words for a document\n * @param index\n * @return\n */\n List<VocabWord> document(int index);\n\n /**\n * Returns the list of documents a vocab word is in\n * @param vocabWord the vocab word to get documents for\n * @return the documents for a vocab word\n */\n int[] documents(VocabWord vocabWord);\n\n /**\n * Returns the number of documents\n * @return\n */\n int numDocuments();\n\n /**\n * Returns a list of all documents\n * @return the list of all documents\n */\n int[] allDocs();\n\n\n\n /**\n * Add word to a document\n * @param doc the document to add to\n * @param word the word to add\n */\n void addWordToDoc(int doc,VocabWord word);\n\n\n /**\n * Adds words to the given document\n * @param doc the document to add to\n * @param words the words to add\n */\n void addWordsToDoc(int doc,List<VocabWord> words);\n\n\n /**\n * Finishes saving data\n */\n void finish();\n\n /**\n * Total number of words in the index\n * @return the total number of words in the index\n */\n int totalWords();\n\n /**\n * For word vectors, this is the batch size for which to train on\n * @return the batch size for which to train on\n */\n int batchSize();\n\n /**\n * Iterate over each document\n * @param func the function to apply\n * @param exec exectuor service for execution\n */\n void eachDoc(Function<List<VocabWord>, Void> func, ExecutorService exec);\n}", "public Indexer() {\n }", "public CreateDocumentRequest withDocumentType(DocumentType documentType) {\n this.documentType = documentType.toString();\n return this;\n }", "public CreateDocumentRequest withDocumentType(String documentType) {\n setDocumentType(documentType);\n return this;\n }", "public static Object newDataTransferObjectInstance(Class<?> dtoType) {\n try {\n return ObjectUtils.newInstance(dtoType);\n } catch (InvocationTargetException | NoSuchMethodException | InstantiationException | IllegalAccessException e) {\n throw new ConstructorInvalidException(\"Cannot found default constructor for \" + dtoType.getSimpleName(), e);\n }\n }", "default WorkdayEndpointBuilder tenant(String tenant) {\n doSetProperty(\"tenant\", tenant);\n return this;\n }", "public void setDocumentType(String documentType);", "private static void addDateTypeToIndexField(String fieldName, Map<String, Object> indexFieldProperties) {\n // create keyword type property\n Map<String, Object> keywordTypeProperty = new HashMap<>();\n keywordTypeProperty.put(\"type\", \"date\");\n addFieldMapping(fieldName, keywordTypeProperty, indexFieldProperties);\n }", "default WorkdayEndpointProducerBuilder tenant(String tenant) {\n doSetProperty(\"tenant\", tenant);\n return this;\n }", "public TranscriptionIndexer() throws SQLException, CorruptIndexException, IOException\r\n {\r\n\r\n\r\n IndexWriter writer = null;\r\n Analyzer analyser;\r\n Directory directory;\r\n /**@TODO parameterized location*/\r\n String dest = \"/usr/indexTranscriptions\";\r\n\r\n directory = FSDirectory.getDirectory(dest, true);\r\n analyser = new StandardAnalyzer();\r\n writer = new IndexWriter(directory, analyser, true);\r\n PreparedStatement stmt=null;\r\n Connection j = null;\r\n try {\r\n j=DatabaseWrapper.getConnection();\r\n String query=\"select * from transcription where text!='' and creator>0 order by folio, line\";\r\n stmt=j.prepareStatement(query);\r\n ResultSet rs=stmt.executeQuery();\r\n while(rs.next())\r\n {\r\n int folio=rs.getInt(\"folio\");\r\n int line=rs.getInt(\"line\");\r\n int UID=rs.getInt(\"creator\");\r\n int id=rs.getInt(\"id\");\r\n Transcription t=new Transcription(id);\r\n Document doc = new Document();\r\n Field field;\r\n field = new Field(\"text\", t.getText(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"comment\", t.getComment(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"creator\", \"\" + t.UID, Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"security\", \"\" + \"private\", Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"line\", \"\" + t.getLine(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"page\", \"\" + t.getFolio(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"id\", \"\" + t.getLineID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"manuscript\", \"\" + new Manuscript(t.getFolio()).getID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n field = new Field(\"projectID\", \"\" + t.getProjectID(), Field.Store.YES, Field.Index.ANALYZED);\r\n doc.add(field);\r\n writer.addDocument(doc);\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n if(writer!=null)\r\n {\r\n writer.commit();\r\n \twriter.close();\r\n return;\r\n }\r\n ex.printStackTrace();\r\n }\r\n finally{\r\n DatabaseWrapper.closeDBConnection(j);\r\n DatabaseWrapper.closePreparedStatement(stmt);\r\n }\r\n\r\n writer.commit();\r\n \twriter.close();\r\n}", "default WorkdayEndpointConsumerBuilder tenant(String tenant) {\n doSetProperty(\"tenant\", tenant);\n return this;\n }", "MetricsCounterDTO getMetricsCounter(MetricsCounterCriteria dto);", "FieldType createFieldType();", "public DataMapping(String name, ElasticDataType type) {\n this(name, name, type);\n }", "public interface SysDictDataMapper\n{\n /**\n * Query dictionary data page by condition\n * \n * @param dictData Dictionary data information\n * @return Dictionary data collection information\n */\n public List<SysDictData> selectDictDataList(SysDictData dictData);\n\n /**\n * Query dictionary data according to dictionary type\n * \n * @param dictType Dictionary type\n * @return Dictionary data collection information\n */\n public List<SysDictData> selectDictDataByType(String dictType);\n\n /**\n * Query dictionary data information according to dictionary type and dictionary key value\n * \n * @param dictType Dictionary type\n * @param dictValue Dictionary key\n * @return Dictionary tag\n */\n public String selectDictLabel(@Param(\"dictType\") String dictType, @Param(\"dictValue\") String dictValue);\n\n /**\n * Query information based on dictionary data ID\n * \n * @param dictCode Dictionary data ID\n * @return Dictionary data\n */\n public SysDictData selectDictDataById(Long dictCode);\n\n /**\n * Query dictionary data\n * \n * @param dictType Dictionary type\n * @return Dictionary data\n */\n public int countDictDataByType(String dictType);\n\n /**\n * Delete dictionary data information by dictionary ID\n * \n * @param dictCode Dictionary data ID\n * @return result\n */\n public int deleteDictDataById(Long dictCode);\n\n /**\n * Delete dictionary data in bulk\n * \n * @param ids Data to be deleted\n * @return result\n */\n public int deleteDictDataByIds(String[] ids);\n\n /**\n * New dictionary data information\n * \n * @param dictData Dictionary data information\n * @return result\n */\n public int insertDictData(SysDictData dictData);\n\n /**\n * Modify dictionary data information\n * \n * @param dictData Dictionary data information\n * @return result\n */\n public int updateDictData(SysDictData dictData);\n\n /**\n * Synchronously modify dictionary type\n * \n * @param oldDictType Old dictionary type\n * @param newDictType New and old dictionary types\n * @return result\n */\n public int updateDictDataType(@Param(\"oldDictType\") String oldDictType, @Param(\"newDictType\") String newDictType);\n}", "private static Positional_inverted_index posindexCorpus(DocumentCorpus corpus) throws ClassNotFoundException, InstantiationException, IllegalAccessException, FileNotFoundException, IOException {\n\n NewTokenProcessor processor = new NewTokenProcessor();\n Iterable<Document> docs = corpus.getDocuments(); //call registerFileDocumentFactory first?\n\n List<Double> Doc_length = new ArrayList<>();\n Positional_inverted_index index = new Positional_inverted_index();\n\n double token_count = 0;\n\n // Iterate through the documents, and:\n for (Document d : docs) {\n //File f = new File(path + \"\\\\\" + d.getTitle());\n File f = new File(path + \"\\\\\" + d.getFileName().toString());\n double Filesize = f.length();\n //edited by bhavya\n double doc_weight = 0; //first entry in docweights.bin\n double doc_tokens = 0;\n double doc_length = 0;\n HashMap<String, Integer> tftd = new HashMap<>();\n // Tokenize the document's content by constructing an EnglishTokenStream around the document's content.\n Reader reader = d.getContent();\n EnglishTokenStream stream = new EnglishTokenStream(reader); //can access tokens through this stream\n N++;\n // Iterate through the tokens in the document, processing them using a BasicTokenProcessor,\n //\t\tand adding them to the HashSet vocabulary.\n Iterable<String> tokens = stream.getTokens();\n int i = 0;\n\n for (String token : tokens) {\n\n //adding token in index\n List<String> word = new ArrayList<String>();\n word = processor.processToken(token);\n //System.out.println(word.get(0));\n if (word.get(0).matches(\"\")) {\n continue;\n } else {\n\n index.addTerm(word.get(0), i, d.getId());\n\n }\n i = i + 1;\n\n //we check if token already exists in hashmap or not. \n //if it exists, increase its freq by 1 else make a new entry.\n if (tftd.containsKey(word.get(0))) {\n doc_tokens++;\n int count = tftd.get(word.get(0));\n tftd.replace(word.get(0), count + 1);\n } else {\n doc_tokens++;\n// token_count++; //gives total number of tokens.\n tftd.put(word.get(0), 1);\n }\n\n }\n double length = 0;\n double wdt = 0;\n\n double total_tftd = 0;\n for (Map.Entry<String, Integer> entry : tftd.entrySet()) {\n\n wdt = 1 + log(entry.getValue());\n\n length = length + pow(wdt, 2);\n total_tftd = total_tftd + entry.getValue();\n }\n token_count = token_count + doc_tokens;\n doc_weight = pow(length, 0.5);\n double avg_tftd = total_tftd / (double) tftd.size();\n\n Doc_length.add(doc_weight);\n Doc_length.add(avg_tftd);\n Doc_length.add(doc_tokens);\n Doc_length.add(Filesize);\n }\n Doc_length.add(token_count / N);\n\n DiskIndexWriter d = new DiskIndexWriter();\n d.write_doc(path, Doc_length);\n\n return index;\n }", "private static void addKeywordTypeToIndexField(String fieldName, Map<String, Object> indexFieldProperties) {\n // create keyword type property\n Map<String, Object> keywordTypeProperty = new HashMap<>();\n keywordTypeProperty.put(\"type\", \"keyword\");\n addFieldMapping(fieldName, keywordTypeProperty, indexFieldProperties);\n }", "public interface BoostingIndexer {\r\n\t/**\r\n\t * Add a new {@link Document} to the Index or update an existing one.<br> \r\n\t * When adding a document, its dynamic boosts values must be set. Specifying the values is accomplished by\r\n\t * passing the dynamicBoosts parameter with a Map from the boost index (zero based) to the boost value (a <code>double</code>).\r\n\t * In this map, no index can be larger than the number of available boosts the {@link IndexEngine}'s {@link Scorer} has, minus one (since it is zero based).\r\n\t * The value for any available boost index not specified in the map is defaulted to zero. \r\n\t * \r\n\t * @param docId external (customer) identifier of the document to add\r\n\t * @param document the {@link Document} to add\r\n\t * @param timestampBoost a <code>float</code> representing the time of the document (the younger the document, the larger the boost should be)\r\n\t * @param dynamicBoosts a Map from the boost index (zero based) to the boost value (a <code>double</code>).\r\n\t * @throws {@link IllegalArgumentException} if an invalid index is passed for a boost \r\n\t */\r\n\tpublic void add(String docId, Document document, int timestampBoost, Map<Integer, Double> dynamicBoosts);\r\n\r\n\t/**\r\n\t * Remove a document from the index.\r\n\t * \r\n\t * @param docId external (customer) identifier of the document to remove\r\n\t */\r\n\tpublic void del(String docId);\r\n\t\r\n\t/**\r\n\t * Update the special boost for the timestamp\r\n\t * \r\n\t * @param docId external (customer) identifier of the document\r\n\t * @param timestampBoost a <code>float</code> representing the time of the document (the younger the document, the larger the boost should be)\r\n\t */\r\n\tpublic void updateTimestamp(String docId, int timestampBoost);\r\n\t\r\n\t/**\r\n\t * Update one or more of the dynamic boosts values.\r\n\t * \r\n\t * @param docId external (customer) identifier of the document\r\n\t * @param updatedBoosts a Map from the boost index (zero based) to the boost value (a <code>double</code>). No index can be larger than the available boosts the {@link IndexEngine}'s {@link Scorer} has, minus one (since it is zero based)\r\n\t * @throws {@link IllegalArgumentException} if an invalid index is passed for a boost \r\n\t */\r\n\tpublic void updateBoosts(String docId, Map<Integer, Double> updatedBoosts);\r\n\r\n public void updateCategories(String docId, Map<String, String> categories);\r\n\t/**\r\n\t * Promote a document to be the first result for a specific query.\r\n\t * \r\n\t * @param docId external (customer) identifier of the document\r\n\t * @param query the exact query the document must be promoted to the first result for\r\n\t */\r\n public void promoteResult(String docId, String query);\r\n\r\n /**\r\n * Dumps the current state to disk.\r\n */\r\n public void dump() throws IOException;\r\n\r\n public void addScoreFunction(int functionIndex, String definition) throws Exception;\r\n\r\n public void removeScoreFunction(int functionIndex);\r\n\r\n public Map<Integer,String> listScoreFunctions();\r\n \r\n public Map<String, String> getStats();\r\n\r\n}", "private DTOFactory() {\r\n \t}", "public String createDSIndex(String dsID, String dschemaID, String attriName);", "private static Searcher createSearcher(String[] args) {\n if (args.length > 1 && \"duden\".equals(args[1])) {//Use DWDS by default, Duden only on explicit request\n return SearcherFactory.newDuden();\n } else {\n return SearcherFactory.newDwds();\n }\n }", "void createSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO);", "public void deleteDocumentTypeDetailByBuyerId(Integer buyerDocTypeId) throws DataServiceException \r\n\t{\r\n\t\r\n\t}", "public CollectionIndexDef(String field,String type){\n this.field = field;\n this.type = type;\n }", "public generateIndex() {\n\n\t\tthis.analyzer = \"StandardAnalyzer\";\n\t}", "BlogdslFactory getBlogdslFactory();", "@Ignore \n @Test\n public void testPutMappingToIndex() {\n System.out.println(\"putMappingToIndex\");\n \n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n String indexName = \"datastore_100_1_data_event_yearmonth_000000_1\";\n String indexType = \"AAA666_type\";\n \n try\n { \n ESUtil.createIndexWithoutType(client, indexName);\n \n DataobjectType dataobjectType = Util.getDataobjectTypeByIndexTypeName(platformEm, indexType);\n\n XContentBuilder typeMapping = ESUtil.createTypeMapping(platformEm, dataobjectType, true);\n \n ESUtil.putMappingToIndex(client, indexName, indexType, typeMapping);\n }\n catch(Exception e)\n {\n System.out.print(\" failed! e=\"+e);\n }\n }", "private XContentBuilder prepareLoanIndexMapping() throws IOException {\n\t\tXContentBuilder loanMapping = XContentFactory.jsonBuilder()\n\t\t\t\t// entity..\n\t\t\t\t.startObject().startObject(TYPE_ENTITY).startObject(PROPERTIES)\n\t\t\t\t// identification no..\n\t\t\t\t.startObject(Tag.IDENTIFICATION_NO).field(TYPE, KEYWORD).endObject()\n\t\t\t\t// name..\n\t\t\t\t.startObject(Tag.NAME).field(TYPE, TEXT).endObject()\n\t\t\t\t// surname..\n\t\t\t\t.startObject(Tag.SURNAME).field(TYPE, TEXT).endObject()\n\t\t\t\t// monthly income..\n\t\t\t\t.startObject(Tag.MONTHLY_INCOME).field(TYPE, DOUBLE).endObject()\n\t\t\t\t// phone no..\n\t\t\t\t.startObject(Tag.PHONE_NO).field(TYPE, TEXT).endObject()\n\t\t\t\t// credit limit..\n\t\t\t\t.startObject(Tag.CREDIT_RESULT).field(TYPE, BOOLEAN).endObject()\n\t\t\t\t// credit limit..\n\t\t\t\t.startObject(Tag.CREDIT_LIMIT).field(TYPE, DOUBLE).endObject()\n\t\t\t\t// credit score..\n\t\t\t\t.startObject(Tag.CREDIT_SCORE).field(TYPE, DOUBLE).endObject().endObject().endObject().endObject();\n\t\treturn loanMapping;\n\t}", "public interface DocusignEnvelopeService {\n\t/**\n\t * Retrieves the envelope status by envelope id.\n\t *\n\t * @param envelopeId the envelope id\n\t * @param user the user executing the request\n\t * @return the envelope status\n\t */\n\tpublic EnvelopeStatus getEnvelopeStatus(String envelopeId, User user);\n\n\t/**\n\t * Retrieves envelope statuses for envelope within the current day.\n\t * \n\t * @param user the user to lookup envelope statuses in\n\t * @return a map of envelope ids to status codes\n\t * @throws DatatypeConfigurationException thrown if xml datatype cannot be created for request\n\t */\n\tpublic Map<String, EnvelopeStatusCode> getEnvelopeStatusesInLastDay(User user) throws DatatypeConfigurationException;\n\t\n\t/**\n\t * Retrieves a list of document pdfs linked to an envelope.\n\t *\n\t * @param envelopeId the envelope id\n\t * @param user the user executing the request\n\t * @return a list of document pdfs linked to and envelope\n\t */\n\tpublic List<DocumentPDF> getDocumentsForEnvelopeId(String envelopeId, User user);\n}" ]
[ "0.81231385", "0.5324913", "0.5122484", "0.50509113", "0.49718976", "0.49679413", "0.4826913", "0.48149475", "0.47866356", "0.4728662", "0.47124654", "0.4680633", "0.46245152", "0.46139035", "0.46102902", "0.45850065", "0.45579", "0.4542748", "0.44940677", "0.44860622", "0.44793445", "0.44707513", "0.44616082", "0.4433355", "0.4426818", "0.44144988", "0.4413009", "0.4405241", "0.4403418", "0.4403053", "0.43946558", "0.43816444", "0.43808633", "0.43790945", "0.4361937", "0.43513587", "0.4345781", "0.43411234", "0.4332832", "0.4324592", "0.43176538", "0.43142897", "0.4305128", "0.43039703", "0.43", "0.4296674", "0.428993", "0.42853394", "0.4281639", "0.4275206", "0.4256251", "0.4256136", "0.42552602", "0.42552602", "0.42552602", "0.42405665", "0.42375943", "0.42372397", "0.4231635", "0.42254543", "0.42249897", "0.42248416", "0.42228907", "0.42219105", "0.42193434", "0.42147812", "0.4212329", "0.4212157", "0.42095375", "0.42085883", "0.42048317", "0.4203315", "0.42025805", "0.42018428", "0.42014474", "0.42010054", "0.4192576", "0.41913083", "0.4186668", "0.4182757", "0.41777146", "0.4174733", "0.41708377", "0.41682485", "0.41599697", "0.41598836", "0.41540566", "0.41540465", "0.4148704", "0.41471767", "0.41432822", "0.4142602", "0.4142415", "0.4141708", "0.41410625", "0.41404134", "0.41385677", "0.4135014", "0.41298378", "0.41244394", "0.41243017" ]
0.0
-1
============================== totalList ajax ==========================================
@ResponseBody @RequestMapping(value="/listChoice", method=RequestMethod.POST) public List<AuctionDTO> listChoice(String search, String category, int startNum, int lastNum )throws Exception{ System.out.println(search); System.out.println(category); System.out.println(startNum); System.out.println(lastNum); List<AuctionDTO> l=auctionService.listChoice(search, category, startNum, lastNum); System.out.println(l.size()); return l; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String doAdapt(List list, int total) {\n\t\tJsonConfig jconfig = new JsonConfig();\n\t\tJSONArray ja = new JSONArray();\n\t\tjconfig.setIgnoreDefaultExcludes(false);\n\t\tjconfig.registerJsonValueProcessor(java.util.Date.class,\n\t\t\t\tnew DateJsonValueProcessor(\"yyyy-MM-dd\"));\n\n\t\t\n\n\t\tJSONObject jobj = new JSONObject();// new一个JSON\n<<<<<<< HEAD\n\t\tif(total!=-1){\n\t\t\tjobj.accumulate(\"total\", total);// total代表一共有多少数据\n\t\t}\n=======\n<<<<<<< HEAD\n\t\tif(total!=-1){\n\t\t\tjobj.accumulate(\"total\", total);// total代表一共有多少数据\n\t\t}\n=======\n\t\tjobj.accumulate(\"total\", total);// total代表一共有多少数据\n>>>>>>> 9b9aee380b03c152f24fb429f1d11f8db1905faa\n>>>>>>> c32516e224b90a80c1d2ab87727a4b0cb81eae8e\n\t\tjobj.accumulate(\"rows\", ja.fromObject(list, jconfig));// row是代表显示的页的数据\n\t\t\n\t\treturn jobj.toString();\n\t}", "@Override\n\t\t\tpublic void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\t\t\t\ttry {\n\t\t\t\t\tJSONArray jsonArray = response.getJSONArray(\"List\");\n\t\t\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\n\t\t\t\t\t\tJSONObject j = jsonArray.getJSONObject(i);\n\n\t\t\t\t\t\tString createDate = j.optString(\"createDate\");\n\t\t\t\t\t\tString url = j.optString(\"url\");\n\t\t\t\t\t\tString name = j.optString(\"name\");\n\t\t\t\t\t\tint price = j.optInt(\"price\");\n\t\t\t\t\t\tint count = j.optInt(\"count\");\n\t\t\t\t\t\totherFee.add(new OtherFee(price, count, name, createDate, url));\n\t\t\t\t\t\tsize++;\n\t\t\t\t\t}\n\t\t\t\t\tif (size == 10) {\n\t\t\t\t\t\tpageIndex++;\n\t\t\t\t\t\tisend = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tisend = true;\n\t\t\t\t\t}\n\t\t\t\t\tsize = 0;\n\t\t\t\t\tlv_otherfee.onRefreshComplete();\n\t\t\t\t\tlvadapter.notifyDataSetChanged();\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void onSuccess(List<QiangYu> list) {\n\t\t\t\tLogUtils.i(TAG,\"find success.\"+list.size());\n\t\t\t\tif(list.size()!=0&&list.get(list.size()-1)!=null){\n\t\t\t\t\tif(mRefreshType==RefreshType.REFRESH){\n\t\t\t\t\t\tmListItems.clear();\n\t\t\t\t\t}\n\t\t\t\t\tif(list.size()<Constant.NUMBERS_PER_PAGE){\n\t\t\t\t\t\tLogUtils.i(TAG,\"已加载完所有数据~\");\n\t\t\t\t\t}\n\t\t\t\t\tif(MyApplication.getInstance().getCurrentUser()!=null){\n\t\t\t\t\t\tlist = DatabaseUtil.getInstance(mContext).setFav(list);\n\t\t\t\t\t}\n\t\t\t\t\tmListItems.addAll(list);\n\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\t\n\t\t\t\t\tsetState(LOADING_COMPLETED);\n\t\t\t\t\tmPullRefreshListView.onRefreshComplete();\n\t\t\t\t}else{\n\t\t\t\t\tActivityUtil.show(getActivity(), \"暂无更多数据~\");\n\t\t\t\t\tpageNum--;\n\t\t\t\t\tsetState(LOADING_COMPLETED);\n\t\t\t\t\tmPullRefreshListView.onRefreshComplete();\n\t\t\t\t}\n\t\t\t}", "@RequestMapping(value = \"/listComittee.do\")\n\tpublic String outputJsonList(HttpServletRequest request, HttpServletResponse response,Model model) throws IOException {\n\t\tSystem.out.println(\"get\");\n\t\tString sPageNo = request.getParameter(\"pageNo\");\n\t\tString sPageSize = request.getParameter(\"pageSize\");\n\t\tString sTotalcnt = \"0\";\n\t\tString sTitle = request.getParameter(\"sTitle\");\n\t\tif(sTitle == null ) {\n\t\t\tsTitle = \"\";\n\t\t};\n\t\tSystem.out.println(sTitle);\n\t\t\n\t\tMap <String,String> hm1 = new HashMap();\n\t\thm1.put (\"sPageNo\",sPageNo);\t\t\n\t\thm1.put (\"sPageSize\",sPageSize);\t\t\n\t\thm1.put (\"sTotalcnt\",sTotalcnt);\t\n\t\thm1.put (\"sTitle\",sTitle);\n\n\t\tString Tot= comitteeListService.selectTotal(hm1);\n\t\t\n\t\tList<HashMap<String, String>> aList= comitteeListService.listComittee(hm1);\n\t \n\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t map.put(\"result\",aList);\n\t \n\t model.addAllAttributes(map);\n\t model.addAttribute(\"totCnt\",Tot);\n\n\t // Keypoint ! setViewName占쏙옙 占쏙옙載� String 占식띰옙占쏙옙姑占� JsonView bean 占쏙옙占쏙옙占쏙옙占쏙옙占� id占쏙옙 占쏙옙占싣억옙 占싼댐옙.\t \n\t return \"jsonView\";\n\t}", "private void pagination(){\n recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {\n super.onScrollStateChanged(recyclerView, newState);\n }\n\n @Override\n public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n\n if (dy>0){\n LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();\n int lastItem = layoutManager.findLastCompletelyVisibleItemPosition(); //finds last visible item\n int currentTotalCount = layoutManager.getItemCount(); //find total number of displayed items\n\n if (mLoadingItems){\n if (currentTotalCount > previousTotal){\n mLoadingItems = false;\n previousTotal = currentTotalCount;\n }\n }\n if (!mLoadingItems && (currentTotalCount <= (lastItem +view_threshold))) {\n mLoadingItems = true;\n //Increment number of items on the list\n firstItemVisible = firstItemVisible+10;\n lastItemVisible = lastItemVisible+10;\n //Update adapter\n jsonParse();\n }\n }\n }\n });\n }", "public List viewTotalInscritosBD();", "@Override\n public void onSuccess(List<BlocksByHeightQuery.Datum> list) {\n List<com.arcblock.btcblockviewer.BlocksByHeightQuery.Datum> oldList = new ArrayList<>();\n oldList.addAll(mBlocks);\n\n // set mBlocks with new data\n mBlocks = list;\n DiffUtil.DiffResult result = DiffUtil.calculateDiff(new CoreKitDiffUtil<>(oldList, mBlocks), true);\n // need this line , otherwise the update will have no effect\n mListBlocksAdapter.setNewListData(mBlocks);\n result.dispatchUpdatesTo(mListBlocksAdapter);\n\n refreshNextAndPre();\n\n //2. view status change and loadMore component need\n if (mPagedQueryHelper.isHasMore()) {\n mListBlocksAdapter.setEnableLoadMore(true);\n mListBlocksAdapter.loadMoreComplete();\n } else {\n mListBlocksAdapter.loadMoreEnd();\n }\n }", "@Override\n public void onLoadMore() {\n if (searchbeanArrayList_new.size() != 0) {\n\n\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n // remove progress item\n\n\n //add items one by one\n\n if (pageTokenAvailable) {\n smoothProgressBar.setVisibility(View.VISIBLE);\n\n current_start += 10;\n\n // searchbean_post_data.getStart_limit()+=10;\n\n searchbean_post_data.setStart_limit(current_start);\n\n\n findDataFromServer();\n\n\n //or you can add all at once but do not forget to call mAdapter.notifyDataSetChanged();\n }\n\n\n }\n }, 2000);\n\n }\n\n }", "public int listAmount() {\n return count;\n }", "public int getTotalItems()\n {\n return totalItems;\n }", "@RequestMapping(value = \"/qnaListAjax.re\", produces=\"application/json; charset=UTF-8\")\r\n\t@ResponseBody\r\n\tpublic List<QnaVO> qnaListAjax() {\r\n\t\tList<QnaVO> qnaList = qnaService.getList();\r\n\t\t\r\n\t\treturn qnaList;\r\n\t}", "@Override\r\n\t\tpublic int getCount() {\n\t\t\treturn listData.size();\r\n\t\t}", "@Override\n public int getItemCount() {\n return listDataResult.size();\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.d(TAG, \"点击了读取更多 \");\n\t\t\t\tnumber++;\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tgetdata(number);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\txlistview.setLoadMoreSuccess();\n\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\tLog.d(TAG, \"jieshu\");\n\t\t\t\t\t}\n\t\t\t\t}.execute(null, null, null);\n\t\t\t}", "private void pagination()\n {\n if (value==0)\n {\n aBoolean=true;\n setAdapter(postModels);\n value=1;\n count=count+10;\n }\n else if (value==1)\n {\n if (count<page_count)\n {\n aBoolean=true;\n count=count+10;\n temp_list.addAll(postModels);\n adapter.notifyDataSetChanged();\n }\n }\n }", "@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\tcurPage = 1;\n\t\t\t\tmList.clear();\n\t\t\t\tJiaoYiJiLuExec.getInstance().getTiXianJiLuList(mHandler,\n\t\t\t\t\t\tManagerUtils.getInstance().yjtc.getId(), curPage,\n\t\t\t\t\t\tpageSize, NetworkAsyncCommonDefines.GET_TXJL_LIST_S,\n\t\t\t\t\t\tNetworkAsyncCommonDefines.GET_TXJL_LIST_F);\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onSuccess(List<Dish> arg0) {\n\t\t\t\t\t\tif (arg0.size() > 0) {\n\n\t\t\t\t\t\t\tfor (Dish dish : arg0) {\n\t\t\t\t\t\t\t\tdishlist.add(dish);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdishadapter.notifyDataSetChanged();\n\t\t\t\t\t\t\tcurPage++;\n\t\t\t\t\t\t\t//toast(\"第\" + (page + 1) + \"页数据加载完成\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttoast(\"没有更多数据了\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n\t\t\tpublic int getCount(){\n\t\t\t\treturn list.size();\n\t\t\t}", "public abstract void onLoadMore(int page, int totalItemsCount);", "public abstract void onLoadMore(int page, int totalItemsCount);", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tlistitem.clear();\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\tgetmessage_list(1);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\tif (count >= 19) {\n\t\t\t\t\t\t\txListView.startLoadMore();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\txListView.stopLoadMore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\txListView.setRefreshSuccess();\n\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\tLog.d(TAG, \"jieshu\");\n\t\t\t\t\t}\n\t\t\t\t}.execute(null, null, null);\n\t\t\t}", "private void additems() {\n MaVolleyRequest.getInstance(getApplicationContext()).GetMethodRequest(getLink(), null, new VolleyRequestOnResultListener() {\n @Override\n public void onSucces(String result) {\n Log.d(\"qwerty\", getLink());\n ResearchResultBeanz item = (new Gson()).fromJson((new Gson()).fromJson(result, JsonObject.class).getAsJsonObject(\"data\"), ResearchResultBeanz.class);\n if (adapter == null) {\n adapter = new GridViewAdapter2(ImageGridViewActivity.this, Utils.fromArrayToList(item.items));\n gridView.setAdapter(adapter);\n } else {\n adapter.appendData (Utils.fromArrayToList(item.items));\n }\n flag_loading = false;\n }\n @Override\n public void onFailure(String error) {\n makeToast(\"Loading failure\");\n flag_loading = false;\n }\n });\n }", "@JsonProperty(\"total_items\")\n public Long getTotalItems() {\n return totalItems;\n }", "@Override\r\n\tpublic String list() {\n\t\tList<HeadLine> dataList=new ArrayList<HeadLine>();\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\t\r\n\t\tLong count=headLineService.count();\r\n\t\tpagerItem.changeRowCount(count);\r\n\t\t\r\n\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}", "public void fetchGuestList() {\n mRowDataList.clear();\n int temp = 0;\n todayIncome = 0;\n guestCount = 0;\n for (int i = 0; i < 10; i++) {\n temp = 800 + i;\n String name = \"Guest No.\" + i;\n String timeSpanPlaceHolder = \"PlaceHolder\";\n todayIncome += temp;\n mRowDataList.add(new RecyclerListAdapter.rowData(\"\" + temp, name, \"\" + temp, timeSpanPlaceHolder));\n }\n guestCount = mRowDataList.size();\n\n }", "@RequestMapping(value = \"/icga/getJASONforProjectWiseControlList.html\", method = RequestMethod.POST)\n public @ResponseBody\n JasonBean getProjectWiseControlCountList(HttpServletRequest request) {\n logger.debug(\"Project Wise Control List Controller \");\n String page = request.getParameter(\"page\") != null ? request.getParameter(\"page\") : \"1\";\n String rp = request.getParameter(\"rp\") != null ? request.getParameter(\"rp\") : \"10\";\n String sortname = request.getParameter(\"sortname\") != null ? request.getParameter(\"sortname\") : \"projectName\";\n String sortorder = request.getParameter(\"sortorder\") != null ? request.getParameter(\"sortorder\") : \"desc\";\n String query = request.getParameter(\"query\") != null ? request.getParameter(\"query\") : \"false\";\n String qtype = request.getParameter(\"qtype\") != null ? request.getParameter(\"qtype\") : \"false\";\n String controlIdsListAsString = request.getParameter(\"controlId\") != null ? request.getParameter(\"controlId\") : \"\";\n\n String tableName = request.getParameter(\"tableName\") != null ? request.getParameter(\"tableName\") : \"\";\n\n List dbColumnList = TransactionSearchController.getDbColumnHeaderList(request,tableName);\n sortname = dbColumnList!= null? RealTimeMonitoringController.getDbColumnNameByRef(dbColumnList,sortname): null;\n logger.debug(\"SMN: controlIdsListAsString=\"+controlIdsListAsString);\n\n List dbColumnHeaderList = new ArrayList();\n JasonBean jasonData = new JasonBean();\n\n int totalItems = 0 ;\n List<Cell> entry = new ArrayList<Cell>();\n List trxSearchList = new ArrayList<Control>();\n GlobalTransactionSearch globalTransactionSearch = new GlobalTransactionSearch();\n try {\n\n totalItems = adminJdbcService.getProjectWiseCountByControlIds(controlIdsListAsString,getStringForComparingControls(controlIdsListAsString),\n qtype, query, sortname, sortorder);\n trxSearchList = adminJdbcService.getProjectWiseCountListByControlIds(controlIdsListAsString,getStringForComparingControls(controlIdsListAsString),\n Utils.parseInteger(page),\"max\".equals(rp) ? totalItems : Utils.parseInteger(rp),qtype, query, sortname, sortorder);\n\n logger.debug(\"TOTAL count---\"+totalItems+\" page=\"+page+\" rp=\"+rp);\n if(\"max\".equals(rp)){\n TransactionSearchController.setTotalListSizeAndListInSession(totalItems,trxSearchList,request);\n jasonData.setTotal(totalItems);\n }else{\n if(trxSearchList != null) {\n int count=0;\n logger.debug(\"trxSearchList size=\"+trxSearchList.size());\n jasonData.setPage(Utils.parseInteger(page));\n for(Object obj : trxSearchList) {\n RealTimeProject realTimeProject = new RealTimeProject();\n Cell cell = new Cell();\n Map map = (Map) obj;\n\n realTimeProject.setProjectName(map.get(\"project\") != null ? map.get(\"project\").toString() : \"\");\n realTimeProject.setTransactionIds(map.get(\"transaction_ids\") != null ? map.get(\"transaction_ids\").toString() : \"\");\n realTimeProject.setTotal(map.get(\"total\") != null ? map.get(\"total\").toString() : \"\");\n realTimeProject.setProjectType(map.get(\"projectType\") != null ? map.get(\"projectType\").toString() : \"\");\n realTimeProject.setProjectId(map.get(\"projectId\") != null ? map.get(\"projectId\").toString() : \"\");\n\n cell.setId(count++);\n cell.setCell(realTimeProject);\n entry.add(cell);\n }\n\n Map mapForHeader = new HashMap();\n mapForHeader.put(\"projectName\",\"project\"); // key=flexigrid parameter name, value = dbField Name\n mapForHeader.put(\"transactionIds\",\"transaction_ids\");\n mapForHeader.put(\"total\",\"total\");\n mapForHeader.put(\"projectId\",\"projectId\");\n mapForHeader.put(\"projectType\",\"projectType\");\n dbColumnHeaderList.add(mapForHeader);\n request.getSession().setAttribute(tableName,dbColumnHeaderList);\n\n jasonData.setRows(entry);\n jasonData.setTotal(totalItems);\n jasonData.setDbColumnHeader(dbColumnHeaderList);\n } else {\n logger.debug(\"No Transaction Search List Found\");\n }\n }\n\n }catch (Exception ex) {\n logger.debug(\"CERROR:Project Wise Control Exception : \" + ex);\n }\n\n return jasonData;\n\n }", "@Override\n public void onLoadMoreItems() {\n if (mAdapter.hasMoreItems()) {\n requestData(mAdapter.getItems() == null ? 0 : mAdapter.getItems().size(), false);\n } else {\n mAdapter.onFinishLoading(false);\n }\n }", "private void updateTotal() {\r\n\t\t// We get the size of the model containing all the modules in the list.\r\n\t\tlabelTotal.setText(\"Total Modules: \" + String.valueOf(helperInstMod.model.size()));\r\n\t}", "int getListCount();", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t\tint page = Integer.parseInt(req.getParameter(\"page\"));\n\t\tint pageSize = Integer.parseInt(req.getParameter(\"pageSize\"));\n\t\tfor (int i = ((page * pageSize) - pageSize); i < i * pageSize; i++) {\n\t\t\tsubList.add(list.get(i));\n\t\t}\n\t\tGson gson = new Gson();\n\t\tString data=gson.toJson(subList, new TypeToken<List<String>>() {\n\t\t}.getType());\n\n\t\tPrintWriter out = resp.getWriter();// 输出流,可以直接写字符串\n\t\tout.write(data);\n\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn _listData.size();\n\t\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tif (listitem != null || listitem.size() > 0) {\n\t\t\t\t\tlistitem.clear();\n\t\t\t\t}\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\tgetdata(1);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\tif (count >= 19) {\n\t\t\t\t\t\t\txlistview.startLoadMore();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\txlistview.stopLoadMore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\txlistview.setRefreshSuccess();\n\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\tLog.d(TAG, \"jieshu\");\n\t\t\t\t\t}\n\t\t\t\t}.execute(null, null, null);\n\t\t\t}", "public int getCount() {\n\t\t\treturn dataList.size();\r\n\t\t}", "@Override\n public int getCount() {\n return dataList.size();\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\r\n\t\tresponse.setContentType(\"text/html;charset=utf-8\");\r\n\t\tPrintWriter out = response.getWriter();\r\n\t\tString checksheet_id=request.getParameter(\"checksheet_id\");\r\n\t\tint pageNo=0;\r\n\t int countPerPage=20;\r\n\t int totalCount = 0;\r\n\t pageNo = Integer.parseInt(request.getParameter(\"pageIndex\"))+1;\r\n\t countPerPage = Integer.parseInt(request.getParameter(\"pageSize\"));\r\n\t\tString totalCountSql = \"select count(*) from mycheckin_detl where checksheet_id='\"+checksheet_id+\"'\";\r\n\t\t try {\r\n\t\t \ttotalCount = Sqlhelper.exeQueryCountNum(totalCountSql, null);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t}\r\n\t\t\r\n\t\tString sql=\"select * from (select A.*,ROWNUM row_num from (select EM.* from mycheckin_detl EM where EM.checksheet_id='\"+checksheet_id+\"' order by checksheet_id asc) A where ROWNUM<=\"+(countPerPage*pageNo)+\" order by checksheet_id) B \" +\r\n\t\t\t\t\"where row_num>=\"+((pageNo-1)*countPerPage+1)+\" order by checksheet_id\";\r\n\t\tSystem.out.println(sql);\r\n\t\tList<CheckinDetl> resultList=new ArrayList<CheckinDetl>();\r\n\t\ttry{\r\n\t\t\t\r\n\t\t\tresultList=Sqlhelper.exeQueryList(sql, null, CheckinDetl.class);\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\tString json = PluSoft.Utils.JSON.Encode(resultList);\r\n\t\tjson = \"{\\\"total\\\":\"+totalCount+\",\\\"data\\\":\"+json+\"}\";\r\n\t\tresponse.getWriter().append(json).flush();\r\n\t\tSystem.out.println(json);\r\n\t\t\r\n\t}", "@Override\n public void onLoadMore(int page, int totalItemsCount) {\n customLoadMoreDataFromApi(page);\n // or customLoadMoreDataFromApi(totalItemsCount);\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount) {\n customLoadMoreDataFromApi(page);\n // or customLoadMoreDataFromApi(totalItemsCount);\n }", "@Override\n public int getCount() {\n return resultList.size();\n }", "public int getCount() {\n return dataList.size();\n }", "@Override\n\t public void onLoadMore(int page, int totalItemsCount) {\n\t customLoadMoreDataFromApi(page); \n // or customLoadMoreDataFromApi(totalItemsCount); \n\t }", "public int size(){\n\n \treturn list.size();\n\n }", "@Override\n\t public void onLoadMore(int page, int totalItemsCount) {\n\t customLoadMoreDataFromApi(); \n // or customLoadMoreDataFromApi(totalItemsCount); \n\t }", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn BaseData.list.size();\n\t\t}", "@Override\n public int getItemCount() {\n return dataList.size();\n }", "@Override\r\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\r\n\t\t}", "@Override\r\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\r\n\t\t}", "@Override\r\n\t\t\tpublic int getCount() {\n\t\t\t\treturn list.length;\r\n\t\t\t}", "int getItemsCount();", "int getItemsCount();", "public void getChallanOnloadList(TaxChallan taxChallan,HttpServletRequest request) {\r\n\t\tObject[][]listData = null;\r\n\t\tArrayList<Object> list = new ArrayList();\r\n\t\ttry {\r\n\t\t\tString query = \"SELECT CHALLAN_CODE ,DECODE(CHALLAN_MONTH ,1,'JANUARY',2,'FEBRUARY',3,'MARCH',4,'APRIL',5, \"\r\n\t\t\t\t\t+ \" 'MAY',6,'JUNE',7,'JULY',8,'AUGUST', 9,'SEPTEMBER',10,'OCTOBER',11,'NOVEMBER',12,'DECEMBER'), \"\r\n\t\t\t\t\t+ \" CHALLAN_YEAR, NVL(DIV_NAME,' '), DIV_ID, CHALLAN_MONTH, ROWNUM, TO_CHAR(NVL(CHALLAN_TOTALTAX,0),9999999990.99) FROM HRMS_TAX_CHALLAN \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_DIVISION ON HRMS_DIVISION.DIV_ID = HRMS_TAX_CHALLAN.CHALLAN_DIVISION_ID \"\r\n\t\t\t\t\t+ \" ORDER BY CHALLAN_YEAR DESC\";\r\n\t\t\tlistData = getSqlModel().getSingleResult(query);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"exception in listData query\",e);\r\n\t\t} //end of catch\r\n\t\t\r\n\t\tif(listData !=null && listData.length >0){\r\n\t\t\t\r\n\t\t\t\tString[] pageIndex = Utility.doPaging(taxChallan.getMyPage(), listData.length, 20);\r\n\t\t\t\tif (pageIndex == null) {\r\n\t\t\t\t\tpageIndex[0] = \"0\";\r\n\t\t\t\t\tpageIndex[1] = \"20\";\r\n\t\t\t\t\tpageIndex[2] = \"1\";\r\n\t\t\t\t\tpageIndex[3] = \"1\";\r\n\t\t\t\t\tpageIndex[4] = \"\";\r\n\t\t\t\t} //end of if\r\n\t\t\t\trequest.setAttribute(\"totalPage\", Integer.parseInt(String\r\n\t\t\t\t\t\t.valueOf(pageIndex[2])));\r\n\t\t\t\trequest.setAttribute(\"pageNo\", Integer.parseInt(String\r\n\t\t\t\t\t\t.valueOf(pageIndex[3])));\r\n\r\n\t\t\t\tif (pageIndex[4].equals(\"1\"))\r\n\t\t\t\t\ttaxChallan.setMyPage(\"1\");\r\n\t\t\t\r\n\t\t\t//int count=0;\r\n\t\t\tfor (int i = Integer.parseInt(pageIndex[0]); i < Integer.parseInt(pageIndex[1]); i++) {\r\n\t\t\t\tTaxChallan bean = new TaxChallan();\r\n\t\t\t\tbean.setChallanListCode(String.valueOf(listData[i][0]));\r\n\t\t\t\tbean.setChallanListMonth(String.valueOf(listData[i][1]));\r\n\t\t\t\tbean.setChallanListYear(String.valueOf(listData[i][2]));\r\n\t\t\t\tbean.setChallanListDivName(String.valueOf(listData[i][3]));\r\n\t\t\t\tbean.setChallanListDivId(String.valueOf(listData[i][4]));\r\n\t\t\t\tbean.setChallanListMonthId(String.valueOf(listData[i][5]));\r\n\t\t\t\tbean.setListRowNum(String.valueOf(listData[i][6]));\r\n\t\t\t\tbean.setListTotalTax(String.valueOf(listData[i][7]));\r\n\t\t\t\tlist.add(bean);\r\n\t\t\t\t//count++;\r\n\t\t\t} //end of loop\r\n\t\t\ttaxChallan.setTotalListRecords(String.valueOf(listData.length));\r\n\t\t\ttaxChallan.setIteratorlist(list);\r\n\t\t\t//request.setAttribute(\"addQuestionTotalPages\",(list.size() % scriptPageNo == 0)?(list.size()/scriptPageNo):(list.size()/scriptPageNo)+1);\r\n\t\t}else{\r\n\t\t\ttaxChallan.setListNoData(\"true\");\r\n\t\t} //end of else\r\n\t\t\r\n\t}", "@Override\r\n\t\t\t\t\tpublic <T> void sucess(Type type, ResponseResult<T> arg0) {\n\t\t\t\t\t\tscrollview.onRefreshComplete();\r\n\t\t\t\t\t\tArticleListByUserId getArticleByUserId = arg0\r\n\t\t\t\t\t\t\t\t.getModel();\r\n\t\t\t\t\t\t\tif (getArticleByUserId!= null&&getArticleByUserId.getTotal()> 0) {\r\n\t\t\t\t\t\t\t\ttotalPage=Tools.calculateTotalPage(getArticleByUserId.getTotal());\r\n\t\t\t\t\t\t\t\tif (pageNo == 1) {\r\n\t\t\t\t\t\t\t\t\tdynamicListData.clear();\r\n\t\t\t\t\t\t\t\t\tcurPageIndex = 1;}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif (totalPage > curPageIndex){\r\n\t\t\t\t\t\t\t\t\tscrollview.setMode(Mode.BOTH);\r\n\t\t\t\t\t\t\t\t curPageIndex++;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tscrollview.setMode(Mode.PULL_FROM_START);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tfor(DynamicInfo info:getArticleByUserId.getArticles()){\r\n\t\t\t\t\t\t\t\t\tUserDynaicListCell userCell = new UserDynaicListCell();\r\n\t\t\t\t\t\t\t\t\tuserCell.setMomentInfo(info);\r\n\t\t\t\t\t\t\t\t\tdynamicListData.add(userCell);\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\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tadapter.notifyDataSetChanged();\r\n\t\t\t\t\t\t\t}\r\n//\t\t\t\t\t\t\telse{\r\n//\t\t\t\t\t\t\t\tdynamicListLayout.setEmptyView(Tools\r\n//\t\t\t\t\t\t\t\t\t\t.setEmptyView(getActivity()));\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}", "public void getGHUnitList(Model model) throws Exception {\n\t\tHashMap<String, Object> reqMap = (HashMap<String, Object>) model.asMap().get(\"pageMap\");\n\t\tHashMap<String, Object> resultMap = setGridListParamaters(reqMap);\n\t\tList<HashMap<String, Object>> list = workUnitDao.getGHUnitList(reqMap); \n\t\tresultMap.put(\"DATA_LIST\", list);\n\t\tSystem.out.println(\"!!!!!!!!!!!!!!\"+list);\n\t\tmodel.addAttribute(\"DATA_LIST\", list);\n\t\tmodel.addAttribute(\"totalCnt\", list.size());\n\t\tmodel.addAttribute(\"gridData\", getGridDataJson(resultMap, false));\n\t}", "public int getCount() {\n return datalist.size();\n }", "@Override\n public void run() {\n loadingMore=true;\n //load data from url\n ArrayList<Recipe> recipe = Utils.fetchListOfRecipeData(stringUrl+current_page);\n ++current_page;\n recipesList.addAll(recipe);\n }", "public void total() {\n\t\t\n\t}", "public long getTotal() {\r\n\t\treturn page.getTotalElements();\r\n\t}", "public int getTotal() {\n return total;\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n System.out.println(\"load more\" + totalItemsCount);\n loadMore(totalItemsCount);\n }", "long getTotalProductsCount();", "@Override\n public int getItemCount() {\n //neste caso 10\n return mList.size();\n }", "@Override\n\t\t\t\tpublic int getViewRowCount() {\n\t\t\t\t\treturn model.getListaBase().size();\n\t\t\t\t}", "public int getTotalArticle() {\n int listLimit;\n int total;\n int totalPage;\n listLimit = getArticleRowCount();\n clickGoToLastPageBtn();\n // Has to used this method instead of goToPageBtn().size() since the maximum size of the goToPageBtn list is always 10\n totalPage = Integer.parseInt(goToPageBtn().get(goToPageBtn().size() - 1).getText().trim());\n total = getArticleRowCount() + listLimit * totalPage;\n return total;\n }", "@Override\n\t\t\tpublic void onSuccess(String icode, List<MusicBean> datas,\n\t\t\t\t\tint totalpage) {\n\t\t\t\tif(datas.size() > 0) {\n\t\t\t\t\tmAdapter.setSelectItemPosi(0);\n\t\t\t\t}\n\t\t\t\tmAdapter.setData(datas);\n\t\t\t}", "@Override\n\t\t\tpublic int getCount() {\n\t\t\t\tif (list!=null) {\n\t\t\t\t\treturn list.size();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\t\r\n\t public int size() {\n\t\r\n\t\t return lstItems.size();\r\n\t\r\n\t }", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn list.size();\n\t\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn mList.size();\n\t\t}", "@Override\n public int getItemCount() {\n return responseList.size()+1;\n }", "@Override\n\tpublic int selectListCnt(User vo) {\n\t\treturn 0;\n\t}", "public void setTotalResults(ListForm listForm) throws ApplicationException {\n\t\tif (listForm.getOrderBy() == null) {\n\t\t\tlistForm.setOrderBy(\"Productkey\");\n\t\t}\n\t\t\n\t\tlistForm.setMaxResults(Constants.MAX_RESULTS_NOLIMIT);\n\t\t\n\t\tint total = 0;\n\t\tlistForm.setTotalResults(total);\n\t\t\n\t}", "private void addDataForListView() {\n \t\n \tif(loadable)\n \t{\t\n \tloadable = false;\n \tdirection = BACKWARD;\n \tstrUrl = Url.composeHotPageUrl(type_id, class_id, last_id);\n \trequestData();\n \t}\n\t}", "void onPagesAdded(List<Integer> pageList);", "public int getCount() {\n\t\t\treturn list.size();\r\n\t\t}", "private int kiemtrasopt (List list){\n int dem = list.size();\n return dem;\n }", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn thisPageList.size();\n\t\t}", "private void updateTotalPageNumbers() {\n totalPageNumbers = rows.size() / NUM_ROWS_PER_PAGE;\n }", "@Override\n public int getCount() {\n return dataList.size();\n }", "public void onEvent(Event e) throws Exception {\n\t\t\t\tlistData.getItems().clear();\n\t\t\t\tpage += 1;\n\t\t\t\tif(page.intValue() > ((listAllRow.size()-1)/manyRow)+1) page = ((listAllRow.size()-1)/manyRow)+1;\n\t\t\t\tif(page.intValue() == ((listAllRow.size()-1)/manyRow)+1){\n\t\t\t\t\t//berarti last page\n\t\t\t\t\t((Button)next).setDisabled(true);\n\t\t\t\t\t((Button)lastPage).setDisabled(true);\n\t\t\t\t\tshowListPerPage(listData,((page-1)*manyRow)+1,listAllRow.size());\n\t\t\t\t\tComponentUtil.setValue(perData,\"[ \"+String.valueOf(((page-1)*manyRow)+1)+\" - \"+String.valueOf(listAllRow.size()));\n\t\t\t\t}else{\n\t\t\t\t\t((Button)next).setDisabled(false);\n\t\t\t\t\t((Button)lastPage).setDisabled(false);\n\t\t\t\t\tshowListPerPage(listData,((page-1)*manyRow)+1,page*manyRow);\n\t\t\t\t\tComponentUtil.setValue(perData,\"[ \"+String.valueOf(((page-1)*manyRow)+1)+\" - \"+String.valueOf(page*manyRow));\n\t\t\t\t}\n\t\t\t\t((Button)previous).setDisabled(false);\n\t\t\t\t((Button)firstPage).setDisabled(false);\n\t\t\t}", "void loadResults(ArrayList<Comic> results, int totalItems);", "@Override\n public int getCount() {\n return mList.size();\n }", "public int getCount() {\n return list.size();\n }", "@Override\n\tpublic int getRowCount() {\n\t\treturn list.size();\n\t}", "@Override\n\tpublic int getRowCount() {\n\t\treturn list.size();\n\t}", "public int sizeOfCompletedList()\n\t {\n\t \tList <WebElement> items= CompletedList;\n\t \t\n\t \treturn items.size();\n\t }", "@Override\r\n public Long findListCount(Map<String, Object> params) {\n return assetDao.findListCount(params);\r\n }", "public int listSize(){\r\n return counter;\r\n }", "@Override\n\t\t\tpublic void onScrollStateChanged(RecyclerView recyclerView,\n\t\t\t\t\tint newState) {\n\t\t\t\tsuper.onScrollStateChanged(recyclerView, newState);\n\t\t\t\tif (newState == RecyclerView.SCROLL_STATE_IDLE\n\t\t\t\t\t\t&& lastVisibleItem + 1 == mTiXianJiLuAdapter\n\t\t\t\t\t\t\t\t.getItemCount()) {\n\t\t\t\t\tswiperefreshlayout.setRefreshing(true);\n\t\t\t\t\tcurPage++;\n\t\t\t\t\tJiaoYiJiLuExec.getInstance().getTiXianJiLuList(mHandler,\n\t\t\t\t\t\t\tManagerUtils.getInstance().yjtc.getId(),\n\t\t\t\t\t\t\tcurPage, pageSize,\n\t\t\t\t\t\t\tNetworkAsyncCommonDefines.GET_TXJL_LIST_S,\n\t\t\t\t\t\t\tNetworkAsyncCommonDefines.GET_TXJL_LIST_F);\n\t\t\t\t}\n\n\t\t\t}", "public static void getCartCheckOutItemsTotalAmount(TextView total, TextView mealCost1, TextView totalTaxFromAPI, TextView deliveryChargeFromAPI, TextView packagingChargeFromAPI, int from, boolean applyreferral) {\n String url = APIBaseURL.getCartsList + SaveSharedPreference.getLoggedInUserEmail(consumerCheckOutActivity) + \"?Referal=\" + applyreferral;\n\n CustomVolleyRequest stringRequest = new CustomVolleyRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n Log.v(\"referalResponse\", response);\n JSONObject jsonObject = new JSONObject(response);\n JSONObject dataArray = jsonObject.getJSONObject(\"data\");\n JSONArray cartDetailsArray = dataArray.getJSONArray(\"cartDetails\");\n JSONArray totalMenuItemsArray = new JSONArray();\n double sum = 0;\n double mealPriceSum = 0;\n objectsList.clear();\n cartDetailsListssArray = new ArrayList<>();\n for (int i = 0; i < cartDetailsArray.length(); i++) {\n JSONObject menuObject = cartDetailsArray.getJSONObject(i);\n Chef chef = new Chef();\n chef.setId(menuObject.optString(\"chefId\"));\n chef.setName(menuObject.optString(\"chefName\"));\n\n JSONArray menuDetailsArray = new JSONArray();\n\n if (menuObject.has(\"menuDetails\")) {\n menuDetailsArray = menuObject.getJSONArray(\"menuDetails\");\n totalMenuItemsArray = menuObject.getJSONArray(\"menuDetails\");\n }\n\n JSONObject footerObject = new JSONObject();\n\n if (menuObject.has(\"footer\")) {\n footerObject = menuObject.getJSONObject(\"footer\");\n }\n chef.setSumOfSaleAmount(footerObject.optString(\"sumOfSaleAmount\"));\n chef.setSumTaxAmount(footerObject.optString(\"sumTaxAmount\"));\n chef.setDeliveryCharges(footerObject.optString(\"deliveryCharges\"));\n chef.setPackagingCharges(footerObject.optString(\"packagingCharges\"));\n chef.setTotal(footerObject.optString(\"total\"));\n total.setText(String.format(\"%.2f\", Double.valueOf(footerObject.optString(\"total\"))));\n mealCost1.setText(String.format(\"%.2f\", Double.valueOf(footerObject.optString(\"sumOfSaleAmount\"))));\n totalTaxFromAPI.setText(String.format(\"%.2f\", Double.valueOf(footerObject.optString(\"sumTaxAmount\"))));\n deliveryChargeFromAPI.setText(String.format(\"%.2f\", Double.valueOf(footerObject.optString(\"deliveryCharges\"))));\n packagingChargeFromAPI.setText(String.format(\"%.2f\", Double.valueOf(footerObject.optString(\"packagingCharges\"))));\n Log.v(\"SingleMealPrice\", footerObject.optString(\"sumOfSaleAmount\"));\n List<FoodItem> foodItemList = new ArrayList<>();\n cartsItemsListss = new ArrayList<>();\n for (int j = 0; j < menuDetailsArray.length(); j++) {\n JSONObject menuItemsObject = menuDetailsArray.getJSONObject(j);\n\n FoodItem foodItem = new FoodItem();\n if (menuItemsObject.getJSONArray(\"dishImage\").length() != 0) {\n foodItem.setFoodImage(menuItemsObject.getJSONArray(\"dishImage\").get(0).toString());\n }\n\n foodItem.setFoodName(menuItemsObject.optString(\"dishName\"));\n foodItem.setShortDescription(menuItemsObject.optString(\"shortDescription\"));\n foodItem.setAvailableQuantity(\"Available(\" + menuItemsObject.optString(\"availableCount\") + \")\");\n foodItem.setAvailQty(menuItemsObject.optInt(\"availableCount\"));\n foodItem.setTime(menuItemsObject.optString(\"preparationTime\"));\n foodItem.setCartId(menuItemsObject.optString(\"id\"));\n foodItem.setFoodId(menuItemsObject.optString(\"dishId\"));\n foodItem.setCartQuantity(menuItemsObject.optInt(\"quantity\"));\n foodItem.setMealPrice(menuItemsObject.optString(\"mealPrice\"));\n foodItem.setPrice(menuItemsObject.optString(\"mealPrice\"));\n foodItem.setSubTotal(menuItemsObject.optInt(\"total\"));\n foodItem.setAvailable(menuItemsObject.optBoolean(\"isAvailable\"));\n\n JSONObject quickInfoObject = new JSONObject();\n\n if (menuObject.has(\"quickInfo\")) {\n quickInfoObject = menuItemsObject.getJSONObject(\"quickInfo\");\n\n\n JSONObject nutritionObject = new JSONObject();\n\n if (quickInfoObject.has(\"nutrition\")) {\n nutritionObject = quickInfoObject.getJSONObject(\"nutrition\");\n }\n\n foodItem.setProteintCount(nutritionObject.optInt(\"protein\"));\n foodItem.setFatCount(nutritionObject.optInt(\"fat\"));\n foodItem.setFibreCount(nutritionObject.optInt(\"fibre\"));\n foodItem.setCarbsCount(nutritionObject.optInt(\"carbohydrates\"));\n }\n JSONObject chefQuickInfoObject = new JSONObject();\n\n if (menuObject.has(\"chefQuickInfo\")) {\n chefQuickInfoObject = menuObject.getJSONObject(\"chefQuickInfo\");\n }\n\n foodItem.setChefId(chefQuickInfoObject.optString(\"chefId\"));\n foodItem.setChefImage(chefQuickInfoObject.optString(\"chefImagePath\"));\n foodItem.setChefName(chefQuickInfoObject.optString(\"chefName\"));\n foodItem.setChefprofession(chefQuickInfoObject.optString(\"profession\"));\n foodItem.setChefratingAverage(chefQuickInfoObject.optInt(\"ratingAverage\"));\n foodItem.setChefratingCount(chefQuickInfoObject.optInt(\"ratingsCount\"));\n foodItem.setChefsubscribersCount(chefQuickInfoObject.optInt(\"subscribersCount\"));\n\n List<ItemAddOns> itemAddOns = new ArrayList<>();\n ItemAddOns addOns = new ItemAddOns();\n addOns.setName(\"coconut\");\n // foodItem.setAddOns(itemAddOns);\n Double subTotal = menuObject.optDouble(\"total\");\n sum = sum + subTotal;\n\n Double mealPriceTotal = menuObject.optDouble(\"mealPrice\");\n mealPriceSum = mealPriceSum + mealPriceTotal;\n foodItemList.add(foodItem);\n cartsItemsListss.add(foodItem);\n chef.setFoodItemList(foodItemList);\n\n }\n objectsList.add(chef);\n cartDetailsListssArray.add(chef);\n if (from == 2) {\n recyclerViewFoodItem.getAdapter().notifyDataSetChanged();\n } else {\n recyclerViewFoodItem.getAdapter().notifyDataSetChanged();\n }\n if (objectsList.size() == 0) {\n consumerCheckOutActivity.finish();\n\n }\n }\n try {\n JSONObject orderReportSummaryObject = new JSONObject();\n\n if (dataArray.has(\"orderReportSummary\")) {\n orderReportSummaryObject = dataArray.getJSONObject(\"orderReportSummary\");\n }\n\n subTotal.setText(\"Sub Total (\" + jsonObject.optString(\"count\") + \" Items)\");\n price.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"grandTotal\"))));\n totalCostinPop.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"grandTotal\"))));\n taxCost.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"totalTax\"))));\n packagingCost.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"totalPackingCharges\"))));\n\n\n if (!dataArray.optBoolean(\"isRefferalApplied\") || orderReportSummaryObject.optInt(\"referalAmount\") == 0) {\n // Toast.makeText(consumerCheckOutActivity, \"Referral Cannot be applied\", Toast.LENGTH_SHORT).show();\n checkReferral.setChecked(false);\n stateReferralAppliedorNot = false;\n Log.v(\"checkBoxReferal\", \"false\");\n }\n\n// if(dataArray.optInt(\"totalPointused\") == 0)\n// {\n// //referralCost.setText(\" - \"+String.format(\"%.2f\",Double.valueOf(\"0\")));\n// }\n// else\n// {\n try {\n referralCost.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"referalAmount\"))));\n } catch (Exception e) {\n e.printStackTrace();\n }\n// }\n mealCost.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"orderSubTotal\"))));\n deliveryCost.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"totalDeliveryCharges\"))));\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n boolean checkAvailability = isAllItemsAreNotSoldOut(cartDetailsListssArray);\n if (checkAvailability) {\n soldOutTextinCart.setVisibility(View.VISIBLE);\n } else {\n soldOutTextinCart.setVisibility(View.GONE);\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n NetworkResponse response = error.networkResponse;\n if (response != null && response.statusCode == 404) {\n try {\n String res = new String(response.data,\n HttpHeaderParser.parseCharset(response.headers, \"utf-8\"));\n // Now you can use any deserializer to make sense of data\n JSONObject obj = new JSONObject(res);\n //use this json as you want\n consumerCheckOutActivity.finish();\n // Toast.makeText(Address.this, \"Address Field should not contain #,Invalid address\", Toast.LENGTH_SHORT).show();\n } catch (UnsupportedEncodingException e1) {\n // Couldn't properly decode data to string\n e1.printStackTrace();\n } catch (JSONException e2) {\n // returned data is not JSONObject?\n e2.printStackTrace();\n }\n }\n if (error instanceof AuthFailureError) {\n //TODO\n ViewGroup viewGroup = consumerCheckOutActivity.findViewById(android.R.id.content);\n\n //then we will inflate the custom alert dialog xml that we created\n View dialogView = LayoutInflater.from(consumerCheckOutActivity).inflate(R.layout.access_token_expired_dialog, viewGroup, false);\n\n Button buttonreset = dialogView.findViewById(R.id.buttonreset);\n Button buttonOk = dialogView.findViewById(R.id.buttonOk);\n ImageView closeBtn = dialogView.findViewById(R.id.closeBtn);\n\n //Now we need an AlertDialog.Builder object\n android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(consumerCheckOutActivity);\n\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n android.app.AlertDialog alertDialog = builder.create();\n\n\n buttonOk.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n ConsumerMainActivity.logout();\n\n }\n });\n\n closeBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n\n }\n });\n\n buttonreset.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n }\n });\n alertDialog.setCanceledOnTouchOutside(false);\n alertDialog.show();\n } else if (error instanceof NetworkError) {\n Toast.makeText(consumerCheckOutActivity, \"Cannot connect to Internet...Please check your connection!\", Toast.LENGTH_SHORT).show();\n }\n }\n }, consumerCheckOutActivity);\n ApplicationController.getInstance().addToRequestQueue(stringRequest, \"cart_list_taq\");\n }", "@JsonProperty(\"total_items\")\n public void setTotalItems(Long totalItems) {\n this.totalItems = totalItems;\n }", "@Override\n public int getItemCount() {\n return list.size();\n }", "public int getCount() {\n\t\t\treturn mlistData.size();\n\t\t}", "public <I extends ResourceCollectionTransformation<S, T>> I total(int totalCount) {\n\t\treturn total(new Long(totalCount));\n\t}", "@Override\n\t\t\tpublic void onSuccess(List<Goods> object){\n\t\t\t\tcloseProgressDialog();\n\t\t\t\tonRefreshComplete();\n\t\t\t\tlist.addAll(object);\n\t\t\t\tLog.v(\"AAA\", JSON.toJSONString(list));\n\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t}", "public int size(){\n return list.size();\n }", "int getTotalCount();", "@Override\n\t\tpublic synchronized void onLoadMore() {\n\t\t\ttry {\n\t\t\t\t//如果总页数大于当前页码数,加载更多\n\t\t\t\tif(pageSize > curPage){\n\t\t\t\t\tURL = URL.substring(0, URL.lastIndexOf(\"_\")+1);\n\t\t\t\t\tcurPage++;\n\t\t\t\t\tURL = URL+curPage+\".xml\";\n\t\t\t\t\tnew AsyncLoadNews(flag,lsnb,URL).execute();\n\t\t\t\t}else{\n\t\t\t\t\tlistView.setPullLoadEnable(false);\n\t\t\t\t\tonLoadStop();\n\t\t\t\t\tToast toast = Toast.makeText(getActivity(), \"数据已经加载完毕!\", Toast.LENGTH_LONG);\n//\t\t\t\t\ttoast.getView().setBackgroundResource(R.drawable.red_toast_bg);\n\t\t\t\t\ttoast.getView().setPadding(20, 10, 20, 10);\n\t\t\t\t\ttoast.show();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}" ]
[ "0.6202066", "0.6166837", "0.6092051", "0.6003145", "0.59673107", "0.59470016", "0.5854769", "0.5851842", "0.5832377", "0.58156663", "0.57973516", "0.57772666", "0.5746274", "0.57362694", "0.57259744", "0.572169", "0.5705048", "0.5696659", "0.5692963", "0.5692963", "0.56880844", "0.5668539", "0.5651949", "0.56487215", "0.5642904", "0.5627942", "0.5627207", "0.5618099", "0.5611448", "0.5610009", "0.56061023", "0.5588071", "0.55762535", "0.55683935", "0.556477", "0.5537181", "0.5537181", "0.55367404", "0.55350703", "0.5527115", "0.55234396", "0.5522569", "0.5519058", "0.5513246", "0.5495819", "0.5495819", "0.54928267", "0.5492775", "0.5492775", "0.54919344", "0.5483577", "0.54803914", "0.545143", "0.54495764", "0.54493415", "0.544783", "0.54454863", "0.5443883", "0.5440031", "0.54354775", "0.54305094", "0.54267806", "0.54241395", "0.5423883", "0.5423286", "0.54228395", "0.54228395", "0.54228395", "0.54228395", "0.54228395", "0.54228395", "0.5415484", "0.54152906", "0.54147565", "0.5412129", "0.5410527", "0.54078496", "0.5402704", "0.5393571", "0.5392275", "0.538793", "0.5384243", "0.53841263", "0.5373957", "0.53681123", "0.5358752", "0.53572965", "0.53572965", "0.53564364", "0.5355023", "0.5352865", "0.5347538", "0.53455424", "0.5343988", "0.53383625", "0.5336879", "0.5336625", "0.5335969", "0.53320444", "0.5320349", "0.53156674" ]
0.0
-1
Dimension abstractSyntaxSize = abstractSyntaxFigure.getPreferredSize(); abstractSyntaxSize.width = Math.min(abstractSyntaxSize.width, MAX_BOX_WIDTH); Dimension treeConcreteSyntaxSize = treeConcreteSyntaxFigure.getPreferredSize(); treeConcreteSyntaxSize.width = Math.min(treeConcreteSyntaxSize.width, MAX_BOX_WIDTH); Dimension staticSemanticsSize = staticSemanticsFigure.getPreferredSize(); staticSemanticsSize.width = Math.min(staticSemanticsSize.width, MAX_BOX_WIDTH); Dimension checkerSize = checkerFigure.getPreferredSize(); checkerSize.width = Math.min(checkerSize.width, MAX_BOX_WIDTH); Dimension interpreterSize = interpreterFigure.getPreferredSize(); interpreterSize.width = Math.min(interpreterSize.width, MAX_BOX_WIDTH); Dimension compilerSize = compilerFigure.getPreferredSize(); compilerSize.width = Math.min(compilerSize.width, MAX_BOX_WIDTH);
protected LayoutData getLayoutData() { LayoutData data = new LayoutData(); // boxes // int abstractSyntaxY = BOX_SPACING; // int treeConcreteSyntaxY = abstractSyntaxY +abstractSyntaxSize.height + BOX_SPACING; // System.out.println("abstractSyntaxSize.height = "+abstractSyntaxSize.height); // int checkerY = treeConcreteSyntaxY +treeConcreteSyntaxSize.height + BOX_SPACING; // int staticSemanticsX = BOX_SPACING; // int abstractSyntaxX = BOX_SPACING; // int compilerX = BOX_SPACING; // int interpreterX = BOX_SPACING; // data.abstractSyntaxBox = new Rectangle(abstractSyntaxX, abstractSyntaxY, abstractSyntaxSize.width, abstractSyntaxSize.height); // data.treeConcreteSyntaxBox = new Rectangle(0, treeConcreteSyntaxY, treeConcreteSyntaxSize.width, treeConcreteSyntaxSize.height); // data.staticSemanticsBox = new Rectangle(staticSemanticsX, treeConcreteSyntaxY, staticSemanticsSize.width, staticSemanticsSize.height); // data.checkerBox = new Rectangle(staticSemanticsX + 30, checkerY, checkerSize.width, checkerSize.height); // data.compilerBox = new Rectangle(compilerX, treeConcreteSyntaxY, compilerSize.width, compilerSize.height); // data.interpreterBox = new Rectangle(interpreterX, treeConcreteSyntaxY, interpreterSize.width, interpreterSize.height); for(int i = 0; i<taskFigures.size(); i++){ data.boxes.add(new Rectangle(BOX_SPACING, BOX_SPACING + i*(60 + BOX_SPACING) ,taskFigures.get(i).getPreferredSize().width,taskFigures.get(i).getPreferredSize().height)); } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSize(double width, double height){\r\n double topLaneHeight=height/100*myInformation.upperToDownPercent;\r\n double bottomLaneHeight=height-topLaneHeight;\r\n double leftSideWidth=width/100*myInformation.leftToRightPercent;\r\n double rightSideWidth=width-leftSideWidth-1;\r\n\r\n double buttonLeftHeight=(height-topLaneHeight)/100*myInformation.leftButtonsPercent;\r\n int countLeftButtons=0;\r\n double labelTopWidth=rightSideWidth/100*myInformation.upperButtonsPercent;\r\n int countTopLabels=0;\r\n //Regions\r\n leftVBox.setMinSize(leftSideWidth,height);\r\n leftVBox.setMaxSize(leftSideWidth,height);\r\n\r\n upperHBox.setMinSize(width,topLaneHeight);\r\n upperHBox.setMaxSize(width,topLaneHeight);\r\n\r\n canvas.setWidth(width);\r\n canvas.setHeight(bottomLaneHeight);\r\n\r\n pane.setMinSize(width,bottomLaneHeight);\r\n pane.setMaxSize(width,bottomLaneHeight);\r\n\r\n stackPane.setMinSize(width, height);\r\n stackPane.setMaxSize(width, height);\r\n\r\n mainVBox.setMinSize(width, height);\r\n mainVBox.setMaxSize(width, height);\r\n\r\n canvasStackPane.setMinSize(width,bottomLaneHeight);\r\n canvasStackPane.setMaxSize(width,bottomLaneHeight);\r\n\r\n listViewVBox.setMinSize(width, height);\r\n listViewVBox.setMaxSize(width, height);\r\n //Objects\r\n upperLeftButton.setMinSize(leftSideWidth,topLaneHeight);\r\n upperLeftButton.setMaxSize(leftSideWidth,topLaneHeight);\r\n //Left Side\r\n left1HintButton.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left1HintButton.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left2Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left2Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left3Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left3Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left4Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left4Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n left5Button.setMinSize(leftSideWidth,buttonLeftHeight);\r\n left5Button.setMaxSize(leftSideWidth,buttonLeftHeight);\r\n countLeftButtons++;\r\n\r\n double restHeight=height-(buttonLeftHeight*countLeftButtons+topLaneHeight);\r\n leftRestLabel.setMinSize(leftSideWidth,restHeight);\r\n leftRestLabel.setMaxSize(leftSideWidth,restHeight);\r\n\r\n //Top\r\n upper1Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper1Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n upper2Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper2Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n upper3Label.setMinSize(labelTopWidth,topLaneHeight);\r\n upper3Label.setMaxSize(labelTopWidth,topLaneHeight);\r\n countTopLabels++;\r\n\r\n double restwidth=width-upperLeftButton.getWidth()-(labelTopWidth*countTopLabels);\r\n upperRestLabel.setMinSize(restwidth,topLaneHeight);\r\n upperRestLabel.setMaxSize(restwidth,topLaneHeight);\r\n //New Gamemode stuff\r\n newGamemodeHBox.setMinSize(width,height);\r\n newGamemodeHBox.setMaxSize(width,height);\r\n double nBWidth=width/100*myInformation.newGamemodeButtonsPercent.width;\r\n double nBHeight=height/100*myInformation.newGamemodeButtonsPercent.height;\r\n\r\n newGamemodebutton1.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGamemodebutton2.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGamemodebutton3.setMinSize(nBWidth,nBHeight);\r\n newGamemodebutton3.setMaxSize(nBWidth,nBHeight);\r\n\r\n //BackButton\r\n backPane.setMinSize(width, height);\r\n backPane.setMaxSize(width, height);\r\n double backWidth=width/100*myInformation.backButtonPercent.width;\r\n double backHeight=height/100*myInformation.backButtonPercent.height;\r\n backButton.setMinSize(backWidth,backHeight);\r\n backButton.setMaxSize(backWidth,backHeight);\r\n //New Graphmode\r\n newGraphModeHBox.setMinSize(width,height);\r\n newGraphModeHBox.setMaxSize(width,height);\r\n\r\n newGraphModebutton1.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphModebutton2.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphModebutton3.setMinSize(nBWidth,nBHeight);\r\n newGraphModebutton3.setMaxSize(nBWidth,nBHeight);\r\n\r\n sMBHBox.setMinSize(width,height);\r\n sMBHBox.setMaxSize(width,height);\r\n smallButton.setMinSize(nBWidth,nBHeight);\r\n smallButton.setMaxSize(nBWidth,nBHeight);\r\n middleButton.setMinSize(nBWidth,nBHeight);\r\n middleButton.setMaxSize(nBWidth,nBHeight);\r\n bigButton.setMinSize(nBWidth,nBHeight);\r\n bigButton.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameEndButton.setMinSize(nBWidth,nBHeight);\r\n gameEndButton.setMaxSize(nBWidth,nBHeight);\r\n gameEndTop.setMinSize(width/2,height/5);\r\n gameEndTop.setMaxSize(width/2,height/5);\r\n\r\n\r\n listView.setMinSize(width/8,height/2);\r\n listView.setMaxSize(width/8,height/2);\r\n submit2.setMinSize(width/8,height/10);\r\n submit2.setMaxSize(width/8,height/10);\r\n\r\n textFieldHBox.setMinSize(width,height);\r\n textFieldHBox.setMaxSize(width,height);\r\n textFieldVertices.setMinSize(nBWidth,nBHeight);\r\n textFieldVertices.setMaxSize(nBWidth,nBHeight);\r\n textFieldEdges.setMinSize(nBWidth,nBHeight);\r\n textFieldEdges.setMaxSize(nBWidth,nBHeight);\r\n\r\n buttonTextfield.setMinSize(nBWidth/2,nBHeight);\r\n buttonTextfield.setMaxSize(nBWidth/2,nBHeight);\r\n\r\n //New Graph\r\n newGraphHBox.setMinSize(width,height);\r\n newGraphHBox.setMaxSize(width,height);\r\n\r\n newGraphButtonYes.setMinSize(nBWidth,nBHeight);\r\n newGraphButtonYes.setMaxSize(nBWidth,nBHeight);\r\n\r\n newGraphButtonNo.setMinSize(nBWidth,nBHeight);\r\n newGraphButtonNo.setMaxSize(nBWidth,nBHeight);\r\n\r\n hintButton1.setMinSize(nBWidth,nBHeight);\r\n hintButton1.setMaxSize(nBWidth,nBHeight);\r\n hintButton2.setMinSize(nBWidth,nBHeight);\r\n hintButton2.setMaxSize(nBWidth,nBHeight);\r\n hintButton3.setMinSize(nBWidth,nBHeight);\r\n hintButton3.setMaxSize(nBWidth,nBHeight);\r\n hintButton4.setMinSize(nBWidth,nBHeight);\r\n hintButton4.setMaxSize(nBWidth,nBHeight);\r\n hintButton5.setMinSize(nBWidth,nBHeight);\r\n hintButton5.setMaxSize(nBWidth,nBHeight);\r\n hintButton6.setMinSize(nBWidth,nBHeight);\r\n hintButton6.setMaxSize(nBWidth,nBHeight);\r\n hintButton7.setMinSize(nBWidth,nBHeight);\r\n hintButton7.setMaxSize(nBWidth,nBHeight);\r\n hintButton8.setMinSize(nBWidth,nBHeight);\r\n hintButton8.setMaxSize(nBWidth,nBHeight);\r\n hintButton9.setMinSize(nBWidth,nBHeight);\r\n hintButton9.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinStackPane.setMinSize(width, height);\r\n gameWinStackPane.setMaxSize(width, height);\r\n\r\n gameWinButton1.setMinSize(nBWidth,nBHeight);\r\n gameWinButton1.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinButton2.setMinSize(nBWidth,nBHeight);\r\n gameWinButton2.setMaxSize(nBWidth,nBHeight);\r\n\r\n gameWinHBox.setMinSize(width,height/4);\r\n gameWinHBox.setMaxSize(width,height/4);\r\n\r\n hintMenuStack.setMinSize(width, height);\r\n hintMenuStack.setMaxSize(width, height);\r\n\r\n hintMenu.setSpacing(width/30);\r\n vBoxHint.setSpacing(height/20);\r\n vBoxHint2.setSpacing(height/20);\r\n vBoxHint3.setSpacing(height/20);\r\n\r\n abstand.setMinSize(width,height/3);\r\n }", "public Size calcSize(ChartOptions options) {\n Node n = this; // current node in the level\n Size s = new Size(); // alt,iter,opt: size of current construct\n int iterCompensation = 0;\n boolean samelevel = true; // next node in same level?\n int realHeight = n.calcHeight(options);\n Size maxTotalSize = new Size(0, 0);\n while (n != null && samelevel) {\n switch (n.typ) {\n case PREDICATE:\n case EXCEPTION:\n case TERM:\n case NONTERM:\n n.size.setHeight(\n options.fontHeight() + options.symbolGapHeight() * 2\n + options.componentGapHeight());\n n.size.setWidth(options.stringWidth(n.sym.name) + options.symbolGapWidth() * 2);\n if (n.typ.matches(NodeType.TERM, \n NodeType.EXCEPTION, \n NodeType.PREDICATE)) {\n n.size.maxWidth(options.arcSize());\n }\n\n if (!n.up && n.next != null && n.next.typ == NodeType.WRAP\n && n.next.size.getHeight() == 0)\n {\n if (!n.next.up\n && n.next.next != null\n && (n.next.next.typ.matches(NodeType.TERM, \n NodeType.NONTERM, \n NodeType.EXCEPTION,\n NodeType.PREDICATE)))\n {\n s.incWidth(options.componentGapWidth() / 2);\n }\n }\n if (!n.up\n && n.next != null\n && (n.next.typ.matches(NodeType.TERM,\n NodeType.NONTERM,\n NodeType.EXCEPTION,\n NodeType.PREDICATE)))\n {\n s.incWidth(options.componentGapWidth() / 2);\n }\n break;\n case EPS:\n n.size.setHeight(\n options.fontHeight()\n + options.componentGapHeight());\n n.size.setWidth(options.componentGapWidth());\n break;\n case OPT:\n n.size = n.sub.calcSize(options);\n n.size.incWidth(options.componentGapWidth() * 2);\n n.size.incHeight(\n options.componentGapHeight() / 2\n + options.componentGapHeight());\n break;\n case ITER:\n n.size = n.sub.calcSize(options);\n n.size.incWidth(options.componentGapWidth() * 2);\n n.size.incHeight(options.componentGapHeight() / 2);\n break;\n case WRAP:\n maxTotalSize.incHeight(\n s.getHeight()\n - options.componentGapHeight() / 2);\n maxTotalSize.maxWidth(s.getWidth());\n s.setHeight(0);\n s.setWidth(0);\n break;\n case RERUN:\n n.size = n.sub.calcSize(options);\n if (n.itergraph != null) {\n n.altSize = n.size;\n n.iterSize = n.itergraph.calcSize(options);\n n.size.maxWidth(n.iterSize.getWidth());\n n.size.incHeight(\n options.fontHeight() * 3 / 2\n + options.componentGapHeight());\n } \n n.size.incHeight(options.componentGapHeight() / 2);\n \n n.size.incWidth(options.componentGapWidth() * 2);\n break;\n case ALT: {\n Node a = n;\n int maxH = -options.componentGapHeight();\n int maxW = 0;\n while (a != null) {\n a.size = a.sub.calcSize(options);\n maxH += a.size.getHeight();\n if (a.size.getWidth() > maxW) {\n maxW = a.size.getWidth();\n }\n a = a.down;\n }\n if (n.sub.typ == NodeType.ITER && realHeight != 0) {\n maxH +=\n (options.fontHeight() + options.componentGapHeight())\n / 2;\n }\n maxW += 2 * options.componentGapWidth();\n maxH += options.componentGapHeight();\n\n n.altSize.setHeight(maxH);\n n.altSize.setWidth(maxW);\n }\n break;\n }\n if (n.typ == NodeType.ITER && realHeight != 0) {\n iterCompensation = (options.fontHeight() + options\n .componentGapHeight()) / 2;\n }\n if (n.typ == NodeType.ALT) {\n s.maxHeight(n.altSize.getHeight());\n s.incWidth(n.altSize.getWidth());\n } else {\n s.maxHeight(n.size.getHeight());\n s.incWidth(n.size.getWidth());\n }\n if (n.typ == NodeType.ITER) {\n s.maxHeight(n.size.getHeight() + iterCompensation);\n }\n if (n.up) {\n samelevel = false;\n }\n n = n.next;\n }\n if (maxTotalSize.getWidth() != 0) {\n maxTotalSize.incHeight(\n s.getHeight() - options.componentGapHeight()\n / 2);\n maxTotalSize.maxWidth(s.getWidth());\n return maxTotalSize;\n } else {\n return s;\n }\n }", "void createComponent() {\n\t\t//Initialize all components\n\t\tsetLayout(new BorderLayout());\n\t\ttextEditor = new JTextArea();\n\t\terrorTextArea = new JTextArea();\n\t\topenButton = new JButton(\"Open\");\n\t\tsaveButton = new JButton(\"Save\");\n\t\tfindButton = new JButton(\"Find\");\n\t\treplaceButton = new JButton(\"Replace\");\n\t\tcompileButton = new JButton(\"Compile\");\n\t\trunButton = new JButton(\"Run\");\n\t\tfindField = new JTextField();\n\t\treplaceField = new JTextField();\n\t\tfontSizeItems = new Integer[17];\n\t\tfontStyle = new JComboBox<>(fontStyleItems);\n\t\tfinder = new ArrayList<>();\n\t\t\n\t\t//Assigns values to components\n\t\ttextEditor.setTabSize(2);\n\t\tint index = 0;\n\t\tfor(int i=8;i<=40;i+=2) {\n\t\t\tfontSizeItems[index] = i;\n\t\t\tindex++;\n\t\t}\n\t\tfontSize = new JComboBox<>(fontSizeItems);\n\t\tfontSize.setSelectedIndex(2);\n\t\terrorTextArea.setText(\"Error outputs here...\");\n\t\terrorTextArea.setEditable(false);\n\t\terrorTextArea.setFont(new Font(null, 0, 17));\n\t\terrorTextArea.setLineWrap(true);\n\t\terrorTextArea.setWrapStyleWord(true);\n\t\t\n\t\topenButton.setPreferredSize(optionSize);\n\t\tsaveButton.setPreferredSize(optionSize);\n\t\tfindButton.setPreferredSize(optionSize);\n\t\treplaceButton.setPreferredSize(optionSize);\n\t\t\n\t\thighlighter = textEditor.getHighlighter();\n\t\t\n\t\t//Add all components to panels\n\t\tJScrollPane scrollPane = new JScrollPane(textEditor);\n\t\tJPanel navigationPanel = new JPanel(new BorderLayout());\n\t\tJPanel optionsPanel = new JPanel(new GridLayout(2,5,5,5));\n\t\tJPanel executePanel = new JPanel(new GridLayout(2,1));\n\t\tJPanel errorPanel = new JPanel(new BorderLayout());\n\t\t\n\t\toptionsPanel.add(openButton);\n\t\toptionsPanel.add(fontSize);\n\t\toptionsPanel.add(findField);\n\t\toptionsPanel.add(findButton);\n\t\t\n\t\toptionsPanel.add(saveButton);\n\t\toptionsPanel.add(fontStyle);\n\t\toptionsPanel.add(replaceField);\n\t\toptionsPanel.add(replaceButton);\n\t\t\n\t\texecutePanel.add(compileButton);\n\t\texecutePanel.add(runButton);\n\t\t\n\t\terrorPanel.add(errorTextArea);\n\t\t\n\t\tnavigationPanel.add(optionsPanel,BorderLayout.CENTER);\n\t\tnavigationPanel.add(errorPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Add panels to the main frame\n\t\tthis.add(scrollPane,BorderLayout.CENTER);\n\t\tthis.add(navigationPanel, BorderLayout.SOUTH);\n\t\tthis.add(executePanel, BorderLayout.EAST);\n\t}", "private void basicSize(){\n setSize(375,400);\n }", "public void updateSyntaxStyles() {\n }", "public Dimension getPreferredSize()\n{ \n Dimension d=new Dimension(gRectangle.width+2*GC_CANVAS_HORIZ_GAP,\n gRectangle.height+2*GC_CANVAS_VERT_GAP);\n return d;\n}", "@Override\r\n public Dimension getPreferredSize() {\n \r\n return new Dimension((int) (this.getHeight() * 0.8), this.getHeight());\r\n }", "private void setSizeBox() {\n\t\t\tthis.leftX = pointsSubStroke.get(0).getX();\n\t\t\tthis.righX = pointsSubStroke.get(0).getX();\n\t\t\tthis.topY = pointsSubStroke.get(0).getY();\n\t\t\tthis.bottomY = pointsSubStroke.get(0).getY();\n\t\t\t\n\t\t\tfor(int i = 0; i < pointsSubStroke.size();i++) {\n\t\t\t\tdouble x = pointsSubStroke.get(i).getX();\n\t\t\t\tdouble y = pointsSubStroke.get(i).getX();\n\t\t\t\t\n\t\t\t\tthis.leftX = Math.min(x, leftX);\n\t\t\t\tthis.righX = Math.max(x, righX);\n\t\t\t\tthis.topY = Math.min(y, topY);\n\t\t\t\tthis.bottomY = Math.max(y, bottomY);\n\t\t\t}\n\t\t}", "public Dimension getPreferredSize() {\n\t Dimension size = super.getPreferredSize();\n\n\t // If not font has been set, prefer the renderers height.\n\t if(renderer != null &&\n\t DefaultTreeCellEditor.this.getFont() == null) {\n\t\tDimension rSize = renderer.getPreferredSize();\n\n\t\tsize.height = rSize.height;\n\t }\n\t return size;\n\t}", "public void updateHelpBoxDimensions()\r\n\t{\r\n\t\tsaveFont();\r\n\t\tg.setFont(NumerateGame.CAPTION_FONT);\r\n\t\thelpLineHeight = helpLines.size()*g.getFontMetrics().getMaxDescent();\r\n\t\thelpLineHeight += Math.max(helpLines.size()-1,0)*NumerateGame.HELP_BOX_INNER_TEXT_PADDING;\r\n\t\t\r\n\t\thelpLineWidth = 0;\r\n\t\tIterator it = helpLines.iterator();\r\n\t\twhile (it.hasNext())\r\n\t\t{\r\n\t\t\tString current = (String)it.next();\r\n\t\t\tif (g.getFontMetrics().stringWidth(current) > helpLineWidth)\r\n\t\t\t{\r\n\t\t\t\thelpLineWidth = g.getFontMetrics().stringWidth(current);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\trevertFont();\r\n\t}", "private void calcContentSize() {\n }", "public Dimension getPreferredSize() {\n\t\tint width = (radius + BORDERPAD) * 2;\r\n\t\treturn new Dimension(width, width);\r\n\t}", "@Override\n\tpublic Dimension getPreferredSize() {\n\t\treturn new Dimension(400,400);\n\t}", "abstract int calculatePreferredSize(int axis);", "private void setCorrectSize() {\n double newHeight = this.getContentPane().getPreferredSize().getHeight() +\n this.getContentPane().getPreferredSize().getHeight()/10 * 7;\n int newHeightInt = (int)Math.round(newHeight);\n \n this.setSize(this.getWidth(),newHeightInt);\n }", "@Override\r\n public Dimension getPreferredSize() {\r\n return new Dimension(colorWheelWidth + valueBarWidth + spacing + margins * 2,\r\n diameter + selectDiameter + margins * 2);\r\n }", "@Override\n public int width()\n {\n return widthCent; //Charlie Gao helped me debug the issue here\n }", "public Dimension getPreferredSize();", "private void layoutComponents() {\n setLayout(new MigLayout(\"fill, wrap 1, hidemode 3, \"\n + (padding ? \"ins rel\" : \"ins 0\")));\n\n add(infoLabel, \"growx\");\n add(scrollPane, \"grow, pushy\");\n add(addOptionPanel, \"growx\");\n }", "protected abstract void setSize();", "private void calcSizes(final double fontSize) {\n adjustedButtonSize = false;\n // Create a temporary check box and get its height\n if (!EtomoDirector.INSTANCE.getArguments().isHeadless()) {\n JCheckBox temp = new JCheckBox();\n checkboxHeight = temp.getPreferredSize().getHeight();\n }\n else {\n checkboxHeight = DEFAULT_CHECKBOX_HEIGHT;\n }\n fontSizeAdjustment = fontSize / DEFAULT_FONT_SIZE;\n dimButton.setSize(7 * checkboxHeight * fontSizeAdjustment, 2 * checkboxHeight\n * fontSizeAdjustment);\n dimButtonSingleLine.setSize(7 * checkboxHeight * fontSizeAdjustment, 1.25\n * checkboxHeight * fontSizeAdjustment);\n dimNarrowButton.setSize(4 * checkboxHeight * fontSizeAdjustment, 1.25\n * checkboxHeight * fontSizeAdjustment);\n dimAxisButton.setSize(3.6 * checkboxHeight * fontSizeAdjustment, 1.25\n * checkboxHeight * fontSizeAdjustment);\n dimSpinner.setSize(2 * checkboxHeight * fontSizeAdjustment, 1.05 * checkboxHeight\n * fontSizeAdjustment);\n dimFileField.setSize(20 * checkboxHeight * fontSizeAdjustment, 2 * checkboxHeight\n * fontSizeAdjustment);\n dimFileChooser.setSize(400 * fontSizeAdjustment, 400 * fontSizeAdjustment);\n numericWidth = (int) (40 * fontSizeAdjustment);\n wideNumericWidth = (int) (50 * fontSizeAdjustment);\n sectionsWidth = (int) (75 * fontSizeAdjustment);\n integerTripletWidth = (int) (75 * fontSizeAdjustment);\n integerDoubletWidth = (int) (50 * fontSizeAdjustment);\n integerWidth = (int) (30 * fontSizeAdjustment);\n fourDigitWidth = (int) (40 * fontSizeAdjustment);\n listWidth = (int) (140 * fontSizeAdjustment);\n fileWidth = (int) (210 * fontSizeAdjustment);\n // Adjust the button size if possible\n if (buttonFontMetrics != null) {\n instance.improveButtonSize(buttonFontMetrics);\n }\n }", "private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jToggleButton1 = new javax.swing.JToggleButton();\n jPanel4 = new javax.swing.JPanel();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n jProgressBar1 = new javax.swing.JProgressBar();\n jEditorPane1 = new javax.swing.JEditorPane();\n\n setLayout(new java.awt.BorderLayout());\n\n jPanel2.setLayout(new java.awt.BorderLayout());\n\n jPanel3.setLayout(new java.awt.GridLayout(4, 0, 0, 8));\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel1.text\")); // NOI18N\n jLabel1.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel3.add(jLabel1);\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel3.text\")); // NOI18N\n jLabel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel3.add(jLabel3);\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel4.text\")); // NOI18N\n jLabel4.setToolTipText(org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel4.toolTipText\")); // NOI18N\n jLabel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel3.add(jLabel4);\n\n org.openide.awt.Mnemonics.setLocalizedText(jToggleButton1, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jToggleButton1.text\")); // NOI18N\n jToggleButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jToggleButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jToggleButton1ActionPerformed(evt);\n }\n });\n jPanel3.add(jToggleButton1);\n\n jPanel2.add(jPanel3, java.awt.BorderLayout.WEST);\n\n jPanel4.setLayout(new java.awt.GridLayout(4, 0, 0, 8));\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel8, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel8.text\")); // NOI18N\n jLabel8.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel4.add(jLabel8);\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel9, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel9.text\")); // NOI18N\n jLabel9.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel4.add(jLabel9);\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel10, org.openide.util.NbBundle.getMessage(GenDatasetVisualPanel3.class, \"GenDatasetVisualPanel3.jLabel10.text\")); // NOI18N\n jLabel10.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jPanel4.add(jLabel10);\n\n jProgressBar1.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 12, 2, 8));\n jProgressBar1.setStringPainted(true);\n jPanel4.add(jProgressBar1);\n\n jPanel2.add(jPanel4, java.awt.BorderLayout.CENTER);\n\n add(jPanel2, java.awt.BorderLayout.PAGE_START);\n\n jEditorPane1.setBackground(jPanel2.getBackground());\n jEditorPane1.setBorder(javax.swing.BorderFactory.createEmptyBorder(8, 12, 8, 12));\n jEditorPane1.setEditable(false);\n jEditorPane1.setMaximumSize(new java.awt.Dimension(200, 200));\n add(jEditorPane1, java.awt.BorderLayout.CENTER);\n }", "public Dimension getPreferredSize()\n {\n return fileName.getPreferredSize();\n }", "protected void resizePanel() {\n\t\tif (drawingAreaIsBlank) { // may have become blank after deleting the last node manually, so panel must still be shrunk\n\t\t\tsetPreferredSize(new Dimension(0,0)); // put back to small size so scrollbars disappear\n\t\t\trevalidate();\n\t\t\treturn;\n\t\t}\n\t\tgetMaxMin(); // get the extent of the tree to the left, right, bottom\n\t\tsetPreferredSize(new Dimension(maxX, maxY));\n\t\trevalidate();\n\t}", "public void reshapeEditor() {\n if (getEditedText() != null) {\n // Update the size to fit the new document - note that it is a 2 stage process\n Dimension prefSize = getEditor().getPreferredSize();\n\n Insets pInsets = getEditedText().getInsets();\n Insets jInsets = getEditor().getInsets();\n\n int width = (getEditedText().getConstrainWidthToTextWidth()) ? (int) prefSize.getWidth() : (int) (getEditedText().getWidth() - pInsets.left - pInsets.right\n + jInsets.left + jInsets.right);\n prefSize.setSize(width, prefSize.getHeight());\n getEditor().setSize(prefSize);\n\n prefSize = getEditor().getPreferredSize();\n int height = (getEditedText().getConstrainHeightToTextHeight()) ? (int) prefSize.getHeight() : (int) (getEditedText().getHeight() - pInsets.top - pInsets.bottom\n + jInsets.top + jInsets.bottom);\n\n prefSize.setSize(width, height);\n getEditor().setSize(prefSize);\n\n // need some twiddling to make the width dance together with an editor...\n if (enforceWidth) {\n if (getWidth() < width + getPedding().getRight() - getPedding().getLeft()) {\n width = width + getPedding().getRight() - getPedding().getLeft();\n } else {\n width = width + getPedding().getLeft();\n }\n setMinConstraint(new PDimension(width, height));\n } else {\n setMinConstraint(new PDimension(0, 0));\n }\n\n reshape(false); // reshaping this component\n getCanvas().repaint();\n }\n }", "@Override\n public void initializePopupContent() {\n root = EditorUtils.loadPopupFxml(\"FontPopupEditor.fxml\", this); //NOI18N\n // Add the editors in the scene graph\n familyEditor = new FamilyEditor(\"\", \"\", getFamilies(editorController), editorController);//NOI18N\n familySp.getChildren().add(familyEditor.getValueEditor());\n styleEditor = new StyleEditor(editorController.getFxomDocument().getMetadata(),\"\", \"\", new ArrayList<>(), editorController);//NOI18N\n styleSp.getChildren().add(styleEditor.getValueEditor());\n sizeEditor = new BoundedDoubleEditor(editorController.getFxomDocument().getMetadata(),\"\", \"\", getPredefinedFontSizes(), 1.0, 96.0, true);//NOI18N\n commitOnFocusLost(sizeEditor);\n sizeSp.getChildren().add(sizeEditor.getValueEditor());\n\n familyEditor.valueProperty().addListener(new ChangeListener<Object>() {\n @Override\n public void changed(ObservableValue<? extends Object> ov, Object oldVal, Object newVal) {\n if (familyEditor.isUpdateFromModel()) {\n // nothing to do\n return;\n }\n commit();\n setStyle();\n }\n });\n\n styleEditor.valueProperty().addListener(new ChangeListener<Object>() {\n @Override\n public void changed(ObservableValue<? extends Object> ov, Object oldVal, Object newVal) {\n if (styleEditor.isUpdateFromModel()) {\n // nothing to do\n return;\n }\n commit();\n }\n });\n\n sizeEditor.valueProperty().addListener(new ChangeListener<Object>() {\n @Override\n public void changed(ObservableValue<? extends Object> ov, Object oldVal, Object newVal) {\n if (sizeEditor.isUpdateFromModel()) {\n // nothing to do\n return;\n }\n commit();\n }\n });\n\n sizeEditor.transientValueProperty().addListener(new ChangeListener<Object>() {\n @Override\n public void changed(ObservableValue<? extends Object> ov, Object oldVal, Object newVal) {\n transientValue(getFont());\n }\n });\n }", "public void setSize();", "@Override\n public Dimension getPreferredSize()\n {\n return new Dimension( width, height );\n }", "public Dimension getPreferredSizeRO();", "public BracketPane(Bracket currentBracket) {\n displayedSubtree=0;\n this.currentBracket = currentBracket;\n\n bracketMap = new HashMap<>();\n nodeMap = new HashMap<>();\n panes = new HashMap<>();\n nodes = new ArrayList<>();\n ArrayList<Root> roots = new ArrayList<>();\n\n center = new GridPane();\n\n ArrayList<StackPane> buttons = new ArrayList<>();\n buttons.add(customButton(\"EAST\"));\n buttons.add(customButton(\"WEST\"));\n buttons.add(customButton(\"MIDWEST\"));\n buttons.add(customButton(\"SOUTH\"));\n buttons.add(customButton(\"FULL\"));\n\n ArrayList<GridPane> gridPanes = new ArrayList<>();\n\n for (int m = 0; m < buttons.size() - 1; m++) {\n roots.add(new Root(3 + m));\n panes.put(buttons.get(m), roots.get(m));\n }\n Pane finalPane = createFinalFour();\n //buttons.add(customButton(\"FINAL\"));\n //panes.put(buttons.get(5), finalPane);\n fullPane = new GridPane();\n GridPane gp1 = new GridPane();\n gp1.add(roots.get(0), 0, 0);\n gp1.add(roots.get(1), 0, 1);\n GridPane gp2 = new GridPane();\n gp2.add(roots.get(2), 0, 0);\n gp2.add(roots.get(3), 0, 1);\n gp2.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT);\n\n fullPane.add(gp1, 0, 0);\n fullPane.add(finalPane, 1, 0, 1, 2);\n fullPane.add(gp2, 2, 0);\n fullPane.setAlignment(Pos.CENTER);\n panes.put(buttons.get((buttons.size() - 1)), fullPane);\n finalPane.toBack();\n\n // Initializes the button grid\n GridPane buttonGrid = new GridPane();\n for (int i = 0; i < buttons.size(); i++)\n buttonGrid.add(buttons.get(i), 0, i);\n buttonGrid.setAlignment(Pos.CENTER);\n\n // set default center to the button grid\n this.setCenter(buttonGrid);\n\n for (StackPane t : buttons) {\n t.setOnMouseEntered(mouseEvent -> {\n t.setStyle(\"-fx-background-color: lightblue;\");\n t.setEffect(new InnerShadow(10, Color.LIGHTCYAN));\n });\n t.setOnMouseExited(mouseEvent -> {\n t.setStyle(\"-fx-background-color: orange;\");\n t.setEffect(null);\n });\n t.setOnMouseClicked(mouseEvent -> {\n setCenter(null);\n /**\n * @update Grant & Tyler \n * \t\t\tpanes are added as ScrollPanes to retain center alignment when moving through full-view and region-view\n */\n center.add(new ScrollPane(panes.get(t)), 0, 0);\n center.setAlignment(Pos.CENTER);\n setCenter(center);\n //Grant 5/7 this is for clearing the tree it kind of works \n displayedSubtree=buttons.indexOf(t)==7?0:buttons.indexOf(t)+3;\n });\n }\n\n }", "public void setSizePlayingFields()\r\n {\n setPreferredSize(new Dimension(109*8,72*8));//powieżchnia o 2 m z każdej strony większa niz boisko 106 i 69 pomnożone o 8\r\n //większe boisko żeby było widać\r\n setMaximumSize(getMaximumSize());\r\n setBackground(Color.green);\r\n }", "public void build()\n\t{\n\t\t// TODO: Is the order okay?\n\n\t\t// Frame\n\t\tthis.setDefaultCloseOperation(HIDE_ON_CLOSE);\n\t\tthis.contentPane = new JPanel();\n\t\tthis.contentPane.setLayout(new BorderLayout(0, 0));\n\t\tthis.setContentPane(contentPane);\n\n\t\t// Split pane\n\t\tthis.splitPane = new JSplitPane();\n\t\tthis.splitPane.setBorder(new EmptyBorder(0, 5, 5, 5));\n\t\tthis.contentPane.add(splitPane, BorderLayout.CENTER);\n\n\t\t// tree pane (left side)\n\t\tJPanel panel = new JPanel();\n\t\tthis.splitPane.setLeftComponent(panel);\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));\n\n\t\tthis.treePane = new JScrollPane();\n\t\tpanel.add(treePane);\n\n\t\t// Context pane (right side)\n\t\tJPanel panel_1 = new JPanel();\n\t\tthis.splitPane.setRightComponent(panel_1);\n\t\tpanel_1.setLayout(new BoxLayout(panel_1, BoxLayout.X_AXIS));\n\n\t\tthis.contextPane = new JScrollPane();\n\t\tpanel_1.add(contextPane);\n\n\t\tJPanel buttonPanel = createButtonPanel();\n\t\tthis.add(buttonPanel, BorderLayout.SOUTH);\n\n\t\tthis.splitPane.setDividerLocation(DEFAULT_DIVIDER_LOCATION);\n\n\t\t// Menu bar\n\t\tthis.menuBar = new StyleEditorMenuBar(this.guiController);\n\t\tthis.setJMenuBar(menuBar);\n\n\t\t// Tool bar\n\t\tthis.styleEditorToolBar = new StyleEditorToolBar(this.guiController);\n\t\tthis.add(styleEditorToolBar, BorderLayout.NORTH);\n\n\t\t// Combo box (from tool bar)\n\t\tthis.styleComboBox = this.styleEditorToolBar.getComboBox();\n\n\t\t// Create style tree(s):\n\t\tsynchronizeStyles();\n\n\t\t// Tree object\n\t\tthis.treePane.setViewportView(getCurrentStyleTree());\n\t\tgetCurrentStyleTree().updateTree();\n\n\t\tthis.contextPane.setViewportView(getCurrentStyleTree().getRoot().getPanel());\n\t\tthis.contextPane.getVerticalScrollBar().setUnitIncrement(10);\n\t\tthis.synchronizeStyles();\n\n\t\tthis.pack();\n\n\t\tthis.built = true;\n\t}", "public MainFrame() { \n \n \n initComponents();\n java.net.URL imgURL = getClass().getResource(\"/pkg4seqgui/images/dna.png\");\n ImageIcon image = new ImageIcon(imgURL);\n \n DefaultTreeCellRenderer renderer =(DefaultTreeCellRenderer) AnalysisTree.getCellRenderer();\n renderer.setLeafIcon(image);\n imgURL = getClass().getResource(\"/pkg4seqgui/images/dna1.png\");\n ImageIcon image2 = new ImageIcon(imgURL);\n renderer.setOpenIcon(image2);\n expandAllNodes(AnalysisTree, 0, AnalysisTree.getRowCount());\n \n\n //JTREE MULTIPLEFILE\n \n\n //adding here all the textarea that must be maneged with right button mouse\n \n //vRNAPanel\n contextMenu.add(vThreadText);\n contextMenu.add(vAdapter5Text);\n contextMenu.add(vAdapter3Text);\n contextMenu.add(vMinLengthText);\n contextMenu.add(vOrganismText);\n //indexingSTARPanel\n contextMenu.add(iThreadText);\n contextMenu.add(iGenomeURLText);\n contextMenu.add(iGTFURLText);\n //miRNAPanel\n contextMenu.add(mmiRBaseText);\n //PCA\n contextMenu.add(pComponent1Text);\n contextMenu.add(pComponent2Text); \n //DES\n contextMenu.add(dLog2fcText);\n contextMenu.add(dFDRText); \n //indexingBW\n contextMenu.add(iThreadBText);\n contextMenu.add(iGenomeURLBText);\n //indexingSalmonPanel\n contextMenu.add(iThreadSText);\n contextMenu.add(iGenomeURLSText);\n contextMenu.add(iGTFURLSText);\n //countingSalmon\n contextMenu.add(cThreadText);\n contextMenu.add(cAdapter5Text);\n contextMenu.add(cAdapter3Text);\n contextMenu.add(cMinLengthText);\n //filterCount\n contextMenu.add(fFPKMfileText);\n contextMenu.add(fOutputFolderText);\n \n FPKMFileTable.getColumn(\"Folder\").setPreferredWidth(1000);\n\n \n \n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n \n String HorSplPan = getPreferences().get(\"4SeqGUI_HorizontalSplitPanel\", null);\n if (HorSplPan!=null){\n HorizontalSplitPanel.setDividerLocation(Integer.valueOf(HorSplPan)); \n }\n else{\n HorizontalSplitPanel.setDividerLocation(screenSize.height*3/10); \n }\n \n String VerSplPan = getPreferences().get(\"4SeqGUI_VerticalSplitPanel\", null);\n if (VerSplPan!=null){\n VerticalSplitPanel.setDividerLocation(Integer.valueOf(VerSplPan));\n }\n else {\n VerticalSplitPanel.setDividerLocation(screenSize.height*7/10);\n }\n \n String WindowWidth= getPreferences().get(\"4SeqGUI_WindowWidth\", null);\n String WindowHeight= getPreferences().get(\"4SeqGUI_WindowHeight\", null); \n if ((WindowWidth!=null)&&(WindowHeight!=null)){\n setSize(Integer.valueOf(WindowWidth),Integer.valueOf(WindowHeight)); \n }\n else{\n setSize(screenSize.width*95/100,screenSize.height*95/100);\n }\n\n //OUTPUT FRAME\n int OutputframeWidth= Integer.valueOf(getPreferences().get(\"4SeqGUI_WindowOutputWidth\", \"0\"));\n int OutputframeHeight= Integer.valueOf(getPreferences().get(\"4SeqGUI_WindowOutputHeight\", \"0\"));\n \n if ((OutputframeWidth==0)||(OutputframeHeight==0)){\n OutputframeWidth=screenSize.width*4/100;\n OutputframeHeight=screenSize.height*5/100;\n }\n\n OutputFrame.setSize(OutputframeWidth,OutputframeHeight);\n \n \n int DownloadframeWidth= Integer.valueOf(getPreferences().get(\"4SeqGUI_WindowDownloadWidth\", \"0\"));\n int DownloadframeHeight= Integer.valueOf(getPreferences().get(\"4SeqGUI_WindowDownloadHeight\", \"0\")); \n if ((DownloadframeWidth==0)||(DownloadframeHeight==0)){\n DownloadframeWidth=screenSize.width*4/100;\n DownloadframeHeight=screenSize.height*5/100;\n }\n\n DownloadFrame.setSize(DownloadframeWidth,DownloadframeHeight);\n \n String WidthGroup = getPreferences().get(\"4SeqGUI_GroupCellWidth\", null);\n String WidthBatch = getPreferences().get(\"4SeqGUI_BatchCellWidth\", null);\n String WidthFolder = getPreferences().get(\"4SeqGUI_FolderCellWidth\", null);\n if ((WidthGroup!=null)&&(WidthBatch!=null)&&(WidthFolder!=null)){\n FPKMFileTable.getColumnModel().getColumn(1).setPreferredWidth(Integer.valueOf(WidthGroup));\n FPKMFileTable.getColumnModel().getColumn(2).setPreferredWidth(Integer.valueOf(WidthBatch));\n FPKMFileTable.getColumnModel().getColumn(0).setPreferredWidth(Integer.valueOf(WidthFolder));\n } \n else\n FPKMFileTable.getColumnModel().getColumn(1).setPreferredWidth(FPKMFileTable.getWidth()*10/100);\n \n \n \n String WidthGroup1 = getPreferences().get(\"4SeqGUI_Group1CellWidth\", null);\n String WidthBatch1 = getPreferences().get(\"4SeqGUI_Batch1CellWidth\", null);\n String WidthHeader = getPreferences().get(\"4SeqGUI_HeaderCellWidth\", null);\n if ((WidthGroup1!=null)&&(WidthBatch1!=null)&&(WidthHeader!=null)){\n CCountHeaderTable.getColumnModel().getColumn(1).setPreferredWidth(Integer.valueOf(WidthGroup1));\n CCountHeaderTable.getColumnModel().getColumn(2).setPreferredWidth(Integer.valueOf(WidthBatch1));\n CCountHeaderTable.getColumnModel().getColumn(0).setPreferredWidth(Integer.valueOf(WidthHeader));\n } \n else\n CCountHeaderTable.getColumnModel().getColumn(1).setPreferredWidth(CCountHeaderTable.getWidth()*10/100);\n \n \n\n\n setLocationRelativeTo(null);\n invalidate();\n doLayout();\n \n }", "public Dimension getPreferredSize()\n {\n return new Dimension(200, 200);\n }", "private void initComponents() {\n setBorder(new javax.swing.border.CompoundBorder(\n new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),\n \"JFormDesigner Evaluation\", javax.swing.border.TitledBorder.CENTER,\n javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 12),\n java.awt.Color.red), getBorder())); addPropertyChangeListener(new java.beans.PropertyChangeListener(){public void propertyChange(java.beans.PropertyChangeEvent e){if(\"border\".equals(e.getPropertyName()))throw new RuntimeException();}});\n\n setLayout(null);\n\n { // compute preferred size\n Dimension preferredSize = new Dimension();\n for(int i = 0; i < getComponentCount(); i++) {\n Rectangle bounds = getComponent(i).getBounds();\n preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);\n preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);\n }\n Insets insets = getInsets();\n preferredSize.width += insets.right;\n preferredSize.height += insets.bottom;\n setMinimumSize(preferredSize);\n setPreferredSize(preferredSize);\n }\n // JFormDesigner - End of component initialization //GEN-END:initComponents\n }", "@Override\npublic Dimension getPreferredSize() {\n\treturn new Dimension(Config.WIDTH, Config.HEIGHT);\n}", "protected void createDialogSize ()\n {\n }", "public Dimension getPreferredSize(){\n return new Dimension(400,350);\n }", "private void initComponents () {//GEN-BEGIN:initComponents\n commandPanel = new javax.swing.JPanel ();\n editorPanel = new javax.swing.JPanel ();\n jPanel1 = new javax.swing.JPanel ();\n editorPanel1 = new javax.swing.JPanel ();\n jScrollBar1 = new javax.swing.JScrollBar ();\n fileLabel1 = new javax.swing.JLabel ();\n jPanel2 = new javax.swing.JPanel ();\n editorPanel2 = new javax.swing.JPanel ();\n jScrollBar2 = new javax.swing.JScrollBar ();\n fileLabel2 = new javax.swing.JLabel ();\n jPanel3 = new javax.swing.JPanel ();\n jScrollBar3 = new javax.swing.JScrollBar ();\n fillSpaceLabel = new javax.swing.JLabel ();\n labelPanel = new javax.swing.JPanel ();\n fileLabelSeparator = new javax.swing.JSeparator ();\n buttonPanel = new javax.swing.JPanel ();\n closeButton = new javax.swing.JButton ();\n getContentPane ().setLayout (new java.awt.GridBagLayout ());\n java.awt.GridBagConstraints gridBagConstraints1;\n addWindowListener (new java.awt.event.WindowAdapter () {\n public void windowClosing (java.awt.event.WindowEvent evt) {\n exitForm (evt);\n }\n }\n );\n\n\n\n gridBagConstraints1 = new java.awt.GridBagConstraints ();\n gridBagConstraints1.gridy = 0;\n getContentPane ().add (commandPanel, gridBagConstraints1);\n\n editorPanel.setLayout (new java.awt.GridBagLayout ());\n java.awt.GridBagConstraints gridBagConstraints2;\n editorPanel.setPreferredSize (new java.awt.Dimension(700, 600));\n\n jPanel1.setLayout (new java.awt.GridBagLayout ());\n java.awt.GridBagConstraints gridBagConstraints3;\n\n editorPanel1.setLayout (new javax.swing.BoxLayout (editorPanel1, 0));\n editorPanel1.setBorder (new javax.swing.border.BevelBorder(1));\n\n gridBagConstraints3 = new java.awt.GridBagConstraints ();\n gridBagConstraints3.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints3.weightx = 1.0;\n gridBagConstraints3.weighty = 1.0;\n jPanel1.add (editorPanel1, gridBagConstraints3);\n\n jScrollBar1.setOrientation (javax.swing.SwingConstants.HORIZONTAL);\n jScrollBar1.addAdjustmentListener (new java.awt.event.AdjustmentListener () {\n public void adjustmentValueChanged (java.awt.event.AdjustmentEvent evt) {\n jScrollBar1AdjustmentValueChanged (evt);\n }\n }\n );\n\n gridBagConstraints3 = new java.awt.GridBagConstraints ();\n gridBagConstraints3.gridy = 1;\n gridBagConstraints3.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints3.weightx = 1.0;\n jPanel1.add (jScrollBar1, gridBagConstraints3);\n\n fileLabel1.setText (org.openide.util.NbBundle.getBundle(CvsDiffFrame.class).getString(\"CvsDiffFrame.fileLabel1.text\"));\n\n gridBagConstraints3 = new java.awt.GridBagConstraints ();\n gridBagConstraints3.gridy = 2;\n gridBagConstraints3.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints3.insets = new java.awt.Insets (2, 0, 0, 0);\n gridBagConstraints3.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints3.weightx = 1.0;\n jPanel1.add (fileLabel1, gridBagConstraints3);\n\n gridBagConstraints2 = new java.awt.GridBagConstraints ();\n gridBagConstraints2.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints2.insets = new java.awt.Insets (0, 0, 0, 1);\n gridBagConstraints2.weightx = 1.0;\n gridBagConstraints2.weighty = 1.0;\n editorPanel.add (jPanel1, gridBagConstraints2);\n\n jPanel2.setLayout (new java.awt.GridBagLayout ());\n java.awt.GridBagConstraints gridBagConstraints4;\n\n editorPanel2.setLayout (new javax.swing.BoxLayout (editorPanel2, 0));\n editorPanel2.setBorder (new javax.swing.border.BevelBorder(1));\n\n gridBagConstraints4 = new java.awt.GridBagConstraints ();\n gridBagConstraints4.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints4.weightx = 1.0;\n gridBagConstraints4.weighty = 1.0;\n jPanel2.add (editorPanel2, gridBagConstraints4);\n\n jScrollBar2.setOrientation (javax.swing.SwingConstants.HORIZONTAL);\n\n gridBagConstraints4 = new java.awt.GridBagConstraints ();\n gridBagConstraints4.gridy = 1;\n gridBagConstraints4.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints4.weightx = 1.0;\n jPanel2.add (jScrollBar2, gridBagConstraints4);\n\n fileLabel2.setText (org.openide.util.NbBundle.getBundle(CvsDiffFrame.class).getString(\"CvsDiffFrame.fileLabel2.text\"));\n\n gridBagConstraints4 = new java.awt.GridBagConstraints ();\n gridBagConstraints4.gridy = 2;\n gridBagConstraints4.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints4.insets = new java.awt.Insets (2, 0, 0, 0);\n gridBagConstraints4.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints4.weightx = 1.0;\n jPanel2.add (fileLabel2, gridBagConstraints4);\n\n gridBagConstraints2 = new java.awt.GridBagConstraints ();\n gridBagConstraints2.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints2.insets = new java.awt.Insets (0, 1, 0, 0);\n gridBagConstraints2.weightx = 1.0;\n gridBagConstraints2.weighty = 1.0;\n editorPanel.add (jPanel2, gridBagConstraints2);\n\n jPanel3.setLayout (new java.awt.GridBagLayout ());\n java.awt.GridBagConstraints gridBagConstraints5;\n\n\n gridBagConstraints5 = new java.awt.GridBagConstraints ();\n gridBagConstraints5.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints5.weighty = 1.0;\n jPanel3.add (jScrollBar3, gridBagConstraints5);\n\n fillSpaceLabel.setText (\" \");\n\n gridBagConstraints5 = new java.awt.GridBagConstraints ();\n gridBagConstraints5.gridy = 1;\n jPanel3.add (fillSpaceLabel, gridBagConstraints5);\n\n gridBagConstraints2 = new java.awt.GridBagConstraints ();\n gridBagConstraints2.fill = java.awt.GridBagConstraints.VERTICAL;\n gridBagConstraints2.weighty = 1.0;\n editorPanel.add (jPanel3, gridBagConstraints2);\n\n\n gridBagConstraints1 = new java.awt.GridBagConstraints ();\n gridBagConstraints1.gridy = 1;\n gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints1.insets = new java.awt.Insets (2, 2, 0, 2);\n gridBagConstraints1.weightx = 1.0;\n gridBagConstraints1.weighty = 1.0;\n getContentPane ().add (editorPanel, gridBagConstraints1);\n\n labelPanel.setLayout (new java.awt.GridBagLayout ());\n java.awt.GridBagConstraints gridBagConstraints6;\n\n\n gridBagConstraints6 = new java.awt.GridBagConstraints ();\n gridBagConstraints6.gridy = 1;\n gridBagConstraints6.gridwidth = 2;\n gridBagConstraints6.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints6.weightx = 1.0;\n labelPanel.add (fileLabelSeparator, gridBagConstraints6);\n\n\n gridBagConstraints1 = new java.awt.GridBagConstraints ();\n gridBagConstraints1.gridy = 2;\n gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints1.insets = new java.awt.Insets (0, 2, 0, 2);\n gridBagConstraints1.weightx = 1.0;\n getContentPane ().add (labelPanel, gridBagConstraints1);\n\n buttonPanel.setLayout (new java.awt.GridBagLayout ());\n java.awt.GridBagConstraints gridBagConstraints7;\n\n closeButton.setText (org.openide.util.NbBundle.getBundle(CvsDiffFrame.class).getString(\"CvsDiffFrame.closeButton.text\"));\n closeButton.addActionListener (new java.awt.event.ActionListener () {\n public void actionPerformed (java.awt.event.ActionEvent evt) {\n closeButtonActionPerformed (evt);\n }\n }\n );\n\n gridBagConstraints7 = new java.awt.GridBagConstraints ();\n gridBagConstraints7.insets = new java.awt.Insets (8, 8, 8, 8);\n gridBagConstraints7.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints7.weightx = 1.0;\n buttonPanel.add (closeButton, gridBagConstraints7);\n\n\n gridBagConstraints1 = new java.awt.GridBagConstraints ();\n gridBagConstraints1.gridy = 3;\n gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints1.weightx = 1.0;\n getContentPane ().add (buttonPanel, gridBagConstraints1);\n\n }", "public Dimension getPreferredSize(JComponent c) {\n Document doc = editor.getDocument();\n Insets i = c.getInsets();\n Dimension d = c.getSize();\n\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readLock();\n }\n try {\n if ((d.width > (i.left + i.right + caretMargin)) && (d.height > (i.top + i.bottom))) {\n rootView.setSize(d.width - i.left - i.right -\n caretMargin, d.height - i.top - i.bottom);\n } else if (d.width == 0 && d.height == 0) {\n // Probably haven't been laid out yet, force some sort of\n // initial sizing.\n rootView.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE);\n }\n d.width = (int) Math.min((long) rootView.getPreferredSpan(View.X_AXIS) +\n (long) i.left + (long) i.right + caretMargin, Integer.MAX_VALUE);\n d.height = (int) Math.min((long) rootView.getPreferredSpan(View.Y_AXIS) +\n (long) i.top + (long) i.bottom, Integer.MAX_VALUE);\n } finally {\n if (doc instanceof AbstractDocument) {\n ((AbstractDocument)doc).readUnlock();\n }\n }\n return d;\n }", "private void updateDimensions() {\r\n width = gui.getWidth();\r\n height = gui.getHeight();\r\n yLabelsMargin = (int) gui.getLabelWidth(Integer.toString(((int) maximumDB / 10) * 10), true) + 2;\r\n if (track != null)\r\n scaleXpx = ((float) width - yLabelsMargin) / track.getBufferCapacity();\r\n else\r\n scaleXpx = 1;\r\n scaleYpx = (float) ((height - 1) / (maximumDB - minimumDB));\r\n if (scaleYpx == 0)\r\n scaleYpx = 1;\r\n }", "public AbstractREPLPanel() {\r\n\t\tsuper(new BorderLayout());\r\n\r\n\t\tloadArea();\r\n\t\tstyles = StyleSettings.getInstance(area);\r\n\t}", "private void actionModifySize() {\n CSizePanel csizePanel = new CSizePanel(layoutPanel.getLayoutSize(),\n false);\n int result = JOptionPane.showConfirmDialog(this, csizePanel,\n \"Modify layout size\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n try {\n int sizeX = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxX].getText());\n int sizeY = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxY].getText());\n if (sizeX >= LayoutPanel.minXCells\n && sizeX <= LayoutPanel.maxXCells\n && sizeY >= LayoutPanel.minYCells\n && sizeY <= LayoutPanel.maxYCells) {\n RepType rtype = RepType.CLEAR;\n if (csizePanel.newButton.isSelected()) {\n rtype = RepType.CLEAR;\n } else if (csizePanel.rptButton.isSelected()) {\n rtype = RepType.REPEAT;\n } else if (csizePanel.altButton.isSelected()) {\n rtype = RepType.ALT;\n }\n\n changeLayoutSize(new Dimension(sizeX, sizeY), rtype);\n } else {\n JOptionPane.showMessageDialog(null,\n \"Size x must be between \" + LayoutPanel.minXCells\n + \" and \" + LayoutPanel.maxXCells\n + \", or size y must be between \"\n + LayoutPanel.minYCells + \" and \"\n + LayoutPanel.maxYCells + \".\");\n }\n } catch (NumberFormatException ne) {\n JOptionPane.showMessageDialog(null, \"Invalid number.\");\n }\n }\n }", "private void setDimensions() {\n IPhysicalVolume physVol_parent = getModule().getGeometry().getPhysicalVolume();\n ILogicalVolume logVol_parent = physVol_parent.getLogicalVolume();\n ISolid solid_parent = logVol_parent.getSolid();\n Box box_parent;\n if (Box.class.isInstance(solid_parent)) {\n box_parent = (Box) solid_parent;\n } else {\n throw new RuntimeException(\"Couldn't cast the module volume to a box!?\");\n }\n _length = box_parent.getXHalfLength() * 2.0;\n _width = box_parent.getYHalfLength() * 2.0;\n\n }", "public abstract Dimension getSize();", "private void $$$setupUI$$$() {\n contentPane = new JPanel();\n contentPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n contentPane.add(panel1, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();\n panel1.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel1.add(panel2, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n buttonOK = new JButton();\n buttonOK.setText(\"OK\");\n panel2.add(buttonOK, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n buttonCancel = new JButton();\n buttonCancel.setText(\"Cancel\");\n panel2.add(buttonCancel, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n contentPane.add(scrollPane1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(3, 4, new Insets(0, 0, 0, 0), 5, 5));\n scrollPane1.setViewportView(panel3);\n final JLabel label1 = new JLabel();\n label1.setFont(new Font(label1.getFont().getName(), Font.BOLD, label1.getFont().getSize()));\n label1.setText(\"mlocarna:\");\n panel3.add(label1, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer2 = new com.intellij.uiDesigner.core.Spacer();\n panel3.add(spacer2, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 4, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setBackground(new Color(-65485));\n label2.setFont(new Font(label2.getFont().getName(), Font.BOLD, label2.getFont().getSize()));\n label2.setOpaque(false);\n label2.setText(\"RNAsubopt:\");\n panel3.add(label2, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n random_sample = new JComboBox();\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"5\");\n defaultComboBoxModel1.addElement(\"10\");\n defaultComboBoxModel1.addElement(\"15\");\n defaultComboBoxModel1.addElement(\"20\");\n random_sample.setModel(defaultComboBoxModel1);\n panel3.add(random_sample, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_EAST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n useMlocarna = new JCheckBox();\n useMlocarna.setSelected(true);\n useMlocarna.setText(\"\");\n panel3.add(useMlocarna, new com.intellij.uiDesigner.core.GridConstraints(1, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_EAST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"suboptimal structures computed\");\n panel3.add(label3, new com.intellij.uiDesigner.core.GridConstraints(0, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label4 = new JLabel();\n label4.setText(\"use to compute the folding landscape \");\n panel3.add(label4, new com.intellij.uiDesigner.core.GridConstraints(1, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer3 = new com.intellij.uiDesigner.core.Spacer();\n panel3.add(spacer3, new com.intellij.uiDesigner.core.GridConstraints(0, 3, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer4 = new com.intellij.uiDesigner.core.Spacer();\n panel3.add(spacer4, new com.intellij.uiDesigner.core.GridConstraints(1, 3, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }", "public Dimension getPreferredSize() {\n return new Dimension(300, 300);\n }", "public void updateBounds(){\r\n\t\tRectangle bounds = new Rectangle(super.getBounds());\r\n\t\tint preferredHeight = 0;\r\n\t\tfor(Object child : getChildren()){\r\n\t\t\tIFigure figure = (IFigure)child;\r\n\t\t\tpreferredHeight += figure.getPreferredSize().height;\r\n\t\t}\r\n\t\tif (preferredHeight == 0) preferredHeight = 200;\r\n\t\tbounds.setHeight(preferredHeight+20);\r\n\t\tsetBounds(bounds);\r\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n panel1 = new JPanel();\n panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel1.setOpaque(true);\n panel1.setPreferredSize(new Dimension(980, 660));\n LeftPane = new JPanel();\n LeftPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1, true, false));\n panel1.add(LeftPane, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n LeftPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(new Color(-4473925)), null));\n Stats = new JPanel();\n Stats.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1));\n LeftPane.add(Stats, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n Font label1Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label1.getFont());\n if (label1Font != null) label1.setFont(label1Font);\n label1.setText(\"Player:\");\n Stats.add(label1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n Font label2Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label2.getFont());\n if (label2Font != null) label2.setFont(label2Font);\n label2.setText(\"Highscore:\");\n Stats.add(label2, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n highScore = new JTextField();\n highScore.setEditable(false);\n highScore.setHorizontalAlignment(0);\n Stats.add(highScore, new com.intellij.uiDesigner.core.GridConstraints(1, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n playerName = new JTextField();\n playerName.setEditable(false);\n playerName.setHorizontalAlignment(0);\n playerName.setText(\"\");\n Stats.add(playerName, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label3 = new JLabel();\n Font label3Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label3.getFont());\n if (label3Font != null) label3.setFont(label3Font);\n label3.setText(\"Level:\");\n Stats.add(label3, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n levelId = new JTextField();\n levelId.setEditable(false);\n levelId.setHorizontalAlignment(0);\n Stats.add(levelId, new com.intellij.uiDesigner.core.GridConstraints(2, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label4 = new JLabel();\n Font label4Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label4.getFont());\n if (label4Font != null) label4.setFont(label4Font);\n label4.setText(\"Time:\");\n Stats.add(label4, new com.intellij.uiDesigner.core.GridConstraints(4, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n timeLeft = new JTextField();\n timeLeft.setEditable(false);\n timeLeft.setEnabled(true);\n timeLeft.setFocusable(true);\n timeLeft.setHorizontalAlignment(0);\n timeLeft.setOpaque(true);\n Stats.add(timeLeft, new com.intellij.uiDesigner.core.GridConstraints(4, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label5 = new JLabel();\n Font label5Font = this.$$$getFont$$$(\"Stencil\", -1, 12, label5.getFont());\n if (label5Font != null) label5.setFont(label5Font);\n label5.setHorizontalAlignment(10);\n label5.setText(\"Score:\");\n Stats.add(label5, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n scoreField = new JTextField();\n scoreField.setEditable(false);\n scoreField.setHorizontalAlignment(0);\n Stats.add(scoreField, new com.intellij.uiDesigner.core.GridConstraints(3, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n final JLabel label6 = new JLabel();\n Font label6Font = this.$$$getFont$$$(\"Stencil\", -1, 18, label6.getFont());\n if (label6Font != null) label6.setFont(label6Font);\n label6.setText(\"Molecule:\");\n LeftPane.add(label6, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n moleculeName = new JTextField();\n moleculeName.setEditable(false);\n moleculeName.setFocusable(true);\n Font moleculeNameFont = this.$$$getFont$$$(\"Stencil\", -1, 18, moleculeName.getFont());\n if (moleculeNameFont != null) moleculeName.setFont(moleculeNameFont);\n moleculeName.setHorizontalAlignment(0);\n moleculeName.setOpaque(true);\n moleculeName.setRequestFocusEnabled(true);\n moleculeName.setText(\"\");\n moleculeName.setVisible(true);\n moleculeName.putClientProperty(\"caretWidth\", new Integer(0));\n LeftPane.add(moleculeName, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\n molPane = new JPanel();\n molPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n LeftPane.add(molPane, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n molPane.add(moleculePanel1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(160, 96), null, null, 0, false));\n RightPane = new JPanel();\n RightPane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel1.add(RightPane, new com.intellij.uiDesigner.core.GridConstraints(0, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();\n RightPane.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final com.intellij.uiDesigner.core.Spacer spacer2 = new com.intellij.uiDesigner.core.Spacer();\n RightPane.add(spacer2, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n gamePane = new JPanel();\n gamePane.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n RightPane.add(gamePane, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(640, 600), null, new Dimension(800, 640), 0, false));\n gamePane.add(gamePanel1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(640, 609), null, new Dimension(980, 680), 0, false));\n }", "@Override\n\tpublic Dimension getSize() \n\t{\n\t\treturn panel.getSize();\n\t}", "public static void main(String args[]) {\n int sizeX;\n int sizeY;\n\n // show change size window to set initial size\n CSizePanel csizePanel = new CSizePanel(new Dimension(\n LayoutPanel.defXCells, LayoutPanel.defYCells), true);\n while (true) {\n int result = JOptionPane.showConfirmDialog(null, csizePanel,\n \"Set initial size\", JOptionPane.OK_CANCEL_OPTION);\n if (result == JOptionPane.OK_OPTION) { // Afirmative\n try {\n sizeX = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxX]\n .getText());\n sizeY = Integer\n .parseInt(csizePanel.tfields[CSizePanel.idxY]\n .getText());\n if (sizeX >= LayoutPanel.minXCells\n && sizeX <= LayoutPanel.maxXCells\n && sizeY >= LayoutPanel.minYCells\n && sizeY <= LayoutPanel.maxYCells) {\n break;\n } else {\n JOptionPane.showMessageDialog(null,\n \"Size x must be between \"\n + LayoutPanel.minXCells + \" and \"\n + LayoutPanel.maxXCells\n + \", or size y must be between \"\n + LayoutPanel.minYCells + \" and \"\n + LayoutPanel.maxYCells + \".\");\n }\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(null, \"Invalid number.\");\n }\n } else { // cancel - exit the program\n System.exit(0);\n }\n }\n\n // create a control window\n ControlFrame frame = new ControlFrame(\"Growth Simulation Layout Editor\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.init(sizeX, sizeY);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }", "Dimension getSize();", "Dimension getSize();", "public int getPreferredSize()\n {\n return preferredSize;\n }", "private void geometry()\n\t\t{\n\t\t// JComponent : Instanciation\n\t\tjTextFieldIp = new JTextField(ChatPreferences.getIp());\n\t\tjTextFieldPort = new JTextField(ChatPreferences.getPort());\n\t\t// Layout : Specification\n\t\t\t{\n\t\t\tFlowLayout flowlayout = new FlowLayout(FlowLayout.CENTER);\n\t\t\tsetLayout(flowlayout);\n\n\t\t\t// flowlayout.setHgap(20);\n\t\t\t// flowlayout.setVgap(20);\n\t\t\t}\n\n\t\t// JComponent : add\n\n\t\t}", "@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 txaNum1 = new javax.swing.JTextArea();\n pnlBackground = new javax.swing.JPanel();\n btnRight = new javax.swing.JButton();\n btnMenu = new javax.swing.JComboBox<>();\n icon = new javax.swing.JLabel();\n lblTitle = new javax.swing.JLabel();\n btnLeft = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n txaDefinition = new javax.swing.JTextArea();\n jScrollPane5 = new javax.swing.JScrollPane();\n txaSolution = new javax.swing.JTextArea();\n lblTree = new javax.swing.JLabel();\n btnMoreExamples = new javax.swing.JButton();\n btnGoBack = new javax.swing.JButton();\n\n jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);\n\n txaNum1.setEditable(false);\n txaNum1.setBackground(new java.awt.Color(92, 219, 149));\n txaNum1.setColumns(20);\n txaNum1.setFont(new java.awt.Font(\"Open Sans\", 0, 15)); // NOI18N\n txaNum1.setForeground(new java.awt.Color(237, 245, 225));\n txaNum1.setLineWrap(true);\n txaNum1.setRows(5);\n txaNum1.setText(\"Example 1 :\\nDetermine if 168 is divisible by 2, 3, or 5.\\n\\nlet's take a closer look at 168:\\n\\nThe last digit is 8, so 168 is divisible by 2.\\nThe sum of the digits is 1+6+8=15, which is divisible by 3 so 168 is divisible by 3.\\nThe last digit is not 0 or 5 so 156 is not divisible by 5.\\nTherefore, 156 is divisible by 2 and 3 but not by 5.\\n\");\n txaNum1.setWrapStyleWord(true);\n jScrollPane1.setViewportView(txaNum1);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Math Tutor\");\n\n pnlBackground.setBackground(new java.awt.Color(92, 219, 149));\n\n btnRight.setBackground(new java.awt.Color(92, 219, 149));\n btnRight.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/right.png\"))); // NOI18N\n btnRight.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRightActionPerformed(evt);\n }\n });\n\n btnMenu.setBackground(new java.awt.Color(237, 245, 225));\n btnMenu.setFont(new java.awt.Font(\"Open Sans\", 0, 14)); // NOI18N\n btnMenu.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Menu\", \"Introduction\", \"Divisibility\", \"Factor Pairs\", \"Prime and Composite Numbers\", \"Continued\", \"Prime Factorazation\", \"WRAP UP!\" }));\n btnMenu.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {\n public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {\n }\n public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {\n btnMenuPopupMenuWillBecomeInvisible(evt);\n }\n public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {\n }\n });\n btnMenu.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnMenuActionPerformed(evt);\n }\n });\n\n icon.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icon_3.png\"))); // NOI18N\n\n lblTitle.setFont(new java.awt.Font(\"Transformers Movie\", 0, 36)); // NOI18N\n lblTitle.setForeground(new java.awt.Color(5, 56, 107));\n lblTitle.setText(\"Prime Factorization\");\n\n btnLeft.setBackground(new java.awt.Color(92, 219, 149));\n btnLeft.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/left.png\"))); // NOI18N\n btnLeft.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLeftActionPerformed(evt);\n }\n });\n\n jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);\n\n txaDefinition.setEditable(false);\n txaDefinition.setBackground(new java.awt.Color(92, 219, 149));\n txaDefinition.setColumns(20);\n txaDefinition.setFont(new java.awt.Font(\"Open Sans\", 0, 15)); // NOI18N\n txaDefinition.setForeground(new java.awt.Color(55, 150, 131));\n txaDefinition.setLineWrap(true);\n txaDefinition.setRows(5);\n txaDefinition.setText(\"Definition: \\nWe will now look at writing composite numbers as a product of primes.\\n\\nJust as mosaics are composed of a bunch of small tiles, composite numbers are composed of prime numbers that have been multiplied together. These small tiles are the building blocks for mosaics, and prime numbers are the building blocks for composite numbers.\\n\\nOne of the tools that will help us to factor a composite completely is a factor tree.\\n\\nHere is one possible factor tree for the number 20.\");\n txaDefinition.setWrapStyleWord(true);\n jScrollPane2.setViewportView(txaDefinition);\n\n jScrollPane5.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n jScrollPane5.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);\n\n txaSolution.setBackground(new java.awt.Color(92, 219, 149));\n txaSolution.setColumns(20);\n txaSolution.setFont(new java.awt.Font(\"Roboto\", 0, 15)); // NOI18N\n txaSolution.setForeground(new java.awt.Color(237, 245, 225));\n txaSolution.setRows(5);\n txaSolution.setText(\"Notice that the first level of this tree contains the factor pair 4×5.\\n\\nSince 5 is prime, we stop there.\\n\\nBut 4 can be written as 2×2 in another level of the tree.\\n\\n2 is prime, so we stop.\");\n jScrollPane5.setViewportView(txaSolution);\n\n lblTree.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/prime_tree.png\"))); // NOI18N\n\n btnMoreExamples.setText(\"More Examples\");\n btnMoreExamples.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnMoreExamplesActionPerformed(evt);\n }\n });\n\n btnGoBack.setText(\"Try question from course beginning\");\n btnGoBack.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnGoBackActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout pnlBackgroundLayout = new javax.swing.GroupLayout(pnlBackground);\n pnlBackground.setLayout(pnlBackgroundLayout);\n pnlBackgroundLayout.setHorizontalGroup(\n pnlBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlBackgroundLayout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addGroup(pnlBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlBackgroundLayout.createSequentialGroup()\n .addComponent(btnMenu, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(23, 23, 23)\n .addComponent(lblTitle))\n .addGroup(pnlBackgroundLayout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(btnLeft, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnRight, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(icon)\n .addGap(22, 22, 22))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlBackgroundLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane2)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlBackgroundLayout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(lblTree)\n .addGap(4, 4, 4)\n .addGroup(pnlBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(pnlBackgroundLayout.createSequentialGroup()\n .addComponent(btnMoreExamples, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(btnGoBack)))\n .addContainerGap(38, Short.MAX_VALUE))\n );\n pnlBackgroundLayout.setVerticalGroup(\n pnlBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlBackgroundLayout.createSequentialGroup()\n .addGroup(pnlBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlBackgroundLayout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(pnlBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnMenu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblTitle))\n .addGap(1, 1, 1)\n .addGroup(pnlBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnLeft, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnRight, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))\n .addGroup(pnlBackgroundLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(icon)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(pnlBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(pnlBackgroundLayout.createSequentialGroup()\n .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(pnlBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnMoreExamples)\n .addComponent(btnGoBack)))\n .addComponent(lblTree))\n .addContainerGap(22, 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 .addComponent(pnlBackground, 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(pnlBackground, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private void styling(){\r\n canvasStackPane.getStyleClass().add(\"canvasStackPane\");\r\n\r\n upper1Label.getStyleClass().add(\"myLabelTest2\");\r\n upper2Label.getStyleClass().add(\"myLabelTest2\");\r\n upper3Label.getStyleClass().add(\"myLabelTest2\");\r\n upperRestLabel.getStyleClass().add(\"myLabelTest2\");\r\n upperHBox.getStyleClass().add(\"upperHBox\");\r\n leftVBox.getStyleClass().add(\"leftVBox\");\r\n upperLeftButton.getStyleClass().add(\"upperLeftButton\");\r\n left1HintButton.getStyleClass().add(\"leftButton\");\r\n left2Button.getStyleClass().add(\"leftButton\");\r\n left3Button.getStyleClass().add(\"leftButton\");\r\n left4Button.getStyleClass().add(\"leftButton\");\r\n left5Button.getStyleClass().add(\"leftButton\");\r\n //new GameMode\r\n newGamemodeHBox.getStyleClass().add(\"newGameModeHBox\");\r\n newGamemodebutton1.getStyleClass().add(\"chooseButtons\");\r\n newGamemodebutton2.getStyleClass().add(\"chooseButtons\");\r\n newGamemodebutton3.getStyleClass().add(\"chooseButtons\");\r\n //back Button\r\n backPane.getStyleClass().add(\"backPane\");\r\n backButton.getStyleClass().add(\"backButton\");\r\n //new Graphmode\r\n newGraphModeHBox.getStyleClass().add(\"newGraphModeHBox\");\r\n newGraphModebutton1.getStyleClass().add(\"chooseButtons\");\r\n newGraphModebutton2.getStyleClass().add(\"chooseButtons\");\r\n newGraphModebutton3.getStyleClass().add(\"chooseButtons\");\r\n sMBHBox.getStyleClass().add(\"newGraphModeHBox\");\r\n smallButton.getStyleClass().add(\"chooseButtons\");\r\n middleButton.getStyleClass().add(\"chooseButtons\");\r\n bigButton.getStyleClass().add(\"chooseButtons\");\r\n textFieldHBox.getStyleClass().add(\"newGraphModeHBox\");\r\n buttonTextfield.getStyleClass().add(\"chooseButtons\");\r\n //new Graph\r\n newGraphHBox.getStyleClass().add(\"newGraphHBox\");\r\n newGraphButtonYes.getStyleClass().add(\"chooseButtons\");\r\n newGraphButtonNo.getStyleClass().add(\"chooseButtons\");\r\n submit2.getStyleClass().add(\"chooseButtons\");\r\n listViewVBox.getStyleClass().add(\"newGraphHBox\");\r\n textFieldVertices.getStyleClass().add(\"textfield\");\r\n textFieldEdges.getStyleClass().add(\"textfield\");\r\n gameEndTop.getStyleClass().add(\"gameEndTop\");\r\n gameEndStackPane.getStyleClass().add(\"gameEndStackPane\");\r\n\r\n\t//hintmenu and hintbuttons:\r\n hintMenuStack.getStyleClass().add(\"newGraphModeHBox\");\r\n\r\n hintButton1.getStyleClass().add(\"chooseButtons\");\r\n hintButton2.getStyleClass().add(\"chooseButtons\");\r\n hintButton3.getStyleClass().add(\"chooseButtons\");\r\n hintButton4.getStyleClass().add(\"chooseButtons\");\r\n hintButton5.getStyleClass().add(\"chooseButtons\");\r\n hintButton6.getStyleClass().add(\"chooseButtons\");\r\n hintButton7.getStyleClass().add(\"chooseButtons\");\r\n hintButton8.getStyleClass().add(\"chooseButtons\");\r\n hintButton9.getStyleClass().add(\"chooseButtons\");\r\n\r\n gameWinButton1.getStyleClass().add(\"chooseButtons\");\r\n gameWinButton2.getStyleClass().add(\"chooseButtons\");\r\n gameWinStackPane.getStyleClass().add(\"newGraphModeHBox2\");\r\n\r\n\r\n gameWinHBox.setAlignment(Pos.CENTER);\r\n gameWinHBox.setSpacing(30);\r\n vBoxWin.setAlignment(Pos.BASELINE_CENTER);\r\n vBoxHint.setAlignment(Pos.CENTER);\r\n vBoxHint2.setAlignment(Pos.CENTER);\r\n vBoxHint3.setAlignment(Pos.CENTER);\r\n hintMenu.setAlignment(Pos.CENTER);\r\n }", "@Override\n public Dimension getPreferredSize() {\n if (this.model == null)\n return super.getPreferredSize();\n else\n return new Dimension(model.getLength() * stepW + paddingLeft,\n model.getRange().length() * stepH + paddingTop);\n }", "private void initComponents() {\n\n jTextAreaTop = new javax.swing.JTextArea();\n jScrollPane1 = new javax.swing.JScrollPane();\n jEditorPane1 = new javax.swing.JEditorPane();\n jTextAreaBottom = new javax.swing.JTextArea();\n\n setBorder(javax.swing.BorderFactory.createEmptyBorder(12, 12, 0, 11));\n setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.Y_AXIS));\n\n jTextAreaTop.setBackground(getBackground());\n jTextAreaTop.setColumns(20);\n jTextAreaTop.setEditable(false);\n jTextAreaTop.setFont(new java.awt.Font(\"Dialog\", 1, 12));\n jTextAreaTop.setLineWrap(true);\n jTextAreaTop.setRows(1);\n jTextAreaTop.setText(bundle.getString(\"MSG_LicenseDlgLabelTop\"));\n jTextAreaTop.setWrapStyleWord(true);\n jTextAreaTop.setFocusable(false);\n jTextAreaTop.setMargin(new java.awt.Insets(0, 0, 2, 0));\n jTextAreaTop.setRequestFocusEnabled(false);\n add(jTextAreaTop);\n\n jEditorPane1.setEditable(false);\n jEditorPane1.setPreferredSize(new java.awt.Dimension(500, 500));\n jScrollPane1.setViewportView(jEditorPane1);\n\n add(jScrollPane1);\n\n jTextAreaBottom.setBackground(getBackground());\n jTextAreaBottom.setColumns(20);\n jTextAreaBottom.setEditable(false);\n jTextAreaBottom.setFont(new java.awt.Font(\"Dialog\", 1, 12));\n jTextAreaBottom.setLineWrap(true);\n jTextAreaBottom.setRows(2);\n jTextAreaBottom.setText(bundle.getString(\"MSG_LicenseDlgLabelBottom\"));\n jTextAreaBottom.setWrapStyleWord(true);\n jTextAreaBottom.setFocusable(false);\n jTextAreaBottom.setRequestFocusEnabled(false);\n add(jTextAreaBottom);\n }", "private void customize() {\r\n panel.setSize(new Dimension(width, height));\r\n panel.setLayout(new BorderLayout());\r\n }", "public MondrianPanel()\n {\n setPreferredSize(new Dimension(size, size));\n }", "private SizeModifierSettingsEditor() {\n\t\tinitComponents();\n\t\tsettings = SizeModifierSettings.getInstance();\n\t\tloadSettings();\n\t\tmainShell.pack();\n\t\tmainShell.setBounds(\n\t\t\tCrunch3.mainWindow.getShell().getBounds().x + Crunch3.mainWindow.getShell().getBounds().width / 2 - mainShell.getBounds().width / 2,\n\t\t\tCrunch3.mainWindow.getShell().getBounds().y + Crunch3.mainWindow.getShell().getBounds().height / 2 - mainShell.getBounds().height / 2,\n\t\t\tmainShell.getBounds().width,\n\t\t\tmainShell.getBounds().height);\n\t\tmainShell.open();\n\t}", "public abstract int layoutWidth();", "public void setPreferredSize( int width, int height ) {\n checkWidget();\n ideal = true;\n Point point = parent.fixPoint( width, height );\n preferredWidth = Math.max( point.x, MINIMUM_WIDTH );\n preferredHeight = point.y;\n }", "public void Build() {\n //Equation input\n JPanel EquationPanel = new JPanel();\n EquationPanel.setLayout(new BoxLayout(EquationPanel, BoxLayout.Y_AXIS));\n JPanel EqButtons = new JPanel();\n JButton Add = new JButton(\"Add\");\n Add.addActionListener(new GraphActionListener(this, null));\n JButton Clear = new JButton(\"Clear\");\n Clear.addActionListener(new GraphActionListener(this, null));\n EqButtons.add(Add);\n EqButtons.add(Clear);\n JPanel CurrentEq = new JPanel();\n CurrentEq.add(new JLabel(\"Display Equation:\"));\n CurrentEq.add(EquationNum);\n EquationNum.addChangeListener(this);\n AddNewGraph();\n EquationPanel.add(EqButtons);\n EquationPanel.add(CurrentEq);\n JPanel p = new JPanel();\n p.add(EquationCardLayout);\n EquationPanel.add(p);\n Controls.addTab(\"Equation\", EquationPanel);\n\n //Range Input\n JPanel RangePanel = new JPanel();\n MinYSpin.setPreferredSize(new Dimension(100, 20));\n MaxYSpin.setPreferredSize(new Dimension(100, 20));\n MinYSpin.setEnabled(false);\n MaxYSpin.setEnabled(false);\n RangePanel.add(new JLabel(\"Range:\"));\n RangePanel.add(ForceRangeBox);\n ForceRangeBox.addActionListener(new GraphActionListener(this, null));\n RangePanel.add(MaxYSpin);\n RangePanel.add(MinYSpin);\n //Domain input\n JPanel DRPanel = new JPanel();\n DRPanel.setLayout(new BoxLayout(DRPanel, BoxLayout.Y_AXIS));\n JPanel DomainPanel = new JPanel();\n MinXSpin.setPreferredSize(new Dimension(100, 20));\n MaxXSpin.setPreferredSize(new Dimension(100, 20));\n DomainPanel.add(new JLabel(\"Domain:\"));\n DomainPanel.add(MinXSpin);\n DomainPanel.add(MaxXSpin);\n DRPanel.add(DomainPanel);\n DRPanel.add(RangePanel);\n Controls.addTab(\"Restrictions\", DRPanel);\n\n\n\n //Zoom input\n JPanel ZoomPanel = new JPanel();\n JButton toDefault = new JButton();\n toDefault.addActionListener(new GraphActionListener(this, null));\n toDefault.setText(\"Defualt Zoom\");\n ZoomPanel.add(ZoomSlider);\n ZoomSlider.addChangeListener(this);\n ZoomPanel.add(toDefault);\n Controls.addTab(\"Zoom\", ZoomPanel);\n\n //colours input\n Controls.addTab(\"Line Colours\", new JPanel());\n Controls.addTab(\"BackGround Colours\", new JPanel());\n\n //Visuals input\n JPanel VisualsPanel = new JPanel();\n VisualsPanel.setLayout(new BoxLayout(VisualsPanel, BoxLayout.Y_AXIS));\n VisualsPanel.add(DrawAreaBox);\n VisualsPanel.add(DrawScaleBox);\n\n //Options input\n JPanel OptionsPanel = new JPanel();\n OptionsPanel.setLayout(new BoxLayout(OptionsPanel, BoxLayout.Y_AXIS));\n JPanel stepPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));\n JLabel la = new JLabel(\"Step:\");\n stepPanel.add(la);\n stepPanel.add(StepSpin);\n stepPanel.add(DrawAreaBox);\n JPanel thicknessPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));\n thicknessPanel.add(new JLabel(\"Curve Thickness\"));\n thicknessPanel.add(CurveThicknessSpin);\n stepPanel.add(thicknessPanel);\n JPanel inc = new JPanel(new FlowLayout(FlowLayout.LEFT));\n la = new JLabel(\"grid lines:\");\n inc.add(la);\n inc.add(IncSpin);\n inc.add(DrawScaleBox);\n DrawScaleBox.setSelected(true);\n OptionsPanel.add(stepPanel);\n OptionsPanel.add(inc);\n Controls.addTab(\"Options\", OptionsPanel);\n\n //instructions\n JPanel instrpanel = new JPanel();\n instrpanel.add(new JLabel(\"<html>Hover over the graph \"\n + \"to get the coordinates at that point\"\n + \"<br>and evaluation of the top most equation for the given x value.\"\n + \"<br> Press Graph to graph the current equation and move it to the top with \"\n + \"<br>all settings. Press Bring To Top to move the graph to the top retaining\"\n + \"<br> it's previous settings\"\n + \"<br>All equations will follow standard BEDMAS rules.\"\n + \"<br><br>Supported functions:\"\n + \"<br> Standard operations, +,-,/,*\"\n + \"<br> Exponents using ^ (2 <sup>x</sup> = 2^x)\"\n + \"<br>fac : takes the factorial of the value ahead (x! = facx)\"\n + \"<br>abs : takes the absolute value\"\n + \"<br>sin, cos, tan : trig functions\"\n + \"<br>log : log base ten of the value\"));\n JScrollPane s = new JScrollPane(instrpanel);\n s.setPreferredSize(new Dimension(EquationPanel.getSize()));\n Controls.addTab(\"Help\", s);\n Frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n Frame.setSize(550, 650);\n\n BorderLayout layout = new BorderLayout();\n Frame.setLayout(layout);\n Controls.addChangeListener(this);\n\n Frame.setTitle(\"Graphing Calculator\");\n String imagePath = \"icon.png\";\n InputStream imgStream = MainField.class.getResourceAsStream(imagePath);\n BufferedImage myImg;\n try {\n myImg = ImageIO.read(imgStream);\n Frame.setIconImage(myImg);\n } catch (IOException ex) {\n }\n Frame.add(Controls, BorderLayout.NORTH);\n Frame.add(CanvasWrapper, BorderLayout.CENTER);\n Frame.setVisible(true);\n Frame.validate();\n\n\n }", "public Point getPreferredSize() {\n checkWidget();\n return parent.fixPoint( preferredWidth, preferredHeight );\n }", "private void geometry()\n\t\t{\n\t\t// JComponent : Instanciation\n\t\tbutton1 = new JButton(\"1\");\n\t\tbutton2 = new JButton(\"2\");\n\n\t\t// Layout : Specification\n\t\t\t{\n\t\t\tFlowLayout flowlayout = new FlowLayout(FlowLayout.CENTER);\n\t\t\tsetLayout(flowlayout);\n\n\t\t\tflowlayout.setHgap(20);\n\t\t\t}\n\n\t\t// JComponent : add\n\t\tadd(button1);\n\t\tadd(button2);\n\t\t}", "private void checkPaintMeasures() {\r\n\t\t\r\n\t\t//Check from change\r\n\t\tint sizeNow = fontSize;\r\n\t\tif(sizeNow == sizeThen)return;\r\n\t\tsizeThen = sizeNow;\r\n\t\t\r\n\t\t//Set units\r\n\t\tmarkWidth = (double) sizeNow / 15;\r\n\t\tsizePaintLength = p.textLength(text, surface, sizeNow, bold, italic);\r\n\t\tif (viewPaintLength != viewPaintLength) viewPaintLength = sizePaintLength;\r\n\t}", "public void show()\n {\n if ((selection.getElementSelectionCount() != 1) &&\n (selection.getSelectedWidgetsParent() == null))\n {\n hide();\n return;\n }\n\n // If the top left resize thumb is null, create all 4 here.\n if (topLeftResize == null) {\n topLeftResize = new ResizeThumb(FrameEditorUI.TOP_LEFT);\n topRightResize = new ResizeThumb(FrameEditorUI.TOP_RIGHT);\n bottomLeftResize = new ResizeThumb(FrameEditorUI.BOTTOM_LEFT);\n bottomRightResize = new ResizeThumb(FrameEditorUI.BOTTOM_RIGHT);\n\n // Add the thumbs to the interaction figure.\n InteractionDrawingEditor drawingEditor = view.getEditor();\n\n drawingEditor.addInteractionFigure(topLeftResize);\n drawingEditor.addInteractionFigure(bottomLeftResize);\n drawingEditor.addInteractionFigure(topRightResize);\n drawingEditor.addInteractionFigure(bottomRightResize);\n }\n else if (! bottomRightResize.isVisible()) {\n topRightResize.setVisible(true);\n bottomLeftResize.setVisible(true);\n bottomRightResize.setVisible(true);\n }\n\n // this.anchorTopLeft gets set during getSelectedElementFigureArea()\n Rectangle r = getSelectedElementFigureArea();\n\n // Top left will not be shown if the selection contains\n // an MenuItem, which anchors any resizing to the top-left;\n // computed by getSelectedWidgetFigureArea\n topLeftResize.setVisible(! anchorTopLeft);\n\n update(r);\n }", "@Override\r\n\tprotected void update_display_size(double radius_of_system) {\r\n\t\tdouble tempRadius = radius/radius_of_system *2_500_000;\r\n\t\tthis.setSize((int)tempRadius, (int)tempRadius);\r\n\t}", "@Override\n\tpublic Dimension getPreferredSize() {\n\t\treturn new Dimension(800,600);\n\t}", "public Dimension getPreferredSize(JComponent c)\n/* */ {\n/* 254 */ JTextComponent txt = (JTextComponent)c;\n/* 255 */ if (shouldPaintPrompt(txt)) {\n/* 256 */ return getPromptComponent(txt).getPreferredSize();\n/* */ }\n/* 258 */ return this.delegate.getPreferredSize(c);\n/* */ }", "private void initEditorPanel() {\n\t\t\n\t\t//Remove all components from panel\n\t\tthis.editor.removeAll();\n\t\t\n\t\t//Redraw which feature\n\t\tthis.whichFeature.validate();\n\t\tthis.whichFeature.repaint();\n\t\t\n\t\t//Setting icon values\n\t\tpartL.setIcon(myParent.editor.profileImage);\n\t\tendTypeLTL.setIcon(myParent.editor.ltImage);\n\t\tendTypeRBL.setIcon(myParent.editor.rbImage);\n\t\tpfFormLL.setIcon(myParent.profileshapeImage);\n\t\tsetGo.setIcon(myParent.setImage);\n\t\tcancel.setIcon(myParent.cancelImage);\n\t\t\n\t\t//Setting values visibility\n\t\tpart.setVisible(false);\n\t\tpartL.setVisible(false);\n\t\tparts.setVisible(false);\n\t\t\n\t\tendTypeLT.setVisible(false);\n\t\tendTypeLTL.setVisible(false);\n\t\tlCut.setVisible(false);\n\t\tendTypeRB.setVisible(false);\n\t\tendTypeRBL.setVisible(false);\n\t\trCut.setVisible(false);\n\t\tpfFormL.setVisible(false);\n\t\tpfFormLL.setVisible(false);\n\t\tpfCombo.setVisible(false);\n\t\t\n\t\toffsetL.setVisible(false);\n\t\toffsetR.setVisible(false);\n\t\toffsetLT.setVisible(false);\n\t\toffsetRB.setVisible(false);\n\t\t\n\t\tbL.setVisible(false);\n\t\tbR.setVisible(false);\n\t\tdeltaL.setVisible(false);\n\t\tdeltaR.setVisible(false);\n\t\t\n\t\tsetGo.setVisible(false);\n\t\tcancel.setVisible(false);\n\t\t\n\t\tmyParent.dim.masterSelected.setEnabled(false);\n\t\tmyParent.dim.slaveSelected.setEnabled(false);\n\t\tmyParent.dim.masterSelected.setVisible(false);\n\t\tmyParent.dim.slaveSelected.setVisible(false);\n\t\tmyParent.dim.doAlign.setVisible(false);\n\t\tmyParent.dim.changeAlign.setVisible(false);\n\t\tmyParent.dim.cancelAlign.setVisible(false);\n\t\tmyParent.dim.doAlign.setEnabled(false);\n\t\tmyParent.dim.changeAlign.setEnabled(false);\n\t\t\n\t\tmyParent.alignSeq = 0;\n\t\t\n\t\t//Adding components to editor panel\n\t\teditor.add(part, new XYConstraints(1, 1, 20, 19));\n\t\teditor.add(partL, new XYConstraints(22, 1, 20, 19));\n\t\teditor.add(parts, new XYConstraints(42, 1, 140, 19));\n\t\t\n\t\teditor.add(endTypeLT, new XYConstraints(1, 23, 20, 19));\n\t\teditor.add(endTypeLTL, new XYConstraints(22, 23, 20, 19));\n\t\teditor.add(lCut, new XYConstraints(81, 23, 100, 19));\n\t\t\n\t\teditor.add(endTypeRB, new XYConstraints(1, 44, 20, 19));\n\t\teditor.add(endTypeRBL, new XYConstraints(22, 44, 20, 19));\n\t\teditor.add(rCut, new XYConstraints(81, 44, 100, 19));\n\t\t\n\t\teditor.add(pfFormL, new XYConstraints(1, 65, 20, 19));\n\t\teditor.add(pfFormLL, new XYConstraints(22, 65, 20, 19));\n\t\teditor.add(pfCombo, new XYConstraints(81, 65, 100, 19));\n\t\t\n\t\teditor.add(offsetL, new XYConstraints(1, 86, 50, 19));\n\t\teditor.add(offsetR, new XYConstraints(1, 107, 50, 19));\n\t\teditor.add(bL, new XYConstraints(1, 128, 50, 19));\n\t\teditor.add(bR, new XYConstraints(1, 149, 50, 19));\n\t\t\n\t\teditor.add(offsetLT, new XYConstraints(60, 86, 118, 19));\n\t\teditor.add(offsetRB, new XYConstraints(60, 107, 118, 19));\n\t\t\n\t\teditor.add(deltaL, new XYConstraints(60, 127, 118, 19));\n\t\teditor.add(deltaR, new XYConstraints(60, 147, 118, 19));\n\t\t\n\t\teditor.add(setGo, new XYConstraints(56, 168, 60, 19));\n\t\teditor.add(cancel, new XYConstraints(118, 168, 60, 19));\n\t\t\n\t\teditor.add(myParent.dim.masterSelected, new XYConstraints(1, 3, 120, 19));\n\t\teditor.add(myParent.dim.slaveSelected, new XYConstraints(1, 24,120, 19));\n\t\t\n\t\teditor.add(myParent.dim.doAlign, new XYConstraints(1, 50, 59, 19));\n\t\teditor.add(myParent.dim.changeAlign, new XYConstraints(61, 50, 59, 19));\n\t\teditor.add(myParent.dim.cancelAlign, new XYConstraints(121, 50, 59, 19));\n\t}", "private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new FormLayout(\"fill:d:grow\", \"center:d:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow\"));\n panel1.setBackground(new Color(-6047008));\n panel1.setFont(new Font(\"Times New Roman\", panel1.getFont().getStyle(), 16));\n formPanel = new JPanel();\n formPanel.setLayout(new FormLayout(\"left:56dlu:noGrow,left:32dlu:noGrow,left:92px:noGrow,left:34dlu:noGrow,fill:84px:noGrow,left:4dlu:noGrow,fill:40dlu:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:39dlu:noGrow,left:4dlu:noGrow,fill:d:grow\", \"center:d:noGrow,top:4dlu:noGrow,center:p:noGrow,top:4dlu:noGrow,fill:50px:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:50px:noGrow,top:4dlu:noGrow,center:17px:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:50px:noGrow\"));\n formPanel.setBackground(new Color(-6047008));\n CellConstraints cc = new CellConstraints();\n panel1.add(formPanel, cc.xy(1, 1));\n table4Title = new JLabel();\n table4Title.setBackground(new Color(-6047008));\n table4Title.setText(\"碎石土的密实度与触探击数的关系(N63.5)\");\n formPanel.add(table4Title, cc.xyw(1, 1, 5, CellConstraints.FILL, CellConstraints.FILL));\n final JLabel label1 = new JLabel();\n label1.setText(\"触探击数参数一\");\n formPanel.add(label1, cc.xy(1, 3));\n final JLabel label2 = new JLabel();\n label2.setText(\"触探击数参数二\");\n formPanel.add(label2, cc.xy(3, 3, CellConstraints.LEFT, CellConstraints.DEFAULT));\n final JLabel label3 = new JLabel();\n label3.setText(\"触探击数参数三\");\n formPanel.add(label3, cc.xy(5, 3));\n table4Field2 = new JFormattedTextField();\n table4Field2.setText(\"\");\n formPanel.add(table4Field2, cc.xy(4, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n table4Field1 = new JFormattedTextField();\n table4Field1.setText(\"\");\n formPanel.add(table4Field1, cc.xy(2, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n table4Field3 = new JFormattedTextField();\n table4Field3.setText(\"\");\n formPanel.add(table4Field3, cc.xy(7, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n table5Title = new JLabel();\n table5Title.setBackground(new Color(-6047008));\n table5Title.setText(\"碎石土的密实度与触探击数的关系(N120)\");\n formPanel.add(table5Title, cc.xyw(1, 7, 5));\n final JLabel label4 = new JLabel();\n label4.setText(\"触探击数参数一\");\n formPanel.add(label4, cc.xy(1, 9));\n final JLabel label5 = new JLabel();\n label5.setText(\"触探击数参数二\");\n formPanel.add(label5, cc.xy(3, 9, CellConstraints.LEFT, CellConstraints.DEFAULT));\n final JLabel label6 = new JLabel();\n label6.setText(\"触探击数参数三\");\n formPanel.add(label6, cc.xy(5, 9));\n table5Field2 = new JFormattedTextField();\n table5Field2.setText(\"\");\n formPanel.add(table5Field2, cc.xy(4, 9, CellConstraints.FILL, CellConstraints.DEFAULT));\n table5Field1 = new JFormattedTextField();\n table5Field1.setText(\"\");\n formPanel.add(table5Field1, cc.xy(2, 9, CellConstraints.FILL, CellConstraints.DEFAULT));\n table5Field3 = new JFormattedTextField();\n formPanel.add(table5Field3, cc.xy(7, 9, CellConstraints.FILL, CellConstraints.DEFAULT));\n table6Title = new JLabel();\n table6Title.setBackground(new Color(-6047008));\n table6Title.setText(\"砂土的密实度与触探击数的关系(N63.6)\");\n formPanel.add(table6Title, cc.xyw(1, 13, 5));\n final JLabel label7 = new JLabel();\n label7.setText(\"触探击数参数一\");\n formPanel.add(label7, cc.xy(1, 15));\n final JLabel label8 = new JLabel();\n label8.setText(\"触探击数参数二\");\n formPanel.add(label8, cc.xy(3, 15, CellConstraints.LEFT, CellConstraints.DEFAULT));\n final JLabel label9 = new JLabel();\n label9.setText(\"触探击数参数三\");\n formPanel.add(label9, cc.xy(5, 15));\n table6Field2 = new JFormattedTextField();\n formPanel.add(table6Field2, cc.xy(4, 15, CellConstraints.FILL, CellConstraints.DEFAULT));\n table6Field1 = new JFormattedTextField();\n table6Field1.setText(\"\");\n formPanel.add(table6Field1, cc.xy(2, 15, CellConstraints.FILL, CellConstraints.DEFAULT));\n table6Field3 = new JFormattedTextField();\n table6Field3.setText(\"\");\n formPanel.add(table6Field3, cc.xy(7, 15, CellConstraints.FILL, CellConstraints.DEFAULT));\n table4Area = new JTextPane();\n table4Area.setBackground(new Color(-1));\n table4Area.setEditable(false);\n table4Area.setText(\"\");\n formPanel.add(table4Area, cc.xyw(1, 5, 13, CellConstraints.FILL, CellConstraints.FILL));\n final JLabel label10 = new JLabel();\n label10.setText(\"触探击数参数四\");\n formPanel.add(label10, cc.xy(9, 9));\n table5Field4 = new JFormattedTextField();\n formPanel.add(table5Field4, cc.xy(11, 9, CellConstraints.FILL, CellConstraints.DEFAULT));\n table5Area = new JTextPane();\n table5Area.setBackground(new Color(-1));\n table5Area.setEditable(false);\n table5Area.setText(\"\");\n formPanel.add(table5Area, cc.xyw(1, 11, 13, CellConstraints.FILL, CellConstraints.FILL));\n table6Area = new JTextPane();\n table6Area.setBackground(new Color(-1));\n table6Area.setEditable(false);\n table6Area.setText(\"\");\n formPanel.add(table6Area, cc.xyw(1, 17, 13, CellConstraints.FILL, CellConstraints.FILL));\n table7Title = new JLabel();\n table7Title.setBackground(new Color(-6047008));\n table7Title.setText(\"砂土的密实度与触探击数的关系(N63.7)\");\n panel1.add(table7Title, cc.xy(1, 3, CellConstraints.LEFT, CellConstraints.DEFAULT));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new FormLayout(\"left:56dlu:noGrow,left:31dlu:noGrow,left:89px:noGrow,left:36dlu:noGrow,fill:84px:noGrow,left:4dlu:noGrow,fill:44dlu:noGrow,left:4dlu:noGrow,fill:d:grow\", \"center:max(d;4px):noGrow,top:4dlu:noGrow,fill:50px:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:50px:noGrow\"));\n panel2.setBackground(new Color(-6047008));\n panel1.add(panel2, cc.xy(1, 5));\n final JLabel label11 = new JLabel();\n label11.setText(\"触探击数参数一\");\n panel2.add(label11, cc.xy(1, 1));\n final JLabel label12 = new JLabel();\n label12.setText(\"触探击数参数二\");\n panel2.add(label12, cc.xy(3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));\n final JLabel label13 = new JLabel();\n label13.setText(\"触探击数参数三\");\n panel2.add(label13, cc.xy(5, 1));\n table7Field2 = new JFormattedTextField();\n table7Field2.setText(\"\");\n panel2.add(table7Field2, cc.xy(4, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\n table7Field1 = new JFormattedTextField();\n panel2.add(table7Field1, cc.xy(2, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\n table7Field3 = new JFormattedTextField();\n table7Field3.setText(\"\");\n panel2.add(table7Field3, cc.xy(7, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\n table8Title = new JLabel();\n table8Title.setBackground(new Color(-6047008));\n table8Title.setText(\"砂土的密实度与触探击数的关系(N63.8)\");\n panel2.add(table8Title, cc.xyw(1, 5, 5));\n final JLabel label14 = new JLabel();\n label14.setText(\"触探击数参数一\");\n panel2.add(label14, cc.xy(1, 7));\n final JLabel label15 = new JLabel();\n label15.setText(\"触探击数参数二\");\n panel2.add(label15, cc.xy(3, 7, CellConstraints.LEFT, CellConstraints.DEFAULT));\n final JLabel label16 = new JLabel();\n label16.setText(\"触探击数参数三\");\n panel2.add(label16, cc.xy(5, 7));\n table8Field2 = new JFormattedTextField();\n table8Field2.setText(\"\");\n panel2.add(table8Field2, cc.xy(4, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n table8Field1 = new JFormattedTextField();\n table8Field1.setText(\"\");\n panel2.add(table8Field1, cc.xy(2, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n table8Field3 = new JFormattedTextField();\n panel2.add(table8Field3, cc.xy(7, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n table7Area = new JTextPane();\n table7Area.setBackground(new Color(-1));\n table7Area.setEditable(false);\n table7Area.setText(\"\");\n panel2.add(table7Area, cc.xyw(1, 3, 9, CellConstraints.FILL, CellConstraints.FILL));\n table8Area = new JTextPane();\n table8Area.setBackground(new Color(-1));\n table8Area.setEditable(false);\n table8Area.setText(\"\");\n panel2.add(table8Area, cc.xyw(1, 9, 9, CellConstraints.FILL, CellConstraints.FILL));\n }", "public void showCircleSizeSetup() {\n sizeArea.removeAllViewsInLayout();\n sizeArea.addView(radiusEdit);\n }", "private void setupGUI()\n {\n // give our panel a 'BoxLayout' with appropriate\n // dimensions and color\n setLayout(new BoxLayout (this, BoxLayout.Y_AXIS));\n setPreferredSize(new Dimension(600, 200));\n //setBackground(Color.LIGHT_GRAY);\n \n //------------create labels------------\n lblSelect = new JLabel(\"Select a traversal: \");\n lblSelect.setFont(new Font(\"Helvetica\", Font.PLAIN, 16));\n lblSelect.setForeground(Color.BLACK);\n \n lblStringOutput = new JLabel();\n lblStringOutput.setFont(new Font(\"Helvetica\", Font.PLAIN, 16));\n lblStringOutput.setForeground(Color.BLACK);\n \n lblAuthor = new JLabel(\"This program was written by Harry Staley. \");\n lblAuthor.setFont(new Font(\"Helvetica\", Font.PLAIN, 16));\n lblAuthor.setForeground(Color.BLACK);\n \n //-------create combo box-------\n cboTraversals = new JComboBox(traversals);\n cboTraversals.setBackground(Color.ORANGE);\n cboTraversals.setForeground(Color.BLACK);\n cboTraversals.setFont(new Font(\"Helvetica\", Font.BOLD, 16));\n cboTraversals.setAlignmentX(Component.CENTER_ALIGNMENT);\n \n //------------radio buttons------------\n \n rbtMinimum = new JRadioButton(\"Minimum\", true);\n rbtMinimum.setBackground(Color.YELLOW);\n rbtMinimum.setFont(new Font(\"Helvetica\", Font.BOLD, 16));\n \n rbtMaximum = new JRadioButton(\"Maximum\", true);\n rbtMaximum.setBackground(Color.YELLOW);\n rbtMaximum.setFont(new Font(\"Helvetica\", Font.BOLD, 16));\n \n // add the two radio buttons to the button\n // group called 'group'. NOTE: 'group' is \n // not a container, it is used to simply\n // organize the buttons; we will still have to\n // add each individual button to a panel\n // (shown below)\n ButtonGroup group = new ButtonGroup();\n group.add(rbtMinimum);\n group.add(rbtMaximum);\n\n \n //-----------create normal buttons------------\n btnAddChar = new JButton(\"Populate binary search tree\");\n btnAddChar.setBackground(Color.BLUE);\n btnAddChar.setFont(new Font (\"Helvetica\", Font.BOLD, 20));\n btnAddChar.setForeground(Color.WHITE);\n \n btnExit = new JButton(\"Exit\");\n btnExit.setBackground(Color.RED);\n btnExit.setFont(new Font (\"Helvetica\", Font.BOLD, 20));\n btnExit.setForeground(Color.WHITE);\n\n \n //------------create panels------------\n pnlSelect = new JPanel();\n pnlSelect.add(lblSelect);\n pnlSelect.add(cboTraversals);\n pnlSelect.setBackground(Color.LIGHT_GRAY);\n \n pnlBottom = new JPanel();\n pnlBottom.add(lblAuthor);\n pnlBottom.setBackground(Color.LIGHT_GRAY);\n \n pnlBottom2 = new JPanel();\n pnlBottom2.add(btnExit);\n pnlBottom2.setBackground(Color.LIGHT_GRAY);\n \n pnlTwoButtons = new JPanel();\n pnlTwoButtons.add(btnAddChar);\n pnlTwoButtons.setBackground(Color.LIGHT_GRAY);\n \n // add radio buttons to this subpanel\n pnlMinMax = new JPanel();\n pnlMinMax.setBackground(Color.LIGHT_GRAY);\n pnlMinMax.add(rbtMinimum);\n pnlMinMax.add(Box.createRigidArea(new Dimension(5,0)));\n pnlMinMax.add(rbtMaximum);\n \n // create listeners for components\n btnAddChar.addActionListener(new PopulateBSTListener());\n btnExit.addActionListener(new ExitListener());\n cboTraversals.addActionListener(new TraversalSelectedListener());\n rbtMinimum.addActionListener(new MinMaxListener());\n rbtMaximum.addActionListener(new MinMaxListener());\n\n // add sub panels to the main panel\n add(pnlTwoButtons);\n add(pnlSelect);\n add(pnlMinMax);\n add(pnlBottom);\n add(pnlBottom2);\n\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setBackground(Color.MAGENTA);\r\n\t\tframe.setBounds(100, 100, 278, 153);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(new MigLayout(\"\", \"[76px][76px][76px][81px]\", \"[45.00px][45.00px]\"));\r\n\t\t\r\n\t\t// Field that will display text\r\n\t\tshowMouseX = new JTextField();\r\n\t\tshowMouseX.setForeground(Color.MAGENTA);\r\n\t\tshowMouseX.setBackground(Color.BLUE);\r\n\t\tshowMouseX.setFont(new Font(\"Dialog\", Font.PLAIN, 14));\r\n\t\tshowMouseX.setText(\"Mouse X Position\");\r\n\t\tframe.getContentPane().add(showMouseX, \"cell 0 0 2 1,grow\");\r\n\t\tshowMouseX.setColumns(10);\r\n\t\t\r\n\t\t// Field that will display the x position of the cursor\r\n\t\tmousePosX = new JTextField();\r\n\t\tmousePosX.setText(\"test\");\r\n\t\tmousePosX.setForeground(Color.ORANGE);\r\n\t\tmousePosX.setBackground(Color.RED);\r\n\t\tmousePosX.setFont(new Font(\"Dialog\", Font.PLAIN, 14));\r\n\t\tframe.getContentPane().add(mousePosX, \"cell 2 0 2 1,grow\");\r\n\t\tmousePosX.setColumns(10);\r\n\t\t\r\n\t\t// Field that will display text\r\n\t\tshowMouseY = new JTextField();\r\n\t\tshowMouseY.setForeground(Color.DARK_GRAY);\r\n\t\tshowMouseY.setBackground(Color.BLACK);\r\n\t\tshowMouseY.setText(\"Mouse Y Position\");\r\n\t\tshowMouseY.setFont(new Font(\"Dialog\", Font.PLAIN, 14));\r\n\t\tframe.getContentPane().add(showMouseY, \"cell 0 1 2 1,grow\");\r\n\t\tshowMouseY.setColumns(10);\r\n\t\t\r\n\t\t// Field that will display the y position of the cursor\r\n\t\tmousePosY = new JTextField();\r\n\t\tmousePosY.setForeground(Color.CYAN);\r\n\t\tmousePosY.setText(\"test\");\r\n\t\tmousePosY.setBackground(Color.GREEN);\r\n\t\tmousePosY.setFont(new Font(\"Dialog\", Font.PLAIN, 14));\r\n\t\tframe.getContentPane().add(mousePosY, \"cell 2 1 2 1,grow\");\r\n\t\tmousePosY.setColumns(10);\r\n\t\t\r\n\t\t/*XXX: Is it ok to do that in initialize()? It is a part of the GUI,\r\n\t\t/ but it doesn't have anything to do with the object.\r\n\t\t/ Start a thread that continuously updates the two windows to show the current\r\n\t\t/ cursor position\r\n\t\t*/\r\n\t\tMouseUpdater mouseUpdater = new MouseUpdater(mousePosX, mousePosY);\r\n\t\tmouseUpdater.start();\r\n\t}", "@Override\n public Dimension getPreferredSize() {\n final Dimension size;\n synchronized (getDelegateLock()) {\n size = getDelegate().getPreferredSize();\n }\n return validateSize(size);\n }", "@Override public void layoutContainer(Container parent) {\n int nc = parent.getComponentCount();\n if (nc == 0) {\n return;\n }\n int width = parent.getWidth(); // - insets.left - insets.right;\n int height = parent.getHeight(); // - insets.left - insets.right;\n int x = 0; // insets.left; int y = insets.top;\n // for (int i = 0; i < nc; i++) {\n Component c = parent.getComponent(0); // = toolBox;\n c.setBounds(x, height - yy, width, c.getPreferredSize().height);\n // }\n }", "protected \tvoid\t\tcalcPreferredSize(MiSize size)\n\t\t{\n\t\tsuper.calcPreferredSize(size);\n\n\t\tMiDistance labelWidths = 0;\n\t\tMiDistance tickWidth = numTicks * ticks.getWidth() + (numTicks - 1) * tickSpacing;\n\n\t\tif (label != null)\n\t\t\tlabelWidths = label.getWidth();\n\t\tif (valueDisplay != null)\n\t\t\tlabelWidths += valueDisplay.getWidth();\n\t\tif (tickWidth < labelWidths)\n\t\t\tsize.width += labelWidths;\n\t\telse\n\t\t\tsize.width += tickWidth;\n\n\t\tsize.height += ticks.getHeight();\n\t\t}", "public void testGetClientSize() {\n // Get the dimensions without any scroll bars\n Window.enableScrolling(false);\n final int oldClientHeight = Window.getClientHeight();\n final int oldClientWidth = Window.getClientWidth();\n assertTrue(oldClientHeight > 0);\n assertTrue(oldClientWidth > 0);\n \n // Compare to the dimensions with scroll bars\n Window.enableScrolling(true);\n final Label largeDOM = new Label();\n largeDOM.setPixelSize(oldClientWidth + 100, oldClientHeight + 100);\n RootPanel.get().add(largeDOM);\n DeferredCommand.addCommand(new Command() {\n public void execute() {\n int newClientHeight = Window.getClientHeight();\n int newClientWidth = Window.getClientWidth();\n assertTrue(newClientHeight < oldClientHeight);\n assertTrue(newClientWidth < oldClientWidth);\n finishTest();\n }\n });\n delayTestFinish(200);\n }", "public static void main(String[] args) {\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\r\n\r\n\t\tselectionFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tselectionFrame.setResizable(false);\r\n\t\tselectionFrame.setSize(300, 300);\r\n\t\t\r\n\t\t// Determine the new location of the window\r\n\t\tint w = selectionFrame.getSize().width;\r\n\t\tint h = selectionFrame.getSize().height;\r\n\t\tint x = (dim.width/2)-(w/2);\r\n\t\tint y = (dim.height/2)-(h/2);\r\n\t\t\r\n\t\t// Move the window\r\n\t\tselectionFrame.setLocation(x, y);\r\n\t\tselectionFrame.setVisible(true);\r\n\r\n\t\tJPanel selectionPanel = new JPanel();\r\n\t\tJButton Beginner = new JButton(\"Beginner\");\r\n\t\tJButton Intermediate = new JButton(\"Intermediate\");\r\n\t\tJButton Advanced = new JButton(\"Advanced\");\r\n\r\n\t\tSpringLayout layout = new SpringLayout();\r\n\r\n\t\tselectionPanel.setLayout(layout);\r\n\t\tselectionPanel.add(Beginner);\r\n\t\tselectionPanel.add(Intermediate);\r\n\t\tselectionPanel.add(Advanced);\r\n\t\tselectionFrame.add(selectionPanel);\r\n\r\n\t\tlayout.putConstraint(SpringLayout.NORTH, Beginner, 68,\r\n\t\t\t\tSpringLayout.NORTH, selectionFrame);\r\n\t\tlayout.putConstraint(SpringLayout.WEST, Beginner, 110,\r\n\t\t\t\tSpringLayout.WEST, selectionFrame);\r\n\t\t\r\n\t\tlayout.putConstraint(SpringLayout.NORTH, Intermediate, 50,\r\n\t\t\t\tSpringLayout.NORTH, Beginner);\r\n\t\tlayout.putConstraint(SpringLayout.WEST, Intermediate, -10,\r\n\t\t\t\tSpringLayout.WEST, Beginner);\r\n\t\t\r\n\t\tlayout.putConstraint(SpringLayout.NORTH, Advanced, 50,\r\n\t\t\t\tSpringLayout.NORTH, Intermediate);\r\n\t\tlayout.putConstraint(SpringLayout.WEST, Advanced, -1, \r\n\t\t\t\tSpringLayout.WEST, Beginner);\r\n\r\n\t\tBeginner.addMouseListener(new MouseListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\r\n\t\t\t\tselectionFrame.setVisible(false);\r\n\t\t\t\tgameFrame = new JFrame();\r\n\t\t\t\tgameFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tgameFrame.setResizable(false);\r\n\t\t\t\tgameFrame.setTitle(\"Beginner\");\r\n\t\t\t\tgameFrame.setSize(231, 253);\r\n\t\t\t\tgameFrame.add(new Board(9, 9, 10));\r\n\t\t\t\t\r\n\t\t\t\tsetBounds();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tIntermediate.addMouseListener(new MouseListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent arg0) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent arg0) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\r\n\t\t\t\tselectionFrame.setVisible(false);\r\n\t\t\t\tgameFrame = new JFrame();\r\n\t\t\t\tgameFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tgameFrame.setResizable(false);\r\n\t\t\t\tgameFrame.setTitle(\"Intermediate\");\r\n\t\t\t\tgameFrame.setSize(406, 428);\r\n\t\t\t\tgameFrame.add(new Board(16, 16, 40));\r\n\t\t\t\t\r\n\t\t\t\tsetBounds();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tAdvanced.addMouseListener(new MouseListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseExited(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\r\n\t\t\t\tselectionFrame.setVisible(false);\r\n\t\t\t\tgameFrame = new JFrame();\r\n\t\t\t\tgameFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tgameFrame.setResizable(false);\r\n\t\t\t\tgameFrame.setTitle(\"Advanced\");\r\n\t\t\t\tgameFrame.setSize(756, 428);\r\n\t\t\t\tgameFrame.add(new Board(30, 16, 99));\r\n\t\t\t\t\r\n\t\t\t\tsetBounds();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tselectionFrame.addComponentListener(new ComponentListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentHidden(ComponentEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentMoved(ComponentEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentResized(ComponentEvent e) {\r\n\t\t\t\tint w = selectionFrame.getSize().width;\r\n\t\t\t\tint h = selectionFrame.getSize().height;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void componentShown(ComponentEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\r\n\t}", "private void geometry()\n\t\t{\n\t\tjLabelNickName = new JLabel(\"Pseudo: \");\n\t\tjLabelPort = new JLabel(\"Port: \");\n\t\tjNickname = new JTextField();\n\t\tjIPLabel = new JIPLabel();\n\t\tjIP = new JTextField();\n\t\tjPort = new JSpinner();\n\t\tjButtonConnection = new JButton(\"Connexion\");\n\n\t\tthis.setLayout(new GridLayout(-1, 1));\n\n\t\tthis.add(jLabelNickName);\n\t\tthis.add(jNickname);\n\t\tthis.add(jIPLabel);\n\t\tthis.add(jIP);\n\t\tthis.add(jLabelPort);\n\t\tthis.add(jPort);\n\t\tthis.add(Box.createVerticalStrut(SPACE));\n\t\tthis.add(jButtonConnection);\n\t\tthis.add(Box.createVerticalGlue());\n\t\t}", "public Dimension getPreferredSize() {\n\t if(editingComponent != null) {\n\t\tDimension pSize = editingComponent.getPreferredSize();\n\n\t\tpSize.width += offset + 5;\n\n\t\tDimension rSize = (renderer != null) ?\n\t\t renderer.getPreferredSize() : null;\n\n\t\tif(rSize != null)\n\t\t pSize.height = Math.max(pSize.height, rSize.height);\n\t\tif(editingIcon != null)\n\t\t pSize.height = Math.max(pSize.height,\n\t\t\t\t\t editingIcon.getIconHeight());\n\n\t\t// Make sure height is at least 100.\n\t\tpSize.width = Math.max(pSize.width, 100);\n\t\treturn pSize;\n\t }\n\t return new Dimension(0, 0);\n\t}", "public void setSize() {\n\t\t\tthis.size = 1;\n\t\t\tint leftSize = 0;\n\t\t\tint rightSize = 0;\n\t\t\tif (this.getLeft().getKey() != -1) {\n\t\t\t\tleftSize = this.getLeft().getSize();\n\t\t\t}\n\t\t\tif (this.getRight().getKey() != -1) {\n\t\t\t\trightSize = this.getRight().getSize();\n\t\t\t}\n\t\t\tthis.size += leftSize + rightSize;\n\n\t\t\t/**\n\t\t\t * this.size = 1; int leftSize = 0; int rightSize = 0; try { leftSize =\n\t\t\t * this.getLeft().getSize(); this.size += leftSize; } catch\n\t\t\t * (NullPointerException e) { this.size += leftSize; } try { rightSize =\n\t\t\t * this.getRight().getSize(); this.size += rightSize; } catch\n\t\t\t * (NullPointerException e) { this.size += rightSize; } if (this.getSize() >\n\t\t\t * 990) { System.out.println(\"actual size is:\" + this.getSize()); }\n\t\t\t */\n\t\t}", "public Cool303ComponentsPastel()\n {\n super();\n Dimension size = getPreferredSize();\n size.width = size.height = Math.max(size.width, size.height);\n setPreferredSize(size);\n setContentAreaFilled(false);\n\n }", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new BorderLayout(0, 0));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new FormLayout(\"fill:d:grow\", \"center:d:grow,top:3dlu:noGrow,center:max(d;4px):noGrow\"));\n mainPanel.add(panel2, BorderLayout.SOUTH);\n postButton = new JButton();\n postButton.setText(\"Post\");\n CellConstraints cc = new CellConstraints();\n panel2.add(postButton, cc.xy(1, 3));\n final JSplitPane splitPane1 = new JSplitPane();\n splitPane1.setResizeWeight(0.5);\n mainPanel.add(splitPane1, BorderLayout.CENTER);\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new FormLayout(\"fill:d:grow\", \"center:d:noGrow,top:3dlu:noGrow,center:d:grow\"));\n splitPane1.setRightComponent(panel3);\n final JLabel label1 = new JLabel();\n label1.setText(\"Query Result\");\n panel3.add(label1, cc.xy(1, 1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel3.add(scrollPane1, cc.xy(1, 3, CellConstraints.FILL, CellConstraints.FILL));\n queryResult = new JTextArea();\n scrollPane1.setViewportView(queryResult);\n final JPanel panel4 = new JPanel();\n panel4.setLayout(new FormLayout(\"fill:d:grow\", \"center:d:noGrow,top:3dlu:noGrow,center:d:grow\"));\n splitPane1.setLeftComponent(panel4);\n final JLabel label2 = new JLabel();\n label2.setText(\"Cypher Query\");\n panel4.add(label2, cc.xy(1, 1));\n final JScrollPane scrollPane2 = new JScrollPane();\n panel4.add(scrollPane2, cc.xy(1, 3, CellConstraints.FILL, CellConstraints.FILL));\n queryEditor = new JTextArea();\n scrollPane2.setViewportView(queryEditor);\n }", "private void bracketingFrame(){\r\n\t\tm_BracketingBut.setEnabled(false);\r\n\t \tJPanel moreOptionsPanel = new JPanel();\r\n\t \tmoreOptionsPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 5, 5));\r\n\t \tmoreOptionsPanel.setLayout(new GridLayout());\r\n\r\n\t \tSubspaceClusterer clusterer = (SubspaceClusterer) m_ClustererEditor.getValue();\r\n\t \t//Set subspace cluster class, so the right parameter shows up\r\n\t \tm_bracketingPanel.setSubspaceClusterClass(clusterer);\r\n\t \tmoreOptionsPanel.add(m_bracketingPanel);\r\n\t \t\r\n\t \tJPanel all = new JPanel();\r\n\t \tall.setLayout(new BorderLayout());\t\r\n\r\n\t \tJButton oK = new JButton(\"OK\");\r\n\t \tJPanel okP = new JPanel();\r\n\t \tokP.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));\r\n\t \tokP.setLayout(new GridLayout(1,1,5,5));\r\n\t \tokP.add(oK);\r\n\r\n\t \tall.add(moreOptionsPanel, BorderLayout.CENTER);\r\n\t \tall.add(okP, BorderLayout.SOUTH);\r\n\t \t\r\n\t \t//Bracketing Frame\r\n\t \tfinal javax.swing.JFrame jf = \r\n\t \t new javax.swing.JFrame(\"Subspacecluster Bracketing\");\r\n\t \tjf.getContentPane().setLayout(new BorderLayout());\r\n\t \tjf.getContentPane().add(all, BorderLayout.CENTER);\r\n\t \tjf.addWindowListener(new java.awt.event.WindowAdapter() {\r\n\t \t public void windowClosing(java.awt.event.WindowEvent w) {\r\n\t \t jf.dispose();\r\n\t \t m_BracketingBut.setEnabled(true);\r\n\t \t }\r\n\t \t});\r\n\t \toK.addActionListener(new ActionListener() {\r\n\t \t public void actionPerformed(ActionEvent a) {\r\n\t \t\tm_BracketingBut.setEnabled(true);\r\n\t \t jf.dispose();\r\n\t \t \r\n\t \t }\r\n\t \t});\r\n\t \tjf.pack();\r\n\t \tjf.setLocation(m_BracketingBut.getLocationOnScreen());\r\n\t \tjf.setVisible(true);\r\n\t}", "public void setComponentBounds(){\n spelerIDLabel.setBounds(40,10,100,40);\n typeLabel.setBounds(40,60,100,40);\n codeLabel.setBounds(40,110,200,40);\n heeftBetaaldLabel.setBounds(40, 160, 200, 40);\n\n spelerIDField.setBounds(250, 10, 100, 40);\n typeField.setBounds(250, 60, 100, 40);\n codeField.setBounds(250, 110, 100, 40);\n heeftBetaaldField.setBounds(250, 160, 100, 40);\n\n terugButton.setBounds(300,260,75,40);\n klaarButton.setBounds(200,260,100,40);\n\n\n\n\n }", "public Dimension getPreferredSize() {\n Dimension size = super.getPreferredSize();\n size.width += extraWindowWidth;\n return size;\n }", "public JPanel createDeclarationButtonBar() {\n\tJPanel buttonBar = new JPanel();\n\tBoxLayout boxlay=new BoxLayout(buttonBar,BoxLayout.Y_AXIS); //i think this does setLayout\n\tbuttonBar.setLayout(boxlay);\n\tbuttonBar.setBorder(new BevelBorder(BevelBorder.RAISED));\n\n\t//alignment = left\n\tFlowLayout flowlay1=new FlowLayout(FlowLayout.LEFT); //left justified\n\tFlowLayout flowlay2=new FlowLayout(FlowLayout.LEFT); //left justified\n\tJPanel buttonTopBar = new JPanel(flowlay1); //left justified\n\tJPanel buttonLowerBar = new JPanel(flowlay2);\n\n\t//JButton addVarTopButton=new JButton(\"Add Top Var\"); \n\tJButton addInputPortButton=new JButton(\"Add InputPort\"); \n\tJButton addOutputPortButton=new JButton(\"Add OutputPort\"); \n\tJButton addSubModuleButton=new JButton(\"Add SubModule\"); \n\tJButton addVarBottomButton=new JButton(\"Add Other Variable\"); \n\n\t//buttonTopBar.add(addVarTopButton);\n\tbuttonTopBar.add(addInputPortButton);\n\tbuttonTopBar.add(addOutputPortButton);\n\tbuttonTopBar.add(addSubModuleButton);\n\tbuttonTopBar.add(addVarBottomButton);\n\n\t//addVarTopButton.addActionListener(this);\n\taddInputPortButton.addActionListener(this);\n\taddOutputPortButton.addActionListener(this);\n\taddSubModuleButton.addActionListener(this);\n\taddVarBottomButton.addActionListener(this);\n\n //lower bar\n\n\tJButton changeButton=new JButton(\"Change\"); \n\tchangeButton.addActionListener(this);\n\tbuttonLowerBar.add(changeButton);\n\n\tJButton changeNameButton=new JButton(\"Change Name\"); \n\tchangeNameButton.addActionListener(this);\n\tbuttonLowerBar.add(changeNameButton);\n\n\tJButton copyButton=new JButton(\"Copy\"); \n\tcopyButton.addActionListener(this);\n\tbuttonLowerBar.add(copyButton);\n\n\tJButton deleteButton=new JButton(\"Delete\"); \n\tdeleteButton.addActionListener(this);\n\tbuttonLowerBar.add(deleteButton);\n\n\tJButton upButton=new JButton(\"Up\"); \n\tupButton.addActionListener(this);\n\tbuttonLowerBar.add(upButton);\n\n\tJButton downButton=new JButton(\"Down\"); \n\tdownButton.addActionListener(this);\n\tbuttonLowerBar.add(downButton);\n\n\tJButton topButton=new JButton(\"Top\"); \n\ttopButton.addActionListener(this);\n\tbuttonLowerBar.add(topButton);\n\n\tJButton bottomButton=new JButton(\"Bottom\"); \n\tbottomButton.addActionListener(this);\n\tbuttonLowerBar.add(bottomButton);\n\n buttonBar.add(buttonTopBar);\n buttonBar.add(buttonLowerBar);\n\treturn(buttonBar);\n }", "public void apply(Point offset) {\r\n//\t\t\t\tabstractSyntaxFigure.setBounds(abstractSyntaxBox.getTranslated(offset));\r\n//\t\t\t\ttreeConcreteSyntaxFigure.setBounds(treeConcreteSyntaxBox.getTranslated(offset));\r\n//\t\t\t\tstaticSemanticsFigure.setBounds(staticSemanticsBox.getTranslated(offset));\r\n//\t\t\t\tcheckerFigure.setBounds(checkerBox.getTranslated(offset));\r\n//\t\t\t\tinterpreterFigure.setBounds(interpreterBox.getTranslated(offset));\r\n//\t\t\t\tcompilerFigure.setBounds(compilerBox.getTranslated(offset));\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < taskFigures.size(); i++){\r\n\t\t\t\t\ttaskFigures.get(i).setBounds(boxes.get(i).getTranslated(offset));\r\n\t\t\t\t}\r\n\t\t\t}", "public Dimension getPreferredSize(){\n\t\treturn new Dimension(1000, 1000);\n\t}", "private void init() {\r\n setTitle(\"Crop Boundary Pixels\");\r\n setSize(350, 230);\r\n setForeground(Color.black);\r\n\r\n Box contentBox = new Box(BoxLayout.Y_AXIS);\r\n JPanel optionPanel = new JPanel();\r\n\r\n // make border\r\n optionPanel.setBorder(buildTitledBorder(\"Pixels Around Image\"));\r\n contentBox.add(optionPanel);\r\n\r\n // set layout\r\n GridBagLayout gbl = new GridBagLayout();\r\n GridBagConstraints gbc = new GridBagConstraints();\r\n optionPanel.setLayout(gbl);\r\n\r\n gbc.anchor = GridBagConstraints.NORTHWEST;\r\n // make content, place into layout\r\n\r\n // left\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel leftSideLabel = new JLabel(\"Pixels on the left side:\");\r\n leftSideLabel.setFont(serif12);\r\n leftSideLabel.setForeground(Color.black);\r\n leftSideLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(leftSideLabel, gbc);\r\n optionPanel.add(leftSideLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n leftSideInput = new JTextField(\"0\", 4);\r\n leftSideInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(leftSideInput, false);\r\n\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(leftSideInput, gbc);\r\n optionPanel.add(leftSideInput);\r\n\r\n // right\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel rightSideLabel = new JLabel(\"Pixels on the right side:\");\r\n rightSideLabel.setFont(serif12);\r\n rightSideLabel.setForeground(Color.black);\r\n rightSideLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(rightSideLabel, gbc);\r\n optionPanel.add(rightSideLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n rightSideInput = new JTextField(\"0\", 4);\r\n rightSideInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(rightSideInput, false);\r\n\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(rightSideInput, gbc);\r\n optionPanel.add(rightSideInput);\r\n\r\n // top\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel topLabel = new JLabel(\"Pixels on top:\");\r\n topLabel.setFont(serif12);\r\n topLabel.setForeground(Color.black);\r\n topLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(topLabel, gbc);\r\n optionPanel.add(topLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n topInput = new JTextField(\"0\", 4);\r\n topInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(topInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(topInput, gbc);\r\n optionPanel.add(topInput);\r\n\r\n // bottom\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel bottomLabel = new JLabel(\"Pixels on bottom:\");\r\n bottomLabel.setFont(serif12);\r\n bottomLabel.setForeground(Color.black);\r\n bottomLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2;\r\n gbl.setConstraints(bottomLabel, gbc);\r\n optionPanel.add(bottomLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n bottomInput = new JTextField(\"0\", 4);\r\n bottomInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(bottomInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(bottomInput, gbc);\r\n optionPanel.add(bottomInput);\r\n\r\n // front\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel frontLabel = new JLabel(\"Slices at the front of image:\");\r\n frontLabel.setFont(serif12);\r\n frontLabel.setForeground(Color.black);\r\n frontLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2; // GridBagConstraints.RELATIVE;\r\n gbl.setConstraints(frontLabel, gbc);\r\n optionPanel.add(frontLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n frontInput = new JTextField(\"0\", 4);\r\n frontInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(frontInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(frontInput, gbc);\r\n optionPanel.add(frontInput);\r\n\r\n // back\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n\r\n JLabel backLabel = new JLabel(\"Slices at the back of image:\");\r\n backLabel.setFont(serif12);\r\n backLabel.setForeground(Color.black);\r\n backLabel.setRequestFocusEnabled(false);\r\n gbc.gridwidth = 2; // GridBagConstraints.RELATIVE;\r\n gbl.setConstraints(backLabel, gbc);\r\n optionPanel.add(backLabel);\r\n optionPanel.add(Box.createHorizontalStrut(10));\r\n backInput = new JTextField(\"0\", 4);\r\n backInput.addActionListener(this);\r\n MipavUtil.makeNumericsOnly(backInput, false);\r\n gbc.gridwidth = GridBagConstraints.REMAINDER;\r\n gbl.setConstraints(backInput, gbc);\r\n optionPanel.add(backInput);\r\n\r\n // image destination select\r\n JPanel destPanel = new JPanel(); // panel carries no content but box & border\r\n destPanel.setBorder(buildTitledBorder(\"Select Destination\"));\r\n\r\n Box destinationBox = new Box(BoxLayout.Y_AXIS);\r\n\r\n destinationGroup = new ButtonGroup();\r\n newImage = new JRadioButton(\"New Image\", true);\r\n newImage.setFont(serif12);\r\n newImage.addActionListener(this);\r\n destinationGroup.add(newImage);\r\n destinationBox.add(newImage);\r\n newImage.setEnabled(true);\r\n\r\n replaceImage = new JRadioButton(\"Replace Image\", false);\r\n replaceImage.setFont(serif12);\r\n replaceImage.addActionListener(this);\r\n destinationGroup.add(replaceImage);\r\n destinationBox.add(replaceImage);\r\n replaceImage.setEnabled(true);\r\n destPanel.add(destinationBox);\r\n contentBox.add(destPanel);\r\n\r\n // test speed panel (choice 1: algo has personal buff, imported into img,\r\n // choice 2: algo calcs where to insert a row. methinks fewer loops)\r\n /*\r\n * JPanel loopingTestPanel = new JPanel(); loopingTestPanel.setBorder(buildTitledBorder(\"Looping test\")); Box\r\n * loopingTestBox = new Box(BoxLayout.Y_AXIS); loopingGroup = new ButtonGroup(); noBuffer = new JRadioButton(\"No\r\n * Buffer\", true); noBuffer.setFont(serif12); noBuffer.addActionListener(this); loopingGroup.add(noBuffer);\r\n * loopingTestBox.add(noBuffer); usingBuffer = new JRadioButton(\"Uses Buffer\", false);\r\n * usingBuffer.setFont(serif12); usingBuffer.addActionListener(this); loopingGroup.add(usingBuffer);\r\n * loopingTestBox.add(usingBuffer); loopingTestPanel.add(loopingTestBox); contentBox.add(loopingTestPanel);\r\n */\r\n // end looping test display\r\n\r\n /*\r\n * JPanel OKCancelPanel = new JPanel(new FlowLayout()); OKButton = buildOKButton(); OKCancelPanel.add(OKButton);\r\n *\r\n * cancelButton = buildCancelButton(); OKCancelPanel.add(cancelButton); contentBox.add(OKCancelPanel);\r\n */\r\n contentBox.add(buildButtons());\r\n\r\n // if this is a 2D image, turn off slice margins\r\n if (image.getNDims() == 2) {\r\n frontLabel.setEnabled(false);\r\n frontInput.setEnabled(false);\r\n backLabel.setEnabled(false);\r\n backInput.setEnabled(false);\r\n }\r\n\r\n mainDialogPanel.add(contentBox);\r\n getContentPane().add(mainDialogPanel);\r\n\r\n pack();\r\n setVisible(true);\r\n }", "public Editor(int size){\n\t\toriginX = (GRID_DISPLAY_SIZE/2)+MARGIN_LEFT;\n\t\toriginY = (WINDOW_HEIGHT/2-MARGIN_LEFT-(size*Textures.cellTexture.getSize().y)/2);\n\t\t\n\t\tdisplay = new Display(size, originX, originY);\n\t\t\n\t\ttoDisplay = new ArrayList<Drawable>();\n\t\t\n\t\tcanva = new CanvaDisplay(size, originX, originY);\n\t\t\n\t\tinitConstantDisplay();\n\t\tcolour = Colour.WHITE;\n\t}", "public void setTreeSize(Double newtreesize)\n {\n treesize = newtreesize; \n }", "void setSize(Dimension size);", "public MySWsDecoderSizesAutoLayoutTests() {\n initComponents();\n \n \n }", "public InputPanel()\r\n\t{\r\n\t\tsuper();\r\n\t\tsetBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tsetBackground(Color.WHITE);\r\n\t\tsetLayout(new BorderLayout(20, 5));\r\n\r\n\t\tinputContainer = new JPanel();\r\n\t\tinputContainer.setBorder(new EmptyBorder(5, 0, 5, 5));\r\n\t\tinputContainer.setBackground(Color.WHITE);\r\n\t\tadd(inputContainer, BorderLayout.CENTER);\r\n\t\tinputContainer.setLayout(new BorderLayout(0, 0));\r\n\r\n\t\tinputPanel = new JPanel();\r\n\t\tinputPanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tinputPanel.setBackground(Color.WHITE);\r\n\t\tinputContainer.add(inputPanel, BorderLayout.CENTER);\r\n\r\n\t\tclassPanel = new JPanel();\r\n\t\tclassPanel.setBackground(RED);\r\n\t\tclassPanel.setAlignmentY(Component.TOP_ALIGNMENT);\r\n\t\tclassPanel.setLayout(new BorderLayout(0, 0));\r\n\r\n\t\tclassLabel = new JLabel(\"Klasse K definieren\");\r\n\t\tclassLabel.setForeground(Color.WHITE);\r\n\t\tclassLabel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tclassLabel.setFont(new Font(\"Calibri\", Font.BOLD, 16));\r\n\t\tclassLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tclassPanel.add(classLabel, BorderLayout.NORTH);\r\n\r\n\t\tclassInputPanel = new JPanel();\r\n\t\t// kann man das mit dem FlowLayout unten zusammenfassen?\r\n\t\tFlowLayout flowLayout = (FlowLayout) classInputPanel.getLayout();\r\n\t\tflowLayout.setHgap(10);\r\n\t\tflowLayout.setVgap(40);\r\n\t\tclassInputPanel.setBackground(Color.WHITE);\r\n\t\tclassInputPanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tclassPanel.add(classInputPanel, BorderLayout.CENTER);\r\n\r\n\t\tleftClassBorderLabel = new JLabel(\" ( \");\r\n\t\tleftClassBorderLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tleftClassBorderLabel.setVerticalTextPosition(SwingConstants.TOP);\r\n\t\tleftClassBorderLabel.setVerticalAlignment(SwingConstants.TOP);\r\n\t\tleftClassBorderLabel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tleftClassBorderLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\r\n\t\tleftClassBorderLabel.setFont(new Font(\"Calibri\", Font.PLAIN, 26));\r\n\t\tleftClassBorderLabel.addMouseListener(borderClick);\r\n\t\tclassInputPanel.add(leftClassBorderLabel);\r\n\r\n\t\tleftClassBorderField = new JTextField();\r\n\t\tleftClassBorderField.setMargin(new Insets(10, 5, 10, 5));\r\n\t\tleftClassBorderField.setFont(new Font(\"Calibri\", Font.PLAIN, 26));\r\n\t\tleftClassBorderField.setSize(new Dimension(100, 60));\r\n\t\tclassInputPanel.add(leftClassBorderField);\r\n\t\tleftClassBorderField.setColumns(5);\r\n\r\n\t\tclassSeparatorLabel = new JLabel(\" , \");\r\n\t\tclassSeparatorLabel.setFont(new Font(\"Calibri\", Font.PLAIN, 26));\r\n\t\tclassInputPanel.add(classSeparatorLabel);\r\n\r\n\t\trightClassBorderField = new JTextField();\r\n\t\trightClassBorderField.setMargin(new Insets(10, 5, 10, 5));\r\n\t\trightClassBorderField.setFont(new Font(\"Calibri\", Font.PLAIN, 26));\r\n\t\tclassInputPanel.add(rightClassBorderField);\r\n\t\trightClassBorderField.setColumns(5);\r\n\r\n\t\trightClassBorderLabel = new JLabel(\" ] \");\r\n\t\trightClassBorderLabel.setVerticalTextPosition(SwingConstants.TOP);\r\n\t\trightClassBorderLabel.setVerticalAlignment(SwingConstants.TOP);\r\n\t\trightClassBorderLabel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\trightClassBorderLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\r\n\t\trightClassBorderLabel.setFont(new Font(\"Calibri\", Font.PLAIN, 26));\r\n\t\trightClassBorderLabel.addMouseListener(borderClick);\r\n\t\tclassInputPanel.add(rightClassBorderLabel);\r\n\r\n\t\tquantityPanel = new JPanel();\r\n\t\tquantityPanel.setBorder(null);\r\n\t\tquantityPanel.setBackground(RED);\r\n\t\tquantityPanel.setLayout(new BorderLayout(0, 0));\r\n\r\n\t\tquantityLabel = new JLabel(\"Absolute H\\u00E4ufigkeit h\");\r\n\t\tquantityLabel.setForeground(Color.WHITE);\r\n\t\tquantityLabel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tquantityLabel.setFont(new Font(\"Calibri\", Font.BOLD, 16));\r\n\t\tquantityLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tquantityPanel.add(quantityLabel, BorderLayout.NORTH);\r\n\r\n\t\tquantityInputPanel = new JPanel();\r\n\t\tFlowLayout flowLayout_1 = (FlowLayout) quantityInputPanel.getLayout();\r\n\t\tflowLayout_1.setVgap(40);\r\n\t\tflowLayout_1.setHgap(10);\r\n\t\tquantityInputPanel.setBackground(Color.WHITE);\r\n\t\tquantityInputPanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tquantityPanel.add(quantityInputPanel, BorderLayout.CENTER);\r\n\r\n\t\tsmallQuantityLabel = new JLabel(\"h (K) = \");\r\n\t\tsmallQuantityLabel.setFont(new Font(\"Calibri\", Font.PLAIN, 26));\r\n\t\tquantityInputPanel.add(smallQuantityLabel);\r\n\r\n\t\tquantityField = new JTextField();\r\n\t\tquantityField.setMargin(new Insets(10, 5, 10, 5));\r\n\t\tquantityField.setFont(new Font(\"Calibri\", Font.PLAIN, 26));\r\n\t\tquantityInputPanel.add(quantityField);\r\n\t\tquantityField.setColumns(5);\r\n\r\n\t\tquantitySumLabel = new JLabel(\" n = 0\");\r\n\t\tquantitySumLabel.setFont(new Font(\"Calibri\", Font.PLAIN, 26));\r\n\t\tquantityInputPanel.add(quantitySumLabel);\r\n\t\tinputPanel.setLayout(new GridLayout(2, 1, 10, 0));\r\n\t\tinputPanel.add(classPanel);\r\n\t\tinputPanel.add(quantityPanel);\r\n\r\n\t\tbuttonContainer = new ButtonContainer(false);\r\n\t\tinputContainer.add(buttonContainer, BorderLayout.SOUTH);\r\n\r\n\t\ttableContainer = new JPanel();\r\n\t\ttableContainer.setPreferredSize(new Dimension(250, 100));\r\n\t\ttableContainer.setMaximumSize(new Dimension(400, 500));\r\n\t\ttableContainer.setMinimumSize(new Dimension(250, 100));\r\n\t\ttableContainer.setBorder(new EmptyBorder(5, 5, 5, 0));\r\n\t\ttableContainer.setBackground(Color.WHITE);\r\n\t\tadd(tableContainer, BorderLayout.WEST);\r\n\t\ttableContainer.setLayout(new BorderLayout(5, 5));\r\n\r\n\t\ttable = new JTable()\r\n\t\t{\r\n\t\t\tpublic boolean getScrollableTracksViewportWidth()\r\n\t\t\t{\r\n\t\t\t\treturn getPreferredSize().width < getParent().getWidth();\r\n\t\t\t}\r\n\t\t};\r\n\t\ttable.getTableHeader().setReorderingAllowed(false);\r\n\t\ttable.setBackground(UIManager.getColor(\"Label.background\"));\r\n\t\ttable.setIntercellSpacing(new Dimension(2, 2));\r\n\r\n\t\tresetTable();\r\n\r\n\t\ttable.getColumnModel().getColumn(0).setResizable(false);\r\n\t\ttable.getColumnModel().getColumn(0).setPreferredWidth(20);\r\n\t\ttable.getColumnModel().getColumn(0).setMaxWidth(30);\r\n\t\ttable.getColumnModel().getColumn(1).setResizable(false);\r\n\t\ttable.getColumnModel().getColumn(1).setPreferredWidth(70);\r\n\t\ttable.getColumnModel().getColumn(1).setMaxWidth(75);\r\n\t\ttable.getColumnModel().getColumn(2).setResizable(false);\r\n\t\ttable.getColumnModel().getColumn(2).setPreferredWidth(40);\r\n\t\ttable.getColumnModel().getColumn(2).setMaxWidth(50);\r\n\t\ttable.getColumnModel().getColumn(3).setResizable(false);\r\n\t\ttable.getColumnModel().getColumn(3).setPreferredWidth(80);\r\n\t\ttable.getColumnModel().getColumn(3).setMaxWidth(80);\r\n\t\ttable.setEnabled(false);\r\n\r\n\t\ttable.setFont(new Font(\"Arial\", Font.PLAIN, 12));\r\n\t\ttable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);\r\n\t\ttableScrollPane = new JScrollPane(table);\r\n\t\ttableScrollPane.setBorder(null);\r\n\t\ttableScrollPane.setBackground(Color.WHITE);\r\n\t\ttableScrollPane.setPreferredSize(new Dimension(152, 200));\r\n\t\ttableContainer.add(tableScrollPane);\r\n\t}", "public int getSelectionSize();" ]
[ "0.55926996", "0.55829656", "0.5561993", "0.5559394", "0.5523282", "0.55046964", "0.548386", "0.5479016", "0.5449269", "0.5447728", "0.54377335", "0.54046655", "0.5383054", "0.53563464", "0.53544", "0.5347118", "0.5342737", "0.53385466", "0.5332949", "0.5320948", "0.5317224", "0.53164464", "0.5314069", "0.52919513", "0.52731556", "0.52630055", "0.52449334", "0.52425337", "0.52335584", "0.5209215", "0.52064145", "0.5185449", "0.5184747", "0.5177032", "0.5158277", "0.51578295", "0.51349694", "0.5134296", "0.51255286", "0.5123578", "0.51194084", "0.51193476", "0.5110459", "0.50961304", "0.50924927", "0.50915587", "0.5076448", "0.5075026", "0.50745636", "0.50657207", "0.50653595", "0.50616825", "0.50616825", "0.5048537", "0.5047372", "0.5038251", "0.503489", "0.50327694", "0.5028335", "0.5026937", "0.5022882", "0.5015406", "0.50038195", "0.4995776", "0.4993216", "0.499316", "0.4990819", "0.49888897", "0.49846455", "0.4978927", "0.49771062", "0.49722493", "0.4970317", "0.49699372", "0.49669713", "0.49651483", "0.49612126", "0.4954386", "0.4954155", "0.49520025", "0.4949029", "0.49475574", "0.49444383", "0.4936325", "0.49361527", "0.49337378", "0.49332985", "0.49319196", "0.49287036", "0.49282867", "0.49212813", "0.4920179", "0.49199918", "0.4919776", "0.49174908", "0.49125338", "0.49113205", "0.49088365", "0.490864", "0.49084774" ]
0.50174725
61
public Rectangle abstractSyntaxBox; public Rectangle treeConcreteSyntaxBox; public Rectangle staticSemanticsBox; public Rectangle checkerBox; public Rectangle interpreterBox; public Rectangle compilerBox;
public void apply(Point offset) { // abstractSyntaxFigure.setBounds(abstractSyntaxBox.getTranslated(offset)); // treeConcreteSyntaxFigure.setBounds(treeConcreteSyntaxBox.getTranslated(offset)); // staticSemanticsFigure.setBounds(staticSemanticsBox.getTranslated(offset)); // checkerFigure.setBounds(checkerBox.getTranslated(offset)); // interpreterFigure.setBounds(interpreterBox.getTranslated(offset)); // compilerFigure.setBounds(compilerBox.getTranslated(offset)); for(int i = 0; i < taskFigures.size(); i++){ taskFigures.get(i).setBounds(boxes.get(i).getTranslated(offset)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Box(){\n System.out.println(\"constructing box\");\n width = 10;\n height = 10;\n depth = 10;\n}", "void setBox();", "public abstract ModuleJiffyBoxes jiffyBoxes();", "public BoxNode() {\n initProperties();\n }", "public interface IBox {\r\n void process();\r\n void add(IBox box);\r\n void remove(IBox box);\r\n boolean isLeaf();\r\n}", "public Box()\n\t{\n\t\t\n\t\ttopLeftX = 50;\n\t\ttopLeftY = 50;\n\t\twidth = 50;\n\t\theight = 25;\n\t\t\n\t}", "Box(){\r\n Height = -1; // Used -1 to initiate an uninitialized Box. \r\n Width = -1;\r\n Depth = -1;\r\n }", "public Box()\n\t{\n\t\tsuper();\n\t}", "void checkTrees(Box tree);", "public static void main(String[]args) { \n Box box1 = new Box();\n box1.setHeight(4);\n box1.setLength(4);\n box1.setWidth(6);\n System.out.println(box1);\n/** part 12 call method */ \n Box box2 = new Box( 3, 4, 5);\n System.out.println(box2);\n/** part 16 call method */ \n Box box3 = new Box(5);\n System.out.println(box3);\n \n }", "protected LayoutData getLayoutData() {\n\r\n\t\t\tLayoutData data = new LayoutData();\r\n\r\n\t\t\t// boxes\r\n//\t\t\tint abstractSyntaxY = BOX_SPACING;\r\n//\t\t\tint treeConcreteSyntaxY = abstractSyntaxY +abstractSyntaxSize.height + BOX_SPACING;\r\n//\t\t\tSystem.out.println(\"abstractSyntaxSize.height = \"+abstractSyntaxSize.height);\r\n//\t\t\tint checkerY = treeConcreteSyntaxY +treeConcreteSyntaxSize.height + BOX_SPACING;\r\n//\t\t\tint staticSemanticsX = BOX_SPACING;\r\n//\t\t\tint abstractSyntaxX = BOX_SPACING;\r\n//\t\t\tint compilerX = BOX_SPACING;\r\n//\t\t\tint interpreterX = BOX_SPACING;\r\n//\t\t\tdata.abstractSyntaxBox = new Rectangle(abstractSyntaxX, abstractSyntaxY, abstractSyntaxSize.width, abstractSyntaxSize.height);\r\n//\t\t\tdata.treeConcreteSyntaxBox = new Rectangle(0, treeConcreteSyntaxY, treeConcreteSyntaxSize.width, treeConcreteSyntaxSize.height);\r\n//\t\t\tdata.staticSemanticsBox = new Rectangle(staticSemanticsX, treeConcreteSyntaxY, staticSemanticsSize.width, staticSemanticsSize.height);\r\n//\t\t\tdata.checkerBox = new Rectangle(staticSemanticsX + 30, checkerY, checkerSize.width, checkerSize.height);\r\n//\t\t\tdata.compilerBox = new Rectangle(compilerX, treeConcreteSyntaxY, compilerSize.width, compilerSize.height);\r\n//\t\t\tdata.interpreterBox = new Rectangle(interpreterX, treeConcreteSyntaxY, interpreterSize.width, interpreterSize.height);\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i<taskFigures.size(); i++){\r\n\t\t\t\tdata.boxes.add(new Rectangle(BOX_SPACING, BOX_SPACING + i*(60 + BOX_SPACING) ,taskFigures.get(i).getPreferredSize().width,taskFigures.get(i).getPreferredSize().height));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn data;\r\n\t\t}", "public Box() {}", "Box(double len){\r\n Height = Width = Depth = len;\r\n\r\n }", "public Rectangle getShape() \n\t{\n\t\treturn box;\n\t}", "Box()\n\t{\n\t\twidth = -1; //use -1 to indicate an uninitialized box\n\t\theight = -1;\n\t\tdepth = -1;\n\t\t\n\t\t\n\t}", "boolean getBox();", "public static void main(String[] args){ Rectangle box1 = new Rectangle(5,4);\n// System.out.println(box1.getArea());\n// System.out.println(box1.getPerimeter());\n//// Rectangle box2 = new Square(5);\n// System.out.println(box2.getArea());\n// System.out.println(box2.getPerimeter());\n//\n Measurable box1 = new Square(5);\n System.out.println(\"Square \" + box1.getPerimeter());\n System.out.println(\"Square \" + box1.getArea());\n box1 = new Rectangle(4,5);\n System.out.println(\"Rectangle \" + box1.getPerimeter());\n System.out.println(\"Rectangle \" + box1.getArea());\n }", "public BoundingBox()\n\t{\n\t\tcenter = new Vector2(0.0, 0.0);\n\t\twidth = 1.0;\n\t\theight = 1.0;\n\t}", "public String[] getConcreteSyntaxNodes ();", "@Override\r\n protected void computeBox ()\r\n {\r\n // Stem or similar info\r\n Rectangle newBox = new Rectangle(getTailLocation());\r\n newBox.add(getHeadLocation());\r\n\r\n // Each and every note\r\n for (TreeNode n : getNotes()) {\r\n Note note = (Note) n;\r\n\r\n newBox.add(note.getBox());\r\n }\r\n\r\n setBox(newBox);\r\n }", "void createRectangles();", "@Override\n\tpublic synchronized Rectangle displayBox() {\n return super.displayBox();\n }", "public static void main (String [] args){\n \n Box b1 = new Box(); //instantiates the first box object\n b1.setHeight(4); //sets height\n b1.setWidth(4); // sets width\n b1.setLength(6); //sets length\n \n System.out.println(b1.toString()); //displays mesurements\n \n Box b2 = new Box(3, 4, 5); // instantiates a box using the constructor method\n System.out.println(b2.toString()); // displays mesurements\n \n Box b3 = new Box(5); // instatiates a cube using the single parameter constructor\n System.out.println(b3); // displays mesurements\n \n }", "public void actionPerformed(ActionEvent a) {\n\n String command = a.getActionCommand();\n if (command.equals(\"e\")) {\n //Log toggle.\n if (consoleDisplayed = !consoleDisplayed) //Show\n splitter.setDividerLocation(defaultSliderPosition);\n else //Hide\n splitter.setDividerLocation(.999);\n } else if (command.equals(\"r\")) {\n //Gets the code into a string.\n String code = text.getText();\n\n //Marks certain areas as \"dirty\".\n //Dirty areas are places that shouldn't be considered for any keywords,\n //including \"import\", \"extend\", and so on.\n ArrayList<Integer> dirtyBounds = getDirty(code);\n\n //Not quite perfect all of the time.\n if (text.getText().contains(\"class\")) {\n //This is a bit more explicit\n //if(text.getText().trim().substring(0, text.getText().trim().indexOf(\"{\")).contains(\"class\")) {\n //This means we should try to compile this as normal.\n\n //Pulls out class name\n int firstPos = code.indexOf(\"class\");\n while(isDirty(dirtyBounds, firstPos)) \n firstPos = code.indexOf(\"class\", firstPos + 1);\n\n int secondPos = code.indexOf(\"{\"); //No checks here because who would possibly put a comment between \"class\" and \"{\"?\n String name = code.substring(firstPos + \"class\".length() + 1, secondPos).trim();\n\n //Just a safety check to make sure you don't try to modify this program while it's running.\n if (name.equals(\"Playground\")) {\n System.out.println(\"I know what you're doing and I don't approve. I won't even compile that.\");\n return;\n //println(\"Self-compiling. You were warned.\", warning); //Allowed users to bootstrap this program. October 26, 2014\n }\n\n compileAndRun(name, code);\n } else {\n //This means we should compile this as a playground.\n\n //TODO: Try to assign every line to a variable, and print it out if it's by itself. IE, saying \"int i = 0\" won't do anything,\n //but then just typing \"i\" or \"i;\" would print out \"0\". Add support for functions, too. So \"factorial(5)\" by itself would \n //print out \"120\" without any fluff.\n\n //TODO: Lazy typing. \"int i = 0\" should be equivilant to \"i = 0\"\n\n //TODO: Less need for casting. If \"int.toString()\" is called, modify in-place to \"(new Integer(int)).toString()\"\n //Similar for calls that need Strings but are passed primitives; \"promote\" them by prepending \"\"+ to them.\n\n //Common import statements built-in\n String importDump = new String();\n importDump+=(\"import java.util.*;\\n\" + \n \"import javax.swing.*;\\n\" + \n \"import javax.swing.event.*;\\n\" +\n \"import java.awt.*;\\n\" + \n \"import java.awt.event.*;\\n\" + \n \"import java.io.*;\\n\");\n\n //User-defined or auto-generated methods\n String methodDump = new String();\n\n //Pulls out any \"import\" statements and appends them to the import dump.\n int i = code.indexOf(\"import\");\n while(i >= 0) {\n //Ignores comments and string literals\n if (isDirty(dirtyBounds, i)) {\n i = code.indexOf(\"import\", i+1);\n continue;\n }\n\n String s = code.substring(i, code.indexOf(\";\", i) + 1); \n //System.out.println(\"Found import: \" + s);\n code = code.replaceFirst(s, \"\");\n importDump+=s+\"\\n\";\n i = code.indexOf(\"import\", i+1);\n }\n\n //Pulls out all methods\n i = code.indexOf(\"(\");\n while(i >= 0) {\n if (isDirty(dirtyBounds,i)) {\n i = code.indexOf(\"(\", i+1); continue;\n }\n\n //Move backwards first\n char temp = 0; int pos = i;\n boolean shouldSkip = false;\n while(--pos > 0) {\n temp = code.charAt(pos);\n if (temp == '.') {shouldSkip = true; break;} //This is a method call, ie String.charAt();\n if (temp == ';') {++pos; break;} //This is most likely a method declaration, since we had no errors\n //If we hit the start of the file, that's probable a method dec. too!\n }\n\n String sub = code.substring(pos, i);\n if (shouldSkip || isDirty(dirtyBounds, pos) || \n sub.contains(\"while\") || sub.contains(\"for\") || sub.contains(\"new\") || sub.contains(\"try\") || sub.contains(\"catch\")) \n {i=code.indexOf(\"(\", i+1); continue;} //If this def. isn't a method or it's in a comment\n\n int start = pos;\n temp = 0; pos = code.indexOf(\"{\", i+1);\n int count = 1; shouldSkip = false;\n if(pos != -1) {\n if (code.indexOf(\";\", i+1) > pos || code.indexOf(\";\", i+1) == -1) {\n while(++pos < code.length()) {\n if (count == 0) \n break;\n\n temp = code.charAt(pos);\n if (temp == '{') \n count++;\n if (temp == '}') \n count--;\n }\n } else {\n //If there's a semicolon between the opening paranthesis and opening curly brace, this isn't a method!\n i = code.indexOf(\"(\", i+1);\n continue;\n }\n } else {\n i = code.indexOf(\"(\", i+1);\n continue;\n }\n\n int end = pos;\n String s = code.substring(start,end);\n code = code.replace(s, \"\"); \n\n //Just to make it look nicer\n s = s.trim();\n\n //println(\"Found method: \" + s);\n\n //This makes using the method intuitive by effectively removing the need for static modifiers\n if (!s.substring(0,s.indexOf(\"(\")).contains(\"static\")) {\n s = \"static \" + s;\n //println(\"Silently adding 'static' modifier\", warning);\n }\n\n methodDump+=(s + \"\\n\");\n i = code.indexOf(\"(\", i+1);\n }\n\n //Inject the class header and main method, imports, and methods\n code = \"//User and auto-imports pre-defined\\n\"\n + importDump\n + \"//Autogenerated class\\n\"\n + \"public class Main {\\n\" \n + \"public static void main(String[] args) {\\n\"\n + code\n + \"\\n}\\n\"\n + methodDump \n + \"}\";\n\n //Run as normal\n compileAndRun(\"Main\", code);\n }\n } else if (command.equals(\"k\")) {\n kill(); \n } else if (command.equals(\"o\")) {\n of = new OptionFrame(frame);\n } else if (command.equals(\"/\")) {\n hf = new HelpFrame(frame);\n }\n }", "public DrawGraphics() {\r\n box = new BouncingBox(200, 50, Color.RED);\r\n\tbox.setMovementVector(1,1);\r\n\r\n\tboxes = new ArrayList<BouncingBox>();\r\n\tboxes.add(new BouncingBox(35,40, Color.BLUE));\r\n\tboxes.get(0).setMovementVector(2,-1);\r\n\tboxes.add(new BouncingBox(120,80, Color.GREEN));\r\n\tboxes.get(1).setMovementVector(-1,2);\r\n\tboxes.add(new BouncingBox(500,80, Color.PINK));\r\n\tboxes.get(2).setMovementVector(-2,-2);\r\n }", "Box(double w, double h, double d) {\n\n widgh =w;\n height =h;\n depth =d;\n\n}", "interface Literals\n {\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.ModelImpl <em>Model</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.ModelImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getModel()\n * @generated\n */\n EClass MODEL = eINSTANCE.getModel();\n\n /**\n * The meta object literal for the '<em><b>Mathexpression</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference MODEL__MATHEXPRESSION = eINSTANCE.getModel_Mathexpression();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.MathExpressionImpl <em>Math Expression</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.MathExpressionImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getMathExpression()\n * @generated\n */\n EClass MATH_EXPRESSION = eINSTANCE.getMathExpression();\n\n /**\n * The meta object literal for the '<em><b>Description</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute MATH_EXPRESSION__DESCRIPTION = eINSTANCE.getMathExpression_Description();\n\n /**\n * The meta object literal for the '<em><b>Expression</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference MATH_EXPRESSION__EXPRESSION = eINSTANCE.getMathExpression_Expression();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.FunctionImpl <em>Function</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.FunctionImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getFunction()\n * @generated\n */\n EClass FUNCTION = eINSTANCE.getFunction();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.DefineExprImpl <em>Define Expr</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.DefineExprImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getDefineExpr()\n * @generated\n */\n EClass DEFINE_EXPR = eINSTANCE.getDefineExpr();\n\n /**\n * The meta object literal for the '<em><b>Variables</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference DEFINE_EXPR__VARIABLES = eINSTANCE.getDefineExpr_Variables();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.VariableImpl <em>Variable</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.VariableImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getVariable()\n * @generated\n */\n EClass VARIABLE = eINSTANCE.getVariable();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute VARIABLE__NAME = eINSTANCE.getVariable_Name();\n\n /**\n * The meta object literal for the '<em><b>Expression</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference VARIABLE__EXPRESSION = eINSTANCE.getVariable_Expression();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.ExternalImpl <em>External</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.ExternalImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getExternal()\n * @generated\n */\n EClass EXTERNAL = eINSTANCE.getExternal();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute EXTERNAL__NAME = eINSTANCE.getExternal_Name();\n\n /**\n * The meta object literal for the '<em><b>Arguments</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference EXTERNAL__ARGUMENTS = eINSTANCE.getExternal_Arguments();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.PMExpressionImpl <em>PM Expression</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.PMExpressionImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getPMExpression()\n * @generated\n */\n EClass PM_EXPRESSION = eINSTANCE.getPMExpression();\n\n /**\n * The meta object literal for the '<em><b>Left</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference PM_EXPRESSION__LEFT = eINSTANCE.getPMExpression_Left();\n\n /**\n * The meta object literal for the '<em><b>Operator</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference PM_EXPRESSION__OPERATOR = eINSTANCE.getPMExpression_Operator();\n\n /**\n * The meta object literal for the '<em><b>Right</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference PM_EXPRESSION__RIGHT = eINSTANCE.getPMExpression_Right();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.MDExpressionImpl <em>MD Expression</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.MDExpressionImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getMDExpression()\n * @generated\n */\n EClass MD_EXPRESSION = eINSTANCE.getMDExpression();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.PowExpressionImpl <em>Pow Expression</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.PowExpressionImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getPowExpression()\n * @generated\n */\n EClass POW_EXPRESSION = eINSTANCE.getPowExpression();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.PowerImpl <em>Power</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.PowerImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getPower()\n * @generated\n */\n EClass POWER = eINSTANCE.getPower();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.PlusMinusImpl <em>Plus Minus</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.PlusMinusImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getPlusMinus()\n * @generated\n */\n EClass PLUS_MINUS = eINSTANCE.getPlusMinus();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.MultiplyDivideImpl <em>Multiply Divide</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.MultiplyDivideImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getMultiplyDivide()\n * @generated\n */\n EClass MULTIPLY_DIVIDE = eINSTANCE.getMultiplyDivide();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.PrimaryImpl <em>Primary</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.PrimaryImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getPrimary()\n * @generated\n */\n EClass PRIMARY = eINSTANCE.getPrimary();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.VariableNameImpl <em>Variable Name</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.VariableNameImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getVariableName()\n * @generated\n */\n EClass VARIABLE_NAME = eINSTANCE.getVariableName();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute VARIABLE_NAME__NAME = eINSTANCE.getVariableName_Name();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.NumberImpl <em>Number</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.NumberImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getNumber()\n * @generated\n */\n EClass NUMBER = eINSTANCE.getNumber();\n\n /**\n * The meta object literal for the '<em><b>Value</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NUMBER__VALUE = eINSTANCE.getNumber_Value();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.PositiveImpl <em>Positive</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.PositiveImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getPositive()\n * @generated\n */\n EClass POSITIVE = eINSTANCE.getPositive();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.NegativeImpl <em>Negative</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.NegativeImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getNegative()\n * @generated\n */\n EClass NEGATIVE = eINSTANCE.getNegative();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.PMParenthesisImpl <em>PM Parenthesis</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.PMParenthesisImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getPMParenthesis()\n * @generated\n */\n EClass PM_PARENTHESIS = eINSTANCE.getPMParenthesis();\n\n /**\n * The meta object literal for the '<em><b>Expression</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference PM_PARENTHESIS__EXPRESSION = eINSTANCE.getPMParenthesis_Expression();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.DefParenthesisImpl <em>Def Parenthesis</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.DefParenthesisImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getDefParenthesis()\n * @generated\n */\n EClass DEF_PARENTHESIS = eINSTANCE.getDefParenthesis();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.PowImpl <em>Pow</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.PowImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getPow()\n * @generated\n */\n EClass POW = eINSTANCE.getPow();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.PlusImpl <em>Plus</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.PlusImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getPlus()\n * @generated\n */\n EClass PLUS = eINSTANCE.getPlus();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.MinusImpl <em>Minus</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.MinusImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getMinus()\n * @generated\n */\n EClass MINUS = eINSTANCE.getMinus();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.MultiplyImpl <em>Multiply</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.MultiplyImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getMultiply()\n * @generated\n */\n EClass MULTIPLY = eINSTANCE.getMultiply();\n\n /**\n * The meta object literal for the '{@link org.xtext.assingment2.mathinterpreter.impl.DivideImpl <em>Divide</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.assingment2.mathinterpreter.impl.DivideImpl\n * @see org.xtext.assingment2.mathinterpreter.impl.MathinterpreterPackageImpl#getDivide()\n * @generated\n */\n EClass DIVIDE = eINSTANCE.getDivide();\n\n }", "public void constructDrawing(){\r\n\r\n resetToEmpty(); // should be empty anyway\r\n\r\n// universe=TFormula.atomicTermsInListOfFormulas(fInterpretation);\r\n \r\n Set <String> universeStrSet=TFormula.atomicTermsInListOfFormulas(fInterpretation);\r\n \r\n universe=\"\";\r\n \r\n for (Iterator i=universeStrSet.iterator();i.hasNext();)\r\n \tuniverse+=i.next();\r\n \r\n\r\n findPropertyExtensions();\r\n\r\n findRelationsExtensions();\r\n\r\n determineLines();\r\n\r\n createProperties();\r\n\r\n createIndividuals();\r\n\r\n createRelations();\r\n\r\n deselect(); //all shapes are created selected\r\n\r\n\r\n fPalette.check(); // some of the names may need updating\r\n\r\n repaint();\r\n\r\n}", "public CGrammar getGrammarStructure();", "private void createComponentBox() {\r\n\t\tthis.componentBox = new Vector<String>();\r\n\t\tthis.componentBox.add(\"Sword\");\r\n\t\tthis.componentBox.add(\"Two-handed Sword\");\r\n\t\tthis.componentBox.add(\"Staff\");\r\n\t\tthis.componentBox.add(\"Axe\");\r\n\t\tthis.componentBox.add(\"Hammer\");\r\n\t\tthis.componentBox.add(\"Bow\");\r\n\t\tthis.componentBox.add(\"Crossbow\");\r\n\t\tthis.componentBox.add(\"Wand\");\r\n\t\tthis.componentBox.add(\"Spear\");\r\n\t\tthis.componentBox.add(\"Bottle\");\r\n\t}", "public Box(int x, int y)\n {\n initClassVBox();\n initVariablesVBox();\n initMethodsVBox();\n initLineConnectors();\n mainVBox = new VBox(classVBox, variablesVBox, methodsVBox);\n mainVBox.setTranslateX(x);\n mainVBox.setTranslateY(y);\n }", "public interface langBConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int BREAK = 12;\n /** RegularExpression Id. */\n int CLASS = 13;\n /** RegularExpression Id. */\n int CONSTRUCTOR = 14;\n /** RegularExpression Id. */\n int ELSE = 15;\n /** RegularExpression Id. */\n int EXTENDS = 16;\n /** RegularExpression Id. */\n int FOR = 17;\n /** RegularExpression Id. */\n int IF = 18;\n /** RegularExpression Id. */\n int THEN = 19;\n /** RegularExpression Id. */\n int INT = 20;\n /** RegularExpression Id. */\n int NEW = 21;\n /** RegularExpression Id. */\n int PRINT = 22;\n /** RegularExpression Id. */\n int READ = 23;\n /** RegularExpression Id. */\n int RETURN = 24;\n /** RegularExpression Id. */\n int STRING = 25;\n /** RegularExpression Id. */\n int SUPER = 26;\n /** RegularExpression Id. */\n int BOOLEAN = 27;\n /** RegularExpression Id. */\n int TRUE = 28;\n /** RegularExpression Id. */\n int FALSE = 29;\n /** RegularExpression Id. */\n int WHILE = 30;\n /** RegularExpression Id. */\n int SWITCH = 31;\n /** RegularExpression Id. */\n int CASE = 32;\n /** RegularExpression Id. */\n int int_constant = 33;\n /** RegularExpression Id. */\n int string_constant = 34;\n /** RegularExpression Id. */\n int null_constant = 35;\n /** RegularExpression Id. */\n int IDENT = 36;\n /** RegularExpression Id. */\n int LETTER = 37;\n /** RegularExpression Id. */\n int DIGIT = 38;\n /** RegularExpression Id. */\n int UNDERSCORE = 39;\n /** RegularExpression Id. */\n int LPAREN = 40;\n /** RegularExpression Id. */\n int RPAREN = 41;\n /** RegularExpression Id. */\n int LBRACE = 42;\n /** RegularExpression Id. */\n int RBRACE = 43;\n /** RegularExpression Id. */\n int LBRACKET = 44;\n /** RegularExpression Id. */\n int RBRACKET = 45;\n /** RegularExpression Id. */\n int SEMICOLON = 46;\n /** RegularExpression Id. */\n int COMMA = 47;\n /** RegularExpression Id. */\n int DOT = 48;\n /** RegularExpression Id. */\n int DDOT = 49;\n /** RegularExpression Id. */\n int QUESTIONMARK = 50;\n /** RegularExpression Id. */\n int ASSIGN = 51;\n /** RegularExpression Id. */\n int GT = 52;\n /** RegularExpression Id. */\n int LT = 53;\n /** RegularExpression Id. */\n int EQ = 54;\n /** RegularExpression Id. */\n int LE = 55;\n /** RegularExpression Id. */\n int GE = 56;\n /** RegularExpression Id. */\n int NEQ = 57;\n /** RegularExpression Id. */\n int PLUS = 58;\n /** RegularExpression Id. */\n int MINUS = 59;\n /** RegularExpression Id. */\n int STAR = 60;\n /** RegularExpression Id. */\n int SLASH = 61;\n /** RegularExpression Id. */\n int REM = 62;\n /** RegularExpression Id. */\n int OR = 63;\n /** RegularExpression Id. */\n int AND = 64;\n /** RegularExpression Id. */\n int INVALID_LEXICAL = 65;\n /** RegularExpression Id. */\n int INVALID_CONST = 66;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int multilinecomment = 1;\n /** Lexical state. */\n int singlelinecomment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"/*\\\"\",\n \"\\\"//\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 9>\",\n \"<token of kind 10>\",\n \"<token of kind 11>\",\n \"\\\"parar\\\"\",\n \"\\\"classe\\\"\",\n \"\\\"construtor\\\"\",\n \"\\\"senao\\\"\",\n \"\\\"herda\\\"\",\n \"\\\"para\\\"\",\n \"\\\"se\\\"\",\n \"\\\"entao\\\"\",\n \"\\\"inteiro\\\"\",\n \"\\\"novo\\\"\",\n \"\\\"imprimir\\\"\",\n \"\\\"ler\\\"\",\n \"\\\"retornar\\\"\",\n \"\\\"texto\\\"\",\n \"\\\"super\\\"\",\n \"\\\"cara_coroa\\\"\",\n \"\\\"cara\\\"\",\n \"\\\"coroa\\\"\",\n \"\\\"enquanto\\\"\",\n \"\\\"trocar\\\"\",\n \"\\\"caso\\\"\",\n \"<int_constant>\",\n \"<string_constant>\",\n \"\\\"nulo\\\"\",\n \"<IDENT>\",\n \"<LETTER>\",\n \"<DIGIT>\",\n \"<UNDERSCORE>\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\":\\\"\",\n \"\\\"?\\\"\",\n \"\\\"=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\"==\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"<INVALID_LEXICAL>\",\n \"<INVALID_CONST>\",\n };\n\n}", "public AreaOfRectangleGUI() {\n initComponents();\n }", "public Rectangle () {\n\t\t\n\t}", "private BioMightBoundBox setupDefaultBoundBox(String parentID) \r\n\t{\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\t\r\n\t\t\r\n\t\t//**********************************************************************\r\n\t\t// ARMS BOUND BOX\t\t\r\n\t\t//\r\n\t\t// Set up the Bounding Box for the Arms\r\n\t\t// For default model, length of arms is 4.5\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-15.0);\r\n\t\tzPos= new BigDecimal(-5.0);\r\n\t\r\n\t\txVector= new BigDecimal(11.5);\r\n\t\tyVector= new BigDecimal(6.0); \r\n\t\tzVector= new BigDecimal(5.0);\r\n\t\t\r\n\t\t// Setup the boundbox\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\t// Set up its connectors\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t//********************************************\r\n\t\t// ARM - ORGAN CONNECTORS\r\n\t\t//********************************************\r\n\t\r\n\t\t// EpitheliumTissue Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\r\n\t\t//********************************************\t\r\n\t\t// ARMS - VASCULAR CONNECTORS \r\n\t\t//********************************************\r\n\t\r\n\t\t// InternalCarotidArteryEpithelium\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"InternalCarotidArteryEpithelium\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"InternalCarotidArteryEpithelium\", bioMightConnector);\r\n\t\r\n\t\t// ExternalCarotidArteryEpithelium \r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"ExternalCarotidArteryEpithelium\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"ExternalCarotidArteryEpithelium\", bioMightConnector);\r\n\t\r\n\t\t//********************************************\r\n\t\t// ARMS - MUSCULAR CONNECTORS\r\n\t\t//********************************************\r\n\r\n\t\r\n\t\t//********************************************\r\n\t\t// ARMS - SKELETAL CONNECTORS\r\n\t\t//********************************************\r\n\r\n\t\t// ThoracicVertebrae T6 \r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"CervicalVertebrae\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"CervicalVertebrae\", bioMightConnector);\r\n\t\t\r\n\t\t\r\n\t\t// Stuff the Connectors into the Bounding Box \r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\treturn (bioBoundBox);\t\r\n\t}", "public abstract JClass boxify();", "@Override\n\tpublic String getShape() {\n\t\treturn \"Rectangle\";\n\t}", "public Rectangle2D getBox(\n )\n {return box;}", "public interface LuaTokenTypes extends LuaDocElementTypes {\n //IFileElementType FILE = new IFileElementType(Language.findInstance(LuaLanguage.class));\n /**\n * Wrong token. Use for debugger needs\n */\n IElementType WRONG = TokenType.BAD_CHARACTER;\n\n\n /* **************************************************************************************************\n * Whitespaces & NewLines\n * ****************************************************************************************************/\n\n IElementType NL_BEFORE_LONGSTRING = new LuaElementType(\"newline after longstring stert bracket\");\n IElementType WS = TokenType.WHITE_SPACE;\n IElementType NEWLINE = new LuaElementType(\"new line\");\n\n TokenSet WHITE_SPACES_SET = TokenSet.create(WS, NEWLINE, TokenType.WHITE_SPACE, LDOC_WHITESPACE, NL_BEFORE_LONGSTRING);\n\n /* **************************************************************************************************\n * Comments\n * ****************************************************************************************************/\n\n IElementType SHEBANG = new LuaElementType(\"shebang - should ignore\");\n\n IElementType LONGCOMMENT = new LuaElementType(\"long comment\");\n IElementType SHORTCOMMENT = new LuaElementType(\"short comment\");\n\n IElementType LONGCOMMENT_BEGIN = new LuaElementType(\"long comment start bracket\");\n IElementType LONGCOMMENT_END = new LuaElementType(\"long comment end bracket\");\n\n TokenSet COMMENT_SET = TokenSet.create(SHORTCOMMENT, LONGCOMMENT, SHEBANG, LUADOC_COMMENT, LONGCOMMENT_BEGIN,\n LONGCOMMENT_END);\n\n TokenSet COMMENT_AND_WHITESPACE_SET = TokenSet.orSet(COMMENT_SET, WHITE_SPACES_SET);\n /* **************************************************************************************************\n * Identifiers\n * ****************************************************************************************************/\n\n IElementType NAME = new LuaElementType(\"identifier\");\n\n /* **************************************************************************************************\n * Integers & floats\n * ****************************************************************************************************/\n\n IElementType NUMBER = new LuaElementType(\"number\");\n\n /* **************************************************************************************************\n * Strings & regular expressions\n * ****************************************************************************************************/\n\n IElementType STRING = new LuaElementType(\"string\");\n IElementType LONGSTRING = new LuaElementType(\"long string\");\n\n IElementType LONGSTRING_BEGIN = new LuaElementType(\"long string start bracket\");\n IElementType LONGSTRING_END = new LuaElementType(\"long string end bracket\");\n\n\n\n TokenSet STRING_LITERAL_SET = TokenSet.create(STRING, LONGSTRING, LONGSTRING_BEGIN, LONGSTRING_END);\n\n\n IElementType UNTERMINATED_STRING = new LuaElementType(\"unterminated string\");\n\n\n /* **************************************************************************************************\n * Common tokens: operators, braces etc.\n * ****************************************************************************************************/\n\n\n IElementType DIV = new LuaElementType(\"/\");\n IElementType MULT = new LuaElementType(\"*\");\n IElementType LPAREN = new LuaElementType(\"(\");\n IElementType RPAREN = new LuaElementType(\")\");\n IElementType LBRACK = new LuaElementType(\"[\");\n IElementType RBRACK = new LuaElementType(\"]\");\n IElementType LCURLY = new LuaElementType(\"{\");\n IElementType RCURLY = new LuaElementType(\"}\");\n IElementType COLON = new LuaElementType(\":\");\n IElementType COMMA = new LuaElementType(\",\");\n IElementType DOT = new LuaElementType(\".\");\n IElementType ASSIGN = new LuaElementType(\"=\");\n IElementType SEMI = new LuaElementType(\";\");\n IElementType EQ = new LuaElementType(\"==\");\n IElementType NE = new LuaElementType(\"~=\");\n IElementType PLUS = new LuaElementType(\"+\");\n IElementType MINUS = new LuaElementType(\"-\");\n IElementType GE = new LuaElementType(\">=\");\n IElementType GT = new LuaElementType(\">\");\n IElementType EXP = new LuaElementType(\"^\");\n IElementType LE = new LuaElementType(\"<=\");\n IElementType LT = new LuaElementType(\"<\");\n IElementType ELLIPSIS = new LuaElementType(\"...\");\n IElementType CONCAT = new LuaElementType(\"..\");\n IElementType GETN = new LuaElementType(\"#\");\n IElementType MOD = new LuaElementType(\"%\");\n\n /* **************************************************************************************************\n * Keywords\n * ****************************************************************************************************/\n\n\n IElementType IF = new LuaElementType(\"if\");\n IElementType ELSE = new LuaElementType(\"else\");\n IElementType ELSEIF = new LuaElementType(\"elseif\");\n IElementType WHILE = new LuaElementType(\"while\");\n IElementType WITH = new LuaElementType(\"with\");\n\n IElementType THEN = new LuaElementType(\"then\");\n IElementType FOR = new LuaElementType(\"for\");\n IElementType IN = new LuaElementType(\"in\");\n IElementType RETURN = new LuaElementType(\"return\");\n IElementType BREAK = new LuaElementType(\"break\");\n\n IElementType CONTINUE = new LuaElementType(\"continue\");\n IElementType TRUE = new LuaElementType(\"true\");\n IElementType FALSE = new LuaElementType(\"false\");\n IElementType NIL = new LuaElementType(\"nil\");\n IElementType FUNCTION = new LuaElementType(\"function\");\n\n IElementType DO = new LuaElementType(\"do\");\n IElementType NOT = new LuaElementType(\"not\");\n IElementType AND = new LuaElementType(\"and\");\n IElementType OR = new LuaElementType(\"or\");\n IElementType LOCAL = new LuaElementType(\"local\");\n\n IElementType REPEAT = new LuaElementType(\"repeat\");\n IElementType UNTIL = new LuaElementType(\"until\");\n IElementType END = new LuaElementType(\"end\");\n\n /*\n IElementType MODULE = new LuaElementType(\"module\");\n IElementType REQUIRE = new LuaElementType(\"require\");\n */\n\n\n\n TokenSet KEYWORDS = TokenSet.create(DO, FUNCTION, NOT, AND, OR,\n WITH, IF, THEN, ELSEIF, THEN, ELSE,\n WHILE, FOR, IN, RETURN, BREAK,\n CONTINUE, LOCAL,\n REPEAT, UNTIL, END/*, MODULE, REQUIRE */);\n\n TokenSet BRACES = TokenSet.create(LCURLY, RCURLY);\n TokenSet PARENS = TokenSet.create(LPAREN, RPAREN);\n TokenSet BRACKS = TokenSet.create(LBRACK, RBRACK);\n\n TokenSet BAD_INPUT = TokenSet.create(WRONG, UNTERMINATED_STRING);\n \n TokenSet DEFINED_CONSTANTS = TokenSet.create(NIL, TRUE, FALSE);\n\n TokenSet UNARY_OP_SET = TokenSet.create(MINUS, GETN);\n\n TokenSet BINARY_OP_SET = TokenSet.create(\n MINUS, PLUS, DIV, MULT, EXP, MOD,\n CONCAT);\n\n TokenSet BLOCK_OPEN_SET = TokenSet.create(THEN, RPAREN, DO, ELSE, ELSEIF);\n TokenSet BLOCK_CLOSE_SET = TokenSet.create(END, ELSE, ELSEIF, UNTIL);\n\n TokenSet COMPARE_OPS = TokenSet.create(EQ, GE, GT, LT, LE, NE);\n TokenSet LOGICAL_OPS = TokenSet.create(AND, OR, NOT);\n TokenSet ARITHMETIC_OPS = TokenSet.create(MINUS, PLUS, DIV, EXP, MOD);\n\n TokenSet TABLE_ACCESS = TokenSet.create(DOT, COLON, LBRACK);\n\n TokenSet LITERALS_SET = TokenSet.create(NUMBER, NIL, TRUE, FALSE, STRING, LONGSTRING, LONGSTRING_BEGIN, LONGSTRING_END);\n\n TokenSet IDENTIFIERS_SET = TokenSet.create(NAME);\n\n TokenSet WHITE_SPACES_OR_COMMENTS = TokenSet.orSet(WHITE_SPACES_SET, COMMENT_SET);\n\n TokenSet OPERATORS_SET = TokenSet.orSet(BINARY_OP_SET, UNARY_OP_SET, COMPARE_OPS, TokenSet.create(ASSIGN));\n}", "public void createRuleOverview() {\n\t\tmainBox.setBorder(BorderFactory.createLineBorder(Color.black));\n\t\tmainBox.add(nameBox);\n\t\tmainBox.add(inputBox);\n\t\tmainBox.add(outputBox);\n\t}", "interface Literals\n {\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.DocumentoImpl <em>Documento</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.DocumentoImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getDocumento()\n * @generated\n */\n EClass DOCUMENTO = eINSTANCE.getDocumento();\n\n /**\n * The meta object literal for the '<em><b>Path Modelo</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute DOCUMENTO__PATH_MODELO = eINSTANCE.getDocumento_PathModelo();\n\n /**\n * The meta object literal for the '<em><b>Path Ocl</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute DOCUMENTO__PATH_OCL = eINSTANCE.getDocumento_PathOcl();\n\n /**\n * The meta object literal for the '<em><b>Oraciones</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference DOCUMENTO__ORACIONES = eINSTANCE.getDocumento_Oraciones();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.OracionImpl <em>Oracion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.OracionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getOracion()\n * @generated\n */\n EClass ORACION = eINSTANCE.getOracion();\n\n /**\n * The meta object literal for the '<em><b>Contenido</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ORACION__CONTENIDO = eINSTANCE.getOracion_Contenido();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.SimpleImpl <em>Simple</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.SimpleImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getSimple()\n * @generated\n */\n EClass SIMPLE = eINSTANCE.getSimple();\n\n /**\n * The meta object literal for the '<em><b>Determinante</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__DETERMINANTE = eINSTANCE.getSimple_Determinante();\n\n /**\n * The meta object literal for the '<em><b>Atributo</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__ATRIBUTO = eINSTANCE.getSimple_Atributo();\n\n /**\n * The meta object literal for the '<em><b>Sintagma</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__SINTAGMA = eINSTANCE.getSimple_Sintagma();\n\n /**\n * The meta object literal for the '<em><b>Contexto</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__CONTEXTO = eINSTANCE.getSimple_Contexto();\n\n /**\n * The meta object literal for the '<em><b>Obligacion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__OBLIGACION = eINSTANCE.getSimple_Obligacion();\n\n /**\n * The meta object literal for the '<em><b>Operacion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__OPERACION = eINSTANCE.getSimple_Operacion();\n\n /**\n * The meta object literal for the '<em><b>Literal</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SIMPLE__LITERAL = eINSTANCE.getSimple_Literal();\n\n /**\n * The meta object literal for the '<em><b>Fin Oracion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SIMPLE__FIN_ORACION = eINSTANCE.getSimple_FinOracion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.DeterminanteImpl <em>Determinante</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.DeterminanteImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getDeterminante()\n * @generated\n */\n EClass DETERMINANTE = eINSTANCE.getDeterminante();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute DETERMINANTE__DESCRIPCION = eINSTANCE.getDeterminante_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.AtributoImpl <em>Atributo</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.AtributoImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getAtributo()\n * @generated\n */\n EClass ATRIBUTO = eINSTANCE.getAtributo();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute ATRIBUTO__NAME = eINSTANCE.getAtributo_Name();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.SintagmaPreposicionalImpl <em>Sintagma Preposicional</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.SintagmaPreposicionalImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getSintagmaPreposicional()\n * @generated\n */\n EClass SINTAGMA_PREPOSICIONAL = eINSTANCE.getSintagmaPreposicional();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SINTAGMA_PREPOSICIONAL__DESCRIPCION = eINSTANCE.getSintagmaPreposicional_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ObligacionImpl <em>Obligacion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ObligacionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getObligacion()\n * @generated\n */\n EClass OBLIGACION = eINSTANCE.getObligacion();\n\n /**\n * The meta object literal for the '<em><b>Negacion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OBLIGACION__NEGACION = eINSTANCE.getObligacion_Negacion();\n\n /**\n * The meta object literal for the '<em><b>Obligacion Deber</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OBLIGACION__OBLIGACION_DEBER = eINSTANCE.getObligacion_ObligacionDeber();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ObligacionDeberImpl <em>Obligacion Deber</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ObligacionDeberImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getObligacionDeber()\n * @generated\n */\n EClass OBLIGACION_DEBER = eINSTANCE.getObligacionDeber();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute OBLIGACION_DEBER__DESCRIPCION = eINSTANCE.getObligacionDeber_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.NegacionImpl <em>Negacion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.NegacionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getNegacion()\n * @generated\n */\n EClass NEGACION = eINSTANCE.getNegacion();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NEGACION__DESCRIPCION = eINSTANCE.getNegacion_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.OperacionImpl <em>Operacion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.OperacionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getOperacion()\n * @generated\n */\n EClass OPERACION = eINSTANCE.getOperacion();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute OPERACION__DESCRIPCION = eINSTANCE.getOperacion_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ClaseImpl <em>Clase</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ClaseImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getClase()\n * @generated\n */\n EClass CLASE = eINSTANCE.getClase();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CLASE__NAME = eINSTANCE.getClase_Name();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.CompuestaImpl <em>Compuesta</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.CompuestaImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getCompuesta()\n * @generated\n */\n EClass COMPUESTA = eINSTANCE.getCompuesta();\n\n /**\n * The meta object literal for the '<em><b>Simple Inicial</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPUESTA__SIMPLE_INICIAL = eINSTANCE.getCompuesta_SimpleInicial();\n\n /**\n * The meta object literal for the '<em><b>Nexo</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPUESTA__NEXO = eINSTANCE.getCompuesta_Nexo();\n\n /**\n * The meta object literal for the '<em><b>Simple Final</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPUESTA__SIMPLE_FINAL = eINSTANCE.getCompuesta_SimpleFinal();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.NexoImpl <em>Nexo</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.NexoImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getNexo()\n * @generated\n */\n EClass NEXO = eINSTANCE.getNexo();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NEXO__DESCRIPCION = eINSTANCE.getNexo_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ComplejaImpl <em>Compleja</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ComplejaImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getCompleja()\n * @generated\n */\n EClass COMPLEJA = eINSTANCE.getCompleja();\n\n /**\n * The meta object literal for the '<em><b>Determinante</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__DETERMINANTE = eINSTANCE.getCompleja_Determinante();\n\n /**\n * The meta object literal for the '<em><b>Atr</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR = eINSTANCE.getCompleja_Atr();\n\n /**\n * The meta object literal for the '<em><b>Sintagma</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__SINTAGMA = eINSTANCE.getCompleja_Sintagma();\n\n /**\n * The meta object literal for the '<em><b>Contexto</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONTEXTO = eINSTANCE.getCompleja_Contexto();\n\n /**\n * The meta object literal for the '<em><b>Conect</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONECT = eINSTANCE.getCompleja_Conect();\n\n /**\n * The meta object literal for the '<em><b>Operacion Coleccion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPERACION_COLECCION = eINSTANCE.getCompleja_OperacionColeccion();\n\n /**\n * The meta object literal for the '<em><b>Determinante1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__DETERMINANTE1 = eINSTANCE.getCompleja_Determinante1();\n\n /**\n * The meta object literal for the '<em><b>Clase</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CLASE = eINSTANCE.getCompleja_Clase();\n\n /**\n * The meta object literal for the '<em><b>Conect1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONECT1 = eINSTANCE.getCompleja_Conect1();\n\n /**\n * The meta object literal for the '<em><b>Atr1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR1 = eINSTANCE.getCompleja_Atr1();\n\n /**\n * The meta object literal for the '<em><b>Ope3</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE3 = eINSTANCE.getCompleja_Ope3();\n\n /**\n * The meta object literal for the '<em><b>Lit1</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__LIT1 = eINSTANCE.getCompleja_Lit1();\n\n /**\n * The meta object literal for the '<em><b>Atr2</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR2 = eINSTANCE.getCompleja_Atr2();\n\n /**\n * The meta object literal for the '<em><b>Ope4</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE4 = eINSTANCE.getCompleja_Ope4();\n\n /**\n * The meta object literal for the '<em><b>Atr4</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR4 = eINSTANCE.getCompleja_Atr4();\n\n /**\n * The meta object literal for the '<em><b>Ope5</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE5 = eINSTANCE.getCompleja_Ope5();\n\n /**\n * The meta object literal for the '<em><b>Lit2</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__LIT2 = eINSTANCE.getCompleja_Lit2();\n\n /**\n * The meta object literal for the '<em><b>Atr5</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR5 = eINSTANCE.getCompleja_Atr5();\n\n /**\n * The meta object literal for the '<em><b>Conec1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONEC1 = eINSTANCE.getCompleja_Conec1();\n\n /**\n * The meta object literal for the '<em><b>Ope Col</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE_COL = eINSTANCE.getCompleja_OpeCol();\n\n /**\n * The meta object literal for the '<em><b>Ope6</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE6 = eINSTANCE.getCompleja_Ope6();\n\n /**\n * The meta object literal for the '<em><b>Lit3</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__LIT3 = eINSTANCE.getCompleja_Lit3();\n\n /**\n * The meta object literal for the '<em><b>Atr3</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR3 = eINSTANCE.getCompleja_Atr3();\n\n /**\n * The meta object literal for the '<em><b>Fin Oracion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__FIN_ORACION = eINSTANCE.getCompleja_FinOracion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ConectorImpl <em>Conector</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ConectorImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getConector()\n * @generated\n */\n EClass CONECTOR = eINSTANCE.getConector();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CONECTOR__DESCRIPCION = eINSTANCE.getConector_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.OperacionColeccionImpl <em>Operacion Coleccion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.OperacionColeccionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getOperacionColeccion()\n * @generated\n */\n EClass OPERACION_COLECCION = eINSTANCE.getOperacionColeccion();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute OPERACION_COLECCION__DESCRIPCION = eINSTANCE.getOperacionColeccion_Descripcion();\n\n }", "@Override\n\tpublic String box() {\n\t\treturn \"Earphone box\";\n\t}", "public interface GraphicsNode\n/* */ {\n/* */ public static final int VISIBLE_PAINTED = 0;\n/* */ public static final int VISIBLE_FILL = 1;\n/* */ public static final int VISIBLE_STROKE = 2;\n/* */ public static final int VISIBLE = 3;\n/* */ public static final int PAINTED = 4;\n/* */ public static final int FILL = 5;\n/* */ public static final int STROKE = 6;\n/* */ public static final int ALL = 7;\n/* */ public static final int NONE = 8;\n/* 102 */ public static final AffineTransform IDENTITY = new AffineTransform();\n/* */ \n/* */ WeakReference getWeakReference();\n/* */ \n/* */ int getPointerEventType();\n/* */ \n/* */ void setPointerEventType(int paramInt);\n/* */ \n/* */ void setTransform(AffineTransform paramAffineTransform);\n/* */ \n/* */ AffineTransform getTransform();\n/* */ \n/* */ AffineTransform getInverseTransform();\n/* */ \n/* */ AffineTransform getGlobalTransform();\n/* */ \n/* */ void setComposite(Composite paramComposite);\n/* */ \n/* */ Composite getComposite();\n/* */ \n/* */ void setVisible(boolean paramBoolean);\n/* */ \n/* */ boolean isVisible();\n/* */ \n/* */ void setClip(ClipRable paramClipRable);\n/* */ \n/* */ ClipRable getClip();\n/* */ \n/* */ void setRenderingHint(RenderingHints.Key paramKey, Object paramObject);\n/* */ \n/* */ void setRenderingHints(Map paramMap);\n/* */ \n/* */ void setRenderingHints(RenderingHints paramRenderingHints);\n/* */ \n/* */ RenderingHints getRenderingHints();\n/* */ \n/* */ void setMask(Mask paramMask);\n/* */ \n/* */ Mask getMask();\n/* */ \n/* */ void setFilter(Filter paramFilter);\n/* */ \n/* */ Filter getFilter();\n/* */ \n/* */ Filter getGraphicsNodeRable(boolean paramBoolean);\n/* */ \n/* */ Filter getEnableBackgroundGraphicsNodeRable(boolean paramBoolean);\n/* */ \n/* */ void paint(Graphics2D paramGraphics2D);\n/* */ \n/* */ void primitivePaint(Graphics2D paramGraphics2D);\n/* */ \n/* */ CompositeGraphicsNode getParent();\n/* */ \n/* */ RootGraphicsNode getRoot();\n/* */ \n/* */ Rectangle2D getBounds();\n/* */ \n/* */ Rectangle2D getTransformedBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ Rectangle2D getPrimitiveBounds();\n/* */ \n/* */ Rectangle2D getTransformedPrimitiveBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ Rectangle2D getGeometryBounds();\n/* */ \n/* */ Rectangle2D getTransformedGeometryBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ Rectangle2D getSensitiveBounds();\n/* */ \n/* */ Rectangle2D getTransformedSensitiveBounds(AffineTransform paramAffineTransform);\n/* */ \n/* */ boolean contains(Point2D paramPoint2D);\n/* */ \n/* */ boolean intersects(Rectangle2D paramRectangle2D);\n/* */ \n/* */ GraphicsNode nodeHitAt(Point2D paramPoint2D);\n/* */ \n/* */ Shape getOutline();\n/* */ }", "public void setGrammarStructure(CGrammar aGrammarStructure);", "private BioMightBoundBoxes setupDefaultBoundBoxes() \r\n\t{\r\n\t\t// Set up the collection to hold the Bounding Boxes\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize a BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize a Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = null;\r\n\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT FOOT BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-65.0);\r\n\t\tzPos= new BigDecimal(3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(-2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftFootRef, bioBoundBox);\r\n\t\r\n\t\r\n\t\t//********************************************************************* er\r\n\t\t// RIGHT CNEMES BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Foot\r\n\t\t// On a porportioned human, the \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-14.0);\r\n\t\tzPos= new BigDecimal(-3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Foot Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightFootRef, bioBoundBox);\r\n\t\r\n\t\t// return the collection that holds both foot bound boxes\r\n\t\treturn (bioBoundBoxes);\r\n\t}", "public static void main(String[] args) {\n Rectangle rectangle = new Rectangle(\"red \",4,3);\n// System.out.println(rectangle.area());\n\n Square square = new Square(\"green \",3);\n// System.out.println(square.area());\n Circle circle = new Circle(\"blue \", 4);\n\n// System.out.println(square.getColor());\n\n Shape[] shapes = {rectangle, square, circle};\n for (Shape shape: shapes) {\n shape.showColorAndArea();\n }\n\n }", "@Test\n public void testAllConstructions() throws IOException, LexerException, ParseException {\n TreeNode<ASTNode> tree = getTree(\"all.txt\");\n System.out.println(tree);\n }", "public static void main(final String[] args) {\r\n Shape myRec = new Rectangle(10.0f, 20.0f);\r\n System.out.println(\"Rectangle\");\r\n printAreaOf(myRec);\r\n printPerimeterOf(myRec);\r\n Shape mySqu = new Square(10.0f);\r\n System.out.println(\"Square\");\r\n printAreaOf(mySqu);\r\n printPerimeterOf(mySqu);\r\n System.out.println(\"Circle\");\r\n Shape myCir = new Circle(10.0f);\r\n printAreaOf(myCir);\r\n printPerimeterOf(myCir);\r\n System.out.println(\"Triangle\");\r\n Shape myTri = new Triangle(3.0f, 4.0f, 5.0f);\r\n printAreaOf(myTri);\r\n printPerimeterOf(myTri);\r\n System.out.println(\"Regular polygon 3 sides\");\r\n Shape rp1 = new RegularPolygon(10.0f, 3);\r\n printAreaOf(rp1);\r\n printPerimeterOf(rp1);\r\n System.out.println(\"Regular polygon 4 sides\");\r\n Shape rp2 = new RegularPolygon(new Float(5 * Math.sqrt(2f) / 2), 4);\r\n printAreaOf(rp2);\r\n printPerimeterOf(rp2);\r\n System.out.println(\"Regular polygon 999 sides\");\r\n Shape rp3 = new RegularPolygon(1f, 999);\r\n printAreaOf(rp3);\r\n printPerimeterOf(rp3);\r\n System.out.println(Math.PI * 2);\r\n try {\r\n Shape tr = new Triangle(0f, 1f, 2f);\r\n } catch (IllegalArgumentException e) {\r\n System.out.format(\"Erreur during creation of shape: %s\\n\"\r\n + e.getMessage());\r\n }\r\n\r\n }", "public static void main(String[] args) {\n\n Rectangle rectangle = new Rectangle(10.5,10.5,100.5,100.5);\n if(rectangle instanceof Shape){\n rectangle.getParams();\n// rectangle.move1();\n// rectangle.getParams();\n } else {\n System.out.println(\"Это не объект фигуры!\");\n }\n System.out.println();\n }", "public interface Literals {\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.BagTypeImpl <em>Bag Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.BagTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getBagType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass BAG_TYPE = eINSTANCE.getBagType();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.TupleTypeImpl <em>Tuple Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TupleTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getTupleType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass TUPLE_TYPE = eINSTANCE.getTupleType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Library</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference TUPLE_TYPE__OCL_LIBRARY = eINSTANCE\n\t\t\t\t.getTupleType_OclLibrary();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.CollectionTypeImpl <em>Collection Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.CollectionTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getCollectionType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass COLLECTION_TYPE = eINSTANCE\n\t\t\t\t.getCollectionType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Element Type</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference COLLECTION_TYPE__ELEMENT_TYPE = eINSTANCE\n\t\t\t\t.getCollectionType_ElementType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Library</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference COLLECTION_TYPE__OCL_LIBRARY = eINSTANCE\n\t\t\t\t.getCollectionType_OclLibrary();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Kind</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EAttribute COLLECTION_TYPE__KIND = eINSTANCE\n\t\t\t\t.getCollectionType_Kind();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.InvalidTypeImpl <em>Invalid Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.InvalidTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getInvalidType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass INVALID_TYPE = eINSTANCE.getInvalidType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Library</b></em>' container reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference INVALID_TYPE__OCL_LIBRARY = eINSTANCE\n\t\t\t\t.getInvalidType_OclLibrary();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.OrderedSetTypeImpl <em>Ordered Set Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.OrderedSetTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getOrderedSetType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass ORDERED_SET_TYPE = eINSTANCE\n\t\t\t\t.getOrderedSetType();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.SequenceTypeImpl <em>Sequence Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.SequenceTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getSequenceType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass SEQUENCE_TYPE = eINSTANCE.getSequenceType();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.SetTypeImpl <em>Set Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.SetTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getSetType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass SET_TYPE = eINSTANCE.getSetType();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.VoidTypeImpl <em>Void Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.VoidTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getVoidType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass VOID_TYPE = eINSTANCE.getVoidType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Library</b></em>' container reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference VOID_TYPE__OCL_LIBRARY = eINSTANCE\n\t\t\t\t.getVoidType_OclLibrary();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.TypeTypeImpl <em>Type Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypeTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getTypeType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass TYPE_TYPE = eINSTANCE.getTypeType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Represented Type</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference TYPE_TYPE__REPRESENTED_TYPE = eINSTANCE\n\t\t\t\t.getTypeType_RepresentedType();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.OclLibraryImpl <em>Ocl Library</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.OclLibraryImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getOclLibrary()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass OCL_LIBRARY = eINSTANCE.getOclLibrary();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Void</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_VOID = eINSTANCE\n\t\t\t\t.getOclLibrary_OclVoid();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Any</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_ANY = eINSTANCE\n\t\t\t\t.getOclLibrary_OclAny();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Collection</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_COLLECTION = eINSTANCE\n\t\t\t\t.getOclLibrary_OclCollection();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Sequence</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_SEQUENCE = eINSTANCE\n\t\t\t\t.getOclLibrary_OclSequence();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Bag</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_BAG = eINSTANCE\n\t\t\t\t.getOclLibrary_OclBag();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Set</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_SET = eINSTANCE\n\t\t\t\t.getOclLibrary_OclSet();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Ordered Set</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_ORDERED_SET = eINSTANCE\n\t\t\t\t.getOclLibrary_OclOrderedSet();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Tuple</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_TUPLE = eINSTANCE\n\t\t\t\t.getOclLibrary_OclTuple();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.AnyTypeImpl <em>Any Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.AnyTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getAnyType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass ANY_TYPE = eINSTANCE.getAnyType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Boolean</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_BOOLEAN = eINSTANCE\n\t\t\t\t.getOclLibrary_OclBoolean();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl String</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_STRING = eINSTANCE\n\t\t\t\t.getOclLibrary_OclString();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Integer</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_INTEGER = eINSTANCE\n\t\t\t\t.getOclLibrary_OclInteger();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Real</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_REAL = eINSTANCE\n\t\t\t\t.getOclLibrary_OclReal();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Invalid</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_INVALID = eINSTANCE\n\t\t\t\t.getOclLibrary_OclInvalid();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Type</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_TYPE = eINSTANCE\n\t\t\t\t.getOclLibrary_OclType();\n\n\t}", "public interface Ast {\n /**\n * Method for generating abstract syntactic structure for the source code\n * written in a programming language(Java or Python for example)\n */\n void genAst();\n\n}", "public interface ShapeTemplate { #\n\t//Show/hide when rendering\n\tpublic void show();\n\tpublic void hide();\n\tpublic boolean getVisible();\n\t\n\t//Storage/retreival of shape mesh\n\tpublic char[][] regenCharTable();\n\tpublic char[][] getCharTable();\n\tpublic String[] getStringTable();\n\t\n\t//Internal storage of current rendered position\n\tpublic Position getPosition();\n\tpublic void setPosition(int x, int y);\n\t\n\t//Width/height accessor properties\n\tpublic int getWidth();\n\tpublic int getHeight();\n\t\n\t//Fill\n\tpublic char getFillChar();\n\tpublic void setFillChar(char newChar);\n\tpublic boolean getFilled();\n\tpublic void setFilled(boolean isFilled);\n\t\n\t//ToString\n\tpublic String toString();\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}", "public static void main(String[] args) {\n Circle circle1 = new Circle(1);\n System.out.println(circle1.toString());\n circle1.printCircle();\n System.out.println(circle1.getArea() + \" \" + circle1.getPerimeter() );\n\n System.out.println();\n System.out.println();\n\n Rectangle rec1 = new Rectangle(2,2);\n System.out.println(rec1.toString());\n System.out.println(rec1.getHeight() + \" \" + rec1.getWidth());\n System.out.println(rec1.getPerimeter() + \" \" + rec1.getArea());\n\n\n\n\n }", "public interface IndexedPTBox extends PTBox {\n\n\tpublic boolean hasNewConstraints();\n\tpublic Set<ConditionalConstraint> getNewConstraints();\t\n}", "public abstract void showBox(String message, Node content, Button... buttons);", "public static void main(String[] args) {\n Rectangle box = new Rectangle(10, 10);\n //print X and Y\n System.out.println(\"Box 1: X = \" + box.getX() + \" || Y = \" + box.getY() );\n System.out.println(\"Box1 = \" + box + \"\\n\");\n \n box.translate(10,0);\n //print X and Y\n System.out.println(\"Box 2: X = \" + box.getX() + \" || Y = \" + box.getY() );\n System.out.println(\"Box2 = \" + box + \"\\n\");\n \n box.translate(0, 10);\n //print X and Y\n System.out.println(\"Box 3: X = \" + box.getX() + \" || Y = \" + box.getY() );\n System.out.println(\"Box3 = \" + box + \"\\n\");\n \n box.translate(-10, 0);\n //print X and Y\n System.out.println(\"Box 4: X = \" + box.getX() + \" || Y = \" + box.getY() );\n System.out.println(\"Box4 = \" + box + \"\\n\");\n \n\t}", "public static void main (String []args)\n\t{\n\t\trectangle ob=new rectangle();\n\t\tob.length=10;\n\t\t//it will use the datatypes declared in class rectangle\n\t\tob.breath=20;\n\t\tob.display();\n\t}", "public static void main(String []args ){\n RectangleProgram rectProg = new RectangleProgram();\r\n\t}", "public BugBox( Vector topLeft, Vector botRight ) {\n\t\tthis.topLeft = topLeft;\n\t\tthis.botRight = botRight;\n\t\tthis.topRight = new Vector( botRight.getX(), topLeft.getY() );\n\t\tthis.botLeft = new Vector( topLeft.getX(), botRight.getY() );\n\t\t\n\t\tthis.width = Math.abs( topLeft.getX() - botRight.getX() );\n\t\tthis.height = Math.abs( botRight.getY() - topLeft.getY() );\n\t}", "public static void main(String[] args) {\n Rectangle myRect; //ISSUE 2: No existe la clase Rectangle\n //SOLVE 2: Se creo la clase Rectangle dentro del mismo paquete\n //ISSUE 2.1: No se ha instanciado myRectangle\n myRect = new Rectangle();//SOLVE 2.1: Se instancio my Rect\n myRect.width = 40; //ISSUE 3: No existe un atributo que se llame width dentro de la clase Rectangle\n //SOLVE 3: Se creo la propiedad width a la clase rectangle\n myRect.height = 50; //ISSUE 4: No existe un atributo que se llame height dentro de la clase Rectangle\n //SOLVE 4: Se creo la propiedad hright a la clase rectangle\n System.out.println(\"myRect's area is \" + myRect.area()); //ISSUE 5: No existe el metodo Area dentro de la clase Rectangle\n //SOLVE 5: Se creo el metodo Area en la clase rectangle que multiplica width por height\n }", "public CustomRectangle() { }", "Rectangle(){\n height = 1;\n width = 1;\n }", "public QuadtreeNode(Rectangle rect) {\n this.rectangle = rect;\n }", "public void addBoundingBox() {\n abstractEditor.drawNewShape(new EBoundingBoxDT());\n }", "interface Literals\r\n {\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.ConstiuteintsystemDesignImpl <em>Constiuteintsystem Design</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.ConstiuteintsystemDesignImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getConstiuteintsystemDesign()\r\n * @generated\r\n */\r\n EClass CONSTIUTEINTSYSTEM_DESIGN = eINSTANCE.getConstiuteintsystemDesign();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Actions</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference CONSTIUTEINTSYSTEM_DESIGN__ACTIONS = eINSTANCE.getConstiuteintsystemDesign_Actions();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Action</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference CONSTIUTEINTSYSTEM_DESIGN__ACTION = eINSTANCE.getConstiuteintsystemDesign_Action();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EAttribute CONSTIUTEINTSYSTEM_DESIGN__NAME = eINSTANCE.getConstiuteintsystemDesign_Name();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Ports</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference CONSTIUTEINTSYSTEM_DESIGN__PORTS = eINSTANCE.getConstiuteintsystemDesign_Ports();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.PortImpl <em>Port</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.PortImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getPort()\r\n * @generated\r\n */\r\n EClass PORT = eINSTANCE.getPort();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EAttribute PORT__NAME = eINSTANCE.getPort_Name();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Provides</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference PORT__PROVIDES = eINSTANCE.getPort_Provides();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Requires</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference PORT__REQUIRES = eINSTANCE.getPort_Requires();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.StochasticbehaviorImpl <em>Stochasticbehavior</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.StochasticbehaviorImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getStochasticbehavior()\r\n * @generated\r\n */\r\n EClass STOCHASTICBEHAVIOR = eINSTANCE.getStochasticbehavior();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.StochaticConstriantsImpl <em>Stochatic Constriants</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.StochaticConstriantsImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getStochaticConstriants()\r\n * @generated\r\n */\r\n EClass STOCHATIC_CONSTRIANTS = eINSTANCE.getStochaticConstriants();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Constraint Share Date</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference STOCHATIC_CONSTRIANTS__CONSTRAINT_SHARE_DATE = eINSTANCE.getStochaticConstriants_ConstraintShareDate();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Rate</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference STOCHATIC_CONSTRIANTS__RATE = eINSTANCE.getStochaticConstriants_Rate();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Constraint Data</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference STOCHATIC_CONSTRIANTS__CONSTRAINT_DATA = eINSTANCE.getStochaticConstriants_ConstraintData();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.DatatoinferImpl <em>Datatoinfer</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.DatatoinferImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getDatatoinfer()\r\n * @generated\r\n */\r\n EClass DATATOINFER = eINSTANCE.getDatatoinfer();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.shardataImpl <em>shardata</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.shardataImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getshardata()\r\n * @generated\r\n */\r\n EClass SHARDATA = eINSTANCE.getshardata();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.SystemTranstionsImpl <em>System Transtions</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.SystemTranstionsImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getSystemTranstions()\r\n * @generated\r\n */\r\n EClass SYSTEM_TRANSTIONS = eINSTANCE.getSystemTranstions();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EAttribute SYSTEM_TRANSTIONS__NAME = eINSTANCE.getSystemTranstions_Name();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>States</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference SYSTEM_TRANSTIONS__STATES = eINSTANCE.getSystemTranstions_States();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Events</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference SYSTEM_TRANSTIONS__EVENTS = eINSTANCE.getSystemTranstions_Events();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.StateImpl <em>State</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.StateImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getState()\r\n * @generated\r\n */\r\n EClass STATE = eINSTANCE.getState();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EAttribute STATE__NAME = eINSTANCE.getState_Name();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Transitions</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference STATE__TRANSITIONS = eINSTANCE.getState_Transitions();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.TransitionImpl <em>Transition</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.TransitionImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getTransition()\r\n * @generated\r\n */\r\n EClass TRANSITION = eINSTANCE.getTransition();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Event</b></em>' reference feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference TRANSITION__EVENT = eINSTANCE.getTransition_Event();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Rate</b></em>' reference feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference TRANSITION__RATE = eINSTANCE.getTransition_Rate();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Target</b></em>' reference feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference TRANSITION__TARGET = eINSTANCE.getTransition_Target();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.OperationImpl <em>Operation</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.OperationImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getOperation()\r\n * @generated\r\n */\r\n EClass OPERATION = eINSTANCE.getOperation();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Recieves</b></em>' attribute list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EAttribute OPERATION__RECIEVES = eINSTANCE.getOperation_Recieves();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.ratesImpl <em>rates</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.ratesImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getrates()\r\n * @generated\r\n */\r\n EClass RATES = eINSTANCE.getrates();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Rates</b></em>' attribute feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EAttribute RATES__RATES = eINSTANCE.getrates_Rates();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.EventImpl <em>Event</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.EventImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getEvent()\r\n * @generated\r\n */\r\n EClass EVENT = eINSTANCE.getEvent();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EAttribute EVENT__NAME = eINSTANCE.getEvent_Name();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Operation</b></em>' reference feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference EVENT__OPERATION = eINSTANCE.getEvent_Operation();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.requireImpl <em>require</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.requireImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getrequire()\r\n * @generated\r\n */\r\n EClass REQUIRE = eINSTANCE.getrequire();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EAttribute REQUIRE__NAME = eINSTANCE.getrequire_Name();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.provideImpl <em>provide</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.provideImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getprovide()\r\n * @generated\r\n */\r\n EClass PROVIDE = eINSTANCE.getprovide();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EAttribute PROVIDE__NAME = eINSTANCE.getprovide_Name();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.StochaticBehaviorImpl <em>Stochatic Behavior</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.StochaticBehaviorImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getStochaticBehavior()\r\n * @generated\r\n */\r\n EClass STOCHATIC_BEHAVIOR = eINSTANCE.getStochaticBehavior();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>System Transition</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference STOCHATIC_BEHAVIOR__SYSTEM_TRANSITION = eINSTANCE.getStochaticBehavior_SystemTransition();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Con Constraint</b></em>' containment reference list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EReference STOCHATIC_BEHAVIOR__CON_CONSTRAINT = eINSTANCE.getStochaticBehavior_ConConstraint();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.AskfordataImpl <em>Askfordata</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.AskfordataImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getAskfordata()\r\n * @generated\r\n */\r\n EClass ASKFORDATA = eINSTANCE.getAskfordata();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.TellDataImpl <em>Tell Data</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.TellDataImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getTellData()\r\n * @generated\r\n */\r\n EClass TELL_DATA = eINSTANCE.getTellData();\r\n\r\n /**\r\n * The meta object literal for the '{@link org.xtext.sosarch.csdesign.myDsl.impl.operationsImpl <em>operations</em>}' class.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.operationsImpl\r\n * @see org.xtext.sosarch.csdesign.myDsl.impl.MyDslPackageImpl#getoperations()\r\n * @generated\r\n */\r\n EClass OPERATIONS = eINSTANCE.getoperations();\r\n\r\n /**\r\n * The meta object literal for the '<em><b>Sends</b></em>' attribute list feature.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * @generated\r\n */\r\n EAttribute OPERATIONS__SENDS = eINSTANCE.getoperations_Sends();\r\n\r\n }", "Box(double len)\n\t{\n\t\t\n\t\twidth = height = depth = len;\n\t\t\n\t}", "public Rectangle() {\n }", "public Rectangle() {\n }", "public static void main(String[] args) {\n\n Quadrilateral myShape = new Rectangle(7,6);\n\n System.out.println(\"myShape.getArea() = \" + myShape.getArea());\n System.out.println(\"myShape.getPerimeter() = \" + myShape.getPerimeter());\n\n\n\n\n// System.out.println(\"~~~~~~~~~~~~~~~~~~~~\");\n//\n// Rectangle box1 = new Rectangle(5, 4);\n// System.out.println(box1.getPerimeter());\n// System.out.println(box1.getArea());\n//\n// System.out.println(\"~~~~~~~~~~~~~~~~~~~~\");\n//\n// Rectangle box2 = new Square(5);\n// System.out.println(box2.getPerimeter());\n// System.out.println(box2.getArea());\n//\n// System.out.println(\"~~~~~~~~~~~~~~~~~~~~\");\n//\n// Rectangle box3 = new Rectangle(6, 9);\n// System.out.println(box3.getPerimeter());\n// System.out.println(box3.getArea());\n//\n// System.out.println(\"~~~~~~~~~~~~~~~~~~~~\");\n//\n// Rectangle box4 = new Square(8);\n// System.out.println(box4.getPerimeter());\n// System.out.println(box4.getArea());\n\n }", "public Box() {\t\t\t\t\n\t\tCrayon box[] = {new Crayon(10,Color.RED),new Crayon(10,Color.ORANGE),new Crayon(10,Color.YELLOW),new Crayon(10,Color.GREEN),new Crayon(10,Color.BLUE),new Crayon(10,Color.VIOLET),new Crayon(10,Color.BROWN),new Crayon(10,Color.BLACK)};\n\t\tcrayons = box;\n\t}", "public interface ClassBody extends Term\n{\n /**\n * List of the class's members.\n * @return A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n List<ClassMember> members();\n\n /**\n * Set the class's members.\n * @param members A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n ClassBody members(List<ClassMember> members);\n\n /**\n * Add a member to the class, returning a new node.\n */\n ClassBody addMember(ClassMember member);\n}", "public RectangleProgram(){\r\n //Esto metodos los heredamos de JFrame este es el constructor\r\n\t\tsetTitle(\"Area and Perimeter of a Rectangle\");\r\n\t\tsetSize(ANCHO, ALTO);\r\n\t\tsetVisible(true);\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE); //La aplicacion sale cuando la cerramos\r\n\t}", "public ERSNOpenMC_Table_of_nuclides() {\n initComponents();\n \n getContentPane().setBackground(new Color(0, 0, 128));\n\n DefaultSyntaxKit.initKit(); \n\n }", "@Test\n public void testRectangleConstructor() {\n defaultShape1 = new Rectangle(defaultColor1, defaultPosition1, defaultSize1);\n // If successful the type should be rectangle.\n assertEquals(TypeOfShape.RECTANGLE, defaultShape1.getType());\n assertNotEquals(defaultShape1.getType(), TypeOfShape.OVAL);\n }", "public NarrativeStructInterpreter()\n {\n\n }", "interface Literals {\n\t\t/**\n\t\t * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphImpl <em>Gui Graph</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphImpl\n\t\t * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraph()\n\t\t * @generated\n\t\t */\n\t\tEClass GUI_GRAPH = eINSTANCE.getGuiGraph();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Nodes</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference GUI_GRAPH__NODES = eINSTANCE.getGuiGraph_Nodes();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Edges</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference GUI_GRAPH__EDGES = eINSTANCE.getGuiGraph_Edges();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphItemImpl <em>Gui Graph Item</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphItemImpl\n\t\t * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraphItem()\n\t\t * @generated\n\t\t */\n\t\tEClass GUI_GRAPH_ITEM = eINSTANCE.getGuiGraphItem();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute GUI_GRAPH_ITEM__NAME = eINSTANCE.getGuiGraphItem_Name();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tooltip</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute GUI_GRAPH_ITEM__TOOLTIP = eINSTANCE.getGuiGraphItem_Tooltip();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Url</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute GUI_GRAPH_ITEM__URL = eINSTANCE.getGuiGraphItem_Url();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl <em>Gui Graph Node</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl\n\t\t * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraphNode()\n\t\t * @generated\n\t\t */\n\t\tEClass GUI_GRAPH_NODE = eINSTANCE.getGuiGraphNode();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>X</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute GUI_GRAPH_NODE__X = eINSTANCE.getGuiGraphNode_X();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Y</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute GUI_GRAPH_NODE__Y = eINSTANCE.getGuiGraphNode_Y();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>H</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute GUI_GRAPH_NODE__H = eINSTANCE.getGuiGraphNode_H();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>W</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute GUI_GRAPH_NODE__W = eINSTANCE.getGuiGraphNode_W();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphEdgeImpl <em>Gui Graph Edge</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphEdgeImpl\n\t\t * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraphEdge()\n\t\t * @generated\n\t\t */\n\t\tEClass GUI_GRAPH_EDGE = eINSTANCE.getGuiGraphEdge();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>X</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference GUI_GRAPH_EDGE__X = eINSTANCE.getGuiGraphEdge_X();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Y</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference GUI_GRAPH_EDGE__Y = eINSTANCE.getGuiGraphEdge_Y();\n\n\t}", "interface Literals\n {\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.InfrastructureImpl <em>Infrastructure</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.InfrastructureImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getInfrastructure()\n * @generated\n */\n EClass INFRASTRUCTURE = eINSTANCE.getInfrastructure();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute INFRASTRUCTURE__NAME = eINSTANCE.getInfrastructure_Name();\n\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.SingleServerImpl <em>Single Server</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.SingleServerImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getSingleServer()\n * @generated\n */\n EClass SINGLE_SERVER = eINSTANCE.getSingleServer();\n\n /**\n * The meta object literal for the '<em><b>Server</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SINGLE_SERVER__SERVER = eINSTANCE.getSingleServer_Server();\n\n /**\n * The meta object literal for the '<em><b>Timeout</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SINGLE_SERVER__TIMEOUT = eINSTANCE.getSingleServer_Timeout();\n\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.ClusterImpl <em>Cluster</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.ClusterImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getCluster()\n * @generated\n */\n EClass CLUSTER = eINSTANCE.getCluster();\n\n /**\n * The meta object literal for the '<em><b>Message queue</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CLUSTER__MESSAGE_QUEUE = eINSTANCE.getCluster_Message_queue();\n\n /**\n * The meta object literal for the '<em><b>Registration</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CLUSTER__REGISTRATION = eINSTANCE.getCluster_Registration();\n\n /**\n * The meta object literal for the '<em><b>Mid assigner</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CLUSTER__MID_ASSIGNER = eINSTANCE.getCluster_Mid_assigner();\n\n /**\n * The meta object literal for the '<em><b>Nodes</b></em>' attribute list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CLUSTER__NODES = eINSTANCE.getCluster_Nodes();\n\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.RingImpl <em>Ring</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.RingImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getRing()\n * @generated\n */\n EClass RING = eINSTANCE.getRing();\n\n /**\n * The meta object literal for the '<em><b>Registration</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute RING__REGISTRATION = eINSTANCE.getRing_Registration();\n\n /**\n * The meta object literal for the '<em><b>Mid assigner</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute RING__MID_ASSIGNER = eINSTANCE.getRing_Mid_assigner();\n\n /**\n * The meta object literal for the '<em><b>Nodes</b></em>' attribute list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute RING__NODES = eINSTANCE.getRing_Nodes();\n\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.TreeImpl <em>Tree</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.TreeImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getTree()\n * @generated\n */\n EClass TREE = eINSTANCE.getTree();\n\n /**\n * The meta object literal for the '<em><b>Registration</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute TREE__REGISTRATION = eINSTANCE.getTree_Registration();\n\n /**\n * The meta object literal for the '<em><b>Root</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference TREE__ROOT = eINSTANCE.getTree_Root();\n\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.TreeNodeImpl <em>Tree Node</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.TreeNodeImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getTreeNode()\n * @generated\n */\n EClass TREE_NODE = eINSTANCE.getTreeNode();\n\n /**\n * The meta object literal for the '<em><b>Address</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute TREE_NODE__ADDRESS = eINSTANCE.getTreeNode_Address();\n\n /**\n * The meta object literal for the '<em><b>Children</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference TREE_NODE__CHILDREN = eINSTANCE.getTreeNode_Children();\n\n }", "public static void main(String[] args) {\n\n /* Inner Clases: Nested Class */\n // Cannot access non-static methods or member before creating an instance of outer class\n // Gear is local to Gearbox\n Gearbox mcLaren = new Gearbox(6);\n mcLaren.addGear(1, 5.3);\n mcLaren.addGear(2, 10.6);\n mcLaren.addGear(3, 15.9);\n mcLaren.operateClutch(true);\n mcLaren.changeGear(1);\n mcLaren.operateClutch(false);\n System.out.println(mcLaren.wheelSpeed(1000));\n mcLaren.changeGear(2);\n System.out.println(mcLaren.wheelSpeed(3200));\n mcLaren.operateClutch(true);\n mcLaren.changeGear(3);\n mcLaren.operateClutch(false);\n System.out.println(mcLaren.wheelSpeed(6200));\n\n /* Abstract */\n Dog dog = new Dog(\"Yorkie\");\n dog.breathe();\n dog.eat();\n\n // Abstract class have members that can be inherited\n // But public static final variables/. cannot change\n // abstract class cannot be directly initiated\n // static cuz non-static requires instance\n // Can have constructors\n // Methods can be public and private\n // Inteface public\n Parrot parrot = new Parrot(\"Red neck\");\n parrot.breathe();\n parrot.eat();\n parrot.fly();\n\n Penguin penguin = new Penguin(\"Black\");\n penguin.fly();\n }", "public SetupBuilderBox() {\n\tsuper();\n\tsetLayout(new BorderLayout());\n\n\tboard = new EditableBoard(this);\n\tboard.init(cols, rows);\n\tgb = new GraphicalBoard(board);\n\tgb.setDim(32);\n\tgb.init();\n\ttsp = new ToolSelectPanel(this);\n\tsap = new SetupSavePanel(this);\n\tssp = new SetupSettingsPanel(this);\n\n\tJPanel center = new JPanel();\n\tcenter.setLayout(new BorderLayout());\n\tcenter.add(gb, BorderLayout.CENTER);\n\tcenter.add(tsp, BorderLayout.SOUTH);\n\n\tadd(sap, BorderLayout.NORTH);\n\tadd(center, BorderLayout.CENTER);\n\tadd(ssp, BorderLayout.EAST);\n\n }", "public static void main(String[] args) {\n Measurable myShape; // define data type of Measureable and variable name myShape\n\n myShape = new Square(5);\n\n// System.out.println(box1.getPerimeter()); // 18\n// System.out.println(box1.getArea()); // 20\n// System.out.println(\"\");\n// System.out.println(box2.getPerimeter()); // 20\n// System.out.println(box2.getArea()); // 25\n\n System.out.println(myShape.getArea());\n System.out.println(myShape.getPerimeter());\n\n myShape = new Rectangle(5,4);\n\n System.out.println(myShape.getPerimeter());\n System.out.println(myShape.getArea());\n\n\n }", "private void installBasicClasses() {\n \tAbstractSymbol filename \n \t = AbstractTable.stringtable.addString(\"<basic class>\");\n \t\n \t// The following demonstrates how to create dummy parse trees to\n \t// refer to basic Cool classes. There's no need for method\n \t// bodies -- these are already built into the runtime system.\n \n \t// IMPORTANT: The results of the following expressions are\n \t// stored in local variables. You will want to do something\n \t// with those variables at the end of this method to make this\n \t// code meaningful.\n \n \t// The Object class has no parent class. Its methods are\n \t// cool_abort() : Object aborts the program\n \t// type_name() : Str returns a string representation \n \t// of class name\n \t// copy() : SELF_TYPE returns a copy of the object\n \n \tclass_c Object_class = \n \t new class_c(0, \n \t\t TreeConstants.Object_, \n \t\t TreeConstants.No_class,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0, \n \t\t\t\t\t TreeConstants.cool_abort, \n \t\t\t\t\t new Formals(0), \n \t\t\t\t\t TreeConstants.Object_, \n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.type_name,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.copy,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \t\n \t// The IO class inherits from Object. Its methods are\n \t// out_string(Str) : SELF_TYPE writes a string to the output\n \t// out_int(Int) : SELF_TYPE \" an int \" \" \"\n \t// in_string() : Str reads a string from the input\n \t// in_int() : Int \" an int \" \" \"\n \n \tclass_c IO_class = \n \t new class_c(0,\n \t\t TreeConstants.IO,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_string,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_int,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_string,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_int,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The Int class has no methods and only a single attribute, the\n \t// \"val\" for the integer.\n \n \tclass_c Int_class = \n \t new class_c(0,\n \t\t TreeConstants.Int,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// Bool also has only the \"val\" slot.\n \tclass_c Bool_class = \n \t new class_c(0,\n \t\t TreeConstants.Bool,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The class Str has a number of slots and operations:\n \t// val the length of the string\n \t// str_field the string itself\n \t// length() : Int returns length of the string\n \t// concat(arg: Str) : Str performs string concatenation\n \t// substr(arg: Int, arg2: Int): Str substring selection\n \n \tclass_c Str_class =\n \t new class_c(0,\n \t\t TreeConstants.Str,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.str_field,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.length,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.concat,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg, \n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.substr,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int))\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg2,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t/* Do somethind with Object_class, IO_class, Int_class,\n Bool_class, and Str_class here */\n nameToClass.put(TreeConstants.Object_.getString(), Object_class);\n nameToClass.put(TreeConstants.IO.getString(), IO_class);\n nameToClass.put(TreeConstants.Int.getString(), Int_class);\n nameToClass.put(TreeConstants.Bool.getString(), Bool_class);\n nameToClass.put(TreeConstants.Str.getString(), Str_class);\n adjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.IO.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Int.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Bool.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Str.getString(), new ArrayList<String>() );\n // Do the same for other basic classes\n basicClassList = new Classes(0);\n basicClassList.appendElement(Object_class);\n basicClassList.appendElement(IO_class);\n basicClassList.appendElement(Int_class);\n basicClassList.appendElement(Bool_class);\n basicClassList.appendElement(Str_class);\n \n }", "public static void main(String[] args){\n Box[] boxes = {new Box1(),new Box2(), new Box3(),new Box4(),new Box5() };\n int length =15;\n int width =20;\n int height =25;\n for (Box box:boxes\n ) {if(box.validate(length,width,height)){\n System.out.println(box.name );\n break;\n }\n\n }\n\n\n\n\n /*Scanner scan = new Scanner(System.in);\n System.out.println(\"Please enter a number:\");\n int length = Integer.parseInt(scan.next());\n System.out.println(\"Please enter a number:\");\n int width = Integer.parseInt(scan.next());\n System.out.println(\"Please enter a number:\");\n int height = Integer.parseInt(scan.next());\n System.out.println(\"length: \" + length + \", width: \" + width + \", height: \" + height);\n if (box3.validate(length, width, height)) {\n System.out.println(box3.getName());\n }*/\n\n\n }", "public interface GrammarConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 7;\n /** RegularExpression Id. */\n int FORMAL_COMMENT = 8;\n /** RegularExpression Id. */\n int MULTI_LINE_COMMENT = 9;\n /** RegularExpression Id. */\n int PLUS = 11;\n /** RegularExpression Id. */\n int MINUS = 12;\n /** RegularExpression Id. */\n int MULTIPLY = 13;\n /** RegularExpression Id. */\n int DIVIDE = 14;\n /** RegularExpression Id. */\n int MOD = 15;\n /** RegularExpression Id. */\n int UBANG = 16;\n /** RegularExpression Id. */\n int LESS_OP = 17;\n /** RegularExpression Id. */\n int MORE_OP = 18;\n /** RegularExpression Id. */\n int WHILE = 19;\n /** RegularExpression Id. */\n int IF = 20;\n /** RegularExpression Id. */\n int ELSE = 21;\n /** RegularExpression Id. */\n int BREAK = 22;\n /** RegularExpression Id. */\n int RETURN = 23;\n /** RegularExpression Id. */\n int CONTINUE = 24;\n /** RegularExpression Id. */\n int ID = 25;\n /** RegularExpression Id. */\n int LETTER = 26;\n /** RegularExpression Id. */\n int INT = 27;\n /** RegularExpression Id. */\n int SEMICOLON = 28;\n /** RegularExpression Id. */\n int LPAREN = 29;\n /** RegularExpression Id. */\n int RPAREN = 30;\n /** RegularExpression Id. */\n int LBRACKET = 31;\n /** RegularExpression Id. */\n int RBRACKET = 32;\n /** RegularExpression Id. */\n int EQUAL = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_FORMAL_COMMENT = 1;\n /** Lexical state. */\n int IN_MULTI_LINE_COMMENT = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 5>\",\n \"\\\"/*\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\"while\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"break\\\"\",\n \"\\\"return\\\"\",\n \"\\\"continue\\\"\",\n \"<ID>\",\n \"<LETTER>\",\n \"<INT>\",\n \"\\\";\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"=\\\"\",\n \"\\\"?\\\"\",\n \"\\\":\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"\\\"==\\\"\",\n \"\\\">=\\\"\",\n \"\\\"<=\\\"\",\n };\n\n}", "@jdk.Supported\npublic interface Tree {\n\n /**\n * Enumerates all kinds of trees.\n */\n @jdk.Supported\n public enum Kind {\n\n /**\n * Used for instance of {@link ExtendedASTAnnotationTree}\n * representing AST-level tree annotation \"@@\"\n */\n AST_ANNOTATION(null, \"ASTAnnotation\"), // ExtendedASTAnnotationTree.class ... break API compatility with visitor ...\n\n ANNOTATED_TYPE(AnnotatedTypeTree.class, \"AnnotatedType\", \"AtType\"),\n\n /**\n * Used for instances of {@link AnnotationTree}\n * representing declaration annotations.\n */\n ANNOTATION(AnnotationTree.class, \"Annotation\", \"At\"),\n\n /**\n * Used for instances of {@link AnnotationTree}\n * representing type annotations.\n */\n TYPE_ANNOTATION(AnnotationTree.class, \"TypeAnnotation\", \"Annotation\", \"At\"),\n\n /**\n * Used for instances of {@link ArrayAccessTree}.\n */\n ARRAY_ACCESS(ArrayAccessTree.class, \"ArrayAccess\"),\n\n /**\n * Used for instances of {@link ArrayTypeTree}.\n */\n ARRAY_TYPE(ArrayTypeTree.class, \"ArrayType\"),\n\n /**\n * Used for instances of {@link AssertTree}.\n */\n ASSERT(AssertTree.class, \"Assert\", \"assert\"),\n\n /**\n * Used for instances of {@link AssignmentTree}.\n */\n ASSIGNMENT(AssignmentTree.class, \"Assign\", \"Eq\", \"=\"),\n\n /**\n * Used for instances of {@link BlockTree}.\n */\n BLOCK(BlockTree.class, \"Block\", \"{}\"),\n\n /**\n * Used for instances of {@link BreakTree}.\n */\n BREAK(BreakTree.class, \"Break\", \"break\"),\n\n /**\n * Used for instances of {@link CaseTree}.\n */\n CASE(CaseTree.class, \"Case\", \"case\"),\n\n /**\n * Used for instances of {@link CatchTree}.\n */\n CATCH(CatchTree.class, \"Catch\", \"catch\"),\n\n /**\n * Used for instances of {@link ClassTree} representing classes.\n */\n CLASS(ClassTree.class, \"Class\", \"class\"),\n\n /**\n * Used for instances of {@link CompilationUnitTree}.\n */\n COMPILATION_UNIT(CompilationUnitTree.class, \"CompilationUnit\", \"cu\"),\n\n /**\n * Used for instances of {@link ConditionalExpressionTree}.\n */\n CONDITIONAL_EXPRESSION(ConditionalExpressionTree.class, \"ConditionalExpression\", \"?\"),\n\n /**\n * Used for instances of {@link ContinueTree}.\n */\n CONTINUE(ContinueTree.class, \"Continue\", \"continue\"),\n\n /**\n * Used for instances of {@link DoWhileLoopTree}.\n */\n DO_WHILE_LOOP(DoWhileLoopTree.class, \"DoWhile\", \"do\"),\n\n /**\n * Used for instances of {@link EnhancedForLoopTree}.\n */\n ENHANCED_FOR_LOOP(EnhancedForLoopTree.class, \"EnhancedForLoop\", \"for\"),\n\n /**\n * Used for instances of {@link ExpressionStatementTree}.\n */\n EXPRESSION_STATEMENT(ExpressionStatementTree.class, \"ExpressionStatement\", \"expr;\", \"e;\"),\n\n /**\n * Used for instances of {@link MemberSelectTree}.\n */\n MEMBER_SELECT(MemberSelectTree.class, \"MemberSelect\", \".\"),\n\n /**\n * Used for instances of {@link MemberReferenceTree}.\n */\n MEMBER_REFERENCE(MemberReferenceTree.class, \"MemberReference\", \"#\"),\n\n /**\n * Used for instances of {@link ForLoopTree}.\n */\n FOR_LOOP(ForLoopTree.class, \"ForLoop\", \"for\"),\n\n /**\n * Used for instances of {@link IdentifierTree}.\n */\n IDENTIFIER(IdentifierTree.class, \"Identifier\", \"id\", \"name\"),\n\n /**\n * Used for instances of {@link IfTree}.\n */\n IF(IfTree.class, \"If\", \"if\"),\n\n /**\n * Used for instances of {@link ImportTree}.\n */\n IMPORT(ImportTree.class, \"Import\", \"import\"),\n\n /**\n * Used for instances of {@link InstanceOfTree}.\n */\n INSTANCE_OF(InstanceOfTree.class, \"InstanceOf\", \"instanceof\"),\n\n /**\n * Used for instances of {@link LabeledStatementTree}.\n */\n LABELED_STATEMENT(LabeledStatementTree.class, \"LabeledStatement\", \"label\"),\n\n /**\n * Used for instances of {@link MethodTree}.\n */\n METHOD(MethodTree.class, \"Method\", \"method\"),\n\n /**\n * Used for instances of {@link MethodInvocationTree}.\n */\n METHOD_INVOCATION(MethodInvocationTree.class, \"MethodInvocation\", \"invoke\", \"call\"),\n\n /**\n * Used for instances of {@link ModifiersTree}.\n */\n MODIFIERS(ModifiersTree.class, \"Modifiers\"),\n\n /**\n * Used for instances of {@link NewArrayTree}.\n */\n NEW_ARRAY(NewArrayTree.class, \"NewArray\", \"new\"),\n\n /**\n * Used for instances of {@link NewClassTree}.\n */\n NEW_CLASS(NewClassTree.class, \"NewClass\", \"new\"),\n\n /**\n * Used for instances of {@link LambdaExpressionTree}.\n */\n LAMBDA_EXPRESSION(LambdaExpressionTree.class, \"Lambda\", \"lambda\"),\n\n /**\n * Used for instances of {@link ParenthesizedTree}.\n */\n PARENTHESIZED(ParenthesizedTree.class, \"Parenthesized\"), // should not use prefix with \"(e)\" as it might confuse the parser ?\n\n /**\n * Used for instances of {@link PrimitiveTypeTree}.\n */\n PRIMITIVE_TYPE(PrimitiveTypeTree.class, \"PrimitiveType\", \"type\"),\n\n /**\n * Used for instances of {@link ReturnTree}.\n */\n RETURN(ReturnTree.class, \"Return\", \"return\"),\n\n /**\n * Used for instances of {@link EmptyStatementTree}.\n */\n EMPTY_STATEMENT(EmptyStatementTree.class, \"EmptyStatement\", \"empty\"),\n\n /**\n * Used for instances of {@link SwitchTree}.\n */\n SWITCH(SwitchTree.class, \"Switch\", \"switch\"),\n\n /**\n * Used for instances of {@link SynchronizedTree}.\n */\n SYNCHRONIZED(SynchronizedTree.class, \"Synchronized\", \"synchronized\"),\n\n /**\n * Used for instances of {@link ThrowTree}.\n */\n THROW(ThrowTree.class, \"Throw\", \"throw\"),\n\n /**\n * Used for instances of {@link TryTree}.\n */\n TRY(TryTree.class, \"Try\", \"try\"),\n\n /**\n * Used for instances of {@link ParameterizedTypeTree}.\n */\n PARAMETERIZED_TYPE(ParameterizedTypeTree.class, \"ParameterizedType\", \"type<>\", \"type\"),\n\n /**\n * Used for instances of {@link UnionTypeTree}.\n */\n UNION_TYPE(UnionTypeTree.class, \"UnionType\", \"union\", \"|\", \"uniontype\", \"type\"),\n\n /**\n * Used for instances of {@link IntersectionTypeTree}.\n */\n INTERSECTION_TYPE(IntersectionTypeTree.class, \"IntersectionType\", \"intersectiontype\", \"type\"),\n\n /**\n * Used for instances of {@link TypeCastTree}.\n */\n TYPE_CAST(TypeCastTree.class, \"TypeCast\", \"cast\"), // should not use prefix with \"()\" as it might confuse the parser ?\n\n /**\n * Used for instances of {@link TypeParameterTree}.\n */\n TYPE_PARAMETER(TypeParameterTree.class, \"TypeParameter\", \"type\"),\n\n /**\n * Used for instances of {@link VariableTree}.\n */\n VARIABLE(VariableTree.class, \"Variable\", \"var\", \"vardecl\"),\n\n /**\n * Used for instances of {@link WhileLoopTree}.\n */\n WHILE_LOOP(WhileLoopTree.class, \"WhileLoop\", \"while\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing postfix\n * increment operator {@code ++}.\n */\n POSTFIX_INCREMENT(UnaryTree.class, \"PostfixIncrement\", \"e++\", \"++\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing postfix\n * decrement operator {@code --}.\n */\n POSTFIX_DECREMENT(UnaryTree.class, \"PostfixDecrement\", \"e--\", \"--\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing prefix\n * increment operator {@code ++}.\n */\n PREFIX_INCREMENT(UnaryTree.class, \"PrefixIncrement\", \"++e\", \"++\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing prefix\n * decrement operator {@code --}.\n */\n PREFIX_DECREMENT(UnaryTree.class, \"PrefixDecrement\", \"--e\", \"--\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing unary plus\n * operator {@code +}.\n */\n UNARY_PLUS(UnaryTree.class, \"UnaryPlus\", \"+e\", \"+\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing unary minus\n * operator {@code -}.\n */\n UNARY_MINUS(UnaryTree.class, \"UnaryMinus\", \"-e\", \"-\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing bitwise\n * complement operator {@code ~}.\n */\n BITWISE_COMPLEMENT(UnaryTree.class, \"BitwiseComplement\", \"~\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing logical\n * complement operator {@code !}.\n */\n LOGICAL_COMPLEMENT(UnaryTree.class, \"LogicalComlement\", \"!\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * multiplication {@code *}.\n */\n MULTIPLY(BinaryTree.class, \"Multiply\", \"mult\", \"*\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * division {@code /}.\n */\n DIVIDE(BinaryTree.class, \"Divide\", \"div\", \"/\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * remainder {@code %}.\n */\n REMAINDER(BinaryTree.class, \"Remainder\", \"rem\", \"%\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * addition or string concatenation {@code +}.\n */\n PLUS(BinaryTree.class, \"BinaryPlus\", \"e+e\", \"+\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * subtraction {@code -}.\n */\n MINUS(BinaryTree.class, \"BinaryMinus\", \"e-e\", \"-\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * left shift {@code <<}.\n */\n LEFT_SHIFT(BinaryTree.class, \"LeftShift\", \"<<\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * right shift {@code >>}.\n */\n RIGHT_SHIFT(BinaryTree.class, \"RightShift\", \">>\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * unsigned right shift {@code >>>}.\n */\n UNSIGNED_RIGHT_SHIFT(BinaryTree.class, \"UnsignedRightShift\", \">>>\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * less-than {@code <}.\n */\n LESS_THAN(BinaryTree.class, \"LessThan\", \"lt\", \"<\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * greater-than {@code >}.\n */\n GREATER_THAN(BinaryTree.class, \"GreaterThan\", \"gt\", \">\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * less-than-equal {@code <=}.\n */\n LESS_THAN_EQUAL(BinaryTree.class, \"LessThanEqual\", \"le\", \"<=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * greater-than-equal {@code >=}.\n */\n GREATER_THAN_EQUAL(BinaryTree.class, \"GreaterThanEqual\", \"ge\", \">=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * equal-to {@code ==}.\n */\n EQUAL_TO(BinaryTree.class, \"Equals\", \"equals\", \"==\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * not-equal-to {@code !=}.\n */\n NOT_EQUAL_TO(BinaryTree.class, \"NotEquals\", \"notequals\", \"!=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"and\" {@code &}.\n */\n AND(BinaryTree.class, \"And\", \"and\", \"&\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"xor\" {@code ^}.\n */\n XOR(BinaryTree.class, \"Xor\", \"xor\", \"^\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"or\" {@code |}.\n */\n OR(BinaryTree.class, \"Or\", \"or\", \"|\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * conditional-and {@code &&}.\n */\n CONDITIONAL_AND(BinaryTree.class, \"ConditionalAnd\", \"&&\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * conditional-or {@code ||}.\n */\n CONDITIONAL_OR(BinaryTree.class, \"ConditionalOr\", \"||\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * multiplication assignment {@code *=}.\n */\n MULTIPLY_ASSIGNMENT(CompoundAssignmentTree.class, \"MultiplyAssignment\", \"*=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * division assignment {@code /=}.\n */\n DIVIDE_ASSIGNMENT(CompoundAssignmentTree.class, \"DivideAssignment\", \"/=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * remainder assignment {@code %=}.\n */\n REMAINDER_ASSIGNMENT(CompoundAssignmentTree.class, \"RemainderAssignment\", \"%=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * addition or string concatenation assignment {@code +=}.\n */\n PLUS_ASSIGNMENT(CompoundAssignmentTree.class, \"PLusAssignment\", \"+=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * subtraction assignment {@code -=}.\n */\n MINUS_ASSIGNMENT(CompoundAssignmentTree.class, \"MinusAssignment\", \"-=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * left shift assignment {@code <<=}.\n */\n LEFT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"LeftShiftAssignment\", \"<<=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * right shift assignment {@code >>=}.\n */\n RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"RightShiftAssignment\", \">>=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * unsigned right shift assignment {@code >>>=}.\n */\n UNSIGNED_RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"UnsignedRightShiftAssignment\", \">>>=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"and\" assignment {@code &=}.\n */\n AND_ASSIGNMENT(CompoundAssignmentTree.class, \"AndAssignment\", \"&=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"xor\" assignment {@code ^=}.\n */\n XOR_ASSIGNMENT(CompoundAssignmentTree.class, \"XorAssignment\", \"^=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"or\" assignment {@code |=}.\n */\n OR_ASSIGNMENT(CompoundAssignmentTree.class, \"OrAssignment\", \"|=\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * an integral literal expression of type {@code int}.\n */\n INT_LITERAL(LiteralTree.class, \"IntLiteral\", \"int\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * an integral literal expression of type {@code long}.\n */\n LONG_LITERAL(LiteralTree.class, \"LongLiteral\", \"long\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a floating-point literal expression of type {@code float}.\n */\n FLOAT_LITERAL(LiteralTree.class, \"FloatLiteral\", \"float\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a floating-point literal expression of type {@code double}.\n */\n DOUBLE_LITERAL(LiteralTree.class, \"DoubleLiteral\", \"double\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a boolean literal expression of type {@code boolean}.\n */\n BOOLEAN_LITERAL(LiteralTree.class, \"BooleanLiteral\", \"boolean\", \"bool\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a character literal expression of type {@code char}.\n */\n CHAR_LITERAL(LiteralTree.class, \"CharLiteral\", \"char\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a string literal expression of type {@link String}.\n */\n STRING_LITERAL(LiteralTree.class, \"StringLiteral\", \"string\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * the use of {@code null}.\n */\n NULL_LITERAL(LiteralTree.class, \"NullLiteral\", \"null\", \"literal\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * an unbounded wildcard type argument.\n */\n UNBOUNDED_WILDCARD(WildcardTree.class, \"UnboundedWildcard\", \"?\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * an extends bounded wildcard type argument.\n */\n EXTENDS_WILDCARD(WildcardTree.class, \"ExtendsWildcard\", \"?extends\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * a super bounded wildcard type argument.\n */\n SUPER_WILDCARD(WildcardTree.class, \"SuperWildcard\", \"?super\"),\n\n /**\n * Used for instances of {@link ErroneousTree}.\n */\n ERRONEOUS(ErroneousTree.class, \"Erroneous\", \"ERROR\", \"error\"),\n\n /**\n * Used for instances of {@link ClassTree} representing interfaces.\n */\n INTERFACE(ClassTree.class, \"Interface\", \"interface\"),\n\n /**\n * Used for instances of {@link ClassTree} representing enums.\n */\n ENUM(ClassTree.class, \"Enum\", \"enum\"),\n\n /**\n * Used for instances of {@link ClassTree} representing annotation types.\n */\n ANNOTATION_TYPE(ClassTree.class, \"AnnotationType\", \"At\"),\n\n /**\n * An implementation-reserved node. This is the not the node\n * you are looking for.\n */\n OTHER(null, \"Other\");\n\n\n\t\tKind(Class<? extends Tree> intf, String displayName, String... prefixAliases) {\n associatedInterface = intf;\n this.displayName = displayName;\n this.preferredPrefix = (displayName != null)? displayName : toString();\n this.preferredPrefixLowerCase = preferredPrefix.toLowerCase();\n if (prefixAliases == null) prefixAliases = new String[0];\n this.prefixAliases = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(prefixAliases)));\n Set<String> tmpPrefixAliasesLowerCase = new HashSet<String>();\n for(String e : prefixAliases) {\n \ttmpPrefixAliasesLowerCase.add(e.toLowerCase());\n }\n this.prefixAliasesLowerCase = Collections.unmodifiableSet(tmpPrefixAliasesLowerCase);\n }\n\n private final Class<? extends Tree> associatedInterface;\n \n private final String displayName;\n \n private final String preferredPrefix;\n\n private final String preferredPrefixLowerCase;\n\n private final Set<String> prefixAliases;\n \n private final Set<String> prefixAliasesLowerCase;\n\n\n public Class<? extends Tree> asInterface() {\n return associatedInterface;\n }\n\n public String getDisplayName() {\n\t\t\treturn displayName;\n\t\t}\n\n\t\tpublic String preferredPrefix() {\n \treturn preferredPrefix;\n }\n\n public boolean hasAliasPrefix(String prefix) {\n \treturn prefixAliases.contains(prefix);\n }\n\n public boolean acceptPrefix(String prefix) {\n \tif (prefix == null) return false;\n \treturn preferredPrefix.equals(prefix)\n \t\t\t|| prefixAliases.contains(prefix);\n }\n\n public boolean acceptPrefixIgnoreCase(String prefix) {\n \tif (prefix == null) return false;\n \tString prefixLowerCase = prefix.toLowerCase();\n \treturn preferredPrefixLowerCase.equals(prefixLowerCase)\n \t\t\t|| prefixAliasesLowerCase.contains(prefixLowerCase);\n }\n\n }\n\n /**\n * Gets the kind of this tree.\n *\n * @return the kind of this tree.\n */\n Kind getKind();\n\n /**\n * Accept method used to implement the visitor pattern. The\n * visitor pattern is used to implement operations on trees.\n *\n * @param <R> result type of this operation.\n * @param <D> type of additional data.\n */\n <R,D> R accept(TreeVisitor<R,D> visitor, D data);\n\n /**\n * @since jdk1.8-ARN\n */\n List<? extends ASTExtensionTree> getASTExtensions();\n\n /**\n * @since jdk1.8-ARN\n */\n List<ASTAnnotationTree> getASTAnnotations();\n \n \n}", "public Rectangle getRectangle();", "private void setBox(){\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 1;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 2;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 3;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 4;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 5;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 6;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 7;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 8;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 9;\n\t\t\t\t\treturn;\n\t\t}\n\t}", "protected void createBracketsFieldEditors(Composite appearanceComposite) {\n Label spacer = new Label(appearanceComposite, SWT.LEFT);\n GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);\n gd.horizontalSpan = 2;\n gd.heightHint = convertHeightInCharsToPixels(1) / 2;\n spacer.setLayoutData(gd);\n\n String label = \"Bracket highlighting\";\n\n bracketHighlightingCheckbox = addButton(appearanceComposite, SWT.CHECK, label, 0, new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n matchingBrackets = bracketHighlightingCheckbox.getSelection();\n }\n });\n\n Composite radioComposite = new Composite(appearanceComposite, SWT.NONE);\n GridLayout radioLayout = new GridLayout();\n radioLayout.marginWidth = 0;\n radioLayout.marginHeight = 0;\n radioComposite.setLayout(radioLayout);\n\n label = \"highlight matching bracket\";\n matchingBracketRadioButton = addButton(radioComposite, SWT.RADIO, label, 0, new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (matchingBracketRadioButton.getSelection()) {\n highlightBracketAtCaretLocation = false;\n }\n }\n });\n createDependency(bracketHighlightingCheckbox, matchingBracketRadioButton);\n\n label = \"highlight matching bracket and caret location\";\n matchingBracketAndCaretLocationRadioButton = addButton(radioComposite, SWT.RADIO, label, 0, new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (matchingBracketAndCaretLocationRadioButton.getSelection()) {\n highlightBracketAtCaretLocation = true;\n }\n }\n });\n createDependency(bracketHighlightingCheckbox, matchingBracketAndCaretLocationRadioButton);\n\n label = \"highlight enclosing brackets\";\n enclosingBracketsRadioButton = addButton(radioComposite, SWT.RADIO, label, 0, new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n boolean selection = enclosingBracketsRadioButton.getSelection();\n enclosingBrackets = selection;\n if (selection) {\n highlightBracketAtCaretLocation = true;\n }\n }\n });\n createDependency(bracketHighlightingCheckbox, enclosingBracketsRadioButton);\n\n matchingBracketsColor = new ColorFieldEditor(P_EDITOR_MATCHING_BRACKETS_COLOR.getId(), \"Matching brackets color\", radioComposite);\n addField(matchingBracketsColor);\n createDependency(bracketHighlightingCheckbox, matchingBracketsColor.getLabelControl(radioComposite));\n createDependency(bracketHighlightingCheckbox, matchingBracketsColor.getColorSelector().getButton());\n\n autoCreateEndBrackets = new BooleanFieldEditor(P_EDITOR_AUTO_CREATE_END_BRACKETSY.getId(), \"Auto create ending brackets\", getFieldEditorParent());\n addField(autoCreateEndBrackets);\n\n onlyStrictCodeCompletion = new BooleanFieldEditor(P_EDITOR_SHOW_ALSO_NON_STRICT_CODE_PROPOSALS.getId(), \"Show also NON strict code proposals\", getFieldEditorParent());\n onlyStrictCodeCompletion.getDescriptionControl(getFieldEditorParent()).setToolTipText(\n \"When enabled even code proposals for not correct context situations are proposed (but with a warn icon).\\n\\nYou need to close editors and open again when changing this value!\");\n addField(onlyStrictCodeCompletion);\n\n }", "public interface DGeom {\n\n\t/** the maximum number of user classes that are supported. */\n\t//\tenum {\n\tpublic static final int dMaxUserClasses = 4;\n\t//\t};\n\n\t/** \n\t * class numbers - each geometry object needs a unique number.\n\t * (TZ) This has not been made an 'enum' to leave it easily extensible\n\t * for user defined classes.\n\t */\n\t//\tenum {\n\tpublic static final int dSphereClass = 0;\n\tpublic static final int dBoxClass = 1;\n\tpublic static final int dCapsuleClass = 2;\n\tpublic static final int dCylinderClass = 3;\n\tpublic static final int dPlaneClass = 4;\n\tpublic static final int dRayClass = 5;\n\tpublic static final int dConvexClass = 6;\n\tpublic static final int dGeomTransformClass = 7;\n\tpublic static final int dTriMeshClass = 8;\n\tpublic static final int dHeightfieldClass = 9;\n\n\tpublic static final int dFirstSpaceClass = 10;\n\tpublic static final int dSimpleSpaceClass = dFirstSpaceClass; //10\n\tpublic static final int dHashSpaceClass = 11;\n\tpublic static final int dSweepAndPruneSpaceClass = 12;\n\tpublic static final int dQuadTreeSpaceClass = 13;\n\tpublic static final int dBVHSpaceClass = 14;\n\tpublic static final int dLastSpaceClass = dBVHSpaceClass; //14\n\n\t/** \n\t * ID of the first user defined class. \n\t * <b>These IDs may change between software releases!</b><br>\n\t * To avoid problem, user defined classes should have their IDs allocated \n\t * based on <tt>dFirstUserClass</tt>, for example: \n\t * <tt>int myCLassID = dFirstUserClass + x;</tt>, where (x &ge; 1). \n\t */\n\tpublic static final int dFirstUserClass = 14;\n\tpublic static final int dLastUserClass = dFirstUserClass + dMaxUserClasses - 1;\n\tpublic static final int dGeomNumClasses = dLastUserClass + 1; \n\t//\t};\n\n\n\n\tvoid DESTRUCTOR();\n\n\t/**\n\t * Destroy a geom, removing it from any space.\n\t * <p>\n\t * Destroy a geom, removing it from any space it is in first. This one\n\t * function destroys a geom of any type, but to create a geom you must call\n\t * a creation function for that type.\n\t * <p>\n\t * When a space is destroyed, if its cleanup mode is 1 (the default) then all\n\t * the geoms in that space are automatically destroyed as well.\n\t */\n\tvoid destroy();\n\n\t\n\t/**\n\t * Given a geom, this returns its class.\n\t * <p>\n\t * The ODE classes are:\n\t * <ul>\n\t * <li> dSphereClass </li>\n\t * <li> dBoxClass </li>\n\t * <li> dCylinderClass </li>\n\t * <li> dPlaneClass </li>\n\t * <li> dRayClass </li>\n\t * <li> dConvexClass </li>\n\t * <li> dGeomTransformClass </li>\n\t * <li> dTriMeshClass </li>\n\t * <li> dSimpleSpaceClass </li>\n\t * <li> dHashSpaceClass </li>\n\t * <li> dQuadTreeSpaceClass </li>\n\t * <li> dFirstUserClass </li>\n\t * <li> dLastUserClass </li>\n\t * </ul>\n\t * <p>\n\t * User-defined class will return their own number.\n\t *\n\t * @return The geom class ID.\n\t */\n\tint getClassID();\n\n\t\n\t/**\n\t * Query for the space containing a particular geom.\n\t * \n\t * @return The space that contains the geom, or NULL if the geom is\n\t * not contained by a space.\n\t */\n\tDSpace getSpace();\n\n\t\n\t/**\n\t * Set the user-defined data pointer stored in the geom.\n\t *\n\t * @param data the data pointer to be stored\n\t */\n\tvoid setData (Object data);\n\n\t\n\t/**\n\t * Get the user-defined data pointer stored in the geom.\n\t * @return user data\n\t */\n\tObject getData();\n\n\t\n\t/**\n\t * Set the body associated with a placeable geom.\n\t * <p>\n\t * Setting a body on a geom automatically combines the position vector and\n\t * rotation matrix of the body and geom, so that setting the position or\n\t * orientation of one will set the value for both objects. Setting a body\n\t * ID of zero gives the geom its own position and rotation, independent\n\t * from any body. If the geom was previously connected to a body then its\n\t * new independent position/rotation is set to the current position/rotation\n\t * of the body.\n\t * <p>\n\t * Calling these functions on a non-placeable geom results in a runtime\n\t * error in the debug build of ODE.\n\t *\n\t * @param body the body to attach to the geom\n\t */\n\tvoid setBody (DBody body);\n\n\t\n\t/**\n\t * Get the body associated with a placeable geom.\n\t * @return body object\n\t * @see #setBody(DBody)\n\t */\n\tDBody getBody();\n\n\t\n\t/**\n\t * Set the position vector of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's position will also be changed.\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t *\n\t * @param x the new X coordinate.\n\t * @param y the new Y coordinate.\n\t * @param z the new Z coordinate.\n\t * @see DBody#setPosition(double, double, double)\n\t */\n\tvoid setPosition (double x, double y, double z);\n\t\n\t\n\t/**\n\t * Set the position vector of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's position will also be changed.\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t *\n\t * @param xyz the new X, Y and Z coordinate.\n\t * @see DBody#setPosition(DVector3C)\n\t */\n\tvoid setPosition (DVector3C xyz);\n\n\n\t/**\n\t * Get the position vector of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's position will be returned.\n\t * <p>\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t * \n\t * <p>REMARK: The returned value is a pointer to the geom's internal\n\t * data structure. It is valid until any changes are made\n\t * to the geom.\n\t *\n\t * @return A pointer to the geom's position vector.\n\t * @see DBody#getPosition()\n\t */\n\tDVector3C getPosition();\n\n\t\n\t/**\n\t * Copy the position of a geom into a vector.\n\t * @param pos a copy of the geom position\n\t * @see #getPosition()\n\t */\n\tvoid copyPosition (DVector3 pos);\n\n\t/**\n\t * Set the rotation matrix of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's rotation will also be changed.\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t *\n\t * @param R the new rotation matrix.\n\t * @see DBody#setRotation(DMatrix3C)\n\t */\n\tvoid setRotation (DMatrix3C R);\n\t\n\t\n\t/**\n\t * Get the rotation matrix of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's rotation will be returned.\n\t * <p>\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t * \n\t * <p>REMARK: The returned value is a pointer to the geom's internal\n\t * data structure. It is valid until any changes are made\n\t * to the geom.\n\t *\n\t * @return A pointer to the geom's rotation matrix.\n\t * @see DBody#getRotation()\n\t */\n\tDMatrix3C getRotation();\n\t\n\t\n\t/**\n\t * Get the rotation matrix of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's rotation will be returned.\n\t * <p>\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t *\n\t * @param R a copy of the geom rotation\n\t * @see #getRotation()\n\t */\n\tvoid copyRotation(DMatrix3 R);\n\n\n\t/**\n\t * Set the rotation of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's rotation will also be changed.\n\t * <p>\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t *\n\t * @param quat the new rotation.\n\t * @see DBody#setQuaternion(DQuaternionC)\n\t */\n\tvoid setQuaternion (DQuaternionC quat);\n\n\t\n\t/**\n\t * Get the rotation quaternion of a placeable geom.\n\t * <p>\n\t * If the geom is attached to a body, the body's quaternion will be returned.\n\t * <p>\n\t * Calling this function on a non-placeable geom results in a runtime error in\n\t * the debug build of ODE.\n\t * @return Rotation quaternion\n\t *\n\t * @see DBody#getQuaternion()\n\t */\n\tDQuaternionC getQuaternion ();\n\n\t\n\t/**\n\t * Return the axis-aligned bounding box.\n\t * <p>\n\t * Return in aabb an axis aligned bounding box that surrounds the given geom.\n\t * The aabb array has elements (minx, maxx, miny, maxy, minz, maxz). If the\n\t * geom is a space, a bounding box that surrounds all contained geoms is\n\t * returned.\n\t * <p>\n\t * This function may return a pre-computed cached bounding box, if it can\n\t * determine that the geom has not moved since the last time the bounding\n\t * box was computed.\n\t * @return bounding box\n\t */\n\tDAABBC getAABB ();\n\n\t\n//\t/**\n//\t * Determing if a geom is a space.\n//\t * @param geom the geom to query\n//\t * @return Non-zero if the geom is a space, zero otherwise.\n//\t */\n\t//\tint isSpace();\n\n\t\n\t/**\n\t * Set the \"category\" bitfield for the given geom.\n\t * <p>\n\t * The category bitfield is used by spaces to govern which geoms will\n\t * interact with each other. The bitfield is guaranteed to be at least\n\t * 32 bits wide. The default category values for newly created geoms\n\t * have all bits set.\n\t *\n\t * @param bits the new bitfield value\n\t */\n\tvoid setCategoryBits (long bits);//unsigned long bits)\n\t\n\t\n\t/**\n\t * Set the \"collide\" bitfield for the given geom.\n\t * <p>\n\t * The collide bitfield is used by spaces to govern which geoms will\n\t * interact with each other. The bitfield is guaranteed to be at least\n\t * 32 bits wide. The default category values for newly created geoms\n\t * have all bits set.\n\t *\n\t * @param bits the new bitfield value\n\t */\n\tvoid setCollideBits (long bits);//unsigned long bits)\n\t\n\t\n\t/**\n\t * Get the \"category\" bitfield for the given geom.\n\t *\n\t * @return The bitfield value\n\t * @see #setCategoryBits(long)\n\t */\n\t//unsigned \n\tlong getCategoryBits();\n\t\n\t\n\t/**\n\t * Get the \"collide\" bitfield for the given geom.\n\t *\n\t * @return The bitfield value\n\t * @see #setCollideBits(long)\n\t */\n\t//unsigned \n\tlong getCollideBits();\n\n\t\n\t/**\n\t * Enable a geom.\n\t * <p>\n\t * Disabled geoms are completely ignored by dSpaceCollide and dSpaceCollide2,\n\t * although they can still be members of a space. New geoms are created in\n\t * the enabled state.\n\t *\n\t * @see #disable()\n\t * @see #isEnabled()\n\t */\n\tvoid enable();\n\t\n\t\n\t/**\n\t * Disable a geom.\n\t * <p>\n\t * Disabled geoms are completely ignored by dSpaceCollide and dSpaceCollide2,\n\t * although they can still be members of a space. New geoms are created in\n\t * the enabled state.\n\t *\n\t * @see #enable()\n\t * @see #isEnabled()\n\t */\n\tvoid disable();\n\t\n\t\n\t/**\n\t * Check to see if a geom is enabled.\n\t * <p>\n\t * Disabled geoms are completely ignored by dSpaceCollide and dSpaceCollide2,\n\t * although they can still be members of a space. New geoms are created in\n\t * the enabled state.\n\t *\n\t * @return Non-zero if the geom is enabled, zero otherwise.\n\t * @see #disable()\n\t * @see #enable()\n\t */\n\tboolean isEnabled();\n\n\t\n\t/**\n\t * User callback for geom-geom collision testing.\n\t *\n\t * <p>REMARK: The callback function can call dCollide on o1 and o2 to generate\n\t * contact points between each pair. Then these contact points may be added\n\t * to the simulation as contact joints. The user's callback function can of\n\t * course chose not to call dCollide for any pair, e.g. if the user decides\n\t * that those pairs should not interact.\n\t */\n\t//typedef void dNearCallback (void *data, dGeom o1, dGeom o2);\n\tpublic interface DNearCallback {\n\t /**\n\t * @param data The user data object, as passed to dSpaceCollide.\n\t * @param o1 The first geom being tested.\n\t * @param o2 The second geom being test.\n\t */\n\t\tpublic void call (Object data, DGeom o1, DGeom o2);\n\t}\n\n\tvoid collide2 (DGeom g, Object data, DNearCallback callback);\n\n\n\t\n\n//\tenum CONTROL_CLASS {\n//\t dGeomCommonControlClass,// = 0,\n//\t dGeomColliderControlClass;// = 1\n//\t}\n//\n//\tenum CONTROL_CODE {\n//\t dGeomCommonAnyControlCode,// = 0,\n//\t dGeomColliderSetMergeSphereContactsControlCode,// = 1,\n//\t dGeomColliderGetMergeSphereContactsControlCode;// = 2\n//\t}\n//\n//\tenum COLLIDER_MERGE_CONTACTS_VALUE {\n//\t dGeomColliderMergeContactsValue__Default,// = 0, // Used with Set... to restore default value\n//\t dGeomColliderMergeContactsValue_None,// = 1,\n//\t dGeomColliderMergeContactsValue_Normals,// = 2,\n//\t dGeomColliderMergeContactsValue_Full;// = 3\n//\t}\n//\n//\t/**\n//\t * \n//\t *\n//\t * @author Tilmann Zaeschke\n//\t * @deprecated not implemented yet.\n//\t */\n//\tstatic interface DataValue {};\n//\t\n//\t/**\n//\t * Execute low level control operation for geometry.\n//\t *\n//\t * The variable the dataSize points to must be initialized before the call.\n//\t * If the size does not match the one expected for the control class/code function\n//\t * changes it to the size expected and returns failure. This implies the function \n//\t * can be called with NULL data and zero size to test if control class/code is supported\n//\t * and obtain required data size for it.\n//\t * <p>\n//\t * dGeomCommonAnyControlCode applies to any control class and returns success if \n//\t * at least one control code is available for the given class with given geom.\n//\t * <br>\n//\t * Currently there are the folliwing control classes supported:<br>\n//\t * <li> dGeomColliderControlClass</li>\n//\t * <p>\n//\t * For dGeomColliderControlClass there are the following codes available:<br>\n//\t * <li> dGeomColliderSetMergeSphereContactsControlCode (arg of type int, dGeomColliderMergeContactsValue_*)</li>\n//\t * <li> dGeomColliderGetMergeSphereContactsControlCode (arg of type int, dGeomColliderMergeContactsValue_*)</li>\n//\t * \n//\t * @param controlClass the control class\n//\t * @param controlCode the control code for the class\n//\t * @param dataValue the control argument pointer\n//\t * @param dataSize the control argument size provided or expected\n//\t * @return Boolean execution status\n//\t */\n//\tboolean lowLevelControl(CONTROL_CLASS controlClass, CONTROL_CODE controlCode, \n//\t\t\tDataValue dataValue, RefInt dataSize);\n\n\n\t/**\n\t * Get world position of a relative point on geom.\n\t *\n\t * Calling this function on a non-placeable geom results in the same point being\n\t * returned.\n\t * @param px px\n\t * @param py py\n\t * @param pz pz\n\t *\n\t * @param result will contain the result.\n\t */\n\tvoid getRelPointPos(double px, double py, double pz, DVector3 result);\n\n\t/**\n\t * Takes a point in global coordinates and returns\n\t * the point's position in geom-relative coordinates.\n\t *\n\t * Calling this function on a non-placeable geom results in the same point being\n\t * returned.\n\t *\n\t * <p>REMARK:\n\t * This is the inverse of dGeomGetRelPointPos()\n\t * \n\t * @param px px\n\t * @param py py\n\t * @param pz pz\n\t * @param result will contain the result.\n\t */\n\tvoid getPosRelPoint(double px, double py, double pz, DVector3 result);\n\n\t/**\n\t * Convert from geom-local to world coordinates.\n\t *\n\t * Calling this function on a non-placeable geom results in the same vector being\n\t * returned.\n\t *\n\t * @param px px\n\t * @param py py\n\t * @param pz pz\n\t * @param result will contain the result.\n\t */\n\tvoid vectorToWorld(double px, double py, double pz, DVector3 result);\n\n\t/**\n\t * Convert from world to geom-local coordinates.\n\t *\n\t * Calling this function on a non-placeable geom results in the same vector being\n\t * returned.\n\t *\n\t * @param px px\n\t * @param py py\n\t * @param pz pz\n\t * @param result will contain the result.\n\t */\n\tvoid vectorFromWorld(double px, double py, double pz, DVector3 result);\n\n\t\n\t/**\n\t * Get the offset position vector of a geom.\n\t * <p>\n\t * Returns the positional offset of the geom in local coordinates.\n\t * If the geom has no offset, this function returns the zero vector.\n\t * \n\t * <p>REMARK: The returned value is a pointer to the geom's internal\n\t * data structure. It is valid until any changes are made\n\t * to the geom.\n\t *\n\t * @return A pointer to the geom's offset vector.\n\t */\n\tDVector3C getOffsetPosition();\n\n\t\n\t/**\n\t * Copy the offset position vector of a geom.\n\t * <p>\n\t * Returns the positional offset of the geom in local coordinates.\n\t * If the geom has no offset, this function returns the zero vector.\n\t *\n\t * @param pos returns the offset position\n\t */\n\tvoid copyOffsetPosition (DVector3 pos);\n\t\n\t\n\t/**\n\t * Set the local offset position of a geom from its body.\n\t * <p>\n\t * Sets the geom's positional offset in local coordinates.\n\t * After this call, the geom will be at a new position determined from the\n\t * body's position and the offset.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param x the new X coordinate.\n\t * @param y the new Y coordinate.\n\t * @param z the new Z coordinate.\n\t */\n\tvoid setOffsetPosition(double x, double y, double z);\n\t/**\n\t * \n\t * @param xyz xyz\n\t * @see #setOffsetPosition(double, double, double) \n\t */\n\tvoid setOffsetPosition(DVector3C xyz);\n\n\t\n\t/**\n\t * Get the offset rotation matrix of a geom.\n\t * <p>\n\t * Returns the rotational offset of the geom in local coordinates.\n\t * If the geom has no offset, this function returns the identity\n\t * matrix.\n\t * \n\t * <p>REMARK: The returned value is a pointer to the geom's internal\n\t * data structure. It is valid until any changes are made\n\t * to the geom.\n\t *\n\t * @return A pointer to the geom's offset rotation matrix.\n\t */\n\tDMatrix3C getOffsetRotation();\n\t\n\t\n\t/**\n\t * Copy the offset rotation matrix of a geom.\n\t * <p>\n\t * Returns the rotational offset of the geom in local coordinates.\n\t * If the geom has no offset, this function returns the identity\n\t * matrix.\n\t *\n\t * @param R returns the rotation matrix.\n\t */\n\tvoid copyOffsetRotation (DMatrix3 R);\n\n\t\n\t/**\n\t * Set the local offset rotation matrix of a geom from its body.\n\t * <p>\n\t * Sets the geom's rotational offset in local coordinates.\n\t * After this call, the geom will be at a new position determined from the\n\t * body's position and the offset.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param R the new rotation matrix.\n\t */\n\tvoid setOffsetRotation(DMatrix3C R);\n\t\n\t\n\t/**\n\t * Get the offset rotation quaternion of a geom.\n\t *\n\t * Returns the rotation offset of the geom as a quaternion.\n\t * If the geom has no offset, the identity quaternion is returned.\n\t *\n\t * @param result a copy of the rotation quaternion.\n\t */\n\tvoid getOffsetQuaternion(DQuaternion result);\n\n\t\n\t/**\n\t * Set the local offset rotation of a geom from its body.\n\t * <p>\n\t * Sets the geom's rotational offset in local coordinates.\n\t * After this call, the geom will be at a new position determined from the\n\t * body's position and the offset.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param q the new rotation.\n\t */\n\tvoid setOffsetQuaternion(DQuaternionC q);\n\n\t\n\t/**\n\t * Set the offset position of a geom from its body.\n\t * <p>\n\t * Sets the geom's positional offset to move it to the new world\n\t * coordinates.\n\t * After this call, the geom will be at the world position passed in,\n\t * and the offset will be the difference from the current body position.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param x the new X coordinate.\n\t * @param y the new Y coordinate.\n\t * @param z the new Z coordinate.\n\t */\n\tvoid setOffsetWorldPosition(double x, double y, double z);\n\n\t\n\t/**\n\t * Set the offset rotation of a geom from its body.\n\t * <p>\n\t * Sets the geom's rotational offset to orient it to the new world\n\t * rotation matrix.\n\t * After this call, the geom will be at the world orientation passed in,\n\t * and the offset will be the difference from the current body orientation.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param R the new rotation matrix.\n\t */\n\tvoid setOffsetWorldRotation(DMatrix3C R);\n\t\n\t\n\t/**\n\t * Set the offset rotation of a geom from its body.\n\t * <p>\n\t * Sets the geom's rotational offset to orient it to the new world\n\t * rotation matrix.\n\t * After this call, the geom will be at the world orientation passed in,\n\t * and the offset will be the difference from the current body orientation.\n\t * The geom must be attached to a body.\n\t * If the geom did not have an offset, it is automatically created.\n\t *\n\t * @param q the new rotation.\n\t */\n\tvoid setOffsetWorldQuaternion(DQuaternionC q);\n\t\n\t\n\t/**\n\t * Clear any offset from the geom.\n\t * <p>\n\t * If the geom has an offset, it is eliminated and the geom is\n\t * repositioned at the body's position. If the geom has no offset,\n\t * this function does nothing.\n\t * This is more efficient than calling dGeomSetOffsetPosition(zero)\n\t * and dGeomSetOffsetRotation(identiy), because this function actually\n\t * eliminates the offset, rather than leaving it as the identity transform.\n\t *\n\t */\n\tvoid clearOffset();\n\t\n\t\n\t/**\n\t * Check to see whether the geom has an offset.\n\t * <p>\n\t * This function will return non-zero if the offset has been created.\n\t * Note that there is a difference between a geom with no offset,\n\t * and a geom with an offset that is the identity transform.\n\t * In the latter case, although the observed behaviour is identical,\n\t * there is a unnecessary computation involved because the geom will\n\t * be applying the transform whenever it needs to recalculate its world\n\t * position.\n\t *\n\t * @return Non-zero if the geom has an offset, zero otherwise.\n\t */\n\tboolean isOffset();\n}", "Box(Box ob)\n\t{\n\t\t//pass object to constructor\n\t\twidth = ob.width;\n\t\theight = ob.height;\n\t\tdepth = ob.depth;\n\t\t\n\t\t\n\t}", "public BRectangle2D\ngetNucSymbolBoundingBox()\nthrows Exception\n{\n\tBRectangle2D rect = (BRectangle2D)\n\t\tthis.getNucDrawObject().getBoundingBox().clone();\n\tif (rect == null)\n\t\treturn (null);\n\t\n\trect.setRect(rect.getX() + this.getX(), rect.getY() - this.getY(),\n\t\trect.getWidth(), rect.getHeight());\n\treturn (rect);\n}", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "interface DefinitionStages {\n /** The first stage of the Lab definition. */\n interface Blank extends WithLocation {\n }\n /** The stage of the Lab definition allowing to specify location. */\n interface WithLocation {\n /**\n * Specifies the region for the resource.\n *\n * @param location The geo-location where the resource lives.\n * @return the next definition stage.\n */\n WithResourceGroup withRegion(Region location);\n\n /**\n * Specifies the region for the resource.\n *\n * @param location The geo-location where the resource lives.\n * @return the next definition stage.\n */\n WithResourceGroup withRegion(String location);\n }\n /** The stage of the Lab definition allowing to specify parent resource. */\n interface WithResourceGroup {\n /**\n * Specifies resourceGroupName.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @return the next definition stage.\n */\n WithCreate withExistingResourceGroup(String resourceGroupName);\n }\n /**\n * The stage of the Lab definition which contains all the minimum required properties for the resource to be\n * created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate\n extends DefinitionStages.WithTags,\n DefinitionStages.WithNetworkProfile,\n DefinitionStages.WithAutoShutdownProfile,\n DefinitionStages.WithConnectionProfile,\n DefinitionStages.WithVirtualMachineProfile,\n DefinitionStages.WithSecurityProfile,\n DefinitionStages.WithRosterProfile,\n DefinitionStages.WithLabPlanId,\n DefinitionStages.WithTitle,\n DefinitionStages.WithDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n Lab create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n Lab create(Context context);\n }\n /** The stage of the Lab definition allowing to specify tags. */\n interface WithTags {\n /**\n * Specifies the tags property: Resource tags..\n *\n * @param tags Resource tags.\n * @return the next definition stage.\n */\n WithCreate withTags(Map<String, String> tags);\n }\n /** The stage of the Lab definition allowing to specify networkProfile. */\n interface WithNetworkProfile {\n /**\n * Specifies the networkProfile property: The network profile for the lab, typically applied via a lab plan.\n * This profile cannot be modified once a lab has been created..\n *\n * @param networkProfile The network profile for the lab, typically applied via a lab plan. This profile\n * cannot be modified once a lab has been created.\n * @return the next definition stage.\n */\n WithCreate withNetworkProfile(LabNetworkProfile networkProfile);\n }\n /** The stage of the Lab definition allowing to specify autoShutdownProfile. */\n interface WithAutoShutdownProfile {\n /**\n * Specifies the autoShutdownProfile property: The resource auto shutdown configuration for the lab. This\n * controls whether actions are taken on resources that are sitting idle..\n *\n * @param autoShutdownProfile The resource auto shutdown configuration for the lab. This controls whether\n * actions are taken on resources that are sitting idle.\n * @return the next definition stage.\n */\n WithCreate withAutoShutdownProfile(AutoShutdownProfile autoShutdownProfile);\n }\n /** The stage of the Lab definition allowing to specify connectionProfile. */\n interface WithConnectionProfile {\n /**\n * Specifies the connectionProfile property: The connection profile for the lab. This controls settings such\n * as web access to lab resources or whether RDP or SSH ports are open..\n *\n * @param connectionProfile The connection profile for the lab. This controls settings such as web access to\n * lab resources or whether RDP or SSH ports are open.\n * @return the next definition stage.\n */\n WithCreate withConnectionProfile(ConnectionProfile connectionProfile);\n }\n /** The stage of the Lab definition allowing to specify virtualMachineProfile. */\n interface WithVirtualMachineProfile {\n /**\n * Specifies the virtualMachineProfile property: The profile used for creating lab virtual machines..\n *\n * @param virtualMachineProfile The profile used for creating lab virtual machines.\n * @return the next definition stage.\n */\n WithCreate withVirtualMachineProfile(VirtualMachineProfile virtualMachineProfile);\n }\n /** The stage of the Lab definition allowing to specify securityProfile. */\n interface WithSecurityProfile {\n /**\n * Specifies the securityProfile property: The lab security profile..\n *\n * @param securityProfile The lab security profile.\n * @return the next definition stage.\n */\n WithCreate withSecurityProfile(SecurityProfile securityProfile);\n }\n /** The stage of the Lab definition allowing to specify rosterProfile. */\n interface WithRosterProfile {\n /**\n * Specifies the rosterProfile property: The lab user list management profile..\n *\n * @param rosterProfile The lab user list management profile.\n * @return the next definition stage.\n */\n WithCreate withRosterProfile(RosterProfile rosterProfile);\n }\n /** The stage of the Lab definition allowing to specify labPlanId. */\n interface WithLabPlanId {\n /**\n * Specifies the labPlanId property: The ID of the lab plan. Used during resource creation to provide\n * defaults and acts as a permission container when creating a lab via labs.azure.com. Setting a labPlanId\n * on an existing lab provides organization...\n *\n * @param labPlanId The ID of the lab plan. Used during resource creation to provide defaults and acts as a\n * permission container when creating a lab via labs.azure.com. Setting a labPlanId on an existing lab\n * provides organization..\n * @return the next definition stage.\n */\n WithCreate withLabPlanId(String labPlanId);\n }\n /** The stage of the Lab definition allowing to specify title. */\n interface WithTitle {\n /**\n * Specifies the title property: The title of the lab..\n *\n * @param title The title of the lab.\n * @return the next definition stage.\n */\n WithCreate withTitle(String title);\n }\n /** The stage of the Lab definition allowing to specify description. */\n interface WithDescription {\n /**\n * Specifies the description property: The description of the lab..\n *\n * @param description The description of the lab.\n * @return the next definition stage.\n */\n WithCreate withDescription(String description);\n }\n }", "public interface TextBox\n{\n\tpublic void setBounds(Vector2 position, Vector2 size);\n\t\n\tpublic void setText(String string);\n}", "interface Literals\n {\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.DotLanguageImpl <em>Dot Language</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguageImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getDotLanguage()\n * @generated\n */\n EClass DOT_LANGUAGE = eINSTANCE.getDotLanguage();\n\n /**\n * The meta object literal for the '<em><b>Graphs</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference DOT_LANGUAGE__GRAPHS = eINSTANCE.getDotLanguage_Graphs();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.GraphImpl <em>Graph</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.GraphImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getGraph()\n * @generated\n */\n EClass GRAPH = eINSTANCE.getGraph();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute GRAPH__NAME = eINSTANCE.getGraph_Name();\n\n /**\n * The meta object literal for the '<em><b>Statements</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference GRAPH__STATEMENTS = eINSTANCE.getGraph_Statements();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.DigraphImpl <em>Digraph</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.DigraphImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getDigraph()\n * @generated\n */\n EClass DIGRAPH = eINSTANCE.getDigraph();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute DIGRAPH__NAME = eINSTANCE.getDigraph_Name();\n\n /**\n * The meta object literal for the '<em><b>Statements</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference DIGRAPH__STATEMENTS = eINSTANCE.getDigraph_Statements();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.DirectedStatementImpl <em>Directed Statement</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.DirectedStatementImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getDirectedStatement()\n * @generated\n */\n EClass DIRECTED_STATEMENT = eINSTANCE.getDirectedStatement();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.UndirectedStatementImpl <em>Undirected Statement</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.UndirectedStatementImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getUndirectedStatement()\n * @generated\n */\n EClass UNDIRECTED_STATEMENT = eINSTANCE.getUndirectedStatement();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.NodeDeclarationImpl <em>Node Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.NodeDeclarationImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getNodeDeclaration()\n * @generated\n */\n EClass NODE_DECLARATION = eINSTANCE.getNodeDeclaration();\n\n /**\n * The meta object literal for the '<em><b>Node Name</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference NODE_DECLARATION__NODE_NAME = eINSTANCE.getNodeDeclaration_NodeName();\n\n /**\n * The meta object literal for the '<em><b>Optional Attributes</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference NODE_DECLARATION__OPTIONAL_ATTRIBUTES = eINSTANCE.getNodeDeclaration_OptionalAttributes();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.NodeIdImpl <em>Node Id</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.NodeIdImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getNodeId()\n * @generated\n */\n EClass NODE_ID = eINSTANCE.getNodeId();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NODE_ID__NAME = eINSTANCE.getNodeId_Name();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.AttributeListImpl <em>Attribute List</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.AttributeListImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getAttributeList()\n * @generated\n */\n EClass ATTRIBUTE_LIST = eINSTANCE.getAttributeList();\n\n /**\n * The meta object literal for the '<em><b>Attr</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ATTRIBUTE_LIST__ATTR = eINSTANCE.getAttributeList_Attr();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.AttributeImpl <em>Attribute</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.AttributeImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getAttribute()\n * @generated\n */\n EClass ATTRIBUTE = eINSTANCE.getAttribute();\n\n /**\n * The meta object literal for the '<em><b>Attribute Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute ATTRIBUTE__ATTRIBUTE_NAME = eINSTANCE.getAttribute_AttributeName();\n\n /**\n * The meta object literal for the '<em><b>Attribute Value</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute ATTRIBUTE__ATTRIBUTE_VALUE = eINSTANCE.getAttribute_AttributeValue();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.DirectedEdgeDeclarationImpl <em>Directed Edge Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.DirectedEdgeDeclarationImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getDirectedEdgeDeclaration()\n * @generated\n */\n EClass DIRECTED_EDGE_DECLARATION = eINSTANCE.getDirectedEdgeDeclaration();\n\n /**\n * The meta object literal for the '<em><b>First Node</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference DIRECTED_EDGE_DECLARATION__FIRST_NODE = eINSTANCE.getDirectedEdgeDeclaration_FirstNode();\n\n /**\n * The meta object literal for the '<em><b>Edge</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute DIRECTED_EDGE_DECLARATION__EDGE = eINSTANCE.getDirectedEdgeDeclaration_Edge();\n\n /**\n * The meta object literal for the '<em><b>Second Node</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference DIRECTED_EDGE_DECLARATION__SECOND_NODE = eINSTANCE.getDirectedEdgeDeclaration_SecondNode();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.UndirectedEdgeDeclarationImpl <em>Undirected Edge Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.UndirectedEdgeDeclarationImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getUndirectedEdgeDeclaration()\n * @generated\n */\n EClass UNDIRECTED_EDGE_DECLARATION = eINSTANCE.getUndirectedEdgeDeclaration();\n\n /**\n * The meta object literal for the '<em><b>First Node</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference UNDIRECTED_EDGE_DECLARATION__FIRST_NODE = eINSTANCE.getUndirectedEdgeDeclaration_FirstNode();\n\n /**\n * The meta object literal for the '<em><b>Edge</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute UNDIRECTED_EDGE_DECLARATION__EDGE = eINSTANCE.getUndirectedEdgeDeclaration_Edge();\n\n /**\n * The meta object literal for the '<em><b>Second Node</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference UNDIRECTED_EDGE_DECLARATION__SECOND_NODE = eINSTANCE.getUndirectedEdgeDeclaration_SecondNode();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.RightEdgeDeclarationImpl <em>Right Edge Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.RightEdgeDeclarationImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getRightEdgeDeclaration()\n * @generated\n */\n EClass RIGHT_EDGE_DECLARATION = eINSTANCE.getRightEdgeDeclaration();\n\n /**\n * The meta object literal for the '<em><b>Second Node</b></em>' reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference RIGHT_EDGE_DECLARATION__SECOND_NODE = eINSTANCE.getRightEdgeDeclaration_SecondNode();\n\n /**\n * The meta object literal for the '<em><b>Node List</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference RIGHT_EDGE_DECLARATION__NODE_LIST = eINSTANCE.getRightEdgeDeclaration_NodeList();\n\n /**\n * The meta object literal for the '{@link uk.ac.kcl.inf.dotLanguage.impl.NodeListImpl <em>Node List</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see uk.ac.kcl.inf.dotLanguage.impl.NodeListImpl\n * @see uk.ac.kcl.inf.dotLanguage.impl.DotLanguagePackageImpl#getNodeList()\n * @generated\n */\n EClass NODE_LIST = eINSTANCE.getNodeList();\n\n /**\n * The meta object literal for the '<em><b>Nodes</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference NODE_LIST__NODES = eINSTANCE.getNodeList_Nodes();\n\n }", "public void constructBoundingBox()\r\n\t{\n\t\tdouble a = m_Qmin.x;\r\n\t\tdouble b = m_Qmin.y;\r\n\t\tdouble c = m_Qmin.z;\r\n\r\n\t\tdouble d = m_Qmax.x;\r\n\t\tdouble e = m_Qmax.y;\r\n\t\tdouble f = m_Qmax.z;\r\n\r\n\t\t//constructing the vertexes of the bounding box\r\n\t\tSceneVertex A = new SceneVertex( new Vector3d(a, b, c));\r\n\t\tSceneVertex B = new SceneVertex( new Vector3d(d, b, c));\r\n\t\tSceneVertex C = new SceneVertex( new Vector3d(d, b, f));\r\n\t\tSceneVertex D = new SceneVertex( new Vector3d(d, e, f));\r\n\t\tSceneVertex E = new SceneVertex( new Vector3d(a, e, f));\r\n\t\tSceneVertex F = new SceneVertex( new Vector3d(a, e, c));\r\n\t\tSceneVertex G = new SceneVertex( new Vector3d(d, e, c));\r\n\t\tSceneVertex H = new SceneVertex( new Vector3d(a, b, f));\r\n\r\n\r\n\t\t// building the vertices arrays for the faces\r\n\t\tArrayList<SceneVertex> verArrP0front = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP0front.add(A);\r\n\t\tverArrP0front.add(B);\r\n\t\tverArrP0front.add(G);\r\n\t\tverArrP0front.add(F);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP1left = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP1left.add(A);\r\n\t\tverArrP1left.add(F);\r\n\t\tverArrP1left.add(E);\r\n\t\tverArrP1left.add(H);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP2back = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP2back.add(H);\r\n\t\tverArrP2back.add(C);\r\n\t\tverArrP2back.add(D);\r\n\t\tverArrP2back.add(E);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP3right = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP3right.add(G);\r\n\t\tverArrP3right.add(D);\r\n\t\tverArrP3right.add(C);\r\n\t\tverArrP3right.add(B);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP4bottom = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP4bottom.add(A);\r\n\t\tverArrP4bottom.add(H);\r\n\t\tverArrP4bottom.add(C);\r\n\t\tverArrP4bottom.add(B);\r\n\r\n\t\tArrayList<SceneVertex> verArrP5top = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP5top.add(F);\r\n\t\tverArrP5top.add(G);\r\n\t\tverArrP5top.add(D);\r\n\t\tverArrP5top.add(E);\r\n\t\t\r\n\t\t// creating BoundingBox\r\n\t\tm_BoundingBox = new SceneNode(DrawingMode.GL_LINE, \"BoundingBox\", null);\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP0front, \"FRONT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP1left, \"LEFT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP2back, \"BACK\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP3right, \"RIGHT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP4bottom, \"BOTTOM\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP5top, \"TOP\"));\r\n\r\n\t\t\r\n\t}", "public Box() {\n \tsuper();\n \tthis.max = new Point3d( 1, 1, 1 );\n \tthis.min = new Point3d( -1, -1, -1 );\n }", "public interface StructureDefinition {\n}", "public void addBox()\n {\n if(Student.sittingRia==false) {\n box = new BoxRia(\"chalkboard.png\",4,2);\n addObject(box,box.myRow,box.mySeat);\n chalk = new BoxRia(\"chalk.png\",0,0);\n addObject(chalk,2,3);\n }\n }", "public interface MySandBoxDisplay extends SandBoxDisplay {\n\n public ListGrid getPendingGrid();\n\n public ToolStripButton getRevertSelectionButton();\n\n public void setRevertSelectionButton(ToolStripButton revertSelectionButton);\n\n public ToolStrip getPendingToolBar();\n\n public void setPendingToolBar(ToolStrip pendingToolBar);\n\n public ToolStripButton getReclaimSelectionButton();\n\n public void setReclaimSelectionButton(ToolStripButton reclaimSelectionButton);\n\n public ToolStripButton getReclaimAllButton();\n\n public void setReclaimAllButton(ToolStripButton reclaimAllButton);\n\n public ToolStripButton getReleaseSelectionButton();\n\n public void setReleaseSelectionButton(ToolStripButton releaseSelectionButton);\n\n public ToolStripButton getReleaseAllButton();\n\n public void setReleaseAllButton(ToolStripButton releaseAllButton);\n\n public ToolStripButton getPendingRefreshButton();\n\n public void setPendingRefreshButton(ToolStripButton pendingRefreshButton);\n\n public ToolStripButton getPendingPreviewButton();\n\n public void setPendingPreviewButton(ToolStripButton pendingPreviewButton);\n \n}", "@Override\n\tpublic String getShapeType() {\n\t\treturn \"Rectangle\";\n\t}" ]
[ "0.5912644", "0.58468324", "0.577701", "0.57260156", "0.5659504", "0.5656259", "0.56333536", "0.5612145", "0.5571207", "0.5505296", "0.54796684", "0.5465019", "0.5431701", "0.5428598", "0.5401753", "0.5392079", "0.5372429", "0.536037", "0.53483254", "0.53335536", "0.53309166", "0.5325552", "0.5307965", "0.5307063", "0.52997273", "0.527687", "0.5274628", "0.5271381", "0.52713555", "0.52489823", "0.5239969", "0.5218885", "0.5215918", "0.52139574", "0.5202925", "0.5201605", "0.51974773", "0.51877034", "0.5185694", "0.5169436", "0.5158883", "0.51519066", "0.5145434", "0.5141917", "0.5138333", "0.5123398", "0.512277", "0.51173097", "0.5097343", "0.5087377", "0.5080694", "0.50773597", "0.507572", "0.50699264", "0.50674564", "0.5059849", "0.50597954", "0.50579226", "0.5057025", "0.5055471", "0.5046353", "0.5043078", "0.5041298", "0.50360227", "0.5026093", "0.5023886", "0.50186425", "0.5011917", "0.5011917", "0.50094986", "0.50091", "0.50074846", "0.5007443", "0.5007042", "0.4999257", "0.49914294", "0.49900252", "0.49866563", "0.49865398", "0.49844685", "0.49812958", "0.4978687", "0.49762928", "0.4974614", "0.49740723", "0.49738288", "0.4969861", "0.49602014", "0.49599314", "0.495851", "0.49549413", "0.49464935", "0.4946088", "0.49400643", "0.49369383", "0.49311283", "0.49299267", "0.49254882", "0.49253434", "0.49252176", "0.49230462" ]
0.0
-1
bounds.union(abstractSyntaxBox); bounds.union(treeConcreteSyntaxBox); bounds.union(staticSemanticsBox); bounds.union(checkerBox); bounds.union(interpreterBox); bounds.union(compilerBox);
public Dimension getSize() { for(Rectangle rec : boxes){ bounds.union(rec); } return bounds.getSize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();", "public void checkBounds(Scope scope) {\n}", "public DeclaredTypeListNode getBounds()throws ClassCastException;", "public void setUnionForBounds(NodeUnion<? extends DeclaredTypeListNode> bounds) throws NullPointerException;", "public Bounds getBounds () { return (bounds); }", "@Override\n\tpublic void CheckBounds() {\n\t\t\n\t}", "public BoundsUserSpace() {\n super();\n }", "public void setBounds(DeclaredTypeListNode bounds);", "public interface WiresBoundsConstraintControl extends WiresMoveControl {\n\n void setBoundsConstraint(BoundingBox boundingBox);\n\n boolean isOutOfBounds(double dx, double dy);\n\n}", "public abstract Rectangle getBounds();", "public abstract Rectangle getBounds();", "public abstract Rectangle getBounds();", "public SceneOctTree (\n Bounds bounds\n ) {\n\n this.bounds = bounds;\n\n }", "private boolean hasValidBounds() {\n\n\n\n return false;\n }", "@Test\n public void testGetOpcodeInBounds() {\n ProgramArea pa = new ProgramArea();\n\n pa.setOpCode(10, 10, 'a');\n\n Assert.assertEquals('a', pa.getOpCode(10, 10));\n }", "private float[] genBounds(TECarpentersBlock TE, int quad)\n \t{\n \t\tfloat xMin = 0.0F;\n \t\tfloat zMin = 0.0F;\n \t\tfloat xMax = 1.0F;\n \t\tfloat zMax = 1.0F;\t\t\n \t\t\n \t\tswitch (quad)\n \t\t{\n \t\tcase Collapsible.QUAD_XZNN:\n \t\t\txMax = 0.5F;\n \t\t\tzMax = 0.5F;\n \t\t\tbreak;\n \t\tcase Collapsible.QUAD_XZNP:\n \t\t\txMax = 0.5F;\n \t\t\tzMin = 0.5F;\n \t\t\tbreak;\n \t\tcase Collapsible.QUAD_XZPN:\n \t\t\txMin = 0.5F;\n \t\t\tzMax = 0.5F;\n \t\t\tbreak;\n \t\tcase Collapsible.QUAD_XZPP:\n \t\t\txMin = 0.5F;\n \t\t\tzMin = 0.5F;\n \t\t\tbreak;\n \t\t}\n \t\t\n \t\tfloat maxHeight = getMaxHeight(TE);\n \t\tfloat height = Collapsible.getQuadHeight(TE, quad) / 16.0F;\n \t\t\n \t\t/* Make quads stagger no more than 0.5F so player can always walk across them. */\n \t\tif ((maxHeight - height) > 0.5F)\n \t\t\theight = maxHeight - 0.5F;\n \t\t\n \t\treturn new float[] { xMin, 0.0F, zMin, xMax, height, zMax };\t\t\n \t}", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = range_Builder0.contractBegin(0L);\n Range.Builder range_Builder2 = new Range.Builder(0L);\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 range_Builder0.expandBegin(1734L);\n range0.equals(range_Builder1);\n Range.Builder range_Builder3 = new Range.Builder();\n range_Builder0.copy();\n Range range1 = Range.ofLength(2147483647L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n range1.getBegin(range_CoordinateSystem0);\n Range.Comparators.values();\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, 2147483647L, 430L);\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\n public void testBoundsAsCompositesWithEqAndInRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n Restriction eq = newSingleEq(cfMetaData, 0, value1);\n Restriction in = newSingleIN(cfMetaData, 1, value1, value2, value3);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(in);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(3, bounds.size());\n assertComposite(bounds.get(0), value1, value1, EOC.START);\n assertComposite(bounds.get(1), value1, value2, EOC.START);\n assertComposite(bounds.get(2), value1, value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(3, bounds.size());\n assertComposite(bounds.get(0), value1, value1, EOC.END);\n assertComposite(bounds.get(1), value1, value2, EOC.END);\n assertComposite(bounds.get(2), value1, value3, EOC.END);\n }", "public Rectangle getBounds();", "public Rectangle getBounds();", "@Test(timeout = 4000)\n public void test27() throws Throwable {\n Range range0 = Range.of(0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n range0.getBegin(range_CoordinateSystem0);\n Range range1 = Range.of(0L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range2 = Range.of(range_CoordinateSystem1, 0L, 0L);\n Object object0 = new Object();\n range2.equals(object0);\n range2.complement(range1);\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.ZERO_BASED;\n Range range3 = Range.of(range_CoordinateSystem2, 1L, 1L);\n Range.Builder range_Builder0 = new Range.Builder(range3);\n // Undeclared exception!\n try { \n range_Builder0.contractEnd(977L);\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 }", "private Bounds getBounds(final Value value, final DebugContext context)\r\n throws ViewerException {\r\n Bounds b = new Bounds();\r\n Method getBoundsMethod = value.getMethod(context,\r\n \"getBounds\", \"java.awt.Rectangle\", null);\r\n Value bounds = value.invokeMethod(context, getBoundsMethod,\r\n null);\r\n String type = value.getType(context).getName(context);\r\n int dot = type.lastIndexOf('.');\r\n if (dot >= 0) {\r\n type = type.substring(dot + 1);\r\n }\r\n b.type = type;\r\n \r\n try {\r\n Method getTextMethod = value.getMethod(context, \"getText\",\r\n \"java.lang.String\", null);\r\n Value result = value.invokeMethod(context, getTextMethod,\r\n null);\r\n if (!result.isNull()) {\r\n String str = result.toString(context);\r\n if (str.length() > 10) {\r\n str = str.substring(0, 7) + \"...\";\r\n }\r\n b.type += \" \\\"\" + str + \"\\\"\";\r\n }\r\n }\r\n catch (ViewerException e) {\r\n }\r\n \r\n b.bounds.x = bounds.getFieldValue(context, \"x\").toInt(context);\r\n b.bounds.y = bounds.getFieldValue(context, \"y\").toInt(context);\r\n b.bounds.width = bounds.getFieldValue(context, \"width\").\r\n toInt(context);\r\n b.bounds.height = bounds.getFieldValue(context, \"height\").\r\n toInt(context);\r\n if (value.isInstanceOf(context, \"java.awt.Container\")) {\r\n Method getComponentsMethod = value.getMethod(context,\r\n \"getComponents\", \"java.awt.Component[]\", null);\r\n Value children;\r\n try {\r\n children = value.invokeMethod(context,\r\n getComponentsMethod, null);\r\n }\r\n catch (ViewerException e) {\r\n b.children = new Bounds[0];\r\n return b;\r\n }\r\n b.children = new Bounds[children.getArrayLength(context)];\r\n for (int c = 0; c < b.children.length; c++) {\r\n b.children[c] = getBounds(children.getArrayElement(context,\r\n c), context);\r\n }\r\n }\r\n return b; \r\n }", "@jdk.Supported\npublic interface Tree {\n\n /**\n * Enumerates all kinds of trees.\n */\n @jdk.Supported\n public enum Kind {\n\n /**\n * Used for instance of {@link ExtendedASTAnnotationTree}\n * representing AST-level tree annotation \"@@\"\n */\n AST_ANNOTATION(null, \"ASTAnnotation\"), // ExtendedASTAnnotationTree.class ... break API compatility with visitor ...\n\n ANNOTATED_TYPE(AnnotatedTypeTree.class, \"AnnotatedType\", \"AtType\"),\n\n /**\n * Used for instances of {@link AnnotationTree}\n * representing declaration annotations.\n */\n ANNOTATION(AnnotationTree.class, \"Annotation\", \"At\"),\n\n /**\n * Used for instances of {@link AnnotationTree}\n * representing type annotations.\n */\n TYPE_ANNOTATION(AnnotationTree.class, \"TypeAnnotation\", \"Annotation\", \"At\"),\n\n /**\n * Used for instances of {@link ArrayAccessTree}.\n */\n ARRAY_ACCESS(ArrayAccessTree.class, \"ArrayAccess\"),\n\n /**\n * Used for instances of {@link ArrayTypeTree}.\n */\n ARRAY_TYPE(ArrayTypeTree.class, \"ArrayType\"),\n\n /**\n * Used for instances of {@link AssertTree}.\n */\n ASSERT(AssertTree.class, \"Assert\", \"assert\"),\n\n /**\n * Used for instances of {@link AssignmentTree}.\n */\n ASSIGNMENT(AssignmentTree.class, \"Assign\", \"Eq\", \"=\"),\n\n /**\n * Used for instances of {@link BlockTree}.\n */\n BLOCK(BlockTree.class, \"Block\", \"{}\"),\n\n /**\n * Used for instances of {@link BreakTree}.\n */\n BREAK(BreakTree.class, \"Break\", \"break\"),\n\n /**\n * Used for instances of {@link CaseTree}.\n */\n CASE(CaseTree.class, \"Case\", \"case\"),\n\n /**\n * Used for instances of {@link CatchTree}.\n */\n CATCH(CatchTree.class, \"Catch\", \"catch\"),\n\n /**\n * Used for instances of {@link ClassTree} representing classes.\n */\n CLASS(ClassTree.class, \"Class\", \"class\"),\n\n /**\n * Used for instances of {@link CompilationUnitTree}.\n */\n COMPILATION_UNIT(CompilationUnitTree.class, \"CompilationUnit\", \"cu\"),\n\n /**\n * Used for instances of {@link ConditionalExpressionTree}.\n */\n CONDITIONAL_EXPRESSION(ConditionalExpressionTree.class, \"ConditionalExpression\", \"?\"),\n\n /**\n * Used for instances of {@link ContinueTree}.\n */\n CONTINUE(ContinueTree.class, \"Continue\", \"continue\"),\n\n /**\n * Used for instances of {@link DoWhileLoopTree}.\n */\n DO_WHILE_LOOP(DoWhileLoopTree.class, \"DoWhile\", \"do\"),\n\n /**\n * Used for instances of {@link EnhancedForLoopTree}.\n */\n ENHANCED_FOR_LOOP(EnhancedForLoopTree.class, \"EnhancedForLoop\", \"for\"),\n\n /**\n * Used for instances of {@link ExpressionStatementTree}.\n */\n EXPRESSION_STATEMENT(ExpressionStatementTree.class, \"ExpressionStatement\", \"expr;\", \"e;\"),\n\n /**\n * Used for instances of {@link MemberSelectTree}.\n */\n MEMBER_SELECT(MemberSelectTree.class, \"MemberSelect\", \".\"),\n\n /**\n * Used for instances of {@link MemberReferenceTree}.\n */\n MEMBER_REFERENCE(MemberReferenceTree.class, \"MemberReference\", \"#\"),\n\n /**\n * Used for instances of {@link ForLoopTree}.\n */\n FOR_LOOP(ForLoopTree.class, \"ForLoop\", \"for\"),\n\n /**\n * Used for instances of {@link IdentifierTree}.\n */\n IDENTIFIER(IdentifierTree.class, \"Identifier\", \"id\", \"name\"),\n\n /**\n * Used for instances of {@link IfTree}.\n */\n IF(IfTree.class, \"If\", \"if\"),\n\n /**\n * Used for instances of {@link ImportTree}.\n */\n IMPORT(ImportTree.class, \"Import\", \"import\"),\n\n /**\n * Used for instances of {@link InstanceOfTree}.\n */\n INSTANCE_OF(InstanceOfTree.class, \"InstanceOf\", \"instanceof\"),\n\n /**\n * Used for instances of {@link LabeledStatementTree}.\n */\n LABELED_STATEMENT(LabeledStatementTree.class, \"LabeledStatement\", \"label\"),\n\n /**\n * Used for instances of {@link MethodTree}.\n */\n METHOD(MethodTree.class, \"Method\", \"method\"),\n\n /**\n * Used for instances of {@link MethodInvocationTree}.\n */\n METHOD_INVOCATION(MethodInvocationTree.class, \"MethodInvocation\", \"invoke\", \"call\"),\n\n /**\n * Used for instances of {@link ModifiersTree}.\n */\n MODIFIERS(ModifiersTree.class, \"Modifiers\"),\n\n /**\n * Used for instances of {@link NewArrayTree}.\n */\n NEW_ARRAY(NewArrayTree.class, \"NewArray\", \"new\"),\n\n /**\n * Used for instances of {@link NewClassTree}.\n */\n NEW_CLASS(NewClassTree.class, \"NewClass\", \"new\"),\n\n /**\n * Used for instances of {@link LambdaExpressionTree}.\n */\n LAMBDA_EXPRESSION(LambdaExpressionTree.class, \"Lambda\", \"lambda\"),\n\n /**\n * Used for instances of {@link ParenthesizedTree}.\n */\n PARENTHESIZED(ParenthesizedTree.class, \"Parenthesized\"), // should not use prefix with \"(e)\" as it might confuse the parser ?\n\n /**\n * Used for instances of {@link PrimitiveTypeTree}.\n */\n PRIMITIVE_TYPE(PrimitiveTypeTree.class, \"PrimitiveType\", \"type\"),\n\n /**\n * Used for instances of {@link ReturnTree}.\n */\n RETURN(ReturnTree.class, \"Return\", \"return\"),\n\n /**\n * Used for instances of {@link EmptyStatementTree}.\n */\n EMPTY_STATEMENT(EmptyStatementTree.class, \"EmptyStatement\", \"empty\"),\n\n /**\n * Used for instances of {@link SwitchTree}.\n */\n SWITCH(SwitchTree.class, \"Switch\", \"switch\"),\n\n /**\n * Used for instances of {@link SynchronizedTree}.\n */\n SYNCHRONIZED(SynchronizedTree.class, \"Synchronized\", \"synchronized\"),\n\n /**\n * Used for instances of {@link ThrowTree}.\n */\n THROW(ThrowTree.class, \"Throw\", \"throw\"),\n\n /**\n * Used for instances of {@link TryTree}.\n */\n TRY(TryTree.class, \"Try\", \"try\"),\n\n /**\n * Used for instances of {@link ParameterizedTypeTree}.\n */\n PARAMETERIZED_TYPE(ParameterizedTypeTree.class, \"ParameterizedType\", \"type<>\", \"type\"),\n\n /**\n * Used for instances of {@link UnionTypeTree}.\n */\n UNION_TYPE(UnionTypeTree.class, \"UnionType\", \"union\", \"|\", \"uniontype\", \"type\"),\n\n /**\n * Used for instances of {@link IntersectionTypeTree}.\n */\n INTERSECTION_TYPE(IntersectionTypeTree.class, \"IntersectionType\", \"intersectiontype\", \"type\"),\n\n /**\n * Used for instances of {@link TypeCastTree}.\n */\n TYPE_CAST(TypeCastTree.class, \"TypeCast\", \"cast\"), // should not use prefix with \"()\" as it might confuse the parser ?\n\n /**\n * Used for instances of {@link TypeParameterTree}.\n */\n TYPE_PARAMETER(TypeParameterTree.class, \"TypeParameter\", \"type\"),\n\n /**\n * Used for instances of {@link VariableTree}.\n */\n VARIABLE(VariableTree.class, \"Variable\", \"var\", \"vardecl\"),\n\n /**\n * Used for instances of {@link WhileLoopTree}.\n */\n WHILE_LOOP(WhileLoopTree.class, \"WhileLoop\", \"while\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing postfix\n * increment operator {@code ++}.\n */\n POSTFIX_INCREMENT(UnaryTree.class, \"PostfixIncrement\", \"e++\", \"++\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing postfix\n * decrement operator {@code --}.\n */\n POSTFIX_DECREMENT(UnaryTree.class, \"PostfixDecrement\", \"e--\", \"--\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing prefix\n * increment operator {@code ++}.\n */\n PREFIX_INCREMENT(UnaryTree.class, \"PrefixIncrement\", \"++e\", \"++\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing prefix\n * decrement operator {@code --}.\n */\n PREFIX_DECREMENT(UnaryTree.class, \"PrefixDecrement\", \"--e\", \"--\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing unary plus\n * operator {@code +}.\n */\n UNARY_PLUS(UnaryTree.class, \"UnaryPlus\", \"+e\", \"+\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing unary minus\n * operator {@code -}.\n */\n UNARY_MINUS(UnaryTree.class, \"UnaryMinus\", \"-e\", \"-\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing bitwise\n * complement operator {@code ~}.\n */\n BITWISE_COMPLEMENT(UnaryTree.class, \"BitwiseComplement\", \"~\"),\n\n /**\n * Used for instances of {@link UnaryTree} representing logical\n * complement operator {@code !}.\n */\n LOGICAL_COMPLEMENT(UnaryTree.class, \"LogicalComlement\", \"!\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * multiplication {@code *}.\n */\n MULTIPLY(BinaryTree.class, \"Multiply\", \"mult\", \"*\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * division {@code /}.\n */\n DIVIDE(BinaryTree.class, \"Divide\", \"div\", \"/\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * remainder {@code %}.\n */\n REMAINDER(BinaryTree.class, \"Remainder\", \"rem\", \"%\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * addition or string concatenation {@code +}.\n */\n PLUS(BinaryTree.class, \"BinaryPlus\", \"e+e\", \"+\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * subtraction {@code -}.\n */\n MINUS(BinaryTree.class, \"BinaryMinus\", \"e-e\", \"-\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * left shift {@code <<}.\n */\n LEFT_SHIFT(BinaryTree.class, \"LeftShift\", \"<<\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * right shift {@code >>}.\n */\n RIGHT_SHIFT(BinaryTree.class, \"RightShift\", \">>\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * unsigned right shift {@code >>>}.\n */\n UNSIGNED_RIGHT_SHIFT(BinaryTree.class, \"UnsignedRightShift\", \">>>\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * less-than {@code <}.\n */\n LESS_THAN(BinaryTree.class, \"LessThan\", \"lt\", \"<\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * greater-than {@code >}.\n */\n GREATER_THAN(BinaryTree.class, \"GreaterThan\", \"gt\", \">\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * less-than-equal {@code <=}.\n */\n LESS_THAN_EQUAL(BinaryTree.class, \"LessThanEqual\", \"le\", \"<=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * greater-than-equal {@code >=}.\n */\n GREATER_THAN_EQUAL(BinaryTree.class, \"GreaterThanEqual\", \"ge\", \">=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * equal-to {@code ==}.\n */\n EQUAL_TO(BinaryTree.class, \"Equals\", \"equals\", \"==\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * not-equal-to {@code !=}.\n */\n NOT_EQUAL_TO(BinaryTree.class, \"NotEquals\", \"notequals\", \"!=\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"and\" {@code &}.\n */\n AND(BinaryTree.class, \"And\", \"and\", \"&\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"xor\" {@code ^}.\n */\n XOR(BinaryTree.class, \"Xor\", \"xor\", \"^\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * bitwise and logical \"or\" {@code |}.\n */\n OR(BinaryTree.class, \"Or\", \"or\", \"|\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * conditional-and {@code &&}.\n */\n CONDITIONAL_AND(BinaryTree.class, \"ConditionalAnd\", \"&&\"),\n\n /**\n * Used for instances of {@link BinaryTree} representing\n * conditional-or {@code ||}.\n */\n CONDITIONAL_OR(BinaryTree.class, \"ConditionalOr\", \"||\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * multiplication assignment {@code *=}.\n */\n MULTIPLY_ASSIGNMENT(CompoundAssignmentTree.class, \"MultiplyAssignment\", \"*=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * division assignment {@code /=}.\n */\n DIVIDE_ASSIGNMENT(CompoundAssignmentTree.class, \"DivideAssignment\", \"/=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * remainder assignment {@code %=}.\n */\n REMAINDER_ASSIGNMENT(CompoundAssignmentTree.class, \"RemainderAssignment\", \"%=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * addition or string concatenation assignment {@code +=}.\n */\n PLUS_ASSIGNMENT(CompoundAssignmentTree.class, \"PLusAssignment\", \"+=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * subtraction assignment {@code -=}.\n */\n MINUS_ASSIGNMENT(CompoundAssignmentTree.class, \"MinusAssignment\", \"-=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * left shift assignment {@code <<=}.\n */\n LEFT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"LeftShiftAssignment\", \"<<=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * right shift assignment {@code >>=}.\n */\n RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"RightShiftAssignment\", \">>=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * unsigned right shift assignment {@code >>>=}.\n */\n UNSIGNED_RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class, \"UnsignedRightShiftAssignment\", \">>>=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"and\" assignment {@code &=}.\n */\n AND_ASSIGNMENT(CompoundAssignmentTree.class, \"AndAssignment\", \"&=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"xor\" assignment {@code ^=}.\n */\n XOR_ASSIGNMENT(CompoundAssignmentTree.class, \"XorAssignment\", \"^=\"),\n\n /**\n * Used for instances of {@link CompoundAssignmentTree} representing\n * bitwise and logical \"or\" assignment {@code |=}.\n */\n OR_ASSIGNMENT(CompoundAssignmentTree.class, \"OrAssignment\", \"|=\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * an integral literal expression of type {@code int}.\n */\n INT_LITERAL(LiteralTree.class, \"IntLiteral\", \"int\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * an integral literal expression of type {@code long}.\n */\n LONG_LITERAL(LiteralTree.class, \"LongLiteral\", \"long\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a floating-point literal expression of type {@code float}.\n */\n FLOAT_LITERAL(LiteralTree.class, \"FloatLiteral\", \"float\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a floating-point literal expression of type {@code double}.\n */\n DOUBLE_LITERAL(LiteralTree.class, \"DoubleLiteral\", \"double\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a boolean literal expression of type {@code boolean}.\n */\n BOOLEAN_LITERAL(LiteralTree.class, \"BooleanLiteral\", \"boolean\", \"bool\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a character literal expression of type {@code char}.\n */\n CHAR_LITERAL(LiteralTree.class, \"CharLiteral\", \"char\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * a string literal expression of type {@link String}.\n */\n STRING_LITERAL(LiteralTree.class, \"StringLiteral\", \"string\", \"literal\"),\n\n /**\n * Used for instances of {@link LiteralTree} representing\n * the use of {@code null}.\n */\n NULL_LITERAL(LiteralTree.class, \"NullLiteral\", \"null\", \"literal\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * an unbounded wildcard type argument.\n */\n UNBOUNDED_WILDCARD(WildcardTree.class, \"UnboundedWildcard\", \"?\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * an extends bounded wildcard type argument.\n */\n EXTENDS_WILDCARD(WildcardTree.class, \"ExtendsWildcard\", \"?extends\"),\n\n /**\n * Used for instances of {@link WildcardTree} representing\n * a super bounded wildcard type argument.\n */\n SUPER_WILDCARD(WildcardTree.class, \"SuperWildcard\", \"?super\"),\n\n /**\n * Used for instances of {@link ErroneousTree}.\n */\n ERRONEOUS(ErroneousTree.class, \"Erroneous\", \"ERROR\", \"error\"),\n\n /**\n * Used for instances of {@link ClassTree} representing interfaces.\n */\n INTERFACE(ClassTree.class, \"Interface\", \"interface\"),\n\n /**\n * Used for instances of {@link ClassTree} representing enums.\n */\n ENUM(ClassTree.class, \"Enum\", \"enum\"),\n\n /**\n * Used for instances of {@link ClassTree} representing annotation types.\n */\n ANNOTATION_TYPE(ClassTree.class, \"AnnotationType\", \"At\"),\n\n /**\n * An implementation-reserved node. This is the not the node\n * you are looking for.\n */\n OTHER(null, \"Other\");\n\n\n\t\tKind(Class<? extends Tree> intf, String displayName, String... prefixAliases) {\n associatedInterface = intf;\n this.displayName = displayName;\n this.preferredPrefix = (displayName != null)? displayName : toString();\n this.preferredPrefixLowerCase = preferredPrefix.toLowerCase();\n if (prefixAliases == null) prefixAliases = new String[0];\n this.prefixAliases = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(prefixAliases)));\n Set<String> tmpPrefixAliasesLowerCase = new HashSet<String>();\n for(String e : prefixAliases) {\n \ttmpPrefixAliasesLowerCase.add(e.toLowerCase());\n }\n this.prefixAliasesLowerCase = Collections.unmodifiableSet(tmpPrefixAliasesLowerCase);\n }\n\n private final Class<? extends Tree> associatedInterface;\n \n private final String displayName;\n \n private final String preferredPrefix;\n\n private final String preferredPrefixLowerCase;\n\n private final Set<String> prefixAliases;\n \n private final Set<String> prefixAliasesLowerCase;\n\n\n public Class<? extends Tree> asInterface() {\n return associatedInterface;\n }\n\n public String getDisplayName() {\n\t\t\treturn displayName;\n\t\t}\n\n\t\tpublic String preferredPrefix() {\n \treturn preferredPrefix;\n }\n\n public boolean hasAliasPrefix(String prefix) {\n \treturn prefixAliases.contains(prefix);\n }\n\n public boolean acceptPrefix(String prefix) {\n \tif (prefix == null) return false;\n \treturn preferredPrefix.equals(prefix)\n \t\t\t|| prefixAliases.contains(prefix);\n }\n\n public boolean acceptPrefixIgnoreCase(String prefix) {\n \tif (prefix == null) return false;\n \tString prefixLowerCase = prefix.toLowerCase();\n \treturn preferredPrefixLowerCase.equals(prefixLowerCase)\n \t\t\t|| prefixAliasesLowerCase.contains(prefixLowerCase);\n }\n\n }\n\n /**\n * Gets the kind of this tree.\n *\n * @return the kind of this tree.\n */\n Kind getKind();\n\n /**\n * Accept method used to implement the visitor pattern. The\n * visitor pattern is used to implement operations on trees.\n *\n * @param <R> result type of this operation.\n * @param <D> type of additional data.\n */\n <R,D> R accept(TreeVisitor<R,D> visitor, D data);\n\n /**\n * @since jdk1.8-ARN\n */\n List<? extends ASTExtensionTree> getASTExtensions();\n\n /**\n * @since jdk1.8-ARN\n */\n List<ASTAnnotationTree> getASTAnnotations();\n \n \n}", "Rectangle getBounds();", "public abstract Type createRangeType(ReferenceType bottom);", "@Test\n public void testBoundsAsCompositesWithEqAndSliceRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n\n Restriction eq = newSingleEq(cfMetaData, 0, value3);\n\n Restriction slice = newSingleSlice(cfMetaData, 1, Bound.START, false, value1);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, EOC.END);\n\n slice = newSingleSlice(cfMetaData, 1, Bound.START, true, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, EOC.END);\n\n slice = newSingleSlice(cfMetaData, 1, Bound.END, true, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.END);\n\n slice = newSingleSlice(cfMetaData, 1, Bound.END, false, value1);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.START);\n\n slice = newSingleSlice(cfMetaData, 1, Bound.START, false, value1);\n Restriction slice2 = newSingleSlice(cfMetaData, 1, Bound.END, false, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice).mergeWith(slice2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value2, EOC.START);\n\n slice = newSingleSlice(cfMetaData, 1, Bound.START, true, value1);\n slice2 = newSingleSlice(cfMetaData, 1, Bound.END, true, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(slice).mergeWith(slice2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value1, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value3, value2, EOC.END);\n }", "void union(int p, int q) {}", "@Override\n public List<Bound> getBounds() {\n return Collections.unmodifiableList(bounds);\n }", "char[][][] getTypeParameterBounds();", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n Range range0 = Range.of(0L, 0L);\n Range.Builder range_Builder0 = new Range.Builder(range0);\n Range.Builder range_Builder1 = range_Builder0.copy();\n Range range1 = range_Builder1.build();\n long long0 = 9223372036854775807L;\n range_Builder1.shift(9223372036854775807L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n Range range2 = Range.of(range_CoordinateSystem0, 243L, 466L);\n range2.isSubRangeOf(range1);\n Range range3 = Range.of((-636L), (-636L));\n range3.complement(range2);\n range1.intersects(range3);\n // Undeclared exception!\n try { \n Range.Comparators.valueOf((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Name is null\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "@Override\npublic final void accept(TreeVisitor visitor) {\n visitor.visitWord(OpCodes.OR_NAME);\n if (ops != null) {\n for (int i = 0; i < ops.length; i++) {\n ops[i].accept(visitor);\n }\n } else {\n visitor.visitConstant(null, \"?\");\n }\n visitor.visitEnd();\n }", "public interface BinaryTargetRange extends TargetRange {\n\n\t@Override\n\tBooleanResource setpoint();\n\n\t@Override\n\tBinaryRange controlLimits();\n\n\t@Override\n\tBinaryRange targetRange();\n\n\t@Override\n\tBinaryRange alarmLimits();\n}", "@Test\n public void testBoundsAsCompositesWithSingleEqAndMultiEqRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC, Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n ByteBuffer value4 = ByteBufferUtil.bytes(4);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) = (2, 3)\n Restriction singleEq = newSingleEq(cfMetaData, 0, value1);\n Restriction multiEq = newMultiEq(cfMetaData, 1, value2, value3);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(multiEq);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n\n // clustering_0 = 1 AND clustering_1 = 2 AND (clustering_2, clustering_3) = (3, 4)\n singleEq = newSingleEq(cfMetaData, 0, value1);\n Restriction singleEq2 = newSingleEq(cfMetaData, 1, value2);\n multiEq = newMultiEq(cfMetaData, 2, value3, value4);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(singleEq2).mergeWith(multiEq);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, value4, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, value4, EOC.END);\n\n // (clustering_0, clustering_1) = (1, 2) AND clustering_2 = 3\n singleEq = newSingleEq(cfMetaData, 2, value3);\n multiEq = newMultiEq(cfMetaData, 0, value1, value2);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(multiEq);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) = (2, 3) AND clustering_3 = 4\n singleEq = newSingleEq(cfMetaData, 0, value1);\n singleEq2 = newSingleEq(cfMetaData, 3, value4);\n multiEq = newMultiEq(cfMetaData, 1, value2, value3);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(multiEq).mergeWith(singleEq2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, value4, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, value4, EOC.END);\n }", "@Test\n public void testBoundsAsCompositesWithMultiEqAndSingleSliceRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n\n // (clustering_0, clustering_1) = (1, 2) AND clustering_2 > 3\n Restriction multiEq = newMultiEq(cfMetaData, 0, value1, value2);\n Restriction singleSlice = newSingleSlice(cfMetaData, 2, Bound.START, false, value3);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(multiEq).mergeWith(singleSlice);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.END);\n }", "@Test\n public void testBoundsAsCompositesWithMultiEqRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n Restriction eq = newMultiEq(cfMetaData, 0, value1, value2);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, EOC.END);\n }", "public interface AstIncreUnaryExpression extends AstUnaryExpression {\r\n}", "public String[] getConcreteSyntaxNodes ();", "public void getBoundsInParent(Rect outBounds) {\n/* 692 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n Range.Builder range_Builder1 = new Range.Builder(0L);\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(243L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n long long0 = 127L;\n Range range1 = Range.of((-636L), 127L);\n range1.isSubRangeOf(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test\n public void testBoundsAsCompositesWithSingleEqAndSliceRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n ByteBuffer value4 = ByteBufferUtil.bytes(4);\n ByteBuffer value5 = ByteBufferUtil.bytes(5);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) > (2, 3)\n Restriction singleEq = newSingleEq(cfMetaData, 0, value1);\n Restriction multiSlice = newMultiSlice(cfMetaData, 1, Bound.START, false, value2, value3);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(multiSlice);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, EOC.END);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) > (2, 3) AND (clustering_1) < (4)\n singleEq = newSingleEq(cfMetaData, 0, value1);\n multiSlice = newMultiSlice(cfMetaData, 1, Bound.START, false, value2, value3);\n Restriction multiSlice2 = newMultiSlice(cfMetaData, 1, Bound.END, false, value4);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(multiSlice2).mergeWith(singleEq).mergeWith(multiSlice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value4, EOC.START);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) => (2, 3) AND (clustering_1, clustering_2) <= (4, 5)\n singleEq = newSingleEq(cfMetaData, 0, value1);\n multiSlice = newMultiSlice(cfMetaData, 1, Bound.START, true, value2, value3);\n multiSlice2 = newMultiSlice(cfMetaData, 1, Bound.END, true, value4, value5);\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(multiSlice2).mergeWith(singleEq).mergeWith(multiSlice);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.NONE);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value4, value5, EOC.END);\n }", "public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();", "public abstract BoundType b();", "public abstract BoundType a();", "public interface Literals {\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.BagTypeImpl <em>Bag Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.BagTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getBagType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass BAG_TYPE = eINSTANCE.getBagType();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.TupleTypeImpl <em>Tuple Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TupleTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getTupleType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass TUPLE_TYPE = eINSTANCE.getTupleType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Library</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference TUPLE_TYPE__OCL_LIBRARY = eINSTANCE\n\t\t\t\t.getTupleType_OclLibrary();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.CollectionTypeImpl <em>Collection Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.CollectionTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getCollectionType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass COLLECTION_TYPE = eINSTANCE\n\t\t\t\t.getCollectionType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Element Type</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference COLLECTION_TYPE__ELEMENT_TYPE = eINSTANCE\n\t\t\t\t.getCollectionType_ElementType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Library</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference COLLECTION_TYPE__OCL_LIBRARY = eINSTANCE\n\t\t\t\t.getCollectionType_OclLibrary();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Kind</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EAttribute COLLECTION_TYPE__KIND = eINSTANCE\n\t\t\t\t.getCollectionType_Kind();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.InvalidTypeImpl <em>Invalid Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.InvalidTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getInvalidType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass INVALID_TYPE = eINSTANCE.getInvalidType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Library</b></em>' container reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference INVALID_TYPE__OCL_LIBRARY = eINSTANCE\n\t\t\t\t.getInvalidType_OclLibrary();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.OrderedSetTypeImpl <em>Ordered Set Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.OrderedSetTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getOrderedSetType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass ORDERED_SET_TYPE = eINSTANCE\n\t\t\t\t.getOrderedSetType();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.SequenceTypeImpl <em>Sequence Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.SequenceTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getSequenceType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass SEQUENCE_TYPE = eINSTANCE.getSequenceType();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.SetTypeImpl <em>Set Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.SetTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getSetType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass SET_TYPE = eINSTANCE.getSetType();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.VoidTypeImpl <em>Void Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.VoidTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getVoidType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass VOID_TYPE = eINSTANCE.getVoidType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Library</b></em>' container reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference VOID_TYPE__OCL_LIBRARY = eINSTANCE\n\t\t\t\t.getVoidType_OclLibrary();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.TypeTypeImpl <em>Type Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypeTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getTypeType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass TYPE_TYPE = eINSTANCE.getTypeType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Represented Type</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference TYPE_TYPE__REPRESENTED_TYPE = eINSTANCE\n\t\t\t\t.getTypeType_RepresentedType();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.OclLibraryImpl <em>Ocl Library</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.OclLibraryImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getOclLibrary()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass OCL_LIBRARY = eINSTANCE.getOclLibrary();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Void</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_VOID = eINSTANCE\n\t\t\t\t.getOclLibrary_OclVoid();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Any</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_ANY = eINSTANCE\n\t\t\t\t.getOclLibrary_OclAny();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Collection</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_COLLECTION = eINSTANCE\n\t\t\t\t.getOclLibrary_OclCollection();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Sequence</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_SEQUENCE = eINSTANCE\n\t\t\t\t.getOclLibrary_OclSequence();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Bag</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_BAG = eINSTANCE\n\t\t\t\t.getOclLibrary_OclBag();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Set</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_SET = eINSTANCE\n\t\t\t\t.getOclLibrary_OclSet();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Ordered Set</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_ORDERED_SET = eINSTANCE\n\t\t\t\t.getOclLibrary_OclOrderedSet();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Tuple</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_TUPLE = eINSTANCE\n\t\t\t\t.getOclLibrary_OclTuple();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link org.dresdenocl.essentialocl.types.impl.AnyTypeImpl <em>Any Type</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see org.dresdenocl.essentialocl.types.impl.AnyTypeImpl\n\t\t * @see org.dresdenocl.essentialocl.types.impl.TypesPackageImpl#getAnyType()\n\t\t * @generated\n\t\t */\n\t\tpublic static final EClass ANY_TYPE = eINSTANCE.getAnyType();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Boolean</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_BOOLEAN = eINSTANCE\n\t\t\t\t.getOclLibrary_OclBoolean();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl String</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_STRING = eINSTANCE\n\t\t\t\t.getOclLibrary_OclString();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Integer</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_INTEGER = eINSTANCE\n\t\t\t\t.getOclLibrary_OclInteger();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Real</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_REAL = eINSTANCE\n\t\t\t\t.getOclLibrary_OclReal();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Invalid</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_INVALID = eINSTANCE\n\t\t\t\t.getOclLibrary_OclInvalid();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Ocl Type</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tpublic static final EReference OCL_LIBRARY__OCL_TYPE = eINSTANCE\n\t\t\t\t.getOclLibrary_OclType();\n\n\t}", "public List<Access> getTypeBounds() {\n return getTypeBoundList();\n }", "public interface GoConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int integer_literal = 8;\n /** RegularExpression Id. */\n int floating_literal = 9;\n /** RegularExpression Id. */\n int boolean_literal = 10;\n /** RegularExpression Id. */\n int string_literal = 11;\n /** RegularExpression Id. */\n int numbers = 12;\n /** RegularExpression Id. */\n int valid_characters = 13;\n /** RegularExpression Id. */\n int double_quotes_in_string = 14;\n /** RegularExpression Id. */\n int back_slash = 15;\n /** RegularExpression Id. */\n int tabulations = 16;\n /** RegularExpression Id. */\n int addition = 17;\n /** RegularExpression Id. */\n int subtraction = 18;\n /** RegularExpression Id. */\n int multiplication = 19;\n /** RegularExpression Id. */\n int division = 20;\n /** RegularExpression Id. */\n int remainder = 21;\n /** RegularExpression Id. */\n int increment = 22;\n /** RegularExpression Id. */\n int decrement = 23;\n /** RegularExpression Id. */\n int equal = 24;\n /** RegularExpression Id. */\n int not_equal = 25;\n /** RegularExpression Id. */\n int greater_than = 26;\n /** RegularExpression Id. */\n int less_than = 27;\n /** RegularExpression Id. */\n int greater_than_or_equal = 28;\n /** RegularExpression Id. */\n int less_than_or_equal = 29;\n /** RegularExpression Id. */\n int bitwise_and = 30;\n /** RegularExpression Id. */\n int bitwise_inclusive_or = 31;\n /** RegularExpression Id. */\n int bitwise_exclusive_or = 32;\n /** RegularExpression Id. */\n int left_shift = 33;\n /** RegularExpression Id. */\n int right_shift = 34;\n /** RegularExpression Id. */\n int and = 35;\n /** RegularExpression Id. */\n int or = 36;\n /** RegularExpression Id. */\n int not = 37;\n /** RegularExpression Id. */\n int assignment = 38;\n /** RegularExpression Id. */\n int dynamic_assignment = 39;\n /** RegularExpression Id. */\n int addition_assignment = 40;\n /** RegularExpression Id. */\n int subtraction_assignment = 41;\n /** RegularExpression Id. */\n int multiplication_assignment = 42;\n /** RegularExpression Id. */\n int division_assignment = 43;\n /** RegularExpression Id. */\n int remainder_assignment = 44;\n /** RegularExpression Id. */\n int bitwise_and_assignment = 45;\n /** RegularExpression Id. */\n int bitwise_inclusive_or_assignment = 46;\n /** RegularExpression Id. */\n int bitwise_exclusive_or_assignment = 47;\n /** RegularExpression Id. */\n int left_shift_assignment = 48;\n /** RegularExpression Id. */\n int right_shift_assignment = 49;\n /** RegularExpression Id. */\n int opening_round_brackets = 50;\n /** RegularExpression Id. */\n int closing_round_brackets = 51;\n /** RegularExpression Id. */\n int opening_curly_brackets = 52;\n /** RegularExpression Id. */\n int closing_curly_brackets = 53;\n /** RegularExpression Id. */\n int opening_square_brackets = 54;\n /** RegularExpression Id. */\n int closing_square_brackets = 55;\n /** RegularExpression Id. */\n int semicolon = 56;\n /** RegularExpression Id. */\n int colon = 57;\n /** RegularExpression Id. */\n int dot = 58;\n /** RegularExpression Id. */\n int comma = 59;\n /** RegularExpression Id. */\n int double_quotes = 60;\n /** RegularExpression Id. */\n int quotes = 61;\n /** RegularExpression Id. */\n int rw_break = 62;\n /** RegularExpression Id. */\n int rw_default = 63;\n /** RegularExpression Id. */\n int rw_func = 64;\n /** RegularExpression Id. */\n int rw_interface = 65;\n /** RegularExpression Id. */\n int rw_select = 66;\n /** RegularExpression Id. */\n int rw_case = 67;\n /** RegularExpression Id. */\n int rw_defer = 68;\n /** RegularExpression Id. */\n int rw_go = 69;\n /** RegularExpression Id. */\n int rw_map = 70;\n /** RegularExpression Id. */\n int rw_struct = 71;\n /** RegularExpression Id. */\n int rw_chan = 72;\n /** RegularExpression Id. */\n int rw_else = 73;\n /** RegularExpression Id. */\n int rw_goto = 74;\n /** RegularExpression Id. */\n int rw_package = 75;\n /** RegularExpression Id. */\n int rw_switch = 76;\n /** RegularExpression Id. */\n int rw_const = 77;\n /** RegularExpression Id. */\n int rw_fallthrough = 78;\n /** RegularExpression Id. */\n int rw_if = 79;\n /** RegularExpression Id. */\n int rw_range = 80;\n /** RegularExpression Id. */\n int rw_type = 81;\n /** RegularExpression Id. */\n int rw_continue = 82;\n /** RegularExpression Id. */\n int rw_for = 83;\n /** RegularExpression Id. */\n int rw_import = 84;\n /** RegularExpression Id. */\n int rw_return = 85;\n /** RegularExpression Id. */\n int rw_var = 86;\n /** RegularExpression Id. */\n int dt_uint8 = 87;\n /** RegularExpression Id. */\n int dt_uint16 = 88;\n /** RegularExpression Id. */\n int dt_uint32 = 89;\n /** RegularExpression Id. */\n int dt_uint64 = 90;\n /** RegularExpression Id. */\n int dt_int8 = 91;\n /** RegularExpression Id. */\n int dt_int16 = 92;\n /** RegularExpression Id. */\n int dt_int32 = 93;\n /** RegularExpression Id. */\n int dt_int64 = 94;\n /** RegularExpression Id. */\n int dt_float32 = 95;\n /** RegularExpression Id. */\n int dt_float64 = 96;\n /** RegularExpression Id. */\n int dt_complex64 = 97;\n /** RegularExpression Id. */\n int dt_complex128 = 98;\n /** RegularExpression Id. */\n int dt_byte = 99;\n /** RegularExpression Id. */\n int dt_rune = 100;\n /** RegularExpression Id. */\n int dt_uint = 101;\n /** RegularExpression Id. */\n int dt_int = 102;\n /** RegularExpression Id. */\n int dt_uintptr = 103;\n /** RegularExpression Id. */\n int dt_string = 104;\n /** RegularExpression Id. */\n int dt_bool = 105;\n /** RegularExpression Id. */\n int main = 106;\n /** RegularExpression Id. */\n int library_fmt = 107;\n /** RegularExpression Id. */\n int rw_printf = 108;\n /** RegularExpression Id. */\n int rw_scanf = 109;\n /** RegularExpression Id. */\n int id = 110;\n /** RegularExpression Id. */\n int invalid_string = 111;\n /** RegularExpression Id. */\n int invalid_string_import = 112;\n /** RegularExpression Id. */\n int invalid_string_import_1 = 113;\n /** RegularExpression Id. */\n int invalid_string_import_2 = 114;\n /** RegularExpression Id. */\n int is_not_id = 115;\n /** RegularExpression Id. */\n int invalid_character = 116;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\r\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"<integer_literal>\",\n \"<floating_literal>\",\n \"<boolean_literal>\",\n \"<string_literal>\",\n \"<numbers>\",\n \"<valid_characters>\",\n \"\\\"\\\\\\\\\\\\\\\"\\\"\",\n \"\\\"\\\\\\\\\\\"\",\n \"<tabulations>\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"++\\\"\",\n \"\\\"--\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\">=\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"&\\\"\",\n \"\\\"|\\\"\",\n \"\\\"^\\\"\",\n \"\\\"<<\\\"\",\n \"\\\">>\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"!\\\"\",\n \"\\\"=\\\"\",\n \"\\\":=\\\"\",\n \"\\\"+=\\\"\",\n \"\\\"-=\\\"\",\n \"\\\"*=\\\"\",\n \"\\\"/=\\\"\",\n \"\\\"%=\\\"\",\n \"\\\"&=\\\"\",\n \"\\\"|=\\\"\",\n \"\\\"^=\\\"\",\n \"\\\"<<=\\\"\",\n \"\\\">>=\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\":\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"\\\"\\\\\\\"\\\"\",\n \"\\\"\\\\\\'\\\"\",\n \"\\\"break\\\"\",\n \"\\\"default\\\"\",\n \"\\\"func\\\"\",\n \"\\\"interface\\\"\",\n \"\\\"select\\\"\",\n \"\\\"case\\\"\",\n \"\\\"defer\\\"\",\n \"\\\"go\\\"\",\n \"\\\"map\\\"\",\n \"\\\"struct\\\"\",\n \"\\\"chan\\\"\",\n \"\\\"else\\\"\",\n \"\\\"goto\\\"\",\n \"\\\"package\\\"\",\n \"\\\"switch\\\"\",\n \"\\\"const\\\"\",\n \"\\\"fallthrough\\\"\",\n \"\\\"if\\\"\",\n \"\\\"range\\\"\",\n \"\\\"type\\\"\",\n \"\\\"continue\\\"\",\n \"\\\"for\\\"\",\n \"\\\"import\\\"\",\n \"\\\"return\\\"\",\n \"\\\"var\\\"\",\n \"\\\"uint8\\\"\",\n \"\\\"uint16\\\"\",\n \"\\\"uint32\\\"\",\n \"\\\"uint64\\\"\",\n \"\\\"int8\\\"\",\n \"\\\"int16\\\"\",\n \"\\\"int32\\\"\",\n \"\\\"int64\\\"\",\n \"\\\"float32\\\"\",\n \"\\\"float64\\\"\",\n \"\\\"complex64\\\"\",\n \"\\\"complex128\\\"\",\n \"\\\"byte\\\"\",\n \"\\\"rune\\\"\",\n \"\\\"uint\\\"\",\n \"\\\"int\\\"\",\n \"\\\"uintptr\\\"\",\n \"\\\"string\\\"\",\n \"\\\"bool\\\"\",\n \"\\\"main\\\"\",\n \"\\\"fmt\\\"\",\n \"\\\"Printf\\\"\",\n \"\\\"Scanf\\\"\",\n \"<id>\",\n \"<invalid_string>\",\n \"<invalid_string_import>\",\n \"<invalid_string_import_1>\",\n \"<invalid_string_import_2>\",\n \"<is_not_id>\",\n \"<invalid_character>\",\n };\n\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}", "public void setBounds(Rectangle b);", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = range_Builder0.contractBegin(0L);\n Range.Builder range_Builder2 = new Range.Builder(0L);\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 range_Builder0.expandBegin(1734L);\n range0.equals(range_Builder1);\n assertTrue(range0.isEmpty());\n \n Range.Builder range_Builder3 = new Range.Builder();\n range_Builder0.copy();\n Range range1 = Range.ofLength(1233L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n long long0 = range1.getBegin(range_CoordinateSystem0);\n assertFalse(range1.isEmpty());\n assertEquals(0L, long0);\n \n Range.Comparators.values();\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n Range range2 = Range.of(range_CoordinateSystem1, 2147483647L, 2147483647L);\n assertFalse(range2.isEmpty());\n }", "private Node createVirtualWorldBoundsShape() {\n \t\tPoint3d lower = new Point3d();\n \t\tPoint3d upper = new Point3d();\n \t\tmyVirtualWorldBounds.getLower(lower);\n \t\tmyVirtualWorldBounds.getUpper(upper);\n \t\t\n \t\tdouble[] coordinates = { lower.x, lower.y, lower.z, upper.x, lower.y,\n \t\t\t\tlower.z, upper.x, lower.y, upper.z, lower.x, lower.y, upper.z,\n \t\t\t\tlower.x, upper.y, lower.z, upper.x, upper.y, lower.z, upper.x,\n \t\t\t\tupper.y, upper.z, lower.x, upper.y, upper.z };\n \t\t\n \t\tint[] coordinateIndices = { 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7,\n \t\t\t\t7, 4, 0, 4, 1, 5, 2, 6, 3, 7 };\n \t\t\n \t\tIndexedLineArray geometry = new IndexedLineArray(\n \t\t\t\tcoordinates.length / 3, IndexedLineArray.COORDINATES,\n \t\t\t\tcoordinateIndices.length);\n \t\t\n \t\tgeometry.setCoordinates(0, coordinates);\n \t\tgeometry.setCoordinateIndices(0, coordinateIndices);\n \t\t\n \t\treturn new Shape3D(geometry);\n \t}", "public NodeUnion<? extends ClassBodyNode> getUnionForBody();", "public int getBound();", "protected abstract NativeSQLStatement createNativeOverlapsStatement(Geometry geom);", "public NodeUnion<? extends T> getUnionForModifiers();", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n Range range0 = Range.of(0L, 0L);\n Range.Builder range_Builder0 = new Range.Builder(range0);\n Range.Builder range_Builder1 = range_Builder0.copy();\n Range range1 = range_Builder1.build();\n range_Builder1.shift(9223372036854775807L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n linkedList0.add(range0);\n Range.Builder range_Builder2 = range_Builder0.expandBegin((-636L));\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.getBegin(range_CoordinateSystem1);\n range0.equals(linkedList0);\n Range.of(2139L, 2139L);\n Range range2 = Range.of(1124L);\n List<Range> list0 = range1.complement(range2);\n Range range3 = Range.of(range_CoordinateSystem0, (-636L), 1734L);\n range3.complementFrom(list0);\n Range.of(9223372036854775807L);\n Range range4 = Range.of((-23L), 0L);\n range4.equals(range3);\n range2.complement(range4);\n // Undeclared exception!\n try { \n range_Builder2.build();\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 interface langBConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int BREAK = 12;\n /** RegularExpression Id. */\n int CLASS = 13;\n /** RegularExpression Id. */\n int CONSTRUCTOR = 14;\n /** RegularExpression Id. */\n int ELSE = 15;\n /** RegularExpression Id. */\n int EXTENDS = 16;\n /** RegularExpression Id. */\n int FOR = 17;\n /** RegularExpression Id. */\n int IF = 18;\n /** RegularExpression Id. */\n int THEN = 19;\n /** RegularExpression Id. */\n int INT = 20;\n /** RegularExpression Id. */\n int NEW = 21;\n /** RegularExpression Id. */\n int PRINT = 22;\n /** RegularExpression Id. */\n int READ = 23;\n /** RegularExpression Id. */\n int RETURN = 24;\n /** RegularExpression Id. */\n int STRING = 25;\n /** RegularExpression Id. */\n int SUPER = 26;\n /** RegularExpression Id. */\n int BOOLEAN = 27;\n /** RegularExpression Id. */\n int TRUE = 28;\n /** RegularExpression Id. */\n int FALSE = 29;\n /** RegularExpression Id. */\n int WHILE = 30;\n /** RegularExpression Id. */\n int SWITCH = 31;\n /** RegularExpression Id. */\n int CASE = 32;\n /** RegularExpression Id. */\n int int_constant = 33;\n /** RegularExpression Id. */\n int string_constant = 34;\n /** RegularExpression Id. */\n int null_constant = 35;\n /** RegularExpression Id. */\n int IDENT = 36;\n /** RegularExpression Id. */\n int LETTER = 37;\n /** RegularExpression Id. */\n int DIGIT = 38;\n /** RegularExpression Id. */\n int UNDERSCORE = 39;\n /** RegularExpression Id. */\n int LPAREN = 40;\n /** RegularExpression Id. */\n int RPAREN = 41;\n /** RegularExpression Id. */\n int LBRACE = 42;\n /** RegularExpression Id. */\n int RBRACE = 43;\n /** RegularExpression Id. */\n int LBRACKET = 44;\n /** RegularExpression Id. */\n int RBRACKET = 45;\n /** RegularExpression Id. */\n int SEMICOLON = 46;\n /** RegularExpression Id. */\n int COMMA = 47;\n /** RegularExpression Id. */\n int DOT = 48;\n /** RegularExpression Id. */\n int DDOT = 49;\n /** RegularExpression Id. */\n int QUESTIONMARK = 50;\n /** RegularExpression Id. */\n int ASSIGN = 51;\n /** RegularExpression Id. */\n int GT = 52;\n /** RegularExpression Id. */\n int LT = 53;\n /** RegularExpression Id. */\n int EQ = 54;\n /** RegularExpression Id. */\n int LE = 55;\n /** RegularExpression Id. */\n int GE = 56;\n /** RegularExpression Id. */\n int NEQ = 57;\n /** RegularExpression Id. */\n int PLUS = 58;\n /** RegularExpression Id. */\n int MINUS = 59;\n /** RegularExpression Id. */\n int STAR = 60;\n /** RegularExpression Id. */\n int SLASH = 61;\n /** RegularExpression Id. */\n int REM = 62;\n /** RegularExpression Id. */\n int OR = 63;\n /** RegularExpression Id. */\n int AND = 64;\n /** RegularExpression Id. */\n int INVALID_LEXICAL = 65;\n /** RegularExpression Id. */\n int INVALID_CONST = 66;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int multilinecomment = 1;\n /** Lexical state. */\n int singlelinecomment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"/*\\\"\",\n \"\\\"//\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 9>\",\n \"<token of kind 10>\",\n \"<token of kind 11>\",\n \"\\\"parar\\\"\",\n \"\\\"classe\\\"\",\n \"\\\"construtor\\\"\",\n \"\\\"senao\\\"\",\n \"\\\"herda\\\"\",\n \"\\\"para\\\"\",\n \"\\\"se\\\"\",\n \"\\\"entao\\\"\",\n \"\\\"inteiro\\\"\",\n \"\\\"novo\\\"\",\n \"\\\"imprimir\\\"\",\n \"\\\"ler\\\"\",\n \"\\\"retornar\\\"\",\n \"\\\"texto\\\"\",\n \"\\\"super\\\"\",\n \"\\\"cara_coroa\\\"\",\n \"\\\"cara\\\"\",\n \"\\\"coroa\\\"\",\n \"\\\"enquanto\\\"\",\n \"\\\"trocar\\\"\",\n \"\\\"caso\\\"\",\n \"<int_constant>\",\n \"<string_constant>\",\n \"\\\"nulo\\\"\",\n \"<IDENT>\",\n \"<LETTER>\",\n \"<DIGIT>\",\n \"<UNDERSCORE>\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\":\\\"\",\n \"\\\"?\\\"\",\n \"\\\"=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\"==\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"<INVALID_LEXICAL>\",\n \"<INVALID_CONST>\",\n };\n\n}", "public interface Lower extends BinaryExpression {\r\n}", "private void setBounds(RectProto.Builder builderForValue) {\n this.bounds_ = (RectProto) builderForValue.build();\n this.bitField0_ |= 8;\n }", "public NodeUnion<? extends IdentifierListNode> getUnionForTargets();", "protected void computeBounds() {\r\n bounds = new Rectangle(layout.location.x - icon.getIconWidth() / 2,\r\n layout.location.y - icon.getIconHeight() / 2, icon.getIconWidth(), icon.getIconHeight()).union(labelBox)\r\n .union(ports[0].getBounds()).union(ports[1].getBounds()).union(ports[2].getBounds())\r\n .union(component.getType() == TemplateComponent.TYPE_CHANNEL\r\n ? ports[3].getBounds().union(supHalo.getBounds())\r\n : ports[3].getBounds());\r\n }", "@Override\n public GRectangle getBounds() {\n return null;\n }", "void addBounds(int x, int y, int width, int height);", "protected abstract NativeSQLStatement createNativeGeomUnionStatement(Geometry geom);", "@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 }", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n range0.getBegin();\n range0.intersects(range0);\n range0.getEnd();\n // Undeclared exception!\n try { \n Range.CoordinateSystem.valueOf(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.CoordinateSystem.\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "public interface IRange extends EObject\n{\n}", "public interface IGosuStatementList extends IGosuStatement, PsiCodeBlock\n{\n}", "public void computeStoredBounds()\n {\n computeSRectangleBound();\n computeCircleBound();\n }", "public interface IndexedPTBox extends PTBox {\n\n\tpublic boolean hasNewConstraints();\n\tpublic Set<ConditionalConstraint> getNewConstraints();\t\n}", "boolean isIncludeBounds();", "private boolean isBoundStatement() throws IOException\n\t{\n\t\tboolean isValid = false;\n\t\tStringBuilder lowerBound = new StringBuilder();\n\t\tStringBuilder upperBound = new StringBuilder();\n\t\tupdateToken();\n\t\t\n\t\tif(theCurrentToken.TokenType == TokenType.MINUS)\n\t\t{\n\t\t\tlowerBound.append('-');\n\t\t\tupdateToken();\n\t\t}\n\t\t\n\t\tif(isExpression() && theNextToken.TokenType == TokenType.RIGHT_BRACKET)\n\t\t{\n\t\t\tupdateToken();\n\t\t\tisValid = true;\n\t\t}\n\t\telse if(theCurrentToken.TokenType == TokenType.FLOAT || theCurrentToken.TokenType == TokenType.INTEGER)\n\t\t{\n\t\t\tlowerBound.append(theCurrentToken.TokenValue);\n\t\t\ttheSymbolTable.CURR_SYMBOL.setBoundLower(lowerBound.toString().trim());\n\t\t\t\n\t\t\tupdateToken();\n\t\t\tif(theCurrentToken.TokenType == TokenType.COLON)\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t\tif(theCurrentToken.TokenType == TokenType.MINUS)\n\t\t\t\t{\n\t\t\t\t\tupperBound.append('-');\n\t\t\t\t\tupdateToken();\n\t\t\t\t}\n\t\t\t\tif(theCurrentToken.TokenType == TokenType.FLOAT || theCurrentToken.TokenType == TokenType.INTEGER)\n\t\t\t\t{\n\t\t\t\t\tupperBound.append(theCurrentToken.TokenValue);\n\t\t\t\t\ttheSymbolTable.CURR_SYMBOL.setBoundUpper(upperBound.toString().trim());\n\t\t\t\t\t\n\t\t\t\t\tupdateToken();\n\t\t\t\t\tif(theCurrentToken.TokenType == TokenType.RIGHT_BRACKET)\n\t\t\t\t\t{\n\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t\tSystem.out.println(\"Bound!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}", "public interface CoGeometryConstants\n{\n\t// edge masks\n\tpublic static final int LEFT_EDGE_MASK = 1; // snap against left grid lines\n\tpublic static final int RIGHT_EDGE_MASK = 2; // snap against right grid lines\n\tpublic static final int TOP_EDGE_MASK = 4; // snap against top grid lines\n\tpublic static final int BOTTOM_EDGE_MASK = 8; // snap against bottom grid lines\n\tpublic static final int CENTER_EDGE_MASK = 16; // snap against center grid lines\n\n\tpublic static final int HORIZONTAL_EDGE_MASK = TOP_EDGE_MASK | BOTTOM_EDGE_MASK;\n\tpublic static final int VERTICAL_EDGE_MASK = LEFT_EDGE_MASK | RIGHT_EDGE_MASK | CENTER_EDGE_MASK;\n\n\tpublic static final int NO_EDGE_MASK = 0;\n\tpublic static final int ALL_EDGE_MASK = VERTICAL_EDGE_MASK | HORIZONTAL_EDGE_MASK;\n\n\t// direction mask\n\tpublic static final int TO_LEFT_MASK = 1; // snap in left direction\n\tpublic static final int TO_RIGHT_MASK = 2; // snap in right direction\n\tpublic static final int DOWN_MASK = 4; // snap in down direction\n\tpublic static final int UP_MASK = 8; // snap in up direction\n\tpublic static final int ALL_DIRECTIONS_MASK = TO_LEFT_MASK | TO_RIGHT_MASK | DOWN_MASK | UP_MASK;\n}", "public ReferencedEnvelope getBounds(){\n if(bounds==null){\n // Create Null envelope\n this.bounds = new ReferencedEnvelope(getCRS());\n // First try to find the BBOX definition in the gisNode directly\n try{\n if(gisNode.hasProperty(INeoConstants.PROPERTY_BBOX_NAME)){\n double[] bbox = (double[])gisNode.getProperty(INeoConstants.PROPERTY_BBOX_NAME);\n this.bounds = new ReferencedEnvelope(bbox[0],bbox[1],bbox[2],bbox[3],crs);\n }else{\n System.err.println(\"No BBox defined in the GeoNeo object\");\n }\n }catch(Exception bbox_e){\n System.err.println(\"Failed to interpret BBOX: \"+bbox_e.getMessage());\n bbox_e.printStackTrace(System.err);\n }\n // Secondly, if bounds is still empty, try find all feature geometries and calculate bounds\n try{\n if(this.bounds.isNull()){\n // Try to create envelope from any data referenced by the gisNode\n for(GeoNode node:getGeoNodes()){\n //TODO: support high dimensions\n this.bounds.expandToInclude(node.getCoords()[0], node.getCoords()[1]);\n }\n }\n }catch(Exception bbox_e){\n System.err.println(\"Failed to interpret BBOX: \"+bbox_e.getMessage());\n bbox_e.printStackTrace(System.err);\n }\n }\n return bounds;\n }", "public void testFindRangeBounds() {\n XYBlockRenderer renderer = new XYBlockRenderer();\n XYSeriesCollection dataset = new XYSeriesCollection();\n XYSeries series = new XYSeries(\"S1\");\n series.add(1.0, null);\n dataset.addSeries(series);\n Range r = renderer.findRangeBounds(dataset);\n }", "public void testBug1766646B() {\n XYBlockRenderer r = new XYBlockRenderer();\n Range range = r.findRangeBounds(null);\n DefaultXYZDataset emptyDataset = new DefaultXYZDataset();\n range = r.findRangeBounds(emptyDataset);\n }", "public void setBoundsInParent(Rect bounds) {\n/* 707 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public interface ClassBody extends Term\n{\n /**\n * List of the class's members.\n * @return A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n List<ClassMember> members();\n\n /**\n * Set the class's members.\n * @param members A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n ClassBody members(List<ClassMember> members);\n\n /**\n * Add a member to the class, returning a new node.\n */\n ClassBody addMember(ClassMember member);\n}", "interface Literals\n {\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.InfrastructureImpl <em>Infrastructure</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.InfrastructureImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getInfrastructure()\n * @generated\n */\n EClass INFRASTRUCTURE = eINSTANCE.getInfrastructure();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute INFRASTRUCTURE__NAME = eINSTANCE.getInfrastructure_Name();\n\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.SingleServerImpl <em>Single Server</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.SingleServerImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getSingleServer()\n * @generated\n */\n EClass SINGLE_SERVER = eINSTANCE.getSingleServer();\n\n /**\n * The meta object literal for the '<em><b>Server</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SINGLE_SERVER__SERVER = eINSTANCE.getSingleServer_Server();\n\n /**\n * The meta object literal for the '<em><b>Timeout</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SINGLE_SERVER__TIMEOUT = eINSTANCE.getSingleServer_Timeout();\n\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.ClusterImpl <em>Cluster</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.ClusterImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getCluster()\n * @generated\n */\n EClass CLUSTER = eINSTANCE.getCluster();\n\n /**\n * The meta object literal for the '<em><b>Message queue</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CLUSTER__MESSAGE_QUEUE = eINSTANCE.getCluster_Message_queue();\n\n /**\n * The meta object literal for the '<em><b>Registration</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CLUSTER__REGISTRATION = eINSTANCE.getCluster_Registration();\n\n /**\n * The meta object literal for the '<em><b>Mid assigner</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CLUSTER__MID_ASSIGNER = eINSTANCE.getCluster_Mid_assigner();\n\n /**\n * The meta object literal for the '<em><b>Nodes</b></em>' attribute list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CLUSTER__NODES = eINSTANCE.getCluster_Nodes();\n\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.RingImpl <em>Ring</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.RingImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getRing()\n * @generated\n */\n EClass RING = eINSTANCE.getRing();\n\n /**\n * The meta object literal for the '<em><b>Registration</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute RING__REGISTRATION = eINSTANCE.getRing_Registration();\n\n /**\n * The meta object literal for the '<em><b>Mid assigner</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute RING__MID_ASSIGNER = eINSTANCE.getRing_Mid_assigner();\n\n /**\n * The meta object literal for the '<em><b>Nodes</b></em>' attribute list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute RING__NODES = eINSTANCE.getRing_Nodes();\n\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.TreeImpl <em>Tree</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.TreeImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getTree()\n * @generated\n */\n EClass TREE = eINSTANCE.getTree();\n\n /**\n * The meta object literal for the '<em><b>Registration</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute TREE__REGISTRATION = eINSTANCE.getTree_Registration();\n\n /**\n * The meta object literal for the '<em><b>Root</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference TREE__ROOT = eINSTANCE.getTree_Root();\n\n /**\n * The meta object literal for the '{@link com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.TreeNodeImpl <em>Tree Node</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.TreeNodeImpl\n * @see com.sysma.goat.eclipse_plugin.goatInfrastructure.impl.GoatInfrastructurePackageImpl#getTreeNode()\n * @generated\n */\n EClass TREE_NODE = eINSTANCE.getTreeNode();\n\n /**\n * The meta object literal for the '<em><b>Address</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute TREE_NODE__ADDRESS = eINSTANCE.getTreeNode_Address();\n\n /**\n * The meta object literal for the '<em><b>Children</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference TREE_NODE__CHILDREN = eINSTANCE.getTreeNode_Children();\n\n }", "@Test(timeout = 4000)\n public void test089() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 3253L, 3253L);\n range0.getLength();\n range0.toString();\n Object object0 = new Object();\n Range range1 = Range.ofLength(3253L);\n range1.intersects(range0);\n range0.equals(range1);\n // Undeclared exception!\n try { \n Range.CoordinateSystem.valueOf(\"[ 3253 .. 3252 ]/0B\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.CoordinateSystem.[ 3253 .. 3252 ]/0B\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "public interface BiGULReplace extends BiGULStatement\n{\n}", "public BoundsObject getBounds() {\n\t\treturn null;\n\t}", "Operands createOperands();", "Rectangle getBoundingBox(Rectangle rect);", "@Test\n public void testBoundsAsCompositesWithOneEqRestrictionsAndTwoClusteringColumns()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC);\n\n ByteBuffer clustering_0 = ByteBufferUtil.bytes(1);\n Restriction eq = newSingleEq(cfMetaData, 0, clustering_0);\n\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), clustering_0, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), clustering_0, EOC.END);\n }", "@DISPID(1611006036) //= 0x60060054. The runtime will prefer the VTID if present\n @VTID(111)\n boolean constraintsInGeometry();", "@Override\n public final void bottomup() {\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:73:5:\n // ( | standaloneExpression | expressionRoot | incompleteAxiom |\n // incompleteExpression | axiom )\n int alt1 = 6;\n switch (input.LA(1)) {\n case EOF: {\n alt1 = 1;\n }\n break;\n case STANDALONE_EXPRESSION: {\n alt1 = 2;\n }\n break;\n case EXPRESSION: {\n alt1 = 3;\n }\n break;\n case INCOMPLETE_TYPE_ASSERTION:\n case INCOMPLETE_ROLE_ASSERTION:\n case INCOMPLETE_UNARY_AXIOM:\n case INCOMPLETE_SUB_CLASS_AXIOM:\n case INCOMPLETE_EQUIVALENT_TO_AXIOM:\n case INCOMPLETE_DISJOINT_WITH_AXIOM:\n case INCOMPLETE_SUB_PROPERTY_AXIOM:\n case INCOMPLETE_SAME_AS_AXIOM:\n case INCOMPLETE_DIFFERENT_FROM_AXIOM:\n case INCOMPLETE_DOMAIN:\n case INCOMPLETE_RANGE:\n case INCOMPLETE_INVERSE_OF: {\n alt1 = 4;\n }\n break;\n case INCOMPLETE_PROPERTY_CHAIN:\n case INCOMPLETE_DISJUNCTION:\n case INCOMPLETE_EXPRESSION: {\n alt1 = 5;\n }\n break;\n case INVERSE_OF:\n case DOMAIN:\n case RANGE:\n case SUB_CLASS_AXIOM:\n case EQUIVALENT_TO_AXIOM:\n case DISJOINT_WITH_AXIOM:\n case SUB_PROPERTY_AXIOM:\n case SAME_AS_AXIOM:\n case DIFFERENT_FROM_AXIOM:\n case UNARY_AXIOM:\n case NEGATED_ASSERTION:\n case TYPE_ASSERTION:\n case ROLE_ASSERTION: {\n alt1 = 6;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 1, 0, input);\n throw nvae;\n }\n switch (alt1) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:74:5:\n {}\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:74:7:\n // standaloneExpression\n {\n pushFollow(FOLLOW_standaloneExpression_in_bottomup87);\n standaloneExpression();\n state._fsp--;\n if (state.failed) {\n return;\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:75:8:\n // expressionRoot\n {\n pushFollow(FOLLOW_expressionRoot_in_bottomup96);\n expressionRoot();\n state._fsp--;\n if (state.failed) {\n return;\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:76:9:\n // incompleteAxiom\n {\n pushFollow(FOLLOW_incompleteAxiom_in_bottomup107);\n incompleteAxiom();\n state._fsp--;\n if (state.failed) {\n return;\n }\n }\n break;\n case 5:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:77:9:\n // incompleteExpression\n {\n pushFollow(FOLLOW_incompleteExpression_in_bottomup117);\n incompleteExpression();\n state._fsp--;\n if (state.failed) {\n return;\n }\n }\n break;\n case 6:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:78:8:\n // axiom\n {\n pushFollow(FOLLOW_axiom_in_bottomup126);\n axiom();\n state._fsp--;\n if (state.failed) {\n return;\n }\n }\n break;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return;\n }", "public interface ParserASTConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int KW_CLASS = 8;\n /** RegularExpression Id. */\n int KW_PUBLIC = 9;\n /** RegularExpression Id. */\n int KW_STATIC = 10;\n /** RegularExpression Id. */\n int KW_VOID = 11;\n /** RegularExpression Id. */\n int KW_MAIN = 12;\n /** RegularExpression Id. */\n int KW_STRING = 13;\n /** RegularExpression Id. */\n int KW_EXTENDS = 14;\n /** RegularExpression Id. */\n int KW_RETURN = 15;\n /** RegularExpression Id. */\n int KW_INT = 16;\n /** RegularExpression Id. */\n int KW_BOOLEAN = 17;\n /** RegularExpression Id. */\n int KW_IF = 18;\n /** RegularExpression Id. */\n int KW_ELSE = 19;\n /** RegularExpression Id. */\n int KW_WHILE = 20;\n /** RegularExpression Id. */\n int KW_TRUE = 21;\n /** RegularExpression Id. */\n int KW_FALSE = 22;\n /** RegularExpression Id. */\n int KW_THIS = 23;\n /** RegularExpression Id. */\n int KW_NEW = 24;\n /** RegularExpression Id. */\n int KW_PRINT = 25;\n /** RegularExpression Id. */\n int SYM_LBRACE = 26;\n /** RegularExpression Id. */\n int SYM_RBRACE = 27;\n /** RegularExpression Id. */\n int SYM_LPAREN = 28;\n /** RegularExpression Id. */\n int SYM_RPAREN = 29;\n /** RegularExpression Id. */\n int SYM_LSQPAREN = 30;\n /** RegularExpression Id. */\n int SYM_RSQPAREN = 31;\n /** RegularExpression Id. */\n int SYM_SEMICOLON = 32;\n /** RegularExpression Id. */\n int SYM_EQUAL = 33;\n /** RegularExpression Id. */\n int SYM_AMPAMP = 34;\n /** RegularExpression Id. */\n int SYM_BARBAR = 35;\n /** RegularExpression Id. */\n int SYM_LESS = 36;\n /** RegularExpression Id. */\n int SYM_LESSEQUAL = 37;\n /** RegularExpression Id. */\n int SYM_EQUALEQUAL = 38;\n /** RegularExpression Id. */\n int SYM_EXCLEQUAL = 39;\n /** RegularExpression Id. */\n int SYM_MORE = 40;\n /** RegularExpression Id. */\n int SYM_MOREEQUAL = 41;\n /** RegularExpression Id. */\n int SYM_PLUS = 42;\n /** RegularExpression Id. */\n int SYM_MINUS = 43;\n /** RegularExpression Id. */\n int SYM_STAR = 44;\n /** RegularExpression Id. */\n int SYM_SLASH = 45;\n /** RegularExpression Id. */\n int SYM_PERCENT = 46;\n /** RegularExpression Id. */\n int SYM_EXCL = 47;\n /** RegularExpression Id. */\n int SYM_DOT = 48;\n /** RegularExpression Id. */\n int SYM_COMMA = 49;\n /** RegularExpression Id. */\n int IDENTIFIER = 50;\n /** RegularExpression Id. */\n int INT_LITERAL = 51;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"\\\\r\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"class\\\"\",\n \"\\\"public\\\"\",\n \"\\\"static\\\"\",\n \"\\\"void\\\"\",\n \"\\\"main\\\"\",\n \"\\\"String\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"return\\\"\",\n \"\\\"int\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"while\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"this\\\"\",\n \"\\\"new\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"<IDENTIFIER>\",\n \"<INT_LITERAL>\",\n };\n\n}", "@SuppressWarnings(\"unchecked\")\n public AnimatorType bounds(RectF bounds)\n {\n addTransformer(new BoundsTransformer(getShape(), bounds));\n return (AnimatorType) this;\n }", "public interface Compound extends Clause {}", "public abstract Rectangle getSnapshotBounds();", "@Override\n public void setBounds(int x, int y, int w, int h, int op) {\n setBounds(x, y, w, h, op, true, false);\n }", "public interface StructureDefinition {\n}", "List<Rectangle> getWordBoundaries();", "public interface DfType {\n\n /**\n * A type that contains every possible value supported by the type system\n */\n DfType TOP = new DfType() {\n @Override\n public boolean isSuperType(@NotNull DfType other) {\n return true;\n }\n\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return this;\n }\n\n @Override\n public @NotNull DfType tryJoinExactly(@NotNull DfType other) { return this; }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return other;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return BOTTOM;\n }\n\n @Override\n public @NotNull DfType fromRelation(@NotNull RelationType relationType) {\n return this;\n }\n\n @Override\n public int hashCode() {\n return 1254215;\n }\n\n @Override\n public @NotNull String toString() {\n return \"TOP\";\n }\n };\n /**\n * A type that contains no values\n */\n DfType BOTTOM = new DfType() {\n @Override\n public boolean isSuperType(@NotNull DfType other) {\n return other == this;\n }\n\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return other;\n }\n\n @Override\n public @NotNull DfType tryJoinExactly(@NotNull DfType other) { return other; }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return this;\n }\n\n @Override\n public @NotNull DfType fromRelation(@NotNull RelationType relationType) {\n return this;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return TOP;\n }\n\n @Override\n public int hashCode() {\n return 67532141;\n }\n\n @Override\n public @NotNull String toString() {\n return \"BOTTOM\";\n }\n };\n /**\n * A special value that represents a contract failure after method return (the control flow should immediately proceed\n * with exception handling). This value is like a constant but its type doesn't correspond to any JVM type.\n */\n DfType FAIL = new DfConstantType<>(ObjectUtils.sentinel(\"FAIL\")) {\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return other == this ? this : TOP;\n }\n\n @Override\n public @Nullable DfType tryJoinExactly(@NotNull DfType other) { return other == this ? this : other == NOT_FAIL ? TOP : null; }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return other == this ? this : BOTTOM;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return NOT_FAIL;\n }\n\n @Override\n public @NotNull DfType fromRelation(@NotNull RelationType relationType) {\n return relationType == RelationType.EQ ? this :\n relationType == RelationType.NE ? NOT_FAIL :\n BOTTOM;\n }\n\n @Override\n public int hashCode() {\n return 5362412;\n }\n };\n /**\n * Anything but a FAIL value\n */\n DfType NOT_FAIL = new DfAntiConstantType<>(Set.of(Objects.requireNonNull(FAIL.getConstantOfType(Object.class)))) {\n @Override\n public boolean isSuperType(@NotNull DfType other) {\n return other != TOP && other != FAIL;\n }\n\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return other == FAIL ? TOP : this;\n }\n\n @Override\n public @NotNull DfType tryJoinExactly(@NotNull DfType other) { return join(other); }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return other == FAIL ? BOTTOM : this;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return FAIL;\n }\n\n @Override\n public int hashCode() {\n return 23145416;\n }\n };\n\n /**\n * Checks whether this type is the supertype of the supplied type, i.e. every value from the other type belongs to this type as well.\n * if A.isSuperType(B) then A.join(B) is A and A.meet(B) is B.\n *\n * @param other other type\n * @return true if this type is the supertype of other.\n */\n boolean isSuperType(@NotNull DfType other);\n\n /**\n * @return true if this type contains only local objects (not leaked from the current context to unknown places)\n * In particular, this means that the values of these types are never {@linkplain #mayAlias(DfType) aliased} \n * to any other values.\n */\n default boolean isLocal() {\n return false;\n }\n\n /**\n * @param otherType other type\n * @return true if values qualified by this value might be affected by values qualified by otherType.\n * For example, if both this and otherType are pointer types that may refer to the same memory location.\n */\n default boolean mayAlias(DfType otherType) {\n return false;\n }\n\n /**\n * @return true if values immediately qualified by this type, never change, \n * as long as qualifier never changes.\n */\n default boolean isImmutableQualifier() {\n return false;\n }\n\n /**\n * Checks whether processing the other type is not necessary to get the same analysis result if some value\n * has either this or other state at the same code location. {@code a.isMergeable(b)} implies \n * {@code a.isSuperType(b)}. In most cases, these methods are equivalent but the difference may appear in\n * processing non-strict properties like nullability. E.g. (nullability == unknown) is supertype of\n * (nullability == null) but it's not mergeable, as skipping (nullability == null) processing will remove\n * \"Possible NPE\" warning.\n * \n * @param other other type\n * @return true if processing the other type is not necessary to get the same analysis result if some value\n * has either this or other state at the same code location.\n */\n default boolean isMergeable(@NotNull DfType other) {\n return isSuperType(other);\n }\n\n /**\n * Return the most specific type that contains all values from this type and from other type.\n * @param other type to join\n * @return the result of the join operation\n */\n @NotNull\n DfType join(@NotNull DfType other);\n\n /**\n * Return the type that contains all values from this type and from other type and no other values.\n * @param other type to join\n * @return the result of the join operation; null if exact join cannot be represented\n */\n @Nullable DfType tryJoinExactly(@NotNull DfType other);\n\n /**\n * Returns the least specific type that contains all values that belong both to this type and to other type.\n * @param other type to meet\n * @return the result of the meet operation.\n */\n @NotNull\n DfType meet(@NotNull DfType other);\n\n @NotNull\n default DfType fromRelation(@NotNull RelationType relationType) {\n return relationType == RelationType.EQ ? this : TOP;\n }\n\n /**\n * @return true if equivalence relation on this type is not standard. That is,\n * for constant values belonging to this type, {@code a.meetRelation(EQ, b) != a.equals(b)}\n */\n default boolean hasNonStandardEquivalence() {\n return false;\n }\n \n /**\n * Narrows this value to the set of values that satisfies given relation\n * \n * @param relationType relation applied\n * @param other other operand (e.g., for {@code a < b} relation, this object is {@code a},\n * other is {@code b} and relationType is {@code <}.\n * @return narrowed type containing only values that satisfy the relation \n * (may contain some more values if the exact type cannot be represented).\n * For any {@code meetRelation} arguments, {@code this.isSuperType(this.meetRelation(...))} is true.\n */\n default @NotNull DfType meetRelation(@NotNull RelationType relationType, @NotNull DfType other) {\n return meet(other.fromRelation(relationType));\n }\n\n /**\n * @return the widened version of this type; should be called on back-branches.\n */\n default DfType widen() {\n return this;\n }\n\n /**\n * @return a type that contains all the values of the corresponding JVM type except the values of given type;\n * may return null if the corresponding type is not supported by our type system.\n */\n @Nullable\n default DfType tryNegate() {\n return null;\n }\n\n /**\n * @param constant constant to compare to\n * @return true if this type represents a constant with given value\n */\n default boolean isConst(@Nullable Object constant) {\n return false;\n }\n\n /**\n * @param clazz desired constant class\n * @param <C> type of the constant\n * @return the constant of given type; null if this type does not represent a constant of supplied type.\n */\n default <C> @Nullable C getConstantOfType(@NotNull Class<C> clazz) {\n return null;\n }\n\n /**\n * Correct the inherent variable type when concrete variable state is flushed\n * due to unknown code execution. This could be useful to handle non-strict \n * properties like nullability (e.g. if unstable nullable variable was checked for null,\n * then unknown code was executed, then the variable should not probably reset to nullable)\n * \n * @param typeBeforeFlush type the variable had before flush\n * @return corrected inherent variable type; return this if no correction is necessary.\n */\n default DfType correctTypeOnFlush(DfType typeBeforeFlush) {\n return this;\n }\n\n /**\n * Correct the variable type that is passed from outer context to the closure \n * (e.g. drop the locality flag).\n * \n * @return corrected variable type; return this if no correction is necessary.\n */\n default DfType correctForClosure() {\n return this;\n }\n\n /**\n * Correct the type after applying the relation depending on whether the relation was applied successfully.\n * May be necessary to handle weird relation semantics, like with NaN in some languages.\n * \n * @param relation relation applied\n * @param result if true then the relation was applied successfully. E.g., for {@code a > b},\n * result is true for {@code a > b} state and false for {@code a < b} and for {@code a == b} states.\n * @return corrected type; return this if no correction is necessary\n */\n default @NotNull DfType correctForRelationResult(@NotNull RelationType relation, boolean result) {\n return this;\n }\n\n /**\n * @return basic type for this type. Some types could represent several derived variables. For example,\n * the type \"string of length 3\" could be decomposed to basic type \"string\" and derived variable \"length\"\n * with value \"3\".\n */\n default @NotNull DfType getBasicType() {\n return this;\n }\n\n /**\n * @return list of possible derived variables that could be recorded inside this type.\n * E.g. the type \"string of length 3\" records the derived variable \"string length\" inside.\n */\n default @NotNull List<@NotNull DerivedVariableDescriptor> getDerivedVariables() {\n return List.of();\n }\n\n /**\n * @return values of all derived variables stored inside this type\n */\n default @NotNull Map<@NotNull DerivedVariableDescriptor, @NotNull DfType> getDerivedValues() {\n return Map.of();\n }\n\n /**\n * @return human-readable representation of this DfType, could be localized\n */\n @Override @NlsSafe @NotNull String toString();\n}", "public interface LookupConstraint {\n}", "@Test\n public void testBoundsAsCompositesWithSingleEqAndMultiINRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC, Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n ByteBuffer value4 = ByteBufferUtil.bytes(4);\n ByteBuffer value5 = ByteBufferUtil.bytes(5);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) IN ((2, 3), (4, 5))\n Restriction singleEq = newSingleEq(cfMetaData, 0, value1);\n Restriction multiIN = newMultiIN(cfMetaData, 1, asList(value2, value3), asList(value4, value5));\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(multiIN);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(2, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.START);\n assertComposite(bounds.get(1), value1, value4, value5, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(2, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n assertComposite(bounds.get(1), value1, value4, value5, EOC.END);\n\n // clustering_0 = 1 AND (clustering_1, clustering_2) IN ((2, 3))\n singleEq = newSingleEq(cfMetaData, 0, value1);\n multiIN = newMultiIN(cfMetaData, 1, asList(value2, value3));\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(multiIN).mergeWith(singleEq);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(1, bounds.size());\n assertComposite(bounds.get(0), value1, value2, value3, EOC.END);\n\n // clustering_0 = 1 AND clustering_1 = 5 AND (clustering_2, clustering_3) IN ((2, 3), (4, 5))\n singleEq = newSingleEq(cfMetaData, 0, value1);\n Restriction singleEq2 = newSingleEq(cfMetaData, 1, value5);\n multiIN = newMultiIN(cfMetaData, 2, asList(value2, value3), asList(value4, value5));\n restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(singleEq).mergeWith(multiIN).mergeWith(singleEq2);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(2, bounds.size());\n assertComposite(bounds.get(0), value1, value5, value2, value3, EOC.START);\n assertComposite(bounds.get(1), value1, value5, value4, value5, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(2, bounds.size());\n assertComposite(bounds.get(0), value1, value5, value2, value3, EOC.END);\n assertComposite(bounds.get(1), value1, value5, value4, value5, EOC.END);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Range.CoordinateSystem.values();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.Builder range_Builder0 = new Range.Builder(range_CoordinateSystem0, 0L, 0L);\n Range range0 = Range.ofLength(0L);\n range0.getBegin(range_CoordinateSystem0);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.spliterator();\n range0.complementFrom(linkedList0);\n range_Builder0.contractBegin(0L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"\", range_CoordinateSystem1);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test17() 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 long long0 = 265L;\n range_Builder0.shift(265L);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n Range range1 = Range.of(0L);\n List<Range> list0 = range0.complement(range1);\n List<Range> list1 = range0.complementFrom(list0);\n List<Range> list2 = range0.complementFrom(list1);\n List<Range> list3 = range0.complementFrom(list2);\n range0.complementFrom(list3);\n Range.of((-1147L), 0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range2 = Range.of(range_CoordinateSystem0, 0L, 0L);\n Range range3 = range2.intersection(range0);\n range0.getEnd();\n range3.intersects(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"q)fxUX9s]Tp\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse q)fxUX9s]Tp into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public interface Constants {\r\n\r\n /** The factory. */\r\n FieldFactory FACTORY = new FieldFactoryImpl();\r\n\r\n /** The 64 K chunk size */\r\n int _64K = 40 * 40 * 40;\r\n\r\n /** The Aligned 64 compiler */\r\n Aligned64Compiler ALIGNED64 = new Aligned64Compiler();\r\n\r\n /** Number of Elements to be READ */\r\n int ELEMENTS_READ = _64K;\r\n\r\n /** Number of Elements to be Written */\r\n int ELEMENTS_WRITTEN = _64K;\r\n\r\n /** The packed compiler*/\r\n CompilerBase PACKED = new PackedCompiler();\r\n\r\n /** The * iterations. */\r\n int _ITERATIONS = 20;\r\n\r\n /** The read iterations. */\r\n int READ_ITERATIONS = _ITERATIONS;\r\n\r\n /** The read union iterations. */\r\n int READ_ITERATIONS_UNION = _ITERATIONS;\r\n\r\n /** The write iterations non-transactional. */\r\n int WRITE_ITERATIONS_NON_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write iterations transactional. */\r\n int WRITE_ITERATIONS_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write union iterations non-transactional. */\r\n int WRITE_ITERATIONS_UNION_NON_TRANSACTIONAL = _ITERATIONS;\r\n\r\n /** The write union iterations transactional. */\r\n int WRITE_ITERATIONS_UNION_TRANSACTIONAL = _ITERATIONS;\r\n\r\n}", "@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 }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n long long0 = 785L;\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, 9223372036854775806L, (-128L));\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // given length -129 would make range [9223372036854775805 - ? ] beyond max allowed end offset\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }" ]
[ "0.5921536", "0.5849192", "0.5633087", "0.55260134", "0.5228007", "0.5187048", "0.51862234", "0.51292396", "0.509661", "0.5083071", "0.5083071", "0.5083071", "0.5059632", "0.50481474", "0.50434494", "0.5010894", "0.49024442", "0.48874983", "0.48858535", "0.48858535", "0.4882855", "0.48774898", "0.4875716", "0.48701474", "0.48688686", "0.48558366", "0.48180288", "0.47702044", "0.4769654", "0.47664207", "0.4754808", "0.47352725", "0.4715373", "0.4708432", "0.47054875", "0.47039062", "0.4682896", "0.4682139", "0.46752754", "0.46738198", "0.4671292", "0.46702242", "0.46590737", "0.46499202", "0.46481183", "0.46393803", "0.46338534", "0.46270052", "0.46176112", "0.46156484", "0.46144316", "0.46107072", "0.46059695", "0.46047133", "0.45975646", "0.4586063", "0.45651767", "0.456379", "0.45476195", "0.45473313", "0.45465243", "0.4535905", "0.45322892", "0.45294318", "0.45281184", "0.45275658", "0.45257053", "0.4521584", "0.4519885", "0.4516592", "0.4514497", "0.45123738", "0.45084077", "0.4505886", "0.4497469", "0.44952285", "0.44921932", "0.44907817", "0.4486305", "0.44845575", "0.44843876", "0.44823584", "0.4479645", "0.44784087", "0.44717765", "0.44690755", "0.44677705", "0.446633", "0.44620687", "0.44616225", "0.44603986", "0.44601512", "0.4456602", "0.44565716", "0.44487327", "0.44458473", "0.44445756", "0.44432202", "0.44405374", "0.44403842", "0.4438262" ]
0.0
-1
Default constructor for test class RelationBuilderContainsTest
public RelationBuilderContainsTest() { builder = new BiMap<Integer, Integer>(); builder.put(zero, one); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RelationPredicate(){}", "private Builder() {\n super(org.apache.gora.cascading.test.storage.TestRow.SCHEMA$);\n }", "public KoleksiRelationExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "@Test\n public void constructorStoreSucceed()\n {\n // arrange\n // act\n QuerySpecificationBuilder querySpecificationBuilder = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS);\n\n // assert\n assertEquals(\"*\", Deencapsulation.getField(querySpecificationBuilder, \"selection\"));\n assertEquals(QuerySpecificationBuilder.FromType.ENROLLMENTS, Deencapsulation.getField(querySpecificationBuilder, \"fromType\"));\n }", "public RelAlgTest() {\n super(\"Test of the Relational Algebra Suite\");\n }", "@Test\n public void constructorThrowsOnEmptySelection() {\n assertThrows(IllegalArgumentException.class, () -> {\n // arrange\n // act\n new QuerySpecificationBuilder(\"\", QuerySpecificationBuilder.FromType.ENROLLMENTS);\n\n // assert\n });\n }", "@Test\n public void constructorThrowsOnNullSelection() {\n assertThrows(IllegalArgumentException.class, () -> {\n // arrange\n // act\n new QuerySpecificationBuilder(null, QuerySpecificationBuilder.FromType.ENROLLMENTS);\n\n // assert\n });\n }", "public ContainsBuilder(DataBaseConnection dataBaseConnection) {\n super(dataBaseConnection);\n selectBuilder = new SelectBuilder(dataBaseConnection);\n }", "public ArticleExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public ArticleExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public PersonsRepositoryTest() {\n }", "public RelationIsA() {\r\n\t\tsuper();\r\n\t}", "public LinkBuilder() {\n }", "public NewsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public AssociationTest(String name) {\n\t\tsuper(name);\n\t}", "@Test\n public void constructorThrowsOnNullFromType() {\n assertThrows(IllegalArgumentException.class, () -> {\n // arrange\n // act\n new QuerySpecificationBuilder(\"*\", null);\n\n // assert\n });\n }", "public GoodsExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public Relationship() {\r\n\t}", "@Test\n public void testUserDomainConstructorWithParams(){Not sure if this works\n //\n Set<RestaurantDomain> testRestaurantDomain = new HashSet<>();\n //\n\n testUserDomain = new UserDomain(1, \"[email protected]\", \"password\", \"jDawg\", \"John\", \"Dawson\", testRestaurantDomain);\n\n new Verifications(){{\n assertEquals(1, testUserDomain.getId());\n assertEquals(\"[email protected]\", testUserDomain.getEmail());\n assertEquals(\"password\", testUserDomain.getPassword());\n assertEquals(\"jDawg\", testUserDomain.getUserName());\n assertEquals(\"John\", testUserDomain.getFirstName());\n assertEquals(\"Dawson\", testUserDomain.getFirstName());\n assertEquals(testRestaurantDomain, testUserDomain.getRestaurantDomain());\n }};\n }", "@Test\r\n\tpublic void constructorTests() {\n\t\tLibraryNode ln = ml.createNewLibrary(\"http://example.com/resource\", \"RT\", pc.getDefaultProject());\r\n\t\tBusinessObjectNode bo = ml.addBusinessObjectToLibrary(ln, \"MyBo\");\r\n\t\tNode node = bo;\r\n\t\tTLResource mbr = new TLResource();\r\n\t\tmbr.setName(\"MyTlResource\");\r\n\t\tmbr.setBusinessObjectRef(bo.getTLModelObject());\r\n\r\n\t\t// When - used in LibraryNode.generateLibrary()\r\n\t\tTLResource tlr = new ResourceBuilder().buildTL(); // get a populated tl resource\r\n\t\ttlr.setBusinessObjectRef(bo.getTLModelObject());\r\n\t\tResourceNode rn1 = new ResourceNode(tlr, ln);\r\n\r\n\t\t// When - used in tests\r\n\t\tResourceNode rn2 = ml.addResource(bo);\r\n\r\n\t\t// When - used in NodeFactory\r\n\t\tResourceNode rn3 = new ResourceNode(mbr);\r\n\t\tln.addMember(rn3);\r\n\r\n\t\t// When - used in ResourceCommandHandler to launch wizard\r\n\t\tResourceNode rn4 = new ResourceNode(node.getLibrary(), bo);\r\n\t\t// When - builder used as in ResourceCommandHandler\r\n\t\tnew ResourceBuilder().build(rn4, bo);\r\n\r\n\t\t// Then - must be complete\r\n\t\tcheck(rn1);\r\n\t\tcheck(rn2);\r\n\t\tcheck(rn3);\r\n\t\tcheck(rn4);\r\n\t}", "public IndexBuilderTest(String testName) {\n super(testName);\n }", "public GermchitExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Builder() {}", "public Builder() {}", "public Builder() {}", "public ItemExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public XMLModel002Builder() {\n }", "private Matcher() {\n super(querySpecification());\n }", "protected KoleksiRelationExample(KoleksiRelationExample example) {\r\n this.orderByClause = example.orderByClause;\r\n this.oredCriteria = example.oredCriteria;\r\n }", "public Related() {\n }", "private Builder(org.apache.gora.cascading.test.storage.TestRow.Builder other) {\n super(other);\n }", "public Tests(){\n \n }", "public CategoryTableTest() {\n super(CategoryTable.class);\n }", "public RelationshipElement ()\n\t{\n\t\tthis(null, null);\n\t}", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "public BookcaseTest () {\n }", "public StudentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public AddressBookExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public BugExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public QuestionDetailExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public SearchDocument() {\n super();\n }", "public PendantExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private Builder(org.apache.gora.cascading.test.storage.TestRow other) {\n super(org.apache.gora.cascading.test.storage.TestRow.SCHEMA$);\n if (isValidValue(fields()[0], other.defaultLong1)) {\n this.defaultLong1 = (java.lang.Long) data().deepCopy(fields()[0].schema(), other.defaultLong1);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.defaultStringEmpty)) {\n this.defaultStringEmpty = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.defaultStringEmpty);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.columnLong)) {\n this.columnLong = (java.lang.Long) data().deepCopy(fields()[2].schema(), other.columnLong);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.unionRecursive)) {\n this.unionRecursive = (org.apache.gora.cascading.test.storage.TestRow) data().deepCopy(fields()[3].schema(), other.unionRecursive);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.unionString)) {\n this.unionString = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.unionString);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.unionLong)) {\n this.unionLong = (java.lang.Long) data().deepCopy(fields()[5].schema(), other.unionLong);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.unionDefNull)) {\n this.unionDefNull = (java.lang.Long) data().deepCopy(fields()[6].schema(), other.unionDefNull);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.family2)) {\n this.family2 = (java.util.Map<java.lang.CharSequence,java.lang.CharSequence>) data().deepCopy(fields()[7].schema(), other.family2);\n fieldSetFlags()[7] = true;\n }\n }", "public PseudoQuery() {\r\n\t}", "Relation createRelation();", "public Builder() { }", "@Ignore\r\n @Test\r\n public void testSetType() {\r\n System.out.println(\"testSetType()\");\r\n Relation instance = new Relation(null, null);\r\n instance.setDirection(Relation.OUT);\r\n instance.setType(\"singer\");\r\n }", "public Builder() {\n\t\t}", "private Builder() {\n super(edu.pa.Rat.SCHEMA$);\n }", "private DataModelBuilder() {\n }", "TestNode createTestNode();", "public Builder() {\n }", "private Builder() {}", "@Test\n public void testConstructor(){\n new RowGen(ROW_INDEX, spaces);\n }", "public OrderHeadExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public AccountbaseExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public OrderExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public NewsCustomerSurveyExample() {\r\n oredCriteria = new ArrayList();\r\n }", "@Test\n public void TestConstructor() {\n assertNotNull(q1);\n }", "public ResourceExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "@Test\n\tpublic void testGeneratedCriteriaBuilder2() {\n\n\t\tClientFormMetadataExample.Criteria criteria = new ClientFormMetadataExample.Criteria()\n\t\t\t\t.andIdentifierIsNull()\n\t\t\t\t.andIdentifierIsNotNull()\n\t\t\t\t.andIdentifierEqualTo(\"anc/json\")\n\t\t\t\t.andIdentifierNotEqualTo(\"maternity/json\")\n\t\t\t\t.andIdentifierGreaterThan(\"anc/json\")\n\t\t\t\t.andIdentifierGreaterThanOrEqualTo(\"child/json\")\n\t\t\t\t.andIdentifierLessThan(\"child/json\")\n\t\t\t\t.andIdentifierLessThanOrEqualTo(\"child/json\")\n\t\t\t\t.andIdentifierLike(\"child/json\")\n\t\t\t\t.andIdentifierNotLike(\"child/json\")\n\t\t\t\t.andIdentifierIn(new ArrayList<>())\n\t\t\t\t.andIdentifierNotIn(new ArrayList<>())\n\t\t\t\t.andIdentifierBetween(\"1\", \"10\")\n\t\t\t\t.andIdentifierNotBetween(\"4\", \"7\")\n\t\t\t\t.andJurisdictionIsNotNull()\n\t\t\t\t.andJurisdictionIsNull()\n\t\t\t\t.andJurisdictionEqualTo(\"kenya\")\n\t\t\t\t.andJurisdictionNotEqualTo(\"kenya\")\n\t\t\t\t.andJurisdictionNotBetween(\"rwanda\", \"uganda\")\n\t\t\t\t.andJurisdictionLessThan(\"sa\")\n\t\t\t\t.andJurisdictionLessThanOrEqualTo(\"sa\")\n\t\t\t\t.andJurisdictionGreaterThan(\"sa\")\n\t\t\t\t.andJurisdictionGreaterThanOrEqualTo(\"sa\")\n\t\t\t\t.andJurisdictionLike(\"%a%\")\n\t\t\t\t.andJurisdictionNotLike(\"%a%\")\n\t\t\t\t.andJurisdictionIn(new ArrayList<>())\n\t\t\t\t.andJurisdictionNotIn(new ArrayList<>())\n\t\t\t\t.andJurisdictionBetween(\"a\", \"z\")\n\t\t\t\t.andJurisdictionNotBetween(\"ba\", \"chw\")\n\t\t\t\t.andVersionIsNull()\n\t\t\t\t.andVersionIsNotNull()\n\t\t\t\t.andVersionEqualTo(\"0.0.1\")\n\t\t\t\t.andVersionNotEqualTo(\"0.0.2\")\n\t\t\t\t.andVersionGreaterThan(\"0.0.3\")\n\t\t\t\t.andVersionGreaterThanOrEqualTo(\"0.0.3\")\n\t\t\t\t.andIsDraftIsNull()\n\t\t\t\t.andIsDraftIsNotNull()\n\t\t\t\t.andIsDraftEqualTo(true)\n\t\t\t\t.andIsDraftGreaterThan(false)\n\t\t\t\t.andIsDraftGreaterThanOrEqualTo(false)\n\t\t\t\t.andIsDraftLessThan(true)\n\t\t\t\t.andIsDraftLessThan(true)\n\t\t\t\t.andIsDraftLessThanOrEqualTo(true)\n\t\t\t\t.andIsDraftIn(new ArrayList<>())\n\t\t\t\t.andIsDraftBetween(true, false)\n\t\t\t\t.andIsDraftNotBetween(true, false)\n\t\t\t\t.andIsJsonValidatorIsNull()\n\t\t\t\t.andIsJsonValidatorIsNotNull()\n\t\t\t\t.andIsJsonValidatorEqualTo(true)\n\t\t\t\t.andIsJsonValidatorNotEqualTo(true)\n\t\t\t\t.andIsJsonValidatorGreaterThan(false)\n\t\t\t\t.andIsJsonValidatorGreaterThanOrEqualTo(false)\n\t\t\t\t.andIsJsonValidatorLessThan(true)\n\t\t\t\t.andIsJsonValidatorLessThanOrEqualTo(true)\n\t\t\t\t.andIsJsonValidatorIn(new ArrayList<>())\n\t\t\t\t.andIsJsonValidatorNotIn(new ArrayList<>())\n\t\t\t\t.andRelationIsNull()\n\t\t\t\t.andRelationIsNotNull()\n\t\t\t\t.andRelationEqualTo(\"anc/child.json\")\n\t\t\t\t.andRelationLike(\"%a%\")\n\t\t\t\t.andRelationNotLike(\"%a%\")\n\t\t\t\t.andRelationIn(new ArrayList<>())\n\t\t\t\t.andRelationNotIn(new ArrayList<>())\n\t\t\t\t.andRelationBetween(\"child\", \"registration\")\n\t\t\t\t.andRelationNotBetween(\"child\", \"registration\")\n\t\t\t\t.andRelationLessThan(\"child\")\n\t\t\t\t.andRelationLessThanOrEqualTo(\"child\")\n\t\t\t\t.andRelationGreaterThan(\"child\")\n\t\t\t\t.andRelationGreaterThanOrEqualTo(\"child\");\n\n\t\tassertEquals(69, criteria.getAllCriteria().size());\n\t}", "public Builder() {\n }", "public Builder() {\n }", "public ClimbingClubTest()\n {\n \n }", "public DataSourceEntityExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public InvoiceExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private Builder() {\n super(baconhep.TTau.SCHEMA$);\n }", "public UserExample() {\n oredCriteria = new ArrayList<>();\n }", "public GantBuilder ( ) { }", "public RentExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public UsersExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public PurchaseExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public BookInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public RookTest()\r\n {\r\n }", "private AttendantDatabase() {}", "public AllLaboTest() {\n }", "public ComtocomExampleBase() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private Builder() {\n super(org.ga4gh.models.CallSet.SCHEMA$);\n }", "@Override\n @Test\n public void testQuery_advancedRankingWithJoin() throws Exception { }", "private DMatch(Builder builder) {\n super(builder);\n }", "protected Criteria(YoungSeckillPromotionProductRelationExample example) {\n super();\n this.example = example;\n }" ]
[ "0.65575016", "0.6426779", "0.6390693", "0.6150579", "0.60172224", "0.59504044", "0.59351766", "0.58822864", "0.57924473", "0.57924473", "0.5762381", "0.57348484", "0.56956244", "0.56815666", "0.5661649", "0.5649284", "0.5634269", "0.56283104", "0.56194353", "0.5599703", "0.55836535", "0.55719745", "0.55509245", "0.55509245", "0.55509245", "0.5547018", "0.5536817", "0.55343604", "0.55309665", "0.5528583", "0.5523833", "0.5514166", "0.5511467", "0.5504277", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5502972", "0.5489858", "0.54738545", "0.545641", "0.54106516", "0.54106027", "0.54041064", "0.5383676", "0.538059", "0.53798157", "0.53739655", "0.537238", "0.536868", "0.53678536", "0.53638476", "0.5362971", "0.5358378", "0.5348576", "0.53455156", "0.53381896", "0.53295976", "0.53294015", "0.5327087", "0.5323393", "0.5322201", "0.53219414", "0.531778", "0.5312992", "0.5312992", "0.53123415", "0.5307881", "0.53037214", "0.5303338", "0.5296961", "0.52958924", "0.5290967", "0.52895594", "0.5281555", "0.52720636", "0.52687496", "0.5268498", "0.52660185", "0.5265138", "0.52638596", "0.52630955", "0.5261404", "0.5259172" ]
0.7175267
0
survey date of the inventory data; last time the inventory job has checked the live folder Date of the inventory data. Value is UTC timestamp in ISO 8601 YYYYMMDDThh:mm:ss.sZ
@JsonProperty("surveyDate") public Date getSurveyDate() { return surveyDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Date getTestListingDateTimeStamp() {\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1, 17, 0);\n return new Date(calendar.getTimeInMillis());\n }", "private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}", "String getCoverageExpirationDate(Record inputRecord);", "Date getEventFiredAt();", "private Date computeLastDate() {\n\t\tSyncHistory history = historyDao.loadLastOk();\n\t\tif (history != null) {\n\t\t\treturn history.getTime();\n\t\t}\n\t\treturn new Date(-1);\n\t}", "public Date getSentAt() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n Date d = null;\n try {\n d = sdf.parse(creationDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return d;\n }", "public Timestamp getHC_WorkStartDate2();", "@Override\r\n\tpublic NotesDateTime getCutoffDate() throws NotesApiException {\n\t\treturn null;\r\n\t}", "public Timestamp getDateTrx() \n{\nreturn (Timestamp)get_Value(\"DateTrx\");\n}", "@Override\r\n\tpublic long getEntryDateTime() {\n\t\treturn 0;\r\n\t}", "private String currentDateTime() {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n String date = df.format(Calendar.getInstance().getTime());\n return date;\n }", "Date snapshotTime();", "public Date getAsDate()\n {\n // Nope, shouldn't do that\n if (isASAP() || isNEVER()) {\n return null;\n }\n\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return new Date((itsValue - DUTC.get() * 1000000L - 3506716800000000L) / 1000L);\n }", "public Date getDateResponsed();", "public Timestamp getDatePromised() {\n\t\treturn (Timestamp) get_Value(\"DatePromised\");\n\t}", "public Timestamp getDatePromised() {\n\t\treturn (Timestamp) get_Value(\"DatePromised\");\n\t}", "public Date getDate() {\n if ( expiryDate.isSIPDate() ) {\n Calendar c=( (SIPDate)expiryDate ).getJavaCal();\n return c.getTime();\n }\n else return null; \n }", "public String getItemStockdate(){\n\t\t\tString elemVal = \"In Stock\";\n\t\t\t String temp = driver.findElement(productStockDate).getText();\n\t if (!elemVal.equals(null))\n\t \t elemVal = temp;\n\t\t\t Reporter.log(\"==========Stockdate is \" + elemVal +\"=========\", true);\n\t return elemVal;\n\t }", "public Timestamp getHC_WorkEndDate();", "public Date getVersionDate ();", "public Date getVALUE_DATE() {\r\n return VALUE_DATE;\r\n }", "public Date getVALUE_DATE() {\r\n return VALUE_DATE;\r\n }", "@DISPID(44)\r\n\t// = 0x2c. The runtime will prefer the VTID if present\r\n\t@VTID(42)\r\n\tjava.util.Date lastAlertDateTime();", "public java.util.Date getDateOfExamination(){\n return localDateOfExamination;\n }", "public Timestamp getDateInvoiced();", "java.lang.String getFoundingDate();", "Date getRequestedAt();", "@Override\n protected String ReplaceBoundaryISO8601DateValueByCondition(String pConditionString, String pOriginalValue) throws ParseException\n {\n Boolean IsOnlyISODate = false;\n /**\n * ตัวอย่าง PT10M = 10 นาที\n */\n \n //ตรวจสอบก่อนว่าเป็น ISO8601 กลุ่ม Duration หรือไม่\n if (!IsISO8601DateTime(pOriginalValue))\n {\n int startpos = pOriginalValue.indexOf(\"{\");\n int endpos = pOriginalValue.indexOf(\"}\");\n \n if ((startpos != -1) && (endpos != -1))\n {\n String raw = pOriginalValue.substring(startpos + 1, endpos);\n return \"${\" + raw + \" - 1 }\";\n }\n return pOriginalValue;\n }\n\n //ปรับวันที่ของ <timerDate> ภายใต้ <timerEventDefinition> ด้วยวันในอดีต\n //1.Convert ISO8601 to Java Data\n\n //ถ้าไม่มี Date ต้องไม่แก้ไขค่า\n // DateFormat originalDateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n // Date originalDate = LocalDateTime.parse(pOriginalValue);\n \n Pattern DATE_PATTERN = Pattern.compile(\"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\");\n if (DATE_PATTERN.matcher(pOriginalValue).matches())\n {\n IsOnlyISODate = true;\n pOriginalValue = pOriginalValue + \"T00:00:00.000\";\n }\n\n LocalDateTime originalDate = LocalDateTime.parse(pOriginalValue);\n\n\n //Save ค่าใหม่กลับไป\n originalDate = originalDate.minusDays(1);\n // TimeZone tz = TimeZone.getTimeZone(\"UTC\");\n // DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm'Z'\"); // Quoted \"Z\" to indicate UTC, no timezone offset\n // df.setTimeZone(tz);\n // String nowAsISO = df.format(new Date());\n DateTimeFormatter dateformat = null;\n if (IsOnlyISODate)\n {\n dateformat = DateTimeFormatter.ISO_LOCAL_DATE;\n }\n else\n {\n dateformat= DateTimeFormatter.ISO_LOCAL_DATE_TIME;\n }\n\n\n return dateformat.format(originalDate);\n }", "public Date getDateofLaunch() {\n\treturn null;\n}", "gen.grpc.hospital.examinations.DateTime getDateTime();", "private Date getPreviosDayStartTime() {\n\t\treturn null;\n\t}", "String getSourceUsageDateTime();", "public Date getDataGatheringDateTime() { return this.dataGatheringDateTime; }", "public Date getResDate() {\r\n\t\treturn resDate;\r\n\t}", "public java.util.Date getDate(){\n return localDate;\n }", "public String getEventDate() {\n\t\treturn date;\n\t}", "public Date getSOHTimestamp() {\r\n/* 265 */ return this._SOHTimestamp;\r\n/* */ }", "com.google.type.Date getAcquireDate();", "@Override\r\n\tpublic Date getApp_latest_logon_dt() {\n\t\treturn super.getApp_latest_logon_dt();\r\n\t}", "public Date getExecutionDate()\n {\n return executionDate;\n }", "public Date getEarliestFinishingDate();", "public Date getSystemDateTime(){\n\t\tDate systemDate = new Date();\t\t\n\t\treturn systemDate;\n\t}", "public Timestamp getPurchaseDate() {\n return purchaseDate;\n }", "public Date getStitchPrepDate() {\n return (Date) getAttributeInternal(STITCHPREPDATE);\n }", "public String Get_date() \n {\n \n return date;\n }", "static String getRefreshDate(){\n if (updateTime == null){\n updateTime = \"ERROR RETRIEVING CURRENT RATES\";\n }\n return conversionRates.get(\"date\").getAsString() + \" \" + updateTime;\n\n }", "private String determineSaveDate(boolean soldPreviously) {\n if (soldPreviously) {\n switch (mSaleStatusImage.getTag().toString()) {\n case FOR_SALE_TAG:\n return \"\";\n\n case SOLD_TAG:\n return mListingBeingEdited.getSaleDate();\n\n }\n } else {\n switch (mSaleStatusImage.getTag().toString()) {\n case FOR_SALE_TAG:\n return \"\";\n\n case SOLD_TAG:\n return Utils.getTodayDate();\n }\n }\n return \"\";\n }", "@Override\r\n\tpublic long getExitDateTime() {\n\t\treturn 0;\r\n\t}", "Date getInvoicedDate();", "public long getDate() {\n return date;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getLastStatusChangeDate();", "@Override\n\tpublic java.util.Date getRequestedDate() {\n\t\treturn _dmGtStatus.getRequestedDate();\n\t}", "Date getUpdatedDate();", "Date getCheckedOut();", "Date getCheckedOutDate();", "public String getLastUpdatedDateItem() {\n return lastUpdatedDateItem;\n }", "public DateAdp Modified_latest() {return modified_latest;}", "public DTM getSystemEntryDateTime() { \r\n\t\tDTM retVal = this.getTypedField(22, 0);\r\n\t\treturn retVal;\r\n }", "public Date getDateExecution() {\r\n return dateExecution;\r\n }", "protected Date getCurrentDateAndTime() {\n\t\tDate date = new Date();\n\t\tDate updatedDate = new Date((date.getTime() + (1000 * 60 * 60 * 24)));//(1000 * 60 * 60 * 24)=24 hrs. **** 120060 = 2 mins\n\t\treturn updatedDate;\n\t}", "public long getDate() {\n return date_;\n }", "public Date getVipStartdate() {\n return vipStartdate;\n }", "Date getDataIns();", "public Timestamp getsaledate() {\n return (Timestamp) getAttributeInternal(SALEDATE);\n }", "public Long getRequestDate() {\n return requestDate;\n }", "public java.sql.Timestamp getStatusdate()\n {\n return statusdate; \n }", "public Date getRecdate() {\n return recdate;\n }", "public void updateValueYesterday(String variable, String str_value) {\n\t\tDate date = new Date();\n\t\t// Add a day to our date\n\t\tGregorianCalendar gc = new GregorianCalendar();\n\t\tgc.setTime(date);\n\t\tgc.add(Calendar.HOUR_OF_DAY, -6);\n\t\tgc.add(Calendar.DAY_OF_YEAR, -1);\n\t\tdate = gc.getTime();\n\t\tDatabaseStore ds = DatabaseStore.DatabaseTextStore(variable,\n\t\t\t\tstr_value.toString(), date);\n\t\tupdateQuestion(ds);\n\t}", "public Date getStudyDateTime()\n {\n return studyDateTime;\n }", "public void setDate(long value) {\n this.date = value;\n }", "public final Date dateValue() {\n if (calValue != null)\n return calValue.getTime();\n else\n return null;\n }", "@DISPID(49)\r\n\t// = 0x31. The runtime will prefer the VTID if present\r\n\t@VTID(47)\r\n\tjava.util.Date lastCheckpointDateTime();", "public long getDate() {\n return date;\n }", "public String getVersionDate();", "public Date getRespdatetime() {\n\t\treturn respdatetime;\n\t}", "@Override\r\n\tpublic Date getEventEndTime() {\n\t\treturn null;\r\n\t}", "public String getDate(){ return this.start_date;}", "if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }", "public Date getSubscribetime() {\n return subscribetime;\n }", "public String getReturnDate();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getFreezeTimestamp();", "public String getCurrentDate()\n {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyyMMddHHmm\");\n return df.format(indexDate);\n }", "public Date getRequestDate();", "public Date getCertifiedDate() {\r\n \r\n Long deprovisioningCertifiedMillis = this.getCertifiedMillis();\r\n \r\n Date deprovisioningCertifiedDate = deprovisioningCertifiedMillis == null ? null : new Date(deprovisioningCertifiedMillis);\r\n \r\n return deprovisioningCertifiedDate;\r\n }", "public Date getActualRepayDate() {\n return actualRepayDate;\n }", "private String getCurrentTimestamp() {\n\n String mytime = java.text.DateFormat.getTimeInstance().format(Calendar.getInstance().getTime());\n String mydate =java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());\n return mytime;\n }", "private Date computeLastDate(String terminalId) {\n\t\tSyncHistory last = historyDao.loadLastOk(terminalId);\n\t\tif (last != null) {\n\t\t\treturn last.getTime();\n\t\t}\n\t\treturn null;\n\t}", "public static String getLog14Date(){\r\n return TIMESTAMP14ISO8601Z.get().format(new Date());\r\n }", "public Date getSpecimenToLabDateTime() {\n\t\treturn specimenToLabDateTime;\n\t}", "private Date getRunningDate(final Context context)\r\n {\r\n Date reportDate = getParameter1(context, Date.class);\r\n if (reportDate==null)\r\n {\r\n reportDate = new Date();\r\n }\r\n return reportDate;\r\n\r\n }", "public Timestamp getMovementDate();", "@Override\n\tpublic Date getQueuedDate() {\n\t\treturn model.getQueuedDate();\n\t}", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "public static Date getLastTimeRunInDate(Context c) {\n\t\tlong lastTimeRuninMillis = getLastTimeRunInMills(c);\n\t\tif (lastTimeRuninMillis != -1)\n\t\t\treturn new Date(getLastTimeRunInMills(c));\n\t\treturn null;\n\t}", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public XMLGregorianCalendar getOn_sale_datetime() {\r\n\t\treturn on_sale_datetime;\r\n\t}", "@Description(\"request was sent after {date}\")\n public static Criteria<HarEntry> recordedStartedDateTimeAfter(@DescriptionFragment(\"date\") Date date) {\n checkArgument(nonNull(date), \"Date should be defined\");\n\n return condition(entry -> {\n Date startedDateTime = entry.getStartedDateTime();\n\n return startedDateTime.after(date);\n });\n }", "private String getTimestampDifference(){\r\n Log.d(TAG, \"getTimestampDifference: getting timestamp difference.\");\r\n\r\n String difference = \"\";\r\n Calendar c = Calendar.getInstance();\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\", Locale.UK);\r\n sdf.setTimeZone(TimeZone.getTimeZone(\"Asia/Dubai\"));//google 'android list of timezones'\r\n Date today = c.getTime();\r\n sdf.format(today);\r\n Date timestamp;\r\n\r\n final String photoTimestamp = mJobPhoto.getDate_created();\r\n try{\r\n timestamp = sdf.parse(photoTimestamp);\r\n difference = String.valueOf(Math.round(((today.getTime() - timestamp.getTime()) / 1000 / 60 / 60 / 24 )));\r\n }catch (ParseException e){\r\n Log.e(TAG, \"getTimestampDifference: ParseException: \" + e.getMessage() );\r\n difference = \"0\";\r\n }\r\n return difference;\r\n }", "public void setDataGatheringDateTime(Date dateTime) { this.dataGatheringDateTime = dateTime; }" ]
[ "0.60997975", "0.59706444", "0.57963353", "0.57282805", "0.549821", "0.5492792", "0.5461751", "0.5415844", "0.5391802", "0.53768235", "0.5367549", "0.53650594", "0.5351532", "0.5344295", "0.53139675", "0.53139675", "0.52931726", "0.5284155", "0.5280741", "0.52732354", "0.52702034", "0.52702034", "0.5264979", "0.52507454", "0.5249781", "0.5248859", "0.52399814", "0.52370876", "0.5226488", "0.52200806", "0.521519", "0.5213482", "0.52067804", "0.5162314", "0.5157165", "0.5156973", "0.51454145", "0.51266956", "0.51254344", "0.5121911", "0.5115496", "0.51123726", "0.5108196", "0.51031244", "0.50981534", "0.5092871", "0.50763124", "0.50713533", "0.50625074", "0.50617313", "0.50599337", "0.50549006", "0.5052368", "0.50474244", "0.50453347", "0.50437367", "0.5036725", "0.50333595", "0.50281537", "0.5027673", "0.5027587", "0.5018804", "0.5016451", "0.501589", "0.50118196", "0.5011173", "0.5008804", "0.50048596", "0.5004414", "0.50036454", "0.500337", "0.5001615", "0.5000912", "0.49981493", "0.49904826", "0.49884596", "0.4982136", "0.4979794", "0.4976906", "0.4972687", "0.49682403", "0.49625888", "0.4960503", "0.49573892", "0.4955904", "0.49498188", "0.49479198", "0.4944046", "0.4943554", "0.49418044", "0.49372345", "0.493685", "0.49360397", "0.49358922", "0.49336717", "0.49336717", "0.49315894", "0.49307653", "0.49290693", "0.49282256" ]
0.53541106
12
survey date of the inventory data; last time the inventory job has checked the live folder Date of the inventory data. Value is UTC timestamp in ISO 8601 YYYYMMDDThh:mm:ss.sZ
@JsonProperty("surveyDate") public void setSurveyDate(Date surveyDate) { this.surveyDate = surveyDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Date getTestListingDateTimeStamp() {\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1, 17, 0);\n return new Date(calendar.getTimeInMillis());\n }", "private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}", "String getCoverageExpirationDate(Record inputRecord);", "Date getEventFiredAt();", "private Date computeLastDate() {\n\t\tSyncHistory history = historyDao.loadLastOk();\n\t\tif (history != null) {\n\t\t\treturn history.getTime();\n\t\t}\n\t\treturn new Date(-1);\n\t}", "public Date getSentAt() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n Date d = null;\n try {\n d = sdf.parse(creationDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return d;\n }", "public Timestamp getHC_WorkStartDate2();", "@Override\r\n\tpublic NotesDateTime getCutoffDate() throws NotesApiException {\n\t\treturn null;\r\n\t}", "public Timestamp getDateTrx() \n{\nreturn (Timestamp)get_Value(\"DateTrx\");\n}", "@Override\r\n\tpublic long getEntryDateTime() {\n\t\treturn 0;\r\n\t}", "private String currentDateTime() {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n String date = df.format(Calendar.getInstance().getTime());\n return date;\n }", "Date snapshotTime();", "@JsonProperty(\"surveyDate\")\r\n public Date getSurveyDate() {\r\n return surveyDate;\r\n }", "public Date getAsDate()\n {\n // Nope, shouldn't do that\n if (isASAP() || isNEVER()) {\n return null;\n }\n\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return new Date((itsValue - DUTC.get() * 1000000L - 3506716800000000L) / 1000L);\n }", "public Date getDateResponsed();", "public Timestamp getDatePromised() {\n\t\treturn (Timestamp) get_Value(\"DatePromised\");\n\t}", "public Timestamp getDatePromised() {\n\t\treturn (Timestamp) get_Value(\"DatePromised\");\n\t}", "public Date getDate() {\n if ( expiryDate.isSIPDate() ) {\n Calendar c=( (SIPDate)expiryDate ).getJavaCal();\n return c.getTime();\n }\n else return null; \n }", "public String getItemStockdate(){\n\t\t\tString elemVal = \"In Stock\";\n\t\t\t String temp = driver.findElement(productStockDate).getText();\n\t if (!elemVal.equals(null))\n\t \t elemVal = temp;\n\t\t\t Reporter.log(\"==========Stockdate is \" + elemVal +\"=========\", true);\n\t return elemVal;\n\t }", "public Timestamp getHC_WorkEndDate();", "public Date getVersionDate ();", "public Date getVALUE_DATE() {\r\n return VALUE_DATE;\r\n }", "public Date getVALUE_DATE() {\r\n return VALUE_DATE;\r\n }", "@DISPID(44)\r\n\t// = 0x2c. The runtime will prefer the VTID if present\r\n\t@VTID(42)\r\n\tjava.util.Date lastAlertDateTime();", "public Timestamp getDateInvoiced();", "public java.util.Date getDateOfExamination(){\n return localDateOfExamination;\n }", "java.lang.String getFoundingDate();", "Date getRequestedAt();", "@Override\n protected String ReplaceBoundaryISO8601DateValueByCondition(String pConditionString, String pOriginalValue) throws ParseException\n {\n Boolean IsOnlyISODate = false;\n /**\n * ตัวอย่าง PT10M = 10 นาที\n */\n \n //ตรวจสอบก่อนว่าเป็น ISO8601 กลุ่ม Duration หรือไม่\n if (!IsISO8601DateTime(pOriginalValue))\n {\n int startpos = pOriginalValue.indexOf(\"{\");\n int endpos = pOriginalValue.indexOf(\"}\");\n \n if ((startpos != -1) && (endpos != -1))\n {\n String raw = pOriginalValue.substring(startpos + 1, endpos);\n return \"${\" + raw + \" - 1 }\";\n }\n return pOriginalValue;\n }\n\n //ปรับวันที่ของ <timerDate> ภายใต้ <timerEventDefinition> ด้วยวันในอดีต\n //1.Convert ISO8601 to Java Data\n\n //ถ้าไม่มี Date ต้องไม่แก้ไขค่า\n // DateFormat originalDateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n // Date originalDate = LocalDateTime.parse(pOriginalValue);\n \n Pattern DATE_PATTERN = Pattern.compile(\"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\");\n if (DATE_PATTERN.matcher(pOriginalValue).matches())\n {\n IsOnlyISODate = true;\n pOriginalValue = pOriginalValue + \"T00:00:00.000\";\n }\n\n LocalDateTime originalDate = LocalDateTime.parse(pOriginalValue);\n\n\n //Save ค่าใหม่กลับไป\n originalDate = originalDate.minusDays(1);\n // TimeZone tz = TimeZone.getTimeZone(\"UTC\");\n // DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm'Z'\"); // Quoted \"Z\" to indicate UTC, no timezone offset\n // df.setTimeZone(tz);\n // String nowAsISO = df.format(new Date());\n DateTimeFormatter dateformat = null;\n if (IsOnlyISODate)\n {\n dateformat = DateTimeFormatter.ISO_LOCAL_DATE;\n }\n else\n {\n dateformat= DateTimeFormatter.ISO_LOCAL_DATE_TIME;\n }\n\n\n return dateformat.format(originalDate);\n }", "public Date getDateofLaunch() {\n\treturn null;\n}", "gen.grpc.hospital.examinations.DateTime getDateTime();", "private Date getPreviosDayStartTime() {\n\t\treturn null;\n\t}", "String getSourceUsageDateTime();", "public Date getDataGatheringDateTime() { return this.dataGatheringDateTime; }", "public Date getResDate() {\r\n\t\treturn resDate;\r\n\t}", "public String getEventDate() {\n\t\treturn date;\n\t}", "public java.util.Date getDate(){\n return localDate;\n }", "public Date getSOHTimestamp() {\r\n/* 265 */ return this._SOHTimestamp;\r\n/* */ }", "com.google.type.Date getAcquireDate();", "@Override\r\n\tpublic Date getApp_latest_logon_dt() {\n\t\treturn super.getApp_latest_logon_dt();\r\n\t}", "public Date getExecutionDate()\n {\n return executionDate;\n }", "public Date getEarliestFinishingDate();", "public Date getSystemDateTime(){\n\t\tDate systemDate = new Date();\t\t\n\t\treturn systemDate;\n\t}", "public Timestamp getPurchaseDate() {\n return purchaseDate;\n }", "public Date getStitchPrepDate() {\n return (Date) getAttributeInternal(STITCHPREPDATE);\n }", "public String Get_date() \n {\n \n return date;\n }", "static String getRefreshDate(){\n if (updateTime == null){\n updateTime = \"ERROR RETRIEVING CURRENT RATES\";\n }\n return conversionRates.get(\"date\").getAsString() + \" \" + updateTime;\n\n }", "private String determineSaveDate(boolean soldPreviously) {\n if (soldPreviously) {\n switch (mSaleStatusImage.getTag().toString()) {\n case FOR_SALE_TAG:\n return \"\";\n\n case SOLD_TAG:\n return mListingBeingEdited.getSaleDate();\n\n }\n } else {\n switch (mSaleStatusImage.getTag().toString()) {\n case FOR_SALE_TAG:\n return \"\";\n\n case SOLD_TAG:\n return Utils.getTodayDate();\n }\n }\n return \"\";\n }", "@Override\r\n\tpublic long getExitDateTime() {\n\t\treturn 0;\r\n\t}", "Date getInvoicedDate();", "public long getDate() {\n return date;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getLastStatusChangeDate();", "@Override\n\tpublic java.util.Date getRequestedDate() {\n\t\treturn _dmGtStatus.getRequestedDate();\n\t}", "Date getUpdatedDate();", "Date getCheckedOut();", "Date getCheckedOutDate();", "public String getLastUpdatedDateItem() {\n return lastUpdatedDateItem;\n }", "public DateAdp Modified_latest() {return modified_latest;}", "public DTM getSystemEntryDateTime() { \r\n\t\tDTM retVal = this.getTypedField(22, 0);\r\n\t\treturn retVal;\r\n }", "public Date getDateExecution() {\r\n return dateExecution;\r\n }", "protected Date getCurrentDateAndTime() {\n\t\tDate date = new Date();\n\t\tDate updatedDate = new Date((date.getTime() + (1000 * 60 * 60 * 24)));//(1000 * 60 * 60 * 24)=24 hrs. **** 120060 = 2 mins\n\t\treturn updatedDate;\n\t}", "public long getDate() {\n return date_;\n }", "public Date getVipStartdate() {\n return vipStartdate;\n }", "Date getDataIns();", "public Timestamp getsaledate() {\n return (Timestamp) getAttributeInternal(SALEDATE);\n }", "public java.sql.Timestamp getStatusdate()\n {\n return statusdate; \n }", "public Long getRequestDate() {\n return requestDate;\n }", "public Date getRecdate() {\n return recdate;\n }", "public void updateValueYesterday(String variable, String str_value) {\n\t\tDate date = new Date();\n\t\t// Add a day to our date\n\t\tGregorianCalendar gc = new GregorianCalendar();\n\t\tgc.setTime(date);\n\t\tgc.add(Calendar.HOUR_OF_DAY, -6);\n\t\tgc.add(Calendar.DAY_OF_YEAR, -1);\n\t\tdate = gc.getTime();\n\t\tDatabaseStore ds = DatabaseStore.DatabaseTextStore(variable,\n\t\t\t\tstr_value.toString(), date);\n\t\tupdateQuestion(ds);\n\t}", "public Date getStudyDateTime()\n {\n return studyDateTime;\n }", "public final Date dateValue() {\n if (calValue != null)\n return calValue.getTime();\n else\n return null;\n }", "public void setDate(long value) {\n this.date = value;\n }", "@DISPID(49)\r\n\t// = 0x31. The runtime will prefer the VTID if present\r\n\t@VTID(47)\r\n\tjava.util.Date lastCheckpointDateTime();", "public long getDate() {\n return date;\n }", "public String getVersionDate();", "public Date getRespdatetime() {\n\t\treturn respdatetime;\n\t}", "@Override\r\n\tpublic Date getEventEndTime() {\n\t\treturn null;\r\n\t}", "public String getDate(){ return this.start_date;}", "if (exitDateTime == adhocTicket.getExitDateTime()) {\n System.out.println(\"Exit Date Time is passed\");\n }", "public Date getSubscribetime() {\n return subscribetime;\n }", "public String getReturnDate();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getFreezeTimestamp();", "public String getCurrentDate()\n {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyyMMddHHmm\");\n return df.format(indexDate);\n }", "public Date getRequestDate();", "public Date getCertifiedDate() {\r\n \r\n Long deprovisioningCertifiedMillis = this.getCertifiedMillis();\r\n \r\n Date deprovisioningCertifiedDate = deprovisioningCertifiedMillis == null ? null : new Date(deprovisioningCertifiedMillis);\r\n \r\n return deprovisioningCertifiedDate;\r\n }", "public Date getActualRepayDate() {\n return actualRepayDate;\n }", "private String getCurrentTimestamp() {\n\n String mytime = java.text.DateFormat.getTimeInstance().format(Calendar.getInstance().getTime());\n String mydate =java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());\n return mytime;\n }", "private Date computeLastDate(String terminalId) {\n\t\tSyncHistory last = historyDao.loadLastOk(terminalId);\n\t\tif (last != null) {\n\t\t\treturn last.getTime();\n\t\t}\n\t\treturn null;\n\t}", "public static String getLog14Date(){\r\n return TIMESTAMP14ISO8601Z.get().format(new Date());\r\n }", "public Date getSpecimenToLabDateTime() {\n\t\treturn specimenToLabDateTime;\n\t}", "private Date getRunningDate(final Context context)\r\n {\r\n Date reportDate = getParameter1(context, Date.class);\r\n if (reportDate==null)\r\n {\r\n reportDate = new Date();\r\n }\r\n return reportDate;\r\n\r\n }", "public Timestamp getMovementDate();", "@Override\n\tpublic Date getQueuedDate() {\n\t\treturn model.getQueuedDate();\n\t}", "public static Date getLastTimeRunInDate(Context c) {\n\t\tlong lastTimeRuninMillis = getLastTimeRunInMills(c);\n\t\tif (lastTimeRuninMillis != -1)\n\t\t\treturn new Date(getLastTimeRunInMills(c));\n\t\treturn null;\n\t}", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public XMLGregorianCalendar getOn_sale_datetime() {\r\n\t\treturn on_sale_datetime;\r\n\t}", "@Description(\"request was sent after {date}\")\n public static Criteria<HarEntry> recordedStartedDateTimeAfter(@DescriptionFragment(\"date\") Date date) {\n checkArgument(nonNull(date), \"Date should be defined\");\n\n return condition(entry -> {\n Date startedDateTime = entry.getStartedDateTime();\n\n return startedDateTime.after(date);\n });\n }", "private String getTimestampDifference(){\r\n Log.d(TAG, \"getTimestampDifference: getting timestamp difference.\");\r\n\r\n String difference = \"\";\r\n Calendar c = Calendar.getInstance();\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\", Locale.UK);\r\n sdf.setTimeZone(TimeZone.getTimeZone(\"Asia/Dubai\"));//google 'android list of timezones'\r\n Date today = c.getTime();\r\n sdf.format(today);\r\n Date timestamp;\r\n\r\n final String photoTimestamp = mJobPhoto.getDate_created();\r\n try{\r\n timestamp = sdf.parse(photoTimestamp);\r\n difference = String.valueOf(Math.round(((today.getTime() - timestamp.getTime()) / 1000 / 60 / 60 / 24 )));\r\n }catch (ParseException e){\r\n Log.e(TAG, \"getTimestampDifference: ParseException: \" + e.getMessage() );\r\n difference = \"0\";\r\n }\r\n return difference;\r\n }", "public void setDataGatheringDateTime(Date dateTime) { this.dataGatheringDateTime = dateTime; }" ]
[ "0.6097181", "0.59694326", "0.5795552", "0.57267594", "0.5496759", "0.5490069", "0.5460737", "0.5414111", "0.5391656", "0.53762096", "0.5366044", "0.536555", "0.53524494", "0.5349078", "0.53410196", "0.5313208", "0.5313208", "0.52918273", "0.52829957", "0.5279541", "0.5271497", "0.52690154", "0.52690154", "0.52634835", "0.5248938", "0.5248554", "0.5246264", "0.5237674", "0.5236198", "0.5225207", "0.5219702", "0.5213326", "0.5212792", "0.52058023", "0.51599854", "0.5154508", "0.5153027", "0.5144421", "0.5125243", "0.5123595", "0.5120088", "0.5114214", "0.5109759", "0.5106241", "0.5100873", "0.5094804", "0.5091234", "0.50742066", "0.5070517", "0.5060666", "0.50593317", "0.5058783", "0.5052371", "0.5050233", "0.50463706", "0.5043506", "0.50429064", "0.50361675", "0.50323", "0.50263935", "0.502495", "0.5024807", "0.50170994", "0.50153506", "0.50144124", "0.50093603", "0.5008941", "0.5006746", "0.50046796", "0.50032365", "0.50027066", "0.5000515", "0.49995524", "0.49982744", "0.49964637", "0.49885064", "0.49883357", "0.49795657", "0.49789476", "0.497715", "0.4970487", "0.49667025", "0.49603206", "0.4957684", "0.4955012", "0.49542117", "0.49479735", "0.49467814", "0.49421367", "0.49419284", "0.49400544", "0.4935842", "0.4935702", "0.49341732", "0.49333736", "0.49323466", "0.49323466", "0.49294668", "0.49277458", "0.4927514", "0.492585" ]
0.0
-1
path absolute path based on live folder of a JobScheduler object.
@JsonProperty("path") public String getPath() { return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Path getAppointmentScheduleFilePath();", "public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }", "public String getLocationPath();", "public String getAbsPath();", "public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public String getPath();", "public String getPath();", "public String getPath();", "public String referenceDownloadedArchiveFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getDestinationFolder().getAbsolutePath() + File.separator + this.tomcatArchive.getName();\n }", "public String getAbsolutePath() {\n String path = null;\n if (parent != null) {\n path = parent.getAbsolutePath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"/%s\", name);\n }\n return path;\n }", "public static String sActivePath() \r\n\t{\r\n\t\tString activePath = null;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tactivePath = new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn activePath;\r\n\t}", "public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "public String resolvePath();", "public String getJobURI() {\n\t\treturn jobURI;\n\t}", "String getApplicationContextPath();", "public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}", "Path getBookingSystemFilePath();", "public String path() {\n return filesystem().pathString(path);\n }", "String folderPath();", "String getFullWorkfileName();", "public String getWorkRelativePath() {\n return getWorkRelativePath(testURL);\n }", "@Nullable String getPath();", "public String referenceTomcatInstanceFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getInstanceName() + \"-\" + getEnvironmentName() + \"-\" +this.tomcatArchive.getName();\n }", "public String getCurrentPath() {\n\t\treturn \"\";\n\t}", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "public abstract String getPath();", "public abstract String getPath();", "Path getLocation();", "Path getPath();", "public String getPath() {\n\t\treturn pfDir.getPath();\n\t}", "private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }", "public URI getAbsoluteLobFolder();", "public static String getCurrentPath() {\n File file = new File(\"\");\n return file.getAbsolutePath();\n }", "public abstract String getFullPath();", "public static Path getPathForObject(Object obj) {\r\n ReportsDirectory constant = fromObject(obj);\r\n return getTargetPath().resolve(constant.folder);\r\n }", "String path(Configuration configuration);", "public String getArchiveFolderPath()\n {\n String currentWorkingDir = SystemUtil.getWorkingDirPath()+\"/\";\n \n ConfigurationStore configStore = ConfigurationStore.getInstance();\n String archiveFolder = configStore.getProperty(IISATProperty.CATEGORY, IISATProperty.ARCHIVE_FOLDER, null);\n String absArchiveFolderPath = currentWorkingDir + archiveFolder;\n _logger.logMessage(\"getArchiveFolderPath\", null, \"Abs archive folder path is \"+absArchiveFolderPath);\n return absArchiveFolderPath;\n }", "FsPath baseDir();", "public String getFullPath()\n {\n return( fullPath );\n }", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }", "public String getFileSystemPath() {\n return getCacheDir().getAbsolutePath()\n + File.separator\n + getItemPath();\n }", "public final String getPath()\n {\n return path;\n }", "public IPath getRuntimeBaseDirectory(TomcatServer server);", "public String toPathString() {\n return path();\n }", "protected String path() {\n return path(getName());\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n }\n }", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static Path getPath() {\n\t\tPath path = Paths.get(getManagerDir(), NAME);\n\t\treturn path;\n\t}", "public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public String getResourcePath();", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }", "public static String getComplaintAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t}", "String getAbsolutePathWithinSlingHome(String relativePath);", "public Optional<URI> getCurrentSourcePath() {\r\n return context.getAssociatedPath();\r\n }", "public static String getPath() { return Objects.requireNonNull(Bukkit.getServer().getPluginManager().getPlugin(\"Catacombs\"))\n .getDataFolder().getAbsolutePath(); }", "public String getAppPathname();", "private Path getDoneAppPath(ApplicationId appId) {\n int appNum = appId.getId();\n appNum /= 1000;\n int bucket2 = appNum % 1000;\n int bucket1 = appNum / 1000;\n return new Path(doneRootPath,\n String.format(APP_DONE_DIR_PREFIX_FORMAT, appId.getClusterTimestamp(),\n bucket1, bucket2, appId.toString()));\n }", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "java.lang.String getSrcPath();", "public String getPath()\n {\n return path;\n }", "public String getPath()\n {\n return path;\n }", "public static String getWorkflowAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t\t\n\t}", "public String getRunLocation();", "public String getLaunchPath() {\n return this.LaunchPath;\n }", "String getFilepath();", "public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}", "public String getPath() {\r\n return path;\r\n }", "public String getPath() {\r\n return path;\r\n }", "public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }", "public static String findCurrentDirectory() {\n\t\tString absolutePath = new File(\"\").getAbsolutePath();\n\t return absolutePath;\n\t}", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\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 Path getPath();", "public String getPath()\n {\n\n return _path;\n }", "public String getPath(){\r\n\t\treturn path;\r\n\t}" ]
[ "0.634813", "0.6279269", "0.6147922", "0.6040809", "0.5988992", "0.5781191", "0.5781191", "0.5781191", "0.5781191", "0.5781191", "0.5776998", "0.5776998", "0.5776998", "0.5773869", "0.57242286", "0.5721403", "0.56409097", "0.56153065", "0.5602627", "0.557247", "0.55531836", "0.55409986", "0.55385107", "0.55324024", "0.55081457", "0.55041534", "0.5501038", "0.54851615", "0.54761165", "0.5447845", "0.5432991", "0.5424506", "0.54175186", "0.53989655", "0.53989655", "0.5398108", "0.53860307", "0.5383005", "0.5379177", "0.53613126", "0.53605175", "0.53584164", "0.53558487", "0.535378", "0.53406227", "0.53366446", "0.5334228", "0.5330393", "0.53268385", "0.5325788", "0.53236216", "0.530779", "0.5297749", "0.5283241", "0.5278981", "0.5275401", "0.5272802", "0.5252578", "0.52472717", "0.5244764", "0.5240025", "0.5240025", "0.52250355", "0.52220666", "0.52170986", "0.5210101", "0.5200461", "0.519856", "0.5198428", "0.5197356", "0.5195386", "0.51879454", "0.51879454", "0.5186751", "0.51845044", "0.51842725", "0.5174852", "0.5164032", "0.5161837", "0.5161837", "0.5146202", "0.514581", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.5145397", "0.51355493", "0.51315945", "0.5122049", "0.5112605" ]
0.0
-1
path absolute path based on live folder of a JobScheduler object.
@JsonProperty("path") public void setPath(String path) { this.path = path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Path getAppointmentScheduleFilePath();", "public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }", "public String getLocationPath();", "public String getAbsPath();", "public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public String getPath();", "public String getPath();", "public String getPath();", "public String referenceDownloadedArchiveFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getDestinationFolder().getAbsolutePath() + File.separator + this.tomcatArchive.getName();\n }", "public String getAbsolutePath() {\n String path = null;\n if (parent != null) {\n path = parent.getAbsolutePath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"/%s\", name);\n }\n return path;\n }", "public static String sActivePath() \r\n\t{\r\n\t\tString activePath = null;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tactivePath = new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn activePath;\r\n\t}", "public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "public String resolvePath();", "public String getJobURI() {\n\t\treturn jobURI;\n\t}", "String getApplicationContextPath();", "public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}", "Path getBookingSystemFilePath();", "public String path() {\n return filesystem().pathString(path);\n }", "String folderPath();", "String getFullWorkfileName();", "public String getWorkRelativePath() {\n return getWorkRelativePath(testURL);\n }", "@Nullable String getPath();", "public String referenceTomcatInstanceFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getInstanceName() + \"-\" + getEnvironmentName() + \"-\" +this.tomcatArchive.getName();\n }", "public String getCurrentPath() {\n\t\treturn \"\";\n\t}", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "public abstract String getPath();", "public abstract String getPath();", "Path getLocation();", "Path getPath();", "public String getPath() {\n\t\treturn pfDir.getPath();\n\t}", "private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }", "public URI getAbsoluteLobFolder();", "public static String getCurrentPath() {\n File file = new File(\"\");\n return file.getAbsolutePath();\n }", "public abstract String getFullPath();", "public static Path getPathForObject(Object obj) {\r\n ReportsDirectory constant = fromObject(obj);\r\n return getTargetPath().resolve(constant.folder);\r\n }", "String path(Configuration configuration);", "public String getArchiveFolderPath()\n {\n String currentWorkingDir = SystemUtil.getWorkingDirPath()+\"/\";\n \n ConfigurationStore configStore = ConfigurationStore.getInstance();\n String archiveFolder = configStore.getProperty(IISATProperty.CATEGORY, IISATProperty.ARCHIVE_FOLDER, null);\n String absArchiveFolderPath = currentWorkingDir + archiveFolder;\n _logger.logMessage(\"getArchiveFolderPath\", null, \"Abs archive folder path is \"+absArchiveFolderPath);\n return absArchiveFolderPath;\n }", "FsPath baseDir();", "public String getFullPath()\n {\n return( fullPath );\n }", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }", "public String getFileSystemPath() {\n return getCacheDir().getAbsolutePath()\n + File.separator\n + getItemPath();\n }", "public final String getPath()\n {\n return path;\n }", "public IPath getRuntimeBaseDirectory(TomcatServer server);", "public String toPathString() {\n return path();\n }", "protected String path() {\n return path(getName());\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n }\n }", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static Path getPath() {\n\t\tPath path = Paths.get(getManagerDir(), NAME);\n\t\treturn path;\n\t}", "public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public String getResourcePath();", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }", "public static String getComplaintAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t}", "String getAbsolutePathWithinSlingHome(String relativePath);", "public Optional<URI> getCurrentSourcePath() {\r\n return context.getAssociatedPath();\r\n }", "public static String getPath() { return Objects.requireNonNull(Bukkit.getServer().getPluginManager().getPlugin(\"Catacombs\"))\n .getDataFolder().getAbsolutePath(); }", "public String getAppPathname();", "private Path getDoneAppPath(ApplicationId appId) {\n int appNum = appId.getId();\n appNum /= 1000;\n int bucket2 = appNum % 1000;\n int bucket1 = appNum / 1000;\n return new Path(doneRootPath,\n String.format(APP_DONE_DIR_PREFIX_FORMAT, appId.getClusterTimestamp(),\n bucket1, bucket2, appId.toString()));\n }", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "java.lang.String getSrcPath();", "public static String getWorkflowAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t\t\n\t}", "public String getPath()\n {\n return path;\n }", "public String getPath()\n {\n return path;\n }", "public String getRunLocation();", "public String getLaunchPath() {\n return this.LaunchPath;\n }", "String getFilepath();", "public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}", "public String getPath() {\r\n return path;\r\n }", "public String getPath() {\r\n return path;\r\n }", "public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }", "public static String findCurrentDirectory() {\n\t\tString absolutePath = new File(\"\").getAbsolutePath();\n\t return absolutePath;\n\t}", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\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 Path getPath();", "public String getPath()\n {\n\n return _path;\n }", "public String getPath(){\r\n\t\treturn path;\r\n\t}" ]
[ "0.6349114", "0.62813634", "0.61489797", "0.60409963", "0.598922", "0.578192", "0.578192", "0.578192", "0.578192", "0.578192", "0.5777166", "0.5777166", "0.5777166", "0.5774265", "0.57247037", "0.57228935", "0.5640372", "0.5615858", "0.56028205", "0.5571774", "0.5553831", "0.5543026", "0.5539474", "0.55322933", "0.5510058", "0.5503417", "0.55011916", "0.54861605", "0.5477243", "0.544795", "0.5432653", "0.5424692", "0.5417469", "0.53989834", "0.53989834", "0.53989357", "0.53867435", "0.53836226", "0.53795516", "0.53612447", "0.5360817", "0.5358017", "0.5355446", "0.53550965", "0.5341202", "0.5336415", "0.53334236", "0.5330809", "0.5326837", "0.5325512", "0.5323288", "0.53077465", "0.5297973", "0.52830255", "0.5278999", "0.5277044", "0.5272794", "0.52533644", "0.5248933", "0.52448213", "0.5240154", "0.5240154", "0.5225274", "0.5223821", "0.52186996", "0.52101904", "0.5200558", "0.51999456", "0.5199935", "0.5195813", "0.5195291", "0.5188198", "0.5187583", "0.5187583", "0.51848996", "0.5184415", "0.51751405", "0.5165312", "0.516149", "0.516149", "0.5147133", "0.51465714", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.51362044", "0.5131893", "0.5121798", "0.51124614" ]
0.0
-1
path absolute path based on live folder of a JobScheduler object.
@JsonProperty("processClass") public String getProcessClass() { return processClass; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Path getAppointmentScheduleFilePath();", "public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }", "public String getLocationPath();", "public String getAbsPath();", "public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public String getPath();", "public String getPath();", "public String getPath();", "public String referenceDownloadedArchiveFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getDestinationFolder().getAbsolutePath() + File.separator + this.tomcatArchive.getName();\n }", "public String getAbsolutePath() {\n String path = null;\n if (parent != null) {\n path = parent.getAbsolutePath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"/%s\", name);\n }\n return path;\n }", "public static String sActivePath() \r\n\t{\r\n\t\tString activePath = null;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tactivePath = new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn activePath;\r\n\t}", "public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "public String resolvePath();", "public String getJobURI() {\n\t\treturn jobURI;\n\t}", "String getApplicationContextPath();", "public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}", "Path getBookingSystemFilePath();", "public String path() {\n return filesystem().pathString(path);\n }", "String folderPath();", "String getFullWorkfileName();", "public String getWorkRelativePath() {\n return getWorkRelativePath(testURL);\n }", "@Nullable String getPath();", "public String referenceTomcatInstanceFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getInstanceName() + \"-\" + getEnvironmentName() + \"-\" +this.tomcatArchive.getName();\n }", "public String getCurrentPath() {\n\t\treturn \"\";\n\t}", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "public abstract String getPath();", "public abstract String getPath();", "Path getLocation();", "Path getPath();", "public String getPath() {\n\t\treturn pfDir.getPath();\n\t}", "private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }", "public URI getAbsoluteLobFolder();", "public static String getCurrentPath() {\n File file = new File(\"\");\n return file.getAbsolutePath();\n }", "public abstract String getFullPath();", "public static Path getPathForObject(Object obj) {\r\n ReportsDirectory constant = fromObject(obj);\r\n return getTargetPath().resolve(constant.folder);\r\n }", "String path(Configuration configuration);", "public String getArchiveFolderPath()\n {\n String currentWorkingDir = SystemUtil.getWorkingDirPath()+\"/\";\n \n ConfigurationStore configStore = ConfigurationStore.getInstance();\n String archiveFolder = configStore.getProperty(IISATProperty.CATEGORY, IISATProperty.ARCHIVE_FOLDER, null);\n String absArchiveFolderPath = currentWorkingDir + archiveFolder;\n _logger.logMessage(\"getArchiveFolderPath\", null, \"Abs archive folder path is \"+absArchiveFolderPath);\n return absArchiveFolderPath;\n }", "FsPath baseDir();", "public String getFullPath()\n {\n return( fullPath );\n }", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }", "public String getFileSystemPath() {\n return getCacheDir().getAbsolutePath()\n + File.separator\n + getItemPath();\n }", "public final String getPath()\n {\n return path;\n }", "public IPath getRuntimeBaseDirectory(TomcatServer server);", "public String toPathString() {\n return path();\n }", "protected String path() {\n return path(getName());\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n }\n }", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static Path getPath() {\n\t\tPath path = Paths.get(getManagerDir(), NAME);\n\t\treturn path;\n\t}", "public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public String getResourcePath();", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }", "public static String getComplaintAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t}", "String getAbsolutePathWithinSlingHome(String relativePath);", "public Optional<URI> getCurrentSourcePath() {\r\n return context.getAssociatedPath();\r\n }", "public static String getPath() { return Objects.requireNonNull(Bukkit.getServer().getPluginManager().getPlugin(\"Catacombs\"))\n .getDataFolder().getAbsolutePath(); }", "public String getAppPathname();", "private Path getDoneAppPath(ApplicationId appId) {\n int appNum = appId.getId();\n appNum /= 1000;\n int bucket2 = appNum % 1000;\n int bucket1 = appNum / 1000;\n return new Path(doneRootPath,\n String.format(APP_DONE_DIR_PREFIX_FORMAT, appId.getClusterTimestamp(),\n bucket1, bucket2, appId.toString()));\n }", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "java.lang.String getSrcPath();", "public static String getWorkflowAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t\t\n\t}", "public String getPath()\n {\n return path;\n }", "public String getPath()\n {\n return path;\n }", "public String getRunLocation();", "public String getLaunchPath() {\n return this.LaunchPath;\n }", "String getFilepath();", "public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}", "public String getPath() {\r\n return path;\r\n }", "public String getPath() {\r\n return path;\r\n }", "public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }", "public static String findCurrentDirectory() {\n\t\tString absolutePath = new File(\"\").getAbsolutePath();\n\t return absolutePath;\n\t}", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\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 Path getPath();", "public String getPath()\n {\n\n return _path;\n }", "public String getPath(){\r\n\t\treturn path;\r\n\t}" ]
[ "0.6349114", "0.62813634", "0.61489797", "0.60409963", "0.598922", "0.578192", "0.578192", "0.578192", "0.578192", "0.578192", "0.5777166", "0.5777166", "0.5777166", "0.5774265", "0.57247037", "0.57228935", "0.5640372", "0.5615858", "0.56028205", "0.5571774", "0.5553831", "0.5543026", "0.5539474", "0.55322933", "0.5510058", "0.5503417", "0.55011916", "0.54861605", "0.5477243", "0.544795", "0.5432653", "0.5424692", "0.5417469", "0.53989834", "0.53989834", "0.53989357", "0.53867435", "0.53836226", "0.53795516", "0.53612447", "0.5360817", "0.5358017", "0.5355446", "0.53550965", "0.5341202", "0.5336415", "0.53334236", "0.5330809", "0.5326837", "0.5325512", "0.5323288", "0.53077465", "0.5297973", "0.52830255", "0.5278999", "0.5277044", "0.5272794", "0.52533644", "0.5248933", "0.52448213", "0.5240154", "0.5240154", "0.5225274", "0.5223821", "0.52186996", "0.52101904", "0.5200558", "0.51999456", "0.5199935", "0.5195813", "0.5195291", "0.5188198", "0.5187583", "0.5187583", "0.51848996", "0.5184415", "0.51751405", "0.5165312", "0.516149", "0.516149", "0.5147133", "0.51465714", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.51362044", "0.5131893", "0.5121798", "0.51124614" ]
0.0
-1
path absolute path based on live folder of a JobScheduler object.
@JsonProperty("processClass") public void setProcessClass(String processClass) { this.processClass = processClass; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Path getAppointmentScheduleFilePath();", "public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }", "public String getLocationPath();", "public String getAbsPath();", "public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public String getPath();", "public String getPath();", "public String getPath();", "public String referenceDownloadedArchiveFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getDestinationFolder().getAbsolutePath() + File.separator + this.tomcatArchive.getName();\n }", "public String getAbsolutePath() {\n String path = null;\n if (parent != null) {\n path = parent.getAbsolutePath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"/%s\", name);\n }\n return path;\n }", "public static String sActivePath() \r\n\t{\r\n\t\tString activePath = null;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tactivePath = new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn activePath;\r\n\t}", "public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "public String resolvePath();", "public String getJobURI() {\n\t\treturn jobURI;\n\t}", "String getApplicationContextPath();", "public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}", "Path getBookingSystemFilePath();", "public String path() {\n return filesystem().pathString(path);\n }", "String folderPath();", "String getFullWorkfileName();", "public String getWorkRelativePath() {\n return getWorkRelativePath(testURL);\n }", "@Nullable String getPath();", "public String referenceTomcatInstanceFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getInstanceName() + \"-\" + getEnvironmentName() + \"-\" +this.tomcatArchive.getName();\n }", "public String getCurrentPath() {\n\t\treturn \"\";\n\t}", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "Path getLocation();", "public abstract String getPath();", "public abstract String getPath();", "Path getPath();", "public String getPath() {\n\t\treturn pfDir.getPath();\n\t}", "private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }", "public URI getAbsoluteLobFolder();", "public static String getCurrentPath() {\n File file = new File(\"\");\n return file.getAbsolutePath();\n }", "public abstract String getFullPath();", "public static Path getPathForObject(Object obj) {\r\n ReportsDirectory constant = fromObject(obj);\r\n return getTargetPath().resolve(constant.folder);\r\n }", "String path(Configuration configuration);", "public String getArchiveFolderPath()\n {\n String currentWorkingDir = SystemUtil.getWorkingDirPath()+\"/\";\n \n ConfigurationStore configStore = ConfigurationStore.getInstance();\n String archiveFolder = configStore.getProperty(IISATProperty.CATEGORY, IISATProperty.ARCHIVE_FOLDER, null);\n String absArchiveFolderPath = currentWorkingDir + archiveFolder;\n _logger.logMessage(\"getArchiveFolderPath\", null, \"Abs archive folder path is \"+absArchiveFolderPath);\n return absArchiveFolderPath;\n }", "FsPath baseDir();", "public String getFullPath()\n {\n return( fullPath );\n }", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }", "public String getFileSystemPath() {\n return getCacheDir().getAbsolutePath()\n + File.separator\n + getItemPath();\n }", "public final String getPath()\n {\n return path;\n }", "public IPath getRuntimeBaseDirectory(TomcatServer server);", "public String toPathString() {\n return path();\n }", "protected String path() {\n return path(getName());\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n }\n }", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static Path getPath() {\n\t\tPath path = Paths.get(getManagerDir(), NAME);\n\t\treturn path;\n\t}", "public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public String getResourcePath();", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }", "public static String getComplaintAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t}", "String getAbsolutePathWithinSlingHome(String relativePath);", "public Optional<URI> getCurrentSourcePath() {\r\n return context.getAssociatedPath();\r\n }", "public static String getPath() { return Objects.requireNonNull(Bukkit.getServer().getPluginManager().getPlugin(\"Catacombs\"))\n .getDataFolder().getAbsolutePath(); }", "public String getAppPathname();", "private Path getDoneAppPath(ApplicationId appId) {\n int appNum = appId.getId();\n appNum /= 1000;\n int bucket2 = appNum % 1000;\n int bucket1 = appNum / 1000;\n return new Path(doneRootPath,\n String.format(APP_DONE_DIR_PREFIX_FORMAT, appId.getClusterTimestamp(),\n bucket1, bucket2, appId.toString()));\n }", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "java.lang.String getSrcPath();", "public String getPath()\n {\n return path;\n }", "public String getPath()\n {\n return path;\n }", "public static String getWorkflowAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t\t\n\t}", "public String getLaunchPath() {\n return this.LaunchPath;\n }", "public String getRunLocation();", "String getFilepath();", "public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}", "public String getPath() {\r\n return path;\r\n }", "public String getPath() {\r\n return path;\r\n }", "public static String findCurrentDirectory() {\n\t\tString absolutePath = new File(\"\").getAbsolutePath();\n\t return absolutePath;\n\t}", "public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\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 Path getPath();", "public String getPath()\n {\n\n return _path;\n }", "public String getPath(){\r\n\t\treturn path;\r\n\t}" ]
[ "0.63487995", "0.6280246", "0.61490184", "0.6042232", "0.59909326", "0.5781497", "0.5781497", "0.5781497", "0.5781497", "0.5781497", "0.5777242", "0.5777242", "0.5777242", "0.5773964", "0.57259035", "0.57240355", "0.5641205", "0.56161773", "0.56043464", "0.5573436", "0.55541486", "0.55427593", "0.5538652", "0.55331963", "0.55093116", "0.55048394", "0.55004317", "0.5486195", "0.547732", "0.544773", "0.54331696", "0.5426503", "0.54182523", "0.5399074", "0.5398704", "0.5398704", "0.53863865", "0.5383867", "0.5380317", "0.5362997", "0.5362633", "0.53581554", "0.5354295", "0.5353934", "0.534123", "0.53367156", "0.5334979", "0.5331352", "0.5327678", "0.5327205", "0.5323931", "0.5307779", "0.5298364", "0.528372", "0.52808106", "0.5276086", "0.5274687", "0.52533245", "0.52482396", "0.524445", "0.5241072", "0.5241072", "0.5225654", "0.5223616", "0.5218236", "0.52116275", "0.5200518", "0.51989126", "0.51983696", "0.51979005", "0.51949704", "0.5188277", "0.5188277", "0.5188033", "0.51857245", "0.51856536", "0.5174898", "0.51652133", "0.51622605", "0.51622605", "0.5148037", "0.51478297", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5135228", "0.51317453", "0.5122689", "0.51130414" ]
0.0
-1
Only relevant for order jobs when called /jobs/p/... or job/p/...
@JsonProperty("jobChains") public List<String> getJobChains() { return jobChains; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortBasedPendingJobs();", "protected void beforeJobExecution() {\n\t}", "public abstract List<C_result> processJob(C_request processing_cmd);", "public GetJobs() {\r\n\t\tsuper();\r\n\t}", "@Override\r\n\tpublic void doBeforeJob() {\n\r\n\t}", "public int getJobId() ;", "@Override\n\tpublic void beforeJob(JobExecution arg0) {\n\t\t\n\t}", "JobResponse apply();", "abstract void doJob();", "public abstract void processJob() throws Exception;", "java.lang.String getJobId();", "@Override\r\n\tpublic void doAfterJob() {\n\r\n\t}", "@Override\n\t\t\tpublic void beforeJob(JobExecution jobExecution) {\n\t\t\t\t\n\t\t\t}", "static void SPT_rule(List<T_JOB> job) {\n Collections.sort(job);\n }", "protected void afterJobExecution() {\n\t}", "private void scheduleJob() {\n\n }", "private void runWithoutJobId() {\n if (numJobsToDelete.isPresent() && numJobsToDelete.get() <= 0) {\n handleBadRequest(ERROR_NON_POSITIVE_JOBS_TO_DELETE);\n return;\n }\n int defaultedDaysOld = daysOld.orElse(DEFAULT_DAYS_OLD);\n // Only generate the detailed response payload if there aren't too many jobs involved.\n boolean verbose =\n numJobsToDelete.isPresent() && (numJobsToDelete.get() <= DEFAULT_MAX_NUM_JOBS_TO_DELETE);\n StringBuilder payload = new StringBuilder();\n\n // Since findEligibleJobsByJobName returns only a certain number of jobs, we must loop through\n // until we find enough, requesting deletion as we go.\n int numJobsProcessed = 0;\n DateTime cutoffDate = clock.nowUtc().minusDays(defaultedDaysOld);\n Optional<String> cursor = Optional.empty();\n do {\n Optional<Integer> numJobsToRequest =\n Optional.ofNullable(\n numJobsToDelete.isPresent() ? numJobsToDelete.get() - numJobsProcessed : null);\n EligibleJobResults batch =\n mapreduceEntityCleanupUtil.findEligibleJobsByJobName(\n jobName.orElse(null), cutoffDate, numJobsToRequest, force.orElse(false), cursor);\n cursor = batch.cursor();\n // Individual batches can come back empty if none of the returned jobs meet the requirements\n // or if all jobs have been exhausted.\n if (!batch.eligibleJobs().isEmpty()) {\n String payloadChunk = requestDeletion(batch.eligibleJobs(), verbose);\n if (verbose) {\n payload.append(payloadChunk);\n }\n numJobsProcessed += batch.eligibleJobs().size();\n }\n // Stop iterating when all jobs have been exhausted (cursor is absent) or enough have been\n // processed.\n } while (cursor.isPresent()\n && (!numJobsToDelete.isPresent() || (numJobsProcessed < numJobsToDelete.get())));\n\n if (numJobsProcessed == 0) {\n logger.atInfo().log(\n \"No eligible jobs found with name '%s' older than %d days old.\",\n jobName.orElse(\"(any)\"), defaultedDaysOld);\n payload.append(\"No eligible jobs found\");\n } else {\n logger.atInfo().log(\"A total of %d job(s) processed.\", numJobsProcessed);\n payload.append(String.format(\"A total of %d job(s) processed\", numJobsProcessed));\n }\n response.setPayload(payload.toString());\n }", "public interface Job {\n\n public enum Status {\n IDLE,\n RUNNING,\n SUCCESS,\n ERROR,\n FAIL\n }\n\n /**\n * @return the job ID.\n */\n public default JobId getId() {\n return getContext().getId();\n }\n\n /**\n * @return the job status\n */\n public Status getStatus();\n\n /**\n * @return the job priority\n */\n public Priority getPriority();\n\n /**\n * @return The context of this job.\n */\n public JobContext getContext();\n\n /**\n * Run the job using the {@link XProcEngine}.\n */\n public void run(XProcEngine engine);\n\n}", "Collection<String> submitJob(Job job) throws JobExecutionException;", "public String[] getAllJobs();", "public interface Job {\n\n /** unique id for this job that is used as a reference in the service methods */\n String getId();\n\n /** job executor identification that has acquired this job and is going to execute it */\n String getLockOwner();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null. */\n Date getDueDate();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null.\n * @deprecated call {@link #getDueDate()} instead */\n @Deprecated\n Date getDuedate();\n\n /** exception that occurred during the last execution of this job. The transaction \n * of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n String getException();\n\n /** number of retries left. This is only decremented when an exception occurs during job \n * execution. The transaction of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n int getRetries();\n\n /** indicates if this job should be executed separate from any other job \n * in the same process instance */\n boolean isExclusive();\n\n /** the related execution */\n Execution getExecution();\n\n /** the related process instance */\n Execution getProcessInstance();\n\n Date getLockExpirationTime();\n\n}", "public String getJobId();", "private void postJobRequestSorting(String url, String sType) {\n\n loadingDialog();\n\n HashMap<String, String> jsonParams = new HashMap<String, String>();\n jsonParams.put(\"provider_id\", provider_id);\n jsonParams.put(\"type\", sType);\n jsonParams.put(\"page\", \"0\");\n jsonParams.put(\"perPage\", \"20\");\n jsonParams.put(\"orderby\", Str_orderby);\n jsonParams.put(\"sortby\", Str_sortby);\n jsonParams.put(\"from\", Str_from);\n jsonParams.put(\"to\", Str_to);\n\n\n System.out.println(\"---------from------------\" + Str_from);\n System.out.println(\"---------to------------\" + Str_to);\n System.out.println(\"---------orderby------------\" + Str_orderby);\n System.out.println(\"---------sortby------------\" + Str_sortby);\n\n System.out.println(\"---------My Jobs user_id------------\" + provider_id);\n System.out.println(\"---------My Jobs type------------\" + sType);\n System.out.println(\"---------My Jobs Page page------------\" + \"1\");\n System.out.println(\"---------My Jobs url------------\" + url);\n\n mRequest = new ServiceRequest(getActivity());\n mRequest.makeServiceRequest(url, Request.Method.POST, jsonParams, new ServiceRequest.ServiceListener() {\n @Override\n public void onCompleteListener(String response) {\n\n System.out.println(\"--------- sortingname response------------\" + response);\n String Str_status = \"\", Str_totaljobs = \"\", Str_Response = \"\";\n\n try {\n JSONObject jobject = new JSONObject(response);\n Str_status = jobject.getString(\"status\");\n\n if (Str_status.equalsIgnoreCase(\"1\")) {\n convertedlist.clear();\n JSONObject object = jobject.getJSONObject(\"response\");\n Str_Pagination = object.getString(\"next_page\");\n Str_PageDateCount = object.getString(\"perPage\");\n Str_totaljobs = object.getString(\"total_jobs\");\n\n Object check_list_object = object.get(\"jobs\");\n if (check_list_object instanceof JSONArray) {\n\n JSONArray jarry = object.getJSONArray(\"jobs\");\n if (jarry.length() > 0) {\n convertedlist.clear();\n\n for (int i = 0; i < jarry.length(); i++) {\n JSONObject object2 = jarry.getJSONObject(i);\n MyjobConverted_Pojo pojo = new MyjobConverted_Pojo();\n pojo.setConverted_address(object2.getString(\"location\"));\n pojo.setConverted_category(object2.getString(\"category_name\"));\n pojo.setConverted_date(object2.getString(\"booking_time\"));\n pojo.setConverted_user_name(object2.getString(\"user_name\"));\n pojo.setConverted_user_image(object2.getString(\"user_image\"));\n pojo.setOrder_id(object2.getString(\"job_id\"));\n pojo.setConvertedjob_status(object2.getString(\"job_status\"));\n String address= getCompleteAddressString(Double.parseDouble(object2.getString(\"location_lat\")),Double.parseDouble(object2.getString(\"location_lng\")));\n pojo.setAddress(address);\n convertedlist.add(pojo);\n isConvertedJobAvailable = true;\n }\n show_progress_status = true;\n } else {\n show_progress_status = false;\n isConvertedJobAvailable = false;\n }\n } else {\n\n isConvertedJobAvailable = false;\n\n }\n } else {\n Str_Response = jobject.getString(\"response\");\n }\n\n if (Str_status.equalsIgnoreCase(\"1\")) {\n\n if (isConvertedJobAvailable) {\n adapter = new MyjobConverted_Adapter(getActivity(), convertedlist);\n listView.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n\n if (show_progress_status) {\n layout_nojobs_converted.setVisibility(View.GONE);\n } else {\n layout_nojobs_converted.setVisibility(View.VISIBLE);\n listView.setEmptyView(layout_nojobs_converted);\n }\n } else {\n layout_nojobs_converted.setVisibility(View.VISIBLE);\n listView.setEmptyView(layout_nojobs_converted);\n }\n\n } else {\n\n Alert(getResources().getString(R.string.server_lable_header), Str_Response);\n\n }\n if (swipeRefreshLayout.isRefreshing()) {\n swipeRefreshLayout.setRefreshing(false);\n }\n\n } catch (Exception e) {\n dismissDialog();\n e.printStackTrace();\n }\n dismissDialog();\n }\n\n @Override\n public void onErrorListener() {\n dismissDialog();\n }\n });\n }", "public void scheduleJobs();", "@Override\n public void run() {\n CompareService.getRankedJobStrings();\n\n // get current job\n current = DataHandler.GetDataHandlerInstance().GetCurrentJob();\n String formattedComp =\n JOB.title + \" | \" + current.title + \"\\n\" +\n JOB.currentJob + \" | \" + current.currentJob + \"\\n\" +\n JOB.company + \" | \" + current.company + \"\\n\" +\n JOB.city + \" | \" + current.city + \"\\n\" +\n JOB.state + \" | \" + current.state + \"\\n\" +\n JOB.yearlySalary + \" | \" + current.yearlySalary + \"\\n\" +\n JOB.yearlyBonus + \" | \" + current.yearlyBonus + \"\\n\" +\n JOB.teleworkDaysPerWeek + \" | \" + current.teleworkDaysPerWeek + \"\\n\" +\n JOB.retirementBenefit + \" | \" + current.retirementBenefit + \"\\n\" +\n JOB.leaveTime + \" | \" + current.leaveTime;\n intent.putExtra(\"job1\", JOB.title + \", \" + JOB.company);\n intent.putExtra(\"job2\", current.title + \", \" + current.company);\n startActivity(intent);\n }", "public String[] getJobsWaiting();", "public Jobs jobs();", "public Job getJob();", "private void loadJobs(){\n\t\tsuperJobsList.clear();\n\t\tsuperJobs=jdbc.getProjectsAndJobs();\n\t\tfor(Job j: superJobs){\n\t\t\tsuperJobsList.addElement(j.jobname);\n\t\t}\n\t\t\n\t}", "public AbstractJob(){\n \n }", "public boolean getHasMoreJobs() ;", "@Override\n public String getType() {\n return Const.JOB;\n }", "public void setJob(String job) {\n this.job = job;\n }", "@Override\n\tpublic String getWaitingJobId() {\n\t\treturn null;\n\t}", "@Test\n public void testSplitRoomReservationReportJob() throws Exception {\n Job allocJob = new AllocationScraperJob();\n allocJob.setStatus( JobStatus.completed );\n dao.insertJob( allocJob );\n\n // setup a job to find all bookings spanning different rooms\n Job j = new SplitRoomReservationReportJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"allocation_scraper_job_id\", String.valueOf( allocJob.getId() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "public boolean isJob() {\n return false;\n }", "public ResponseEntity<String> doProcessJob(String operator, int contractNum, String content, int type, int state) {\n int count = processMapper.updateState(state, contractNum, type, operator);\n processMapper.updateContent(content, contractNum, type, operator);\n if (count == 0)\n return ResponseFactory.badRequest(\"fail\");\n switch (type) {\n case 0:\n writeLog(operator, \"会签了合同: \" + contractNum);\n break;\n case 1:\n writeLog(operator, \"定稿了合同: \" + contractNum);\n break;\n case 2:\n writeLog(operator, \"审核了合同: \" + contractNum);\n break;\n case 3:\n writeLog(operator, \"签订了合同: \" + contractNum);\n break;\n default:\n break;\n }\n// int createNumber = processMapper.getNumberOfNeededTypeState(type, OperationState.UNFINISHED.getValue());\n// int finishNumber = processMapper.getNumberOfNeededTypeState(type, OperationState.FINISHED.getValue());\n int unfinishedCount = processMapper.getUnfinishedOrDeniedProcess(type, contractNum);\n if (unfinishedCount == 0) {\n switch (type) {\n case 0:\n stateMapper.insert(contractNum, Status.COUNTER_SIGN_FINISHED.getValue());\n writeLog(operator, \"会签合同: \" + contractNum + \" 完成.\");\n break;\n case 1:\n stateMapper.insert(contractNum, Status.FINALIZE_FINISHED.getValue());\n contractMapper.updateContent(contractNum, content);\n writeLog(operator, \"定稿合同: \" + contractNum + \" 完成.\");\n break;\n case 2:\n stateMapper.insert(contractNum, Status.REVIEW_FINISHED.getValue());\n writeLog(operator, \"审核合同: \" + contractNum + \" 完成.\");\n break;\n case 3:\n stateMapper.insert(contractNum, Status.SIGN_FINISHED.getValue());\n writeLog(operator, \"签订合同: \" + contractNum + \" 完成.\");\n break;\n default:\n break;\n }\n }\n return ResponseFactory.success(\"Job finished\");\n }", "@Test\n public void testUnpaidDepositReportJob() throws Exception {\n Job allocScraperJob = new AllocationScraperJob();\n allocScraperJob.setStatus( JobStatus.completed );\n dao.insertJob( allocScraperJob );\n\n // setup a job to scrape allocation info\n Job j = new UnpaidDepositReportJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"allocation_scraper_job_id\", String.valueOf( allocScraperJob.getId() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "cb.Careerbuilder.Job getJobs(int index);", "void loadJobDetails() {\n if (!enabled.get()) {\n LOGGER.info(\"Skip loading scheduled jobs\");\n return;\n }\n loadJobsInCurrentChunk()\n .filter(j -> !scheduler.scheduled(j.getId()).isPresent())//not consider already scheduled jobs\n .flatMapRsPublisher(t -> ErrorHandling.skipErrorPublisher(scheduler::schedule, t))\n .forEach(a -> LOGGER.debug(\"Loaded and scheduled job {}\", a))\n .run()\n .whenComplete((v, t) -> Optional.ofNullable(t)\n .map(ex -> {\n LOGGER.error(\"Error Loading scheduled jobs!\", ex);\n return null;\n })\n .orElseGet(() -> {\n LOGGER.info(\"Loading scheduled jobs completed !\");\n return null;\n }));\n }", "long countJobs();", "@Test\n public void testGroupBookingsReportJob() throws Exception {\n Job allocJob = new AllocationScraperJob();\n allocJob.setStatus( JobStatus.completed );\n dao.insertJob( allocJob );\n\n // setup a job to find reservations with more than X guests\n Job j = new GroupBookingsReportJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"allocation_scraper_job_id\", String.valueOf( allocJob.getId() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "@Digits(integer=9,fraction=0)\n\t@Override\n\tpublic String getJob() {\n\t\treturn super.getJob();\n\t}", "public abstract void prepareTasks() throws JobException;", "protected abstract String getJobSubmitId();", "JobResponse apply(Context context);", "static public void falsifyProcessingJobs()\n {\n processingJobs = false;\n }", "@Test\n public void testScrapeReservationsBookedOnJob() throws Exception {\n Job j = new ScrapeReservationsBookedOnJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"booked_on_date\", BookingsPageScraper.DATE_FORMAT_YYYY_MM_DD.format( new Date() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "@Override\r\n\tpublic T getJob() {\n\t\treturn super.getJob();\r\n\t}", "@Override\n public Job getJobPOJO() {\n return jobUnproxied;\n }", "void completeJob();", "@Override\n\tpublic String getUsedjobId() {\n\t\treturn null;\n\t}", "private void saveJobList() {\n\t\tFileLoader.saveObject(getApplicationContext(), FILE_NAME_JOBS, (Serializable) jobs);\n\t}", "public interface JobService {\n boolean registerJob(Job job);\n\n boolean deleteJob(String domain, String jobId);\n\n List<JobWrapper> listJob(String domain);\n\n JobWrapper readJob(String domain, String jobId);\n\n NodeResult readNodeResult(String domain, String jobId, String ip);\n\n boolean runJob(String domain, String jobId);\n\n}", "@Override\n public final boolean doIt() throws JobException {\n tasks = new LinkedHashMap<TaskKey,TaskJob>();\n prepareTasks();\n (new MergeJob()).startJob();\n return true;\n }", "protected void jobFinished(Progress job) {\n }", "PagingLoadResult<GWTJahiaJobDetail> getJobs(int offset, int limit, String sortField, String sortDir, String groupState, List<String> groupNames) throws GWTJahiaServiceException;", "@Override\n public void beforeJob(JobExecution jobExecution) {\n super.beforeJob(jobExecution);\n }", "@Override\r\n\tpublic List<IncomingJobResponse> getJobList() {\n\t\tList<IncomingJobs> js = (List<IncomingJobs>)incomingRepository.fetchincomingJobs();\r\n\t\tList<IncomingJobResponse> joblist = new ArrayList<IncomingJobResponse>();\r\n\t\tfor(IncomingJobs job :js){\r\n\t\t\tIncomingJobResponse jobs = new IncomingJobResponse();\r\n\t\t\tSystem.out.println(\"ATA:\"+job.getAta()+\"ETA:\"+job.getEta());\r\n\t\t\tjobs.setJobid(job.getID());\r\n\t\t\t\r\n\t\t\tif(job.getEta()!=null){\r\n\t\t\tjobs.setEta(job.getEta().toString());\r\n\t\t\t}\r\n\t\t\tif(job.getAta()!=null){\r\n\t\t\tjobs.setAta(job.getAta().toString());\r\n\t\t\t}\r\n\t\t\tjobs.setBroker(job.getBroker());\r\n\t\t\tjobs.setClear(job.getClear());\r\n\t\t\tjobs.setConsignee(job.getConsignee());\r\n\t\t\tjobs.setDestination(job.getDestination());\r\n\t\t\tjobs.setFlight(job.getFlight());\r\n\t\t\tjobs.setHawb(job.getHawb());\r\n\t\t\tjobs.setHeld(job.getHeld());\r\n\t\t\tjobs.setMawb(job.getMawb());\r\n\t\t\tjobs.setMLID(job.getMLID());\r\n\t\t\tjobs.setNote(job.getNote());\r\n\t\t\tjobs.setOutturn(job.getOutturn());\r\n\t\t\tjobs.setPiece(job.getPiece());\r\n\t\t\tjobs.setWeight(job.getWeight());\r\n\t\t\tif(job.getInjectionDate()!=null){\r\n\t\t\t\tjobs.setInjectionDate(job.getInjectionDate().toString());\r\n\t\t\t\t}\r\n\t\t\tif(job.getClearanceDate()!=null){\r\n\t\t\t\tjobs.setClearanceDate(job.getClearanceDate().toString());\r\n\t\t\t\t}\r\n\t\t\tjobs.setDamage(job.getDamageNotes());\r\n\t\t\tjobs.setSurplus(job.getSurplusShortage());\r\n\t\t\tjoblist.add(jobs);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn joblist;\r\n\t}", "@Override\r\n\tpublic List<Job> ShowAllJobs() {\n\t\treturn null;\r\n\t}", "public void setJob(String job) {\r\n\t\t\tthis.job = job;\r\n\t\t}", "public interface IJobshelper {\n\n\t/**\n\t * Can do some initialization for task like file location, Emailer list, Emailer\n\t * message etc This is used to set some configuration for this Job and should be\n\t * using some properties file so that each Job could use specific configuration\n\t * \n\t * @throws JobExecutionException\n\t */\n\tpublic void initialJobContext(String configFileName) throws JobExecutionException;\n\n}", "int addJobs(Iterable<? extends PrintJob> jobs);", "public AutomaticJob() {\r\n \r\n }", "@GET\n @Deprecated\n @Path(\"jobs\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response jobGet(@QueryParam(\"created_before\") String createdBefore,\n @QueryParam(\"created_after\") String createdAfter) throws Exception {\n //List<LGJob> jobs;\n boolean doCreatedBefore = false;\n boolean doCreatedAfter = false;\n Date beforeDate = null;\n Date afterDate = null;\n\n // Parse created_before if present\n if ((createdBefore != null) && (!createdBefore.equals(\"\"))) {\n Instant beforeInstant = null;\n try {\n beforeInstant = Instant.parse(createdBefore);\n } catch (DateTimeParseException e) {\n return Response.status(201).entity(\"Invalid created_on Date format [\" + createdBefore + \"]\").build();\n }\n beforeDate = Date.from(beforeInstant);\n doCreatedBefore = true;\n }\n\n // Parse created_after if present\n if ((createdAfter != null) && (!createdAfter.equals(\"\"))) {\n Instant afterInstant = null;\n try {\n afterInstant = Instant.parse(createdAfter);\n } catch (DateTimeParseException e) {\n return Response.status(201).entity(\"Invalid created_after Date format [\" + createdAfter + \"]\").build();\n }\n afterDate = Date.from(afterInstant);\n doCreatedAfter = true;\n }\n\n\n JSONObject graphJobs = new JSONObject();\n try {\n graphJobs = Utils.getLemongraphJob(request, \"\", null);//this considers createdBefore/createdAfter params\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n JSONArray ids = new JSONArray();\n Iterator<String> idIterator = graphJobs.keys();\n while (idIterator.hasNext()) {\n String id = idIterator.next();\n ids.put(id);\n }\n\n JSONObject ob = new JSONObject();\n if(ids.length() > 0) {\n // Build response\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMM dd,yyyy HH:mm:ss\");\n JSONObject mongoJobs = Utils.getMongoJobs(ids);\n Iterator iterator = mongoJobs.keySet().iterator();\n while (iterator.hasNext()) {\n String id = iterator.next().toString();\n try {\n JSONObject mongoJob = mongoJobs.getJSONObject(id);\n JSONObject job = new JSONObject();\n\n //Default value checks\n if (!mongoJob.has(\"reason\")) {\n mongoJob.put(\"reason\", \"\");\n }\n if (!mongoJob.has(\"endTime\")) {\n mongoJob.put(\"endTime\", 0);\n }\n if (!mongoJob.has(\"totalRunningTimeSeconds\")) {\n mongoJob.put(\"totalRunningTimeSeconds\", 0);\n }\n if (!mongoJob.has(\"approvedAdapterNames\")) {\n mongoJob.put(\"approvedAdapterNames\", new JSONArray());\n }\n if (!mongoJob.has(\"startTime\")) {\n mongoJob.put(\"startTime\", 0);\n }\n if (!mongoJob.has(\"jobErrors\")) {\n mongoJob.put(\"jobErrors\", new JSONArray());\n }\n if (!mongoJob.has(\"taskMap\")) {\n mongoJob.put(\"taskMap\", new JSONObject());\n }\n if (!mongoJob.has(\"jobConfig\")) {\n mongoJob.put(\"jobConfig\", new JSONObject());\n }\n if (!mongoJob.has(\"expireDate\")) {\n mongoJob.put(\"expireDate\", 0);\n }\n if (!mongoJob.has(\"graphActivity\")) {\n mongoJob.put(\"graphActivity\", 0);\n }\n if (!mongoJob.has(\"createDate\")) {\n mongoJob.put(\"createDate\", 0);\n }\n if (!mongoJob.has(\"status\")) {\n mongoJob.put(\"status\", 0);\n }\n\n job.put(\"reason\", mongoJob.get(\"reason\"));\n job.put(\"endtime\", sdf.format(mongoJob.get(\"endTime\")));\n job.put(\"runtime\", mongoJob.get(\"totalRunningTimeSeconds\"));\n job.put(\"approvedadapters\", mongoJob.getJSONArray(\"approvedAdapterNames\"));\n job.put(\"starttime\", sdf.format(mongoJob.get(\"startTime\")));\n job.put(\"error_count\", mongoJob.getJSONArray(\"jobErrors\").length());\n job.put(\"task_count\", mongoJob.getJSONObject(\"taskMap\").length());\n job.put(\"job_config\", new JSONObject(mongoJob.get(\"jobConfig\").toString()));\n job.put(\"expire_date\", sdf.format(mongoJob.get(\"expireDate\")));\n job.put(\"job_id\", id);\n job.put(\"graph_activity\", mongoJob.get(\"graphActivity\"));\n job.put(\"create_date\", sdf.format(mongoJob.get(\"createDate\")));\n int status = mongoJob.getInt(\"status\");\n job.put(\"status\", LGJob.getStatusString(status));\n\n int active = 0;\n try {\n if (status == LGJob.STATUS_PROCESSING) { //only processing jobs have non-zero active_task_count\n ArrayList<Document> docs = new MongoDBStore().getTasksFromJob(id);\n JSONObject tasks = MongoDBStore.toJSON(docs);\n active = LGJob.getActiveTaskCount(tasks);\n }\n } catch (Exception e) {\n log.debug(\"Couldn't fetch active task count for job:\" + id + \" Error:\" + e.getMessage());\n }\n\n job.put(\"active_task_count\", active);\n ob.put(id, job);\n } catch (Exception e) {\n log.info(\"Invalid job:\" + id + \" Error:\" + e.getMessage());\n }\n }\n }\n return Response.status(200).entity(ob.toString()).build();\n }", "private void putJob(int a, int b){\n \n Integer[] job = new Integer[2];\n \n job[0] = a;\n job[1] = b;\n \n // put into priority queue\n this.prior.add(job);\n }", "public String execute() {\n\t\t\n\t\tjobs = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> job = new HashMap<String, String>();\n\t\tjob.put(\"title\", \"Java Developer\");\n\t\tjob.put(\"description\", \"Java Developer 1\");\n\t\tjob.put(\"location\", \"london\");\n\t\tjobs.add(job);\n\t\t\n\t\tjob = new HashMap<String, String>();\n\t\tjob.put(\"title\", \"Java Developer\");\n\t\tjob.put(\"description\", \"Java Developer 1\");\n\t\tjob.put(\"location\", \"london\");\n\t\tjobs.add(job);\n\t\t\n \n\t\treturn \"SUCCESS\";\n \n\t}", "private void realPrint(PrintJob job) {\n\t}", "private void realPrint(PrintJob job) {\n\t}", "public void setJob(Job jobNum){\n job = jobNum;\n }", "public String getJob() {\n return job;\n }", "@Test\n public void testJobOverviewHandler() throws Exception {\n // this only works if there is no active job at this point\n assertTrue(getRunningJobs(CLUSTER.getClusterClient()).isEmpty());\n\n // Create a task\n final JobVertex sender = new JobVertex(\"Sender\");\n sender.setParallelism(2);\n sender.setInvokableClass(BlockingInvokable.class);\n\n final JobGraph jobGraph = JobGraphTestUtils.streamingJobGraph(sender);\n\n ClusterClient<?> clusterClient = CLUSTER.getClusterClient();\n clusterClient.submitJob(jobGraph).get();\n\n // wait for job to show up\n while (getRunningJobs(CLUSTER.getClusterClient()).isEmpty()) {\n Thread.sleep(10);\n }\n\n // wait for tasks to be properly running\n BlockingInvokable.latch.await();\n\n final Duration testTimeout = Duration.ofMinutes(2);\n\n String json =\n TestBaseUtils.getFromHTTP(\"http://localhost:\" + getRestPort() + \"/jobs/overview\");\n\n ObjectMapper mapper = new ObjectMapper();\n JsonNode parsed = mapper.readTree(json);\n ArrayNode jsonJobs = (ArrayNode) parsed.get(\"jobs\");\n assertEquals(1, jsonJobs.size());\n assertThat(\"Duration must be positive\", jsonJobs.get(0).get(\"duration\").asInt() > 0);\n\n clusterClient.cancel(jobGraph.getJobID()).get();\n\n // ensure cancellation is finished\n while (!getRunningJobs(CLUSTER.getClusterClient()).isEmpty()) {\n Thread.sleep(20);\n }\n\n BlockingInvokable.reset();\n }", "@Test\n public void testAllocationScraperJob() throws Exception {\n AllocationScraperJob j = new AllocationScraperJob();\n j.setStatus( JobStatus.submitted );\n j.setStartDate( Calendar.getInstance().getTime() );\n j.setDaysAhead( 27 );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "public void finalizeJob() {\n // override to implement\n }", "@Override\n public String getJobName() {\n return operate_name;\n }", "@Test\n public void testCreateConfirmDepositAmountsJob() throws Exception {\n Job asj = new AllocationScraperJob();\n asj.setStatus( JobStatus.completed );\n dao.insertJob( asj );\n\n // setup the job\n Job j = new CreateConfirmDepositAmountsJob();\n j.setStatus( JobStatus.submitted );\n j.getDependentJobs().add( asj );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "public void ServiceJob(FJJob job, double time) {\n if (job == null) return;\n if (remaining_workers == 0) return;\n if (FJSimulator.DEBUG) System.out.println(\"begin service on job: \"+job.path_log_id+\" \"+time);\n\n // if the patience flag is set, then check the job queue to see if\n // this job can wait for more workers to become idle\n /*\n if (this.patient_job==null && patience) {\n \tif (this.job_queue.size() <= JOB_QUEUE_PATIENCE_THRESHOLD) {\n \t\tthis.patient_job = job;\n \t\t// compute how many workers we want to have idle before we start\n \t\t//this.idle_workers_needed = Math.min(job.num_tasks, Math.min(remaining_workers+1, num_workers));\n \t\t/**\n \t\t * Just waiting for one more worker, always, is kind-of dumb. If there is only\n \t\t * one worker available, waiting for a 2nd doubles the parallelism of the next job.\n \t\t * Also, if a lot of jobs are in service, the expected waiting time until the\n \t\t * next departure is shorter. OTOH, if almost all workers are already idle, then\n \t\t * the benefit of one more worker is negligible, and less jobs in progress means a\n \t\t * longer expected wait until another becomes available. So when deciding whether\n \t\t * to be patient or not, we should consider:\n \t\t * - the number of currently idle workers\n \t\t * - the fraction of currently idle workers\n \t\t * - the number of jobs in progress (and how many workers they have)\n \t\t * - \n \t\t * /\n \t\tint num_jobs_in_progress = this.activeJobs.size();\n \t\tdouble idle_fraction = (1.0*remaining_workers)/(1.0*num_workers);\n \t\tint busy_workers = num_workers - remaining_workers;\n \t\tdouble workers_per_job = (1.0*busy_workers)/(1.0*num_jobs_in_progress);\n \t\t\n \t\t// the expected factor to be gained by a job departing\n \t\tdouble rr = workers_per_job / remaining_workers;\n \t\t\n \t\tif ((rr >= 1.5) && (num_jobs_in_progress >= num_workers/4.0)) {\n \t\t\tthis.idle_workers_needed = Math.min(job.num_tasks, Math.min(remaining_workers+1, num_workers));\n \t\t\tSystem.out.println(\"** Setting a job to be patient rr=\"+rr);\n \t\t} else {\n \t\t\tSystem.out.println(\"-- J=\"+num_jobs_in_progress+\"\\t I=\"+remaining_workers+\"\\t B=\"+busy_workers+\"\\t rr=\"+rr);\n \t\t\tthis.idle_workers_needed = remaining_workers;\n \t\t}\n \t}\n }\n */\n\n /*\n * Try a really restrictive version of BackPressure and Patience.\n * Jobs are only patient in the case where there is only one available\n * worker, and at least k/2 jobs in progress. Also the only time the job\n * takes all workers is the case of a patient job.\n */\n if (this.patient_job==null && patience) {\n \tif ((this.job_queue.size() <= JOB_QUEUE_PATIENCE_THRESHOLD) \n \t\t\t&& (remaining_workers==1)\n \t\t\t&& (activeJobs.size() >= num_workers/2)) {\n \t\tthis.patient_job = job;\n \t\t\tthis.idle_workers_needed = remaining_workers + 1;\n \t}\n }\n\n \n // if we are going to wait for more workers, just return\n //TODO: if the job queue is no longer empty, should just start the job?\n boolean servicing_patient_job = false;\n if (patience && this.patient_job!=null) {\n \tif (this.patient_job != job) {\n \t\tSystem.err.println(\"ERROR: trying to service a job when another is being patient!\");\n \t\tSystem.exit(1);\n \t}\n \t\n \tif (remaining_workers < idle_workers_needed) {\n \t\t//System.out.println(\"Being patient for job remaining_workers=\"+remaining_workers+\" idle_workers_needed=\"+idle_workers_needed);\n \t\treturn;\n \t}\n \t\n \t// we're going to service the job that's been waiting\n \tthis.patient_job = null;\n \tidle_workers_needed = 0;\n \tservicing_patient_job = true;\n \t//System.out.println(\"Servicing a patient job \"+remaining_workers);\n }\n \n // pick out some number of workers to use\n // if the job queue is below some threshold, take all the workers\n int nworkers = (remaining_workers == 1) ? 1 : remaining_workers/2;\n //if (this.job_queue.isEmpty()) {\n if (this.job_queue.isEmpty() && servicing_patient_job) {\n \t//System.out.println(\" ** giving a patient job all the workers: \"+remaining_workers);\n \tnworkers = remaining_workers;\n }\n \n activeJobs.add(job);\n Vector<Integer> worker_pool = new Vector<Integer>();\n job2workers.put(job, worker_pool);\n for (int w=0; (w<num_workers && worker_pool.size()<nworkers); w++) {\n if (worker2job[w] == null) {\n worker_pool.add(w);\n worker2job[w] = job;\n remaining_workers--;\n }\n }\n \n //System.out.println(\"worker_pool.size() = \"+worker_pool.size()+\" nworkers = \"+nworkers+\" activeJobs.size() = \"+activeJobs.size()+\" queue size = \"+this.job_queue.size());\n \n // assign the job's tasks to the workers\n int worker_index = 0;\n FJTask t = null;\n while ((t = job.nextTask()) != null) {\n workers[0][worker_pool.get(worker_index)].queue.add(t);\n //System.out.println(\"assigning task \"+t+\" to worker \"+worker_pool.get(worker_index));\n worker_index = (worker_index + 1) % nworkers;\n }\n \n // These newly allocated workers will be idle. Put them to work.\n feedWorkers(time);\n }", "protected void processJobSubmissionResponse(JobSubmissionResponseTO result) {\n\t\tList<Integer> jobID = result.getJobIDs();\n\t\tUserModel userModel = OurGridPortal.getUserModel();\n\t\tfor (Integer integer : jobID) {\n\t\t\tuserModel.addJobId(getJobViewId(), integer);\n\t\t}\n\t\t\n\t}", "java.util.List<cb.Careerbuilder.Job> \n getJobsList();", "@Override\n\tpublic int[] getJob() throws RemoteException {\n\t\treturn (Server.jobs.size() > 0)? Server.jobs.remove(0) : null;\n\t}", "boolean isDone(long number) throws NoSuchJobException;", "public interface JobManager {\n /**\n * Add a job to the execution queue.\n * @param job encapsulation of the execution data.\n * @return the unique id of the job.\n */\n String submitJob(JPPFJob job);\n\n /**\n * Add a task job to the execution queue.\n * @param job encapsulation of the execution data.\n * @param listener an optional listener to receive job status change notifications, may be null.\n * @return the unique id of the job.\n */\n String submitJob(JPPFJob job, JobStatusListener listener);\n\n /**\n * Add an existing job back into the execution queue.\n * @param job encapsulation of the execution data.\n * @return the unique id of the job.\n */\n String resubmitJob(JPPFJob job);\n\n /**\n * Determine whether there is a client connection available for execution.\n * @return true if at least one connection is available, false otherwise.\n */\n boolean hasAvailableConnection();\n\n /**\n * Determine whether local execution is enabled on this client.\n * @return <code>true</code> if local execution is enabled, <code>false</code> otherwise.\n */\n boolean isLocalExecutionEnabled();\n\n /**\n * Specify whether local execution is enabled on this client.\n * @param localExecutionEnabled <code>true</code> to enable local execution, <code>false</code> otherwise\n */\n void setLocalExecutionEnabled(final boolean localExecutionEnabled);\n\n /**\n * Get the list of available connections.\n * @return a vector of connections instances.\n */\n Vector<JPPFClientConnection> getAvailableConnections();\n\n /**\n * Get a listener to the status of the managed connections.\n * @return a {@link ClientConnectionStatusListener} instance.\n */\n ClientConnectionStatusListener getClientConnectionStatusListener();\n\n /**\n * Close this job manager and all the resources it uses.\n */\n void close();\n\n /**\n * Reset this job manager.\n */\n void reset();\n\n /**\n * Cancel the job with the specified id.\n * @param jobId the id of the job to cancel.\n * @return a <code>true</code> when cancel was successful <code>false</code> otherwise.\n * @throws Exception if any error occurs.\n */\n boolean cancelJob(String jobId) throws Exception;\n\n /**\n * Get the current load-balancer settings.\n * @return a {@link LoadBalancingInformation} instance, which encapsulates a load-balancing alfgorithm name, along with its parameters.\n */\n public LoadBalancingInformation getLoadBalancerSettings();\n\n /**\n * Change the load balancer settings for the client.\n * @param algorithm the name of load-balancing alogrithm to use.\n * @param parameters the algorithm's parameters, if any. The parmeter names are assumed no to be prefixed.\n * @throws Exception if any error occurs or if the algorithm name is {@code null} or not known.\n */\n public void setLoadBalancerSettings(final String algorithm, final Properties parameters) throws Exception;\n}", "JobResponse refresh();", "void topQueue(int job, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;", "@Override\n public boolean onStartJob(JobParameters job) {\n\n String id = job.getTag();\n Log.d(\"TAG+++\", \"Job id: \" + id);\n\n Uri uri = ToDoContract.ToDoEntry.CONTENT_URI.buildUpon().appendPath(id).build();\n Cursor mCursor = getContentResolver().query(uri, null, null, null, null);\n if(mCursor != null){\n if(mCursor.getCount() > 0){\n mCursor.moveToFirst();\n String info = mCursor.getString(mCursor.getColumnIndex(ToDoContract.ToDoEntry.COLUMN_INFO));\n String desc = mCursor.getString(mCursor.getColumnIndex(ToDoContract.ToDoEntry.COLUMN_DESC));\n int priority = mCursor.getInt(mCursor.getColumnIndex(ToDoContract.ToDoEntry.COLUMN_PRIORITY));\n Log.d(\"TAG+++\", \"Info: \" + info + \" | Desc: \" + desc + \" | Priority: \" + priority);\n\n //send notification\n MyNotificationUtil.sendNotification(getApplicationContext(), Integer.valueOf(id), info, desc, priority);\n }\n }\n\n\n //is there anything else to do, any background work still running?\n return false;\n }", "@Override\n\tpublic long getJobId() {\n\t\treturn model.getJobId();\n\t}", "private int runJob(java.io.PrintWriter r10) throws java.lang.Exception {\n /*\n r9 = this;\n java.lang.String r0 = \"force scheduled jobs\"\n r9.checkPermission(r0)\n r0 = 0\n r1 = 0\n L_0x0007:\n java.lang.String r2 = r9.getNextOption()\n r3 = r2\n if (r2 == 0) goto L_0x0080\n int r2 = r3.hashCode()\n r4 = -1626076853(0xffffffff9f14094b, float:-3.1347906E-20)\n r5 = 3\n r6 = 2\n r7 = 1\n r8 = -1\n if (r2 == r4) goto L_0x0047\n r4 = 1497(0x5d9, float:2.098E-42)\n if (r2 == r4) goto L_0x003d\n r4 = 1512(0x5e8, float:2.119E-42)\n if (r2 == r4) goto L_0x0033\n r4 = 1333469547(0x4f7b216b, float:4.2132713E9)\n if (r2 == r4) goto L_0x0029\n L_0x0028:\n goto L_0x0051\n L_0x0029:\n java.lang.String r2 = \"--user\"\n boolean r2 = r3.equals(r2)\n if (r2 == 0) goto L_0x0028\n r2 = r5\n goto L_0x0052\n L_0x0033:\n java.lang.String r2 = \"-u\"\n boolean r2 = r3.equals(r2)\n if (r2 == 0) goto L_0x0028\n r2 = r6\n goto L_0x0052\n L_0x003d:\n java.lang.String r2 = \"-f\"\n boolean r2 = r3.equals(r2)\n if (r2 == 0) goto L_0x0028\n r2 = 0\n goto L_0x0052\n L_0x0047:\n java.lang.String r2 = \"--force\"\n boolean r2 = r3.equals(r2)\n if (r2 == 0) goto L_0x0028\n r2 = r7\n goto L_0x0052\n L_0x0051:\n r2 = r8\n L_0x0052:\n if (r2 == 0) goto L_0x007d\n if (r2 == r7) goto L_0x007d\n if (r2 == r6) goto L_0x0074\n if (r2 == r5) goto L_0x0074\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r4 = \"Error: unknown option '\"\n r2.append(r4)\n r2.append(r3)\n java.lang.String r4 = \"'\"\n r2.append(r4)\n java.lang.String r2 = r2.toString()\n r10.println(r2)\n return r8\n L_0x0074:\n java.lang.String r2 = r9.getNextArgRequired()\n int r1 = java.lang.Integer.parseInt(r2)\n goto L_0x007f\n L_0x007d:\n r0 = 1\n L_0x007f:\n goto L_0x0007\n L_0x0080:\n java.lang.String r2 = r9.getNextArgRequired()\n java.lang.String r4 = r9.getNextArgRequired()\n int r4 = java.lang.Integer.parseInt(r4)\n long r5 = android.os.Binder.clearCallingIdentity()\n com.android.server.job.JobSchedulerService r7 = r9.mInternal // Catch:{ all -> 0x00b5 }\n int r7 = r7.executeRunCommand(r2, r1, r4, r0) // Catch:{ all -> 0x00b5 }\n boolean r8 = r9.printError(r7, r2, r1, r4) // Catch:{ all -> 0x00b5 }\n if (r8 == 0) goto L_0x00a1\n android.os.Binder.restoreCallingIdentity(r5)\n return r7\n L_0x00a1:\n java.lang.String r8 = \"Running job\"\n r10.print(r8) // Catch:{ all -> 0x00b5 }\n if (r0 == 0) goto L_0x00ad\n java.lang.String r8 = \" [FORCED]\"\n r10.print(r8) // Catch:{ all -> 0x00b5 }\n L_0x00ad:\n r10.println() // Catch:{ all -> 0x00b5 }\n android.os.Binder.restoreCallingIdentity(r5)\n return r7\n L_0x00b5:\n r7 = move-exception\n android.os.Binder.restoreCallingIdentity(r5)\n throw r7\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.server.job.JobSchedulerShellCommand.runJob(java.io.PrintWriter):int\");\n }", "public boolean addToSortedQueue(ArrayList<Integer> job) throws RemoteException;", "public interface IJobService {\n\n void process();\n\n}", "void event(long t) {\n\r\n \r\n\r\n Job temp;\r\n if (this.TempListMigrating.front != null) { //if there are any new migrating tasks\r\n TempListMigrating.insertionSortIdentifier(this.TempListMigrating.front); //order the TempList, from smallest-largest\r\n\r\n while (this.TempListMigrating.front != null) {\r\n //TempList.calculateD(t);\r\n temp = TempListMigrating.remove();\r\n int assignedProcessor = this.getNextProcessor(temp);\r\n\r\n //add this task to the processor\r\n this.servers[this.Tasks[temp.identifier].index[assignedProcessor]].addToMigratingPool(temp);\r\n\r\n }\r\n }\r\n\r\n while (this.TempListFixed.front != null) {\r\n\r\n temp = TempListFixed.remove();\r\n this.servers[this.Tasks[temp.identifier].index[0]].pool.insertionSortDeadline(temp, t);\r\n\r\n }\r\n\r\n //add things to the processor now\r\n for (int i = 0; i < numProcessors; i++) {\r\n\r\n if (this.servers[i].executing.top != null) { //not empty, there is a job present\r\n //check for migrating tasks\r\n if (this.servers[i].migratingPool.front != null) {\r\n //there are migrating Tasks, and something on the stack\r\n if (this.Tasks[this.servers[i].executing.top.identifier].numMigrations < 2 || this.Tasks[this.servers[i].executing.top.identifier].fixed == true) { //executing is a fixed task\r\n if (servers[i].migratingPool.front != null) {\r\n //switch\r\n temp = servers[i].executing.top;\r\n servers[i].executing.top = servers[i].migratingPool.remove();\r\n servers[i].pool.insertionSortDeadline(temp, t);\r\n this.preemptions++;\r\n\r\n }\r\n } //if both migrating tasks\r\n else if (this.servers[i].migratingPool.front.identifier < servers[i].executing.top.identifier) {\r\n temp = servers[i].migratingPool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n this.preemptions++;\r\n }\r\n } else if (this.servers[i].pool.front != null)//check for fixed tasks\r\n {\r\n if (this.servers[i].pool.front.deadline < servers[i].executing.top.deadline) {\r\n temp = servers[i].pool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n this.preemptions++;\r\n }\r\n }\r\n\r\n } else if (this.servers[i].migratingPool.front != null) //it was empty, add now migrating\r\n {\r\n temp = servers[i].migratingPool.remove();\r\n servers[i].executing.top=temp;\r\n \r\n \r\n\r\n } else if (this.servers[i].pool.front != null) //executing was empty, and migratingPool was empty, add from fixed list\r\n {\r\n\r\n temp = servers[i].pool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n }\r\n\r\n }\r\n }", "public Job() {\n\t\t\t\n\t\t}", "public String getJob() {\r\n\t\t\treturn job;\r\n\t\t}", "private void workOnQueue() {\n }", "String submitJob(JPPFJob job);", "private String jobs() {\r\n\t\tint[] j=tile.getJobs();\r\n\t\tString out = \"Jobs Are: \";\r\n\t\tfor(int i=0; i<j.length;i++) {\r\n\t\t\tout=out.concat(i+\": \"+(j[i])+\" || \");\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "public void setJobId( int jobId ) ;", "private void runWithJobId() {\n if (jobName.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_NAME);\n return;\n }\n if (numJobsToDelete.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_NUMBER_OF_JOBS);\n return;\n }\n if (daysOld.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_DAYS_OLD);\n return;\n }\n response.setPayload(requestDeletion(ImmutableSet.of(jobId.get()), true /* verbose */));\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<IJobQueue> getJobs() throws IOException {\n\t\tfinal String sql = \"SELECT * from jobqueue order by id\";\n\t\tList<? extends IJobQueue> result = this.queryDataList(JobQueue.class,IJobQueue.Props.class, sql);\n\t\treturn (List<IJobQueue>) result;\t\t\n\t}", "com.google.cloud.talent.v4.Job getJobs(int index);", "public void listJobExecutions() {\r\n\t\tRestCall caller = new RestCall();\r\n\t\tHttpURLConnection connection = caller.connect(endpoint + tenantId\r\n\t\t\t\t+ \"/job-executions\", null, \"GET\", token);\r\n\t\ttry {\r\n\t\t\tconnection.connect();\r\n\t\t\tSystem.out.println(caller.getResponse(connection));\r\n\t\t\tconnection.disconnect();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private Job getJobConf(String[] args) throws Exception {\n\n\t\tJobInfo jobInfo = new JobInfo() {\n\t\t\t@Override\n\t\t\tpublic Class<? extends Reducer> getCombinerClass() {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<?> getJarByClass() {\n\t\t\t\treturn TopologicalJob.class;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<? extends Mapper> getMapperClass() {\n\t\t\t\treturn TopologicalMapper.class;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<?> getOutputKeyClass() {\n\t\t\t\treturn Text.class;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<?> getOutputValueClass() {\n\t\t\t\treturn Text.class;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<? extends Reducer> getReducerClass() {\n\t\t\t\treturn TopologicalReducer.class;\n\t\t\t}\n\t\t};\n\t\t\n\t\treturn setupJob(\"topologicalsort\", jobInfo);\n\t}" ]
[ "0.72813994", "0.65729755", "0.64813393", "0.63725847", "0.63569957", "0.6201579", "0.6143224", "0.59362274", "0.5917904", "0.59019715", "0.5893574", "0.5892373", "0.5876584", "0.58415186", "0.58343786", "0.5812951", "0.5771297", "0.5770664", "0.57691246", "0.5763566", "0.5761274", "0.5744188", "0.5738426", "0.5737302", "0.57303154", "0.5728723", "0.5727816", "0.57246983", "0.5711639", "0.56888705", "0.5685979", "0.56749576", "0.5651796", "0.56381464", "0.56267637", "0.5626573", "0.5601838", "0.56013507", "0.56011295", "0.5594449", "0.5592069", "0.55916053", "0.5590974", "0.55753386", "0.55694354", "0.5559842", "0.5551976", "0.55452555", "0.5544224", "0.5540473", "0.55336297", "0.5530123", "0.5529289", "0.5510872", "0.551086", "0.55020344", "0.5497765", "0.5495972", "0.5495701", "0.5492098", "0.5481203", "0.5471041", "0.5470406", "0.5470063", "0.54659766", "0.5463029", "0.5459875", "0.54580504", "0.54580504", "0.54553914", "0.54493326", "0.54464716", "0.5440848", "0.54329103", "0.5432177", "0.5430422", "0.54286015", "0.5425025", "0.5423904", "0.54224724", "0.54179925", "0.54160154", "0.5415222", "0.54132444", "0.5394334", "0.53884995", "0.5383308", "0.5382263", "0.5371502", "0.53672475", "0.53634727", "0.53597844", "0.53570896", "0.53541625", "0.5348355", "0.5341266", "0.5338964", "0.53385526", "0.5334977", "0.5331373", "0.5327892" ]
0.0
-1
Only relevant for order jobs when called /jobs/p/... or job/p/...
@JsonProperty("jobChains") public void setJobChains(List<String> jobChains) { this.jobChains = jobChains; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortBasedPendingJobs();", "protected void beforeJobExecution() {\n\t}", "public abstract List<C_result> processJob(C_request processing_cmd);", "public GetJobs() {\r\n\t\tsuper();\r\n\t}", "@Override\r\n\tpublic void doBeforeJob() {\n\r\n\t}", "public int getJobId() ;", "@Override\n\tpublic void beforeJob(JobExecution arg0) {\n\t\t\n\t}", "JobResponse apply();", "abstract void doJob();", "public abstract void processJob() throws Exception;", "java.lang.String getJobId();", "@Override\r\n\tpublic void doAfterJob() {\n\r\n\t}", "@Override\n\t\t\tpublic void beforeJob(JobExecution jobExecution) {\n\t\t\t\t\n\t\t\t}", "static void SPT_rule(List<T_JOB> job) {\n Collections.sort(job);\n }", "protected void afterJobExecution() {\n\t}", "private void scheduleJob() {\n\n }", "public interface Job {\n\n public enum Status {\n IDLE,\n RUNNING,\n SUCCESS,\n ERROR,\n FAIL\n }\n\n /**\n * @return the job ID.\n */\n public default JobId getId() {\n return getContext().getId();\n }\n\n /**\n * @return the job status\n */\n public Status getStatus();\n\n /**\n * @return the job priority\n */\n public Priority getPriority();\n\n /**\n * @return The context of this job.\n */\n public JobContext getContext();\n\n /**\n * Run the job using the {@link XProcEngine}.\n */\n public void run(XProcEngine engine);\n\n}", "private void runWithoutJobId() {\n if (numJobsToDelete.isPresent() && numJobsToDelete.get() <= 0) {\n handleBadRequest(ERROR_NON_POSITIVE_JOBS_TO_DELETE);\n return;\n }\n int defaultedDaysOld = daysOld.orElse(DEFAULT_DAYS_OLD);\n // Only generate the detailed response payload if there aren't too many jobs involved.\n boolean verbose =\n numJobsToDelete.isPresent() && (numJobsToDelete.get() <= DEFAULT_MAX_NUM_JOBS_TO_DELETE);\n StringBuilder payload = new StringBuilder();\n\n // Since findEligibleJobsByJobName returns only a certain number of jobs, we must loop through\n // until we find enough, requesting deletion as we go.\n int numJobsProcessed = 0;\n DateTime cutoffDate = clock.nowUtc().minusDays(defaultedDaysOld);\n Optional<String> cursor = Optional.empty();\n do {\n Optional<Integer> numJobsToRequest =\n Optional.ofNullable(\n numJobsToDelete.isPresent() ? numJobsToDelete.get() - numJobsProcessed : null);\n EligibleJobResults batch =\n mapreduceEntityCleanupUtil.findEligibleJobsByJobName(\n jobName.orElse(null), cutoffDate, numJobsToRequest, force.orElse(false), cursor);\n cursor = batch.cursor();\n // Individual batches can come back empty if none of the returned jobs meet the requirements\n // or if all jobs have been exhausted.\n if (!batch.eligibleJobs().isEmpty()) {\n String payloadChunk = requestDeletion(batch.eligibleJobs(), verbose);\n if (verbose) {\n payload.append(payloadChunk);\n }\n numJobsProcessed += batch.eligibleJobs().size();\n }\n // Stop iterating when all jobs have been exhausted (cursor is absent) or enough have been\n // processed.\n } while (cursor.isPresent()\n && (!numJobsToDelete.isPresent() || (numJobsProcessed < numJobsToDelete.get())));\n\n if (numJobsProcessed == 0) {\n logger.atInfo().log(\n \"No eligible jobs found with name '%s' older than %d days old.\",\n jobName.orElse(\"(any)\"), defaultedDaysOld);\n payload.append(\"No eligible jobs found\");\n } else {\n logger.atInfo().log(\"A total of %d job(s) processed.\", numJobsProcessed);\n payload.append(String.format(\"A total of %d job(s) processed\", numJobsProcessed));\n }\n response.setPayload(payload.toString());\n }", "Collection<String> submitJob(Job job) throws JobExecutionException;", "public String[] getAllJobs();", "public interface Job {\n\n /** unique id for this job that is used as a reference in the service methods */\n String getId();\n\n /** job executor identification that has acquired this job and is going to execute it */\n String getLockOwner();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null. */\n Date getDueDate();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null.\n * @deprecated call {@link #getDueDate()} instead */\n @Deprecated\n Date getDuedate();\n\n /** exception that occurred during the last execution of this job. The transaction \n * of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n String getException();\n\n /** number of retries left. This is only decremented when an exception occurs during job \n * execution. The transaction of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n int getRetries();\n\n /** indicates if this job should be executed separate from any other job \n * in the same process instance */\n boolean isExclusive();\n\n /** the related execution */\n Execution getExecution();\n\n /** the related process instance */\n Execution getProcessInstance();\n\n Date getLockExpirationTime();\n\n}", "public String getJobId();", "private void postJobRequestSorting(String url, String sType) {\n\n loadingDialog();\n\n HashMap<String, String> jsonParams = new HashMap<String, String>();\n jsonParams.put(\"provider_id\", provider_id);\n jsonParams.put(\"type\", sType);\n jsonParams.put(\"page\", \"0\");\n jsonParams.put(\"perPage\", \"20\");\n jsonParams.put(\"orderby\", Str_orderby);\n jsonParams.put(\"sortby\", Str_sortby);\n jsonParams.put(\"from\", Str_from);\n jsonParams.put(\"to\", Str_to);\n\n\n System.out.println(\"---------from------------\" + Str_from);\n System.out.println(\"---------to------------\" + Str_to);\n System.out.println(\"---------orderby------------\" + Str_orderby);\n System.out.println(\"---------sortby------------\" + Str_sortby);\n\n System.out.println(\"---------My Jobs user_id------------\" + provider_id);\n System.out.println(\"---------My Jobs type------------\" + sType);\n System.out.println(\"---------My Jobs Page page------------\" + \"1\");\n System.out.println(\"---------My Jobs url------------\" + url);\n\n mRequest = new ServiceRequest(getActivity());\n mRequest.makeServiceRequest(url, Request.Method.POST, jsonParams, new ServiceRequest.ServiceListener() {\n @Override\n public void onCompleteListener(String response) {\n\n System.out.println(\"--------- sortingname response------------\" + response);\n String Str_status = \"\", Str_totaljobs = \"\", Str_Response = \"\";\n\n try {\n JSONObject jobject = new JSONObject(response);\n Str_status = jobject.getString(\"status\");\n\n if (Str_status.equalsIgnoreCase(\"1\")) {\n convertedlist.clear();\n JSONObject object = jobject.getJSONObject(\"response\");\n Str_Pagination = object.getString(\"next_page\");\n Str_PageDateCount = object.getString(\"perPage\");\n Str_totaljobs = object.getString(\"total_jobs\");\n\n Object check_list_object = object.get(\"jobs\");\n if (check_list_object instanceof JSONArray) {\n\n JSONArray jarry = object.getJSONArray(\"jobs\");\n if (jarry.length() > 0) {\n convertedlist.clear();\n\n for (int i = 0; i < jarry.length(); i++) {\n JSONObject object2 = jarry.getJSONObject(i);\n MyjobConverted_Pojo pojo = new MyjobConverted_Pojo();\n pojo.setConverted_address(object2.getString(\"location\"));\n pojo.setConverted_category(object2.getString(\"category_name\"));\n pojo.setConverted_date(object2.getString(\"booking_time\"));\n pojo.setConverted_user_name(object2.getString(\"user_name\"));\n pojo.setConverted_user_image(object2.getString(\"user_image\"));\n pojo.setOrder_id(object2.getString(\"job_id\"));\n pojo.setConvertedjob_status(object2.getString(\"job_status\"));\n String address= getCompleteAddressString(Double.parseDouble(object2.getString(\"location_lat\")),Double.parseDouble(object2.getString(\"location_lng\")));\n pojo.setAddress(address);\n convertedlist.add(pojo);\n isConvertedJobAvailable = true;\n }\n show_progress_status = true;\n } else {\n show_progress_status = false;\n isConvertedJobAvailable = false;\n }\n } else {\n\n isConvertedJobAvailable = false;\n\n }\n } else {\n Str_Response = jobject.getString(\"response\");\n }\n\n if (Str_status.equalsIgnoreCase(\"1\")) {\n\n if (isConvertedJobAvailable) {\n adapter = new MyjobConverted_Adapter(getActivity(), convertedlist);\n listView.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n\n if (show_progress_status) {\n layout_nojobs_converted.setVisibility(View.GONE);\n } else {\n layout_nojobs_converted.setVisibility(View.VISIBLE);\n listView.setEmptyView(layout_nojobs_converted);\n }\n } else {\n layout_nojobs_converted.setVisibility(View.VISIBLE);\n listView.setEmptyView(layout_nojobs_converted);\n }\n\n } else {\n\n Alert(getResources().getString(R.string.server_lable_header), Str_Response);\n\n }\n if (swipeRefreshLayout.isRefreshing()) {\n swipeRefreshLayout.setRefreshing(false);\n }\n\n } catch (Exception e) {\n dismissDialog();\n e.printStackTrace();\n }\n dismissDialog();\n }\n\n @Override\n public void onErrorListener() {\n dismissDialog();\n }\n });\n }", "public void scheduleJobs();", "@Override\n public void run() {\n CompareService.getRankedJobStrings();\n\n // get current job\n current = DataHandler.GetDataHandlerInstance().GetCurrentJob();\n String formattedComp =\n JOB.title + \" | \" + current.title + \"\\n\" +\n JOB.currentJob + \" | \" + current.currentJob + \"\\n\" +\n JOB.company + \" | \" + current.company + \"\\n\" +\n JOB.city + \" | \" + current.city + \"\\n\" +\n JOB.state + \" | \" + current.state + \"\\n\" +\n JOB.yearlySalary + \" | \" + current.yearlySalary + \"\\n\" +\n JOB.yearlyBonus + \" | \" + current.yearlyBonus + \"\\n\" +\n JOB.teleworkDaysPerWeek + \" | \" + current.teleworkDaysPerWeek + \"\\n\" +\n JOB.retirementBenefit + \" | \" + current.retirementBenefit + \"\\n\" +\n JOB.leaveTime + \" | \" + current.leaveTime;\n intent.putExtra(\"job1\", JOB.title + \", \" + JOB.company);\n intent.putExtra(\"job2\", current.title + \", \" + current.company);\n startActivity(intent);\n }", "public String[] getJobsWaiting();", "public Jobs jobs();", "public Job getJob();", "private void loadJobs(){\n\t\tsuperJobsList.clear();\n\t\tsuperJobs=jdbc.getProjectsAndJobs();\n\t\tfor(Job j: superJobs){\n\t\t\tsuperJobsList.addElement(j.jobname);\n\t\t}\n\t\t\n\t}", "public AbstractJob(){\n \n }", "public boolean getHasMoreJobs() ;", "@Override\n public String getType() {\n return Const.JOB;\n }", "public void setJob(String job) {\n this.job = job;\n }", "@Override\n\tpublic String getWaitingJobId() {\n\t\treturn null;\n\t}", "@Test\n public void testSplitRoomReservationReportJob() throws Exception {\n Job allocJob = new AllocationScraperJob();\n allocJob.setStatus( JobStatus.completed );\n dao.insertJob( allocJob );\n\n // setup a job to find all bookings spanning different rooms\n Job j = new SplitRoomReservationReportJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"allocation_scraper_job_id\", String.valueOf( allocJob.getId() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "public boolean isJob() {\n return false;\n }", "public ResponseEntity<String> doProcessJob(String operator, int contractNum, String content, int type, int state) {\n int count = processMapper.updateState(state, contractNum, type, operator);\n processMapper.updateContent(content, contractNum, type, operator);\n if (count == 0)\n return ResponseFactory.badRequest(\"fail\");\n switch (type) {\n case 0:\n writeLog(operator, \"会签了合同: \" + contractNum);\n break;\n case 1:\n writeLog(operator, \"定稿了合同: \" + contractNum);\n break;\n case 2:\n writeLog(operator, \"审核了合同: \" + contractNum);\n break;\n case 3:\n writeLog(operator, \"签订了合同: \" + contractNum);\n break;\n default:\n break;\n }\n// int createNumber = processMapper.getNumberOfNeededTypeState(type, OperationState.UNFINISHED.getValue());\n// int finishNumber = processMapper.getNumberOfNeededTypeState(type, OperationState.FINISHED.getValue());\n int unfinishedCount = processMapper.getUnfinishedOrDeniedProcess(type, contractNum);\n if (unfinishedCount == 0) {\n switch (type) {\n case 0:\n stateMapper.insert(contractNum, Status.COUNTER_SIGN_FINISHED.getValue());\n writeLog(operator, \"会签合同: \" + contractNum + \" 完成.\");\n break;\n case 1:\n stateMapper.insert(contractNum, Status.FINALIZE_FINISHED.getValue());\n contractMapper.updateContent(contractNum, content);\n writeLog(operator, \"定稿合同: \" + contractNum + \" 完成.\");\n break;\n case 2:\n stateMapper.insert(contractNum, Status.REVIEW_FINISHED.getValue());\n writeLog(operator, \"审核合同: \" + contractNum + \" 完成.\");\n break;\n case 3:\n stateMapper.insert(contractNum, Status.SIGN_FINISHED.getValue());\n writeLog(operator, \"签订合同: \" + contractNum + \" 完成.\");\n break;\n default:\n break;\n }\n }\n return ResponseFactory.success(\"Job finished\");\n }", "@Test\n public void testUnpaidDepositReportJob() throws Exception {\n Job allocScraperJob = new AllocationScraperJob();\n allocScraperJob.setStatus( JobStatus.completed );\n dao.insertJob( allocScraperJob );\n\n // setup a job to scrape allocation info\n Job j = new UnpaidDepositReportJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"allocation_scraper_job_id\", String.valueOf( allocScraperJob.getId() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "cb.Careerbuilder.Job getJobs(int index);", "void loadJobDetails() {\n if (!enabled.get()) {\n LOGGER.info(\"Skip loading scheduled jobs\");\n return;\n }\n loadJobsInCurrentChunk()\n .filter(j -> !scheduler.scheduled(j.getId()).isPresent())//not consider already scheduled jobs\n .flatMapRsPublisher(t -> ErrorHandling.skipErrorPublisher(scheduler::schedule, t))\n .forEach(a -> LOGGER.debug(\"Loaded and scheduled job {}\", a))\n .run()\n .whenComplete((v, t) -> Optional.ofNullable(t)\n .map(ex -> {\n LOGGER.error(\"Error Loading scheduled jobs!\", ex);\n return null;\n })\n .orElseGet(() -> {\n LOGGER.info(\"Loading scheduled jobs completed !\");\n return null;\n }));\n }", "@Test\n public void testGroupBookingsReportJob() throws Exception {\n Job allocJob = new AllocationScraperJob();\n allocJob.setStatus( JobStatus.completed );\n dao.insertJob( allocJob );\n\n // setup a job to find reservations with more than X guests\n Job j = new GroupBookingsReportJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"allocation_scraper_job_id\", String.valueOf( allocJob.getId() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "long countJobs();", "@Digits(integer=9,fraction=0)\n\t@Override\n\tpublic String getJob() {\n\t\treturn super.getJob();\n\t}", "public abstract void prepareTasks() throws JobException;", "protected abstract String getJobSubmitId();", "JobResponse apply(Context context);", "static public void falsifyProcessingJobs()\n {\n processingJobs = false;\n }", "@Test\n public void testScrapeReservationsBookedOnJob() throws Exception {\n Job j = new ScrapeReservationsBookedOnJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"booked_on_date\", BookingsPageScraper.DATE_FORMAT_YYYY_MM_DD.format( new Date() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "@Override\r\n\tpublic T getJob() {\n\t\treturn super.getJob();\r\n\t}", "@Override\n public Job getJobPOJO() {\n return jobUnproxied;\n }", "void completeJob();", "@Override\n\tpublic String getUsedjobId() {\n\t\treturn null;\n\t}", "private void saveJobList() {\n\t\tFileLoader.saveObject(getApplicationContext(), FILE_NAME_JOBS, (Serializable) jobs);\n\t}", "public interface JobService {\n boolean registerJob(Job job);\n\n boolean deleteJob(String domain, String jobId);\n\n List<JobWrapper> listJob(String domain);\n\n JobWrapper readJob(String domain, String jobId);\n\n NodeResult readNodeResult(String domain, String jobId, String ip);\n\n boolean runJob(String domain, String jobId);\n\n}", "@Override\n public final boolean doIt() throws JobException {\n tasks = new LinkedHashMap<TaskKey,TaskJob>();\n prepareTasks();\n (new MergeJob()).startJob();\n return true;\n }", "protected void jobFinished(Progress job) {\n }", "PagingLoadResult<GWTJahiaJobDetail> getJobs(int offset, int limit, String sortField, String sortDir, String groupState, List<String> groupNames) throws GWTJahiaServiceException;", "@Override\r\n\tpublic List<IncomingJobResponse> getJobList() {\n\t\tList<IncomingJobs> js = (List<IncomingJobs>)incomingRepository.fetchincomingJobs();\r\n\t\tList<IncomingJobResponse> joblist = new ArrayList<IncomingJobResponse>();\r\n\t\tfor(IncomingJobs job :js){\r\n\t\t\tIncomingJobResponse jobs = new IncomingJobResponse();\r\n\t\t\tSystem.out.println(\"ATA:\"+job.getAta()+\"ETA:\"+job.getEta());\r\n\t\t\tjobs.setJobid(job.getID());\r\n\t\t\t\r\n\t\t\tif(job.getEta()!=null){\r\n\t\t\tjobs.setEta(job.getEta().toString());\r\n\t\t\t}\r\n\t\t\tif(job.getAta()!=null){\r\n\t\t\tjobs.setAta(job.getAta().toString());\r\n\t\t\t}\r\n\t\t\tjobs.setBroker(job.getBroker());\r\n\t\t\tjobs.setClear(job.getClear());\r\n\t\t\tjobs.setConsignee(job.getConsignee());\r\n\t\t\tjobs.setDestination(job.getDestination());\r\n\t\t\tjobs.setFlight(job.getFlight());\r\n\t\t\tjobs.setHawb(job.getHawb());\r\n\t\t\tjobs.setHeld(job.getHeld());\r\n\t\t\tjobs.setMawb(job.getMawb());\r\n\t\t\tjobs.setMLID(job.getMLID());\r\n\t\t\tjobs.setNote(job.getNote());\r\n\t\t\tjobs.setOutturn(job.getOutturn());\r\n\t\t\tjobs.setPiece(job.getPiece());\r\n\t\t\tjobs.setWeight(job.getWeight());\r\n\t\t\tif(job.getInjectionDate()!=null){\r\n\t\t\t\tjobs.setInjectionDate(job.getInjectionDate().toString());\r\n\t\t\t\t}\r\n\t\t\tif(job.getClearanceDate()!=null){\r\n\t\t\t\tjobs.setClearanceDate(job.getClearanceDate().toString());\r\n\t\t\t\t}\r\n\t\t\tjobs.setDamage(job.getDamageNotes());\r\n\t\t\tjobs.setSurplus(job.getSurplusShortage());\r\n\t\t\tjoblist.add(jobs);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn joblist;\r\n\t}", "@Override\n public void beforeJob(JobExecution jobExecution) {\n super.beforeJob(jobExecution);\n }", "@Override\r\n\tpublic List<Job> ShowAllJobs() {\n\t\treturn null;\r\n\t}", "public void setJob(String job) {\r\n\t\t\tthis.job = job;\r\n\t\t}", "int addJobs(Iterable<? extends PrintJob> jobs);", "public interface IJobshelper {\n\n\t/**\n\t * Can do some initialization for task like file location, Emailer list, Emailer\n\t * message etc This is used to set some configuration for this Job and should be\n\t * using some properties file so that each Job could use specific configuration\n\t * \n\t * @throws JobExecutionException\n\t */\n\tpublic void initialJobContext(String configFileName) throws JobExecutionException;\n\n}", "public AutomaticJob() {\r\n \r\n }", "@GET\n @Deprecated\n @Path(\"jobs\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response jobGet(@QueryParam(\"created_before\") String createdBefore,\n @QueryParam(\"created_after\") String createdAfter) throws Exception {\n //List<LGJob> jobs;\n boolean doCreatedBefore = false;\n boolean doCreatedAfter = false;\n Date beforeDate = null;\n Date afterDate = null;\n\n // Parse created_before if present\n if ((createdBefore != null) && (!createdBefore.equals(\"\"))) {\n Instant beforeInstant = null;\n try {\n beforeInstant = Instant.parse(createdBefore);\n } catch (DateTimeParseException e) {\n return Response.status(201).entity(\"Invalid created_on Date format [\" + createdBefore + \"]\").build();\n }\n beforeDate = Date.from(beforeInstant);\n doCreatedBefore = true;\n }\n\n // Parse created_after if present\n if ((createdAfter != null) && (!createdAfter.equals(\"\"))) {\n Instant afterInstant = null;\n try {\n afterInstant = Instant.parse(createdAfter);\n } catch (DateTimeParseException e) {\n return Response.status(201).entity(\"Invalid created_after Date format [\" + createdAfter + \"]\").build();\n }\n afterDate = Date.from(afterInstant);\n doCreatedAfter = true;\n }\n\n\n JSONObject graphJobs = new JSONObject();\n try {\n graphJobs = Utils.getLemongraphJob(request, \"\", null);//this considers createdBefore/createdAfter params\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n JSONArray ids = new JSONArray();\n Iterator<String> idIterator = graphJobs.keys();\n while (idIterator.hasNext()) {\n String id = idIterator.next();\n ids.put(id);\n }\n\n JSONObject ob = new JSONObject();\n if(ids.length() > 0) {\n // Build response\n SimpleDateFormat sdf = new SimpleDateFormat(\"MMM dd,yyyy HH:mm:ss\");\n JSONObject mongoJobs = Utils.getMongoJobs(ids);\n Iterator iterator = mongoJobs.keySet().iterator();\n while (iterator.hasNext()) {\n String id = iterator.next().toString();\n try {\n JSONObject mongoJob = mongoJobs.getJSONObject(id);\n JSONObject job = new JSONObject();\n\n //Default value checks\n if (!mongoJob.has(\"reason\")) {\n mongoJob.put(\"reason\", \"\");\n }\n if (!mongoJob.has(\"endTime\")) {\n mongoJob.put(\"endTime\", 0);\n }\n if (!mongoJob.has(\"totalRunningTimeSeconds\")) {\n mongoJob.put(\"totalRunningTimeSeconds\", 0);\n }\n if (!mongoJob.has(\"approvedAdapterNames\")) {\n mongoJob.put(\"approvedAdapterNames\", new JSONArray());\n }\n if (!mongoJob.has(\"startTime\")) {\n mongoJob.put(\"startTime\", 0);\n }\n if (!mongoJob.has(\"jobErrors\")) {\n mongoJob.put(\"jobErrors\", new JSONArray());\n }\n if (!mongoJob.has(\"taskMap\")) {\n mongoJob.put(\"taskMap\", new JSONObject());\n }\n if (!mongoJob.has(\"jobConfig\")) {\n mongoJob.put(\"jobConfig\", new JSONObject());\n }\n if (!mongoJob.has(\"expireDate\")) {\n mongoJob.put(\"expireDate\", 0);\n }\n if (!mongoJob.has(\"graphActivity\")) {\n mongoJob.put(\"graphActivity\", 0);\n }\n if (!mongoJob.has(\"createDate\")) {\n mongoJob.put(\"createDate\", 0);\n }\n if (!mongoJob.has(\"status\")) {\n mongoJob.put(\"status\", 0);\n }\n\n job.put(\"reason\", mongoJob.get(\"reason\"));\n job.put(\"endtime\", sdf.format(mongoJob.get(\"endTime\")));\n job.put(\"runtime\", mongoJob.get(\"totalRunningTimeSeconds\"));\n job.put(\"approvedadapters\", mongoJob.getJSONArray(\"approvedAdapterNames\"));\n job.put(\"starttime\", sdf.format(mongoJob.get(\"startTime\")));\n job.put(\"error_count\", mongoJob.getJSONArray(\"jobErrors\").length());\n job.put(\"task_count\", mongoJob.getJSONObject(\"taskMap\").length());\n job.put(\"job_config\", new JSONObject(mongoJob.get(\"jobConfig\").toString()));\n job.put(\"expire_date\", sdf.format(mongoJob.get(\"expireDate\")));\n job.put(\"job_id\", id);\n job.put(\"graph_activity\", mongoJob.get(\"graphActivity\"));\n job.put(\"create_date\", sdf.format(mongoJob.get(\"createDate\")));\n int status = mongoJob.getInt(\"status\");\n job.put(\"status\", LGJob.getStatusString(status));\n\n int active = 0;\n try {\n if (status == LGJob.STATUS_PROCESSING) { //only processing jobs have non-zero active_task_count\n ArrayList<Document> docs = new MongoDBStore().getTasksFromJob(id);\n JSONObject tasks = MongoDBStore.toJSON(docs);\n active = LGJob.getActiveTaskCount(tasks);\n }\n } catch (Exception e) {\n log.debug(\"Couldn't fetch active task count for job:\" + id + \" Error:\" + e.getMessage());\n }\n\n job.put(\"active_task_count\", active);\n ob.put(id, job);\n } catch (Exception e) {\n log.info(\"Invalid job:\" + id + \" Error:\" + e.getMessage());\n }\n }\n }\n return Response.status(200).entity(ob.toString()).build();\n }", "private void putJob(int a, int b){\n \n Integer[] job = new Integer[2];\n \n job[0] = a;\n job[1] = b;\n \n // put into priority queue\n this.prior.add(job);\n }", "public String execute() {\n\t\t\n\t\tjobs = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> job = new HashMap<String, String>();\n\t\tjob.put(\"title\", \"Java Developer\");\n\t\tjob.put(\"description\", \"Java Developer 1\");\n\t\tjob.put(\"location\", \"london\");\n\t\tjobs.add(job);\n\t\t\n\t\tjob = new HashMap<String, String>();\n\t\tjob.put(\"title\", \"Java Developer\");\n\t\tjob.put(\"description\", \"Java Developer 1\");\n\t\tjob.put(\"location\", \"london\");\n\t\tjobs.add(job);\n\t\t\n \n\t\treturn \"SUCCESS\";\n \n\t}", "private void realPrint(PrintJob job) {\n\t}", "private void realPrint(PrintJob job) {\n\t}", "public void setJob(Job jobNum){\n job = jobNum;\n }", "public String getJob() {\n return job;\n }", "@Test\n public void testJobOverviewHandler() throws Exception {\n // this only works if there is no active job at this point\n assertTrue(getRunningJobs(CLUSTER.getClusterClient()).isEmpty());\n\n // Create a task\n final JobVertex sender = new JobVertex(\"Sender\");\n sender.setParallelism(2);\n sender.setInvokableClass(BlockingInvokable.class);\n\n final JobGraph jobGraph = JobGraphTestUtils.streamingJobGraph(sender);\n\n ClusterClient<?> clusterClient = CLUSTER.getClusterClient();\n clusterClient.submitJob(jobGraph).get();\n\n // wait for job to show up\n while (getRunningJobs(CLUSTER.getClusterClient()).isEmpty()) {\n Thread.sleep(10);\n }\n\n // wait for tasks to be properly running\n BlockingInvokable.latch.await();\n\n final Duration testTimeout = Duration.ofMinutes(2);\n\n String json =\n TestBaseUtils.getFromHTTP(\"http://localhost:\" + getRestPort() + \"/jobs/overview\");\n\n ObjectMapper mapper = new ObjectMapper();\n JsonNode parsed = mapper.readTree(json);\n ArrayNode jsonJobs = (ArrayNode) parsed.get(\"jobs\");\n assertEquals(1, jsonJobs.size());\n assertThat(\"Duration must be positive\", jsonJobs.get(0).get(\"duration\").asInt() > 0);\n\n clusterClient.cancel(jobGraph.getJobID()).get();\n\n // ensure cancellation is finished\n while (!getRunningJobs(CLUSTER.getClusterClient()).isEmpty()) {\n Thread.sleep(20);\n }\n\n BlockingInvokable.reset();\n }", "@Test\n public void testAllocationScraperJob() throws Exception {\n AllocationScraperJob j = new AllocationScraperJob();\n j.setStatus( JobStatus.submitted );\n j.setStartDate( Calendar.getInstance().getTime() );\n j.setDaysAhead( 27 );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "public void finalizeJob() {\n // override to implement\n }", "@Override\n public String getJobName() {\n return operate_name;\n }", "@Test\n public void testCreateConfirmDepositAmountsJob() throws Exception {\n Job asj = new AllocationScraperJob();\n asj.setStatus( JobStatus.completed );\n dao.insertJob( asj );\n\n // setup the job\n Job j = new CreateConfirmDepositAmountsJob();\n j.setStatus( JobStatus.submitted );\n j.getDependentJobs().add( asj );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "public void ServiceJob(FJJob job, double time) {\n if (job == null) return;\n if (remaining_workers == 0) return;\n if (FJSimulator.DEBUG) System.out.println(\"begin service on job: \"+job.path_log_id+\" \"+time);\n\n // if the patience flag is set, then check the job queue to see if\n // this job can wait for more workers to become idle\n /*\n if (this.patient_job==null && patience) {\n \tif (this.job_queue.size() <= JOB_QUEUE_PATIENCE_THRESHOLD) {\n \t\tthis.patient_job = job;\n \t\t// compute how many workers we want to have idle before we start\n \t\t//this.idle_workers_needed = Math.min(job.num_tasks, Math.min(remaining_workers+1, num_workers));\n \t\t/**\n \t\t * Just waiting for one more worker, always, is kind-of dumb. If there is only\n \t\t * one worker available, waiting for a 2nd doubles the parallelism of the next job.\n \t\t * Also, if a lot of jobs are in service, the expected waiting time until the\n \t\t * next departure is shorter. OTOH, if almost all workers are already idle, then\n \t\t * the benefit of one more worker is negligible, and less jobs in progress means a\n \t\t * longer expected wait until another becomes available. So when deciding whether\n \t\t * to be patient or not, we should consider:\n \t\t * - the number of currently idle workers\n \t\t * - the fraction of currently idle workers\n \t\t * - the number of jobs in progress (and how many workers they have)\n \t\t * - \n \t\t * /\n \t\tint num_jobs_in_progress = this.activeJobs.size();\n \t\tdouble idle_fraction = (1.0*remaining_workers)/(1.0*num_workers);\n \t\tint busy_workers = num_workers - remaining_workers;\n \t\tdouble workers_per_job = (1.0*busy_workers)/(1.0*num_jobs_in_progress);\n \t\t\n \t\t// the expected factor to be gained by a job departing\n \t\tdouble rr = workers_per_job / remaining_workers;\n \t\t\n \t\tif ((rr >= 1.5) && (num_jobs_in_progress >= num_workers/4.0)) {\n \t\t\tthis.idle_workers_needed = Math.min(job.num_tasks, Math.min(remaining_workers+1, num_workers));\n \t\t\tSystem.out.println(\"** Setting a job to be patient rr=\"+rr);\n \t\t} else {\n \t\t\tSystem.out.println(\"-- J=\"+num_jobs_in_progress+\"\\t I=\"+remaining_workers+\"\\t B=\"+busy_workers+\"\\t rr=\"+rr);\n \t\t\tthis.idle_workers_needed = remaining_workers;\n \t\t}\n \t}\n }\n */\n\n /*\n * Try a really restrictive version of BackPressure and Patience.\n * Jobs are only patient in the case where there is only one available\n * worker, and at least k/2 jobs in progress. Also the only time the job\n * takes all workers is the case of a patient job.\n */\n if (this.patient_job==null && patience) {\n \tif ((this.job_queue.size() <= JOB_QUEUE_PATIENCE_THRESHOLD) \n \t\t\t&& (remaining_workers==1)\n \t\t\t&& (activeJobs.size() >= num_workers/2)) {\n \t\tthis.patient_job = job;\n \t\t\tthis.idle_workers_needed = remaining_workers + 1;\n \t}\n }\n\n \n // if we are going to wait for more workers, just return\n //TODO: if the job queue is no longer empty, should just start the job?\n boolean servicing_patient_job = false;\n if (patience && this.patient_job!=null) {\n \tif (this.patient_job != job) {\n \t\tSystem.err.println(\"ERROR: trying to service a job when another is being patient!\");\n \t\tSystem.exit(1);\n \t}\n \t\n \tif (remaining_workers < idle_workers_needed) {\n \t\t//System.out.println(\"Being patient for job remaining_workers=\"+remaining_workers+\" idle_workers_needed=\"+idle_workers_needed);\n \t\treturn;\n \t}\n \t\n \t// we're going to service the job that's been waiting\n \tthis.patient_job = null;\n \tidle_workers_needed = 0;\n \tservicing_patient_job = true;\n \t//System.out.println(\"Servicing a patient job \"+remaining_workers);\n }\n \n // pick out some number of workers to use\n // if the job queue is below some threshold, take all the workers\n int nworkers = (remaining_workers == 1) ? 1 : remaining_workers/2;\n //if (this.job_queue.isEmpty()) {\n if (this.job_queue.isEmpty() && servicing_patient_job) {\n \t//System.out.println(\" ** giving a patient job all the workers: \"+remaining_workers);\n \tnworkers = remaining_workers;\n }\n \n activeJobs.add(job);\n Vector<Integer> worker_pool = new Vector<Integer>();\n job2workers.put(job, worker_pool);\n for (int w=0; (w<num_workers && worker_pool.size()<nworkers); w++) {\n if (worker2job[w] == null) {\n worker_pool.add(w);\n worker2job[w] = job;\n remaining_workers--;\n }\n }\n \n //System.out.println(\"worker_pool.size() = \"+worker_pool.size()+\" nworkers = \"+nworkers+\" activeJobs.size() = \"+activeJobs.size()+\" queue size = \"+this.job_queue.size());\n \n // assign the job's tasks to the workers\n int worker_index = 0;\n FJTask t = null;\n while ((t = job.nextTask()) != null) {\n workers[0][worker_pool.get(worker_index)].queue.add(t);\n //System.out.println(\"assigning task \"+t+\" to worker \"+worker_pool.get(worker_index));\n worker_index = (worker_index + 1) % nworkers;\n }\n \n // These newly allocated workers will be idle. Put them to work.\n feedWorkers(time);\n }", "protected void processJobSubmissionResponse(JobSubmissionResponseTO result) {\n\t\tList<Integer> jobID = result.getJobIDs();\n\t\tUserModel userModel = OurGridPortal.getUserModel();\n\t\tfor (Integer integer : jobID) {\n\t\t\tuserModel.addJobId(getJobViewId(), integer);\n\t\t}\n\t\t\n\t}", "java.util.List<cb.Careerbuilder.Job> \n getJobsList();", "@Override\n\tpublic int[] getJob() throws RemoteException {\n\t\treturn (Server.jobs.size() > 0)? Server.jobs.remove(0) : null;\n\t}", "boolean isDone(long number) throws NoSuchJobException;", "public interface JobManager {\n /**\n * Add a job to the execution queue.\n * @param job encapsulation of the execution data.\n * @return the unique id of the job.\n */\n String submitJob(JPPFJob job);\n\n /**\n * Add a task job to the execution queue.\n * @param job encapsulation of the execution data.\n * @param listener an optional listener to receive job status change notifications, may be null.\n * @return the unique id of the job.\n */\n String submitJob(JPPFJob job, JobStatusListener listener);\n\n /**\n * Add an existing job back into the execution queue.\n * @param job encapsulation of the execution data.\n * @return the unique id of the job.\n */\n String resubmitJob(JPPFJob job);\n\n /**\n * Determine whether there is a client connection available for execution.\n * @return true if at least one connection is available, false otherwise.\n */\n boolean hasAvailableConnection();\n\n /**\n * Determine whether local execution is enabled on this client.\n * @return <code>true</code> if local execution is enabled, <code>false</code> otherwise.\n */\n boolean isLocalExecutionEnabled();\n\n /**\n * Specify whether local execution is enabled on this client.\n * @param localExecutionEnabled <code>true</code> to enable local execution, <code>false</code> otherwise\n */\n void setLocalExecutionEnabled(final boolean localExecutionEnabled);\n\n /**\n * Get the list of available connections.\n * @return a vector of connections instances.\n */\n Vector<JPPFClientConnection> getAvailableConnections();\n\n /**\n * Get a listener to the status of the managed connections.\n * @return a {@link ClientConnectionStatusListener} instance.\n */\n ClientConnectionStatusListener getClientConnectionStatusListener();\n\n /**\n * Close this job manager and all the resources it uses.\n */\n void close();\n\n /**\n * Reset this job manager.\n */\n void reset();\n\n /**\n * Cancel the job with the specified id.\n * @param jobId the id of the job to cancel.\n * @return a <code>true</code> when cancel was successful <code>false</code> otherwise.\n * @throws Exception if any error occurs.\n */\n boolean cancelJob(String jobId) throws Exception;\n\n /**\n * Get the current load-balancer settings.\n * @return a {@link LoadBalancingInformation} instance, which encapsulates a load-balancing alfgorithm name, along with its parameters.\n */\n public LoadBalancingInformation getLoadBalancerSettings();\n\n /**\n * Change the load balancer settings for the client.\n * @param algorithm the name of load-balancing alogrithm to use.\n * @param parameters the algorithm's parameters, if any. The parmeter names are assumed no to be prefixed.\n * @throws Exception if any error occurs or if the algorithm name is {@code null} or not known.\n */\n public void setLoadBalancerSettings(final String algorithm, final Properties parameters) throws Exception;\n}", "JobResponse refresh();", "void topQueue(int job, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;", "@Override\n public boolean onStartJob(JobParameters job) {\n\n String id = job.getTag();\n Log.d(\"TAG+++\", \"Job id: \" + id);\n\n Uri uri = ToDoContract.ToDoEntry.CONTENT_URI.buildUpon().appendPath(id).build();\n Cursor mCursor = getContentResolver().query(uri, null, null, null, null);\n if(mCursor != null){\n if(mCursor.getCount() > 0){\n mCursor.moveToFirst();\n String info = mCursor.getString(mCursor.getColumnIndex(ToDoContract.ToDoEntry.COLUMN_INFO));\n String desc = mCursor.getString(mCursor.getColumnIndex(ToDoContract.ToDoEntry.COLUMN_DESC));\n int priority = mCursor.getInt(mCursor.getColumnIndex(ToDoContract.ToDoEntry.COLUMN_PRIORITY));\n Log.d(\"TAG+++\", \"Info: \" + info + \" | Desc: \" + desc + \" | Priority: \" + priority);\n\n //send notification\n MyNotificationUtil.sendNotification(getApplicationContext(), Integer.valueOf(id), info, desc, priority);\n }\n }\n\n\n //is there anything else to do, any background work still running?\n return false;\n }", "@Override\n\tpublic long getJobId() {\n\t\treturn model.getJobId();\n\t}", "private int runJob(java.io.PrintWriter r10) throws java.lang.Exception {\n /*\n r9 = this;\n java.lang.String r0 = \"force scheduled jobs\"\n r9.checkPermission(r0)\n r0 = 0\n r1 = 0\n L_0x0007:\n java.lang.String r2 = r9.getNextOption()\n r3 = r2\n if (r2 == 0) goto L_0x0080\n int r2 = r3.hashCode()\n r4 = -1626076853(0xffffffff9f14094b, float:-3.1347906E-20)\n r5 = 3\n r6 = 2\n r7 = 1\n r8 = -1\n if (r2 == r4) goto L_0x0047\n r4 = 1497(0x5d9, float:2.098E-42)\n if (r2 == r4) goto L_0x003d\n r4 = 1512(0x5e8, float:2.119E-42)\n if (r2 == r4) goto L_0x0033\n r4 = 1333469547(0x4f7b216b, float:4.2132713E9)\n if (r2 == r4) goto L_0x0029\n L_0x0028:\n goto L_0x0051\n L_0x0029:\n java.lang.String r2 = \"--user\"\n boolean r2 = r3.equals(r2)\n if (r2 == 0) goto L_0x0028\n r2 = r5\n goto L_0x0052\n L_0x0033:\n java.lang.String r2 = \"-u\"\n boolean r2 = r3.equals(r2)\n if (r2 == 0) goto L_0x0028\n r2 = r6\n goto L_0x0052\n L_0x003d:\n java.lang.String r2 = \"-f\"\n boolean r2 = r3.equals(r2)\n if (r2 == 0) goto L_0x0028\n r2 = 0\n goto L_0x0052\n L_0x0047:\n java.lang.String r2 = \"--force\"\n boolean r2 = r3.equals(r2)\n if (r2 == 0) goto L_0x0028\n r2 = r7\n goto L_0x0052\n L_0x0051:\n r2 = r8\n L_0x0052:\n if (r2 == 0) goto L_0x007d\n if (r2 == r7) goto L_0x007d\n if (r2 == r6) goto L_0x0074\n if (r2 == r5) goto L_0x0074\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r4 = \"Error: unknown option '\"\n r2.append(r4)\n r2.append(r3)\n java.lang.String r4 = \"'\"\n r2.append(r4)\n java.lang.String r2 = r2.toString()\n r10.println(r2)\n return r8\n L_0x0074:\n java.lang.String r2 = r9.getNextArgRequired()\n int r1 = java.lang.Integer.parseInt(r2)\n goto L_0x007f\n L_0x007d:\n r0 = 1\n L_0x007f:\n goto L_0x0007\n L_0x0080:\n java.lang.String r2 = r9.getNextArgRequired()\n java.lang.String r4 = r9.getNextArgRequired()\n int r4 = java.lang.Integer.parseInt(r4)\n long r5 = android.os.Binder.clearCallingIdentity()\n com.android.server.job.JobSchedulerService r7 = r9.mInternal // Catch:{ all -> 0x00b5 }\n int r7 = r7.executeRunCommand(r2, r1, r4, r0) // Catch:{ all -> 0x00b5 }\n boolean r8 = r9.printError(r7, r2, r1, r4) // Catch:{ all -> 0x00b5 }\n if (r8 == 0) goto L_0x00a1\n android.os.Binder.restoreCallingIdentity(r5)\n return r7\n L_0x00a1:\n java.lang.String r8 = \"Running job\"\n r10.print(r8) // Catch:{ all -> 0x00b5 }\n if (r0 == 0) goto L_0x00ad\n java.lang.String r8 = \" [FORCED]\"\n r10.print(r8) // Catch:{ all -> 0x00b5 }\n L_0x00ad:\n r10.println() // Catch:{ all -> 0x00b5 }\n android.os.Binder.restoreCallingIdentity(r5)\n return r7\n L_0x00b5:\n r7 = move-exception\n android.os.Binder.restoreCallingIdentity(r5)\n throw r7\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.server.job.JobSchedulerShellCommand.runJob(java.io.PrintWriter):int\");\n }", "public boolean addToSortedQueue(ArrayList<Integer> job) throws RemoteException;", "public interface IJobService {\n\n void process();\n\n}", "void event(long t) {\n\r\n \r\n\r\n Job temp;\r\n if (this.TempListMigrating.front != null) { //if there are any new migrating tasks\r\n TempListMigrating.insertionSortIdentifier(this.TempListMigrating.front); //order the TempList, from smallest-largest\r\n\r\n while (this.TempListMigrating.front != null) {\r\n //TempList.calculateD(t);\r\n temp = TempListMigrating.remove();\r\n int assignedProcessor = this.getNextProcessor(temp);\r\n\r\n //add this task to the processor\r\n this.servers[this.Tasks[temp.identifier].index[assignedProcessor]].addToMigratingPool(temp);\r\n\r\n }\r\n }\r\n\r\n while (this.TempListFixed.front != null) {\r\n\r\n temp = TempListFixed.remove();\r\n this.servers[this.Tasks[temp.identifier].index[0]].pool.insertionSortDeadline(temp, t);\r\n\r\n }\r\n\r\n //add things to the processor now\r\n for (int i = 0; i < numProcessors; i++) {\r\n\r\n if (this.servers[i].executing.top != null) { //not empty, there is a job present\r\n //check for migrating tasks\r\n if (this.servers[i].migratingPool.front != null) {\r\n //there are migrating Tasks, and something on the stack\r\n if (this.Tasks[this.servers[i].executing.top.identifier].numMigrations < 2 || this.Tasks[this.servers[i].executing.top.identifier].fixed == true) { //executing is a fixed task\r\n if (servers[i].migratingPool.front != null) {\r\n //switch\r\n temp = servers[i].executing.top;\r\n servers[i].executing.top = servers[i].migratingPool.remove();\r\n servers[i].pool.insertionSortDeadline(temp, t);\r\n this.preemptions++;\r\n\r\n }\r\n } //if both migrating tasks\r\n else if (this.servers[i].migratingPool.front.identifier < servers[i].executing.top.identifier) {\r\n temp = servers[i].migratingPool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n this.preemptions++;\r\n }\r\n } else if (this.servers[i].pool.front != null)//check for fixed tasks\r\n {\r\n if (this.servers[i].pool.front.deadline < servers[i].executing.top.deadline) {\r\n temp = servers[i].pool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n this.preemptions++;\r\n }\r\n }\r\n\r\n } else if (this.servers[i].migratingPool.front != null) //it was empty, add now migrating\r\n {\r\n temp = servers[i].migratingPool.remove();\r\n servers[i].executing.top=temp;\r\n \r\n \r\n\r\n } else if (this.servers[i].pool.front != null) //executing was empty, and migratingPool was empty, add from fixed list\r\n {\r\n\r\n temp = servers[i].pool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n }\r\n\r\n }\r\n }", "public Job() {\n\t\t\t\n\t\t}", "public String getJob() {\r\n\t\t\treturn job;\r\n\t\t}", "private void workOnQueue() {\n }", "String submitJob(JPPFJob job);", "private String jobs() {\r\n\t\tint[] j=tile.getJobs();\r\n\t\tString out = \"Jobs Are: \";\r\n\t\tfor(int i=0; i<j.length;i++) {\r\n\t\t\tout=out.concat(i+\": \"+(j[i])+\" || \");\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "public void setJobId( int jobId ) ;", "private void runWithJobId() {\n if (jobName.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_NAME);\n return;\n }\n if (numJobsToDelete.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_NUMBER_OF_JOBS);\n return;\n }\n if (daysOld.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_DAYS_OLD);\n return;\n }\n response.setPayload(requestDeletion(ImmutableSet.of(jobId.get()), true /* verbose */));\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<IJobQueue> getJobs() throws IOException {\n\t\tfinal String sql = \"SELECT * from jobqueue order by id\";\n\t\tList<? extends IJobQueue> result = this.queryDataList(JobQueue.class,IJobQueue.Props.class, sql);\n\t\treturn (List<IJobQueue>) result;\t\t\n\t}", "com.google.cloud.talent.v4.Job getJobs(int index);", "public void listJobExecutions() {\r\n\t\tRestCall caller = new RestCall();\r\n\t\tHttpURLConnection connection = caller.connect(endpoint + tenantId\r\n\t\t\t\t+ \"/job-executions\", null, \"GET\", token);\r\n\t\ttry {\r\n\t\t\tconnection.connect();\r\n\t\t\tSystem.out.println(caller.getResponse(connection));\r\n\t\t\tconnection.disconnect();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private Job getJobConf(String[] args) throws Exception {\n\n\t\tJobInfo jobInfo = new JobInfo() {\n\t\t\t@Override\n\t\t\tpublic Class<? extends Reducer> getCombinerClass() {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<?> getJarByClass() {\n\t\t\t\treturn TopologicalJob.class;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<? extends Mapper> getMapperClass() {\n\t\t\t\treturn TopologicalMapper.class;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<?> getOutputKeyClass() {\n\t\t\t\treturn Text.class;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<?> getOutputValueClass() {\n\t\t\t\treturn Text.class;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Class<? extends Reducer> getReducerClass() {\n\t\t\t\treturn TopologicalReducer.class;\n\t\t\t}\n\t\t};\n\t\t\n\t\treturn setupJob(\"topologicalsort\", jobInfo);\n\t}" ]
[ "0.7280945", "0.65719396", "0.6482772", "0.63717043", "0.6355916", "0.6200917", "0.6142213", "0.59366447", "0.59177667", "0.59022266", "0.5892288", "0.58914137", "0.5875291", "0.5841605", "0.5833369", "0.5811408", "0.577029", "0.5770279", "0.5768596", "0.5762732", "0.5759875", "0.57431847", "0.5739273", "0.5736028", "0.5730396", "0.5727359", "0.572683", "0.5723725", "0.5711055", "0.56872296", "0.568486", "0.5673156", "0.5651382", "0.5636305", "0.562682", "0.5624982", "0.56025136", "0.56019884", "0.5601219", "0.5592812", "0.559226", "0.5591651", "0.55904627", "0.55741537", "0.5568823", "0.55599993", "0.5550646", "0.5545767", "0.55435014", "0.55396396", "0.5533584", "0.55291355", "0.5527889", "0.5510262", "0.55093795", "0.55019855", "0.5498952", "0.54953605", "0.54944575", "0.54912084", "0.54806733", "0.54714864", "0.54699534", "0.5469104", "0.5466376", "0.54640275", "0.54610735", "0.5459568", "0.5459568", "0.5454902", "0.5448505", "0.5446735", "0.5440926", "0.54321903", "0.54317707", "0.54303145", "0.5428861", "0.5426933", "0.54236126", "0.5421293", "0.54168445", "0.541577", "0.54152966", "0.54129434", "0.5392389", "0.53875333", "0.5383742", "0.53825027", "0.5371456", "0.5367755", "0.53627294", "0.5358698", "0.5356319", "0.5355068", "0.5348322", "0.53408676", "0.533869", "0.53370225", "0.53347576", "0.5330525", "0.53269804" ]
0.0
-1
path absolute path based on live folder of a JobScheduler object.
@JsonProperty("documentation") public String getDocumentation() { return documentation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Path getAppointmentScheduleFilePath();", "public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }", "public String getLocationPath();", "public String getAbsPath();", "public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public String getPath();", "public String getPath();", "public String getPath();", "public String referenceDownloadedArchiveFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getDestinationFolder().getAbsolutePath() + File.separator + this.tomcatArchive.getName();\n }", "public String getAbsolutePath() {\n String path = null;\n if (parent != null) {\n path = parent.getAbsolutePath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"/%s\", name);\n }\n return path;\n }", "public static String sActivePath() \r\n\t{\r\n\t\tString activePath = null;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tactivePath = new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn activePath;\r\n\t}", "public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "public String resolvePath();", "public String getJobURI() {\n\t\treturn jobURI;\n\t}", "String getApplicationContextPath();", "public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}", "Path getBookingSystemFilePath();", "public String path() {\n return filesystem().pathString(path);\n }", "String folderPath();", "String getFullWorkfileName();", "public String getWorkRelativePath() {\n return getWorkRelativePath(testURL);\n }", "@Nullable String getPath();", "public String referenceTomcatInstanceFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getInstanceName() + \"-\" + getEnvironmentName() + \"-\" +this.tomcatArchive.getName();\n }", "public String getCurrentPath() {\n\t\treturn \"\";\n\t}", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "public abstract String getPath();", "public abstract String getPath();", "Path getLocation();", "Path getPath();", "public String getPath() {\n\t\treturn pfDir.getPath();\n\t}", "private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }", "public URI getAbsoluteLobFolder();", "public static String getCurrentPath() {\n File file = new File(\"\");\n return file.getAbsolutePath();\n }", "public abstract String getFullPath();", "public static Path getPathForObject(Object obj) {\r\n ReportsDirectory constant = fromObject(obj);\r\n return getTargetPath().resolve(constant.folder);\r\n }", "String path(Configuration configuration);", "public String getArchiveFolderPath()\n {\n String currentWorkingDir = SystemUtil.getWorkingDirPath()+\"/\";\n \n ConfigurationStore configStore = ConfigurationStore.getInstance();\n String archiveFolder = configStore.getProperty(IISATProperty.CATEGORY, IISATProperty.ARCHIVE_FOLDER, null);\n String absArchiveFolderPath = currentWorkingDir + archiveFolder;\n _logger.logMessage(\"getArchiveFolderPath\", null, \"Abs archive folder path is \"+absArchiveFolderPath);\n return absArchiveFolderPath;\n }", "FsPath baseDir();", "public String getFullPath()\n {\n return( fullPath );\n }", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }", "public String getFileSystemPath() {\n return getCacheDir().getAbsolutePath()\n + File.separator\n + getItemPath();\n }", "public final String getPath()\n {\n return path;\n }", "public IPath getRuntimeBaseDirectory(TomcatServer server);", "public String toPathString() {\n return path();\n }", "protected String path() {\n return path(getName());\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n }\n }", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static Path getPath() {\n\t\tPath path = Paths.get(getManagerDir(), NAME);\n\t\treturn path;\n\t}", "public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public String getResourcePath();", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }", "public static String getComplaintAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t}", "String getAbsolutePathWithinSlingHome(String relativePath);", "public Optional<URI> getCurrentSourcePath() {\r\n return context.getAssociatedPath();\r\n }", "public static String getPath() { return Objects.requireNonNull(Bukkit.getServer().getPluginManager().getPlugin(\"Catacombs\"))\n .getDataFolder().getAbsolutePath(); }", "public String getAppPathname();", "private Path getDoneAppPath(ApplicationId appId) {\n int appNum = appId.getId();\n appNum /= 1000;\n int bucket2 = appNum % 1000;\n int bucket1 = appNum / 1000;\n return new Path(doneRootPath,\n String.format(APP_DONE_DIR_PREFIX_FORMAT, appId.getClusterTimestamp(),\n bucket1, bucket2, appId.toString()));\n }", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "java.lang.String getSrcPath();", "public static String getWorkflowAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t\t\n\t}", "public String getPath()\n {\n return path;\n }", "public String getPath()\n {\n return path;\n }", "public String getRunLocation();", "public String getLaunchPath() {\n return this.LaunchPath;\n }", "String getFilepath();", "public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}", "public String getPath() {\r\n return path;\r\n }", "public String getPath() {\r\n return path;\r\n }", "public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }", "public static String findCurrentDirectory() {\n\t\tString absolutePath = new File(\"\").getAbsolutePath();\n\t return absolutePath;\n\t}", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\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 Path getPath();", "public String getPath()\n {\n\n return _path;\n }", "public String getPath(){\r\n\t\treturn path;\r\n\t}" ]
[ "0.6349114", "0.62813634", "0.61489797", "0.60409963", "0.598922", "0.578192", "0.578192", "0.578192", "0.578192", "0.578192", "0.5777166", "0.5777166", "0.5777166", "0.5774265", "0.57247037", "0.57228935", "0.5640372", "0.5615858", "0.56028205", "0.5571774", "0.5553831", "0.5543026", "0.5539474", "0.55322933", "0.5510058", "0.5503417", "0.55011916", "0.54861605", "0.5477243", "0.544795", "0.5432653", "0.5424692", "0.5417469", "0.53989834", "0.53989834", "0.53989357", "0.53867435", "0.53836226", "0.53795516", "0.53612447", "0.5360817", "0.5358017", "0.5355446", "0.53550965", "0.5341202", "0.5336415", "0.53334236", "0.5330809", "0.5326837", "0.5325512", "0.5323288", "0.53077465", "0.5297973", "0.52830255", "0.5278999", "0.5277044", "0.5272794", "0.52533644", "0.5248933", "0.52448213", "0.5240154", "0.5240154", "0.5225274", "0.5223821", "0.52186996", "0.52101904", "0.5200558", "0.51999456", "0.5199935", "0.5195813", "0.5195291", "0.5188198", "0.5187583", "0.5187583", "0.51848996", "0.5184415", "0.51751405", "0.5165312", "0.516149", "0.516149", "0.5147133", "0.51465714", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.514506", "0.51362044", "0.5131893", "0.5121798", "0.51124614" ]
0.0
-1
path absolute path based on live folder of a JobScheduler object.
@JsonProperty("documentation") public void setDocumentation(String documentation) { this.documentation = documentation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Path getAppointmentScheduleFilePath();", "public File getJobFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n String filePath = prefs.get(powerdropshipDir, null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }", "public String getLocationPath();", "public String getAbsPath();", "public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "String getPath();", "public String getPath();", "public String getPath();", "public String getPath();", "public String referenceDownloadedArchiveFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getDestinationFolder().getAbsolutePath() + File.separator + this.tomcatArchive.getName();\n }", "public String getAbsolutePath() {\n String path = null;\n if (parent != null) {\n path = parent.getAbsolutePath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"/%s\", name);\n }\n return path;\n }", "public static String sActivePath() \r\n\t{\r\n\t\tString activePath = null;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tactivePath = new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn activePath;\r\n\t}", "public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "public String resolvePath();", "public String getJobURI() {\n\t\treturn jobURI;\n\t}", "String getApplicationContextPath();", "public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}", "Path getBookingSystemFilePath();", "public String path() {\n return filesystem().pathString(path);\n }", "String folderPath();", "String getFullWorkfileName();", "public String getWorkRelativePath() {\n return getWorkRelativePath(testURL);\n }", "@Nullable String getPath();", "public String referenceTomcatInstanceFolder() {\n if (tomcatArchive == null) {\n throw new IllegalStateException(\"No Tomcat Archive has been Selected!\");\n }\n return getInstanceName() + \"-\" + getEnvironmentName() + \"-\" +this.tomcatArchive.getName();\n }", "public String getCurrentPath() {\n\t\treturn \"\";\n\t}", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "Path getLocation();", "public abstract String getPath();", "public abstract String getPath();", "Path getPath();", "public String getPath() {\n\t\treturn pfDir.getPath();\n\t}", "private String getDataPath()\n {\n Location location = Platform.getInstanceLocation();\n if (location == null) {\n return \"@none\";\n } else {\n return location.getURL().getPath();\n }\n }", "public URI getAbsoluteLobFolder();", "public static String getCurrentPath() {\n File file = new File(\"\");\n return file.getAbsolutePath();\n }", "public abstract String getFullPath();", "public static Path getPathForObject(Object obj) {\r\n ReportsDirectory constant = fromObject(obj);\r\n return getTargetPath().resolve(constant.folder);\r\n }", "String path(Configuration configuration);", "public String getArchiveFolderPath()\n {\n String currentWorkingDir = SystemUtil.getWorkingDirPath()+\"/\";\n \n ConfigurationStore configStore = ConfigurationStore.getInstance();\n String archiveFolder = configStore.getProperty(IISATProperty.CATEGORY, IISATProperty.ARCHIVE_FOLDER, null);\n String absArchiveFolderPath = currentWorkingDir + archiveFolder;\n _logger.logMessage(\"getArchiveFolderPath\", null, \"Abs archive folder path is \"+absArchiveFolderPath);\n return absArchiveFolderPath;\n }", "FsPath baseDir();", "public String getFullPath()\n {\n return( fullPath );\n }", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }", "public String getFileSystemPath() {\n return getCacheDir().getAbsolutePath()\n + File.separator\n + getItemPath();\n }", "public final String getPath()\n {\n return path;\n }", "public IPath getRuntimeBaseDirectory(TomcatServer server);", "public String toPathString() {\n return path();\n }", "protected String path() {\n return path(getName());\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n }\n }", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\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 currentPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static Path getPath() {\n\t\tPath path = Paths.get(getManagerDir(), NAME);\n\t\treturn path;\n\t}", "public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public String getResourcePath();", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }", "public static String getComplaintAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t}", "String getAbsolutePathWithinSlingHome(String relativePath);", "public Optional<URI> getCurrentSourcePath() {\r\n return context.getAssociatedPath();\r\n }", "public static String getPath() { return Objects.requireNonNull(Bukkit.getServer().getPluginManager().getPlugin(\"Catacombs\"))\n .getDataFolder().getAbsolutePath(); }", "public String getAppPathname();", "private Path getDoneAppPath(ApplicationId appId) {\n int appNum = appId.getId();\n appNum /= 1000;\n int bucket2 = appNum % 1000;\n int bucket1 = appNum / 1000;\n return new Path(doneRootPath,\n String.format(APP_DONE_DIR_PREFIX_FORMAT, appId.getClusterTimestamp(),\n bucket1, bucket2, appId.toString()));\n }", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "java.lang.String getSrcPath();", "public String getPath()\n {\n return path;\n }", "public String getPath()\n {\n return path;\n }", "public static String getWorkflowAttachmentsPath() {\n\t\treturn \"/home/ftpshared/WorkflowAttachments\";\n\t\t\n\t}", "public String getLaunchPath() {\n return this.LaunchPath;\n }", "public String getRunLocation();", "String getFilepath();", "public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}", "public String getPath() {\r\n return path;\r\n }", "public String getPath() {\r\n return path;\r\n }", "public static String findCurrentDirectory() {\n\t\tString absolutePath = new File(\"\").getAbsolutePath();\n\t return absolutePath;\n\t}", "public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\n }", "public String getPath() {\n return path;\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 Path getPath();", "public String getPath()\n {\n\n return _path;\n }", "public String getPath(){\r\n\t\treturn path;\r\n\t}" ]
[ "0.63487995", "0.6280246", "0.61490184", "0.6042232", "0.59909326", "0.5781497", "0.5781497", "0.5781497", "0.5781497", "0.5781497", "0.5777242", "0.5777242", "0.5777242", "0.5773964", "0.57259035", "0.57240355", "0.5641205", "0.56161773", "0.56043464", "0.5573436", "0.55541486", "0.55427593", "0.5538652", "0.55331963", "0.55093116", "0.55048394", "0.55004317", "0.5486195", "0.547732", "0.544773", "0.54331696", "0.5426503", "0.54182523", "0.5399074", "0.5398704", "0.5398704", "0.53863865", "0.5383867", "0.5380317", "0.5362997", "0.5362633", "0.53581554", "0.5354295", "0.5353934", "0.534123", "0.53367156", "0.5334979", "0.5331352", "0.5327678", "0.5327205", "0.5323931", "0.5307779", "0.5298364", "0.528372", "0.52808106", "0.5276086", "0.5274687", "0.52533245", "0.52482396", "0.524445", "0.5241072", "0.5241072", "0.5225654", "0.5223616", "0.5218236", "0.52116275", "0.5200518", "0.51989126", "0.51983696", "0.51979005", "0.51949704", "0.5188277", "0.5188277", "0.5188033", "0.51857245", "0.51856536", "0.5174898", "0.51652133", "0.51622605", "0.51622605", "0.5148037", "0.51478297", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5145823", "0.5135228", "0.51317453", "0.5122689", "0.51130414" ]
0.0
-1
timestamp Value is UTC timestamp in ISO 8601 YYYYMMDDThh:mm:ss.sZ or empty
@JsonProperty("configurationDate") public Date getConfigurationDate() { return configurationDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UtcT time_stamp () throws BaseException;", "@ExecFunction(name = \"utc_timestamp\", argTypes = {}, returnType = \"INT\")\n public static Expression utcTimestamp() {\n return DateTimeLiteral.fromJavaDateType(LocalDateTime.now(ZoneId.of(\"UTC+0\")));\n }", "private static ZonedDateTime toUTCDateTime(Timestamp timestamp) {\n return toInstant(timestamp).atZone(UTCZone);\n }", "public void setTimestamp(Timestamp timestamp) {\n\t\tthis.timestamp = timestamp;\n\t}", "private LocalDateTime mapTimestampToUtc(final String timestamp) {\n return LocalDateTime.ofInstant(\n Instant.from(LocalDateTime.parse(timestamp).atZone(ZoneOffset.UTC)),\n ZoneOffset.UTC);\n }", "private void setTimestamp(String timestamp){\n put(SlackParamsConstants.TIMESTAMP, timestamp);\n }", "public void setTimestamp(Integer timestamp) {\n this.timestamp = timestamp;\n }", "@Test\n public void timestampInvalidString() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.TIMESTAMP, new TextNode(\"1234567890\"));\n assertNull(retVal);\n }", "public void setTimestamp(Long timestamp) {\n this.timestamp = timestamp;\n }", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "@JsonProperty(\"timestamp\")\n public void setTimestamp(Double timestamp) {\n this.timestamp = timestamp;\n }", "public String getTimestamp()\n {\n return timestamp;\n }", "String getTimestamp();", "String getTimestamp();", "public void setTimestamp(Date timestamp) {\r\n this.timestamp = timestamp;\r\n }", "public void setTimestamp(Date timestamp) {\n this.timestamp = timestamp;\n }", "@JsProperty(name = \"timestamp\")\n public native void setTimestamp(@DoNotAutobox Number value);", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public long getTimestamp()\r\n {\r\n return safeConvertLong(getAttribute(\"timestamp\"));\r\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasTimestamp() {\n return timestamp_ != null;\n }", "private ZonedDateTime timestamp() {\n return Instant.now().atZone(ZoneId.of(\"UTC\")).minusMinutes(1);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "@JsonProperty(\"timestamp\")\n public Double getTimestamp() {\n return timestamp;\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "private LocalDateTime convertUTCTimestamp(Object timeStamp) {\n\t\t\treturn null;\n\t\t}", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public Timestamp() {}", "public long getTimestamp_() {\n return timestamp_;\n }", "@Test\n public void testTimestampColumnOptional() {\n Schema schema = Schema.newBuilder()\n .setTimestampColumn(\"timestamp\").build();\n\n Map<String, Value> map = new HashMap<>();\n map.put(\"timestamp\", Values.asTimestamp(Values.ofString(\"2019-01-30T19:30:12Z\")));\n\n PCollection<FeatureRow> output = pipeline\n .apply(Create.of(Lists.newArrayList(map)).withCoder(VALUE_MAP_CODER))\n .apply(new ValueMapToFeatureRowTransform(\"entity\", schema));\n\n PAssert.that(output).satisfies(maps -> {\n FeatureRow row = maps.iterator().next();\n assertEquals(\"entity\", row.getEntityName());\n assertEquals(map.get(\"timestamp\").getTimestampVal(), row.getEventTimestamp());\n return null;\n });\n pipeline.run();\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public DateTime timestamp() {\n\n\t\tif (timestamp == null) {\n\n\t\t\tfinal DateTimeValue dt = ProtoDateUtil.fromDecimalDateTime(message.getBaseTimeStamp());\n\n\t\t\ttimestamp = new DateTime(dt.getYear(), dt.getMonth(), dt.getDay(), dt.getHour(), dt.getMinute(),\n\t\t\t\t\tdt.getSecond(), dt.getMillis(), ISOChronology.getInstanceUTC());\n\n\t\t}\n\n\t\treturn timestamp;\n\n\t}", "public void setTimestamp(@NonNull Date timestamp) {\n this.timestamp = timestamp;\n }", "private static Date parseTimeStamp(String timestamp) {\n if (timestamp == null) {\n return null;\n }\n\n try {\n return SIMPLE_DATE_FORMAT.parse(timestamp);\n } catch (ParseException dateTimeParseException) {\n return null;\n }\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "public void setTimestamp(long value) {\r\n this.timestamp = value;\r\n }", "private Timestamp getTimestamp(String timestampString) {\r\n Timestamp timestamp;\r\n try {\r\n timestamp = SpringContext.getBean(DateTimeService.class).convertToSqlTimestamp(timestampString);\r\n }\r\n catch (ParseException e) {\r\n assertNull(\"Timestamp String was not parseable\", e);\r\n return null;\r\n }\r\n return timestamp;\r\n }", "@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "@Nullable\n default Long extractTimestamp(OUT record) {\n return null;\n }", "public Integer getTimestamp() {\n return timestamp;\n }", "Long timestamp();", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "public Long getTimestamp() {\n return timestamp;\n }", "@JsonProperty(\"timestamp\")\n public Date getTimestamp() {\n return timestamp;\n }", "@NonNull\n public Date getTimestamp() {\n return timestamp;\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public boolean hasTimestamp() {\n return timestampBuilder_ != null || timestamp_ != null;\n }", "static boolean isTimeStampValid(String timestamp) {\n return parseTimeStamp(timestamp) != null;\n }", "com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();", "com.google.protobuf.Timestamp getTimestamp();", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "static public void emitNullableTimestamp(RowEmitter outputEmitter, long value, long nullValue) {\r\n\t\tif(value != nullValue) {\r\n\t\t\tCalendar creationTimestamp = Calendar.getInstance();\r\n\t\t\tcreationTimestamp.setTimeInMillis(value);\r\n\t\t\toutputEmitter.addTimestamp(new Timestamp(\r\n\t\t\t\t\tSqlType.getType(\"timestamp with time zone\"),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.YEAR),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.MONTH)+1,\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.DAY_OF_MONTH),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.HOUR_OF_DAY),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.MINUTE),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.SECOND),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.MILLISECOND)*1000000));\r\n\t\t}\r\n\t\telse\r\n\t\t\toutputEmitter.addNull();\r\n\t}", "public static String timestampTilStrengForKalender(Timestamp timestamp) {\r\n\t\tString dato = timestamp.toString();\r\n\t\tif (dato == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tString[] datoOgKlokke = dato.split(\" \");\r\n\t\tString[] fiksdatoen = datoOgKlokke[0].split(\"-\");\r\n\t\tString str = String.join(\"-\", fiksdatoen);\r\n\t\tString finalDato = str + \"T\" + datoOgKlokke[1];\r\n\t\treturn finalDato.substring(0, 16) + \":00\";\r\n\t}", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\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 timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\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 timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public void setTimestamp(java.lang.Long value) {\n this.timestamp = value;\n }", "public void setTimestamp(java.lang.Long value) {\n this.timestamp = value;\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "@JsProperty(name = \"timestamp\")\n public native Number getTimestamp();", "public long getTimestamp() {\n return this.timestamp;\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "@Override\n public long getTimestamp() {\n return timestamp;\n }", "@Test\n public void testHiveParquetTimestampAsInt96_basic() throws Exception {\n BaseTestQuery.testBuilder().unOrdered().sqlQuery((\"SELECT convert_from(timestamp_field, 'TIMESTAMP_IMPALA') as timestamp_field \" + \"from cp.`parquet/part1/hive_all_types.parquet` \")).baselineColumns(\"timestamp_field\").baselineValues(TestBuilder.convertToLocalDateTime(\"2013-07-06 00:01:00\")).baselineValues(((Object) (null))).go();\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "private String syncTimeStamp(String timestamp){\r\n StringBuilder dateBuilder = new StringBuilder(timestamp);\r\n String time = dateBuilder.toString().split(\"T\")[1].substring(0, 8);\r\n String[] timeArr = time.split(\":\");\r\n String seconds = timeArr[2];\r\n String dd = dateBuilder.toString().split(\"T\")[0].split(\"-\")[2];\r\n String mm = dateBuilder.toString().split(\"T\")[0].split(\"-\")[1];\r\n String yyyy = dateBuilder.toString().split(\"T\")[0].split(\"-\")[0];\r\n int hour = Integer.parseInt(timeArr[0]);\r\n int minutes = Integer.parseInt(timeArr[1]);\r\n minutes += 30;\r\n hour+=5;\r\n if (minutes>=60){\r\n hour += 1;\r\n minutes -= 60;\r\n }\r\n if (hour >= 24){\r\n hour -= 24;\r\n dd = Integer.toString(Integer.parseInt(dd) + 1);\r\n if (Integer.parseInt(dd) < 10)\r\n dd = \"0\" + dd;\r\n }\r\n String minutesString;\r\n if (minutes < 10)\r\n minutesString = \"0\" + Integer.toString(minutes);\r\n else\r\n minutesString = Integer.toString(minutes);\r\n\r\n String hoursString;\r\n if (hour < 10)\r\n hoursString = \"0\" + Integer.toString(hour);\r\n else\r\n hoursString = Integer.toString(hour);\r\n String finalTime = hoursString + \":\" + minutesString + \":\" + seconds;\r\n String finalDate = dd + \"-\" + mm + \"-\" + yyyy;\r\n\r\n return (finalDate + \" \" + finalTime);\r\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public String getTimestamp() {\n Object ref = timestamp_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }" ]
[ "0.6622973", "0.65936214", "0.6524294", "0.6519672", "0.6496213", "0.64276296", "0.64187765", "0.6409378", "0.63715667", "0.6327755", "0.6327755", "0.6297599", "0.6286238", "0.62680215", "0.62680215", "0.62184757", "0.61940384", "0.61584544", "0.6108", "0.6108", "0.61059314", "0.61059314", "0.6105372", "0.6077157", "0.60747", "0.60722715", "0.60684323", "0.6060762", "0.60605687", "0.60522634", "0.60522634", "0.6052164", "0.6051165", "0.6046536", "0.6045749", "0.6045749", "0.6045749", "0.6045749", "0.6045749", "0.6045749", "0.6045749", "0.60428506", "0.6042721", "0.60397714", "0.60379905", "0.6034058", "0.60284275", "0.60258335", "0.60158986", "0.6013666", "0.60105157", "0.5997457", "0.59958816", "0.5994065", "0.5993302", "0.5971567", "0.5963706", "0.59588945", "0.5947167", "0.5941784", "0.5939834", "0.5939537", "0.5937426", "0.5937426", "0.59187716", "0.5901757", "0.58972394", "0.58952934", "0.5894379", "0.5880988", "0.5873485", "0.5870426", "0.5867801", "0.5867801", "0.5866482", "0.5866482", "0.5863015", "0.5853446", "0.5853446", "0.5850224", "0.5850224", "0.5847224", "0.5842755", "0.5838506", "0.58316123", "0.58316123", "0.58221847", "0.58213013", "0.58153963", "0.58153963", "0.5814604", "0.58056325", "0.5804327", "0.5804327", "0.5804327", "0.5804327", "0.5804327", "0.5804327", "0.5804327", "0.5804327", "0.57968926" ]
0.0
-1
timestamp Value is UTC timestamp in ISO 8601 YYYYMMDDThh:mm:ss.sZ or empty
@JsonProperty("configurationDate") public void setConfigurationDate(Date configurationDate) { this.configurationDate = configurationDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UtcT time_stamp () throws BaseException;", "@ExecFunction(name = \"utc_timestamp\", argTypes = {}, returnType = \"INT\")\n public static Expression utcTimestamp() {\n return DateTimeLiteral.fromJavaDateType(LocalDateTime.now(ZoneId.of(\"UTC+0\")));\n }", "private static ZonedDateTime toUTCDateTime(Timestamp timestamp) {\n return toInstant(timestamp).atZone(UTCZone);\n }", "public void setTimestamp(Timestamp timestamp) {\n\t\tthis.timestamp = timestamp;\n\t}", "private LocalDateTime mapTimestampToUtc(final String timestamp) {\n return LocalDateTime.ofInstant(\n Instant.from(LocalDateTime.parse(timestamp).atZone(ZoneOffset.UTC)),\n ZoneOffset.UTC);\n }", "private void setTimestamp(String timestamp){\n put(SlackParamsConstants.TIMESTAMP, timestamp);\n }", "public void setTimestamp(Integer timestamp) {\n this.timestamp = timestamp;\n }", "@Test\n public void timestampInvalidString() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.TIMESTAMP, new TextNode(\"1234567890\"));\n assertNull(retVal);\n }", "public void setTimestamp(Long timestamp) {\n this.timestamp = timestamp;\n }", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "@JsonProperty(\"timestamp\")\n public void setTimestamp(Double timestamp) {\n this.timestamp = timestamp;\n }", "public String getTimestamp()\n {\n return timestamp;\n }", "String getTimestamp();", "String getTimestamp();", "public void setTimestamp(Date timestamp) {\r\n this.timestamp = timestamp;\r\n }", "public void setTimestamp(Date timestamp) {\n this.timestamp = timestamp;\n }", "@JsProperty(name = \"timestamp\")\n public native void setTimestamp(@DoNotAutobox Number value);", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public long getTimestamp()\r\n {\r\n return safeConvertLong(getAttribute(\"timestamp\"));\r\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasTimestamp() {\n return timestamp_ != null;\n }", "private ZonedDateTime timestamp() {\n return Instant.now().atZone(ZoneId.of(\"UTC\")).minusMinutes(1);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "@JsonProperty(\"timestamp\")\n public Double getTimestamp() {\n return timestamp;\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "private LocalDateTime convertUTCTimestamp(Object timeStamp) {\n\t\t\treturn null;\n\t\t}", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "public Timestamp() {}", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long getTimestamp_() {\n return timestamp_;\n }", "@Test\n public void testTimestampColumnOptional() {\n Schema schema = Schema.newBuilder()\n .setTimestampColumn(\"timestamp\").build();\n\n Map<String, Value> map = new HashMap<>();\n map.put(\"timestamp\", Values.asTimestamp(Values.ofString(\"2019-01-30T19:30:12Z\")));\n\n PCollection<FeatureRow> output = pipeline\n .apply(Create.of(Lists.newArrayList(map)).withCoder(VALUE_MAP_CODER))\n .apply(new ValueMapToFeatureRowTransform(\"entity\", schema));\n\n PAssert.that(output).satisfies(maps -> {\n FeatureRow row = maps.iterator().next();\n assertEquals(\"entity\", row.getEntityName());\n assertEquals(map.get(\"timestamp\").getTimestampVal(), row.getEventTimestamp());\n return null;\n });\n pipeline.run();\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public DateTime timestamp() {\n\n\t\tif (timestamp == null) {\n\n\t\t\tfinal DateTimeValue dt = ProtoDateUtil.fromDecimalDateTime(message.getBaseTimeStamp());\n\n\t\t\ttimestamp = new DateTime(dt.getYear(), dt.getMonth(), dt.getDay(), dt.getHour(), dt.getMinute(),\n\t\t\t\t\tdt.getSecond(), dt.getMillis(), ISOChronology.getInstanceUTC());\n\n\t\t}\n\n\t\treturn timestamp;\n\n\t}", "public void setTimestamp(@NonNull Date timestamp) {\n this.timestamp = timestamp;\n }", "private static Date parseTimeStamp(String timestamp) {\n if (timestamp == null) {\n return null;\n }\n\n try {\n return SIMPLE_DATE_FORMAT.parse(timestamp);\n } catch (ParseException dateTimeParseException) {\n return null;\n }\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "public void setTimestamp(long value) {\r\n this.timestamp = value;\r\n }", "private Timestamp getTimestamp(String timestampString) {\r\n Timestamp timestamp;\r\n try {\r\n timestamp = SpringContext.getBean(DateTimeService.class).convertToSqlTimestamp(timestampString);\r\n }\r\n catch (ParseException e) {\r\n assertNull(\"Timestamp String was not parseable\", e);\r\n return null;\r\n }\r\n return timestamp;\r\n }", "@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "@Nullable\n default Long extractTimestamp(OUT record) {\n return null;\n }", "public Integer getTimestamp() {\n return timestamp;\n }", "Long timestamp();", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "public Long getTimestamp() {\n return timestamp;\n }", "@JsonProperty(\"timestamp\")\n public Date getTimestamp() {\n return timestamp;\n }", "@NonNull\n public Date getTimestamp() {\n return timestamp;\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public boolean hasTimestamp() {\n return timestampBuilder_ != null || timestamp_ != null;\n }", "static boolean isTimeStampValid(String timestamp) {\n return parseTimeStamp(timestamp) != null;\n }", "com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();", "com.google.protobuf.Timestamp getTimestamp();", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "static public void emitNullableTimestamp(RowEmitter outputEmitter, long value, long nullValue) {\r\n\t\tif(value != nullValue) {\r\n\t\t\tCalendar creationTimestamp = Calendar.getInstance();\r\n\t\t\tcreationTimestamp.setTimeInMillis(value);\r\n\t\t\toutputEmitter.addTimestamp(new Timestamp(\r\n\t\t\t\t\tSqlType.getType(\"timestamp with time zone\"),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.YEAR),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.MONTH)+1,\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.DAY_OF_MONTH),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.HOUR_OF_DAY),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.MINUTE),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.SECOND),\r\n\t\t\t\t\tcreationTimestamp.get(Calendar.MILLISECOND)*1000000));\r\n\t\t}\r\n\t\telse\r\n\t\t\toutputEmitter.addNull();\r\n\t}", "public static String timestampTilStrengForKalender(Timestamp timestamp) {\r\n\t\tString dato = timestamp.toString();\r\n\t\tif (dato == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tString[] datoOgKlokke = dato.split(\" \");\r\n\t\tString[] fiksdatoen = datoOgKlokke[0].split(\"-\");\r\n\t\tString str = String.join(\"-\", fiksdatoen);\r\n\t\tString finalDato = str + \"T\" + datoOgKlokke[1];\r\n\t\treturn finalDato.substring(0, 16) + \":00\";\r\n\t}", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\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 timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\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 timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public void setTimestamp(java.lang.Long value) {\n this.timestamp = value;\n }", "public void setTimestamp(java.lang.Long value) {\n this.timestamp = value;\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "@JsProperty(name = \"timestamp\")\n public native Number getTimestamp();", "public long getTimestamp() {\n return this.timestamp;\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "@Override\n public long getTimestamp() {\n return timestamp;\n }", "@Test\n public void testHiveParquetTimestampAsInt96_basic() throws Exception {\n BaseTestQuery.testBuilder().unOrdered().sqlQuery((\"SELECT convert_from(timestamp_field, 'TIMESTAMP_IMPALA') as timestamp_field \" + \"from cp.`parquet/part1/hive_all_types.parquet` \")).baselineColumns(\"timestamp_field\").baselineValues(TestBuilder.convertToLocalDateTime(\"2013-07-06 00:01:00\")).baselineValues(((Object) (null))).go();\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "private String syncTimeStamp(String timestamp){\r\n StringBuilder dateBuilder = new StringBuilder(timestamp);\r\n String time = dateBuilder.toString().split(\"T\")[1].substring(0, 8);\r\n String[] timeArr = time.split(\":\");\r\n String seconds = timeArr[2];\r\n String dd = dateBuilder.toString().split(\"T\")[0].split(\"-\")[2];\r\n String mm = dateBuilder.toString().split(\"T\")[0].split(\"-\")[1];\r\n String yyyy = dateBuilder.toString().split(\"T\")[0].split(\"-\")[0];\r\n int hour = Integer.parseInt(timeArr[0]);\r\n int minutes = Integer.parseInt(timeArr[1]);\r\n minutes += 30;\r\n hour+=5;\r\n if (minutes>=60){\r\n hour += 1;\r\n minutes -= 60;\r\n }\r\n if (hour >= 24){\r\n hour -= 24;\r\n dd = Integer.toString(Integer.parseInt(dd) + 1);\r\n if (Integer.parseInt(dd) < 10)\r\n dd = \"0\" + dd;\r\n }\r\n String minutesString;\r\n if (minutes < 10)\r\n minutesString = \"0\" + Integer.toString(minutes);\r\n else\r\n minutesString = Integer.toString(minutes);\r\n\r\n String hoursString;\r\n if (hour < 10)\r\n hoursString = \"0\" + Integer.toString(hour);\r\n else\r\n hoursString = Integer.toString(hour);\r\n String finalTime = hoursString + \":\" + minutesString + \":\" + seconds;\r\n String finalDate = dd + \"-\" + mm + \"-\" + yyyy;\r\n\r\n return (finalDate + \" \" + finalTime);\r\n }", "public com.google.protobuf.ByteString\n getTimestampBytes() {\n Object ref = timestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n timestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public String getTimestamp() {\n Object ref = timestamp_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }" ]
[ "0.6624212", "0.6593925", "0.652477", "0.6521898", "0.64959556", "0.64292264", "0.64203656", "0.6409464", "0.6373137", "0.6329702", "0.6329702", "0.62975276", "0.6288404", "0.62697685", "0.62697685", "0.62215257", "0.619706", "0.61587834", "0.610923", "0.610923", "0.61075807", "0.61075807", "0.6106232", "0.60783803", "0.6077437", "0.60734713", "0.60695004", "0.6062022", "0.606109", "0.6053526", "0.6053526", "0.60532403", "0.6053134", "0.60477185", "0.60472614", "0.60472614", "0.60472614", "0.60472614", "0.60472614", "0.60472614", "0.60472614", "0.6045169", "0.6043518", "0.6042034", "0.60390586", "0.6035266", "0.60302126", "0.6029258", "0.6018186", "0.6014859", "0.6011765", "0.5999308", "0.59981227", "0.59952843", "0.5994861", "0.59728926", "0.5964466", "0.5961138", "0.5948883", "0.59430945", "0.5942747", "0.59412396", "0.59390455", "0.59390455", "0.5920959", "0.59033406", "0.5898319", "0.5896502", "0.58962613", "0.58832306", "0.5875829", "0.5872624", "0.586957", "0.586957", "0.5868693", "0.5868693", "0.5865229", "0.5854435", "0.5854435", "0.58524245", "0.58524245", "0.584913", "0.5844623", "0.5838758", "0.5833474", "0.5833474", "0.58243805", "0.5823227", "0.5817229", "0.5817229", "0.5816516", "0.58073026", "0.5806521", "0.5806521", "0.5806521", "0.5806521", "0.5806521", "0.5806521", "0.5806521", "0.5806521", "0.5798452" ]
0.0
-1
This method will return roles of given user.
@Override public List<LdapGranntedAuthority> getUserAuthorities(String userName) { AndFilter groupFilter = new AndFilter(); groupFilter.and(new EqualsFilter("objectclass","groupOfNames")); groupFilter.and(new EqualsFilter("member","uid="+userName+",ou=users,o=packtPublisher")); List<LdapGranntedAuthority> userRoleLst = ldapTemplate.search(LdapQueryBuilder.query().filter(groupFilter),new LdapRoleMapper()); return userRoleLst; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<SysRole> getUserRoles(int userId);", "public List<SecRole> getRolesByUser(SecUser aUser);", "public List<String> getRoles(String userId) throws UserManagementException;", "@Override\r\n\tpublic List<Role> getUserRoles(String userId) {\n\t\treturn userMapper.getRoles(userId);\r\n\t}", "@OneToMany(mappedBy = \"user\", fetch = FetchType.LAZY)\n\t@Fetch(FetchMode.SELECT)\n\tpublic List<UserRole> getUserRoles() {\n\t\treturn userRoles;\n\t}", "List<Role> getRoles();", "public UserRole getRole(User user) {\n\t UserRole role = user.getRole();\n return role;\n\t}", "Collection<Role> getRoles();", "@PermitAll\n @Override\n public List<Role> getCurrentUserRoles() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_QUERY, Role.QUERY_GET_ROLES_BY_USER_NAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntityList(Role.class, params);\n }", "List<String> getRoles();", "@Override\n\tpublic Set<String> getRoles(String username) {\n\t\tSet<String> roles = userDao.getRoles(username);\n\t\treturn roles;\n\t}", "public Role getUserRole(Users user) {\r\n Role userRole = em.find(Role.class, user.getRole().getId());\r\n if (userRole != null) {\r\n return userRole;\r\n } else {\r\n return null;\r\n }\r\n\r\n }", "public Set<String> getUserRoles() {\n\t\treturn userRoles;\n\t}", "@Override\n public List<Role> getRoleByUser(String userId, int type) {\n StringBuilder vstrSql = new StringBuilder(\"select r.role_id as roleId, r.role_code as roleCode, r.role_name as roleName,r.description as description\");\n vstrSql.append(\" from roles r\");\n if (type == 1) {\n vstrSql.append(\" where r.role_id in (select ur.role_id from user_role ur where ur.user_id = :userId and ur.status = 1)\");\n } else {\n vstrSql.append(\" where r.role_id not in (select ur.role_id from user_role ur where ur.user_id = :userId and ur.status = 1)\");\n }\n vstrSql.append(\" and r.status <> 0\");\n Query query = getCurrentSession()\n .createSQLQuery(vstrSql.toString())\n .addScalar(\"roleId\", StandardBasicTypes.LONG)\n .addScalar(\"roleCode\", StandardBasicTypes.STRING)\n .addScalar(\"roleName\", StandardBasicTypes.STRING)\n .addScalar(\"description\", StandardBasicTypes.STRING)\n .setResultTransformer(\n Transformers.aliasToBean(Role.class));\n query.setParameter(\"userId\", userId);\n return (List<Role>) query.list();\n }", "@Transient\n public List<LabelValue> getRoleList() {\n List<LabelValue> userRoles = new ArrayList<LabelValue>();\n\n if (this.roles != null) {\n for (Role role : roles) {\n // convert the user's roles to LabelValue Objects\n userRoles.add(new LabelValue(role.getName().substring(5), role.getName()));\n }\n }\n\n return userRoles;\n }", "public static Stream<RoleModel> getAllUserRolesStream(UserModel user) {\n return Stream.concat(\n user.getRoleMappings().stream(),\n user.getGroups().stream()\n .flatMap(g -> groupAndItsParentsStream(g))\n .flatMap(g -> g.getRoleMappings().stream()))\n .flatMap(RoleUtils::expandCompositeRolesStream);\n }", "protected abstract Collection<String> getGroupsOrRoles(User user);", "public List<TbRole> getTbRoleListByTypeId(Integer userTypeId) {\n\t\treturn tbRoleDao.getAllObjectListByType(userTypeId);\n\t}", "public List<Role> getAllRoles();", "public List<SecRole> getAllRoles();", "java.util.List<Role>\n getRolesList();", "java.util.List<Role>\n getRolesList();", "@Override\n\tpublic List<AccountUser> getRoles() {\n\t\treturn auMapper.getRoles();\n\t}", "public List<UserRole> getAllUserRoles() throws ClassNotFoundException, SQLException {\n\t\treturn read(\"select * from user_role\", null);\n\t}", "private String getUserRoleListQuery() throws APIManagementException {\n StringBuilder rolesQuery = new StringBuilder();\n rolesQuery.append('(');\n rolesQuery.append(APIConstants.NULL_USER_ROLE_LIST);\n String[] userRoles = APIUtil.getListOfRoles(userNameWithoutChange);\n String skipRolesByRegex = APIUtil.getSkipRolesByRegex();\n if (StringUtils.isNotEmpty(skipRolesByRegex)) {\n List<String> filteredUserRoles = new ArrayList<>(Arrays.asList(userRoles));\n String[] regexList = skipRolesByRegex.split(\",\");\n for (int i = 0; i < regexList.length; i++) {\n Pattern p = Pattern.compile(regexList[i]);\n Iterator<String> itr = filteredUserRoles.iterator();\n while(itr.hasNext()) {\n String role = itr.next();\n Matcher m = p.matcher(role);\n if (m.matches()) {\n itr.remove();\n }\n }\n }\n userRoles = filteredUserRoles.toArray(new String[0]);\n }\n if (userRoles != null) {\n for (String userRole : userRoles) {\n rolesQuery.append(\" OR \");\n rolesQuery.append(ClientUtils.escapeQueryChars(APIUtil.sanitizeUserRole(userRole.toLowerCase())));\n }\n }\n rolesQuery.append(\")\");\n if(log.isDebugEnabled()) {\n \tlog.debug(\"User role list solr query \" + APIConstants.PUBLISHER_ROLES + \"=\" + rolesQuery.toString());\n }\n return APIConstants.PUBLISHER_ROLES + \"=\" + rolesQuery.toString();\n }", "public List<Role> getRole() {\n\t\treturn userDao.getRole();\r\n\t}", "public SPResponse getRolesWithoutPortrait(User user) {\n final SPResponse resp = new SPResponse();\n \n return resp.add(MODULE_NAME + \"List\", factory.getRolesWithoutPortrait(user));\n }", "@NotNull\r\n Collection<String> getRoles();", "List<RoleEntity> getSystemRoles();", "public abstract Collection getRoles();", "public List<UserRole> queryAllUsersRoles() {\n \tList<UserRole> userRoleList = new ArrayList<>();\n\tUserRole userRole;\n String sql = \"SELECT * FROM users_roles\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuserRole = new UserRole();\n userRole.setUserName(this.resultSet.getString(\"user_name\"));\n userRole.setRoleName(this.resultSet.getString(\"role_name\"));\n\t\tuserRoleList.add(userRole);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userRoleList;\n }", "public String getRole(UserItem user) {\n String role = null;\n if (getPrimaryInvestigator() != null && getPrimaryInvestigator().equals(user)) {\n role = AccessRequestHistoryItem.ACCESS_REQUEST_ROLE_PI;\n } else if (getDataProvider() != null && getDataProvider().equals(user)) {\n role = AccessRequestHistoryItem.ACCESS_REQUEST_ROLE_DP;\n } else if (user.getAdminFlag()) {\n role = AccessRequestHistoryItem.ACCESS_REQUEST_ROLE_ADMIN;\n } else {\n role = AccessRequestHistoryItem.ACCESS_REQUEST_ROLE_REQUESTOR;\n }\n return role;\n }", "private List<GrantedAuthority> getGrantedAuthorities(User user) {\n List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();\n\n authorities.add(new SimpleGrantedAuthority(user.getRole()));\n\n return authorities;\n }", "List<Campaign.Role> getUserCampaignRoles(String username, String campaignId)\n\t\tthrows DataAccessException;", "Set<String> getRoles();", "public List<UserRole> queryUserRole(String userName) {\n List<UserRole> userRoleList = new ArrayList<>();\n \tUserRole userRoleResult;\n String sql = \"SELECT * FROM users_roles WHERE user_name = ?\";\n\ttry {\n this.statement = connection.prepareStatement(sql);\n this.statement.setString(1, userName);\n this.resultSet = this.statement.executeQuery();\n\n while(this.resultSet.next()){\n userRoleResult = new UserRole(); \n\t\tuserRoleResult.setUserName(this.resultSet.getString(\"user_name\"));\n userRoleResult.setRoleName(this.resultSet.getString(\"role_name\"));\n userRoleList.add(userRoleResult);\n }\n statement.close();\n }\n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n\treturn userRoleList;\n }", "Set getRoles();", "public static Set<GrantedAuthority> getAuthorities(com.xinra.growthlectures.entity.User user) {\n return user.getRole().getTransitiveRoles().stream()\n .map(Role::toString)\n .map(SimpleGrantedAuthority::new)\n .collect(ImmutableSet.toImmutableSet());\n }", "List<Rol> obtenerRoles() throws Exception;", "@Override\n\tpublic List<IRole> getRoles() {\n\t\treturn getInnerObject().getRoles();\n\t}", "public RoleList getRoles() {\n return roleList;\n }", "public String getRoles() {\n return roles;\n }", "public java.util.List<Role> getRolesList() {\n if (rolesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(roles_);\n } else {\n return rolesBuilder_.getMessageList();\n }\n }", "public java.util.List<Role> getRolesList() {\n if (rolesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(roles_);\n } else {\n return rolesBuilder_.getMessageList();\n }\n }", "public List<User> getUsersByRole(Role role);", "public Collection<Role> getRoles() {\n return this.roles;\n }", "public Set<String> getRoles()\n {\n return this.roles;\n }", "Set<String> getRoles(String id) throws ServerException, NotFoundException {\n InitialLdapContext context = null;\n NamingEnumeration rolesEnum = null;\n try {\n context = contextFactory.createContext();\n\n Attributes userAttrs;\n try {\n userAttrs = context.getAttributes(formatDn(userDn, id));\n } catch (NameNotFoundException ex) {\n //if not found -> try to find user using old dn\n userAttrs = context.getAttributes(formatDn(oldUserDn, id));\n\n //if attributes were found then rename current entity\n final String fromDnVal = userAttrs.get(oldUserDn).get().toString();\n final String toDnVal = userAttrs.get(userDn).get().toString();\n context.rename(formatDn(oldUserDn, fromDnVal), formatDn(userDn, toDnVal));\n }\n final Attribute rolesAttr = userAttrs.get(roleAttrName);\n final Set<String> roles = new HashSet<>();\n if (rolesAttr != null) {\n rolesEnum = rolesAttr.getAll();\n while (rolesEnum.hasMoreElements()) {\n roles.add(rolesEnum.next().toString());\n }\n }\n return roles;\n } catch (NameNotFoundException nfEx) {\n throw new NotFoundException(format(\"User with id '%s' was not found\", id));\n } catch (NamingException e) {\n throw new ServerException(e.getMessage(), e);\n } finally {\n close(context);\n close(rolesEnum);\n }\n }", "public ArrayList<Role> getRoles()\r\n {\r\n return this.securityInfo.getRoles();\r\n }", "public String[] getAllUserIdsOfUserRole(int userRoleId)\n throws AdminPersistenceException {\n return (String[]) getIds(SELECT_ALL_USER_IDS_IN_USERROLE, userRoleId)\n .toArray(new String[0]);\n }", "public final String getRoles() {\n return roles;\n }", "@Override\r\n\tpublic List<? extends Role> getRoles() {\n\r\n\t\tif (this.roles == null)\r\n\t\t\treturn null;\r\n\r\n\t\treturn new ArrayList(this.roles);\r\n\t\t// ArrayList<MyRole> arrayList = new ArrayList<MyRole>();\r\n\t\t// arrayList.addAll(roles);\r\n\t\t//\r\n\t\t// return arrayList;\r\n\t}", "public List<RoleDto> getRolesList() {\n return roleDBManager.fetchRolesList();\n }", "Role getRoles(int index);", "Role getRoles(int index);", "@PermitAll\n @Override\n public List<Role> getRoles() {\n return getRepository().getEntityList(Role.class);\n }", "public List getSysRoles(SysRole sysRole);", "public Roles roles() {\n return this.roles;\n }", "@Override\n public java.util.List<Role> getRolesList() {\n return roles_;\n }", "@Override\n public java.util.List<Role> getRolesList() {\n return roles_;\n }", "public Userrole getUserrole() {\n return getEntity();\n }", "@RequestMapping(value = \"/getUserRole/{userEmail}\", method = RequestMethod.GET)\n @Secured({})\n public ResponseEntity<User.ROLES> getUserRole(@PathVariable String userEmail){\n User user = userRepository.findByEmail(userEmail);\n if (user != null) {\n return ResponseEntity.ok(user.getRoles());\n } else {\n return ResponseEntity.notFound().build();\n }\n }", "@Override\r\n\tpublic Object getRoles() throws DataAccessException, SQLException {\n\t\tlogger.info(\"start : getRoles UsersMngDaoImpl \");\r\n\t\t \r\n\t\tList<Roles> roleList = roleRepository.findAll();\r\n\t\tlogger.info(\"End : getRoles UsersMngDaoImpl \");\r\n\t\treturn roleList;\r\n\t}", "public String getRoles() throws IOException {\n\t\treturn rolePoster.sendPost(\"getRoles=true\");\n\t}", "public Set<SimpleGrantedAuthority> getGrantedAuthorities(ClpUserDTO user) {\n\n\t\tSet<SimpleGrantedAuthority> authorities = new HashSet<SimpleGrantedAuthority>();\n\t\t\n\t\tuser.getGroups().stream().forEach(group -> \n\t\t{\n\t\t\tgroup.getRoles().stream().forEach(role -> \n\t\t\t{\n\t\t\t\trole.getPermissions().stream().forEach(permission -> \n\t\t\t\t{\n\t\t\t\t\tauthorities.add(new SimpleGrantedAuthority(permission.getPermissionName()));\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t\t\n\t\treturn authorities;\n\t}", "@Override\r\n public List<Role> getRoles() {\r\n return roles;\r\n }", "List<User_Role> selectAll();", "public Collection<Role> getRoles() {\n return Collections.unmodifiableCollection(roles);\n }", "public Iterable<Role> findAllRoles() {\n Iterable<Role> allRoles = roleRepository.findAll();\n return allRoles;\n }", "public Collection<String> getRoles() {\n return Collections.unmodifiableSet(roles);\n }", "public java.lang.String getUserRole() {\r\n return userRole;\r\n }", "java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList();", "java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList();", "public Integer RoleByUser(Integer id) {\n\t\treturn userDao.RoleByUser(id);\r\n\t}", "public List<Roles> selectAllRole(){\n\treturn rolesDao.findAll();\n\t}", "public Set<DistributionRole> getUserRoles() {\n\t\treturn this.distributionRoles;\n\t}", "public java.util.List<xbean.DeletedRole> getRoles();", "public List<RoleDTO> getAllRoles() {\n\t\treturn roleDTOs;\n\t}", "public String[] getDirectUserIdsOfUserRole(int userRoleId)\n throws AdminPersistenceException {\n return (String[]) getIds(SELECT_USER_IDS_IN_USERROLE, userRoleId).toArray(\n new String[0]);\n }", "public java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList() {\n if (rolesBuilder_ != null) {\n return rolesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(roles_);\n }\n }", "public java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList() {\n if (rolesBuilder_ != null) {\n return rolesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(roles_);\n }\n }", "@Override\n\tpublic List<VUserRoles> getUserRoleList(String vcAccount,String qUserName,\n\t\t\tInteger offset, Integer pageSize,Integer cFlag) {\n\t\tStringBuffer hql = new StringBuffer();\n\t\thql.append(\" select * from v_user_roles h where 1=1 \");\n\t\tif (qUserName != null && !qUserName.equals(\"\")) {\n\t\t\thql.append(\" and h.vcName like '%\" + qUserName + \"%' \");\n\t\t}\n\t\tif (vcAccount != null && !vcAccount.equals(\"\")) {\n\t\t\thql.append(\" and h.vcAccount like '%\" + vcAccount + \"%' \");\n\t\t}\n\t\tif (cFlag != null && cFlag!=99) {\n\t\t\thql.append(\" and h.cFlag =\"+cFlag+\" \");\n\t\t}\n\t\thql.append(\" order by h.vcEmployeeId \");\n\t\tQuery query = sessionFactory.getCurrentSession().createSQLQuery(hql.toString());\n\t\tif(offset !=null && pageSize != null){\n\t\t\tquery.setFirstResult(offset);\n\t\t\tquery.setMaxResults(pageSize);\n\t\t}\n\t\tList<VUserRoles> result = new ArrayList<VUserRoles>();\n\t\tList<Object[]> tempResult = query.list();\n\t\tfor(int i = 0; i < tempResult.size(); i++ ){\n\t\t\tObject[] tempObj = tempResult.get(i);\n\t\t\tVUserRoles entity = new VUserRoles();\n\t\t\tentity.setId(tempObj[0]==null?\"\":tempObj[0].toString());\n\t\t\tentity.setVcEmployeeID(tempObj[1]==null?\"\":tempObj[1].toString());\n\t\t\tentity.setVcName(tempObj[2]==null?\"\":tempObj[2].toString());\n\t\t\tentity.setVcFullName(tempObj[3]==null?\"\":tempObj[3].toString());\n\t\t\tentity.setVcAccount(tempObj[4]==null?\"\":tempObj[4].toString());\n\t\t\tentity.setRoleIds(tempObj[5]==null?\"\":tempObj[5].toString());\n\t\t\tentity.setRoleNames(tempObj[6]==null?\"\":tempObj[6].toString());\n\t\t\tentity.setcFlag(tempObj[7]==null?99:Integer.parseInt(tempObj[7].toString()));\n\t\t\tresult.add(entity);\n\t\t}\n\t\treturn result;\n\t}", "public List<Role> getRoleList(Integer from, Integer pageSize) {\n\t\treturn userDao.getRoleList(from, pageSize);\r\n\t}", "@Override\n\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\t final List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();\n\t for (final Role role : user.getRoles()){\n\t authorities.add(new SimpleGrantedAuthority(role.getRole()));\n\t }\n\t return authorities;\n\t}", "private UserFormData getRoles(final Long userId, final Boolean checkcheckAccess) {\n\t\tif (checkcheckAccess && !ACCESS.check(new ReadUserPermission(userId))) {\n\t\t\tthis.throwAuthorizationFailed();\n\t\t}\n\t\tfinal UserFormData formDataRoles = new UserFormData();\n\t\tformDataRoles.getUserId().setValue(userId);\n\t\tSQL.selectInto(SQLs.USER_ROLE_SELECT_ROLE_ID + SQLs.USER_ROLE_SELECT_FILTER_USER + SQLs.USER_SELECT_INTO_ROLES,\n\t\t\t\tformDataRoles);\n\t\treturn formDataRoles;\n\t}", "public SPResponse getUserRolesAndMatch(User user, Object[] params) {\n final SPResponse resp = new SPResponse();\n \n String userId = (String) params[0];\n Assert.hasText(userId, \"User id required.\");\n \n return resp.add(MODULE_NAME + \"AndMatch\", factory.getUserRoleMatch(userId));\n }", "public List<Role> getAllRole() {\n\t\treturn (List<Role>) roleDao.findAll();\n\t}", "void resolveRoles(UserData user, ActionListener<Set<String>> listener);", "public List<SecRole> getRolesLikeRoleName(String aRoleName);", "@RequestMapping(value = \"/roles\", method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE})\n @ResponseBody\n public List<Role> getRoles() {\n List<Role> roleList = (List<Role>)roleService.getAll();\n if (roleList.isEmpty()){\n return null;\n }\n return roleList;\n }", "public ArrayList<Role> allRoles() {\n return this.roles;\n }", "@Override\n public Collection<? extends GrantedAuthority> getAuthorities() {\n List<GrantedAuthority> grantedAuthorityList = new ArrayList<>();\n //make a List of the roles\n List<Role> userRoles = user.getRoles();\n //add each role to the grantedAuthorityList\n for (Role role: userRoles) {\n grantedAuthorityList.add(new SimpleGrantedAuthority(role.getName()));\n }\n // then return grantedAuthority instances\n return grantedAuthorityList;\n }", "@Override\n\tpublic Role getRoleByuserId(int userId) {\n\t\treturn this.RoleDao.selectByPrimaryKey(userId);\n\t}", "@Override\n\tpublic List<HashMap<String, Object>> findRoleUser(XtParmas parmas) {\n\t\treturn roleMapper.findRoleUser(parmas);\n\t}", "Set<Authority> getAuthorities(User user);", "public NamedValue[] getUserRoleLabels() {\r\n if (userRoleLabels == null) {\r\n String lang = getLanguage();\r\n Role[] roles = processModel.getRoles();\r\n \r\n List<NamedValue> labels = new ArrayList<NamedValue>();\r\n NamedValue label;\r\n \r\n // quadratic search ! but it's ok : the list are about 3 or 4 length.\r\n for (int i = 0; i < userRoles.length; i++) {\r\n if (userRoles[i].equals(\"supervisor\")) {\r\n label = new NamedValue(\"supervisor\",\r\n getString(\"processManager.supervisor\"));\r\n labels.add(label);\r\n }\r\n \r\n else\r\n for (int j = 0; j < roles.length; j++) {\r\n if (userRoles[i].equals(roles[j].getName())) {\r\n label = new NamedValue(userRoles[i], roles[j].getLabel(\r\n currentRole, lang));\r\n labels.add(label);\r\n }\r\n }\r\n }\r\n \r\n Collections.sort(labels, NamedValue.ascendingValues);\r\n userRoleLabels = labels.toArray(new NamedValue[0]);\r\n }\r\n \r\n return userRoleLabels;\r\n }", "@Override\n public java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList() {\n return roles_;\n }", "@Override\n public java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList() {\n return roles_;\n }", "public EntityImpl getRoles() {\n return (EntityImpl)getEntity(ENTITY_ROLES);\n }", "@Override\n\tpublic List<InforRoles> selectRoles() {\n\t\treturn md.selectRoles();\n\t}", "@Override\r\n\tpublic List<Role> getAllRoles() {\n\t\treturn null;\r\n\t}" ]
[ "0.7713926", "0.754339", "0.754056", "0.74728024", "0.7085622", "0.70705765", "0.70274967", "0.699822", "0.6968087", "0.6915042", "0.6910345", "0.6862887", "0.6858925", "0.6856216", "0.682739", "0.6818166", "0.6815415", "0.6773381", "0.6749988", "0.6727175", "0.6722643", "0.6722643", "0.6654988", "0.6649794", "0.6640591", "0.6603769", "0.65886474", "0.65601677", "0.6539192", "0.6524268", "0.65138805", "0.6456059", "0.6428324", "0.64236736", "0.6418785", "0.6394779", "0.639428", "0.6346118", "0.63314354", "0.6314493", "0.6307085", "0.62972516", "0.62769055", "0.62769055", "0.6275879", "0.62601393", "0.62557757", "0.62512803", "0.6239402", "0.6237928", "0.6233393", "0.6218484", "0.6186561", "0.6184311", "0.6184311", "0.61673605", "0.61336684", "0.6123718", "0.6093406", "0.6093406", "0.6088048", "0.6076945", "0.6071504", "0.60683906", "0.60499114", "0.6035831", "0.6033945", "0.60311437", "0.60194945", "0.6001361", "0.5993547", "0.599216", "0.599216", "0.5983477", "0.5970422", "0.59667045", "0.5966356", "0.5964592", "0.59571856", "0.5947196", "0.5947196", "0.59350246", "0.5933314", "0.59300673", "0.5920852", "0.59161735", "0.5911464", "0.590136", "0.5900759", "0.5890019", "0.5889795", "0.58574957", "0.58479327", "0.5827112", "0.5827094", "0.5813482", "0.58112246", "0.58112246", "0.5810541", "0.5810507", "0.5808123" ]
0.0
-1
Constructs a default card object.
public PlayingCard(){ super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card () {}", "public CardGameFramework()\n {\n this(1, 0, 0, null, 4, 13);\n }", "public CardGameFramework() {\n this(1, 0, 0, null, 4, 13);\n }", "public card(){\n\t\tname = \"blank\";\n\t\ttype = \"blank\";\n\t\tcost = 0;\n\t\tgold = 0;\n\t\tvictory_points = 0;\n\t\taction = 0;\n\t\tbuy = 0;\n\t\tcard= 0;\n\t\tattack = false;\n\t}", "public Card()\n {}", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }", "public Card() { this(12, 3); }", "public Card() {\n this(new Random().nextInt(54));\n establishHierarchicalValue();\n }", "Cards(String cardName, String cardDes, int ataque, int defensa) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = ataque;\n this.def = defensa;\n }", "Card(){\t \n}", "public Card() {\n var random = new SecureRandom();\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[random.nextInt(10)];\n this.suit = allSuits[random.nextInt(4)];\n }", "public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }", "public BaseballCard(){\r\n\r\n\t}", "public Card(String name) {\n setValue(name);\n }", "public Card(){\n this.name = \"\";\n this.description = \"\";\n this.element = null;\n this.img = \"\";\n }", "public CardRequest() {\r\n card = new MSRData(); // an empty one\r\n }", "public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }", "public PaymentCard() {\n\t}", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();", "Cards(String cardName, String cardDes, int puntosHabilidad) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = puntosHabilidad;\n }", "public Card() {\n this(new VCard());\n vcard.getProperties().add(Version.VERSION_4_0);\n\n version = 4;\n }", "public Card(){\n suit = 0;\n rank = 0;\n }", "public UserCard() {\n this(DSL.name(\"b2c_user_card\"), null);\n }", "public LaundryCard() {\n\t}", "public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}", "public Card(String id, String name) {\n \t\tsameID = new String[MINILEN];\n \t\tfor (int i = 0; i < sameID.length; i++) {\n \t\t\tsameID[i] = \"\";\n \t\t}\n \t\tsetID(id);\n \t\t// setName(id);\n \t\tsetCardName(name);\n \n \t\trealCardName = name;\n \n \t\teffects = new ArrayList<String>();\n \t\teffects_e = new ArrayList<String>();\n \t\tflavorText = \"\";\n \t\tflavorText_e = \"\";\n \t\tsetCurrentState(State.NONE);\n \t\t// imageFile = new File(\"FieldImages/cardBack-s.jpg\");\n \t\timageResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tbackResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tsetAssociatedCards(new ArrayList<Card>());\n \t\tsetAttributes(new ArrayList<Attribute>());\n \t\t// addMouseListener(this);\n \t}", "public Card build() {\n return new Card(frontFace, backFace);\n }", "public Card(int x) {\n\t\tid = x;\n\t}", "@Override\r\n\tpublic Card createCard(Color color, Value label) {\r\n\t\tCard newCard = new Card(color, label);\r\n\t\treturn newCard;\r\n\t}", "public CreditCard ()\r\n\t{\r\n\t\t\r\n\t}", "public Card() {\n\t\tthis.suit = \" \";\n this.rank = 0;\n this.face = \" \";\n this.color = \" \";\n\t}", "private CardExchangeModel() {\n\t}", "public Card(String cardFace, String cardSuit) {\r\n this.face = cardFace; // initialize face of card\r\n this.suit = cardSuit; // initialize suit of card\r\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public Deck() {\n generateDeckOfCards();\n }", "public BadgeCard() {\n this(null, null, null, 0);\n }", "public Card()\n {\n // initialise instance variables\n message = new ArrayList<String>();\n message.add(\"Sorry!\");\n message.add(\"One\");\n message.add(\"Two\");\n message.add(\"Three\");\n message.add(\"Four\");\n }", "public Card()\r\n {\r\n rand = new Random();\r\n value = rand.nextInt(28); \r\n // Assigning value\r\n if (value >= 14) // Check if value is greater than 14 then value = value - 14;\r\n value -= 14;\r\n // Assigning color\r\n rand = new Random();\r\n // Switch statement for assigning different colors\r\n switch(rand.nextInt(4) )\r\n {\r\n case 0: color = \"Red\"; \r\n break;\r\n case 1: color = \"Green\"; \r\n break;\r\n case 2: color = \"Blue\"; \r\n break;\r\n case 3: color = \"Yellow\"; \r\n break;\r\n }\r\n // If the card is a wild card and value is greater than or equal to 13 then none value is assigned to color variable\r\n if (value >= 13)\r\n color = \"none\";\r\n }", "public Card(String name, String description) {\n\t\tthis.name = name;\n\t\tthis.description = description;\n\t}", "public Cardholder(String name, String address, int cardNumber){\n this.name = name;\n this.address = address;\n this.cardNumber = cardNumber;\n }", "public CluedCard(GameMode mode) {\n\t\tthis(null, null, mode);\n\t}", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "public Card (Suit s, int v) {\n suit = s;\n val = v;\n }", "private Card(Color c, Rank r) {\n this.nbCard = pack(c,r);\n }", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public MageTowerCard() {\n\t\tsuper(cardName, cardId, cardCost);\n\t}", "public ViewCard(@NotNull Card modelCard)\n {\n super(CARD_WIDTH, CARD_HEIGHT, CARD_DEPTH, \"file:./res/\" + getFileName(modelCard),\n CARD_FACE_TEXTURE_WIDTH, CARD_FACE_TEXTURE_HEIGHT);\n this.modelCard = modelCard;\n }", "public Hand () //No arg\n\t{\n\t\tthis.cardsInHand = 0;\n\t\tthis.handSize = 5;\n\t}", "public CardGame(){\n this.handOne = new Hand();\n this.handTwo = new Hand();\n this.gameDeck = new Deck();\n this.playerScore = 0;\n this.oppoScore = 0;\n }", "public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "public backCard() {\n\t\tsuper(null,null);\n\t}", "Board() {\n this.cardFactory = new CardFactory(this);\n }", "public Card(String name, String description, String flavorText,\n Boolean scorable, int cost) {\n this.name = name;\n this.description = description;\n this.flavorText = flavorText;\n this.scorable = scorable;\n this.cost = cost;\n }", "public Deck()\r\n\t{\r\n\t\tcards = new String[DECK_SIZE];\r\n\t\t\r\n\t\tnewDeck();\r\n\t}", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "private Card init_proof_card() {\n\t\t\n\t\tProofCard card = new ProofCard(getActivity());\n\t\t\n\t\tCardExpand expand = new CardExpand(getActivity());\n\t\tcard.addCardExpand(expand);\n\t\tcard.setBackgroundResource(getResources().getDrawable(R.drawable.card_back));\n\t\treturn card;\n\t}", "protected CardCommandAPDU() {\n }", "Card(Color color) {\n this.color = color;\n }", "public CareerCard (String name)\r\n {\r\n super (name);\r\n setDegreeRequired ();\r\n setMaxPayRaise ();\r\n }", "public Card(int s, int r)\n {\n suit = s;\n rank = r;\n }", "public Cards( boolean fullPack)\r\n {\r\n cards = new Card[ NOOFCARDSINFULLPACK ];\r\n valid = 0;\r\n \r\n if ( fullPack)\r\n createFullPackOfCards();\r\n }", "public Card(int s, int v){\n\t\t//make a card with suit s and value v\n\t\tsuit = s;\n\t\tvalue = v; \n\t\t\n\t}", "public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}", "public Card(int s, int r){\n suit = s;\n rank = r;\n }", "public Card(String type,String value)\n {\n this.type = type;\n this.value = value;\n }", "public Card(String s, int c)\r\n { suit = s;\r\n count = c;\r\n }", "@Override\n public Card generateCard() {\n Card card = new Card(\n \"Minotaur\",\n \"Bull-headed Monster\",\n \"Your Move: Your Worker may move into an opponent Worker’s space \" +\n \"\\n(using normal movement rules), if the next space in the same direction is \" +\n \"\\nunoccupied. Their Worker is forced into that space (regardless of its level).\",\n 1,\n false,\n this\n );\n this.card = card;\n return card;\n }", "private Card init_fulfilled_card() {\n\t\t\n\t\tFulfilledCard card = new FulfilledCard(getActivity());\n\t\t\n\t\tCardExpand expand = new CardExpand(getActivity());\n\t\tcard.addCardExpand(expand);\n\t\tcard.setBackgroundResource(getResources().getDrawable(R.drawable.card_back));\n\t\treturn card;\n\t}", "public poker_class ()\n\t{\n\t face = \"Two\";\n\t suit = \"Clubs\";\n\t}", "public Deck() {\n this.cards = new Card[STANDARD_DECK_SIZE];\n this.topCardIndex = 0;\n int cardIndex = 0;\n int DeckLength = this.cards.length;\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }", "public Hand() {\n this.hole1 = new BlankCard();\n this.hole2 = new BlankCard();\n showCards = false;\n }", "public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }", "public CardTrackKey() {\n\tsuper();\n}", "public Card(int tempNum, int tempSuit)\n {\n num = tempNum;\n suit = tempSuit;\n }", "public Card makeCopy(){\n return new Card(vimage);\n }", "public DrawableCard(Context context, AttributeSet attrs) {\n super(context, attrs);\n\n //initially the card is not selected\n this.selected = -1;\n init();\n }", "Card(String n, int ps[], int pr[], int y, ImageIcon i){\r\n\t\tname = n;\r\n\t\tprereqSkill = ps;\r\n\t\tprereqRoom = pr;\r\n\t\tyear = y;\r\n\t\timg = i;\r\n\t\tretCA = CardAction.NONE;\t\t\r\n\t}", "public Card(int cardNumber, JButton jButton) {//upon creation;\n this.cardNumber = cardNumber;//set the card number of this card;\n this.jButton = jButton;//set the JButton of this card;\n// System.out.println(cardNumber);//SOUT the card numbers;\n }", "public CardInformationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Deck(String name){\r\n\t\tthis(name, new ArrayList<Card>());\r\n\t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "public MenuCards(Gui gui, Cards cards)\n {\n super(\"Karty\");\n setMnemonic('K');\n\n this.gui = gui;\n this.cards = cards;\n\n createCardsEditingItem();\n }", "public Card(int cardRank, int cardSuit){\n this.rank = cardRank;\n this.suit = cardSuit;\n }", "public BJCard(Suit s, Value gVal)\r\n {\r\n suit = s;\r\n value= gVal;\r\n }", "public Card(int cType){\n this.cardType = cType;\n scaleCard(this.cardType);\n this.isClick = false;\n }", "abstract public Vcard createVcard();", "public Hand()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t\tscore = 0;\n\t}", "public UserCard(Name alias) {\n this(alias, USER_CARD);\n }", "public Card(String[] card) {\r\n\t\tthis.deckIndex = Integer.parseInt(card[0]);\r\n\t\tthis.suit = (char) Integer.parseInt(card[1]);\r\n\t\tthis.name = (char) Integer.parseInt(card[2]);\r\n\t\tthis.ordinal = Integer.parseInt(card[3]);\r\n\t\tthis.value = Integer.parseInt(card[4]);\r\n\t}", "public Deck() {\n System.out.println(\"Inside deck\");\n cards = new ArrayList<>();\n fillDeck();\n }", "static Card generateRandomCard()\n {\n Card.Suit suit;\n char val;\n\n int suitSelector, valSelector;\n\n // get random suit and value\n suitSelector = (int) (Math.random() * 4);\n valSelector = (int) (Math.random() * 14);\n\n // pick suit\n suit = Card.Suit.values()[suitSelector];\n\n // pick value\n valSelector++; // put in range 1-14\n switch(valSelector)\n {\n case 1:\n val = 'A';\n break;\n case 10:\n val = 'T';\n break;\n case 11:\n val = 'J';\n break;\n case 12:\n val = 'Q';\n break;\n case 13:\n val = 'K';\n break;\n case 14:\n val = 'X';\n break;\n default:\n val = (char)('0' + valSelector); // simple way to turn n into 'n' \n }\n return new Card(val, suit);\n }", "public Card(int cardType){\r\n\r\n\t\tScanner inputFile = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tinputFile = new Scanner(new File(\"cards.txt\")).useDelimiter(\",\");\r\n\t\t\t\r\n\t\t\t//reads in text file by row\r\n\t\t\tfor(int row = 1; row < cardType; row++){\r\n\t\t\t\tinputFile.nextLine();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//sets the card name, number of cards and the coin values\r\n\t\t\tsetCardName(inputFile.next());\r\n\t\t\tsetNumberOfCards(Integer.valueOf(inputFile.next()));\r\n\t\t\tfor(int coinNumber = 1; coinNumber < 5; coinNumber++)\r\n\t\t\t\tcoin[coinNumber] = Integer.valueOf(inputFile.next());\r\n\t\t\t\r\n\r\n\t\t} catch (FileNotFoundException error) {\r\n\r\n\t\t\tSystem.err.println(\"File not found - check the file name\");\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "public Deck()\n {\n this(1);\n }", "public Deck( ) {\r\n int ordinal;\r\n alalSets = new ArrayList<>();\r\n \r\n // load the cards\r\n for ( ordinal = 1; ordinal <= 13; ordinal++) {\r\n for( int iCount = 1; iCount <= 4; iCount++) {\r\n // the deck adds one set which contains one card\r\n \r\n ArrayList<Card> redCardSet = new ArrayList<>();\r\n Card redCard = new Card();\r\n redCard.value = ordinal;\r\n redCard.color = Enums.RED;\r\n redCardSet.add(redCard); // add card to set\r\n alalSets.add( redCardSet ); // add set to deck\r\n\r\n ArrayList<Card> blackCardSet = new ArrayList<>();\r\n Card blackCard = new Card();\r\n blackCard.value = ordinal;\r\n blackCard.color = Enums.BLACK;\r\n blackCardSet.add(blackCard);\r\n alalSets.add( blackCardSet );\r\n }\r\n }\r\n }", "public SpadeCard(int value)\n\t{\n\t\tsuper(value);\n\t\tweight = 0;\n\t\t\n\t\tswitch(value)\n\t\t{\n\t\tcase 0:\n\t\t\tpicPath = \"pictures/cards_PNG/3_of_spades.png\";\n\t\t\tbreak;\t\t\n\t\tcase 1:\n\t\t\tpicPath = \"pictures/cards_PNG/4_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tpicPath = \"pictures/cards_PNG/5_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tpicPath = \"pictures/cards_PNG/6_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tpicPath = \"pictures/cards_PNG/7_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tpicPath = \"pictures/cards_PNG/8_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tpicPath = \"pictures/cards_PNG/9_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tpicPath = \"pictures/cards_PNG/10_of_spades.png\";\n\t\t\tbreak;\n\t\t\n\t\t\t\n\t\tcase 8:\n\t\t\tpicPath = \"pictures/cards_PNG/jack_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tpicPath = \"pictures/cards_PNG/queen_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tpicPath = \"pictures/cards_PNG/king_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tpicPath = \"pictures/cards_PNG/ace_of_spades.png\";\n\t\t\tbreak;\n\t\t\t\n\t\tcase 12:\n\t\t\tpicPath = \"pictures/cards_PNG/2_of_spades.png\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tpicPath = \"pictures/cards_PNG/black_joker.png\";\n\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\ttry {\n\t\t\timg = ImageIO.read(new File(picPath));\n\t\t}catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}" ]
[ "0.79039556", "0.7816986", "0.77866673", "0.77004033", "0.76703775", "0.75872076", "0.7494896", "0.74278355", "0.73428357", "0.73177624", "0.7288874", "0.72837335", "0.72795033", "0.7215011", "0.7162244", "0.71554965", "0.7087984", "0.7046526", "0.7046127", "0.7031395", "0.6996754", "0.6979548", "0.6877913", "0.6797374", "0.67856836", "0.6731645", "0.6700049", "0.6683351", "0.6642875", "0.66378415", "0.6637193", "0.66317844", "0.65871805", "0.654841", "0.65393466", "0.6532112", "0.65117997", "0.6471626", "0.646455", "0.6444955", "0.64413744", "0.64302963", "0.6429687", "0.63901776", "0.6389604", "0.63541466", "0.6345239", "0.6342911", "0.63157904", "0.63123375", "0.6301226", "0.6300746", "0.6284525", "0.6260396", "0.6253844", "0.6247018", "0.6228749", "0.6215707", "0.6215692", "0.6212773", "0.6209877", "0.6205548", "0.61952096", "0.61796224", "0.61672574", "0.6163941", "0.6157056", "0.61525196", "0.6152198", "0.61476696", "0.6144269", "0.6136179", "0.6135602", "0.6125332", "0.61203355", "0.61184895", "0.61092293", "0.6106069", "0.6103096", "0.6089635", "0.6088458", "0.6083755", "0.6063053", "0.6059946", "0.6039592", "0.60393316", "0.60385907", "0.60356563", "0.6032006", "0.60225195", "0.6017995", "0.60176444", "0.60035586", "0.59921765", "0.5982085", "0.59803337", "0.59736496", "0.59717715", "0.5966784", "0.59521633" ]
0.71537423
16
Constructs a card object with the specified face_value value.
public PlayingCard(int newFace){ super(newFace); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card(String faceName, String suit, int faceValue) {\n\n setFaceName(faceName);\n setSuit(suit);\n setFaceValue(faceValue);\n }", "public Card(Suit suit, CardValue value,boolean isFaceDown) {\n this.suit = suit;\n this.cardValue = value;\n this.isFaceDown = isFaceDown;\n }", "public Card(Suit suit, CardValue value) {\n this.suit = suit;\n this.cardValue = value;\n isFaceDown = true;\n }", "public Card(String inFaceValue, int inTrueValue, String inSuit, ImageIcon inPicture)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value\n\tfaceValue = inFaceValue;\n\n\t// Set true value\n\ttrueValue = inTrueValue;\n\n\t// Set suit\n\tsuit = inSuit;\n\n\t// Set picture\n\tpicture = inPicture;\n\n }", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public Card(String suit, String rank, int value)\t\r\n\t{\r\n\t\tthis.suit = suit;\r\n\t\tthis.rank = rank;\r\n\t\tthis.value = value;\r\n\t}", "private void setFaceValue(FaceValue faceValue) {\n this.faceValue = faceValue;\n }", "public Card(Suit suit, Value value){\n this.value = value;\n this.suit = suit;\n }", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public Card(FrontFace frontFace, BackFace backFace) {\n this.frontFace = frontFace;\n this.backFace = backFace;\n }", "public KCard (Card.Color c, int value) {\n this.color = c;\n this.value = value;\n }", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "public Card(String cardFace, String cardSuit) {\r\n this.face = cardFace; // initialize face of card\r\n this.suit = cardSuit; // initialize suit of card\r\n }", "public Die(int faceValue) {\n\t\tthis.faceValue = faceValue;\n\t}", "public Card(int value, int suit) {\n if (value <= 13 && value >= 1 && suit <= 4 && suit >= 1) {\n this.faceUp = false;\n this.value = value;\n this.suit = suit;\n if (suit == 1 || suit == 4) {\n this.color = CardColor.BLACK;\n } else {\n this.color = CardColor.RED;\n }\n } else {\n throw new IllegalArgumentException(\"Invalid Card\");\n }\n }", "public Card(String suit,int value)\n\t{\n\t\tthis.suit=suit;\n\t\tthis.value=value;\n\t}", "public Builder setCards(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n cards_ = value;\n onChanged();\n return this;\n }", "public SpadeCard(int value)\n\t{\n\t\tsuper(value);\n\t\tweight = 0;\n\t\t\n\t\tswitch(value)\n\t\t{\n\t\tcase 0:\n\t\t\tpicPath = \"pictures/cards_PNG/3_of_spades.png\";\n\t\t\tbreak;\t\t\n\t\tcase 1:\n\t\t\tpicPath = \"pictures/cards_PNG/4_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tpicPath = \"pictures/cards_PNG/5_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tpicPath = \"pictures/cards_PNG/6_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tpicPath = \"pictures/cards_PNG/7_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tpicPath = \"pictures/cards_PNG/8_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tpicPath = \"pictures/cards_PNG/9_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tpicPath = \"pictures/cards_PNG/10_of_spades.png\";\n\t\t\tbreak;\n\t\t\n\t\t\t\n\t\tcase 8:\n\t\t\tpicPath = \"pictures/cards_PNG/jack_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tpicPath = \"pictures/cards_PNG/queen_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tpicPath = \"pictures/cards_PNG/king_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tpicPath = \"pictures/cards_PNG/ace_of_spades.png\";\n\t\t\tbreak;\n\t\t\t\n\t\tcase 12:\n\t\t\tpicPath = \"pictures/cards_PNG/2_of_spades.png\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tpicPath = \"pictures/cards_PNG/black_joker.png\";\n\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\ttry {\n\t\t\timg = ImageIO.read(new File(picPath));\n\t\t}catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public Card(int deckValue){\n\t\t\n\t\t//Guard against an invalid state:\n\t\tif((deckValue < 1) || (deckValue > 52))\n\t\t{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t\n\t\tthis.deckValue = deckValue;\n\t\tfaceValue = toFaceValue(deckValue);\n\t\tsuitValue = toSuitValue(deckValue);\n\t}", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }", "public Card(String type,String value)\n {\n this.type = type;\n this.value = value;\n }", "public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }", "public Card(Suit suit, Face face) {\n\t\tthis.suit = suit;\n\t\tthis.face = face;\n\t}", "public BlackjackCard(Suit suit, int value){\r\n\t\tthis.suit = suit;\r\n\t\tthis.value = value;\r\n\t}", "public NumericalCard(final Color color, final Value value) {\n this.color = color;\n this.value = value;\n }", "public Card(String cardRank, String cardSuit, int cardPointValue) {\r\n\t\t/* *** TO BE IMPLEMENTED IN ACTIVITY 1 *** */\r\n rank = cardRank;\r\n suit = cardSuit;\r\n pointValue = cardPointValue;\r\n \r\n\t}", "Number(String face, int numValue) {\n this.face = face;\n this.numValue = numValue;\n }", "public Card(int suitInt, int valueA)\r\n {\r\n \r\n if( suitInt == 1)\r\n suit = \"SPADE\";\r\n if(suitInt == 2)\r\n suit = \"CLUB\";\r\n if(suitInt == 3)\r\n suit = \"HEART\";\r\n if(suitInt == 4)\r\n suit = \"DIAMOND\";\r\n \r\n card = CARDS[valueA-1];\r\n try{\r\n image = ImageIO.read(new File(card+\"_\"+suit+\".jpg\"));\r\n }\r\n catch(Exception e){}\r\n \r\n if(valueA >= 11)\r\n value = 10;\r\n else\r\n value = valueA;\r\n if(valueA == 1)\r\n value = 11;\r\n }", "public Card(int value, int suit) {\n if (value < 2 || value > 14 || suit < 0 || suit > 3) {\n throw new IllegalArgumentException(\"invalid card\");\n }\n this.value = value;\n this.suit = suit;\n }", "public void setCardValue(String value) {\n this.Cvalue = value;\n }", "public Card(String theSuite, int theValue){\r\n value = theValue;\r\n suite = theSuite;\r\n used = false;\r\n }", "public Card(Color color, int value) throws UnoException {\r\n this.color = color;\r\n if (value < 0 || value > 9) {\r\n throw new UnoException(\"Veuillez entrer une valeur comprise entre 0\"\r\n + \" et 9\");\r\n } else {\r\n this.value = value;\r\n }\r\n }", "public Card(char value, Suit suit) {\n this.set(value, suit);\n }", "public static String valueToFace(int value) {\n if (value < 11 && value > 1) {\n return value + \"\";\n } else if (value == 11) {\n return \"J\";\n } else if (value == 12) {\n return \"Q\";\n } else if (value == 13) {\n return \"K\";\n } else if (value == 14) {\n return \"A\";\n } else {\n return \"Invalid face.\";\n }\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public Card(String name) {\n setValue(name);\n }", "public Card(Image faceUp) {\n\t\t\tthis.faceUp = faceUp;\n\t\t\tshowing.setImage(faceUp); //When a Card object is created, it initially shows the face-up image\n\t\t}", "public ArrayList<Card> create(){\n \n ArrayList<Card> deck = new ArrayList<Card>();\n \n // If the value enum class implements the Special interface, the \n // method will generate objects of the SpecialCard class.\n boolean specialDeck = Special.class.isAssignableFrom(this.value);\n \n // Loop through all the constants in the value enum class\n for(Object o: value.getEnumConstants()) {\n Value cardValue = (Value)o;\n \n // How many sets of each suit will this value have?\n int numSets = cardValue.getNumSuitSets();\n \n // Generate all the necessary copies of each suit for that value\n for (int i = 1; i <= numSets; i++) {\n \n for(Object p: suit.getEnumConstants()) {\n Suit cardSuit = (Suit)p;\n Card card = specialDeck? \n new SpecialCard(cardValue, cardSuit, this.game) : \n new NumberedCard(cardValue, cardSuit, this.game);\n deck.add(card);\n } \n }\n \n }\n \n return deck;\n }", "public Cards(String cardFace, String cardSuit) {\n\t\t// face of the card\n\t\tface = cardFace;\n\t\t// suit of the card\n\t\tsuit = cardSuit;\n\t}", "@Override\r\n\tpublic Card createCard(Color color, Value label) {\r\n\t\tCard newCard = new Card(color, label);\r\n\t\treturn newCard;\r\n\t}", "public Card(String faceName, String suit) {\n setFaceName(faceName);\n setSuit(suit);\n }", "public BJCard(Suit s, Value gVal)\r\n {\r\n suit = s;\r\n value= gVal;\r\n }", "public Card(String value, int numericval, Cardtype type, Cardcolor color) {\n this.value = value;\n this.numericval = numericval;\n this.type = type;\n this.color = color;\n }", "public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }", "public static int toDeckValue(int faceValue, int suitValue)\n\t\t{\n\t\t\tif((faceValue < 2) || (suitValue > 14))\n\t\t\t{\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\t\t\tif((suitValue < 1) || (suitValue > 4))\n\t\t\t{\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\t\t\t\n\t\t\tint deckValue = (13 * (suitValue - 1)) + faceValue - 1;\n\t\t\treturn deckValue;\n\t\t}", "public int getFaceValue() {\n\t\treturn faceValue;\n\t}", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "public int getFaceValue ()\n {\n return faceValue;\n }", "public Card (Suit s, int v) {\n suit = s;\n val = v;\n }", "public DeckGenerator(Class<? extends Enum<?>> value, \n Class<? extends Enum<?>> suit, Game game) {\n this.value = value;\n this.suit = suit;\n this.game = game;\n }", "public poker_class ()\n\t{\n\t face = \"Two\";\n\t suit = \"Clubs\";\n\t}", "public Card(int s, int v){\n\t\t//make a card with suit s and value v\n\t\tsuit = s;\n\t\tvalue = v; \n\t\t\n\t}", "public Card()\r\n {\r\n rand = new Random();\r\n value = rand.nextInt(28); \r\n // Assigning value\r\n if (value >= 14) // Check if value is greater than 14 then value = value - 14;\r\n value -= 14;\r\n // Assigning color\r\n rand = new Random();\r\n // Switch statement for assigning different colors\r\n switch(rand.nextInt(4) )\r\n {\r\n case 0: color = \"Red\"; \r\n break;\r\n case 1: color = \"Green\"; \r\n break;\r\n case 2: color = \"Blue\"; \r\n break;\r\n case 3: color = \"Yellow\"; \r\n break;\r\n }\r\n // If the card is a wild card and value is greater than or equal to 13 then none value is assigned to color variable\r\n if (value >= 13)\r\n color = \"none\";\r\n }", "public Deck() {\n deck = new LinkedList<>();\n for (int i = 1; i < FACE_VALUES + 1; i++) {\n deck.add(new Card(i, SPADES));\n deck.add(new Card(i, CLUB));\n deck.add(new Card(i, DIAMOND));\n deck.add(new Card(i, HEART));\n }\n }", "public Card build() {\n return new Card(frontFace, backFace);\n }", "public Card(int cType, char suit, int value){\n this.cardType = cType;\n this.cardRank = value;\n this.cardSuit = suit;\n scaleCard(this.cardType);\n if(cType == 1) {\n cardId = getId(suit, value);\n }\n this.isClick = false;\n this.inValidGroup = false;\n }", "public void buildCards(){\n\t\tfor(Suit suit: Suit.values()){\n\t\t\tfor(Face face: Face.values()){\n\t\t\t\tcards.add(new Card(face, suit));\n\t\t\t}\n\t\t}\n\t}", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "public CluedCard(GameMode mode) {\n\t\tthis(null, null, mode);\n\t}", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public void setFaceValue(double f){\n\t\tface = f ;\n\t}", "public Card(){\n suit = 0;\n rank = 0;\n }", "public static void setMyCards() {\n for (Suit s: Suit.values()){\n for (FaceValue f: FaceValue.values()){\n Card c = new Card(s,f);\n myCards.add(c);\n }\n }\n }", "public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }", "public Card() {\n\t\tthis.suit = \" \";\n this.rank = 0;\n this.face = \" \";\n this.color = \" \";\n\t}", "public void generateCardValue() {\r\n\t\tswitch (cardNumber) {\r\n\t\tcase 1:\r\n\t\t\tcardValue = \"Ace\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tcardValue = \"Two\";\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tcardValue = \"Three\";\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tcardValue = \"Four\";\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tcardValue = \"Five\";\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tcardValue = \"Six\";\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tcardValue = \"Seven\";\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tcardValue = \"Eight\";\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tcardValue = \"Nine\";\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tcardValue = \"Ten\";\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tcardValue = \"Jack\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tcardValue = \"Queen\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\tcase 13:\r\n\t\t\tcardValue = \"King\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public Card() { this(12, 3); }", "public void createFullDeck(){\n for(Suit cardSuit: Suit.values()){\n //iterating over all the values\n for(Value cardValue: Value.values()){\n cards.add(new Card(cardSuit,cardValue));\n }\n }\n }", "public Card() {\n this(new Random().nextInt(54));\n establishHierarchicalValue();\n }", "public Card(String suit, String rank){\r\n\t\t\t// assume input is valid!\r\n\t\t\tthis.suit = suit; \r\n\t\t\tthis.rank = rank;\r\n\t\t\tthis.rankValue = new HashMap<String,Integer>(15);\r\n\t\t\tfor(int r = 2; r < RANKS.length; r+=1){\r\n\t\t\t\tthis.rankValue.put(RANKS[r], r);\r\n\t\t\t}\r\n\t }", "Card(Color color) {\n this.color = color;\n }", "public Card(Rank rank, Suit suit) {\r\n\t\tthis.rank = rank;\r\n\t\tthis.suit = suit;\r\n\t\tfaceUp = true;\r\n\t}", "public Deck() {\n deck = new ArrayList<>();\n for (Color d : Color.values()) {\n for (Value e : Value.values()) {\n Card c = new Card(d, e);\n deck.add(c);\n }\n }\n }", "public int addPosition(int faceValue){\n position += faceValue;\n\n if(position > 12){\n position -= 12;\n }\n return position;\n }", "public String GetDeckCard(int value){\n return deck.get(value);\n }", "public TrainCardDeck(){\n this.cardDeck = new ArrayList<>();\n \n //110 Train Car cards (12 each of Box-PINK, Passenger-WHITE, Tanker-BLUE, Reefer-YELLOW, \n //Freight-ORANGE, Hopper-BLACK, Coal-RED, Caboose-GREEN, plus 14 Locomotives-RAINBOW)\n \n for(int i = 1 ; i <= 12 ; i++){\n for(VALUE color : VALUE.values()){\n cardDeck.add(new TrainCard(color));\n }\n }\n cardDeck.add(new TrainCard(RAINBOW));\n cardDeck.add(new TrainCard(RAINBOW));\n }", "public void setValueOfCard(int valueOfCard) {\n this.valueOfCard = valueOfCard;\n }", "public CardBuilder withFrontFace(String front) {\n FrontFace frontFace = new FrontFace(front);\n this.frontFace = frontFace;\n return this;\n }", "public String toString() {\n\t\treturn \"Face: \" + faceValue;\n\t}", "public Card(boolean vis, int suit, Integer... vals) {\r\n\t\tvalues = Arrays.asList(vals);\r\n\t\tthis.suit = suit;\r\n\t\tthis.visible = vis;\r\n\t}", "public Card(int order) {\n if (order <= 13) {\n this.suit = \"Clubs\";\n } else if (order > 13 && order <= 26) {\n this.suit = \"Diamonds\";\n } else if (order > 26 && order <= 39) {\n this.suit = \"Hearts\";\n } else if (order > 39 && order <= 52) {\n this.suit = \"Spades\";\n } else {\n System.out.println(\"Not a valid input\");\n return;\n }\n\n this.value = FACECARDS[(order) % 13];\n }", "public Card(URL url) {\n\t\timageLink = url;\n\t\tfaceUp = false;\n\t\tinPlay = true;\n\t}", "Card(){\t \n}", "public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }", "public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }", "public Card (char inSuit, int inFace) {\r\n\t\tif (!setSuit(inSuit)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect suit: \" + inSuit);\r\n\t\t\tSystem.out.println(\"Setting suit to: \" + DEFAULT_SUIT);\r\n\t\t}\r\n\t\t\r\n\t\tif (!setFace(inFace)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect face: \" + inFace);\r\n\t\t\tSystem.out.println(\"Setting face to: \" + DEFAULT_FACE);\r\n\t\t}\r\n\t\t\r\n\t\t// not a wildcard by default\r\n\t\twildcard = false;\r\n\t}", "public void buildDeck () {\n this.deck = new ArrayList();\n for (ValueType value: ValueType.values()) {\n for(SuitType suit: SuitType.values()) {\n deck.add(new Card(value, suit));\n }\n }\n shuffleDeck();\n }", "public Card(short rank, short suit){\r\n this.rank = rank;\r\n this.suit = suit;\r\n }", "public Card(String id, String name) {\n \t\tsameID = new String[MINILEN];\n \t\tfor (int i = 0; i < sameID.length; i++) {\n \t\t\tsameID[i] = \"\";\n \t\t}\n \t\tsetID(id);\n \t\t// setName(id);\n \t\tsetCardName(name);\n \n \t\trealCardName = name;\n \n \t\teffects = new ArrayList<String>();\n \t\teffects_e = new ArrayList<String>();\n \t\tflavorText = \"\";\n \t\tflavorText_e = \"\";\n \t\tsetCurrentState(State.NONE);\n \t\t// imageFile = new File(\"FieldImages/cardBack-s.jpg\");\n \t\timageResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tbackResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tsetAssociatedCards(new ArrayList<Card>());\n \t\tsetAttributes(new ArrayList<Attribute>());\n \t\t// addMouseListener(this);\n \t}", "public DeckOfCards() {\n\n String faces[] = {\"Ace\", \"Deuce\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\n String suits[] = {\"Hearts\", \"Diamonds\", \"Clubs\", \"Spades\"};\n\n deck = new Card[NUMBER_OF_CARDS]; //create an array of card objects (52)\n currentCard = 0;\n randomNumbers = new Random();\n\n //Populate deck with card objects\n for(int count = 0; count < deck.length; count++){\n deck[count] = new Card(faces[count % 13], suits[count / 13]);\n //first 13 cards will be ace through king of hearts then ace though king of diamonds etc...\n\n }\n\n }", "public Card(int cardRank, int cardSuit){\n this.rank = cardRank;\n this.suit = cardSuit;\n }", "public PlayingCard(int newFace, int newSuit){\n\t\tsuper(newFace, newSuit);\n\t}", "public static JCardValue single(Object value) {\n\t\treturn new JCardValue(new JsonValue(value));\n\t}", "public Die (int faces)\n {\n if (faces < MIN_FACES)\n numFaces = 6;\n else\n numFaces = faces;\n \n faceValue = 1;\n }", "private Card init_fulfilled_card() {\n\t\t\n\t\tFulfilledCard card = new FulfilledCard(getActivity());\n\t\t\n\t\tCardExpand expand = new CardExpand(getActivity());\n\t\tcard.addCardExpand(expand);\n\t\tcard.setBackgroundResource(getResources().getDrawable(R.drawable.card_back));\n\t\treturn card;\n\t}", "Cards(String cardName, String cardDes, int ataque, int defensa) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = ataque;\n this.def = defensa;\n }", "public double getFaceValue(){\n\t\t\n\t\treturn face ;\n\t}", "public String getFaceValue()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start getFaceValue Method ***************/\n\n\t// Return face value\n return faceValue;\n\n }", "public void setFace(CardFace face) {\n if (face == CardFace.FACE_DOWN) {\n cardFace = CardFace.FACE_DOWN;\n sprite.texture = faceDownTexture;\n } else {\n cardFace = CardFace.FACE_UP;\n sprite.texture = faceUpTexture;\n }\n }" ]
[ "0.75411946", "0.718372", "0.7105061", "0.6816742", "0.6514912", "0.65013474", "0.6490924", "0.64573586", "0.6402973", "0.6345058", "0.63153803", "0.6295361", "0.6285209", "0.62558514", "0.62493217", "0.62383693", "0.6227106", "0.621484", "0.6186025", "0.6174065", "0.6140346", "0.6135421", "0.610155", "0.6028148", "0.59931546", "0.59235483", "0.5906306", "0.58742595", "0.5813481", "0.5726218", "0.57182175", "0.56892383", "0.5687603", "0.5687587", "0.5683161", "0.5635299", "0.56328166", "0.56264144", "0.56114966", "0.56007385", "0.5595642", "0.5593297", "0.5578379", "0.55746216", "0.55164486", "0.54964525", "0.5477883", "0.54640144", "0.54630744", "0.5452189", "0.5429087", "0.5403477", "0.5388495", "0.53495604", "0.5334499", "0.53312266", "0.5326518", "0.5295403", "0.5291989", "0.5273416", "0.526029", "0.52246594", "0.518373", "0.51738536", "0.5172644", "0.51642543", "0.51523334", "0.51436037", "0.5124818", "0.51215404", "0.51178664", "0.5116663", "0.507632", "0.50451463", "0.5023374", "0.50163853", "0.50115454", "0.50092864", "0.5007654", "0.49944896", "0.4989465", "0.4976055", "0.49442044", "0.49358782", "0.49356666", "0.493538", "0.49333644", "0.4932139", "0.491535", "0.4899426", "0.4892934", "0.4882347", "0.48796535", "0.48705927", "0.4861681", "0.48603904", "0.48497474", "0.48496434", "0.4845325", "0.48440042" ]
0.57098955
31
Constructs a card object with the specified face_value, and suit values.
public PlayingCard(int newFace, int newSuit){ super(newFace, newSuit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card(Suit suit, CardValue value) {\n this.suit = suit;\n this.cardValue = value;\n isFaceDown = true;\n }", "public Card(String faceName, String suit, int faceValue) {\n\n setFaceName(faceName);\n setSuit(suit);\n setFaceValue(faceValue);\n }", "public Card(Suit suit, CardValue value,boolean isFaceDown) {\n this.suit = suit;\n this.cardValue = value;\n this.isFaceDown = isFaceDown;\n }", "public Card(Suit suit, Value value){\n this.value = value;\n this.suit = suit;\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public Card(int value, int suit) {\n if (value <= 13 && value >= 1 && suit <= 4 && suit >= 1) {\n this.faceUp = false;\n this.value = value;\n this.suit = suit;\n if (suit == 1 || suit == 4) {\n this.color = CardColor.BLACK;\n } else {\n this.color = CardColor.RED;\n }\n } else {\n throw new IllegalArgumentException(\"Invalid Card\");\n }\n }", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }", "public Card(String suit,int value)\n\t{\n\t\tthis.suit=suit;\n\t\tthis.value=value;\n\t}", "public Card(String suit, String rank, int value)\t\r\n\t{\r\n\t\tthis.suit = suit;\r\n\t\tthis.rank = rank;\r\n\t\tthis.value = value;\r\n\t}", "public Card(String cardFace, String cardSuit) {\r\n this.face = cardFace; // initialize face of card\r\n this.suit = cardSuit; // initialize suit of card\r\n }", "public Card(String inFaceValue, int inTrueValue, String inSuit, ImageIcon inPicture)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value\n\tfaceValue = inFaceValue;\n\n\t// Set true value\n\ttrueValue = inTrueValue;\n\n\t// Set suit\n\tsuit = inSuit;\n\n\t// Set picture\n\tpicture = inPicture;\n\n }", "public BlackjackCard(Suit suit, int value){\r\n\t\tthis.suit = suit;\r\n\t\tthis.value = value;\r\n\t}", "public Card(Suit suit, Face face) {\n\t\tthis.suit = suit;\n\t\tthis.face = face;\n\t}", "public Card(int value, int suit) {\n if (value < 2 || value > 14 || suit < 0 || suit > 3) {\n throw new IllegalArgumentException(\"invalid card\");\n }\n this.value = value;\n this.suit = suit;\n }", "public Card(String faceName, String suit) {\n setFaceName(faceName);\n setSuit(suit);\n }", "public Card(char value, Suit suit) {\n this.set(value, suit);\n }", "public Card(int deckValue){\n\t\t\n\t\t//Guard against an invalid state:\n\t\tif((deckValue < 1) || (deckValue > 52))\n\t\t{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t\n\t\tthis.deckValue = deckValue;\n\t\tfaceValue = toFaceValue(deckValue);\n\t\tsuitValue = toSuitValue(deckValue);\n\t}", "public Cards(String cardFace, String cardSuit) {\n\t\t// face of the card\n\t\tface = cardFace;\n\t\t// suit of the card\n\t\tsuit = cardSuit;\n\t}", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public Card (Suit s, int v) {\n suit = s;\n val = v;\n }", "public BJCard(Suit s, Value gVal)\r\n {\r\n suit = s;\r\n value= gVal;\r\n }", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }", "public Card(int suitInt, int valueA)\r\n {\r\n \r\n if( suitInt == 1)\r\n suit = \"SPADE\";\r\n if(suitInt == 2)\r\n suit = \"CLUB\";\r\n if(suitInt == 3)\r\n suit = \"HEART\";\r\n if(suitInt == 4)\r\n suit = \"DIAMOND\";\r\n \r\n card = CARDS[valueA-1];\r\n try{\r\n image = ImageIO.read(new File(card+\"_\"+suit+\".jpg\"));\r\n }\r\n catch(Exception e){}\r\n \r\n if(valueA >= 11)\r\n value = 10;\r\n else\r\n value = valueA;\r\n if(valueA == 1)\r\n value = 11;\r\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public Card(Rank rank, Suit suit) {\r\n\t\tthis.rank = rank;\r\n\t\tthis.suit = suit;\r\n\t\tfaceUp = true;\r\n\t}", "public DeckGenerator(Class<? extends Enum<?>> value, \n Class<? extends Enum<?>> suit, Game game) {\n this.value = value;\n this.suit = suit;\n this.game = game;\n }", "public Builder setCards(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n cards_ = value;\n onChanged();\n return this;\n }", "public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }", "public Card(String cardRank, String cardSuit, int cardPointValue) {\r\n\t\t/* *** TO BE IMPLEMENTED IN ACTIVITY 1 *** */\r\n rank = cardRank;\r\n suit = cardSuit;\r\n pointValue = cardPointValue;\r\n \r\n\t}", "public void buildCards(){\n\t\tfor(Suit suit: Suit.values()){\n\t\t\tfor(Face face: Face.values()){\n\t\t\t\tcards.add(new Card(face, suit));\n\t\t\t}\n\t\t}\n\t}", "public Card(int cType, char suit, int value){\n this.cardType = cType;\n this.cardRank = value;\n this.cardSuit = suit;\n scaleCard(this.cardType);\n if(cType == 1) {\n cardId = getId(suit, value);\n }\n this.isClick = false;\n this.inValidGroup = false;\n }", "public poker_class ()\n\t{\n\t face = \"Two\";\n\t suit = \"Clubs\";\n\t}", "public Card(String theSuite, int theValue){\r\n value = theValue;\r\n suite = theSuite;\r\n used = false;\r\n }", "public Card(int suit, int rank) {\n\n // pre-condition: suit and rank are valid\n \n this.suit = suit;\n this.rank = rank;\n }", "public Card(String suit, String rank){\r\n\t\t\t// assume input is valid!\r\n\t\t\tthis.suit = suit; \r\n\t\t\tthis.rank = rank;\r\n\t\t\tthis.rankValue = new HashMap<String,Integer>(15);\r\n\t\t\tfor(int r = 2; r < RANKS.length; r+=1){\r\n\t\t\t\tthis.rankValue.put(RANKS[r], r);\r\n\t\t\t}\r\n\t }", "public Card(){\n suit = 0;\n rank = 0;\n }", "public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }", "public CardDetail(String suit, String rank){\r\n this.suit = suit;\r\n this.rank = rank;\r\n }", "public static int toDeckValue(int faceValue, int suitValue)\n\t\t{\n\t\t\tif((faceValue < 2) || (suitValue > 14))\n\t\t\t{\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\t\t\tif((suitValue < 1) || (suitValue > 4))\n\t\t\t{\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\t\t\t\n\t\t\tint deckValue = (13 * (suitValue - 1)) + faceValue - 1;\n\t\t\treturn deckValue;\n\t\t}", "public Card(int type, int suit) {\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[type];\n this.suit = allSuits[suit];\n }", "public Card(Suit suit, int number) {\n\t\tthis.suit = suit;\n\t\tthis.number = number;\n\t\tswitch(number) {\n\t\t\t//place in CardType\n\t\t\tcase 1:\n\t\t\t\ttype = \"Ace\";\n\t\t\t\tsetNumber(14);\n\t\t\t\tbreak;\n\t\t\tcase 2:\t\t\t\t\n\t\t\t\tmagic = Magic.startAgain;\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tmagic = Magic.seeThrough;\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tmagic = Magic.missAGo;\n\t\t\t\tbreak;\n\t\t\tcase 9: \n\t\t\t\tmagic = Magic.playBelow;\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tmagic = Magic.burn;\n\t\t\tcase 11:\n\t\t\t\ttype = \"Jack\";\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttype = \"Queen\";\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttype = \"King\";\n\t\t\t\tbreak;\n\t\t}\n\t\tif(number > 1 && number < 11) {\n\t\t\ttype = Integer.toString(number);\n\t\t}\n\t}", "public Card(int cardRank, int cardSuit){\n this.rank = cardRank;\n this.suit = cardSuit;\n }", "public Card(int s, int v){\n\t\t//make a card with suit s and value v\n\t\tsuit = s;\n\t\tvalue = v; \n\t\t\n\t}", "public Card(short rank, short suit){\r\n this.rank = rank;\r\n this.suit = suit;\r\n }", "public KCard (Card.Color c, int value) {\n this.color = c;\n this.value = value;\n }", "public void createFullDeck(){\n for(Suit cardSuit: Suit.values()){\n //iterating over all the values\n for(Value cardValue: Value.values()){\n cards.add(new Card(cardSuit,cardValue));\n }\n }\n }", "public SpadeCard(int value)\n\t{\n\t\tsuper(value);\n\t\tweight = 0;\n\t\t\n\t\tswitch(value)\n\t\t{\n\t\tcase 0:\n\t\t\tpicPath = \"pictures/cards_PNG/3_of_spades.png\";\n\t\t\tbreak;\t\t\n\t\tcase 1:\n\t\t\tpicPath = \"pictures/cards_PNG/4_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tpicPath = \"pictures/cards_PNG/5_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tpicPath = \"pictures/cards_PNG/6_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tpicPath = \"pictures/cards_PNG/7_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tpicPath = \"pictures/cards_PNG/8_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tpicPath = \"pictures/cards_PNG/9_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tpicPath = \"pictures/cards_PNG/10_of_spades.png\";\n\t\t\tbreak;\n\t\t\n\t\t\t\n\t\tcase 8:\n\t\t\tpicPath = \"pictures/cards_PNG/jack_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tpicPath = \"pictures/cards_PNG/queen_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tpicPath = \"pictures/cards_PNG/king_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tpicPath = \"pictures/cards_PNG/ace_of_spades.png\";\n\t\t\tbreak;\n\t\t\t\n\t\tcase 12:\n\t\t\tpicPath = \"pictures/cards_PNG/2_of_spades.png\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tpicPath = \"pictures/cards_PNG/black_joker.png\";\n\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\ttry {\n\t\t\timg = ImageIO.read(new File(picPath));\n\t\t}catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "public Card(String type,String value)\n {\n this.type = type;\n this.value = value;\n }", "public Card(Rank rank, Suit suit)\n\t{\n\t\tthis.rank = rank;\n\t\tthis.suit = suit;\n\t}", "public Card(int tempNum, int tempSuit)\n {\n num = tempNum;\n suit = tempSuit;\n }", "public Card(boolean vis, int suit, Integer... vals) {\r\n\t\tvalues = Arrays.asList(vals);\r\n\t\tthis.suit = suit;\r\n\t\tthis.visible = vis;\r\n\t}", "public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }", "public void createDeck() {\n\t\t// for loop that repeats 4 times - one for each suit\n\t\tfor (String suit : suits) {\n\t\t\t// for loop that repeats 13 times (2-14) - once for each value\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\t//create instance of new card createCard(value, name);\n\t\t\t\tCard card = new Card(i, suit);\n\t\t\t\t//add card to deck array\n\t\t\t\taddCardToDeck(card);\n\t\t\t}\t\n\t\t}\n\t}", "public Card(String s, int c)\r\n { suit = s;\r\n count = c;\r\n }", "public Card() {\n\t\tthis.suit = \" \";\n this.rank = 0;\n this.face = \" \";\n this.color = \" \";\n\t}", "public Deck() {\n deck = new ArrayList<>();\n for (Color d : Color.values()) {\n for (Value e : Value.values()) {\n Card c = new Card(d, e);\n deck.add(c);\n }\n }\n }", "public Card(FrontFace frontFace, BackFace backFace) {\n this.frontFace = frontFace;\n this.backFace = backFace;\n }", "public void buildDeck () {\n this.deck = new ArrayList();\n for (ValueType value: ValueType.values()) {\n for(SuitType suit: SuitType.values()) {\n deck.add(new Card(value, suit));\n }\n }\n shuffleDeck();\n }", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "@Override\n public void createDeck(){\n for (char suit:standardSuits) {\n for (Map.Entry<Character, Integer> item:deckCards.entrySet()) {\n Card card = new Card(item.getKey(),item.getValue(),suit);\n deckOfCards.add(card);\n }\n }\n }", "public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }", "public ArrayList<Card> create(){\n \n ArrayList<Card> deck = new ArrayList<Card>();\n \n // If the value enum class implements the Special interface, the \n // method will generate objects of the SpecialCard class.\n boolean specialDeck = Special.class.isAssignableFrom(this.value);\n \n // Loop through all the constants in the value enum class\n for(Object o: value.getEnumConstants()) {\n Value cardValue = (Value)o;\n \n // How many sets of each suit will this value have?\n int numSets = cardValue.getNumSuitSets();\n \n // Generate all the necessary copies of each suit for that value\n for (int i = 1; i <= numSets; i++) {\n \n for(Object p: suit.getEnumConstants()) {\n Suit cardSuit = (Suit)p;\n Card card = specialDeck? \n new SpecialCard(cardValue, cardSuit, this.game) : \n new NumberedCard(cardValue, cardSuit, this.game);\n deck.add(card);\n } \n }\n \n }\n \n return deck;\n }", "public static void setMyCards() {\n for (Suit s: Suit.values()){\n for (FaceValue f: FaceValue.values()){\n Card c = new Card(s,f);\n myCards.add(c);\n }\n }\n }", "public Card() {\n var random = new SecureRandom();\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[random.nextInt(10)];\n this.suit = allSuits[random.nextInt(4)];\n }", "public NumericalCard(final Color color, final Value value) {\n this.color = color;\n this.value = value;\n }", "public Deck() {\n deck = new LinkedList<>();\n for (int i = 1; i < FACE_VALUES + 1; i++) {\n deck.add(new Card(i, SPADES));\n deck.add(new Card(i, CLUB));\n deck.add(new Card(i, DIAMOND));\n deck.add(new Card(i, HEART));\n }\n }", "public Card (char inSuit, int inFace) {\r\n\t\tif (!setSuit(inSuit)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect suit: \" + inSuit);\r\n\t\t\tSystem.out.println(\"Setting suit to: \" + DEFAULT_SUIT);\r\n\t\t}\r\n\t\t\r\n\t\tif (!setFace(inFace)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect face: \" + inFace);\r\n\t\t\tSystem.out.println(\"Setting face to: \" + DEFAULT_FACE);\r\n\t\t}\r\n\t\t\r\n\t\t// not a wildcard by default\r\n\t\twildcard = false;\r\n\t}", "public DeckOfCards() {\n\n String faces[] = {\"Ace\", \"Deuce\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\n String suits[] = {\"Hearts\", \"Diamonds\", \"Clubs\", \"Spades\"};\n\n deck = new Card[NUMBER_OF_CARDS]; //create an array of card objects (52)\n currentCard = 0;\n randomNumbers = new Random();\n\n //Populate deck with card objects\n for(int count = 0; count < deck.length; count++){\n deck[count] = new Card(faces[count % 13], suits[count / 13]);\n //first 13 cards will be ace through king of hearts then ace though king of diamonds etc...\n\n }\n\n }", "public Card(String name) {\n setValue(name);\n }", "public Card(int s, int r)\n {\n suit = s;\n rank = r;\n }", "public Card(String value, int numericval, Cardtype type, Cardcolor color) {\n this.value = value;\n this.numericval = numericval;\n this.type = type;\n this.color = color;\n }", "public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}", "public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}", "public Card(int s, int r){\n suit = s;\n rank = r;\n }", "private void generateDeckOfCards() {\n this.cards = new ArrayList<Card>(Suit.values().length * Rank.values().length);\n for (Suit suit : Suit.values()) {\n for (Rank rank : Rank.values()) {\n cards.add(new Card(suit, rank));\n }\n }\n }", "public Card(CardRank rank, CardSuit suit) {\n\t\tthis.rank = rank;\n\t\tthis.suit = suit;\n\t}", "Cards(String cardName, String cardDes, int ataque, int defensa) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = ataque;\n this.def = defensa;\n }", "public TrainCardDeck(){\n this.cardDeck = new ArrayList<>();\n \n //110 Train Car cards (12 each of Box-PINK, Passenger-WHITE, Tanker-BLUE, Reefer-YELLOW, \n //Freight-ORANGE, Hopper-BLACK, Coal-RED, Caboose-GREEN, plus 14 Locomotives-RAINBOW)\n \n for(int i = 1 ; i <= 12 ; i++){\n for(VALUE color : VALUE.values()){\n cardDeck.add(new TrainCard(color));\n }\n }\n cardDeck.add(new TrainCard(RAINBOW));\n cardDeck.add(new TrainCard(RAINBOW));\n }", "public Card()\r\n {\r\n rand = new Random();\r\n value = rand.nextInt(28); \r\n // Assigning value\r\n if (value >= 14) // Check if value is greater than 14 then value = value - 14;\r\n value -= 14;\r\n // Assigning color\r\n rand = new Random();\r\n // Switch statement for assigning different colors\r\n switch(rand.nextInt(4) )\r\n {\r\n case 0: color = \"Red\"; \r\n break;\r\n case 1: color = \"Green\"; \r\n break;\r\n case 2: color = \"Blue\"; \r\n break;\r\n case 3: color = \"Yellow\"; \r\n break;\r\n }\r\n // If the card is a wild card and value is greater than or equal to 13 then none value is assigned to color variable\r\n if (value >= 13)\r\n color = \"none\";\r\n }", "public Card(Color color, int value) throws UnoException {\r\n this.color = color;\r\n if (value < 0 || value > 9) {\r\n throw new UnoException(\"Veuillez entrer une valeur comprise entre 0\"\r\n + \" et 9\");\r\n } else {\r\n this.value = value;\r\n }\r\n }", "public Deck()\n {\n deck = new Stack<Card>();\n /* Increments through each suit, and then for each suit through each rank,\n * and pushes a\n * new card with the corresponding information onto the deck.\n */\n /* The above comment did not show up in the checkstyle. */\n for (Suit suit : Suit.values())\n {\n /* Increments through each card value. */\n for (CardValue value : CardValue.values())\n {\n deck.push(new Card(suit, value));\n }\n }\n Collections.shuffle(deck);\n }", "public CluedCard(GameMode mode) {\n\t\tthis(null, null, mode);\n\t}", "private void SetUpCard(boolean currentHand)\n\t{\n\t\tVector<JTextField> vectorOfTextFields = individualHand.GetVectorOfTextFields();\n\t\tindividualHand.SetTextFieldHolder(vectorOfTextFields.get(individualHand.GetCounter()));\n\t\tJTextField textField = individualHand.GetTextFieldHolder();\n\t\t\n\t\t// Generate Card Value and card color\n\t\tint currentCardValue = individualHand.GenerateCardValue();\n\t\tindividualHand.RedOrBlack(textField);\n\t\ttextField.setText(individualHand.CardFaceValue(currentCardValue));\n\t\t\n\t\t// set face card values to 10 if they are not Aces\n\t\tif (currentCardValue > 10)\n\t\t{\n\t\t\tcurrentCardValue = 10;\n\t\t}\n\t\t\n\t\tif (currentHand == true)\n\t\t{\n\t\t\tindividualHand.SetUserHandSum(currentCardValue);\n\t\t}\n\t\telse if (currentHand == false)\n\t\t{\n\t\t\tif (individualHand.GetDealerAceFlag())\n\t\t\t{\n\t\t\t\tint temp = (individualHand.GetDealerHandSum()+11);\n\t\t\t\tif ( temp > 17 && temp <= 21)\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(11);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t\telse if (temp > 21)\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(currentCardValue);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t\telse if (temp > 11)\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(currentCardValue);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(temp);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tindividualHand.SetDealerHandSum(currentCardValue);\n\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public Card(int rank, int suit) {\n this.rank = rank;\n this.suit = suit;\n\n String fName = \"images\" + File.separator + this.toString().toLowerCase() + \".gif\";\n try {\n this.img = javax.imageio.ImageIO.read(new File(fName));\n }\n catch (java.io.IOException ioe) {\n System.out.println(fName + \" not found.\");\n }\n }", "public Deck() {\n this.cards = new Card[STANDARD_DECK_SIZE];\n this.topCardIndex = 0;\n int cardIndex = 0;\n int DeckLength = this.cards.length;\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }", "public Card(int order) {\n if (order <= 13) {\n this.suit = \"Clubs\";\n } else if (order > 13 && order <= 26) {\n this.suit = \"Diamonds\";\n } else if (order > 26 && order <= 39) {\n this.suit = \"Hearts\";\n } else if (order > 39 && order <= 52) {\n this.suit = \"Spades\";\n } else {\n System.out.println(\"Not a valid input\");\n return;\n }\n\n this.value = FACECARDS[(order) % 13];\n }", "private List<Card> setupDeck(){\n List<Card> llist = new LinkedList<Card>();\n String[] faceCards = {\"J\",\"Q\",\"K\",\"A\"};\n String[] suits = {\"spades\",\"clubs\",\"diamonds\",\"hearts\"};\n\n for(int i=2; i<=10; i++){\n for(int j=1; j<=4; j++){\n llist.add(new Card(Integer.toString(i), suits[j-1], j, i));\n }\n }\n for(int k=1; k<=4; k++){\n for(int l=1; l<=4; l++){\n llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));\n }\n }\n return llist;\n }", "public void generateDeck() {\n\t\tList<String> valueList = Arrays.asList(\"Ace\", \"2\", \"3\",\"4\", \"5\", \"6\",\"7\", \"8\", \"9\",\"10\", \"Jack\", \"Queen\",\"King\");\n\t\tList<String> suitList = Arrays.asList(\"Diamonds\", \"Spades\", \"Clubs\", \"Hearts\");\n\t\tvalues.addAll(valueList);\n\t\tsuits.addAll(suitList);\n\t\t\n\t\t//adding card objects to deckOfCards arraylist\n\t\tint i = 1;\n\t\twhile(i<=52){\n Card card = new Card(values.get(random.nextInt(13)), suits.get(random.nextInt(4)));\n if (!deckOfCards.contains(card)) {\n deckOfCards.add(card);\n i++;\n }else{\n\n }\n }\n\t}", "public Deck( ) {\r\n int ordinal;\r\n alalSets = new ArrayList<>();\r\n \r\n // load the cards\r\n for ( ordinal = 1; ordinal <= 13; ordinal++) {\r\n for( int iCount = 1; iCount <= 4; iCount++) {\r\n // the deck adds one set which contains one card\r\n \r\n ArrayList<Card> redCardSet = new ArrayList<>();\r\n Card redCard = new Card();\r\n redCard.value = ordinal;\r\n redCard.color = Enums.RED;\r\n redCardSet.add(redCard); // add card to set\r\n alalSets.add( redCardSet ); // add set to deck\r\n\r\n ArrayList<Card> blackCardSet = new ArrayList<>();\r\n Card blackCard = new Card();\r\n blackCard.value = ordinal;\r\n blackCard.color = Enums.BLACK;\r\n blackCardSet.add(blackCard);\r\n alalSets.add( blackCardSet );\r\n }\r\n }\r\n }", "public Card(int value2, int suit2, String path2) {\r\n\t\tif (suit2 != SPADES && suit2 != HEARTS && suit2 != DIAMONDS && suit2 != CLUBS)\r\n\t\t\tthrow new IllegalArgumentException(\"Illegal playing card suit\");\r\n\t\tif (value2 < 1 || value2 > 13)\r\n\t\t\tthrow new IllegalArgumentException(\"Illegal playing card value\");\r\n\t\tvalue = value2;\r\n\t\tsuit = suit2;\r\n\t\tpath = path2;\r\n\t}", "public Card(int rank, int suit)\r\n throws InvalidRankException,\r\n InvalidSuitException {\r\n if (!isValidRank(rank)) {\r\n throw new InvalidRankException(rank);\r\n }\r\n\r\n if (!isValidSuit(suit)) {\r\n throw new InvalidSuitException(suit);\r\n }\r\n\r\n this.rank = rank;\r\n this.suit = suit;\r\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "public Card(String[] card) {\r\n\t\tthis.deckIndex = Integer.parseInt(card[0]);\r\n\t\tthis.suit = (char) Integer.parseInt(card[1]);\r\n\t\tthis.name = (char) Integer.parseInt(card[2]);\r\n\t\tthis.ordinal = Integer.parseInt(card[3]);\r\n\t\tthis.value = Integer.parseInt(card[4]);\r\n\t}", "Cards(String cardName, String cardDes, int puntosHabilidad) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = puntosHabilidad;\n }", "public Card() { this(12, 3); }" ]
[ "0.81569695", "0.80777717", "0.7930015", "0.7816109", "0.7746628", "0.77247506", "0.7703994", "0.7671628", "0.7654301", "0.7547881", "0.74657995", "0.7420369", "0.73018736", "0.72990716", "0.7275876", "0.7232568", "0.7229707", "0.7184961", "0.694859", "0.6905927", "0.68710786", "0.6842075", "0.6790837", "0.67821056", "0.6764155", "0.67565566", "0.6723909", "0.6641584", "0.6639422", "0.65922326", "0.65883493", "0.6584076", "0.6564148", "0.6556278", "0.6520335", "0.6470575", "0.64618", "0.64492655", "0.6432289", "0.64197093", "0.64086014", "0.6407199", "0.6406899", "0.6390238", "0.6389962", "0.6384042", "0.6365338", "0.6362202", "0.6319711", "0.6315819", "0.6314984", "0.63140297", "0.63129026", "0.6289755", "0.62408787", "0.62395805", "0.62345123", "0.6229797", "0.61869216", "0.6179215", "0.61768746", "0.61751467", "0.61581415", "0.6148944", "0.6121097", "0.6117398", "0.6086163", "0.6077249", "0.60589737", "0.6054964", "0.6050169", "0.60444754", "0.6017801", "0.5988697", "0.59746665", "0.5968264", "0.5940237", "0.5923234", "0.5917906", "0.5917472", "0.5908728", "0.5864775", "0.58630097", "0.5846393", "0.58451277", "0.5844767", "0.5828532", "0.58258957", "0.58258134", "0.58155775", "0.5813015", "0.5778196", "0.5762717", "0.5756457", "0.57487816", "0.57305235", "0.5720847", "0.57156366", "0.56491137", "0.5647984" ]
0.5667926
98
Constructs a card object with the specified face_value, suit, and faceUp values.
public PlayingCard(int newFace, int newSuit, boolean newUp){ super(newFace, newSuit, newUp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card(Suit suit, CardValue value,boolean isFaceDown) {\n this.suit = suit;\n this.cardValue = value;\n this.isFaceDown = isFaceDown;\n }", "public Card(Suit suit, CardValue value) {\n this.suit = suit;\n this.cardValue = value;\n isFaceDown = true;\n }", "public Card(String faceName, String suit, int faceValue) {\n\n setFaceName(faceName);\n setSuit(suit);\n setFaceValue(faceValue);\n }", "public Card(Suit suit, Face face) {\n\t\tthis.suit = suit;\n\t\tthis.face = face;\n\t}", "public Card(String cardFace, String cardSuit) {\r\n this.face = cardFace; // initialize face of card\r\n this.suit = cardSuit; // initialize suit of card\r\n }", "public Card(String inFaceValue, int inTrueValue, String inSuit, ImageIcon inPicture)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value\n\tfaceValue = inFaceValue;\n\n\t// Set true value\n\ttrueValue = inTrueValue;\n\n\t// Set suit\n\tsuit = inSuit;\n\n\t// Set picture\n\tpicture = inPicture;\n\n }", "public Card(int value, int suit) {\n if (value <= 13 && value >= 1 && suit <= 4 && suit >= 1) {\n this.faceUp = false;\n this.value = value;\n this.suit = suit;\n if (suit == 1 || suit == 4) {\n this.color = CardColor.BLACK;\n } else {\n this.color = CardColor.RED;\n }\n } else {\n throw new IllegalArgumentException(\"Invalid Card\");\n }\n }", "public Card(Suit suit, Value value){\n this.value = value;\n this.suit = suit;\n }", "public Card(String faceName, String suit) {\n setFaceName(faceName);\n setSuit(suit);\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public Card(Rank rank, Suit suit) {\r\n\t\tthis.rank = rank;\r\n\t\tthis.suit = suit;\r\n\t\tfaceUp = true;\r\n\t}", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }", "public Card(String suit,int value)\n\t{\n\t\tthis.suit=suit;\n\t\tthis.value=value;\n\t}", "public Cards(String cardFace, String cardSuit) {\n\t\t// face of the card\n\t\tface = cardFace;\n\t\t// suit of the card\n\t\tsuit = cardSuit;\n\t}", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }", "public Card(Image faceUp) {\n\t\t\tthis.faceUp = faceUp;\n\t\t\tshowing.setImage(faceUp); //When a Card object is created, it initially shows the face-up image\n\t\t}", "public BJCard(Suit s, Value gVal)\r\n {\r\n suit = s;\r\n value= gVal;\r\n }", "public Card(String suit, String rank, int value)\t\r\n\t{\r\n\t\tthis.suit = suit;\r\n\t\tthis.rank = rank;\r\n\t\tthis.value = value;\r\n\t}", "public Card(char value, Suit suit) {\n this.set(value, suit);\n }", "public BlackjackCard(Suit suit, int value){\r\n\t\tthis.suit = suit;\r\n\t\tthis.value = value;\r\n\t}", "public poker_class ()\n\t{\n\t face = \"Two\";\n\t suit = \"Clubs\";\n\t}", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public Card (Suit s, int v) {\n suit = s;\n val = v;\n }", "public void buildCards(){\n\t\tfor(Suit suit: Suit.values()){\n\t\t\tfor(Face face: Face.values()){\n\t\t\t\tcards.add(new Card(face, suit));\n\t\t\t}\n\t\t}\n\t}", "public Card(int value, int suit) {\n if (value < 2 || value > 14 || suit < 0 || suit > 3) {\n throw new IllegalArgumentException(\"invalid card\");\n }\n this.value = value;\n this.suit = suit;\n }", "public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }", "public Card(){\n suit = 0;\n rank = 0;\n }", "public Card(FrontFace frontFace, BackFace backFace) {\n this.frontFace = frontFace;\n this.backFace = backFace;\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }", "public Card(String cardRank, String cardSuit, int cardPointValue) {\r\n\t\t/* *** TO BE IMPLEMENTED IN ACTIVITY 1 *** */\r\n rank = cardRank;\r\n suit = cardSuit;\r\n pointValue = cardPointValue;\r\n \r\n\t}", "public Card(int deckValue){\n\t\t\n\t\t//Guard against an invalid state:\n\t\tif((deckValue < 1) || (deckValue > 52))\n\t\t{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t\n\t\tthis.deckValue = deckValue;\n\t\tfaceValue = toFaceValue(deckValue);\n\t\tsuitValue = toSuitValue(deckValue);\n\t}", "public Card (char inSuit, int inFace) {\r\n\t\tif (!setSuit(inSuit)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect suit: \" + inSuit);\r\n\t\t\tSystem.out.println(\"Setting suit to: \" + DEFAULT_SUIT);\r\n\t\t}\r\n\t\t\r\n\t\tif (!setFace(inFace)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect face: \" + inFace);\r\n\t\t\tSystem.out.println(\"Setting face to: \" + DEFAULT_FACE);\r\n\t\t}\r\n\t\t\r\n\t\t// not a wildcard by default\r\n\t\twildcard = false;\r\n\t}", "public Card(int suit, int rank) {\n\n // pre-condition: suit and rank are valid\n \n this.suit = suit;\n this.rank = rank;\n }", "public Card() {\n\t\tthis.suit = \" \";\n this.rank = 0;\n this.face = \" \";\n this.color = \" \";\n\t}", "public void createFullDeck(){\n for(Suit cardSuit: Suit.values()){\n //iterating over all the values\n for(Value cardValue: Value.values()){\n cards.add(new Card(cardSuit,cardValue));\n }\n }\n }", "public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }", "public Card(int cardRank, int cardSuit){\n this.rank = cardRank;\n this.suit = cardSuit;\n }", "public CardDetail(String suit, String rank){\r\n this.suit = suit;\r\n this.rank = rank;\r\n }", "public DeckGenerator(Class<? extends Enum<?>> value, \n Class<? extends Enum<?>> suit, Game game) {\n this.value = value;\n this.suit = suit;\n this.game = game;\n }", "public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }", "public Card(int suitInt, int valueA)\r\n {\r\n \r\n if( suitInt == 1)\r\n suit = \"SPADE\";\r\n if(suitInt == 2)\r\n suit = \"CLUB\";\r\n if(suitInt == 3)\r\n suit = \"HEART\";\r\n if(suitInt == 4)\r\n suit = \"DIAMOND\";\r\n \r\n card = CARDS[valueA-1];\r\n try{\r\n image = ImageIO.read(new File(card+\"_\"+suit+\".jpg\"));\r\n }\r\n catch(Exception e){}\r\n \r\n if(valueA >= 11)\r\n value = 10;\r\n else\r\n value = valueA;\r\n if(valueA == 1)\r\n value = 11;\r\n }", "public Card(short rank, short suit){\r\n this.rank = rank;\r\n this.suit = suit;\r\n }", "public static CardState of(Deck<Card> deck){\n Preconditions.checkArgument(deck.size() >= FACE_UP_CARDS_COUNT);\n // draw the first 5 cards from the deck; they constitute the face-up cards\n List<Card> faceUpCards = new ArrayList<>();\n // deck without 5 top cards after for-loop\n for(int slot : FACE_UP_CARD_SLOTS) {\n faceUpCards.add(deck.topCard());\n deck = deck.withoutTopCard();\n }\n // empty discard pile\n SortedBag<Card> discards = SortedBag.of();\n return new CardState(faceUpCards, deck, discards);\n }", "public static int toDeckValue(int faceValue, int suitValue)\n\t\t{\n\t\t\tif((faceValue < 2) || (suitValue > 14))\n\t\t\t{\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\t\t\tif((suitValue < 1) || (suitValue > 4))\n\t\t\t{\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\t\t\t\n\t\t\tint deckValue = (13 * (suitValue - 1)) + faceValue - 1;\n\t\t\treturn deckValue;\n\t\t}", "public Card(int type, int suit) {\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[type];\n this.suit = allSuits[suit];\n }", "public Card(Rank rank, Suit suit)\n\t{\n\t\tthis.rank = rank;\n\t\tthis.suit = suit;\n\t}", "public Builder setCards(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n cards_ = value;\n onChanged();\n return this;\n }", "public Card(int tempNum, int tempSuit)\n {\n num = tempNum;\n suit = tempSuit;\n }", "public Card(int cType, char suit, int value){\n this.cardType = cType;\n this.cardRank = value;\n this.cardSuit = suit;\n scaleCard(this.cardType);\n if(cType == 1) {\n cardId = getId(suit, value);\n }\n this.isClick = false;\n this.inValidGroup = false;\n }", "public Card(String suit, String rank){\r\n\t\t\t// assume input is valid!\r\n\t\t\tthis.suit = suit; \r\n\t\t\tthis.rank = rank;\r\n\t\t\tthis.rankValue = new HashMap<String,Integer>(15);\r\n\t\t\tfor(int r = 2; r < RANKS.length; r+=1){\r\n\t\t\t\tthis.rankValue.put(RANKS[r], r);\r\n\t\t\t}\r\n\t }", "public Card(String theSuite, int theValue){\r\n value = theValue;\r\n suite = theSuite;\r\n used = false;\r\n }", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "public Card(int s, int v){\n\t\t//make a card with suit s and value v\n\t\tsuit = s;\n\t\tvalue = v; \n\t\t\n\t}", "public void buildDeck () {\n this.deck = new ArrayList();\n for (ValueType value: ValueType.values()) {\n for(SuitType suit: SuitType.values()) {\n deck.add(new Card(value, suit));\n }\n }\n shuffleDeck();\n }", "public Deck() {\n deck = new ArrayList<>();\n for (Color d : Color.values()) {\n for (Value e : Value.values()) {\n Card c = new Card(d, e);\n deck.add(c);\n }\n }\n }", "public Card(Suit suit, int number) {\n\t\tthis.suit = suit;\n\t\tthis.number = number;\n\t\tswitch(number) {\n\t\t\t//place in CardType\n\t\t\tcase 1:\n\t\t\t\ttype = \"Ace\";\n\t\t\t\tsetNumber(14);\n\t\t\t\tbreak;\n\t\t\tcase 2:\t\t\t\t\n\t\t\t\tmagic = Magic.startAgain;\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tmagic = Magic.seeThrough;\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tmagic = Magic.missAGo;\n\t\t\t\tbreak;\n\t\t\tcase 9: \n\t\t\t\tmagic = Magic.playBelow;\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tmagic = Magic.burn;\n\t\t\tcase 11:\n\t\t\t\ttype = \"Jack\";\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttype = \"Queen\";\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttype = \"King\";\n\t\t\t\tbreak;\n\t\t}\n\t\tif(number > 1 && number < 11) {\n\t\t\ttype = Integer.toString(number);\n\t\t}\n\t}", "public Card(String s, int c)\r\n { suit = s;\r\n count = c;\r\n }", "private void SetUpCard(boolean currentHand)\n\t{\n\t\tVector<JTextField> vectorOfTextFields = individualHand.GetVectorOfTextFields();\n\t\tindividualHand.SetTextFieldHolder(vectorOfTextFields.get(individualHand.GetCounter()));\n\t\tJTextField textField = individualHand.GetTextFieldHolder();\n\t\t\n\t\t// Generate Card Value and card color\n\t\tint currentCardValue = individualHand.GenerateCardValue();\n\t\tindividualHand.RedOrBlack(textField);\n\t\ttextField.setText(individualHand.CardFaceValue(currentCardValue));\n\t\t\n\t\t// set face card values to 10 if they are not Aces\n\t\tif (currentCardValue > 10)\n\t\t{\n\t\t\tcurrentCardValue = 10;\n\t\t}\n\t\t\n\t\tif (currentHand == true)\n\t\t{\n\t\t\tindividualHand.SetUserHandSum(currentCardValue);\n\t\t}\n\t\telse if (currentHand == false)\n\t\t{\n\t\t\tif (individualHand.GetDealerAceFlag())\n\t\t\t{\n\t\t\t\tint temp = (individualHand.GetDealerHandSum()+11);\n\t\t\t\tif ( temp > 17 && temp <= 21)\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(11);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t\telse if (temp > 21)\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(currentCardValue);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t\telse if (temp > 11)\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(currentCardValue);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tindividualHand.SetDealerHandSum(temp);\n\t\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tindividualHand.SetDealerHandSum(currentCardValue);\n\t\t\t\tindividualHand.SetDealerAceFlag(false);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public Deck() {\n deck = new LinkedList<>();\n for (int i = 1; i < FACE_VALUES + 1; i++) {\n deck.add(new Card(i, SPADES));\n deck.add(new Card(i, CLUB));\n deck.add(new Card(i, DIAMOND));\n deck.add(new Card(i, HEART));\n }\n }", "public void createDeck() {\n\t\t// for loop that repeats 4 times - one for each suit\n\t\tfor (String suit : suits) {\n\t\t\t// for loop that repeats 13 times (2-14) - once for each value\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\t//create instance of new card createCard(value, name);\n\t\t\t\tCard card = new Card(i, suit);\n\t\t\t\t//add card to deck array\n\t\t\t\taddCardToDeck(card);\n\t\t\t}\t\n\t\t}\n\t}", "public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }", "private List<Card> setupDeck(){\n List<Card> llist = new LinkedList<Card>();\n String[] faceCards = {\"J\",\"Q\",\"K\",\"A\"};\n String[] suits = {\"spades\",\"clubs\",\"diamonds\",\"hearts\"};\n\n for(int i=2; i<=10; i++){\n for(int j=1; j<=4; j++){\n llist.add(new Card(Integer.toString(i), suits[j-1], j, i));\n }\n }\n for(int k=1; k<=4; k++){\n for(int l=1; l<=4; l++){\n llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));\n }\n }\n return llist;\n }", "@Override\n public void createDeck(){\n for (char suit:standardSuits) {\n for (Map.Entry<Character, Integer> item:deckCards.entrySet()) {\n Card card = new Card(item.getKey(),item.getValue(),suit);\n deckOfCards.add(card);\n }\n }\n }", "public CluedCard(GameMode mode) {\n\t\tthis(null, null, mode);\n\t}", "public SpadeCard(int value)\n\t{\n\t\tsuper(value);\n\t\tweight = 0;\n\t\t\n\t\tswitch(value)\n\t\t{\n\t\tcase 0:\n\t\t\tpicPath = \"pictures/cards_PNG/3_of_spades.png\";\n\t\t\tbreak;\t\t\n\t\tcase 1:\n\t\t\tpicPath = \"pictures/cards_PNG/4_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tpicPath = \"pictures/cards_PNG/5_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tpicPath = \"pictures/cards_PNG/6_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tpicPath = \"pictures/cards_PNG/7_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tpicPath = \"pictures/cards_PNG/8_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tpicPath = \"pictures/cards_PNG/9_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tpicPath = \"pictures/cards_PNG/10_of_spades.png\";\n\t\t\tbreak;\n\t\t\n\t\t\t\n\t\tcase 8:\n\t\t\tpicPath = \"pictures/cards_PNG/jack_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tpicPath = \"pictures/cards_PNG/queen_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tpicPath = \"pictures/cards_PNG/king_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tpicPath = \"pictures/cards_PNG/ace_of_spades.png\";\n\t\t\tbreak;\n\t\t\t\n\t\tcase 12:\n\t\t\tpicPath = \"pictures/cards_PNG/2_of_spades.png\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tpicPath = \"pictures/cards_PNG/black_joker.png\";\n\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\ttry {\n\t\t\timg = ImageIO.read(new File(picPath));\n\t\t}catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public Deck()\n {\n deck = new Stack<Card>();\n /* Increments through each suit, and then for each suit through each rank,\n * and pushes a\n * new card with the corresponding information onto the deck.\n */\n /* The above comment did not show up in the checkstyle. */\n for (Suit suit : Suit.values())\n {\n /* Increments through each card value. */\n for (CardValue value : CardValue.values())\n {\n deck.push(new Card(suit, value));\n }\n }\n Collections.shuffle(deck);\n }", "public KCard (Card.Color c, int value) {\n this.color = c;\n this.value = value;\n }", "public static void setMyCards() {\n for (Suit s: Suit.values()){\n for (FaceValue f: FaceValue.values()){\n Card c = new Card(s,f);\n myCards.add(c);\n }\n }\n }", "public Card(boolean vis, int suit, Integer... vals) {\r\n\t\tvalues = Arrays.asList(vals);\r\n\t\tthis.suit = suit;\r\n\t\tthis.visible = vis;\r\n\t}", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public PlayingCard(int newFace, int newSuit){\n\t\tsuper(newFace, newSuit);\n\t}", "public Card() {\n var random = new SecureRandom();\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[random.nextInt(10)];\n this.suit = allSuits[random.nextInt(4)];\n }", "public PlayingCard(int newFace){\n\t\tsuper(newFace);\n\t}", "public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}", "public Card(int s, int r)\n {\n suit = s;\n rank = r;\n }", "public Card (int cardNumber, String cardSuit, Image cardFront, Image cardBack) \r\n\t{\r\n\t\t//Updating Global Card Number\r\n\t\tthis.cardNumber = cardNumber;\r\n\t\t\r\n\t\t//Updating Global Card Suit\r\n\t\tthis.cardSuit = cardSuit;\r\n\t\t\r\n\t\t//Updating Global Card Front\r\n\t\tthis.cardFront = cardFront;\r\n\t\t\r\n\t\t//Updating Global Card Back\r\n\t\tthis.cardBack = cardBack;\r\n\t}", "public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}", "public Card(CardRank rank, CardSuit suit) {\n\t\tthis.rank = rank;\n\t\tthis.suit = suit;\n\t}", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "public Card playCard(Card card, Deck faceDown, Deck faceUp, Card.Face face, Card.Suit suit) {\n if (card == faceDown.peekTopCard()) {\n drawCard(faceDown);\n return card;\n }\n else if (accordingToRules(card, face, suit)) {\n this.putDownCard(faceUp, card);\n return card;\n }\n else {\n return null;\n }\n }", "public Card(int rank, int suit) {\n this.rank = rank;\n this.suit = suit;\n\n String fName = \"images\" + File.separator + this.toString().toLowerCase() + \".gif\";\n try {\n this.img = javax.imageio.ImageIO.read(new File(fName));\n }\n catch (java.io.IOException ioe) {\n System.out.println(fName + \" not found.\");\n }\n }", "public Deck() {\n this.cards = new Card[STANDARD_DECK_SIZE];\n this.topCardIndex = 0;\n int cardIndex = 0;\n int DeckLength = this.cards.length;\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }", "public Card(String name) {\n setValue(name);\n }", "public DeckOfCards() {\n\n String faces[] = {\"Ace\", \"Deuce\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\n String suits[] = {\"Hearts\", \"Diamonds\", \"Clubs\", \"Spades\"};\n\n deck = new Card[NUMBER_OF_CARDS]; //create an array of card objects (52)\n currentCard = 0;\n randomNumbers = new Random();\n\n //Populate deck with card objects\n for(int count = 0; count < deck.length; count++){\n deck[count] = new Card(faces[count % 13], suits[count / 13]);\n //first 13 cards will be ace through king of hearts then ace though king of diamonds etc...\n\n }\n\n }", "public Card(int s, int r){\n suit = s;\n rank = r;\n }", "private Pile createDeck() {\n \t\tPile deck = new Pile(\"deck\"); // TODO Refactor, no hardcoded string\n\t\tpileNames.add(\"deck\");\n \t\tfor (Suit suit : Suit.values()) {\n \t\t\tfor (Rank rank : Rank.values()) {\n \t\t\t\tdeck.addCard(new Card(suit, rank));\n \t\t\t}\n \t\t}\n \t\t// Put the deck at the middle of the table\n \t\tmTable.set(MID_OF_TABLE, deck);\n \t\treturn deck;\n \t}", "public CardState withDrawnFaceUpCard(int slot){\n Preconditions.checkArgument(!isDeckEmpty());\n Objects.checkIndex(slot, FACE_UP_CARDS_COUNT);\n // new Deck from which the top card has been drawn\n Deck<Card> withoutTopCard = deck.withoutTopCard();\n // copy of faceUpCards\n List<Card> faceUpCards = new ArrayList<>(faceUpCards());\n // replace the card at the specified slot with the top card from the deck\n faceUpCards.set(slot, deck.topCard());\n return new CardState(faceUpCards, withoutTopCard, discards);\n }", "public Card(String type,String value)\n {\n this.type = type;\n this.value = value;\n }", "private void generateDeckOfCards() {\n this.cards = new ArrayList<Card>(Suit.values().length * Rank.values().length);\n for (Suit suit : Suit.values()) {\n for (Rank rank : Rank.values()) {\n cards.add(new Card(suit, rank));\n }\n }\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "public void addCardFaceUp(Card c){\n c.setFaceUp();\n pile[pilePlace] = c;\n pilePlace++;\n }", "public TrainCardDeck(){\n this.cardDeck = new ArrayList<>();\n \n //110 Train Car cards (12 each of Box-PINK, Passenger-WHITE, Tanker-BLUE, Reefer-YELLOW, \n //Freight-ORANGE, Hopper-BLACK, Coal-RED, Caboose-GREEN, plus 14 Locomotives-RAINBOW)\n \n for(int i = 1 ; i <= 12 ; i++){\n for(VALUE color : VALUE.values()){\n cardDeck.add(new TrainCard(color));\n }\n }\n cardDeck.add(new TrainCard(RAINBOW));\n cardDeck.add(new TrainCard(RAINBOW));\n }", "public Card(URL url) {\n\t\timageLink = url;\n\t\tfaceUp = false;\n\t\tinPlay = true;\n\t}", "public ArrayList<Card> create(){\n \n ArrayList<Card> deck = new ArrayList<Card>();\n \n // If the value enum class implements the Special interface, the \n // method will generate objects of the SpecialCard class.\n boolean specialDeck = Special.class.isAssignableFrom(this.value);\n \n // Loop through all the constants in the value enum class\n for(Object o: value.getEnumConstants()) {\n Value cardValue = (Value)o;\n \n // How many sets of each suit will this value have?\n int numSets = cardValue.getNumSuitSets();\n \n // Generate all the necessary copies of each suit for that value\n for (int i = 1; i <= numSets; i++) {\n \n for(Object p: suit.getEnumConstants()) {\n Suit cardSuit = (Suit)p;\n Card card = specialDeck? \n new SpecialCard(cardValue, cardSuit, this.game) : \n new NumberedCard(cardValue, cardSuit, this.game);\n deck.add(card);\n } \n }\n \n }\n \n return deck;\n }", "private Deck()\n\t{\n\t\tfor (Suit s : Suit.values())\n\t\t\tfor(Rank r : Rank.values())\n\t\t\t\tcards.add(new Card(s,r));\n\t}", "public void setCardSuit(String suit) {\n this.Csuit = suit;\n }", "public Deck( ) {\r\n int ordinal;\r\n alalSets = new ArrayList<>();\r\n \r\n // load the cards\r\n for ( ordinal = 1; ordinal <= 13; ordinal++) {\r\n for( int iCount = 1; iCount <= 4; iCount++) {\r\n // the deck adds one set which contains one card\r\n \r\n ArrayList<Card> redCardSet = new ArrayList<>();\r\n Card redCard = new Card();\r\n redCard.value = ordinal;\r\n redCard.color = Enums.RED;\r\n redCardSet.add(redCard); // add card to set\r\n alalSets.add( redCardSet ); // add set to deck\r\n\r\n ArrayList<Card> blackCardSet = new ArrayList<>();\r\n Card blackCard = new Card();\r\n blackCard.value = ordinal;\r\n blackCard.color = Enums.BLACK;\r\n blackCardSet.add(blackCard);\r\n alalSets.add( blackCardSet );\r\n }\r\n }\r\n }" ]
[ "0.79750127", "0.79010993", "0.7735792", "0.75518626", "0.7448972", "0.7339664", "0.73266286", "0.7326509", "0.72192264", "0.72028553", "0.7152149", "0.70383245", "0.7007701", "0.6968556", "0.6908577", "0.6885942", "0.6878877", "0.6875985", "0.6765614", "0.67470646", "0.67369556", "0.6730779", "0.67047", "0.6616957", "0.659785", "0.65541947", "0.65393394", "0.64905566", "0.64785475", "0.6477132", "0.6469469", "0.6435842", "0.64205563", "0.6415043", "0.6317497", "0.627297", "0.62680393", "0.6260112", "0.62544125", "0.62440675", "0.623586", "0.62338614", "0.6225975", "0.62012655", "0.6194386", "0.6176229", "0.61727095", "0.6159985", "0.6154974", "0.6148942", "0.6146321", "0.6139882", "0.61255467", "0.6110506", "0.6092116", "0.60852504", "0.6046488", "0.60396796", "0.6037813", "0.6035307", "0.60282624", "0.6001444", "0.59976286", "0.5993148", "0.5983818", "0.5957682", "0.5950021", "0.5938998", "0.59060574", "0.5899714", "0.58982104", "0.58892715", "0.5872404", "0.58685154", "0.5865273", "0.58620816", "0.58313525", "0.5810492", "0.58081657", "0.58049184", "0.5777856", "0.5767844", "0.57633543", "0.57557803", "0.5750748", "0.5748988", "0.5746954", "0.5738452", "0.57341224", "0.5727859", "0.5726433", "0.57197535", "0.57147163", "0.5707711", "0.5666115", "0.56226146", "0.56208146", "0.5608675", "0.5606931", "0.5578" ]
0.6206084
43
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.id
public String getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public int getId() {\n return orderID;\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "public Integer\t\tgetOrderID();", "public Long getItemId() {\r\n return itemId;\r\n }", "private int ricavaID(String itemSelected){\n String ogg = ricavaNome(itemSelected);\n String schema = ricavaSchema(itemSelected);\n int id = -1;\n \n Statement stmt; \n ResultSet rst;\n \n try{\n stmt = Database.getDefaultConnection().createStatement();\n \n if(modalita == TRIGGER)\n rst = stmt.executeQuery(\"SELECT T.id_trigger FROM trigger1 T WHERE T.nomeTrigger = '\" + ogg + \"' AND T.schema = '\" + schema + \"'\");\n else\n rst = stmt.executeQuery(\"SELECT P.ID_procedura FROM Procedura P WHERE P.nomeProcedura = '\" + ogg + \"' AND P.schema = '\" + schema + \"'\");\n \n while(rst.next()){\n id = rst.getInt(1);\n }\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n \n return id;\n }", "public long getItemShopBasketId();", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "public Long getOrderid() {\r\n return orderid;\r\n }", "public int getItemId()\r\n {\r\n return _itemId;\r\n }", "public int getItemId() {\n return itemId;\n }", "public int getOrderID() {\n return orderID;\n }", "public final ItemId getId() {\r\n return null;\r\n }", "public int getOrderID() {\r\n return emporderID;\r\n }", "public Integer getItemid() {\n return itemid;\n }", "public Integer getItemid() {\n return itemid;\n }", "int getItemId() {\n return m_itemId;\n }", "long getID(Object item);", "io.dstore.values.IntegerValue getOrderPersonId();", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "@Override\r\n public int getItemId() {\n return this.itemId;\r\n }", "public int getItemId() {\n\t\treturn id;\n\t}", "public int getOrderID()\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(ORDERID$0, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }", "public Integer getOrderId() {\n return orderId;\n }", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "public String getItemId() {\r\n return itemId;\r\n }", "public static int insert(OrderItems order) {\r\n\t\tConnection dbConnection = ConnectionFactory.getConnection();\r\n\r\n\t\tPreparedStatement insertStatement = null;\r\n\t\tint insertedId = -1;\r\n\t\ttry {\r\n\t\t\tinsertStatement = dbConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\r\n\t\t\tinsertStatement.setInt(1, order.getIdOrder());\r\n\t\t\tinsertStatement.setString(2, order.getNumeClient());\r\n\t\t\tinsertStatement.setString(3, order.getDenumireProdus());\r\n\t\t\tinsertStatement.setInt(4, order.getCantitate());\r\n\t\t\tinsertStatement.executeUpdate();\r\n\r\n\t\t\tResultSet rs = insertStatement.getGeneratedKeys();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tinsertedId = rs.getInt(1);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println( \"OrderItemsDAO:insert \" + e.getMessage());\r\n\t\t} finally {\r\n\t\t\tConnectionFactory.close(insertStatement);\r\n\t\t\tConnectionFactory.close(dbConnection);\r\n\t\t}\r\n\t\treturn insertedId;\r\n\t}", "public int getOrderId() {\n return orderId;\n }", "@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}", "@Column(name = \"order_id\", precision = 10)\n @GeneratedValue\n @Id\n public Integer getOrderId() {\n return orderId;\n }", "public String getItemId() {\n return itemId;\n }", "public int getItemID()\n {\n return itemID;\n }", "public Integer getId() {\n\t\treturn wishlistItemId;\n\t}", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public Integer getId()\r\n\t\t{ return mapping.getId(); }", "int getItemID();", "@Override\r\n\tpublic OrderVO getOrderByID(Integer ono) throws Exception {\n\t\treturn sqlSession.selectOne(namespaceOrder+\".getOneOrderByOrderID\",ono);\r\n\t}", "private int getOrderId() {\n int orderId;\n try {\n if (orderIdField.getText().isEmpty()) {\n orderId = -1;\n }\n else {\n orderId = Integer.parseInt(orderIdField.getText());\n }\n } catch (NumberFormatException exc) {\n orderId = -1;\n }\n return orderId;\n }", "@Override\n public long getItemId(int itemId) {\n return itemId;\n }", "public String getOrderid() {\n return orderid;\n }", "public Long getOrderId() {\n return orderId;\n }", "public Long getOrderId() {\n return orderId;\n }", "public Integer getId() {\n return (Integer) get(\"id\");\n }", "public Integer getId() {\n return aao.getId();\n }", "public Number getInventoryItemId() {\n return (Number)getAttributeInternal(INVENTORYITEMID);\n }", "public Number getInventoryItemId() {\n return (Number)getAttributeInternal(INVENTORYITEMID);\n }", "public String getItemId(){\r\n\t\treturn \"\";\r\n\t}", "public int obtId() {\r\n\t\treturn id;\r\n\t}", "public String getOrderID() {\n return this.orderID;\n }", "public Integer getId()\n\t{\n\t\treturn this.id; \n\t}", "public Integer getId() {\r\n return this.id;\r\n }", "public String getOrderID() {return orderID;}", "@Override\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t}", "public String getItemID() {\n\t return this.itemID;\n\t}", "public String getOrderId(JsonObject order) {\r\n\t\tint orderID = 0;\r\n\t\tString customerId = order.get(\"customerId\").getAsString();\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT * FROM home_heating_fuel_orders\" + \" WHERE customerID = '\" + customerId + \"';\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\torderID = Math.max(rs.getInt(\"orderID\"), orderID);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\t\treturn orderID + \"\";\r\n\t}", "public String inventoryItemId() {\n return this.innerProperties() == null ? null : this.innerProperties().inventoryItemId();\n }", "public Integer getId() {\n return (Integer) get(0);\n }", "public Integer getId() {\n\t\treturn this.id;\n\t}", "public long getShopBasketId();", "@Override\r\n\tpublic Long getID(ProductIngredientParam param) {\n\t\treturn param.getId();\r\n\t}", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}", "public Integer getId() { return this.id; }", "public Integer getId() \r\n\t{\r\n\t\treturn id;\r\n\t}", "public Integer getId(){\n\t\treturn id;\n\t}", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }" ]
[ "0.72500956", "0.7186681", "0.6583137", "0.6514762", "0.62929153", "0.61975974", "0.6179759", "0.614897", "0.6134655", "0.6124596", "0.6109043", "0.61052835", "0.6073973", "0.6060058", "0.6057571", "0.6040317", "0.6040317", "0.60236454", "0.59927404", "0.59926", "0.59819156", "0.5974358", "0.596389", "0.59610873", "0.5959523", "0.59552723", "0.5947464", "0.59449536", "0.5924432", "0.5905108", "0.5902656", "0.5901155", "0.58778214", "0.58714646", "0.5870348", "0.5855404", "0.5849548", "0.5839621", "0.58360046", "0.58231336", "0.58098066", "0.5807195", "0.5795805", "0.5795805", "0.5794245", "0.57691306", "0.5764395", "0.5764395", "0.5761262", "0.5751193", "0.57334554", "0.5725601", "0.5716536", "0.5701983", "0.57006544", "0.5695109", "0.56919336", "0.5683137", "0.5680608", "0.56798553", "0.5673538", "0.5647595", "0.56465214", "0.56465214", "0.56465214", "0.56465214", "0.5633224", "0.5632728", "0.56254977", "0.562339", "0.56226575", "0.56226575", "0.5622233", "0.5622233", "0.5622233", "0.5622233", "0.5622233", "0.5622233", "0.5622233", "0.5622233", "0.5622233", "0.5622233", "0.5622233", "0.5622233", "0.5618033", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611", "0.5614611" ]
0.0
-1
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.id
public void setId(String id) { this.id = id == null ? null : id.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public void setIdOrder(Long idOrder) {\n this.idOrder = idOrder;\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "@Override\r\n public void setItemId(int itemId) {\n this.itemId = itemId;\r\n }", "public void setOrderID(int orderID)\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(ORDERID$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ORDERID$0);\n }\n target.setIntValue(orderID);\n }\n }", "public void setOrderId(Integer orderId) {\n this.orderId = orderId;\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public int getId() {\n return orderID;\n }", "public void setOrderid(Long orderid) {\r\n this.orderid = orderid;\r\n }", "public void setOrderId(int value) {\n this.orderId = value;\n }", "public void setItem_id(int item_id) {\r\n\t\tthis.item_id = item_id;\r\n\t}", "public void xsetOrderID(org.apache.xmlbeans.XmlInt orderID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(ORDERID$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(ORDERID$0);\n }\n target.set(orderID);\n }\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "public void setId(int id) throws ItemException\n {\n if (id > 0)\n {\n this.id = id;\n }\n else\n {\n Throwable t = new Throwable(\n \"ERROR setId: the item's id value is not a valid positive integer.\");\n throw new ItemException(\"There was a problem with the item's id value to be set.\", t);\n }\n }", "public void setItemId(Long itemId) {\r\n this.itemId = itemId;\r\n }", "@Column(name = \"order_id\", precision = 10)\n @GeneratedValue\n @Id\n public Integer getOrderId() {\n return orderId;\n }", "void setItemId(String itemId);", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "public Long getOrderid() {\r\n return orderid;\r\n }", "@JsonSetter(\"orderId\")\r\n public void setOrderId (int value) { \r\n this.orderId = value;\r\n }", "@Override\n\tpublic void setId(long id) {\n\t\t_buySellProducts.setId(id);\n\t}", "public void writeOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n session.setAttribute(\"orderId\", \"\" + orderId);\n }", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public int getOrderID() {\n return orderID;\n }", "public Builder setItemId(long value) {\n \n itemId_ = value;\n onChanged();\n return this;\n }", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "public void setItemid(Integer itemid) {\n this.itemid = itemid;\n }", "public void setItemid(Integer itemid) {\n this.itemid = itemid;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setItemShopBasketId(long itemShopBasketId);", "public String getOrderID() {return orderID;}", "public void setID(String idIn) {this.id = idIn;}", "public void setOrderId(String orderId) {\n this.orderId = orderId;\n }", "public void setId(int value) {\r\n this.id = value;\r\n }", "public void setId(String agendaItemId) {\r\n if (agendaItemId != null && StringUtils.isBlank(agendaItemId)) {\r\n throw new IllegalArgumentException(\"agendaItemId must be null or non-blank\");\r\n }\r\n\t\t\tthis.id = agendaItemId;\r\n\t\t}", "public void seti_ordertrx_temp_ID (int i_ordertrx_temp_ID);", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "public int getItemId()\r\n {\r\n return _itemId;\r\n }", "public int getOrderID() {\r\n return emporderID;\r\n }", "public void setItemId(int itemId) {\n\t\tthis.itemId = itemId;\n\t}", "public String getOrdersId() {\n return ordersId;\n }", "public void setId(int id)\r\n {\r\n this.mId = id;\r\n }", "public int getOrderId() {\n return orderId;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public Order(int _orderId){\n this.orderId = _orderId;\n }", "public void setID(int value) {\n this.id = value;\n }", "public String getOrderid() {\n return orderid;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "@Override\r\n public void setsaleId(int saleid) {\n this.saleId = saleid;\r\n }", "public int registerOrderItem(OrderItem i) {\n int ok = 0;\n try {\n String query = \"INSERT INTO order_Item (id_Order_Item, amount, product_id_Product, order_id_Order) VALUES (?, ?, ?, ?) ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n\n st.setInt(1, 0);\n st.setInt(2, i.getAmount());\n st.setInt(3, i.getProductIdProduct());\n st.setInt(4, i.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the insert\n st.close(); //Close the Statment\n con.close(); //Close the connection\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ok;\n }", "public void setId(int value) {\n this.id = value;\n }", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethod(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryNoClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "public void setValues(PreparedStatement ps, int i) throws SQLException {\n String id = items.get(i).getTransactionId();\n ps.setString(1, id);\n\t\t\t\t}", "public void setOrder(String id,String email);", "public void setId(String idIn) {\n this.id = idIn;\n }", "public Integer getOrderId() {\n return orderId;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(long id) {\n id_ = id;\n }", "public void setAmazonCustomerId(final Customer item, final String value)\n\t{\n\t\tsetAmazonCustomerId( getSession().getSessionContext(), item, value );\n\t}", "@java.lang.Override\n public long getItemId() {\n return itemId_;\n }", "public Long getItemId() {\r\n return itemId;\r\n }", "public void setId( Integer id )\n {\n this.id = id ;\n }", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "private void setId(Integer id) { this.id = id; }", "@Override\n\tpublic void setId(int id) {\n\t\tthis.ID = id;\n\t}", "public void setOrderbyid(Integer orderbyid) {\r\n this.orderbyid = orderbyid;\r\n }", "public void setId(Integer value) {\n this.id = value;\n }", "@Override\r\n public int getItemId() {\n return this.itemId;\r\n }", "@Override\n public long getItemId(int itemId) {\n return itemId;\n }", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "public void setInventoryItemId(Number value) {\n setAttributeInternal(INVENTORYITEMID, value);\n }", "public void setInventoryItemId(Number value) {\n setAttributeInternal(INVENTORYITEMID, value);\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setM_Product_ID (int M_Product_ID);", "public void setM_Product_ID (int M_Product_ID);" ]
[ "0.67498386", "0.6527157", "0.6445432", "0.6241611", "0.6022422", "0.6022422", "0.6006152", "0.59328556", "0.5924497", "0.5911344", "0.5895054", "0.5887565", "0.5867069", "0.58662677", "0.5826229", "0.5771573", "0.57667774", "0.5744456", "0.5710685", "0.56953764", "0.5653461", "0.5653461", "0.559905", "0.55981857", "0.55800515", "0.55567545", "0.5522243", "0.55210936", "0.55130607", "0.54992807", "0.5497103", "0.5497103", "0.5489794", "0.54848874", "0.5479612", "0.5470998", "0.5466957", "0.54542816", "0.544017", "0.54353756", "0.5434488", "0.5411713", "0.54076487", "0.54064417", "0.5405405", "0.5399121", "0.5395449", "0.5390953", "0.5388149", "0.5381479", "0.5378198", "0.5366878", "0.5366878", "0.5366878", "0.5366878", "0.5366878", "0.5366878", "0.5366878", "0.5366878", "0.5366878", "0.5366841", "0.53635776", "0.536076", "0.53577137", "0.5356835", "0.53560376", "0.5355255", "0.53550214", "0.53540367", "0.53540367", "0.53540367", "0.53540367", "0.53540367", "0.53540367", "0.53540367", "0.53487325", "0.5344311", "0.5342196", "0.5341916", "0.53412455", "0.53390676", "0.53390676", "0.5338067", "0.53376156", "0.5331917", "0.53297085", "0.53247064", "0.53242093", "0.5323229", "0.53198713", "0.53188396", "0.53188396", "0.5317759", "0.5317759", "0.5317759", "0.5317759", "0.5317759", "0.5317759", "0.5317759", "0.5316801", "0.5316801" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.is_del
public Integer getIsDel() { return isDel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getIsdelete() {\n return isdelete;\n }", "public Integer getIsdelete() {\r\n return isdelete;\r\n }", "public Boolean getIsDel() {\n return isDel;\n }", "@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGTShipPosition.getIsDelete();\n\t}", "public Integer getIsdeleted() {\n return isdeleted;\n }", "@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGtStatus.getIsDelete();\n\t}", "public String getIsdelete() {\n return isdelete;\n }", "public String getIsdelete() {\n return isdelete;\n }", "public String getIs_delete() {\n return is_delete;\n }", "public int deleteOrderItem(int d) {\n int ok = 0;\n try {\n String query = \"DELETE FROM order_Item WHERE id_Order_Item = ?;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, d);\n\n ok = st.executeUpdate(); //Execute the Delete\n st.close(); //Close the Statment\n con.close(); //Close the connection\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ok;\n }", "public Integer getIsdelete() {\n\t\treturn isdelete;\n\t}", "public Boolean getIsdelete() {\r\n return isdelete;\r\n }", "public String getDelFlag() {\n return delFlag;\n }", "public String getDelFlag() {\n return delFlag;\n }", "public String getDelFlag() {\n return delFlag;\n }", "public Integer getIsDeleted() {\n return isDeleted;\n }", "public Integer getDeleteflag() {\n return deleteflag;\n }", "@Column(name = \"isDelete\")\r\n\tpublic Boolean getIsDelete() {\r\n\t\treturn this.isDelete;\r\n\t}", "public String getIsDeleted() {\n return isDeleted;\n }", "public String getIsDeleted() {\n return isDeleted;\n }", "public Integer getIsDeleted() {\r\n\t\treturn isDeleted;\r\n\t}", "public Integer getDel() {\r\n\t\treturn del;\r\n\t}", "public Long deleted() {\n return this.deleted;\n }", "public Short getDelFlag() {\n\t\treturn delFlag;\n\t}", "public Boolean getIsDeleted() {\r\n return isDeleted;\r\n }", "public String getDeleteFlag() {\r\n return deleteFlag;\r\n }", "public boolean getDelete() {\n\t\t\treturn delete.get();\n\t\t}", "public int getIsDelete() {\n\t\treturn _dmHistoryMaritime.getIsDelete();\n\t}", "public Byte getIsDeleted() {\n return isDeleted;\n }", "public Byte getIsDeleted() {\n return isDeleted;\n }", "public Boolean getIsDeleted() {\n return isDeleted;\n }", "public String getDeleteFlag() {\n return deleteFlag;\n }", "public void setIsDel(Integer isDel) {\n this.isDel = isDel;\n }", "public void setIsDel(Integer isDel) {\n this.isDel = isDel;\n }", "public String getIsDeleted() {\n\t\treturn isDeleted;\n\t}", "public Byte getIsDeleted() {\r\n return isDeleted;\r\n }", "public Byte getIsDelete() {\n return isDelete;\n }", "public Byte getIsDelete() {\n return isDelete;\n }", "public Integer getDeleted() {\n return deleted;\n }", "public boolean getDelete() {\n\t\treturn delete;\n\t}", "public String getDeleteFlag() {\r\n\t\treturn deleteFlag;\r\n\t}", "public Boolean getDeleted() {\r\n\t\treturn deleted;\r\n\t}", "public java.lang.Boolean getDeleted();", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public Byte getDeleteFlag() {\n return deleteFlag;\n }", "public Boolean getIsDeleted() {\n\t\treturn isDeleted;\n\t}", "public boolean isDeleted()\r\n {\r\n return getSemanticObject().getBooleanProperty(swb_deleted);\r\n }", "@Override\n\tpublic int getMarkedAsDelete() {\n\t\treturn _dmGTShipPosition.getMarkedAsDelete();\n\t}", "public Boolean getDeleted() {\n return mDeleted;\n }", "public boolean getDeleted() {\n return deleted;\n }", "public boolean isDEL() {\n return DEL;\n }", "public int deleteOrderItem(long id) {\n\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\treturn statement.executeUpdate(\"DELETE FROM order_items WHERE id = \" + id); \n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn 0;\n\t}", "public java.lang.Boolean getIsDeleted() {\r\n return isDeleted;\r\n }", "@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }", "@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }", "public boolean isDelFlag() {\n return delFlag;\n }", "public boolean deleteItem (int custId, int itemId, int statusId){\n\t\tboolean deleted = orderItemsRepo.deleteItem(custId, itemId, statusId);\t\n\t\treturn deleted;\n\t}", "public Boolean getEpDelete() {\n return epDelete;\n }", "@java.lang.Override\n public boolean hasDeletedItemKey() {\n return inventoryItemCase_ == 2;\n }", "public void setIsDel(Boolean isDel) {\n this.isDel = isDel;\n }", "public Boolean getDelflag() {\r\n return delflag;\r\n }", "@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}", "public Delete getDelete() {\n\t\treturn this.delete;\n\t}", "public void setIs_delete(String is_delete) {\n this.is_delete = is_delete;\n }", "@java.lang.Override\n public boolean hasDeletedItemKey() {\n return inventoryItemCase_ == 2;\n }", "public Boolean isDeleted() {\n\t\treturn this.deleted;\n\t\t\n\t}", "public OrderItem deleteOrderItem(OrderItem orderItem)\n\t{\n\t\tif(findOrderItemById(orderItem.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Comanda si produsele care se doresc sterse nu exista\");\n\t\t\treturn null;\n\t\t}\n\t\tOrderItem orderIt=orderItemDAO.delete(orderItem);\n\t\treturn orderIt;\n\t}", "public void setIsDelete( Integer isDelete ) {\n this.isDelete = isDelete;\n }", "public boolean isIsDelete() {\n return isDelete;\n }", "@Override\n\tpublic int getMarkedAsDelete() {\n\t\treturn _dmGtStatus.getMarkedAsDelete();\n\t}", "@Override\n\tpublic boolean deleteProduct(int itemCode) {\n\t\ttry {\n\t\t\tsession= DBConfig.getSessionFactory().openSession();\n\t\t\tsession.beginTransaction();\n\t\t\tList<Product> productList=session.createSQLQuery(\"Select * from Products\").list();\n\t\t\tfor(Product product : productList) {\n\t\t\t\tif(product.getItemCode()==itemCode) {\n\t\t\t\t\tsession.delete(product);\n\t\t\t\t\tsession.getTransaction().commit();\n\t\t\t\t\tvalue =true;\n\t\t\t\t\tbreak;\n\t\t\t\t}else {\n\t\t\t\t\tvalue=false;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tsession.getTransaction().rollback();\n\t\t}\n\t\treturn value;\n\t}", "@Override\n\tpublic void setIsDelete(int isDelete) {\n\t\t_dmGTShipPosition.setIsDelete(isDelete);\n\t}", "public java.lang.String getDelete() {\n return instance.getDelete();\n }", "public Integer getDeleteTag() {\n return deleteTag;\n }", "public void setIsdelete(Integer isdelete) {\n this.isdelete = isdelete;\n }", "public Byte getDeleted() {\n return deleted;\n }", "public void setIsdelete(Integer isdelete) {\r\n this.isdelete = isdelete;\r\n }", "public void setDelFlag(boolean delFlag) {\n this.delFlag = delFlag;\n }", "public void setIsdelete(Integer isdelete) {\n\t\tthis.isdelete = isdelete;\n\t}", "public boolean isDeleted()\r\n\t{\r\n\t\treturn deletedFlag;\r\n\t}", "public boolean isDeleted() {\r\n\treturn isDeleted;\r\n}", "@Nullable\n public TupleExpr getDeleteExpr() {\n return this.deleteExpr;\n }", "boolean getItemCanBeDeleted(String itemId);", "public void setDelFlag(String delFlag) {\n this.delFlag = delFlag;\n }", "public void setDEL(boolean DEL) {\n this.DEL = DEL;\n }", "public String getDeleteStatus() {\n return deleteStatus;\n }", "@Transient\n\tpublic String getToDeleteFlg() {\n\t\treturn toDeleteFlg;\n\t}", "@ApiModelProperty(value = \"True if this gift certificate was deleted.\")\n public Boolean isDeleted() {\n return deleted;\n }", "io.dstore.values.BooleanValue getDeleteCampaign();", "@Override\n\tpublic void setIsDelete(int isDelete) {\n\t\t_dmGtStatus.setIsDelete(isDelete);\n\t}", "public boolean isIsDeleted() {\n return isDeleted;\n }", "public boolean isDeleted() {\n return deleted;\n }", "@Override\n\tpublic int delete(long id) {\n\t\t\n\t\t// =============================================================================\n\t\t// NOTE: to delete an order an order items for the order must be deleted first\n\t\t// to avoid failing a foreign key constraint\n\t\t// =============================================================================\n\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"DELETE FROM order_items WHERE order_id = \" + id); \n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\treturn statement.executeUpdate(\"DELETE FROM orders WHERE id = \" + id);\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn 0;\n\t}", "public Boolean getDeleted() throws NotLoadedException {\n return deleted.getValue();\n }", "public boolean getDeleted() {\n\t\treturn _primarySchoolStudent.getDeleted();\n\t}" ]
[ "0.626232", "0.62603986", "0.6249889", "0.6242196", "0.61297506", "0.6109397", "0.61044586", "0.61044586", "0.6102041", "0.60716987", "0.6069832", "0.6046683", "0.59618556", "0.59618556", "0.59618556", "0.59463406", "0.591047", "0.58930516", "0.5817271", "0.5817271", "0.5772901", "0.57701933", "0.57242167", "0.56953937", "0.56692576", "0.56691086", "0.56656903", "0.5664539", "0.56504166", "0.56504166", "0.5639959", "0.5629611", "0.56212884", "0.56212884", "0.5620773", "0.5619934", "0.5618668", "0.5618668", "0.5577819", "0.55761546", "0.55693305", "0.5557545", "0.55514306", "0.5535263", "0.5535263", "0.5535263", "0.5535263", "0.55275387", "0.5497753", "0.5494658", "0.54817945", "0.54631054", "0.5458721", "0.5449012", "0.54485583", "0.5381387", "0.53785074", "0.5366917", "0.53639024", "0.5358996", "0.5346072", "0.53418016", "0.5330085", "0.5328241", "0.5321257", "0.53068143", "0.52960145", "0.5280686", "0.5267231", "0.52656215", "0.52590114", "0.5257586", "0.5249826", "0.5246962", "0.5241101", "0.52253485", "0.52243894", "0.52109617", "0.52040124", "0.51996046", "0.51891124", "0.5171527", "0.5166175", "0.5156656", "0.5149239", "0.5144681", "0.5137843", "0.51266", "0.512264", "0.5102345", "0.50671184", "0.5062956", "0.5062138", "0.50578016", "0.50520134", "0.50467455", "0.50441945", "0.50311226", "0.5028889" ]
0.64701855
0
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.is_del
public void setIsDel(Integer isDel) { this.isDel = isDel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIsDelete( Integer isDelete ) {\n this.isDelete = isDelete;\n }", "@Override\n\tpublic void setIsDelete(int isDelete) {\n\t\t_dmGTShipPosition.setIsDelete(isDelete);\n\t}", "public void setIsDel(Boolean isDel) {\n this.isDel = isDel;\n }", "public void setIsdelete(Integer isdelete) {\r\n this.isdelete = isdelete;\r\n }", "public void setIsdelete(Integer isdelete) {\n this.isdelete = isdelete;\n }", "public void setIsdelete(Integer isdelete) {\n\t\tthis.isdelete = isdelete;\n\t}", "public void setIs_delete(String is_delete) {\n this.is_delete = is_delete;\n }", "public void setIsdeleted(Integer isdeleted) {\n this.isdeleted = isdeleted;\n }", "public void setIsdeleted( Boolean isdeleted )\n {\n this.isdeleted = isdeleted;\n }", "@Override\n\tpublic void setIsDelete(int isDelete) {\n\t\t_dmGtStatus.setIsDelete(isDelete);\n\t}", "public void setIsDeleted(Integer isDeleted) {\n this.isDeleted = isDeleted;\n }", "public int deleteOrderItem(int d) {\n int ok = 0;\n try {\n String query = \"DELETE FROM order_Item WHERE id_Order_Item = ?;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, d);\n\n ok = st.executeUpdate(); //Execute the Delete\n st.close(); //Close the Statment\n con.close(); //Close the connection\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ok;\n }", "public void setIsdelete(Boolean isdelete) {\r\n this.isdelete = isdelete;\r\n }", "public void setIsDeleted(Integer isDeleted) {\r\n\t\tthis.isDeleted = isDeleted;\r\n\t}", "public void setIsDeleted(String isDeleted) {\n this.isDeleted = isDeleted;\n }", "public void setDEL(boolean DEL) {\n this.DEL = DEL;\n }", "public void setIsDelete(int isDelete) {\n\t\t_dmHistoryMaritime.setIsDelete(isDelete);\n\t}", "public void setIsDelete(Byte isDelete) {\n this.isDelete = isDelete;\n }", "public void setIsDelete(Byte isDelete) {\n this.isDelete = isDelete;\n }", "public void setIsDelete(Boolean isDelete) {\r\n\t\tthis.isDelete = isDelete;\r\n\t}", "public void setIsDelete(boolean isDelete) {\n this.isDelete = isDelete;\n }", "public void setIsDeleted(String isDeleted) {\n\t\tthis.isDeleted = isDeleted;\n\t}", "public void setDelFlag(boolean delFlag) {\n this.delFlag = delFlag;\n }", "public void setIsDeleted(Boolean isDeleted) {\r\n this.isDeleted = isDeleted;\r\n }", "public void setIsDeleted(Byte isDeleted) {\r\n this.isDeleted = isDeleted;\r\n }", "public void setIsDeleted(Byte isDeleted) {\n this.isDeleted = isDeleted;\n }", "public void setIsDeleted(Byte isDeleted) {\n this.isDeleted = isDeleted;\n }", "public void setIsDeleted(java.lang.Boolean isDeleted) {\r\n this.isDeleted = isDeleted;\r\n }", "@IcalProperty(pindex = PropertyInfoIndex.DELETED)\n public void setDeleted(final boolean val) {\n deleted = val;\n }", "public void setIsDeleted(Boolean isDeleted) {\n this.isDeleted = isDeleted;\n }", "public void setIsdelete(String isdelete) {\n this.isdelete = isdelete == null ? null : isdelete.trim();\n }", "public void setIsdelete(String isdelete) {\n this.isdelete = isdelete == null ? null : isdelete.trim();\n }", "public void setDelFlag(String delFlag) {\n this.delFlag = delFlag;\n }", "public Boolean getIsDel() {\n return isDel;\n }", "public Integer getIsDel() {\n return isDel;\n }", "public Integer getIsDel() {\n return isDel;\n }", "public void setIsDeleted(boolean isDeleted) {\n this.isDeleted = isDeleted;\n }", "public void setIsDeleted(Boolean isDeleted) {\n\t\tthis.isDeleted = isDeleted;\n\t}", "public Integer getIsdelete() {\r\n return isdelete;\r\n }", "public Integer getIsdelete() {\n return isdelete;\n }", "public Boolean getIsdelete() {\r\n return isdelete;\r\n }", "public void setItDelete(boolean itDelete) {\n\t\t\n\t}", "public void setIsDeleted(String isDeleted) {\n this.isDeleted = isDeleted == null ? null : isDeleted.trim();\n }", "public final native void setForDelete(boolean del) /*-{\n\t\tthis.forDelete = del;\n\t}-*/;", "public String getIsdelete() {\n return isdelete;\n }", "public String getIsdelete() {\n return isdelete;\n }", "@Column(name = \"isDelete\")\r\n\tpublic Boolean getIsDelete() {\r\n\t\treturn this.isDelete;\r\n\t}", "public String getIs_delete() {\n return is_delete;\n }", "@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGTShipPosition.getIsDelete();\n\t}", "public Integer getIsdelete() {\n\t\treturn isdelete;\n\t}", "@Override\r\n\tpublic int changeOrderInvFlag(OrdersVO orVO) {\n\t\treturn getSqlSession().update(namespace+\".changeOrderInvFlag\", orVO);\r\n\t}", "public void setDeleteflag(Integer deleteflag) {\n this.deleteflag = deleteflag;\n }", "public void setDel(Integer del) {\r\n\t\tthis.del = del;\r\n\t}", "public void setDeleted(java.lang.Boolean deleted);", "public void setDeleted(boolean value)\r\n {\r\n getSemanticObject().setBooleanProperty(swb_deleted, value);\r\n }", "public Integer getIsdeleted() {\n return isdeleted;\n }", "public void setDeleted(boolean deleted);", "public int deleteOrderItem(long id) {\n\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\treturn statement.executeUpdate(\"DELETE FROM order_items WHERE id = \" + id); \n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn 0;\n\t}", "public static int deleteOrder(String orderID) throws ClassNotFoundException, SQLException {\n\r\n String sql = \"update ordertable set visibility = 'false' where orderID = '\" + orderID + \"'\";\r\n Connection conn = DBConnection.getInstance().getConnection();\r\n Statement stm = conn.createStatement();\r\n return stm.executeUpdate(sql);\r\n\r\n }", "public Integer getDeleteflag() {\n return deleteflag;\n }", "public abstract boolean depleteItem();", "@Override\n\tpublic int delete(List<OrderItem> objectsToDelete) throws SQLException {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void delete(Orderi orderi) {\n\t\tgetHibernateTemplate().delete(orderi);\n\t}", "@Override\n\tpublic boolean delete(Order bean) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void deleteProductionOrderItems(List<ProductionOrderItem> pois) {\n\t\tproductionOrderItemDao.deleteProductionOrderItems(pois);\r\n\t}", "public void setDelFlag(Short delFlag) {\n\t\tsetField(\"delFlag\", delFlag);\n\t}", "public void setDelFlag(String delFlag) {\n this.delFlag = delFlag == null ? null : delFlag.trim();\n }", "public void setDelFlag(String delFlag) {\n this.delFlag = delFlag == null ? null : delFlag.trim();\n }", "public String getDelFlag() {\n return delFlag;\n }", "public String getDelFlag() {\n return delFlag;\n }", "public String getDelFlag() {\n return delFlag;\n }", "@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGtStatus.getIsDelete();\n\t}", "@Override\r\n\t\tpublic boolean deleteItem() {\n\t\t\treturn false;\r\n\t\t}", "public void setDeleteFlag(String deleteFlag) {\r\n this.deleteFlag = deleteFlag;\r\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public Boolean getIsDeleted() {\r\n return isDeleted;\r\n }", "@Modifying(clearAutomatically = true)\n @Query(\"UPDATE Item i SET i.quantity = i.quantity - ?1 WHERE i =?2\")\n int deductFromStock(double qty, Item item);", "public void setDeleted(boolean deleted) {\n this.deleted = deleted;\n }", "public Integer getIsDeleted() {\n return isDeleted;\n }", "@Override\n\tpublic boolean deleteProduct(int itemCode) {\n\t\ttry {\n\t\t\tsession= DBConfig.getSessionFactory().openSession();\n\t\t\tsession.beginTransaction();\n\t\t\tList<Product> productList=session.createSQLQuery(\"Select * from Products\").list();\n\t\t\tfor(Product product : productList) {\n\t\t\t\tif(product.getItemCode()==itemCode) {\n\t\t\t\t\tsession.delete(product);\n\t\t\t\t\tsession.getTransaction().commit();\n\t\t\t\t\tvalue =true;\n\t\t\t\t\tbreak;\n\t\t\t\t}else {\n\t\t\t\t\tvalue=false;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tsession.getTransaction().rollback();\n\t\t}\n\t\treturn value;\n\t}", "public void setPropertyOnDelete(String propertyOnDelete) {\n \t\tpropertyOnDelete = propertyOnDelete;\n }", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean delete(Item obj) {\n\t\ttry{\n\t\t\tString query=\"DELETE FROM items WHERE id = ?\";\n\t\t\tPreparedStatement state = conn.prepareStatement(query,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n\t\t\tstate.setInt(1, obj.getIndex());\n\t\t\tint nb_rows = state.executeUpdate();\n\t\t\tSystem.out.println(\"Deleted \"+nb_rows+\" lines\");\n\t\t\tstate.close();\n\t\t\t\n\t\t\t// Notify the Dispatcher on a suitable channel.\n\t\t\tthis.publish(EntityEnum.ITEM.getValue());\n\t\t\t\n\t\t\treturn true;\n\t\t} catch (SQLException e){\n\t\t\tJOptionPane jop = new JOptionPane();\n\t\t\tjop.showMessageDialog(null, e.getMessage(),\"PostgreSQLItemDao.delete -- ERROR!\",JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\t\n\t}", "public void delete(MainItemOrdered mainItemOrdered);", "@Override\n\tpublic boolean updateItem(DetallePedido detallePedido) throws Exception {\n\t\treturn false;\n\t}", "public void setDelete(boolean delete) {\n\t\tthis.delete = delete;\n\t}", "public void setDeleted(Integer deleted) {\n this.deleted = deleted;\n }", "public Boolean getIsDeleted() {\n return isDeleted;\n }", "public void setDeleted(Boolean deleted) {\r\n\t\tthis.deleted = deleted;\r\n\t}", "@Override\r\n\tpublic int removemobiledata(int delid) {\n\t\tQuery queryOne=entitymanager.createQuery(\"DELETE FROM Mobile where mobileId=:mobile_id\");\r\n\t\tqueryOne.setParameter(\"mobile_id\", delid);\r\n\t\tint status=queryOne.executeUpdate();\r\n\t\treturn status;\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic int delete(long id) {\n\t\t\n\t\t// =============================================================================\n\t\t// NOTE: to delete an order an order items for the order must be deleted first\n\t\t// to avoid failing a foreign key constraint\n\t\t// =============================================================================\n\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"DELETE FROM order_items WHERE order_id = \" + id); \n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\treturn statement.executeUpdate(\"DELETE FROM orders WHERE id = \" + id);\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn 0;\n\t}", "public boolean deleteItem (int custId, int itemId, int statusId){\n\t\tboolean deleted = orderItemsRepo.deleteItem(custId, itemId, statusId);\t\n\t\treturn deleted;\n\t}", "public void setDeleted();", "public Byte getIsDelete() {\n return isDelete;\n }" ]
[ "0.62173724", "0.6152867", "0.61467993", "0.60830474", "0.606074", "0.60065365", "0.5983391", "0.5965233", "0.5940702", "0.591164", "0.58858097", "0.5884442", "0.58548033", "0.58326864", "0.57339907", "0.5706987", "0.56929547", "0.5692173", "0.5692173", "0.5672201", "0.56558067", "0.5638852", "0.5625823", "0.56195575", "0.5606351", "0.5605419", "0.5605419", "0.5597068", "0.5538066", "0.5533987", "0.55326253", "0.55326253", "0.5517289", "0.55143166", "0.55104023", "0.55104023", "0.5495162", "0.5473085", "0.5460728", "0.54397714", "0.54226106", "0.54083633", "0.53872985", "0.53693694", "0.5350649", "0.5350649", "0.53247404", "0.5300754", "0.5272338", "0.52128524", "0.5206372", "0.52013314", "0.51938546", "0.51640546", "0.5160735", "0.51543736", "0.51272476", "0.511795", "0.5117884", "0.5071353", "0.5070182", "0.504102", "0.50320244", "0.5028041", "0.50255793", "0.502521", "0.49787077", "0.49787077", "0.49780586", "0.49780586", "0.49780586", "0.49732852", "0.49622285", "0.49490792", "0.49379626", "0.49379626", "0.49379626", "0.49379626", "0.49379626", "0.49286693", "0.4927408", "0.4925845", "0.49250913", "0.4921759", "0.49090356", "0.49089903", "0.49050698", "0.48977438", "0.48972884", "0.48809692", "0.48759937", "0.48734328", "0.48640922", "0.48638457", "0.48634666", "0.4860555", "0.4858359", "0.48555714", "0.48536667" ]
0.64242834
0
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.update_time
public Date getUpdateTime() { return updateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "public Date getUpdatetime() {\r\n return updatetime;\r\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public String getUpdatetime() {\n\t\treturn updatetime;\n\t}", "public String getUpdatetime() {\n\t\treturn updatetime;\n\t}", "public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdateDatetime() {\r\n\t\treturn updateDatetime;\r\n\t}", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public com.flexnet.opsembedded.webservices.DateTimeQueryType getUpdateTime() {\n return updateTime;\n }", "public Date getTimeUpdate() {\n return timeUpdate;\n }", "public Date getUpdateTime()\n {\n return data.updateTime;\n }", "public Date getUpdateDatetime();", "public java.lang.Long getTsUpdate() {\n return ts_update;\n }", "public Timestamp getUpdateTime() {\n return updateTime;\n }", "public Integer getUpdateTime() {\n return updateTime;\n }", "public java.lang.Long getTsUpdate() {\n return ts_update;\n }", "public String getUpdateTime() {\r\n return updateTime;\r\n }", "public Long getUpdateTime() {\n return updateTime;\n }", "public Long getUpdateTime() {\n return updateTime;\n }", "public Date getUpdateTime() {\n return this.updateTime;\n }", "public Long getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public Long getUpdateAt() {\n return updateAt;\n }", "public Date getUpdateTime() {\r\n\t\treturn this.updatedTime;\r\n\t}", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public Date getUpdateTime() {\n\t\treturn this.updateTime;\n\t}", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "public long getTsUpdate() {\n return tsUpdate_;\n }", "public String getUpdTime() {\n return updTime;\n }", "public Date getUpdateTime() {\r\n\t\treturn updateTime;\r\n\t}", "public Date getUpdateTimestamp() {\n return updateTimestamp;\n }", "public String getUpdateTime() {\n\t\t\treturn updateTime;\n\t\t}", "public long getTsUpdate() {\n return tsUpdate_;\n }", "public Date getUpdateTimestamp() {\r\n return updateTimestamp;\r\n }", "public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public Date getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }", "public Date getUpdateTime()\n/* */ {\n/* 191 */ return this.updateTime;\n/* */ }", "int getUpdateTriggerTime();", "@java.lang.Override\n public com.google.protobuf.Timestamp getUpdateTime() {\n return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;\n }", "public DateTime getUpdatedTimestamp() {\n\t\treturn getDateTime(\"sys_updated_on\");\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getUpdateTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(UPDATETIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getUpdateTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(UPDATETIME_PROP.get());\n }" ]
[ "0.7385578", "0.7385578", "0.73620236", "0.7299406", "0.7296152", "0.7296152", "0.7267638", "0.7267638", "0.71287304", "0.71080434", "0.71080434", "0.71080434", "0.70644087", "0.70322895", "0.70322895", "0.7007267", "0.69986993", "0.69957954", "0.69328046", "0.6895198", "0.687105", "0.6847995", "0.6841908", "0.6821841", "0.6816126", "0.6816126", "0.6803968", "0.67988825", "0.67972153", "0.67792183", "0.6779212", "0.6779212", "0.6779212", "0.6779212", "0.67770267", "0.67770267", "0.67770267", "0.67770267", "0.67731404", "0.6771179", "0.6744331", "0.6736012", "0.6734045", "0.67308724", "0.67216194", "0.6717165", "0.6708305", "0.6703194", "0.6703194", "0.6703194", "0.6700423", "0.66886497", "0.66405576", "0.663562", "0.66275793", "0.6624302", "0.6616006" ]
0.67301625
80
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.update_time
public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }", "public void setUpdateTime (java.sql.Timestamp updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}", "public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }", "public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }", "public void setTimeUpdate(Date timeUpdate) {\n this.timeUpdate = timeUpdate;\n }", "public void setUpdateTime(DateTime updateTime) {\n this.updated = updateTime;\n }", "public void setUpdateDatetime(Long updateDatetime) {\n this.updateDatetime = updateDatetime;\n }", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }", "public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Timestamp updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(Date updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}", "public void setUpdateTime(java.util.Date updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(com.flexnet.opsembedded.webservices.DateTimeQueryType updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Integer updateTime) {\n this.updateTime = updateTime;\n }", "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }", "@Override\n\tpublic void setUpdateTime(Date updateTime) {\n\t\t\n\t}", "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdatetime() {\r\n return updatetime;\r\n }", "public void setUpdateDatetime(Date updateDatetime) {\r\n\t\tthis.updateDatetime = updateDatetime;\r\n\t}", "public void setUpdateTime(Long updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public void setUpdateTime(Date updateTime) {\n\t\tsetField(\"updateTime\", updateTime);\n\t}", "public Date getUpdateDatetime() {\r\n\t\treturn updateDatetime;\r\n\t}", "public void setUpdateDatetime(Date updateDatetime);", "public void setUpdateTime(String updateTime) {\n\t\t\tthis.updateTime = updateTime;\n\t\t}", "private void setUpdateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(UPDATETIME_PROP.get(), value);\n }", "public void setUpdateTimeDb(Date updateTimeDb) {\r\n\t\tthis.updateTimeDb = updateTimeDb;\r\n\t}", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public void setUpdateTime(java.util.Calendar updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(String updateTime) {\r\n this.updateTime = updateTime == null ? null : updateTime.trim();\r\n }", "public void setUpdTime(String updTime) {\n this.updTime = updTime;\n }", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime == null ? null : updateTime.trim();\n }", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime == null ? null : updateTime.trim();\n }", "public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}" ]
[ "0.72809315", "0.72809315", "0.70077986", "0.6993276", "0.6986861", "0.6986861", "0.68519247", "0.68140984", "0.67563176", "0.675112", "0.675112", "0.675112", "0.674653", "0.674653", "0.66982996", "0.66982996", "0.66982996", "0.66982996", "0.66437995", "0.6639686", "0.66143894", "0.6603855", "0.6593916", "0.6593916", "0.6593916", "0.6591813", "0.65666807", "0.656068", "0.656068", "0.6554227", "0.6524475", "0.6524475", "0.651911", "0.6517498", "0.6514601", "0.6501278", "0.64994407", "0.64994407", "0.6483363", "0.6483363", "0.6483363", "0.64699095", "0.64699095", "0.64690024", "0.6440116", "0.64318794", "0.6429946", "0.634848", "0.63193005", "0.62582445", "0.62582445", "0.6256737", "0.62438655", "0.62398916", "0.6232012", "0.6232012", "0.62152874" ]
0.66340244
50
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.create_time
public Date getCreateTime() { return createTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getCreatetime() {\n return createtime;\n }", "public Integer getCreateTime() {\r\n return createTime;\r\n }", "public Integer getCreateTime() {\n return createTime;\n }", "public Date getCreate_time() {\n return create_time;\n }", "public Date getCreate_time() {\n return create_time;\n }", "public Long getCreateTime() {\n return createTime;\n }", "public Date getCreateTime() {\n return this.createTime;\n }", "public Date getCreateTime() {\n return this.createTime;\n }", "public Date getCreateTime() {\n return createTime;\n }", "public Timestamp getCreateTime() {\n return createTime;\n }", "public long getCreateTime() {\n return this.createTime;\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public Date getCreateTime() {\r\n return createTime;\r\n }", "public java.sql.Timestamp getCreateTime () {\r\n\t\treturn createTime;\r\n\t}", "public Date getCreateTime() {\n\t\treturn this.createTime;\n\t}", "public String getCreateTime() {\r\n return createTime;\r\n }", "public Long getCreateTime() {\n\t\treturn createTime;\n\t}" ]
[ "0.7284367", "0.71982205", "0.71748155", "0.71543133", "0.71543133", "0.71389204", "0.712962", "0.712962", "0.7116182", "0.7098702", "0.70768356", "0.7064763", "0.7064763", "0.7064763", "0.7064763", "0.7064763", "0.7064763", "0.70354414", "0.7030343", "0.70288485", "0.7019221" ]
0.7046006
88
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.create_time
public void setCreateTime(Date createTime) { this.createTime = createTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "private void setCreateTime(long createTime) {\n this.createTime = createTime;\n }", "public void setCreateTime(Date createTime)\n/* */ {\n/* 184 */ this.createTime = createTime;\n/* */ }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setTimeCreate(Date timeCreate) {\n this.timeCreate = timeCreate;\n }", "public void setCreateTime (java.sql.Timestamp createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}", "public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreatetime(Long createtime) {\n this.createtime = createtime;\n }", "public void setCreateTime(Integer createTime) {\r\n this.createTime = createTime;\r\n }" ]
[ "0.72452563", "0.72452563", "0.6930892", "0.6930892", "0.6930892", "0.6911622", "0.69026184", "0.68872106", "0.68872106", "0.68872106", "0.68872106", "0.68872106", "0.68872106", "0.68872106", "0.68872106", "0.6861615", "0.68412316", "0.68391657", "0.68385524", "0.68385524", "0.68385524", "0.68385524", "0.68385524", "0.68385524", "0.68251985", "0.68009317" ]
0.676718
97
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.order_id
public String getOrderId() { return orderId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getOrderItemId() {\n return orderItemId;\n }", "public int getId() {\n return orderID;\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public Long getOrderid() {\r\n return orderid;\r\n }", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "public int getOrderID() {\n return orderID;\n }", "public Integer\t\tgetOrderID();", "public Integer getOrderId() {\n return orderId;\n }", "public int getOrderID() {\r\n return emporderID;\r\n }", "public String getOrderid() {\n return orderid;\n }", "public String getOrderId(JsonObject order) {\r\n\t\tint orderID = 0;\r\n\t\tString customerId = order.get(\"customerId\").getAsString();\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT * FROM home_heating_fuel_orders\" + \" WHERE customerID = '\" + customerId + \"';\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\torderID = Math.max(rs.getInt(\"orderID\"), orderID);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\t\treturn orderID + \"\";\r\n\t}", "public String getOrderID() {\n return this.orderID;\n }", "@Column(name = \"order_id\", precision = 10)\n @GeneratedValue\n @Id\n public Integer getOrderId() {\n return orderId;\n }", "public int getOrderId() {\n return orderId;\n }", "public Long getOrderId() {\n return orderId;\n }", "public Long getOrderId() {\n return orderId;\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "public String getOrderID() {return orderID;}", "public int getOrderID()\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(ORDERID$0, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }", "public String getOrderID() {\n\t\treturn this.token.get(\"orderID\").toString();\n\t}", "private int getOrderId() {\n int orderId;\n try {\n if (orderIdField.getText().isEmpty()) {\n orderId = -1;\n }\n else {\n orderId = Integer.parseInt(orderIdField.getText());\n }\n } catch (NumberFormatException exc) {\n orderId = -1;\n }\n return orderId;\n }", "public String getOrdersId() {\n return ordersId;\n }", "public String getOrderId() {\n\t\treturn orderId;\n\t}", "public static int insert(OrderItems order) {\r\n\t\tConnection dbConnection = ConnectionFactory.getConnection();\r\n\r\n\t\tPreparedStatement insertStatement = null;\r\n\t\tint insertedId = -1;\r\n\t\ttry {\r\n\t\t\tinsertStatement = dbConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\r\n\t\t\tinsertStatement.setInt(1, order.getIdOrder());\r\n\t\t\tinsertStatement.setString(2, order.getNumeClient());\r\n\t\t\tinsertStatement.setString(3, order.getDenumireProdus());\r\n\t\t\tinsertStatement.setInt(4, order.getCantitate());\r\n\t\t\tinsertStatement.executeUpdate();\r\n\r\n\t\t\tResultSet rs = insertStatement.getGeneratedKeys();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tinsertedId = rs.getInt(1);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println( \"OrderItemsDAO:insert \" + e.getMessage());\r\n\t\t} finally {\r\n\t\t\tConnectionFactory.close(insertStatement);\r\n\t\t\tConnectionFactory.close(dbConnection);\r\n\t\t}\r\n\t\treturn insertedId;\r\n\t}", "@Override\r\n\tpublic OrderVO getOrderByID(Integer ono) throws Exception {\n\t\treturn sqlSession.selectOne(namespaceOrder+\".getOneOrderByOrderID\",ono);\r\n\t}", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "io.dstore.values.IntegerValue getOrderPersonId();", "public int getOrder_code_id() {\n return order_code_id;\n }", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public io.dstore.values.IntegerValue getOrderPersonId() {\n if (orderPersonIdBuilder_ == null) {\n return orderPersonId_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n } else {\n return orderPersonIdBuilder_.getMessage();\n }\n }", "public org.apache.xmlbeans.XmlInt xgetOrderID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(ORDERID$0, 0);\n return target;\n }\n }", "@JsonProperty(\"OrderId\")\n public String getOrderId() {\n return orderId;\n }", "public int getMPC_Order_ID() {\n\t\tInteger ii = (Integer) get_Value(\"MPC_Order_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}", "public io.dstore.values.IntegerValue getOrderPersonId() {\n return orderPersonId_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n }", "public String getOrderidentifier() {\n\t\treturn orderidentifier;\n\t}", "public int getXX_MaterialTransferOrder_ID() \r\n {\r\n return get_ValueAsInt(\"XX_MaterialTransferOrder_ID\");\r\n \r\n }", "public void setOrderid(Long orderid) {\r\n this.orderid = orderid;\r\n }", "public java.lang.Integer getOrder_code_id() {\n return order_code_id;\n }", "public void readOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n Object orderIdParam = session.getAttribute(\"orderId\");\n orderId = null;\n if(orderIdParam != null) {\n orderId = Integer.parseInt(orderIdParam.toString().trim());\n }\n }", "public Order getOrderById(long orderId);", "@JsonGetter(\"orderId\")\r\n public int getOrderId ( ) { \r\n return this.orderId;\r\n }", "public Input getOrderID() throws RemoteException\n\t{\n\t\t if (orderID != null)\n\t\t \treturn orderID;\n\t\t orderID = new LabelInput(getTransfer().getOrderID());\n\t\t return orderID;\n\t}", "public void setOrderId(Integer orderId) {\n this.orderId = orderId;\n }", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "@ApiModelProperty(example = \"123456\", value = \"Client order ID if supplied by client.\")\n public String getOrderId() {\n return orderId;\n }", "ClOrderInfo selectByPrimaryKey(String orderId);", "String getOrderId();", "public Integer getOrderbyid() {\r\n return orderbyid;\r\n }", "public static int delete(Orders order) {\n Connection dbConnection = ConnectionFactory.getConnection();\n PreparedStatement deletedStatement = null;\n\n ResultSet rs = null;\n int deletedId = -1;\n try {\n deletedStatement = dbConnection.prepareStatement(deleteStatementString, Statement.RETURN_GENERATED_KEYS);\n deletedStatement.setInt(1, order.getProduct_ID());\n deletedStatement.setInt(2, order.getClient_ID());\n deletedStatement.setDouble(3, order.getTotal_Price());\n deletedStatement.setInt(4, order.getAmount());\n\n deletedStatement.executeUpdate();\n rs = deletedStatement.getGeneratedKeys();\n if (rs.next()) {\n deletedId = rs.getInt(1);\n }\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING,\"OrderDAO:findByName \" + e.getMessage());\n } finally {\n ConnectionFactory.close(rs);\n ConnectionFactory.close(deletedStatement);\n ConnectionFactory.close(dbConnection);\n }\n return deletedId;\n }", "public long getOrderNumber()\n {\n return _orderNumber;\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public String getOrderDocId() {\r\n return this.orderDocId;\r\n }", "public Integer getOrderDetailId() {\r\n return this.orderDetailId;\r\n }", "public int getC_OrderLine_ID();", "public io.dstore.values.IntegerValueOrBuilder getOrderPersonIdOrBuilder() {\n if (orderPersonIdBuilder_ != null) {\n return orderPersonIdBuilder_.getMessageOrBuilder();\n } else {\n return orderPersonId_ == null ?\n io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n }\n }", "public String getSOrderID() {\n return sOrderID;\n }", "public int geti_ordertrx_temp_ID();", "public int getOrderNumber() {\n return orderNumber;\n }", "public String orderNumberById(String orderId) {\n return orderById(orderId, orderNumber);\n }", "public String getOrderId() {\n Object ref = orderId_;\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 orderId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "@Select({\n \"select\",\n \"id, orderid, name, price, userid\",\n \"from order\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @ResultMap(\"BaseResultMap\")\n Order selectByPrimaryKey(Long id);", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "public static String getOrderIDvalue(int IDIndx) {\r\n\t\tLog.info(\"Getting Order ID Value\");\r\n\t\tList<WebElement> orderIds=driver.findElements(By.className(\"field-order_number\"));\r\n\t\tLog.info(\"Order IDs size:\"+orderIds.size());\r\n\t\tLog.info(\"Using Order ID at index:\"+IDIndx);\r\n\t\treturn orderIds.get(IDIndx).getText();\r\n\t}", "public String getOrderId() {\n Object ref = orderId_;\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 orderId_ = s;\n }\n return s;\n }\n }", "public Long getOrderNo () {\r\n\t\treturn orderNo;\r\n\t}", "@Override\n\tpublic Orderi get(Integer id) {\n\t\t\n\t\treturn (Orderi)getHibernateTemplate().get(Orderi.class, id);\n\t}", "io.dstore.values.IntegerValueOrBuilder getOrderPersonIdOrBuilder();", "@Select({\n \"select\",\n \"order_id, num, com, status, message, ischeck, traceJson, create_time, last_udpate_time\",\n \"from tb_express_trace\",\n \"where order_id = #{orderId,jdbcType=VARCHAR}\"\n })\n @ResultMap(\"BaseResultMap\")\n TbExpressTrace selectByPrimaryKey(String orderId);", "public int getC_OrderLine_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_OrderLine_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public Number getSalesorderId() {\n return (Number) getAttributeInternal(SALESORDERID);\n }", "public Integer getOrderNumber()\n {\n return orderNum;\n }", "public void setIdOrder(Long idOrder) {\n this.idOrder = idOrder;\n }", "public void setOrderID(String orderID) {\n\t\tORDER_ID = orderID;\n\t}", "public void setOrderId(String orderId) {\n this.orderId = orderId;\n }", "public Number getSalesOrderId() {\n return (Number)getAttributeInternal(SALESORDERID);\n }", "@Override\n\tpublic long getColumnId() {\n\t\treturn _expandoColumn.getColumnId();\n\t}", "public Shoporder GetOrderById(String orderId) {\n\t\treturn mapper.GetOrderById(orderId);\n\t}", "public int getC_OrderLine_ID () \n\t{\n\t\tInteger ii = (Integer)get_Value(COLUMNNAME_C_OrderLine_ID);\n\t\tif (ii == null)\n\t\t\t return 0;\n\t\treturn ii.intValue();\n\t}", "Order getByID(String id);", "@Field(4) \n\tpublic int ConditionalOrderID() {\n\t\treturn this.io.getIntField(this, 4);\n\t}", "@Override\n\tpublic HsExchangeOrder selectByPrimaryKey(HsExchangeOrder order) {\n\t\treturn hsExchangeOrderDbService.selectByPrimaryKey(order.getId());\n\t}", "public Order getOrderByID(String order_id) throws Exception {\n\n\t\tConnection con = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from ocgr_orders left join ocgr_clients on ocgr_orders.client_id = ocgr_clients.client_id left join ocgr_vendors on ocgr_orders.vendor_id = ocgr_vendors.vendor_id where order_id=? ;\";\n\n\t\tDB db = new DB();\n\n\t\ttry {\n\t\t\tdb.open();\n\t\t\tcon = db.getConnection();\n\n\t\t\tstmt = con.prepareStatement(sql);\n\t\t\tstmt.setString(1,order_id);\n\t\t\trs = stmt.executeQuery();\n\n\t\t\tif (!rs.next()) {\n\t\t\t\trs.close();\n\t\t\t\tstmt.close();\n\t\t\t\tdb.close();\n\n\t\t\t\tthrow new Exception(\"Not valid Order_id\");\n\t\t\t}\n\t\t\tClient client = new Client( rs.getString(\"client_id\"), rs.getString(\"client_password\"), rs.getString(\"client_email\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"client_fullname\"), rs.getString(\"client_compName\"), rs.getString(\"client_address\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"client_itin\"), rs.getString(\"client_doy\"), rs.getString(\"client_phone\") );\n\n\t\t\tVendor vendor = new Vendor( rs.getString(\"vendor_id\"), rs.getString(\"vendor_password\"), rs.getString(\"vendor_email\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_fullname\"), rs.getString(\"vendor_compName\"), rs.getString(\"vendor_address\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_itin\"), rs.getString(\"vendor_doy\"), rs.getString(\"vendor_phone\") );\n\n\t\t\tOrder order = new Order(rs.getString(\"order_id\"), rs.getTimestamp(\"order_date\"), rs.getBigDecimal(\"order_total\"),\n\t\t\t\t\t\t\t\t\trs.getString(\"order_address\"), rs.getString(\"order_address\"),\n\t\t\t\t\t\t\t\t\trs.getString(\"order_paymentmethod\"), client, vendor );\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tdb.close();\n\n\t\t\treturn order;\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tdb.close();\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "@VTID(10)\r\n int getOrder();", "@Override\r\n\tpublic Order getOrderById(String orderId) {\n\t\treturn null;\r\n\t}", "String getOrderTypeId();", "public void setOrderId(String orderId) {\n\t\tthis.orderId = orderId;\n\t}", "public Integer getId() {\n\t\treturn orderPickListId;\n\t}", "OrderDetailBean getSearchOrderById(long orderIdi,String userLogin,int paymenttype) throws SQLException, Exception, RemoteException;", "public Integer getId()\r\n\t\t{ return mapping.getId(); }", "public String getOrderNo() {\n return orderNo;\n }", "public long getItemShopBasketId();", "public Integer getOrderIndex() {\n return orderIndex;\n }", "public int obtId() {\r\n\t\treturn id;\r\n\t}", "public ShippingOrder getOrderInfoByOrderId(String orderId){\r\n ShippingDataAccess shippingOrder = new ShippingDataAccess(this.sqlServerIp);\r\n String log = null;\r\n ShippingOrder order = shippingOrder.selectShippingOrderByOrderId(orderId, log);\r\n return order;\r\n }" ]
[ "0.73290336", "0.72311294", "0.69740534", "0.6960223", "0.6869498", "0.68031865", "0.67564356", "0.6705161", "0.6704188", "0.6665033", "0.6637559", "0.6616474", "0.6608901", "0.6591435", "0.6588944", "0.6588944", "0.6587681", "0.6550151", "0.6453395", "0.6305276", "0.6302706", "0.6299057", "0.62491953", "0.6229112", "0.6219517", "0.6144401", "0.61117345", "0.6110486", "0.6068397", "0.6067293", "0.6067293", "0.60516095", "0.60374814", "0.6022642", "0.6021956", "0.6019659", "0.5964019", "0.5958983", "0.594789", "0.59204644", "0.5876821", "0.5871082", "0.58598715", "0.58461714", "0.5823743", "0.5812232", "0.5810579", "0.57823753", "0.57785654", "0.57288337", "0.5707428", "0.5675263", "0.56692564", "0.5656309", "0.56368995", "0.56353706", "0.5632328", "0.563213", "0.56207436", "0.56166697", "0.5612992", "0.5610024", "0.5598737", "0.55975884", "0.5583129", "0.5583129", "0.557831", "0.5567922", "0.5566342", "0.55642456", "0.5562264", "0.5548397", "0.55442274", "0.55388653", "0.5536293", "0.55325246", "0.553075", "0.5526126", "0.5523477", "0.54619396", "0.5460128", "0.5423954", "0.5418953", "0.5398698", "0.53919864", "0.53913057", "0.53907514", "0.5389775", "0.53877944", "0.538303", "0.53828645", "0.53821063", "0.53807664", "0.5377885", "0.5374596", "0.5366389", "0.5365859", "0.5354321" ]
0.64539576
18
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.order_id
public void setOrderId(String orderId) { this.orderId = orderId == null ? null : orderId.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIdOrder(Long idOrder) {\n this.idOrder = idOrder;\n }", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public void setOrderID(int orderID)\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(ORDERID$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ORDERID$0);\n }\n target.setIntValue(orderID);\n }\n }", "public void setOrderId(Integer orderId) {\n this.orderId = orderId;\n }", "public void setOrderid(Long orderid) {\r\n this.orderid = orderid;\r\n }", "public void xsetOrderID(org.apache.xmlbeans.XmlInt orderID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(ORDERID$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(ORDERID$0);\n }\n target.set(orderID);\n }\n }", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "public void setOrderId(String orderId) {\n this.orderId = orderId;\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public void setOrderId(int value) {\n this.orderId = value;\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public void setOrderId(String orderId) {\n\t\tthis.orderId = orderId;\n\t}", "public int getId() {\n return orderID;\n }", "public void setOrderID(String orderID) {\n\t\tORDER_ID = orderID;\n\t}", "@Column(name = \"order_id\", precision = 10)\n @GeneratedValue\n @Id\n public Integer getOrderId() {\n return orderId;\n }", "public Long getOrderid() {\r\n return orderid;\r\n }", "public void setOrderid(String orderid) {\n this.orderid = orderid == null ? null : orderid.trim();\n }", "public String getOrderID() {return orderID;}", "public void writeOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n session.setAttribute(\"orderId\", \"\" + orderId);\n }", "public int getOrderID() {\n return orderID;\n }", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "public void setOrder_code_id(int order_code_id) {\n this.order_code_id = order_code_id;\n }", "@JsonSetter(\"orderId\")\r\n public void setOrderId (int value) { \r\n this.orderId = value;\r\n }", "public String getOrdersId() {\n return ordersId;\n }", "public String getOrderid() {\n return orderid;\n }", "public void setOrder(String id,String email);", "public Integer getOrderId() {\n return orderId;\n }", "public int getOrderId() {\n return orderId;\n }", "public void setOrder(int value) {\n this.order = value;\n }", "public int getOrderID() {\r\n return emporderID;\r\n }", "public Order(int _orderId){\n this.orderId = _orderId;\n }", "public Long getOrderId() {\n return orderId;\n }", "public Long getOrderId() {\n return orderId;\n }", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public String getOrderID() {\n return this.orderID;\n }", "public void setOrder_code_id(java.lang.Integer order_code_id) {\n this.order_code_id = order_code_id;\n }", "public final void setOrder(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Integer order)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Order.toString(), order);\r\n\t}", "@Test\n public void testSetOrderId() throws Exception {\n Order newOrder = new Order();\n newOrder.setOrderNumber(609);\n newOrder.setCustomerName(\"Jake\");\n newOrder.setState(\"OH\");\n newOrder.setProductType(\"Wood\");\n newOrder.setArea(new BigDecimal(\"233\"));\n\n service.addOrder(newOrder);\n // addOrder(newOrder.getOrderNumber(), newOrder);\n\n Order otherOrder = new Order();\n otherOrder.setCustomerName(\"Mickey\");\n otherOrder.setState(\"PA\");\n otherOrder.setProductType(\"Wood\");\n otherOrder.setArea(new BigDecimal(\"560\"));\n\n service.setOrderId(otherOrder);\n\n Integer number = 610;\n\n Assert.assertEquals(otherOrder.getOrderNumber(), number);\n\n }", "public Orders(int ordersId) {\r\n this.ordersId = ordersId;\r\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public void setSalesorderId(Number value) {\n setAttributeInternal(SALESORDERID, value);\n }", "public final void setOrderNumber(com.mendix.systemwideinterfaces.core.IContext context, Long ordernumber)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.OrderNumber.toString(), ordernumber);\r\n\t}", "public void setOrder(Order order){\n this.order = order;\n }", "public void setOrderNumber(int value) {\n this.orderNumber = value;\n }", "public void setOrder(final Integer order) {\n this.order = order;\n }", "void setOrder(Order order);", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setMPC_Order_ID(int MPC_Order_ID) {\n\t\tif (MPC_Order_ID < 1)\n\t\t\tthrow new IllegalArgumentException(\"MPC_Order_ID is mandatory.\");\n\t\tset_Value(\"MPC_Order_ID\", new Integer(MPC_Order_ID));\n\t}", "void setOrder(int order){\r\n\t\t\tthis.order = order;\r\n\t\t}", "public void setOrder(final Order value)\n\t{\n\t\tsetOrder( getSession().getSessionContext(), value );\n\t}", "public void setOrderbyid(Integer orderbyid) {\r\n this.orderbyid = orderbyid;\r\n }", "public void seti_ordertrx_temp_ID (int i_ordertrx_temp_ID);", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrdersId(String ordersId) {\n this.ordersId = ordersId == null ? null : ordersId.trim();\n }", "public void setOrder(Integer order) {\n\t\tthis.order = order;\n\t}", "void prepareOrder(int orderId);", "public void setSalesOrderId(Number value) {\n setAttributeInternal(SALESORDERID, value);\n }", "public void setC_OrderLine_ID (int C_OrderLine_ID);", "@Override\r\n\tpublic Order update(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"UPDATE orders \"\r\n\t\t\t\t\t+ \"SET customer_id = %d WHERE order_id = %d \", order.getCustomer().getId(), order.getId()));\t\r\n\t\t\treturn readOrder(order.getId());\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 String getOrderId() {\n\t\treturn orderId;\n\t}", "public void setCurrentOrderId(String currentOrderId) {\n this.currentOrderId = currentOrderId;\n }", "public final void setOrder_Customer(com.mendix.systemwideinterfaces.core.IContext context, simpleordermodule.proxies.Customer order_customer)\r\n\t{\r\n\t\tif (order_customer == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.Order_Customer.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.Order_Customer.toString(), order_customer.getMendixObject().getId());\r\n\t}", "@JsonProperty(\"OrderId\")\n public String getOrderId() {\n return orderId;\n }", "public void setOrder(int order) {\n this.order = order;\n }", "public void setOrder(int order) {\n this.order = order;\n }", "private void recordOrderID(OrderID inOrderID)\n {\n String currentOrderIDList = getProperty(\"orderIDs\");\n currentOrderIDList += \",\" + inOrderID.getValue();\n setProperty(\"orderIDs\",\n currentOrderIDList);\n }", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethod(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryNoClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "@Override\n\tpublic void updateOrder(Orders order) throws SQLException {\n\t\tConnection conn = null;\n PreparedStatement stmt = null;\n String sql=\"UPDATE orders SET orderName=?,orderAddress=?,orderPhone=?,orderNumber=?,bookName=?,orderMemo=? WHERE orderId=?\";\n try {\n conn = DBCPUtils.getConnection();\n stmt = conn.prepareStatement(sql);\n stmt.setString(1,order.getOrderName());\n stmt.setString(2,order.getOrderAddress());\n stmt.setString(3,order.getOrderPhone());\n stmt.setInt(4,order.getOrderNumber());\n stmt.setString(5,order.getBookName());\n stmt.setString(6,order.getOrderMemo());\n stmt.setInt(7,order.getOrderId());\n stmt.executeUpdate();\n \n } catch (SQLException e) {\n e.printStackTrace();\n }finally{\n DBCPUtils.releaseConnection(conn, stmt, null); \n }\n\t\t\n\t}", "public Builder setOrderId(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00002000;\n orderId_ = value;\n onChanged();\n return this;\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public void setOrder(int order) {\n\t\tthis.order = order;\n\t}", "public void setOrderNo (Long orderNo) {\r\n\t\tthis.orderNo = orderNo;\r\n\t}", "public void setOrder(Order order) {\n this.order = order;\n notifyChanged();\n }", "public void setOrderItemAmount(Integer orderItemAmount) {\n this.orderItemAmount = orderItemAmount;\n }", "public void setOrder(int order) {\n mOrder = order;\n }", "@ApiModelProperty(example = \"123456\", value = \"Client order ID if supplied by client.\")\n public String getOrderId() {\n return orderId;\n }", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethodAndClear(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryWithClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check\r\n // the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "public void setOrderidentifier(String orderidentifier) {\n\t\tthis.orderidentifier = orderidentifier == null ? null : orderidentifier\n\t\t\t\t.trim();\n\t}", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "public void setOrderDocId(String orderDocId) {\r\n this.orderDocId = orderDocId;\r\n }", "public void setSOrderID(String sOrderID) {\n this.sOrderID = sOrderID;\n }", "public Integer\t\tgetOrderID();", "public void setOrder(List<Order> order) {\n this.order = order;\n }", "public synchronized void setNumOrdered(String itemID, int numOrdered) {\n\t\tItemOrder order;\n\t\tboolean found = false;\n\t\tint i = 0;\n\n\t\twhile (!found && i < itemsOrdered.size()) {\n\t\t\torder = itemsOrdered.get(i);\n\t\t\tif (order.getItem().getItemID().equals(itemID)) {\n\t\t\t\tfound = true;\n\t\t\t\tif (numOrdered <= 0)\n\t\t\t\t\titemsOrdered.remove(i);\n\t\t\t\telse\n\t\t\t\t\torder.setNumItems(numOrdered);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tif (!found) {\n\t\t\tItemOrder newOrder = new ItemOrder(Catalogue.instance.getModel().get(itemID));\n\t\t\titemsOrdered.add(newOrder);\n\t\t}\n\t\treturn;\n\t}", "public final void setOrder(java.lang.Integer order)\r\n\t{\r\n\t\tsetOrder(getContext(), order);\r\n\t}", "public void update(Order order) {\n order_dao.update(order);\n }", "@Update({\n \"update order\",\n \"set orderid = #{orderid,jdbcType=VARCHAR},\",\n \"name = #{name,jdbcType=VARCHAR},\",\n \"price = #{price,jdbcType=BIGINT},\",\n \"userid = #{userid,jdbcType=VARCHAR}\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n int updateByPrimaryKey(Order record);", "public void setOrderIndex(Integer orderIndex) {\n this.orderIndex = orderIndex;\n }", "public void setOrder(String Order) {\n this.Order = Order;\n }", "private void setOtherId(int value) {\n \n otherId_ = value;\n }", "@Override\r\n\tpublic void saveJoOrder(JoOrder joOrder){\n\t\tString headerId = Tools.getUUID();\r\n\t\tjoOrder.getJoHeader().setHeaderId(headerId);\r\n\t\tbaseDao.save(joOrder.getJoHeader());\r\n\t\tfor(JoLine joLine : joOrder.getJoLineList()){\r\n\t\t\tjoLine.setLineId(Tools.getUUID());\r\n\t\t\tjoLine.setHeaderId(headerId);\r\n\t\t\tjoLineDao.save(joLine);\r\n\t\t}\r\n\t}", "public void setC_OrderLine_ID (int C_OrderLine_ID)\n\t{\n\t\tif (C_OrderLine_ID < 1) \n\t\t\tset_Value (COLUMNNAME_C_OrderLine_ID, null);\n\t\telse \n\t\t\tset_Value (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID));\n\t}" ]
[ "0.7143681", "0.697228", "0.69691676", "0.69534147", "0.6871746", "0.6762265", "0.6716741", "0.6716741", "0.66143477", "0.6597528", "0.6597528", "0.6542699", "0.65177894", "0.64492935", "0.64299256", "0.6391408", "0.6355278", "0.6272795", "0.626656", "0.6191187", "0.6167122", "0.61486715", "0.6115445", "0.6114965", "0.6088436", "0.6074867", "0.6059308", "0.6058109", "0.6041738", "0.5966471", "0.59520006", "0.59257185", "0.59077007", "0.59075606", "0.58959246", "0.58959246", "0.58871216", "0.58754593", "0.5862061", "0.58483166", "0.58461267", "0.5824419", "0.58112955", "0.58112955", "0.58112955", "0.5798162", "0.579269", "0.5788633", "0.5784255", "0.5762998", "0.5742441", "0.57409465", "0.57409465", "0.5727567", "0.57265127", "0.5722515", "0.57201487", "0.57117206", "0.57037055", "0.5703608", "0.569842", "0.5694874", "0.5691705", "0.5668734", "0.56422853", "0.55921346", "0.55774224", "0.5564428", "0.5562731", "0.55620253", "0.55620253", "0.5558074", "0.5555933", "0.55429053", "0.5518533", "0.5514135", "0.5511276", "0.5510465", "0.55075365", "0.5507328", "0.5502186", "0.5496722", "0.5495341", "0.5479552", "0.5465895", "0.5464269", "0.5462463", "0.54543066", "0.5430721", "0.542336", "0.541346", "0.54108155", "0.5401472", "0.539978", "0.53784496", "0.5372617", "0.53278023", "0.52983236", "0.5295361" ]
0.6420445
16
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.color_id
public String getColorId() { return colorId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getColorId() {\n return colorId;\n }", "public Integer getProductColorId() {\r\n return productColorId;\r\n }", "public int getmColorId() {\n return mColorId;\n }", "public String getColor() {\n return colorID;\n }", "public int getColor() {\n\t\treturn getMappedColor(color);\n\t}", "protected ArrayList<String> getViewID(String color){\n if(color.equals(AppCSTR.GREEN_IDS)){\n return greenIDs;\n }\n return redIDs;\n }", "public int getColor() {\n return this.color;\n }", "public Integer getColor() {\n\t\treturn color;\n\t}", "public int getColor(){\r\n\t\treturn color;\r\n\t}", "public int color(int colorId){\n return ContextCompat.getColor(appCtx, colorId);\n }", "@ColorInt\n public int getColor() {\n return mColor;\n }", "public int getColor() {\n return color;\n }", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor() {\n \t\treturn color;\n \t}", "public int getColor()\r\n {\r\n return m_iColor;\r\n }", "public void setProductColorId(Integer productColorId) {\r\n this.productColorId = productColorId;\r\n }", "public Integer getColorCd() {\n\t\treturn colorCd;\n\t}", "public int color() {\n\t\treturn color;\n\t}", "public ResultSet getItemsColor() throws SQLException {\n\n\t\tConnection dbConnection = getConnection();\n\t\tString query;\n\n\t\tquery = \"SELECT DISTINCT I.Color FROM ITEM I, AUCTION A WHERE A.ItemID = I.ItemID\";\n\n\t\tPreparedStatement preparedStatement = dbConnection.prepareStatement(query);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\treturn rs;\n\t}", "public int getColorInt () {\r\n return this.colorReturned;\r\n }", "public int getColorValue() {\r\n\t\treturn color;\r\n\t}", "public int getColour() {\n return colour;\n }", "public void setColorId(String colorId) {\n this.colorId = colorId == null ? null : colorId.trim();\n }", "public String obtenColor() {\r\n return color;\r\n }", "public int getColor() {\r\n return Color;\r\n }", "public String getCol()\n {\n return color;\n }", "public int getColour()\r\n\t{\r\n\t\treturn colour;\r\n\t}", "static int getColor(Context context, @AttrRes int color) {\n TypedValue tv = new TypedValue();\n context.getTheme().resolveAttribute(color, tv, true);\n return tv.data;\n }", "public String getColor(){\n return this._color;\n }", "public String getColor(){\n\t\treturn color;\n\t}", "public String getColor() {\n return this.color;\n }", "public Color getColor() {\n return this.color;\n }", "public String dame_color() {\n\t\treturn color;\n\t}", "public int getColorIndex() {\n return colorIndex;\n }", "public String getColor() {\r\n\t\treturn color;\r\n\t}", "protected static int getMappedColor(int vertexColor) {\n\t\treturn ColorMap.get(vertexColor);\n\t}", "public String getColor()\n {\n return this.color;\n }", "public Color getColor() {\n \t\treturn color;\n \t}", "public Color getColor() {\n return color;\n }", "public CityColor getColor() {\r\n\t\treturn this.color;\r\n\t}", "public Color color() {\n return this.color;\n }", "public String getColor() {\r\n return color;\r\n }", "public Color getColor() {\r\n return this.color;\r\n }", "public String getColor(){\n return this.color;\n }", "public Color getColor() {\r\n\t\treturn color;\r\n\t}", "public Color getColor() {\r\n\t\treturn color;\r\n\t}", "public Color getColor() {\r\n return color;\r\n }", "public Color getColor() {\r\n return color;\r\n }", "public Color getColor() {\r\n return color;\r\n }", "public Color getColor() {\n return color;\r\n }", "public String getColor() {\n\t\treturn color;\n\t}", "public String getColor() {\n\t\treturn color;\n\t}", "@Override\n public String getColor() {\n return this.color.name();\n }", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\n\treturn color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor() {\n return color;\n }", "public Color getColor()\n {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public String getColor() {\n return color;\n }", "public Color getColor() {\n\t\treturn color;\n\t}", "public Color getColor() {\n\t\treturn color;\n\t}", "public Color getColor() {\n\t\treturn color;\n\t}", "public Color getColor() {\n\t\treturn color;\n\t}", "public String getColor(){\r\n return color;\r\n }", "public Color getColor() \n\t{\n\t\treturn color;\n\t}", "public Color color() {\n return color;\n }", "public Color color() {\n return color;\n }", "public Color getColor() {\n return this.color;\n }", "public Color getColor() {\n\t\treturn this.color;\n\t}", "@Override\n\t\tpublic List<LeaveTypePojo> getcolor() {\n\t\t\treturn empdao.getcolor();\n\t\t}", "public Color getColor() {\n\t\treturn _color;\n\t}", "public String getColor() { \n return color; \n }", "public Color getColor()\n {\n return color;\n }", "public Color getColor()\n {\n return color;\n }", "public Color getColor()\n {\n return color;\n }", "public Color getColor(){\n return color;\n }", "@NoProxy\n @NoWrap\n @NoDump\n public String getColor() {\n return color;\n }", "public String getColor()\n {\n return color;\n }", "public String getColor()\n {\n return color;\n }", "public String getColorNum() {\n return (String)getAttributeInternal(COLORNUM);\n }", "public static int getIDWithColor(DyeColor dc) {\n for (BlockColorData bdc : colorList) {\n if (bdc.getDyeColor().equals(dc) && !bdc.hasData)\n return bdc.getTypeID();\n }\n return 1;\n }", "public Color getColor()\n { \n return color;\n }", "public ColorRoom getColor() {\n return color;\n }", "public String getColor() {\n\t\treturn \"Elcolor del vehiculo es: \"+color; \n\t }", "@Override\n public String getColor() {\n return this.color;\n }", "public short getColor() {\n\t\treturn this.color;\n\t}" ]
[ "0.73670965", "0.7099974", "0.70326734", "0.6757101", "0.62337726", "0.6148176", "0.61379623", "0.60968417", "0.6090776", "0.6080914", "0.60733056", "0.605305", "0.6051732", "0.6051732", "0.60400844", "0.6004631", "0.59218717", "0.59101206", "0.58950245", "0.5844141", "0.5790896", "0.57845336", "0.57818115", "0.57661694", "0.5745545", "0.57300997", "0.5722264", "0.57173514", "0.5713447", "0.5676823", "0.5632604", "0.5627385", "0.5614546", "0.56111073", "0.5594349", "0.5592112", "0.5590985", "0.5586078", "0.55845624", "0.5581207", "0.5569799", "0.5569766", "0.5568525", "0.5561322", "0.5560625", "0.55604047", "0.55604047", "0.55525625", "0.55525625", "0.55525625", "0.5546436", "0.55450416", "0.55450416", "0.5539754", "0.5536634", "0.5536634", "0.5536634", "0.5520374", "0.55199087", "0.55199087", "0.55199087", "0.55199087", "0.55199087", "0.55199087", "0.55180377", "0.55168223", "0.55168223", "0.55168223", "0.55168223", "0.55168223", "0.55168223", "0.55168223", "0.55168223", "0.5515249", "0.5515249", "0.5515249", "0.5515249", "0.5515214", "0.5511888", "0.5511022", "0.5511022", "0.5505742", "0.5497361", "0.548972", "0.54846525", "0.5481677", "0.5476858", "0.5476858", "0.5476858", "0.5471337", "0.5469587", "0.5466091", "0.5466091", "0.5459376", "0.54574966", "0.5452205", "0.54311293", "0.5430828", "0.5430233", "0.54184747" ]
0.71516883
1
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.color_id
public void setColorId(String colorId) { this.colorId = colorId == null ? null : colorId.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProductColorId(Integer productColorId) {\r\n this.productColorId = productColorId;\r\n }", "public void setColor(int color){\n this.color = color;\n }", "public void setColor(int color) {\n this.color = color;\n }", "public void setColor(Integer color) {\n\t\tthis.color = color;\n\t}", "public void setColor(int color){\r\n\t\tthis.color=color;\r\n\t}", "public int getColorId() {\n return colorId;\n }", "public void setColor(int color){\n\t\tthis.color = color;\n\t}", "public void setColor(int color) {\r\n\t\tthis.color = color;\r\n\t}", "public Integer getProductColorId() {\r\n return productColorId;\r\n }", "public void setColor(int color);", "public void setColor(int color);", "public void setColor(Color color_) {\r\n\t\tcolor = color_;\r\n\t}", "void setColor(@ColorInt int color);", "public int getmColorId() {\n return mColorId;\n }", "public void setColor(Long color) {\n\t\tthis.color = color;\n\t}", "public String getColorId() {\n return colorId;\n }", "public void setColor(Color color) {\n this.color = color;\n }", "public void setColorID(int colorID) {\n if (colorID < 0 || colorID > 5) {\n throw new IllegalArgumentException(\"colorID must be between 0 and 5\");\n }\n this.colorID = colorID;\n }", "public void setColor(Color color) {\n this.color = color;\r\n }", "public void setColor(Color color) {\n this.color = color;\n }", "public void setColor(String color){\n this.color = color;\n }", "public void setColor(Color c) { color.set(c); }", "public void setColor(int value);", "public void setColor(String color) {\r\n this.color = color;\r\n }", "@Override\n public void setColor(Color color) {\n this.color = color;\n }", "public void setColor(Color color) \n\t{\n\t\tthis.color = color;\n\t}", "public void setColor(String color) {\r\n this.color = color;\r\n }", "public void setColor(Color color) {\n\t\tthis.color = color;\n\t}", "public void setColor(Color color) {\n\t\tthis.color = color;\n\t}", "public void setColor(String color) {\n this.color = color;\n }", "public void setColor(String color) {\n this.color = color;\n }", "public void setColor(String color) {\n this.color = color;\n }", "public void setColor(String color) {\n this.color = color;\n }", "public void setColor(String color) {\n this.color = color;\n }", "public void setColor(String color) {\n this.color = color;\n }", "protected void setColor(Color color) {\r\n\t\tthis.color = color;\r\n\t}", "public void setColor(String color){\n\t\tcolor = this.color;\n\t}", "Category(int colorId) {\n this.colorId = colorId;\n }", "public void setColor(ColorCallback<DatasetContext> colorCallback) {\n\t\t// sets the callback\n\t\tthis.colorCallback = colorCallback;\n\t\t// checks if callback is consistent\n\t\tif (colorCallback != null) {\n\t\t\t// adds the callback proxy function to java script object\n\t\t\tsetValueAndAddToParent(CommonProperty.COLOR, colorCallbackProxy.getProxy());\n\t\t} else {\n\t\t\t// otherwise sets null which removes the properties from java script object\n\t\t\tremove(CommonProperty.COLOR);\n\t\t}\n\t}", "public void setColor(String color) {\r\n\t\tthis.color = color;\r\n\t}", "@Override\n\tpublic void setColor(String color) {\n\t\tthis.color=color;\n\t}", "public void setColor(String color) {\n\t\tthis.color = color;\n\t}", "public void setColor(String color) {\n\t\tthis.color = color;\n\t}", "public void setColor(String color) {\n this.color=color; //el this se coloca a la propiedad de la clase \n // para diferenciarla del parametro\n }", "public void setColor(String color) \n\t{\n\t\tthis.color = color;\n\t}", "public void set(Color inColor) {\n\n\t\tthis.r = inColor.r;\n\t\tthis.g = inColor.g;\n\t\tthis.b = inColor.b;\n\n\t}", "public void setColor(Color c) {\n this.color = c;\n }", "public void setColor(Color c) {\n color = c;\n }", "@Override\n\tpublic void setColor(String color) {\n\t\tthis.color = color;\n\t}", "public void setColor(Color color) {\n\t\t_color = color;\n\t\tnotifyObs(this);\n\t}", "public void setColor(Color color);", "public void setColor(int color) {\n/* 77 */ this.color = color;\n/* 78 */ this.paint.setColor(this.color);\n/* */ }", "void setColor(Vector color);", "public void selectProductColor(String color){\n Select select = new Select(colorSelect);\n select.selectByVisibleText(color);\n }", "public void setColor(String pColor){\n this._color=pColor;\n }", "public String getColor() {\n return colorID;\n }", "public void setColor(Color newColor) ;", "public PointDetails setColor(int color){\n\t\t\treturn setColor(()->color);\n\t\t}", "colorChoice(Vec3 color) {\n this.color = color;\n }", "public void setColor(Color c)\n\t{\n\t\tthis.color = c;\n\t}", "public void setColor(Color newColor) {\n\tcolor = newColor;\n }", "public void setColor(int iColor_p) throws Exception\r\n {\r\n m_iColor = iColor_p;\r\n\r\n update(this, 0, null);\r\n }", "@Override\r\n public void setColor(Llama.Color color) {\r\n this.color = color;\r\n }", "public void setColorTo(String color) {\n\t\tsetValue(Property.COLOR_TO, color);\n\t}", "public void setColor(Color c) {\n\t\tthis.color = c;\n\t}", "public Color setColor(String color){\n\t\tColor oldColor = this.routeColor;\n\t\trouteColor = Color.web(color);\n\n\t\tnotifyObservers(\"color\");\n\n\t\treturn oldColor;\n\t}", "void setRed(int red){\n \n this.red = red;\n }", "public void setColor(String color) {\n\t\t// resets callback\n\t\tsetColor((ColorCallback<DatasetContext>) null);\n\t\t// stores value\n\t\tsetValueAndAddToParent(CommonProperty.COLOR, color);\n\t}", "protected ArrayList<String> getViewID(String color){\n if(color.equals(AppCSTR.GREEN_IDS)){\n return greenIDs;\n }\n return redIDs;\n }", "public int color(int colorId){\n return ContextCompat.getColor(appCtx, colorId);\n }", "public void set_color(String color){ color_ = GralColor.getColor(color.trim()); }", "public void setColor(Color c);", "public void setColor(String aColor, Context context){\n this.color = aColor;\n writeFile(context);\n }", "public void setColor(Color color) {\r\n\t\tthis.color = ColorUtil.convertColorToColorRGBA(color);\r\n\t}", "public abstract void setColor(Color color);", "public abstract void setColor(Color color);", "public void setColor(Color color) {\n\t\tthis.color = color;\n\t\tfireListenerSignal();\n\t}", "public void setColor(IsColor color) {\n\t\tsetColor(IsColor.checkAndGetValue(color));\n\t}", "public PointDetails setColor(IntSupplier color){\n\t\t\tthis.color = color;\n\t\t\treturn this;\n\t\t}", "@Override\n\tpublic void setShapeColor(Color color) {\n\t\tthis.currentColor = color;\n\t}", "public void setColor(int color) {\n mColor = color;\n mPaint.setColor(mColor);\n }", "public void setTrackColor(@ColorInt int color){\n this.mTrackColor = color;\n refreshTheView();\n }", "@NoProxy\n @NoWrap\n public void setColor(final String val) {\n color = val;\n }", "public void setColorColumn (int modelIndex)\n\t{\n\t\tm_colorColumnIndex = modelIndex;\n\t}", "public void setColorTo(IsColor color) {\n\t\tsetColorTo(IsColor.checkAndGetValue(color));\n\t}", "public void setColor(final Color theColor) {\n myColor = theColor;\n }", "public static int setRed(int color, int red) {\n return (color & 0xFF00FFFF) | (red << 16);\n }", "public void setColor(Color color) {\r\n Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(),\r\n currentHSBColor);\r\n Point p = getColorPosition(currentHSBColor);\r\n colorX = p.x;\r\n colorY = p.y;\r\n repaint();\r\n }", "public void setColorCd(Integer colorCd) {\n\t\tthis.colorCd = colorCd;\n\t}", "public void setColor(Color clr){\n color = clr;\n }", "public StockEvent setColor(Color color) {\n this.color = color;\n return this;\n }", "@Override // Override GameObject setColor\n @Deprecated // Deprecated so developer does not accidentally use\n public void setColor(int color) {\n }", "public void setColor(Color newColor) {\n\t\tcolor = newColor;\n\t}", "public void setColor(Color color) {\n if (color == null) {\n throw new IllegalArgumentException(\"color cannot be null\");\n }\n this.color = color;\n }", "public Renderable setColor(int color)\n\t{\n\t\tfloat a = color & 0xFF;\n\t\tfloat b = (color >>> 8) & 0xFF;\n\t\tfloat g = (color >>> 16) & 0xFF;\n\t\tfloat r = (color >>> 24) & 0xFF;\n\t\t\n\t\t// Normalize the channels.\n\t\tr /= 255f;\n\t\tg /= 255f;\n\t\tb /= 255f;\n\t\ta /= 255f;\n\t\t\n\t\treturn setColor(r, g, b, a);\n\t}", "public void changeColor(Color color) {\n this.color = color;\n }", "private void setColorForDialog(int color) {\n titleEditText.setTextColor(color);\n descriptionEditText.setTextColor(color);\n colorTextView.setTextColor(color);\n titleTextView.setTextColor(color);\n descriptionTextView.setTextColor(color);\n\n\n // convert color from int format to HEX -> to save in db\n chosenColor = String.format(\"#%06X\", (0xFFFFFF & color));\n }", "public void setColor(float[] color){\n GLES20.glUniform4fv(mColorHandle, 1, color, 0);\n }", "public void setColor(String c);", "public void setColor(NativeCallback colorCallback) {\n\t\t// resets callback\n\t\tsetColor((ColorCallback<DatasetContext>) null);\n\t\t// stores value\n\t\tsetValueAndAddToParent(CommonProperty.COLOR, colorCallback);\n\t}" ]
[ "0.6506218", "0.6418446", "0.63583726", "0.63442945", "0.6323876", "0.6321862", "0.63207316", "0.6247124", "0.62065905", "0.60897994", "0.60897994", "0.60645366", "0.60629964", "0.6056776", "0.6022548", "0.60036916", "0.5998151", "0.5995651", "0.59930706", "0.5943292", "0.5939454", "0.5935722", "0.5908757", "0.5896871", "0.58664656", "0.5845055", "0.5838984", "0.58255446", "0.58255446", "0.581241", "0.581241", "0.581241", "0.581241", "0.581241", "0.581241", "0.5781319", "0.5779184", "0.57751006", "0.5720723", "0.57106096", "0.56767225", "0.56698394", "0.56698394", "0.5657822", "0.56540006", "0.5639829", "0.56361496", "0.5618504", "0.5617995", "0.5610803", "0.5589823", "0.5583889", "0.55731606", "0.55713135", "0.5558912", "0.5538827", "0.5532018", "0.55312544", "0.5509837", "0.5502363", "0.549561", "0.5494953", "0.54902184", "0.5490078", "0.54837567", "0.54809564", "0.5480538", "0.54800045", "0.546793", "0.5467199", "0.5462119", "0.54309446", "0.5429634", "0.5426908", "0.5418458", "0.5418458", "0.5415819", "0.5415609", "0.5413988", "0.541098", "0.53950816", "0.53927714", "0.53898823", "0.53890866", "0.5385947", "0.5374205", "0.53701705", "0.5369841", "0.5363488", "0.53631353", "0.5362505", "0.535116", "0.5342897", "0.53397566", "0.5335165", "0.5334109", "0.53312266", "0.5324616", "0.5324147", "0.5322414" ]
0.66234165
0
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.size_id
public String getSizeId() { return sizeId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getSizeId() {\n return sizeId;\n }", "public int reproduct_sizes() {\n int prosize_id = 0;\n try (Connection con = DBUtil.getConnection();\n Statement stm = con.createStatement();\n ResultSet rs = stm.executeQuery(\"select size_id from sizes order by size_id desc limit 1;\");) {\n if (rs.next()) {\n prosize_id = rs.getInt(\"size_id\");\n } else {\n System.out.println(\"not set id!\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return prosize_id;\n }", "public String getSizeId() {\n return (String)getAttributeInternal(SIZEID);\n }", "public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }", "fi.kapsi.koti.jpa.nanopb.Nanopb.IntSize getIntSize();", "public long getSize()\n {\n return getLong(\"Size\");\n }", "public int getIdSize() {\n\t\treturn LongConverter.SIZE;\n\t}", "@Element \n public String getSize() {\n return size;\n }", "public Number getSizeQty() {\n return (Number)getAttributeInternal(SIZEQTY);\n }", "public Integer getSize() {\n return size;\n }", "@NotPersistent\n public String getSize() {\n return size;\n }", "@Override\n\tpublic int findPrice(int cakeId, int sizeId) throws SQLException{\n\t\treturn cartDao.findPrice(cakeId, sizeId);\n\t}", "@TargetAttributeType(\n\t\tname = SIZE_ATTRIBUTE_NAME,\n\t\tfixed = true,\n\t\thidden = true)\n\tpublic default long getSize() {\n\t\treturn getTypedAttributeNowByName(SIZE_ATTRIBUTE_NAME, Long.class, 0L);\n\t}", "@JSProperty(\"size\")\n double getSize();", "@ApiModelProperty(example = \"3615\", value = \"Numeric value in bytes\")\n /**\n * Numeric value in bytes\n *\n * @return size Integer\n */\n public Integer getSize() {\n return size;\n }", "public int getSize() {\n\n return size;\n }", "public int getSize() {\n\treturn sizeNumber;\r\n}", "public void setSizeId(Integer sizeId) {\n this.sizeId = sizeId;\n }", "public Number getSizeSno() {\n return (Number)getAttributeInternal(SIZESNO);\n }", "public java.lang.String getSIZE() {\n return SIZE;\n }", "@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getOrderSize()\r\n\t{\r\n\t\tSystem.out.println(\"Retrieving Order Size: \" + orderSize);\r\n\t\treturn orderSize;\r\n\t}", "public int getOrdersProductssSize(com.sybase.persistence.Query query)\n {\n return ru.terralink.mvideo.sap.Products.getSize(initChildrenQuery(query, new String[]{\"ordersFK\"}));\n }", "public int getSize() {\n return this.size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public double getOrderSize() {\n return orderSize_;\n }", "public int getSize() {\r\n return size;\r\n }", "public int getSize() {\r\n return _size;\r\n }", "public int getSize() {\r\n return this.size;\r\n }", "public int getSize()\n\n {\n\n return size;\n\n }", "public int getSize()\r\n {\r\n return size;\r\n }", "public int getSize()\n {\n return this.size;\n }", "@Modifying(clearAutomatically = true)\n @Transactional\n @Query(\"update Site s set s.size = ?3 where s.userId = ?1 and s.id = ?2\")\n void updateSiteSize(Long userId, Long id, int size);", "public int getSize() {\r\n return size;\r\n }", "public double getOrderSize() {\n return orderSize_;\n }", "public int getSize() {\n return cart.size();\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() { \n return size;\n }", "public Size getSize() {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "@ApiModelProperty(value = \"The size of the top bid order.\")\n public BigDecimal getBidSize() {\n return bidSize;\n }", "public int getSize(){\n\t\treturn this.size;\n\t}", "public int getSize() {\r\n \treturn size;\r\n }", "public int getSize(){\n return size;\n }", "public long getSize() {\r\n return size;\r\n }", "public String getSize() {\n return size;\n }", "public String getSize() {\n return size;\n }", "public int getSize()\r\n {\r\n return size;\r\n }", "public String getSize() {\r\n return size;\r\n }", "private int getSize() {\n\t\t\treturn size;\n\t\t}", "public int getSize(){\n\t\treturn size;\n\t}", "public int getSize(){\n\t\treturn size;\n\t}", "public int getSize(){\n\t\treturn size;\n\t}", "public int getSize(){\n\t\treturn size;\n\t}", "public int getSize(){\n return size;\n }", "public int getSize(){\n return size;\n }", "public int getSize(){\n return size;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(example = \"100.0\", value = \"The size of the image in GB\")\n\n public BigDecimal getSize() {\n return size;\n }", "public double getSize() \n {\n return size;\n }", "int getSize() {\n return size;\n }", "public int getSize() {\n\t\treturn cart.size();\n\t}", "public int getSize() {\r\n\t\treturn size;\r\n\t}", "public double getSize() {\n return size_;\n }", "public fi.kapsi.koti.jpa.nanopb.Nanopb.IntSize getIntSize() {\n return intSize_;\n }", "public String getGoodsSize() {\n return goodsSize;\n }", "int getSize() {\n return size;\n }", "public FireSize getSize() {\n return size;\n }", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() { return size; }", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}" ]
[ "0.71216166", "0.6692829", "0.65512997", "0.62721306", "0.62190664", "0.6138533", "0.6090741", "0.6039432", "0.59361345", "0.5927038", "0.59251124", "0.5924614", "0.58270407", "0.5822772", "0.5805071", "0.58048886", "0.58009434", "0.5784884", "0.57836944", "0.5773266", "0.57652986", "0.5758138", "0.57526124", "0.5738596", "0.5736424", "0.5730961", "0.5714894", "0.5714894", "0.5714894", "0.5714894", "0.5714894", "0.5714894", "0.5714894", "0.5714894", "0.5713098", "0.57130724", "0.5704241", "0.56975496", "0.56972104", "0.56956077", "0.5694053", "0.56926084", "0.5687692", "0.5687006", "0.567826", "0.5672516", "0.5672384", "0.5672384", "0.5672384", "0.5672384", "0.5670515", "0.5670072", "0.56688565", "0.56680286", "0.56680286", "0.56680286", "0.5661399", "0.5660924", "0.5654951", "0.5652847", "0.5652288", "0.5647952", "0.5647952", "0.5647448", "0.5637635", "0.56355643", "0.5625542", "0.5625542", "0.5625542", "0.5625542", "0.56228226", "0.56228226", "0.56228226", "0.5617434", "0.56047726", "0.55967337", "0.5595627", "0.55894953", "0.5588997", "0.5585782", "0.558566", "0.5585343", "0.5580076", "0.55754614", "0.55739355", "0.55739355", "0.55739355", "0.55739355", "0.55739355", "0.55739355", "0.55739355", "0.55739355", "0.55739355", "0.55739355", "0.55739355", "0.55739355", "0.55739355", "0.5573695", "0.5571215", "0.5571215" ]
0.6904729
1
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.size_id
public void setSizeId(String sizeId) { this.sizeId = sizeId == null ? null : sizeId.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSizeId(Integer sizeId) {\n this.sizeId = sizeId;\n }", "@Modifying(clearAutomatically = true)\n @Transactional\n @Query(\"update Site s set s.size = ?3 where s.userId = ?1 and s.id = ?2\")\n void updateSiteSize(Long userId, Long id, int size);", "private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}", "public void setSizeId(String value) {\n setAttributeInternal(SIZEID, value);\n }", "public void setSize(int _size)\r\n {\r\n size = _size;\r\n }", "public void setSize(int size) {\n\tthis.sizeNumber = sizeNumber;\r\n}", "public void setSize(int size){\n this.size = size;\n }", "public void setSize(int size) {\r\n _size = size;\r\n }", "public void setSize(Integer size) {\n this.size = size;\n }", "public void setSize(int size) {\r\n this.size = size;\r\n }", "public void setSize(long size) {\r\n\t\tthis.size = size;\r\n\t}", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n\t\t _size = size;\n\t}", "@Element \n public void setSize(String size) {\n this.size = size;\n }", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public Integer getSizeId() {\n return sizeId;\n }", "public void setSize(int size){\n\t\tthis.shipSize = size;\n\t}", "public int reproduct_sizes() {\n int prosize_id = 0;\n try (Connection con = DBUtil.getConnection();\n Statement stm = con.createStatement();\n ResultSet rs = stm.executeQuery(\"select size_id from sizes order by size_id desc limit 1;\");) {\n if (rs.next()) {\n prosize_id = rs.getInt(\"size_id\");\n } else {\n System.out.println(\"not set id!\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return prosize_id;\n }", "public String getSizeId() {\n return sizeId;\n }", "public void setSize(String size) {\n this.size = size;\n }", "public void set_size(int s);", "@Override\n\tpublic void insert(SizeDTO sizeDTO) {\n\t\tSize size = new Size();\n\t\tsize.setName(sizeDTO.getName());\n\t\tsizeDao.insert(size);\n\t\tsizeDTO.setId(size.getId());\n\t}", "public void setSize(int value) {\n\t\tthis.size = value;\n\t}", "public void setSizeQty(Number value) {\n setAttributeInternal(SIZEQTY, value);\n }", "public void setSize(long value) {\n this.size = value;\n }", "public void setPackageSize(int size){\r\n }", "public void setSize(double size) \n {\n this.size = size;\n }", "private void setSize(int s){\n\t\tsize = s;\n\t}", "public void updateSizeProduct(SizeFx sizeFx) throws ApplicationException {\n Size size = new Size();\n size.setIdSize(sizeFx.getIdSize());\n\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n try {\n session.beginTransaction();\n\n Menu updateProduct = (Menu) session.get(Menu.class, menuFxObjectPropertyEdit.getValue().getIdProduct());\n updateProduct.setSize(size);\n\n session.update(updateProduct);\n session.getTransaction().commit();\n } catch (RuntimeException e) {\n session.getTransaction().rollback();\n SQLException sqlException = getCauseOfClass(e, SQLException.class);\n throw new ApplicationException(sqlException.getMessage());\n }\n\n initMenuList();\n }", "public void setSize(@Nullable String size) {\n this.size = size;\n }", "public void setPropertyValue(Object id, Object value){\n\t\tif(ID_SIZE.equals(id)) \n\t\t\tsuper.setPropertyValue(id,new Dimension(getSize()));\n\t\telse\n\t\t\tsuper.setPropertyValue(id,value);\n\t}", "public void setSize(String size) {\r\n //System.out.print(\"Setting Size...\");\r\n this.Size = size;\r\n }", "public void setSIZE(java.lang.String SIZE) {\n this.SIZE = SIZE;\n }", "@JSProperty(\"size\")\n void setSize(double value);", "public void setSize(String size) {\r\n this.size = size == null ? null : size.trim();\r\n }", "public void setLocalSize(int size);", "public Builder setSize(int value) {\n\n size_ = value;\n onChanged();\n return this;\n }", "public Builder setSize(int value) {\n\n size_ = value;\n onChanged();\n return this;\n }", "public void setSize(int size);", "@Override\n public void setSizeInWorkspace(com.gensym.util.Structure sizeInWorkspace) throws G2AccessException {\n setAttributeValue (SystemAttributeSymbols.SIZE_IN_WORKSPACE_, sizeInWorkspace);\n }", "public static void setHotelSize(int size) {\r\n\t\tfor(int count = 0;count< size; count++) {\r\n\t\t\thotel_size.add(count + 1);\r\n\t\t}\r\n\t}", "public abstract void adjustSize(long size);", "public void setElementSize(int elementsize) {\n\t\tthis.elementsize = elementsize;\n\t}", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final Builder size(long size) {\n this.size = size;\n return this;\n }", "public void setSize(Vector2ic size){\n glfwSetWindowSize(handle, size.x(), size.y());\n this.size.set(size);\n sizeMultiplexer.handle(new WindowSizeEvent(handle, size.x(), size.y()));\n }", "public void setSizeSQM(double value) {\n this.sizeSQM = value;\n }", "public void sizeBy(float size) {\n internalGroup.sizeBy(size);\n dataTrait.width = internalGroup.getWidth();\n dataTrait.height = internalGroup.getHeight();\n resetSprite();\n }", "public void selectSmallSize() {\n\t\tdriver.findElement(By.xpath(\"//*[@id='layered_id_attribute_group_1']\")).click();\n\t}", "public void setSizeModifier(Dimension size) {\n\t\tthis.size = size;\n\t}", "public void changeSquareSize(){\r\n for(Square i : sqList){\r\n i.setSize(48);\r\n } \r\n }", "public synchronized void setSymbolTableSize(int aSymbolTableSize)\n\t\t\t\t\t\t\t\t\t\t throws EPPParserException {\n\t\tcat.debug(\"setSymbolTableSize(int symbolTableSize) enter\");\n\t\tsymbolTableSize = aSymbolTableSize;\n\n\t\tif (aSymbolTableSize == 0) {\n\t\t\t/**\n\t\t\t * @todo change the configuration that's instantiated to be\n\t\t\t * \t\t configurable\n\t\t\t */\n\t\t\tparserImpl = new DOMParser(new XMLGrammarCachingConfiguration());\n\t\t}\n\t\telse {\n\t\t\tSymbolTable symtable = new SymbolTable(symbolTableSize);\n\n\t\t\ttry {\n\t\t\t\tparserImpl.setProperty(SYMBOL_TABLE, symtable);\n\t\t\t}\n\t\t\t catch (SAXException e) {\n\t\t\t\tcat.error(\"Couldn't reset symbol table to size \"\n\t\t\t\t\t\t + symbolTableSize);\n\t\t\t\tthrow new EPPParserException(e);\n\t\t\t}\n\t\t}\n\n\t\tcat.debug(\"setSymbolTableSize(int symbolTableSize) exit\");\n\t}", "public void setSizeInBits(final int size) {\n\t\tthis.sizeinbits = size;\n\t}", "public void setPizzaSize(String size) {\n pizzaSize = size;\n }", "public void setProcedureSize(ParseTree node, int size) {\n\t\tthis.procedureDataSize.put(node, size);\n\t}", "public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }", "public void setObjectSize(short size) { this.objectSize=size; }", "public void setSize(Dimension size) {\r\n this.size = size;\r\n }", "public String getSizeId() {\n return (String)getAttributeInternal(SIZEID);\n }", "public void setSize(TSizeInBytes size) {\n\n\t\tthis.size = size;\n\t}", "public void setSizeV(long s){\n\t\tthis.sizeV = s;\n\t}", "@Override\n\tpublic int findPrice(int cakeId, int sizeId) throws SQLException{\n\t\treturn cartDao.findPrice(cakeId, sizeId);\n\t}", "public List<PropertyImages> findWhereSizeEquals(int size) throws PropertyImagesDaoException\n\t{\n\t\ttry {\n\t\t\treturn getJdbcTemplate().query(\"SELECT ID, TITLE, TYPE, SIZE, SRC_URL, PROPERTY_DATA_UUID FROM \" + getTableName() + \" WHERE SIZE = ? ORDER BY SIZE\", this,size);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new PropertyImagesDaoException(\"Query failed\", e);\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void setElementSize(int elementSize) {\n\t\t\n\t}", "public void setSizeMessage(String sizeMessage) {\n\t\tthis.sizeMessage = sizeMessage;\n\t}", "public void setKeySize(int keySize) {\n this.keySize = keySize;\n }", "public FileObject size(Integer size) {\n this.size = size;\n return this;\n }", "@ReactProp(name = \"size\")\n public void setSize(ReactSwipeRefreshLayout view, Dynamic size) {\n if (size.isNull()) {\n view.setSize(SwipeRefreshLayout.DEFAULT);\n } else if (size.getType() == ReadableType.Number) {\n view.setSize(size.asInt());\n } else if (size.getType() == ReadableType.String) {\n setSize(view, size.asString());\n } else {\n throw new IllegalArgumentException(\"Size must be 'default' or 'large'\");\n }\n }", "public void setSizeSno(Number value) {\n setAttributeInternal(SIZESNO, value);\n }", "public void setProdSize(String value) {\n setAttributeInternal(PRODSIZE, value);\n }", "public void setSize(PlayerSize size) {\n if (size == this.size) {\n return; // Return, already sized like that\n }\n\n PlayerSize oldSize = this.size;\n this.size = size;\n\n updateSizeSafely(getView());\n\n if (mListener != null) {\n mListener.onPlayerSizeChanged(size, oldSize);\n }\n }", "public void setSizeState(SizeState size) {\n this.sizeState = size;\n }", "public com.autodesk.ws.avro.Call.Builder setObjectSize(java.lang.Long value) {\n validate(fields()[6], value);\n this.object_size = value;\n fieldSetFlags()[6] = true;\n return this; \n }", "@Override\r\n\tpublic void setSequenceSize(int size) {\n\t\tthis.sequence = \"Sequence length: \"+size;\r\n\t\tupdate();\r\n\t}", "public void selectLargeSize() {\n\n\t\tdriver.findElement(By.xpath(\"//*[@id='layered_id_attribute_group_3']\")).click();\n\n\t}", "public void setListSize(int value) {\n this.listSize = value;\n }", "@ApiModelProperty(value = \"The size of the top bid order.\")\n public BigDecimal getBidSize() {\n return bidSize;\n }", "@Override\n\tpublic void setSize(String sizeOfTheBeverage) {\n\t\tthis.sizeOfTheBeverage = sizeOfTheBeverage;\n\t}", "public void setSize(String size) throws IllegalPizza{\n\t\tif(size == null)\n\t\t\tthrow new IllegalPizza(\"Illegal, pizza size is not null!\");\n\t\tString size1 = size.toLowerCase();\n\t\tif (Objects.equals(size1, \"small\"))\n\t\t\tSize = size1;\n\t\telse if (Objects.equals(size1, \"medium\"))\n\t\t\tSize = size1;\n\t\telse if (Objects.equals(size1, \"large\"))\n\t\t\tSize = size1;\n\t\telse \n\t\t\tthrow new IllegalPizza(\"Illegal pizza size\");\n\t}", "@Test\n public final void testSetSize() {\n int expRes = 5;\n int falseEnter = -4;\n ship.setSize(falseEnter);\n int result = this.ship.getSize();\n assertEquals(expRes, result);\n falseEnter = -1;\n ship.setSize(falseEnter);\n result = this.ship.getSize();\n assertEquals(expRes, result);\n }", "public void setiPhoneStorageSize(int iPhoneStorageSize) {\r\n this.iPhoneStorageSize = iPhoneStorageSize;\r\n }", "public int getOrdersProductssSize(com.sybase.persistence.Query query)\n {\n return ru.terralink.mvideo.sap.Products.getSize(initChildrenQuery(query, new String[]{\"ordersFK\"}));\n }", "fi.kapsi.koti.jpa.nanopb.Nanopb.IntSize getIntSize();", "public void setSize(String size) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}", "public Builder setOrderSize(double value) {\n bitField0_ |= 0x00400000;\n orderSize_ = value;\n onChanged();\n return this;\n }", "public void setSize(RMSize aSize) { setSize(aSize.width, aSize.height); }", "@ApiModelProperty(example = \"3615\", value = \"Numeric value in bytes\")\n /**\n * Numeric value in bytes\n *\n * @return size Integer\n */\n public Integer getSize() {\n return size;\n }", "public void setSize(int size) {\n\t members = size;\n\t}", "public void setSize(int index, int size);", "public void setSizeE(long s){\n\t\tthis.sizeE = s;\n\t}", "public int getSetSize(){ return Integer.parseInt(setSize.getText()); }", "public static Target selectSize(String size){\n\t\treturn Target.the(\"Select to size of dropdown list\").locatedBy(\"//option[@value='\"+size+\"']\");\n\t}", "@javax.annotation.Nullable\n @ApiModelProperty(example = \"100.0\", value = \"The size of the image in GB\")\n\n public BigDecimal getSize() {\n return size;\n }", "private void setSize(FireSize size) throws InvalidFireSizeException {\n if (!isValidFireSize(size)) {\n throw new InvalidFireSizeException(String.format(\"\\\"%s\\\" isn't a valid fire size for a fire emergency.\", size));\n }\n this.size = size;\n }", "public void setColumnSize(int[] columnSize) {\n\t\tif(LOGGER.isDebugEnabled())\n\t\t\tthrow new UnsupportedOperationException();\n\t}", "public void writeSize(int rowNum, int columnNum, int size){\n row = sheet.createRow(rowNum);\n cell = row.createCell(columnNum);\n cell.setCellValue(size);\n }" ]
[ "0.710664", "0.686768", "0.64163154", "0.6408809", "0.6391079", "0.6294744", "0.6277926", "0.6229492", "0.62253904", "0.62113875", "0.6202177", "0.6190221", "0.6186833", "0.6186833", "0.61736983", "0.6148077", "0.6144387", "0.6144387", "0.6144387", "0.6144387", "0.6129356", "0.60936505", "0.60912603", "0.5988439", "0.5970948", "0.59618515", "0.59239894", "0.5897284", "0.5892364", "0.5877459", "0.5839258", "0.5834795", "0.5784612", "0.576231", "0.57538795", "0.57441866", "0.5730552", "0.5724155", "0.5719409", "0.5699079", "0.56085294", "0.5571247", "0.5571247", "0.55462855", "0.55107945", "0.5495364", "0.54878837", "0.5479724", "0.5460568", "0.5427352", "0.54201645", "0.540984", "0.54025275", "0.538901", "0.53871846", "0.53820896", "0.53645664", "0.53549504", "0.53468335", "0.5345269", "0.5328735", "0.5315616", "0.5310944", "0.5307019", "0.52883875", "0.5274335", "0.52689475", "0.52677417", "0.52526975", "0.52431345", "0.5237301", "0.52364594", "0.52295667", "0.5228066", "0.52197117", "0.52146393", "0.52022725", "0.51939934", "0.51843846", "0.5179568", "0.5178883", "0.5178836", "0.5158873", "0.5157666", "0.5155456", "0.5140963", "0.51286846", "0.51263714", "0.51217204", "0.51192147", "0.5118116", "0.5118088", "0.5117943", "0.5111659", "0.5099413", "0.5098451", "0.50950456", "0.5092454", "0.5087104", "0.5085766" ]
0.6570087
2
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.order_item_name
public String getOrderItemName() { return orderItemName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName() {\n return item.getName();\n }", "public String getName()\r\n\t{\r\n\t\treturn theItem.getName();\r\n\t}", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "public String getName() {\n\t\treturn itemName;\n\t}", "public static String getNameByID(int itemID) {\n try {\n PreparedStatement st = conn.prepareStatement(\"SELECT `Name` FROM `iteminformation` WHERE itemID=?\");\n st.setInt(1, itemID);\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n return rs.getString(\"name\");\n }\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return \"\";\n }", "public String obtenirNomItem() {\n\t\treturn this.nomItem;\n\t}", "public String getItemName()\n {\n return itemName;\n }", "public String getItemName() {\r\n return itemName;\r\n }", "public String getItemName() {\r\n return itemName;\r\n }", "public String getItemName() {\r\n return itemName;\r\n }", "public String getItemName() {\r\n\t\treturn itemName;\r\n\t}", "public void setOrderItemName(String orderItemName) {\n this.orderItemName = orderItemName == null ? null : orderItemName.trim();\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "public String getNomeItem() {\r\n\t\treturn this.emprestimoid.getNomeItem();\r\n\t}", "@Override\n\t\t\t\tpublic String getName(HashMap<String, String> item) {\n\t\t\t\t\treturn item.get(\"pro_cn_name\");\n\t\t\t\t}", "@Override\n\t\t\t\tpublic String getName(HashMap<String, String> item) {\n\t\t\t\t\treturn item.get(\"pro_cn_name\");\n\t\t\t\t}", "public String getItemName() {\n\t\treturn _itemName;\n\t}", "public String getItemName() {\n\t\treturn ((name != null) ? name : (name = MiscUtils.getName(this)));\n\t}", "public String getVehicleName() {\n return itemName;\n }", "public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }", "public String getNomeDonoItem() {\r\n\t\treturn this.emprestimoid.getNomeDonoItem();\r\n\t}", "public String getAsNameAbbreviated(String itemName);", "public String getName(int position){\n Item current = getItem(position);\n return current.Name();\n }", "public synchronized String getName(){\n \treturn item_name;\n }", "public String getName(){\n\t\t\treturn columnName;\n\t\t}", "@Override\n\tpublic String getName() {\n\t\treturn ((Extension)_item).getId() + \".\" + ((Extension)_item).getTitle();\n\t}", "public String getKeyBuyItemName() {\r\n return getKeyShootName();\r\n }", "public String getName() {\n return columnName;\n }", "@Override\n public String getName() {\n return columnInfo.getName();\n }", "@Override\n public String toString() {\n return \"OrderItems{\" +\n \"itemId='\" + itemId + '\\'' +\n \", itemName='\" + itemName + '\\'' +\n \", itemPrice=\" + itemPrice +\n \", itemQuantity=\" + itemQuantity +\n \", itemAmount=\" + itemAmount +\n '}';\n }", "public String getProductName(){\n return productRelation.getProductName();\n }", "public String getNomeRequerenteItem() {\r\n\t\treturn this.emprestimoid.getNomeRequerenteItem();\r\n\t}", "@Override\n\tpublic java.lang.String getName() {\n\t\treturn _expandoColumn.getName();\n\t}", "public String getName(String code) throws ItemNotFoundException{\n\t \t \n\t \t \n\t \t ProduceNode p = LinkedList.first.next;\n\t \t \n\t \t for(int i=0; i<LinkedList.getLength(); i++) \n\t \t { \n\t \t\tif( p.data.getCode().equals(code))\n\t \t\t\n\t \t\t\treturn p.data.getName();\n\t \t \n\t \t p = p.next;\n\t \t }\n\t \t //return null;\n\t \t throw new ItemNotFoundException(\"Item is not found in the database\");\n\t \t \n\t \t\t}", "java.lang.String getOrderByDataItem();", "public String getMapItemTypeName() {\n return mapItemTypeName;\n }", "String getItemName(ItemStack itemStack) {\r\n\t\treturn WordUtils.capitalizeFully(itemStack.getType().name().toLowerCase().replace('_', ' '));\r\n\t}", "public String getAttributeName() {\n\n if (getAD_Column_ID() == 0) {\n return super.getAttributeName();\n }\n\n // We have a column\n String\tattribute\t= super.getAttributeName();\n\n if ((attribute != null) && (attribute.length() > 0)) {\n return attribute;\n }\n\n setAttributeName(getColumn().getColumnName());\n\n return super.getAttributeName();\n\n }", "public String menu_item_name() {\n\t\treturn driver.findElement(menu_item_logout).getText();\n\t}", "public String getBlockItemNameForLovDefinitionItem(String lovDefinitionItem)\n {\n Iterator<EJCoreLovItemMappingProperties> itemMappings = getAllItemMappingProperties().iterator();\n while (itemMappings.hasNext())\n {\n EJCoreLovItemMappingProperties props = itemMappings.next();\n if ((props.getLovDefinitionItemName().equalsIgnoreCase(lovDefinitionItem)))\n {\n return props.getBlockItemName();\n }\n }\n return null;\n }", "@Override\n public String getColumnName(int columnIndex) {\n return columnNames[columnIndex];\n }", "@Override\n public String getColumnName(int aColumn) {\n return model.getColumnName(aColumn); \n }", "public String getColumnName() {\r\n return dataBinder.getColumnName();\r\n }", "public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }", "public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }", "@Override\n\tpublic String getName() {\n\t\treturn product.getName();\n\t}", "public abstract String getDatabaseColumnName(String entityName, String propertyName);", "@ApiModelProperty(required = true, value = \"A description of item.\")\n public String getItemName() {\n return itemName;\n }", "public String getCustomName ( ) {\n\t\treturn extract ( handle -> handle.getCustomName ( ) );\n\t}", "public java.lang.String getPO_ITEM() {\r\n return PO_ITEM;\r\n }", "public String getName(){\n\t\treturn Name; // Return the product's name\n\t}", "public String getColumnName() {\r\n return navBinder.getColumnName();\r\n }", "public String getNodeNameColumnName () {\n return nodeHandler.getNodeNameColumnName();\n }", "public String getItemDetailName() {\n return itemDetailName;\n }", "public JExpr getNameExpr() { return _nameExpr; }", "public String getColumnName(int columnIndex){\r\n\t\t\tif (Person.getFieldColumn(columnIndex) != null)\r\n\t\t\t\treturn Person.getFieldColumn(columnIndex);\r\n\t\t\treturn \"\";\r\n\t\t}", "public String getColumnName(int columnIndex){\n return COLUMN_NAMES[columnIndex];\n }", "public void setItemName(String itemName) {\n this.itemName = itemName;\n }", "public void setItemName(String itemName) {\n this.itemName = itemName;\n }", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public String getName(){\n\n //returns the value of the name field\n return this.name;\n }", "public String getColumnName(int columnIndex) {\n return columnNames[columnIndex];\n }", "private static String getColumnName(String windowName2) {\n\t\tString col = \"{\";\r\n\t\tVector<WindowTableModelMapping> maps = getMapColumns(windowName2);\r\n\t\tfor (int i = 0; i < maps.size(); i++) {\r\n\t\t\tWindowTableModelMapping mp = maps.get(i);\r\n\t\t\tcol = col + \"\\\"\" + mp.getColumnName() + \"\\\"\" + \",\";\r\n\t\t}\r\n\r\n\t\tcol = col.substring(0, col.length() - 1) + \"}\";\r\n\t\treturn col;\r\n\t}", "@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }", "@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public String getName() { return _sqlName; }", "public QName getQName() {\n if (m_named) {\n return ((INamed)m_item.getSchemaComponent()).getQName();\n } else {\n return null;\n }\n }", "public String getColumnName(int columnIndex) {\n return resource.getString(columnNames.get(columnIndex));\n }", "public String getUserName() {\n return order.getUser().getUsername();\n }", "public String[] getItemNames() {\n String[] names = new String[this.size()];\n for (int i = 0; i < names.length; i++) {\n names[i] = this.get(i).getItemName();\n }\n return names;\n }", "public String getNameOfEntityHere() {\n \n return entityHere_.getName();\n \n }", "public String getColumnName() {\n return this.columnName;\n }", "public String getAsNameAbbreviated(String itemName, String defaultValue);", "public String getAttributeName(){\n if(field.getAnnotation(Column.class) != null){\n return field.getAnnotation(Column.class).column();\n }\n if( field.getAnnotation(PrimaryKey.class) !=null){\n return field.getAnnotation(PrimaryKey.class).name();\n }\n return null;\n }", "public StringKey getName() {\n return ModelBundle.SHIP_NAME.get(name);\n }", "public String getColumnName(int columnIndex) {\r\n return this.table.getSchema().getColumnName(columnIndex);\r\n }", "@Override\n\tpublic String getColumnName(int column) {\n\t\treturn names[column];\n\t}", "String getName() {\n\t\treturn customer.getName();\n\t}", "public String getPropertyNameMapped(String aName) { return aName; }", "OrderItemDto getOrderItem(long id) throws SQLException;", "@Override\n protected String getNameImpl()\n {\n return _nameExpr != null ? _nameExpr.getName() : null;\n }", "@Override\n public String toString()\n {\n \treturn getName() + \" (\" + numItem + \")\";\n }", "@Query(value=\"select I.ID , I.NAME from ITEM I\",nativeQuery = true)\n\tpublic Item findByName(String name);", "@Override\n public String getColumnName(int column) {\n return colName[column];\n }", "public String process(Item item) throws ProcessException {\n\t\t\tString name = item.getFeatures().getString(\"name\");\n\t\t\treturn Integer.toString(rail(name.length()));\n\t\t}", "@ApiModelProperty(value = \"Gets and sets the name of the column.\")\n public String getName() {\n return name;\n }", "public String getAsString(String itemName, String defaultValue);", "public String getInventoryName()\n {\n return this.hasCustomName() ? this.getCustomName() : Names.Containers.WATERJET;\n }", "private void bindTitleForProductItems(List<OrderItem> orderItems) {\n for (OrderItem orderItem : orderItems) {\n if (orderItem.getProductOption() != null) {\n ExtensionAttribute extensionAttribute = orderItem.getProductOption().getExtensionAttribute();\n if (extensionAttribute != null) {\n for (ItemOption itemOption : extensionAttribute.getItemOptions()) {\n String productName = orderItem.getName();\n productName += \"\\n- \" + itemOption.getLabel() + \": \" + itemOption.getValue();\n orderItem.setName(productName);\n orderItem.setSku(productName);\n }\n StringBuilder productName = new StringBuilder(orderItem.getSku());\n for (int index = 0; index < extensionAttribute.getCustomOptions().size(); index++) {\n CustomOption customOption = extensionAttribute.getCustomOptions().get(index);\n if (customOption.getOptionDetails() != null) {\n if (customOption.getLabel() != null && customOption.getLabel().contains(\"[N]\")) {\n customOption.setLabel(customOption.getLabel().replace(\"[N]\", \"\"));\n }\n productName.append(\"\\n- \").append(customOption.getLabel());\n for (OptionDetail optionDetail : customOption.getOptionDetails()) {\n// productName.append(\"\\n\\t- \").append(optionDetail.getTitle()).append(\": \").append(\"$\").append(optionDetail.getPrice());\n productName.append(\"\\n\\t- \").append(optionDetail.getTitle());\n }\n orderItem.setSku(productName.toString());\n }\n }\n }\n }\n }\n }", "@Column(name = \"name\")\n public String getName() {\n return name;\n }", "private String generateStoreName(final RpStoreEntity item){ \n final StringBuilder name = new StringBuilder(); \n \n if(!StringUtils.isEmpty(item.getStoreName())){\n name.append(item.getStoreName());\n } else { \n \n // If no StoreName received use Swarm ID\n name.append(\"swarmId:\");\n name.append(item.getSwarmId());\n }\n\n // store number\n name.append(\" (StoreNo: \");\n name.append(item.getStoreNumber()); \n \n // SBS number\n name.append(\", SBS: \");\n name.append(item.getSbsNumber());\n name.append(\")\");\n \n return name.toString();\n }", "protected String getEntityName() {\r\n\t\treturn EntityList.getEntityString(this);\r\n\t}", "public String getName() {\n if (mName == null) {\n mName = mId;\n int index = mName.lastIndexOf(WS_SEP);\n if (index != -1) {\n mName = mName.substring(index + 1);\n }\n }\n\n return mName;\n }", "@Override\r\n public String getColumnName(int column) {\n return (String)this.columnNames.get(column);\r\n }", "public StrColumn getName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"name\", StrColumn::new) :\n getBinaryColumn(\"name\"));\n }" ]
[ "0.6366841", "0.6334884", "0.630393", "0.626241", "0.6236518", "0.62035453", "0.61268365", "0.6086999", "0.6086999", "0.6086999", "0.60821754", "0.6036783", "0.60275483", "0.60275483", "0.60275483", "0.60275483", "0.60275483", "0.6016309", "0.59986097", "0.59986097", "0.5993168", "0.59646976", "0.5864305", "0.5802366", "0.5721006", "0.5717366", "0.5706958", "0.56994045", "0.56069946", "0.5600924", "0.5597371", "0.55808306", "0.5544247", "0.553844", "0.54898846", "0.5489439", "0.5445398", "0.5434144", "0.5417516", "0.5412206", "0.54090595", "0.53986424", "0.53915274", "0.5390153", "0.5381878", "0.53718215", "0.53690076", "0.5366631", "0.5366631", "0.5351566", "0.53394973", "0.53309053", "0.5297566", "0.52881217", "0.52668375", "0.52612126", "0.5260351", "0.5249892", "0.5244268", "0.52264905", "0.5222473", "0.5218762", "0.5218762", "0.5200111", "0.519086", "0.5189067", "0.51874894", "0.5161527", "0.5161527", "0.5160453", "0.51578075", "0.5157654", "0.51553386", "0.5154037", "0.51468104", "0.5142898", "0.5139911", "0.5139209", "0.513016", "0.5128379", "0.5120842", "0.5120699", "0.5119376", "0.5119222", "0.5112908", "0.5111597", "0.5111562", "0.51089483", "0.51055723", "0.51049143", "0.50972813", "0.5095539", "0.5088451", "0.5082506", "0.50807786", "0.5072618", "0.5070551", "0.50685686", "0.5067449", "0.50658804" ]
0.74820846
0
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.order_item_name
public void setOrderItemName(String orderItemName) { this.orderItemName = orderItemName == null ? null : orderItemName.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getOrderItemName() {\n return orderItemName;\n }", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public void setItemName(String itemName) {\n this.itemName = itemName;\n }", "public void setItemName(String itemName) {\n this.itemName = itemName;\n }", "public void setItemName(String itemName) {\r\n this.itemName = itemName == null ? null : itemName.trim();\r\n }", "@BindAttribute(name = \"itemModel\")\n\tpublic void setItemModelName(String itemModelName) {\n\t\tthis.itemModelName = itemModelName;\n\t}", "public void setItemName(String product) {\n itemName = product;\n }", "public void adjustName() {\n Item item = getItem();\n if (!item.isFixedName()) {\n if (item.getSchemaComponent().type() == SchemaBase.SEQUENCE_TYPE) {\n if (m_values.size() > 0) {\n Item childitem = ((DataNode)m_values.get(0)).getItem();\n if (item != childitem) {\n item.setName(childitem.getEffectiveName());\n }\n }\n }\n }\n }", "public ItemBuilder setName(String name) {\r\n\t\tthis.name = name;\r\n\t\treturn this;\r\n\t}", "private void bindTitleForProductItems(List<OrderItem> orderItems) {\n for (OrderItem orderItem : orderItems) {\n if (orderItem.getProductOption() != null) {\n ExtensionAttribute extensionAttribute = orderItem.getProductOption().getExtensionAttribute();\n if (extensionAttribute != null) {\n for (ItemOption itemOption : extensionAttribute.getItemOptions()) {\n String productName = orderItem.getName();\n productName += \"\\n- \" + itemOption.getLabel() + \": \" + itemOption.getValue();\n orderItem.setName(productName);\n orderItem.setSku(productName);\n }\n StringBuilder productName = new StringBuilder(orderItem.getSku());\n for (int index = 0; index < extensionAttribute.getCustomOptions().size(); index++) {\n CustomOption customOption = extensionAttribute.getCustomOptions().get(index);\n if (customOption.getOptionDetails() != null) {\n if (customOption.getLabel() != null && customOption.getLabel().contains(\"[N]\")) {\n customOption.setLabel(customOption.getLabel().replace(\"[N]\", \"\"));\n }\n productName.append(\"\\n- \").append(customOption.getLabel());\n for (OptionDetail optionDetail : customOption.getOptionDetails()) {\n// productName.append(\"\\n\\t- \").append(optionDetail.getTitle()).append(\": \").append(\"$\").append(optionDetail.getPrice());\n productName.append(\"\\n\\t- \").append(optionDetail.getTitle());\n }\n orderItem.setSku(productName.toString());\n }\n }\n }\n }\n }\n }", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "public void setCertainItem(String title, String tableName,\n String columnName,String newItemnname) throws SQLException\n {\n ResultSet rs;\n String update=\"UPDATE \"+tableName+\" SET \"+columnName+\" = \"+newItemnname+\"WHERE title=\"+title;\n \n stmt.executeUpdate(\"UPDATE \"+tableName+\" SET \"+columnName+\" = \"+newItemnname+\" WHERE title=\"+title);\n }", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public void updateSalesOrder(SalesOrderItem salesOrderItem){\n\t\tSalesOrderItemSalesOrder salesOrder = salesOrderItem.getSalesOrder();\n\t\tPropertyReader.copy(salesOrder, displayedEntity);\n\t}", "@Override\n\tpublic void setName(java.lang.String name) {\n\t\t_expandoColumn.setName(name);\n\t}", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void editItemInfo() throws SQLException {\n\t\tConnection con = openDBConnection();\n\t\tString queryString = \"Update team1.GABES_ITEM Set ITEM_CATEGORY=?, DESCRIPTION=?, ITEM_NAME=?\";\n\t\tqueryString += \"Where ITEM_ID='\" + this.item_id + \"'\";\n\t\t/** Clears parameters and then sets new values */\n\t\tPreparedStatement p_stmt = con.prepareCall(queryString);\n\t\t/** Set new attribute values */\n\t\tp_stmt.clearParameters();\n\t\tp_stmt.setString(1, this.item_category);\n\t\tp_stmt.setString(2, this.description);\n\t\tp_stmt.setString(3, this.item_name);\n\t\t/* Executes the Prepared Statement query */\n\t\tp_stmt.executeQuery();\n\t\tp_stmt.close();\n\t}", "public void selectItem(String itemName) {\t\t\n\t\tQTiumAutomation.click(BrandPageEntity.DYNAMIC_ITEM, itemName);\n\t}", "public void changeMenuItemName(int itemId, String itemName) {\n if(itemId>-1){\n iMenu.changeMenuItemName(itemId, itemName);\n } else iMenu.updateManuItem(itemName, itemName, (byte)4, \"\"); //CR 13179 bug 14155,14156\n\n }", "void changeMenuItemName(String itemId, String itemName);", "private void setDisplayName(ItemStack item, String name) {\n ItemMeta meta = item.getItemMeta();\n meta.setDisplayName(name);\n item.setItemMeta(meta);\n }", "public void setElementNameForHibernate(SC elementName) {\n _elementName = elementName;\n }", "public void setVehicleName(String vehicleName) {\n this.itemName = vehicleName;\n }", "public void setOrderItemUrl(String orderItemUrl) {\n this.orderItemUrl = orderItemUrl == null ? null : orderItemUrl.trim();\n }", "private static void setValues( String name, Integer number, Item item ) {\n\t\titem.getItemProperty( \"name\" ).setValue( name );\n\t\titem.getItemProperty( \"number\" ).setValue( number );\n\t\titem.getItemProperty( \"id\" ).setValue( itemId );\n\t\titem.getItemProperty( \"id\" ).setReadOnly( true );\n\t\titemId++;\n\t}", "public void setMappingItem(String lovDefinitionItemName, String blockItemName)\n {\n Iterator<EJCoreLovItemMappingProperties> itemMappings = getAllItemMappingProperties().iterator();\n while (itemMappings.hasNext())\n {\n EJCoreLovItemMappingProperties props = itemMappings.next();\n if ((props.getLovDefinitionItemName().equalsIgnoreCase(lovDefinitionItemName)))\n {\n props.setBlockItemName(blockItemName);\n break;\n }\n }\n }", "public void setName(String v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/name\",v);\n\t\t_Name=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}", "private void loadItem(Item item, ResultSet resultSet, int index) throws SQLException {\n\t\t\titem.setName(resultSet.getString(index++));\n\t\t\titem.setLocationID(resultSet.getInt(index++));\n\t\t\titem.setItemID(resultSet.getInt(index++));\n\t\t}", "public void setItemNames(String itemNames) {\n this.itemNames = itemNames == null ? null : itemNames.trim();\n }", "public void setCustomName ( String name ) {\n\t\texecute ( handle -> handle.setCustomName ( name ) );\n\t}", "public void sellItem(String itemName) {\n\t\t// \"Towels\"\n\t\t\n\t\tfor (int i = 0; i < itemsInStock.size(); i++) {\n\t\t\tItem item = itemsInStock.get(i);\n\t\t\tif (item.name.equals(itemName)) {\t\t\n\t\t\t\titem.amount = item.amount - 1;\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void setPO_ITEM(java.lang.String PO_ITEM) {\r\n this.PO_ITEM = PO_ITEM;\r\n }", "public void changeProductName(int id,String name)\n {\n Product product = findProduct(id);\n \n if(product != null)\n {\n System.out.println(\"Name change from \" + product.getName() + \" to \"\n + name);\n product.name = name;\n }\n }", "public String getItemName()\n {\n return itemName;\n }", "public void nameOldInventory(String Name) throws SQLException {\r\n dataAccess = new Connection_SQL(\"jdbc:mysql://localhost:3306/items\", \"root\", \"P@ssword123\");\r\n dataAccess.oldInventory(Name);\r\n viewOldInventory(Name);\r\n }", "public void setItem(Item item) {\n this.item = item;\n }", "public void setName(String inName)\n {\n name = inName;\n }", "public void setName(String inName)\n {\n\tname = inName;\n }", "@IcalProperty(pindex = PropertyInfoIndex.NAME,\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setName(final String val) {\n name = val;\n }", "@Override\r\n\tpublic OrderItem createOrderItem(OrderItem newOrderItem) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tsession.save(newOrderItem);\r\n\t\treturn newOrderItem;\r\n\r\n\t}", "public void setName(String nameIn) {\n name = nameIn;\n }", "public String getName() {\n\t\treturn itemName;\n\t}", "public void setItem (Item item)\n\t{\n\t\tthis.item = item;\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "public String getItemName() {\r\n return itemName;\r\n }", "public String getItemName() {\r\n return itemName;\r\n }", "public String getItemName() {\r\n return itemName;\r\n }", "public void setItem (jkt.hms.masters.business.MasStoreItem item) {\n\t\tthis.item = item;\n\t}", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$2);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$2);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "public void setOrderItemAmount(Integer orderItemAmount) {\n this.orderItemAmount = orderItemAmount;\n }", "public OrderItem updateOrderItem(OrderItem orderItem)\n\t{\n\t\tif(findOrderItemById(orderItem.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat care se incearca updatat nu exista\");\n\t\t\treturn null;\n\t\t}\n\t\tOrderItem orderIt=orderItemDAO.update(orderItem);\n\t\treturn orderIt;\n\t}", "public void setName(String new_name){\n this.name=new_name;\n }", "public String getVehicleName() {\n return itemName;\n }", "public OrderBuilder name(String customerName) {\r\n\t\tthis.customerName = customerName;\r\n\t\treturn this;\r\n\t}", "public void setItemList(String item)\n {\n this.itemLinkedList.add(new Item(item));\n }", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "@Override\n\tpublic void setName(String name) throws RemoteException {\n\t\tthis.name = name;\n\t}", "public void setName(java.lang.String name)\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(NAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\n }\n target.setStringValue(name);\n }\n }", "public void setName(java.lang.String name)\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(NAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\n }\n target.setStringValue(name);\n }\n }", "public void setAmazonCustomerId(final Customer item, final String value)\n\t{\n\t\tsetAmazonCustomerId( getSession().getSessionContext(), item, value );\n\t}", "public void setElementName(CamelCaseName value){\n ((MenuDMO) core).setElementName(value);\n }", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$6);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "public SortByNameCommand(ItemList itemList){\n this.itemList = itemList;\n }", "public void setName(String restaurantName) { // Sets the restaurant's name\n\t\tname = restaurantName;\n\t}", "public String getItemName() {\r\n\t\treturn itemName;\r\n\t}", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$26);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "public String getItemName() {\n return itemName;\n }", "private ItemStack renameItem(ItemStack item, String key) {\r\n\t\tItemMeta meta = item.getItemMeta();\r\n\t\tmeta.setDisplayName(ModuleFactory.getInstance().getTranslator().getTranslation(plugin, player, key));\r\n\t\titem.setItemMeta(meta);\r\n\t\treturn item;\r\n\t}", "public void setName(String newName){\n\n //assigns the value newName to the name field\n this.name = newName;\n }", "@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}", "public void setItemKey(String value) {\n setAttributeInternal(ITEMKEY, value);\n }", "public String getAsNameAbbreviated(String itemName);", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "public void setColumnName (String ColumnName);", "public void setName(java.lang.String name)\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(NAME$4);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$4);\n }\n target.setStringValue(name);\n }\n }", "public void setColumnName(String columnName) {\r\n navBinder.setColumnName(columnName);\r\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "public void setName(String nm){\n\t\tname = nm;\n\t}", "public void setName(String _name)\r\n\t{\r\n\t\tthis._name=_name;\r\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}", "@Override\n public void rename(String name) throws SQLException, ElementExistException {\n \n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(final String value)\n\t{\n\t\tsetName( getSession().getSessionContext(), value );\n\t}", "public void setName(PosSymbol name) {\n this.name = name;\n }", "public void setName(PosSymbol name) {\n this.name = name;\n }", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$8);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$8);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name)\n {\n _name = name;\n }", "@Override\n\tpublic void modifyRestaurantName(long id, String restaurantName) {\n\t\t\n\t}", "public void setName(String name){\r\n this.name = name;\r\n }" ]
[ "0.67456806", "0.63839054", "0.6236184", "0.6236184", "0.6193564", "0.604717", "0.5985069", "0.5945049", "0.5837307", "0.567157", "0.5608432", "0.54431653", "0.54371744", "0.54297805", "0.53926265", "0.5388896", "0.53100395", "0.53100395", "0.5296236", "0.52846634", "0.5278368", "0.5277603", "0.5237068", "0.52286506", "0.52139026", "0.5179937", "0.5175443", "0.517253", "0.5163361", "0.5161283", "0.5137822", "0.5113106", "0.5104559", "0.5067882", "0.5060885", "0.505235", "0.505091", "0.5046041", "0.5043896", "0.5031271", "0.5010969", "0.50081563", "0.500434", "0.49893022", "0.49853706", "0.49757707", "0.49757707", "0.49705976", "0.49705976", "0.49705976", "0.49704656", "0.49698842", "0.49617466", "0.49605456", "0.49429977", "0.49281028", "0.49232963", "0.49094793", "0.4908294", "0.490097", "0.48960194", "0.48960194", "0.48951158", "0.488713", "0.48857683", "0.48852238", "0.48840117", "0.4880561", "0.4879948", "0.4878272", "0.4878272", "0.4878272", "0.4878272", "0.4878272", "0.48749673", "0.48727086", "0.48690274", "0.48672527", "0.4852086", "0.48516613", "0.48516613", "0.48494", "0.4838441", "0.48371434", "0.48356768", "0.48356768", "0.483361", "0.4833324", "0.48272306", "0.48272306", "0.48266765", "0.4822398", "0.48163828", "0.48156056", "0.48156056", "0.48138562", "0.48085675", "0.48064917", "0.4797877", "0.4796512" ]
0.7243789
0
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.order_item_proice
public BigDecimal getOrderItemProice() { return orderItemProice; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOrderItemProice(BigDecimal orderItemProice) {\n this.orderItemProice = orderItemProice;\n }", "public java.lang.String getPO_ITEM() {\r\n return PO_ITEM;\r\n }", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "public Number getPromoProdukId() {\n return (Number)getAttributeInternal(PROMOPRODUKID);\n }", "public String getPricePro() {\n return pricePro;\n }", "public int getProgeny() {\n return this.progeny;\n }", "public String getProId() {\n return proId;\n }", "public String getProfi() {\r\n\t\treturn profi;\r\n\t}", "public DBSequence getPromoBonusId() {\n return (DBSequence)getAttributeInternal(PROMOBONUSID);\n }", "public int getProfit(Item item) {\n\t\treturn profit.get(item);\n\t}", "public String getProID() {\n\t\treturn sh_ProductID;\n\t}", "public Integer getIdPro() {\n return idPro;\n }", "public int getOrderProductNum()\r\n {\n return this.orderProductNum;\r\n }", "public String getProdotto() {\r\n\t\treturn prodotto;\r\n\t}", "public int getProprio(int idGroupe) throws RemoteException{\r\n\t\t\tString requete = \"Select g_idprop From groupe Where g_id = \" + idGroupe;\r\n\t\t\tSystem.out.println(\"\\nrequete getProprio : \" + requete);\r\n\t\t\tDataSet data = database.executeQuery(requete);\r\n\r\n\t\t\tint idProp = -1;\r\n\t\t\tString [] line = null;\r\n\t\t\tif (data.hasMoreElements()){\r\n\t\t\t\tline = data.nextElement();\r\n\t\t\t\tidProp = Integer.parseInt(line[1]);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn idProp;\r\n\t\t}", "public String getCOD_ITEM() {\n return COD_ITEM;\n }", "public Integer getPromId() {\n return promId;\n }", "public Integer getIdProfilo() {\n\t\treturn idProfilo;\n\t}", "public String getXpeProductUom() {\n return (String) getAttributeInternal(XPEPRODUCTUOM);\n }", "@Override\n\tpublic ProductBean readpro(int pnum) {\n\t\treturn session.selectOne(namespace+\".readpro\", pnum);\n\t}", "public java.lang.String getProtein_id() {\n return protein_id;\n }", "@Override\r\n public PurchaseOrderItem getPurchaseOrderItem() {\r\n if (ObjectUtils.isNotNull(this.getPurapDocumentIdentifier())) {\r\n if (ObjectUtils.isNull(this.getPaymentRequest())) {\r\n this.refreshReferenceObject(PurapPropertyConstants.PURAP_DOC);\r\n }\r\n }\r\n // ideally we should do this a different way - maybe move it all into the service or save this info somehow (make sure and\r\n // update though)\r\n if (getPaymentRequest() != null) {\r\n PurchaseOrderDocument po = getPaymentRequest().getPurchaseOrderDocument();\r\n PurchaseOrderItem poi = null;\r\n if (this.getItemType().isLineItemIndicator()) {\r\n List<PurchaseOrderItem> items = po.getItems();\r\n poi = items.get(this.getItemLineNumber().intValue() - 1);\r\n // throw error if line numbers don't match\r\n // MSU Contribution DTT-3014 OLEMI-8483 OLECNTRB-974\r\n /*\r\n * List items = po.getItems(); if (items != null) { for (Object object : items) { PurchaseOrderItem item =\r\n * (PurchaseOrderItem) object; if (item != null && item.getItemLineNumber().equals(this.getItemLineNumber())) { poi\r\n * = item; break; } } }\r\n */\r\n } else {\r\n poi = (PurchaseOrderItem) SpringContext.getBean(PurapService.class).getBelowTheLineByType(po, this.getItemType());\r\n }\r\n if (poi != null) {\r\n return poi;\r\n } else {\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"getPurchaseOrderItem() Returning null because PurchaseOrderItem object for line number\" + getItemLineNumber() + \"or itemType \" + getItemTypeCode() + \" is null\");\r\n }\r\n return null;\r\n }\r\n } else {\r\n\r\n LOG.error(\"getPurchaseOrderItem() Returning null because paymentRequest object is null\");\r\n throw new PurError(\"Payment Request Object in Purchase Order item line number \" + getItemLineNumber() + \"or itemType \" + getItemTypeCode() + \" is null\");\r\n }\r\n }", "public long getProcessOrderItemKey() {\n\t\treturn processOrderItemKey;\n\t}", "public int getProfundidad() {\n return this.profundidad;\n }", "public int getPrice()\r\n\t{\r\n\t\treturn theItem.getPrice();\r\n\t}", "public java.lang.String getProformaNo () {\n\t\treturn proformaNo;\n\t}", "@ManyToOne\r\n\t@JoinColumn(name=\"idpouchproceso\")\r\n\tpublic PouchProceso getPouchProceso() {\r\n\t\treturn this.pouchProceso;\r\n\t}", "public Integer getProstatusid() {\n return prostatusid;\n }", "public String getCodProd() {\n return this.codProd;\n }", "public String getPrecoProduto() {\r\n\t\treturn precoProduto;\r\n\t}", "public ArrayList<ProdottoOrdineBean> getProdotti() {\n\t\t\treturn prodotti;\n\t\t}", "@Override\n\tpublic int getPrice() {\n\t\treturn product.getPrice();\n\t}", "public Integer getpQuantity() {\n return pQuantity;\n }", "public void setPO_ITEM(java.lang.String PO_ITEM) {\r\n this.PO_ITEM = PO_ITEM;\r\n }", "public String getIndividualProductPrice(String itemName)\n\t{\n\n\t\tString fixedString = fixString(itemName);\n\t\tString price = NO_PRICE_FOUND;\n\t\ttry {\n\t\t\tScanner scanner = getScanner(fixedString);\n\t\t\tprice = getPriceFromScanner(scanner);\n\n\t\t}catch ( Exception ex ) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn price;\n\t}", "public String getprop_no() {\n return (String)getNamedWhereClauseParam(\"prop_no\");\n }", "public float getItemPriceInvoice()\n\t{\n\t\treturn itemPriceInvoice;\n\t}", "public String getIdProcuratore() {\n return idProcuratore;\n }", "public String product() {\n return this.product;\n }", "public int getProductPrice(){\n return this.productRelation.getCost();\n }", "public Integer getProductUomId() {\n return productUomId;\n }", "public Integer getProductUomId() {\n return productUomId;\n }", "public String getProdDetailsPrice(){\n String prodPrice = productDetailsPrice.toString();\n return prodPrice;\n }", "public int getPrecio() {\n\t\treturn this.producto.getPrecio();\n\t}", "public String getProductProcess() {\n return productProcess;\n }", "public Integer getIdProveedor() {\n return idProveedor;\n }", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public double getProtein() {\n\t\treturn protein;\n\t}", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "public String getProName() {\n return proName;\n }", "public int getpQuantity() {\n return pQuantity;\n }", "@Override\n\tpublic int getProductId(final String producerCode)\n\t{\n\t\tint item = 0;\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\t\t\tString sql = \"select i.item from item i where producer_code = '\" + producerCode + \"'\";\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tProductRset = ps.executeQuery();\n\t\t\tMyLogger.LogMessage(\"ProductDAOImpl.getProductId(): Returning item\"\n\t\t\t\t\t+ \"select i.item from item where producer_code = '\" + producerCode\n\t\t\t\t\t+ \"' returning item\");\n\t\t\twhile (ProductRset.next())\n\t\t\t{\n\t\t\t\titem = ProductRset.getInt(\"item\");\n\t\t\t}\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tMyLogger.Log(\"ProductDAOImpl.getProductId():\", ex.getMessage());\n\t\t}\n\n\t\treturn item;\n\n\t}", "public String getProductno() {\n return productno;\n }", "public Integer getRemarkPro() {\n return remarkPro;\n }", "public Integer getOrderItemAmount() {\n return orderItemAmount;\n }", "public String getOrderItemName() {\n return orderItemName;\n }", "public OrderItem updateOrderItem(OrderItem orderItem)\n\t{\n\t\tif(findOrderItemById(orderItem.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat care se incearca updatat nu exista\");\n\t\t\treturn null;\n\t\t}\n\t\tOrderItem orderIt=orderItemDAO.update(orderItem);\n\t\treturn orderIt;\n\t}", "public Double getProtein() {\n return product.getProtein() * weight / 100;\n }", "public String getQuantProduto() {\r\n\t\treturn quantProduto;\r\n\t}", "public String toString(){\n return \"Codigo Produto: \"+this.idProduto+\n \"\\nNome do Produto \"+this.nomePro+\n \"\\nDescrição \"+this.descricao+\n \"\\nPreço: \"+this.preco;\n }", "public java.lang.String getProposalNo() {\n return proposalNo;\n }", "public java.lang.String getCodigo_pcom();", "public Double getPrecio(){\n\t\t// Implementar\n\t\tDouble precio = 0.0;\n\t\tfor (Ingrediente ingrediente : ingredientes) {\n\t\t\tprecio+=ingrediente.getPrecio();\n\t\t}\n\t\treturn precio;\n\t}", "public int getQuantity() { \n return myOrderQuantity;\n }", "@Override\n\tpublic Object getValueAt(int rowIndex, int columnIndex) {\n\t\tTab_Product row = productList.get(rowIndex);\n\t\tif (0 == columnIndex) {\n\t\t\treturn row.getPcode();\n\t\t} else if (1 == columnIndex) {\n\t\t\treturn row.getPro_name();\n\t\t} else if (2 == columnIndex) {\n\t\t\treturn row.getPrice();\n\t\t} else if (3 == columnIndex) {\n\t\t\treturn row.getQuantity();\n\t\t} else if (4 == columnIndex) {\n\t\t\treturn row.getSale();\n\t\t} else if (5 == columnIndex) {\n\t\t\treturn row.getI();\n\t\t}\n\t\tSystem.out.println(row.toString());\n\t\treturn row;\n\t}", "public Integer getProductCode() {\n\t\treturn productCode;\n\t}", "public IProduto getCodProd();", "protected String getFormattedItemPrice() {\n return formattedItemPrice;\n }", "@Override\r\n\tpublic Orderitem queryByUidAndPid(Orderitem oi) {\n\t\treturn orderitemDao.queryByUidAndPid(oi);\r\n\t}", "private MMDecimal getVendorReturnItemPrice(OrderDetail odetail) {\r\n MMDecimal result = MMDecimal.ZERO;\r\n result = odetail.getOrderItemCostAmt() == null ? MMDecimal.ZERO : odetail\r\n .getOrderItemCostAmt();\r\n return result;\r\n }", "public java.lang.String getINVOICE_DOC_ITEM() {\r\n return INVOICE_DOC_ITEM;\r\n }", "public String getProductNo() {\n\t\treturn productNo;\n\t}", "@Column(name = \"C_PUESTO\")\n public String getPuesto() {\n return puesto;\n }", "public int getProteksi(){\n\t\treturn (getTotal() - getPromo()) * protectionCost / 100;\n\t}", "public String process(Item item) throws ProcessException {\n\t\t\tint count = 0;\n\t\t\tItem inPhrase = SUB_PHRASE_PATH.findItem(item);\n\n\t\t\tfor (Item p = inPhrase; p != null; p = p.getPrevious()) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\treturn Integer.toString(rail(count));\n\t\t}", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public String getPoNumber() {\n return this.poNumber;\n }", "public int getIva() {\n\t\treturn producto.getIva();\n\t}", "public Integer getProductPrice() {\n\t\treturn productPrice;\n\t}", "public String getXpeProductId() {\n return (String) getAttributeInternal(XPEPRODUCTID);\n }", "public String getOrderSeqNo() {\n return orderSeqNo;\n }", "public String getAgcProIDNum() {\n\t\treturn agcProIDNum;\n\t}", "public String getProductCode() {\n return this.productCode;\n }", "public Drink getOrderItem(int orderItemIndex)\r\n\t{\r\n\t\tSystem.out.println(\"Retrieving Order Item: \" + order[orderItemIndex]);\r\n\t\treturn order[orderItemIndex];\r\n\t}", "@Override\n\tpublic double getPrice() {\n\t\treturn constantPO.getPrice();\n\t}", "public SystemeAmendesInt.Personne getProprietaire() {\n return proprietaire;\n }", "public double getPromedio() {\r\n return promedio;\r\n }", "public String getInventoryCod() {\n return (String)getAttributeInternal(INVENTORYCOD);\n }", "public Long getIdProveedor() {\r\n return idProveedor;\r\n }", "public String getIdProduto() {\r\n\t\treturn idProduto;\r\n\t}", "public int getProveedor() { return this.proveedor; }", "public String getOrderNo() {\n return orderNo;\n }", "private String getShippingPrice(Document item) {\n String result;\n result = item.select(\"span[class^=shippingPrice]\").html();\n return result;\n }", "public java.lang.String getProspectoID() {\n return prospectoID;\n }", "public java.lang.String getProspectoID() {\n return prospectoID;\n }", "public double getProtein() {\n\t\tdouble mealProtein = 0;\n\t\tfor (String foodName : meal) {\n\t\t\tdouble protein = foodDetail.get(foodName).getProtein();\n\t\t\tdouble portion = foodPortion.get(foodName);\n\t\t\tmealProtein += protein * portion;\n\t\t}\n\t\treturn mealProtein;\n\t}", "public String getGoodsCode() {\r\n return goodsCode;\r\n }", "public String getOrderno() {\n return orderno;\n }", "public String getOrderno() {\n return orderno;\n }", "public int getCodigo_producto() {\n return codigo_producto;\n }" ]
[ "0.6786861", "0.61681336", "0.5894534", "0.58255625", "0.57494086", "0.5703873", "0.56429076", "0.5632902", "0.56110847", "0.5551456", "0.55297714", "0.55090594", "0.54961926", "0.54636127", "0.54632413", "0.54319483", "0.54218954", "0.5410397", "0.53121215", "0.5285545", "0.52565145", "0.52396184", "0.5239592", "0.5235963", "0.51681614", "0.5160828", "0.5124142", "0.5119189", "0.51074123", "0.5098142", "0.50812095", "0.50805837", "0.50638515", "0.5061868", "0.50377214", "0.50306934", "0.50251967", "0.5016745", "0.50059825", "0.5005023", "0.50004643", "0.50004643", "0.49935257", "0.49921572", "0.4977853", "0.4976774", "0.49697927", "0.49671566", "0.49552056", "0.49499315", "0.49466315", "0.49440166", "0.49428704", "0.4938889", "0.4938771", "0.49375692", "0.49360532", "0.49280733", "0.49277097", "0.49206534", "0.49098146", "0.49043193", "0.49035126", "0.4889725", "0.48761067", "0.48753795", "0.48744088", "0.4873755", "0.48728007", "0.486961", "0.48679718", "0.48674768", "0.4863997", "0.48587787", "0.48538858", "0.48345622", "0.48334187", "0.48326564", "0.48320055", "0.48295674", "0.48257542", "0.4823314", "0.48215738", "0.48154643", "0.48087958", "0.48039338", "0.480145", "0.47946975", "0.47882685", "0.4785293", "0.47842008", "0.47817573", "0.47806004", "0.47700396", "0.47700396", "0.47664198", "0.47615606", "0.47581127", "0.47581127", "0.4757478" ]
0.7196638
0
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.order_item_proice
public void setOrderItemProice(BigDecimal orderItemProice) { this.orderItemProice = orderItemProice; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BigDecimal getOrderItemProice() {\n return orderItemProice;\n }", "public void setPO_ITEM(java.lang.String PO_ITEM) {\r\n this.PO_ITEM = PO_ITEM;\r\n }", "@Override\n\tpublic void modifypro(ProductBean p) {\n\t\tsession.update(namespace+\".modifypro\", p);\n\t}", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public OrderItem updateOrderItem(OrderItem orderItem)\n\t{\n\t\tif(findOrderItemById(orderItem.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat care se incearca updatat nu exista\");\n\t\t\treturn null;\n\t\t}\n\t\tOrderItem orderIt=orderItemDAO.update(orderItem);\n\t\treturn orderIt;\n\t}", "public void setPricePro(String pricePro) {\n this.pricePro = pricePro;\n }", "public void setProfit(Item item, int value) {\n\t\tprofit.put(item, value);\n\t}", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "@Override\n @Transactional\n public void update(Item item) {\n Produto produto = item.getProduto();\n produtoDao.updateEstoqueProduto(produto.getQuantidade() - item.getQuantidade(), produto.getId());\n }", "public void setCodigo_produto(int pCodigoProduto){\n this.codigoProduto = pCodigoProduto;\n }", "public void setProposition(PropositionDefinition.Builder prop) {\r\n\t\t\tthis.proposition = prop;\r\n\t\t\tthis.setPropId(prop.getId());\r\n\t\t}", "public void setItemNo(Integer itemNo) {\n\t\tif (itemNo == 0) {\n\t\t\tthis.itemNo = null;\n\t\t} else {\n\t\t\tthis.itemNo = itemNo;\n\t\t}\n\t}", "public void setCodProd(IProduto codigo);", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public void mudaQuantidadeAprovada(PedidoProduto pedidoProduto) {\n String sql = \"UPDATE pedidosprodutos SET QuantidadeAprovada=? WHERE Id=?\";\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, pedidoProduto.getQuantidadeAprovada());\n stmt.setInt(2, pedidoProduto.getId());\n stmt.execute();\n connFac.closeAll(rs, stmt, st, conn);\n } catch(SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n throw new RuntimeException(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n }\n }", "public java.lang.String getPO_ITEM() {\r\n return PO_ITEM;\r\n }", "public void inicializarItemInvoice() {\r\n\t\ttry {\r\n\t\t\teditarItem = false;\r\n\t\t\trequired = true;\r\n\t\t\tpo = new PO();\r\n\t\t\tlistPos = new ArrayList<PO>();\r\n\t\t\titemInvoice = null;\r\n\t\t\titemPO = null;\r\n\t\t\tpartNumber = null;\r\n\t\t\tBasicFiltroPO filtroPO = new BasicFiltroPO();\r\n\r\n\t\t\tCarga c = facade.getCargaById(invoice.getCarga().getId());\r\n\t\t\tfiltroPO.setFilial(c.getFilial());\r\n\t\t\tlistPos = facade.listarPO(filtroPO);\r\n\t\t\tpoConverter = new ConverterUtil<PO>(listPos);\r\n\r\n\t\t} catch (BusinessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "public void setConvertedProductQty (BigDecimal ConvertedProductQty)\n{\nset_Value (\"ConvertedProductQty\", ConvertedProductQty);\n}", "public void setCOD_ITEM(String COD_ITEM) {\n this.COD_ITEM = COD_ITEM;\n }", "public void setPromoBonusId(DBSequence value) {\n setAttributeInternal(PROMOBONUSID, value);\n }", "public void setOldOrderToPaid() {\n\n\t\tDate date = new Date();\n\n\t\tTimestamp ts = new Timestamp(date.getTime());\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n\t\tString sql = \"UPDATE restodb.order, location set status = 'Paid', state = 'Vacant' where idorder > 0 and date < '\"\n\t\t\t\t+ formatter.format(ts).substring(0, 10) + \" 00:00:00\" + \"'\";\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement statement = mysqlConnect.connect().prepareStatement(sql);\n\n\t\t\tstatement.executeUpdate();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tmysqlConnect.disconnect();\n\t\t}\n\n\t}", "public void setIdPro(Integer idPro) {\n this.idPro = idPro;\n }", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public void setPromoProduk(PromoProdukImpl value) {\n setAttributeInternal(PROMOPRODUK, value);\n }", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "public void setPromoProdukId(Number value) {\n setAttributeInternal(PROMOPRODUKID, value);\n }", "public void orderPo(int pid) throws Exception {\n PoBean po = this.getPoById(pid);\n if (po == null) throw new Exception(\"Purchase Order doesn't exist!\");\n if (po.getStatus() != PoBean.Status.PROCESSED) throw new Exception(\"Invalid Purchase Order Status.\");\n this.setPoStatus(PoBean.Status.ORDERED, pid);\n }", "public void setProcessOrderItemKey(long value) {\n\t\tthis.processOrderItemKey = value;\n\t}", "public String getPricePro() {\n return pricePro;\n }", "Order setInvoicePaidStatus(Order order, User user);", "public int getOrderProductNum()\r\n {\n return this.orderProductNum;\r\n }", "public void setOrderItemUrl(String orderItemUrl) {\n this.orderItemUrl = orderItemUrl == null ? null : orderItemUrl.trim();\n }", "public void setM_Product_ID (int M_Product_ID);", "public void setM_Product_ID (int M_Product_ID);", "public void updateDetail(String proid) {\n\t\tsqlSession.update(\"product.updateDetail\", proid);\n\t}", "public void setItemNo(int value) {\n this.itemNo = value;\n }", "public void stockItemPrice(String upc, int qty, int price_incent)\n\n\t\t\tthrows SQLException, ClassNotFoundException, IOException\n\n\t\t\t{\n\n\t\tif(qty < 0)\n\n\t\t\t//sanity check\n\n\t\t\tthrow new IOException(\"Quantity input cannot be less than 0.\");\n\n\t\tif(price_incent <= 0)\n\n\t\t\t//santiy check\n\n\t\t\tthrow new IOException(\"Price input must be larger than 0.\");\n\n\n\n\t\tif(this.conn == null)\n\n\t\t\tthis.conn = JDBCConnection.getConnection();\n\n\n\n\t\tPreparedStatement stmt = conn.prepareStatement(\n\n\t\t\t\t\"UPDATE Item \" +\n\n\t\t\t\t\t\t\"SET stock = stock + ?, price = ? \" +\n\n\t\t\t\t\"WHERE upc = ?\");\n\n\t\tstmt.setInt(1, qty);\n\n\t\tstmt.setDouble(2, (double)price_incent / 100.0);\n\n\t\tstmt.setString(3, upc);\n\n\t\ttry\n\n\t\t{\n\n\t\t\tint update = stmt.executeUpdate();\n\n\t\t\tif(update == 1)\n\n\t\t\t\treturn;\n\n\t\t\telse if(update == 0)\n\n\t\t\t\t//if none is update\n\n\t\t\t\tthrow new SQLException(\"The Item with upc \" + upc + \" does \" +\n\n\t\t\t\t\t\t\"not exist.\");\n\n\t\t\telse\n\n\t\t\t\t//Fatal error: more than 1 tuple is updated -> duplicate upc!!!\n\n\t\t\t\tthrow new SQLException(\"Fatal Error: Duplicate UPC!\");\n\n\t\t}\n\n\t\tfinally\n\n\t\t{\n\n\t\t\tstmt.close();\n\n\t\t}\n\n\t\t\t}", "public void setProduct(entity.APDProduct value);", "public void setProdotto(String prodotto) {\r\n\t\tthis.prodotto = prodotto;\r\n\t}", "public void setCodigo_pcom(java.lang.String newCodigo_pcom);", "public void editItemInfo() throws SQLException {\n\t\tConnection con = openDBConnection();\n\t\tString queryString = \"Update team1.GABES_ITEM Set ITEM_CATEGORY=?, DESCRIPTION=?, ITEM_NAME=?\";\n\t\tqueryString += \"Where ITEM_ID='\" + this.item_id + \"'\";\n\t\t/** Clears parameters and then sets new values */\n\t\tPreparedStatement p_stmt = con.prepareCall(queryString);\n\t\t/** Set new attribute values */\n\t\tp_stmt.clearParameters();\n\t\tp_stmt.setString(1, this.item_category);\n\t\tp_stmt.setString(2, this.description);\n\t\tp_stmt.setString(3, this.item_name);\n\t\t/* Executes the Prepared Statement query */\n\t\tp_stmt.executeQuery();\n\t\tp_stmt.close();\n\t}", "@ManyToOne\r\n\t@JoinColumn(name=\"idpouchproceso\")\r\n\tpublic PouchProceso getPouchProceso() {\r\n\t\treturn this.pouchProceso;\r\n\t}", "public void setConvertedSplitQty (BigDecimal ConvertedSplitQty)\n{\nset_Value (\"ConvertedSplitQty\", ConvertedSplitQty);\n}", "public void updateSalesOrder(SalesOrderItem salesOrderItem){\n\t\tSalesOrderItemSalesOrder salesOrder = salesOrderItem.getSalesOrder();\n\t\tPropertyReader.copy(salesOrder, displayedEntity);\n\t}", "public void setProposition(String string);", "@Override\r\n\tpublic OrderItem createOrderItem(OrderItem newOrderItem) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tsession.save(newOrderItem);\r\n\t\treturn newOrderItem;\r\n\r\n\t}", "@Override\n\tpublic int update(OrderItem objectToUpdate) throws SQLException {\n\t\treturn 0;\n\t}", "public void setpQuantity(Integer pQuantity) {\n this.pQuantity = pQuantity;\n }", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "protected void setItemPrice(Double itemPrice) {\n this.itemPrice = itemPrice;\n }", "public void setpQuantity(int pQuantity) {\n this.pQuantity = pQuantity;\n }", "private void updateAssignedPO() {\n Organisation organisation = PersistenceManager.getCurrent().getCurrentModel();\n\n Person productOwner = getModel().getAssignedPO();\n\n // Add all the people with the PO skill to the list of POs\n List<Person> productOwners = organisation.getPeople()\n .stream()\n .filter(p -> p.canBeRole(Skill.PO_NAME))\n .collect(Collectors.toList());\n\n // Remove listener while editing the product owner picker\n poComboBox.getSelectionModel().selectedItemProperty().removeListener(getChangeListener());\n poComboBox.getItems().clear();\n poComboBox.getItems().addAll(productOwners);\n if (poComboBox != null) {\n poComboBox.getSelectionModel().select(productOwner);\n if (!isCreationWindow) {\n navigateToPOButton.setDisable(false);\n }\n }\n poComboBox.getSelectionModel().selectedItemProperty().addListener(getChangeListener());\n }", "public void setProducto (String nombreProducto, int stockProducto, double precioProducto) {\r\n\t\tthis.nombre = nombreProducto;\r\n\t\tthis.stock = stockProducto;\r\n\t\tthis.precio = precioProducto;\r\n\t}", "public void setIdProducto(int value) {\n this.idProducto = value;\n }", "public String getProId() {\n return proId;\n }", "@Override\r\n\tpublic String addItem(Product pro, String filePath) {\r\n\t\treturn productDetailsRepository.addItem(pro, filePath);\r\n\t}", "public void setPurchasePrice(double p)\n {\n this.purchasePrice = p;\n }", "public ProductWithStockItemTO changePrice(long storeID, StockItemTO stockItemTO) throws NotInDatabaseException, UpdateException;", "public void updateProduct() throws ApplicationException {\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n try {\n session.beginTransaction();\n Menu updateProduct = (Menu) session.get(Menu.class, menuFxObjectPropertyEdit.getValue().getIdProduct());\n\n updateProduct.setName(menuFxObjectPropertyEdit.getValue().getName());\n updateProduct.setPrice(menuFxObjectPropertyEdit.getValue().getPrice());\n\n session.update(updateProduct);\n session.getTransaction().commit();\n } catch (RuntimeException e) {\n session.getTransaction().rollback();\n SQLException sqlException = getCauseOfClass(e, SQLException.class);\n throw new ApplicationException(sqlException.getMessage());\n }\n\n initMenuList();\n }", "public String getCOD_ITEM() {\n return COD_ITEM;\n }", "public void setXpeProductUom(String value) {\n setAttributeInternal(XPEPRODUCTUOM, value);\n }", "public static void PP_Order(MPPOrder o) {\n\t\tProperties ctx = o.getCtx();\n\t\tString trxName = o.get_TrxName();\n\t\t//\n\t\t// Supply\n\t\tMPPMRP mrpSupply = getQuery(o, TYPEMRP_Supply, ORDERTYPE_ManufacturingOrder).firstOnly();\n\t\tif (mrpSupply == null) {\n\t\t\tmrpSupply = new MPPMRP(ctx, 0, trxName);\n\t\t\tmrpSupply.setAD_Org_ID(o.getAD_Org_ID());\n\t\t\tmrpSupply.setTypeMRP(MPPMRP.TYPEMRP_Supply);\n\t\t}\n\t\tmrpSupply.setPP_Order(o);\n\t\tmrpSupply.setPriority(o.getPriorityRule());\n\t\tmrpSupply.setPlanner_ID(o.getPlanner_ID());\n\t\tmrpSupply.setM_Product_ID(o.getM_Product_ID());\n\t\tmrpSupply.setM_Warehouse_ID(o.getM_Warehouse_ID());\n\t\tmrpSupply.setQty(o.getQtyOrdered().subtract(o.getQtyDelivered()));\n\t\tmrpSupply.save();\n\t\t//\n\t\t// Demand\n\t\tList<MPPMRP> mrpDemandList = getQuery(o, TYPEMRP_Demand, ORDERTYPE_ManufacturingOrder).list();\n\t\tfor (MPPMRP mrpDemand : mrpDemandList) {\n\t\t\tmrpDemand.setPP_Order(o);\n\t\t\tmrpDemand.save();\n\t\t}\n\t}", "public Number getPromoProdukId() {\n return (Number)getAttributeInternal(PROMOPRODUKID);\n }", "public void setPrice(float itemPrice) \n {\n price = itemPrice;\n }", "Items(int quantidade,String nome,double preco){\n\t\tthis.qntd=quantidade;\n\t\tthis.produto = new Produto(nome,preco);\n\t}", "public void edit_item_info(Item i,String pic) {\n i.setItemPicPath(\"images/\"+pic);\n// i.setItemTag(itemTag);\n// i.setItemSaleNum(itemSaleNum); \n em.merge(i);\n em.flush();\n\n }", "public Integer getIdPro() {\n return idPro;\n }", "public void setOrderItemName(String orderItemName) {\n this.orderItemName = orderItemName == null ? null : orderItemName.trim();\n }", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public void setPrecio(int precio) {\n\t\tthis.producto.setPrecio(precio);\n\t}", "public OrderItem insertOrderItem(OrderItem orderItem)\n\t{\n\t\tOrderItem orderIt=orderItemDAO.insert(orderItem);\n\t\tif(findOrderItemById(orderIt.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat nu a putut fi inserat\");\n\t\t\treturn null;\n\t\t}\n\t\treturn orderIt;\n\t}", "public void setPromId(Integer promId) {\n this.promId = promId;\n }", "protected void beforeUpdateSupplyOrderProperties(\n RetailscmUserContext userContext,\n SupplyOrder item,\n String retailStoreCountryCenterId,\n String id,\n String title,\n String contract,\n BigDecimal totalAmount,\n String[] tokensExpr)\n throws Exception {\n }", "@Override\r\n\t\t\tpublic void handle(CellEditEvent<Products, String> arg0) {\n\t\t\t\targ0.getTableView().getItems().get(arg0.getTablePosition().getRow()).setQuantity(arg0.getNewValue());\r\n\t\t\t\tProducts data=(Products) tbl_view.getSelectionModel().getSelectedItem();\r\n\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\tConnectionManager.queryInsert(conn, \"UPDATE dbo.product SET quantity='\"+data.getQuantity()+\"' WHERE id=\"+data.getId());\r\n\t\t\t\ttxt_cost.clear();\r\n\t\t\t\ttxt_date.clear();\r\n\t\t\t\ttxt_name.clear();\r\n\t\t\t\ttxt_price.clear();\r\n\t\t\t\ttxt_qty.clear();\r\n\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\ttxt_search.clear();\r\n\t\t\t\tfetchData(FETCH_DATA);\r\n\t\t\t}", "@Override\n\tpublic void insereItemCompleto(PrecoProdutoDiario item) throws DaoException {\n\t\tthrow new UnsupportedOperationException ();\n\t}", "public void setOrderPrice(BigDecimal orderPrice) {\n this.orderPrice = orderPrice;\n }", "@Override\n public void setEquippedItem(IEquipableItem item) {}", "public void setProductQty (BigDecimal ProductQty)\n{\nif (ProductQty == null) throw new IllegalArgumentException (\"ProductQty is mandatory\");\nset_Value (\"ProductQty\", ProductQty);\n}", "public void setProfundidad(int profundidad) {\n this.profundidad = profundidad;\n }", "public void changePrice(Product p, int price){\r\n\t\tp.price = price;\r\n\t}", "public void setItemPriceInvoice(float itemPriceInvoice)\n\t{\n\t\tthis.itemPriceInvoice = itemPriceInvoice;\n\t}", "public void addOrder(Order o) {\n medOrder.add(o);\n //System.out.println(\"in adding order\");\n for(OrderItem oi: o.getOrderItemList())\n {\n MedicineProduct p=oi.getProduct();\n //System.out.println(\"in for oop produscts \"+p);\n Medicine med = this.searchMedicine(p.getProdName());\n if(med!=null){\n int i = med.getAvailQuantity()+oi.getQuantity();\n med.setAvailQuantity(i);\n // System.out.println(\"in adding quntity \"+i);\n \n }\n }\n \n }", "@Override\r\n public PurchaseOrderItem getPurchaseOrderItem() {\r\n if (ObjectUtils.isNotNull(this.getPurapDocumentIdentifier())) {\r\n if (ObjectUtils.isNull(this.getPaymentRequest())) {\r\n this.refreshReferenceObject(PurapPropertyConstants.PURAP_DOC);\r\n }\r\n }\r\n // ideally we should do this a different way - maybe move it all into the service or save this info somehow (make sure and\r\n // update though)\r\n if (getPaymentRequest() != null) {\r\n PurchaseOrderDocument po = getPaymentRequest().getPurchaseOrderDocument();\r\n PurchaseOrderItem poi = null;\r\n if (this.getItemType().isLineItemIndicator()) {\r\n List<PurchaseOrderItem> items = po.getItems();\r\n poi = items.get(this.getItemLineNumber().intValue() - 1);\r\n // throw error if line numbers don't match\r\n // MSU Contribution DTT-3014 OLEMI-8483 OLECNTRB-974\r\n /*\r\n * List items = po.getItems(); if (items != null) { for (Object object : items) { PurchaseOrderItem item =\r\n * (PurchaseOrderItem) object; if (item != null && item.getItemLineNumber().equals(this.getItemLineNumber())) { poi\r\n * = item; break; } } }\r\n */\r\n } else {\r\n poi = (PurchaseOrderItem) SpringContext.getBean(PurapService.class).getBelowTheLineByType(po, this.getItemType());\r\n }\r\n if (poi != null) {\r\n return poi;\r\n } else {\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"getPurchaseOrderItem() Returning null because PurchaseOrderItem object for line number\" + getItemLineNumber() + \"or itemType \" + getItemTypeCode() + \" is null\");\r\n }\r\n return null;\r\n }\r\n } else {\r\n\r\n LOG.error(\"getPurchaseOrderItem() Returning null because paymentRequest object is null\");\r\n throw new PurError(\"Payment Request Object in Purchase Order item line number \" + getItemLineNumber() + \"or itemType \" + getItemTypeCode() + \" is null\");\r\n }\r\n }", "public void setItemSeq(Integer itemSeq) {\n this.itemSeq = itemSeq;\n }", "public String getProID() {\n\t\treturn sh_ProductID;\n\t}", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public JavaproductModel putproduct(JavaproductModel oJavaproductModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Update the existing product of the database*/\n hibernateSession.update(oJavaproductModel);\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return oJavaproductModel;\n }", "public Integer getPromId() {\n return promId;\n }", "@Override\r\n\tpublic void insertEncoreItem2(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem2\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item2\");\r\n\t}", "public void setQuantityToNull(DrinkItem drinkItem) throws SQLException{\n\t\tPreparedStatement myStmt = null;\n\t\ttry{\n\t\t\tmyStmt = myConn.prepareStatement(\"update drink set quantity = null where drink_code =?\");\n\t\t\tmyStmt.setInt(1, drinkItem.getDrinkCode());\n\t\t\tmyStmt.executeUpdate();\n\t\t}\n\t\tfinally{\n\t\t\tif(myStmt != null)\n\t\t\t\tmyStmt.close();\n\t\t}\n\t}", "public static int insert(OrderItems o) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n System.out.println(\"DBSetup @ LINE 101\");\n String query\n = \"INSERT INTO orderItem (orderNumber, productCode, quantity) \"\n + \"VALUES (?, ?, ?)\";\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, o.getOrderNumber());\n ps.setString(2, o.getProduct().getProductCode());\n ps.setInt(3, o.getQuantity());\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "public void setOrderItemAmount(Integer orderItemAmount) {\n this.orderItemAmount = orderItemAmount;\n }", "public void setProId(String proId) {\n this.proId = proId == null ? null : proId.trim();\n }", "public long getProcessOrderItemKey() {\n\t\treturn processOrderItemKey;\n\t}", "public int getProfit(Item item) {\n\t\treturn profit.get(item);\n\t}", "public void setItemCode(String itemCode) {\n\t\tthis.itemCode = itemCode == null ? null : itemCode.trim();\n\t}", "public void updateDB(int orderID, String prodID, String quantity) {\r\n try {\r\n String sql = \"UPDATE EmpOrders SET EmpOrderID = '\" + orderID + \"', ProductID = '\"\r\n + prodID + \"', QuanitityNeeded = '\" + quantity + \"'\";\r\n Statement stmt = Customer.connectDB();\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n }" ]
[ "0.6232403", "0.58358437", "0.569274", "0.55281883", "0.5518435", "0.5412086", "0.53435963", "0.52681804", "0.5207228", "0.5170163", "0.51256", "0.5118774", "0.51116043", "0.51048064", "0.50703555", "0.5041971", "0.50340027", "0.5030318", "0.5020703", "0.500035", "0.4999396", "0.49979272", "0.49944854", "0.49715197", "0.494974", "0.49495745", "0.4947264", "0.49381945", "0.49329236", "0.49270937", "0.4891382", "0.48880267", "0.48605683", "0.48272538", "0.48272538", "0.48183122", "0.48142424", "0.4814019", "0.4807807", "0.48076832", "0.48069632", "0.4805389", "0.48041952", "0.4794373", "0.47934526", "0.47750098", "0.47703925", "0.47503278", "0.47496822", "0.47410816", "0.4732723", "0.47260708", "0.47191352", "0.47146133", "0.4713632", "0.4706845", "0.4706704", "0.47011578", "0.4700069", "0.46913975", "0.46837455", "0.46774417", "0.46768183", "0.46721962", "0.4667294", "0.46654344", "0.46600163", "0.46542835", "0.46526548", "0.46499217", "0.46474704", "0.46472523", "0.46472195", "0.46386987", "0.46382794", "0.46368834", "0.4632712", "0.46276346", "0.46248677", "0.46243867", "0.4621832", "0.46212468", "0.4617299", "0.46122944", "0.46060225", "0.46035346", "0.46024892", "0.46015602", "0.46015602", "0.46008036", "0.46003422", "0.45996594", "0.45898867", "0.45888618", "0.45859978", "0.45849106", "0.4580624", "0.4579529", "0.45745376", "0.4562758" ]
0.75241446
0
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.order_item_amount
public Integer getOrderItemAmount() { return orderItemAmount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.math.BigDecimal getITEM_AMOUNT() {\r\n return ITEM_AMOUNT;\r\n }", "@Transient\n public Double getTotalOrderPrice() {\n double sum = 0;\n for (OrderItem oi : getOrderItems()) {\n sum += oi.getTotalPrice();\n }\n return sum;\n }", "public void setOrderItemAmount(Integer orderItemAmount) {\n this.orderItemAmount = orderItemAmount;\n }", "BigDecimal getAmount();", "public BigDecimal getAMOUNT() {\r\n return AMOUNT;\r\n }", "public BigDecimal getOrderMoney() {\n return orderMoney;\n }", "public BigDecimal getAmount() {\n return this.amount;\n }", "public BigDecimal getAmount() {\n return this.amount;\n }", "public BigDecimal getAmount() {\r\n return amount;\r\n }", "public Integer getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "public Integer getAmount() {\n return amount;\n }", "public Number getAmount() {\n return (Number) getAttributeInternal(AMOUNT);\n }", "public java.math.BigDecimal getAmount() {\n return amount;\n }", "public java.math.BigDecimal getAmount () {\r\n\t\treturn amount;\r\n\t}", "public BigDecimal getAmount()\n {\n return amount;\n }", "public Long getAmount() {\n return amount;\n }", "public Long getAmount() {\n return amount;\n }", "public Long getAmount() {\n return amount;\n }", "public Long getAmount() {\n return amount;\n }", "BigDecimal getAmountAssigned(DestinationEntity destinationEntity);", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() \r\n {\t\r\n \treturn amount;\t\r\n }", "public BigDecimal getAdditionalAmount() {\n return additionalAmount;\n }", "public int getAmount()\n {\n return this.transactionValue;\n }", "public double getTotal() {\n double total = 0.0;\n for (OrderItem i : getOrderItems()) {\n total += i.getOrderQuantity() * i.getPrice();\n }\n return total;\n }", "@Override \r\n public double getPaymentAmount() \r\n { \r\n return getQuantity() * getPricePerItem(); // calculate total cost\r\n }", "public BigDecimal getTotalAmount() {\n return totalAmount;\n }", "public long getAmount() {\r\n return amount;\r\n }", "@Override\n\tpublic Double getAmount(OrderDetails orderDetails) throws NotEnoguhQuantityException, CartNotEditable {\n\t\treturn orderDetails.getCart().getCartTotal();\n\t}", "@Override\n\tpublic int getAmount() {\n\t\treturn totalAmount;\n\t}", "public long getAmount() {\n return amount;\n }", "public int getQuantity() { \n return myOrderQuantity;\n }", "public int getAmount() {\n return amount_;\n }", "@ApiModelProperty(value = \"This is the sum of the OrderItemsAmount, DeliveryAmount, TipAmount and Voucher.Amount (which is usually negative) and OnlineOrderingFee It does include the OnlineOrderingFee\")\n public Double getAmount() {\n return amount;\n }", "public double getInvoiceAmount(){\n\t\t// declare a local variable of type double to store the invoice's total price\n\t\tdouble totalPrice;\n\t\t// the total price is given my multiplying the price per unit with the quantity\n\t\ttotalPrice = price * quantity;\t\t\n\t\t// return the value stored in the local variable totalPrice\n\t\treturn totalPrice;\n\t}", "protected abstract long getAmount(ItemVariant currentVariant);", "public int getAmount() {\n return amount_;\n }", "@java.lang.Override\n public long getAmount() {\n return amount_;\n }", "public long getAmount() {\n\t\treturn amount;\n\t}", "public java.math.BigDecimal getTransactionAmount() {\r\n return transactionAmount;\r\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "private Double getReturnedItemsAmount(int orNo, int storeCode) {\n\t\tString query = \"SELECT SUM(r.SELL_PRICE*r.QUANTITY) FROM returned_items r, invoice o, payment_item p WHERE r.OR_NO = o.OR_NO AND p.OR_NO = o.OR_NO AND p.STORE_CODE = o.STORE_CODE AND r.STORE_CODE = o.STORE_CODE and o.OR_NO = '\"+orNo+\"' AND r.OR_NO = o.OR_NO AND o.STORE_CODE = '\"+storeCode+\"' and o.RETURN = 1\";\r\n\t\tResultSet rs = Main.getDBManager().executeQuery(query);\r\n//\t\tResultSet rs = main.getDb().executeQuery(\"SELECT sum(p.AMT) from payment_item p WHERE MONTH (p.TRANS_DT) = '\"+month+\"' && YEAR(p.TRANS_DT) = '\"+year+\"' && DAY(p.TRANS_DT) = '\"+day+\"' AND p.STORE_CODE = '\"+storeCode+\"'\");\r\n\t\tDouble returnedItemsAmount= 0.0d;\r\n\t\ttry {\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\treturnedItemsAmount = rs.getDouble(1);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tLoggerUtility.getInstance().logStackTrace(e);\r\n\t\t}\r\n\t\tlogger.debug(\"Returned Items Amount: \"+returnedItemsAmount);\r\n\t\treturn returnedItemsAmount;\r\n\t}", "public int getAmount()\n\t{\n\t\treturn this.amount;\n\t}", "@Override\n\tpublic long getAmount() {\n\t\treturn amount;\n\t}", "public int getAmount() {\r\n\t\treturn Amount;\r\n\t}", "public BigDecimal getExtraAmount() {\r\n return extraAmount;\r\n }", "public float valorTotalItem()\r\n {\r\n float total = (produto.getValor() - (produto.getValor() * desconto)) * quantidade;\r\n return total;\r\n }", "public int getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount;\n }", "public int getAmount() {\n return amount;\n }", "public io.lightcone.data.types.Amount getAmount() {\n if (amountBuilder_ == null) {\n return amount_ == null ? io.lightcone.data.types.Amount.getDefaultInstance() : amount_;\n } else {\n return amountBuilder_.getMessage();\n }\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount();", "public java.lang.Long getAmount () {\r\n\t\treturn amount;\r\n\t}", "public double getAmount() {\n return this.amount;\n }", "public double getAmount() {\r\n\t\treturn amount;\r\n\t}", "public double getAmount() {\r\n\t\treturn amount;\r\n\t}", "@java.lang.Override\n public long getAmount() {\n return instance.getAmount();\n }", "public int amount() {\n return amount;\n }", "@Override\n\tpublic int getNoofQuantity() {\n\t String sql=\"SELECT SUM(quantity) FROM supplier_product\";\n\t int total=this.getJdbcTemplate().queryForObject(sql, Integer.class);\n\t\treturn total;\n\t}", "public Amount getAmountTotal() {\n return this.amountTotal;\n }", "public AmountType getItemPrice() {\n\t return this.itemPrice;\n\t}", "public Amount getAdditionalAmount() {\n return additionalAmount;\n }", "public int getAmount() {\n\t\treturn amount;\n\t}", "BigDecimal calculateTotalPrice(Order order);", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public double getAmount() {\n return amount;\n }", "public Double getAmount() {\r\n return amount;\r\n }", "public double getAmount () {\r\n\t\treturn amount;\r\n\t}", "public double getAmount() {\n\t\treturn amount;\n\t}", "public double getAmount() {\n\t\treturn amount;\n\t}", "public double getAmount() {\n\t\treturn amount;\n\t}", "public double getBillTotal(){\n\t\treturn user_cart.getBillTotal();\n\t}", "TotalInvoiceAmountType getTotalInvoiceAmount();", "public Long getOrdermoney() {\n return ordermoney;\n }", "public long getAmount();", "public long getAmount();", "public Double getTotalBuyMoney() {\r\n return totalBuyMoney;\r\n }", "public String getAmount() {\r\n return this.amount;\r\n }", "public double getAmount() {\n return amount;\n }", "public static int getAmount() {\n\t\treturn amount;\n\t}", "public BigDecimal getActualAmount() {\n return actualAmount;\n }", "Money getItemValue();", "private MMDecimal getCustomerReturnItemPrice(OrderDetail odetail) {\r\n MMDecimal result = MMDecimal.ZERO;\r\n MMDecimal itemCostAmt = odetail.getOrderItemPriceAmt() == null ? MMDecimal.ZERO : odetail\r\n .getOrderItemPriceAmt();\r\n \r\n MMDecimal itemTaxAmt = odetail.getOrderItemTaxAmt() == null ? MMDecimal.ZERO : odetail\r\n .getOrderItemTaxAmt();\r\n result = itemCostAmt.add(itemTaxAmt);\r\n return result;\r\n }", "public double getTotal() {\n double amount = 0;\n amount = (this.getQuantity() * product.getPrice().doubleValue());\n return amount;\n }", "public BigDecimal getUnitAmount() {\n return this.unitAmount;\n }", "public double sumMoney(){\n\t\tdouble result = 0;\n\t\tfor(DetailOrder detail : m_DetailOrder){\n\t\t\tresult += detail.calMoney();\n\t\t}\n\t\tif(exportOrder == true){\n\t\t\tresult = result * 1.1;\n\t\t}\n\t\treturn result;\n\t}", "public void setITEM_AMOUNT(java.math.BigDecimal ITEM_AMOUNT) {\r\n this.ITEM_AMOUNT = ITEM_AMOUNT;\r\n }" ]
[ "0.6778896", "0.63641757", "0.6026166", "0.6021075", "0.6012208", "0.5944597", "0.5866393", "0.58438426", "0.58401114", "0.5838094", "0.5838094", "0.5838094", "0.58233064", "0.5813187", "0.58061147", "0.58003944", "0.5799641", "0.5799641", "0.5799641", "0.5799641", "0.5799471", "0.57963896", "0.57963896", "0.57963896", "0.57963896", "0.57963896", "0.57963896", "0.57963896", "0.57963896", "0.57920593", "0.57809454", "0.5754556", "0.5748348", "0.57459", "0.570243", "0.5692308", "0.5684193", "0.5674761", "0.56734365", "0.56642234", "0.5653446", "0.5648717", "0.56306857", "0.56276727", "0.5616714", "0.56163275", "0.55998385", "0.5595702", "0.55820066", "0.557972", "0.55784327", "0.5564008", "0.55605507", "0.55479085", "0.5543289", "0.5541194", "0.5541194", "0.5541194", "0.5534775", "0.553317", "0.5532198", "0.5523901", "0.55047953", "0.55047953", "0.5503818", "0.54981834", "0.5491791", "0.54911184", "0.54886913", "0.54806125", "0.54714763", "0.5466364", "0.54644495", "0.54644495", "0.54644495", "0.54644495", "0.54644495", "0.54644495", "0.54644495", "0.5461072", "0.54591197", "0.54546833", "0.54546833", "0.54546833", "0.5446565", "0.5445238", "0.5442524", "0.5440703", "0.5440703", "0.543181", "0.5430907", "0.54257315", "0.5408931", "0.5396487", "0.5377744", "0.5376781", "0.5371087", "0.5368197", "0.5358166", "0.53475577" ]
0.7361127
0
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.order_item_amount
public void setOrderItemAmount(Integer orderItemAmount) { this.orderItemAmount = orderItemAmount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getOrderItemAmount() {\n return orderItemAmount;\n }", "public void setITEM_AMOUNT(java.math.BigDecimal ITEM_AMOUNT) {\r\n this.ITEM_AMOUNT = ITEM_AMOUNT;\r\n }", "public java.math.BigDecimal getITEM_AMOUNT() {\r\n return ITEM_AMOUNT;\r\n }", "public void setAmount(BigDecimal value) {\n this.amount = value;\n }", "public void setAMOUNT(BigDecimal AMOUNT) {\r\n this.AMOUNT = AMOUNT;\r\n }", "public void setAmount(BigDecimal amount) {\r\n this.amount = amount;\r\n }", "public void setAmount(BigDecimal amount) {\n this.amount = amount;\n }", "public void setAmount(BigDecimal amount) {\n this.amount = amount;\n }", "public void setAmount(BigDecimal amount) {\n this.amount = amount;\n }", "public void setAmount( BigDecimal amount ) {\n this.amount = amount;\n }", "public ItemBuilder setAmount(int amount) {\r\n\t\tthis.amount = amount;\r\n\t\treturn this;\r\n\t}", "public void setAmount(java.math.BigDecimal amount) {\n this.amount = amount;\n }", "@Override\n\tpublic int update(OrderItem objectToUpdate) throws SQLException {\n\t\treturn 0;\n\t}", "public void setOrderMoney(BigDecimal orderMoney) {\n this.orderMoney = orderMoney;\n }", "public void setAmount(double value) {\n this.amount = value;\n }", "public void setAmount (java.math.BigDecimal amount) {\r\n\t\tthis.amount = amount;\r\n\t}", "public void setAmt(java.math.BigDecimal param) {\r\n this.localAmt = param;\r\n }", "void setAmount(ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount amount);", "public void setItemPrice(AmountType itemPrice) {\n\t this.itemPrice = itemPrice;\n\t}", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public static void setDropdownAmountOption(int option){\n DriverManager.driver.findElement(Constans.AMOUNT_LOCATOR).click();\n setDropdownOption(option);\n }", "private void updateTotalPayment(BarcodedItem barcodedItem, int quantity) {\n\n\t\tBigDecimal price = ProductDatabases.BARCODED_PRODUCT_DATABASE.get(barcodedItem.getBarcode())\n\t\t\t\t.getPrice().multiply(new BigDecimal(quantity));\n\t\n\t\t\n\t\tprice = price.setScale(2, BigDecimal.ROUND_HALF_UP); \n\t\n\t\t\t\t\t\t\n\t\ttotalPayment = totalPayment.add(price);\n\t\t\n\t\tSystem.out.println(\"Total Payment = \" + totalPayment.toString());\n\t\n\t}", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public void setAmount(double value) {\n this.amount = value;\n }", "public void setConvertedProductQty (BigDecimal ConvertedProductQty)\n{\nset_Value (\"ConvertedProductQty\", ConvertedProductQty);\n}", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public void updateSalesOrder(SalesOrderItem salesOrderItem){\n\t\tSalesOrderItemSalesOrder salesOrder = salesOrderItem.getSalesOrder();\n\t\tPropertyReader.copy(salesOrder, displayedEntity);\n\t}", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "public void setOrderItemProice(BigDecimal orderItemProice) {\n this.orderItemProice = orderItemProice;\n }", "@Override\n public void onAmountChange(View view, int amount) {\n item.num = amount;\n }", "public void setAmount(int amount) {\n this.amount = amount;\n }", "public void setAmount(double amount) {\n this.amount = amount;\n }", "public void setAmount(double amount) {\n this.amount = amount;\n }", "public void setAmount(double value) {\r\n\t\tthis.amount = value;\r\n\t}", "public void setAmount(Number value) {\n setAttributeInternal(AMOUNT, value);\n }", "public void setAmount(Integer amount) {\n this.amount = amount;\n }", "public void setAmount (double amount) {\r\n\t\tthis.amount = amount;\r\n\t}", "public void setTotal(BigDecimal amount){\r\n\t\ttotal = amount.doubleValue();\r\n\t}", "protected void setItemPrice(Double itemPrice) {\n this.itemPrice = itemPrice;\n }", "public void setAmount(long value) {\r\n this.amount = value;\r\n }", "public void setAmount(int moneyOption);", "public void setConvertedShrinkQty (BigDecimal ConvertedShrinkQty)\n{\nset_Value (\"ConvertedShrinkQty\", ConvertedShrinkQty);\n}", "public void setActualAmount(BigDecimal actualAmount) {\n this.actualAmount = actualAmount;\n }", "public abstract void setWarehouseAmount(int productID, int newAmount) throws GettingDataFailedException;", "public void setConvertedSplitQty (BigDecimal ConvertedSplitQty)\n{\nset_Value (\"ConvertedSplitQty\", ConvertedSplitQty);\n}", "public void setsaleamt(BigDecimal value) {\n setAttributeInternal(SALEAMT, value);\n }", "public void setAmount(double amount) {\r\n\t\tthis.amount = amount;\r\n\t}", "@Modifying(clearAutomatically = true)\n @Query(\"UPDATE Item i SET i.quantity = i.quantity - ?1 WHERE i =?2\")\n int deductFromStock(double qty, Item item);", "public void setShrinkQty (BigDecimal ShrinkQty)\n{\nset_Value (\"ShrinkQty\", ShrinkQty);\n}", "public void setPayAmt (BigDecimal PayAmt);", "@Override\r\n public void ItemQuantity(int quantity) {\n this.quantity = quantity;\r\n }", "public void setAmount(Double amount) {\r\n this.amount = amount;\r\n }", "public void setPrice(float itemPrice) \n {\n price = itemPrice;\n }", "public BigDecimal getAMOUNT() {\r\n return AMOUNT;\r\n }", "public void setAmount(double amount) {\n\t\tthis.amount = amount;\n\t}", "public void setAmount(long amount);", "public void setAdditionalAmount(BigDecimal additionalAmount) {\n this.additionalAmount = additionalAmount;\n }", "@Modifying(clearAutomatically = true)\n\t@Lock(value = LockModeType.OPTIMISTIC_FORCE_INCREMENT)\n @Query(\"UPDATE Item i SET i.quantity = i.quantity + ?1 WHERE i =?2\")\n int addToStock(double qty, Item item);", "public void setSaleAmount(double amount) {\n saleAmount = amount;\n }", "public BigDecimal getAmount() {\r\n return amount;\r\n }", "void setCapitalPayed(ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount capitalPayed);", "public void addAmount(Product product, BigDecimal amount) {\n\t\titems.put(product, items.getOrDefault(product, new BigDecimal(\"0\")).add(amount));\n\t}", "public void setOrderPrice(BigDecimal orderPrice) {\n this.orderPrice = orderPrice;\n }", "@Override\r\n\tpublic void operateAmount(String AccountID, BigDecimal amount) {\n\r\n\t}", "public void setAmount(Double amount) {\n this.amount = amount;\n }", "public void setActualAmt(BigDecimal aActualAmt) {\n actualAmt = aActualAmt;\n }", "public void setAmount(final double newAmount) {\n this.amount = newAmount;\n }", "public int placeOrder(Order order, String cust_no, Connection conn) {\r\n\t\ttry {\r\n\t\t\tint item_no=0;\r\n\t\t\tArrayList<Item> item_collection = new ArrayList<Item>();\r\n\t\t\titem_collection = order.getItemCollection(); \r\n\t\t\tfor(Item i : item_collection)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t\titem_no = i.getItemNo();\r\n\t\t\t}\r\n\t\t\tint order_no = 0;\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select max(orderno) from order_XXXX\");\r\n\t\t\twhile (rset.next()) {\r\n\t\t\t\torder_no = rset.getInt(1);\r\n\t\t\t\torder_no++;\r\n\t\t\t}\r\n\t\t\tPreparedStatement pstmt = conn\r\n\t\t\t\t\t.prepareStatement(\"insert into order_XXXX(orderno,item_no,ord_qty,custno) values(?,?,?,?)\");\r\n\t\t\tpstmt.setInt(1, order_no);\r\n\t\t\tpstmt.setInt(2, item_no);\r\n\t\t\tpstmt.setInt(3, order.getOrderQty());\r\n\t\t\tpstmt.setString(4, cust_no);\r\n\t\t\tint count = pstmt.executeUpdate();\r\n\t\t\tPreparedStatement pstmt1 = conn.prepareStatement(\"update item_XXXX set qty=qty-? where item_no = ?\");\r\n\t\t\tpstmt1.setInt(1, order.getOrderQty());\r\n\t\t\tpstmt1.setInt(2, item_no);\r\n\t\t\tpstmt1.executeUpdate();\r\n\t\t\treturn count;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "@ApiModelProperty(value = \"This is the sum of the OrderItemsAmount, DeliveryAmount, TipAmount and Voucher.Amount (which is usually negative) and OnlineOrderingFee It does include the OnlineOrderingFee\")\n public Double getAmount() {\n return amount;\n }", "public void setAmount(double amount) {\r\n\t\tthis.investmentAmount = amount;\r\n\t}", "public BigDecimal getAmount()\n {\n return amount;\n }", "public void changeOrderPosItemQuantityInOrder(int orderID, long orderPosItemID, int orderPosItemQuantity) {\n if (this.orderListMap.get(orderID).getOrderState().equals(OrderState.INPROGRESS)) {\n\n double beforeOrderTotalPrice = this.orderListMap.get(orderID).getOrderTotalPrice();\n int discount = this.orderListMap.get(orderID).getDiscount();\n OrderPosition bufOrderPosition = this.orderListMap.get(orderID).getOrderPositionMap().remove(orderPosItemID);\n double beforeOrderPosPrice = bufOrderPosition.getOrderPosTotalPrice();\n\n try {\n bufOrderPosition.setOrderPosItemQuantity(orderPosItemQuantity);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n bufOrderPosition.setOrderPosTotalPrice();\n\n this.orderListMap.get(orderID).getOrderPositionMap().put(orderPosItemID, bufOrderPosition);\n\n double newOrderTotalPrice = beforeOrderTotalPrice - beforeOrderPosPrice * (100 - discount) / 100.0;\n newOrderTotalPrice += bufOrderPosition.getOrderPosTotalPrice() * (100 - discount) / 100.0;\n newOrderTotalPrice = Math.round(newOrderTotalPrice * 100) / 100.0;\n\n this.orderListMap.get(orderID).setOrderTotalPrice(newOrderTotalPrice);\n\n OrderIO.setOrderIO(this.orderListMap);\n } else {\n System.out.println(\"Order state is not \\\"in progress\\\". Forbidden to change quantity of certain items (aka order position) in order.\");\n }\n }", "public BigDecimal getOrderMoney() {\n return orderMoney;\n }", "@Transient\n public Double getTotalOrderPrice() {\n double sum = 0;\n for (OrderItem oi : getOrderItems()) {\n sum += oi.getTotalPrice();\n }\n return sum;\n }", "public BigDecimal getAmount() {\n return this.amount;\n }", "public void setQuantityToNull(DrinkItem drinkItem) throws SQLException{\n\t\tPreparedStatement myStmt = null;\n\t\ttry{\n\t\t\tmyStmt = myConn.prepareStatement(\"update drink set quantity = null where drink_code =?\");\n\t\t\tmyStmt.setInt(1, drinkItem.getDrinkCode());\n\t\t\tmyStmt.executeUpdate();\n\t\t}\n\t\tfinally{\n\t\t\tif(myStmt != null)\n\t\t\t\tmyStmt.close();\n\t\t}\n\t}", "public void setTransactionAmount(java.math.BigDecimal transactionAmount) {\r\n this.transactionAmount = transactionAmount;\r\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "public BigDecimal getAmount() {\n return amount;\n }", "@Override\n public void setTotalMoney(BigDecimal inputMoney) {\n totalMoney = inputMoney;\n }", "public BigDecimal getAmount() \r\n {\t\r\n \treturn amount;\t\r\n }", "public void setUnitAmount(BigDecimal unitAmount) {\n this.unitAmount = unitAmount;\n }", "public OrderItem updateOrderItem(OrderItem orderItem)\n\t{\n\t\tif(findOrderItemById(orderItem.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat care se incearca updatat nu exista\");\n\t\t\treturn null;\n\t\t}\n\t\tOrderItem orderIt=orderItemDAO.update(orderItem);\n\t\treturn orderIt;\n\t}", "public Builder setAmount(int value) {\n bitField0_ |= 0x00000002;\n amount_ = value;\n onChanged();\n return this;\n }", "public abstract BaseQuantityDt setValue(BigDecimal theValue);", "public BigDecimal getAmount() {\n return this.amount;\n }", "public void setAmount(String amount) {\r\n this.amount = amount;\r\n }", "BigDecimal getAmount();", "public void setTotalAmount(BigDecimal totalAmount) {\n this.totalAmount = totalAmount;\n }", "public void addToUnitPrice(BigDecimal addThisValue) {\r\n if (getItemUnitPrice() == null) {\r\n setItemUnitPrice(BigDecimal.ZERO);\r\n }\r\n BigDecimal addedPrice = getItemUnitPrice().add(addThisValue);\r\n setItemUnitPrice(addedPrice);\r\n }", "@Override\n\tpublic void setAmount(long amount) {\n\t\tthis.amount = amount;\n\t}", "public void update() {\n\t\tthis.quantity = item.getRequiredQuantity();\n\t}", "public void setAmount(double amount){\n try{\n if(amount>=0.0){\n this.amount=amount;\n }\n else {\n this.amount = 1;\n throw new SupplyOrderException(\"Invalid amount, resetted to 1\");\n }\n } catch(SupplyOrderException soe){\n soe.getMessage();\n }\n }", "public void setAmount(Long amount) {\n this.amount = amount;\n }" ]
[ "0.6529", "0.64190245", "0.5792944", "0.578043", "0.5772789", "0.57644105", "0.57095", "0.57095", "0.57095", "0.5649925", "0.56147987", "0.5586677", "0.5583918", "0.55662656", "0.55328953", "0.5501767", "0.55014086", "0.54999435", "0.54988706", "0.5479418", "0.5474501", "0.54670686", "0.543948", "0.5419177", "0.5416341", "0.54084605", "0.5394031", "0.5386489", "0.5383568", "0.5372327", "0.53685766", "0.5337843", "0.5337843", "0.53347474", "0.5326536", "0.5319469", "0.5310739", "0.5309973", "0.5286053", "0.5272433", "0.52684724", "0.5268196", "0.5256249", "0.5252001", "0.52396345", "0.5239344", "0.523882", "0.5223947", "0.52116764", "0.5202972", "0.51817447", "0.5174673", "0.51739234", "0.5151317", "0.5151047", "0.5149441", "0.51490605", "0.5147765", "0.514767", "0.5146337", "0.51319236", "0.51291144", "0.5123784", "0.5117965", "0.5116274", "0.51091677", "0.5106367", "0.5101514", "0.5093246", "0.5081277", "0.5066526", "0.5065381", "0.50585186", "0.50559413", "0.5053732", "0.5049619", "0.50462383", "0.5043452", "0.5043452", "0.5043452", "0.5043452", "0.5043452", "0.5043452", "0.5043452", "0.5043452", "0.5020637", "0.5018646", "0.50097847", "0.49949005", "0.49940228", "0.4993603", "0.4991976", "0.49914637", "0.49902028", "0.49877885", "0.49871272", "0.4978019", "0.49777237", "0.49766856", "0.49760255" ]
0.72909963
0
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.order_item_url
public String getOrderItemUrl() { return orderItemUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOrderItemUrl(String orderItemUrl) {\n this.orderItemUrl = orderItemUrl == null ? null : orderItemUrl.trim();\n }", "@Schema(description = \"Link to get this item\")\n public String getUrl() {\n return url;\n }", "public String getItemURL() {\n String shownAt = jsonParent.getString(\"isShownAt\");\n println(shownAt);\n return shownAt;\n }", "public String getUrl() {\n\t\tif (null != this.url) {\n\t\t\treturn this.url;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"url\");\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 String getURL(int series, int item) {\n/* 110 */ String result = null;\n/* 111 */ if (series < getListCount()) {\n/* 112 */ List urls = (List)this.urlSeries.get(series);\n/* 113 */ if (urls != null && \n/* 114 */ item < urls.size()) {\n/* 115 */ result = (String)urls.get(item);\n/* */ }\n/* */ } \n/* */ \n/* 119 */ return result;\n/* */ }", "@Column(length = 2048)\r\n @PlaceHolder(key = \"schema\")\r\n public String getUrlPath() {\r\n return urlPath;\r\n }", "public String getURL(int position){\n Item current = getItem(position);\n return current.URL();\n }", "public String getUrl() {\n\t\tif (prop.getProperty(\"url\") == null)\n\t\t\treturn \"\";\n\t\treturn prop.getProperty(\"url\");\n\t}", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "@ApiModelProperty(value = \"website or ecommerce URL\")\n @JsonProperty(\"url\")\n public String getUrl() {\n return url;\n }", "@JsonProperty(\"ProductURL\")\n public String getProductURL() {\n return productURL;\n }", "public String getUrl() { /* (readonly) */\n return mUrl;\n }", "public final String getUrl() {\n return properties.get(URL_PROPERTY);\n }", "public CimString getProductUrl() {\n return productUrl;\n }", "public CharSequence getItemImageUrl() {\n return item_image_url;\n }", "public String getProductUrl() {\n\t\treturn productUrl;\n\t}", "public String getUrl() {\n\t\treturn this.url;\n\t}", "public CharSequence getItemImageUrl() {\n return item_image_url;\n }", "public String getUrl() {\n return this.Url;\n }", "public UriDt getUrlElement() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrlElement() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrlElement() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public String getURL() {\r\n\t\treturn dURL.toString();\r\n\t}", "public String getURL(){\r\n\t\t \r\n\t\t\r\n\t\treturn rb.getProperty(\"url\");\r\n\t}", "public String generateURL(XYDataset dataset, int series, int item) { return getURL(series, item); }", "public String getUrl() {\n return this.url;\n }", "public String getURL() {\n\t\treturn prop.getProperty(\"URL\");\n\t}", "public String getUrl()\n {\n return this.url;\n }", "String getURL(FsItem f);", "public String getUrl()\n {\n // return url of node associated with menu\n // option if defined\n if (getNode() != null)\n {\n return getNode().getUrl();\n }\n return null;\n }", "public org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlValue xgetUrlValue()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlValue target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlValue)get_store().find_attribute_user(URLVALUE$2);\r\n return target;\r\n }\r\n }", "java.lang.String getProductImageUrl();", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public UriDt getUrl() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrl() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrl() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public final native String getUrl() /*-{\n return this.getUrl();\n }-*/;", "public String getUrl() {\n return mUrl;\n }", "public String getUrl() {\n return mUrl;\n }", "public String getUrl() {\n return mUrl;\n }", "public String getUrl() {\n return mUrl;\n }", "public String getUrl() {\r\n\t\t\treturn url;\r\n\t\t}", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "@JsonProperty(\"url\")\n public String getUrl() {\n return url;\n }", "@JsonProperty(\"url\")\n public String getUrl() {\n return url;\n }", "public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getMappedUrl() {\n return mappedUrl;\n }", "public String getUrl() {\n\t\t\treturn url;\n\t\t}", "@JsonProperty(\"url\")\n public String getUrl() {\n return url;\n }", "public java.lang.String getUrl(){\r\n return this.url;\r\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "public String getURL()\n {\n return getURL(\"http\");\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "@Override\n\tpublic String getUrl()\n\t{\n\t\treturn url;\n\t}", "public static String getUrl() {\n return annotation != null ? annotation.url() : \"Unknown\";\n }", "public String getURL() {\r\n\t\treturn url;\r\n\t}", "public String getURL() {\r\n return url;\r\n }", "public String getBuyLink() {\n return buyLink;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "public URL getURL() {\n\t\treturn m_URL;\n\t}", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getURL() {\n\t\treturn url;\n\t}", "public String getURL() {\n return url;\n }", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "public String getURL() {\n return mURL;\n }", "public java.lang.String getUrl () {\r\n\t\treturn url;\r\n\t}", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String url() {\n return this.url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }" ]
[ "0.62240696", "0.6162419", "0.56939745", "0.5614647", "0.5518857", "0.5460448", "0.54004663", "0.5387106", "0.5344415", "0.5238275", "0.5212669", "0.5207578", "0.52057695", "0.5190006", "0.5150672", "0.5142922", "0.5142515", "0.5129044", "0.5127459", "0.5120835", "0.5120835", "0.5120835", "0.50743896", "0.5067296", "0.5062925", "0.50620633", "0.50479186", "0.5047718", "0.5026782", "0.5025876", "0.5014421", "0.5000094", "0.4998807", "0.49698406", "0.49698406", "0.49698406", "0.49660996", "0.49604762", "0.49604762", "0.49604762", "0.49604762", "0.49396902", "0.49351758", "0.49351758", "0.4921994", "0.4921994", "0.49215746", "0.49129874", "0.49129874", "0.49129874", "0.49129874", "0.49129874", "0.49129874", "0.49129874", "0.49129874", "0.49129874", "0.49125886", "0.4911356", "0.4908048", "0.4907897", "0.48805043", "0.48805043", "0.48749855", "0.48727182", "0.48704273", "0.48562086", "0.48520115", "0.48502082", "0.48380822", "0.4832957", "0.4832957", "0.48153767", "0.48152608", "0.48152608", "0.48152608", "0.48152608", "0.48152608", "0.48152608", "0.48152608", "0.4809127", "0.48081353", "0.48078075", "0.47879505", "0.47839522", "0.47770527", "0.47770527", "0.47769153", "0.4775735", "0.47622204", "0.47622204", "0.47622204", "0.47622204", "0.47622204", "0.47622204", "0.47622204", "0.47622204", "0.47622204", "0.47622204", "0.47622204", "0.47622204" ]
0.7170966
0
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.order_item_url
public void setOrderItemUrl(String orderItemUrl) { this.orderItemUrl = orderItemUrl == null ? null : orderItemUrl.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getOrderItemUrl() {\n return orderItemUrl;\n }", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "void setURL(int index, URL value) throws SQLException;", "protected void setLinkToUrl(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{\n\t\t\n\t\tString linkToUrl = rs.getString(UiActionTable.COLUMN_LINK_TO_URL);\n\t\t\n\t\tif(linkToUrl == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tuiAction.setLinkToUrl(linkToUrl);\n\t}", "public void setItemImageUrl(CharSequence value) {\n this.item_image_url = value;\n }", "public maestro.payloads.FlyerFeaturedItem.Builder setItemImageUrl(CharSequence value) {\n validate(fields()[8], value);\n this.item_image_url = value;\n fieldSetFlags()[8] = true;\n return this;\n }", "public URL setURL(URL url) {\r\n if (url == null)\r\n throw new IllegalArgumentException(\r\n \"A null url is not an acceptable value for a PackageSite\");\r\n URL oldURL = url;\r\n myURL = url;\r\n return oldURL;\r\n }", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public void setLinkItem(String string) {\r\n this.linkItem = string;\r\n }", "@Schema(description = \"Link to get this item\")\n public String getUrl() {\n return url;\n }", "public void setUrlValue(org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlValue.Enum urlValue)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(URLVALUE$2);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(URLVALUE$2);\r\n }\r\n target.setEnumValue(urlValue);\r\n }\r\n }", "public static void setPaymentURL( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public void setURL(String _url) { url = _url; }", "public void setUrlKey(org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlKey.Enum urlKey)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(URLKEY$0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(URLKEY$0);\r\n }\r\n target.setEnumValue(urlKey);\r\n }\r\n }", "public void setUrl(String url){\n this.URL3 = url;\n }", "public void setProductImageUrl(final String productImageUrl);", "public void setInputUrlValue(String value){\n WebElement urlField = driver.findElement(inputUrlLocator); \n setValue(urlField, value);\n \n }", "public void xsetUrlValue(org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlValue urlValue)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlValue target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlValue)get_store().find_attribute_user(URLVALUE$2);\r\n if (target == null)\r\n {\r\n target = (org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlValue)get_store().add_attribute_user(URLVALUE$2);\r\n }\r\n target.set(urlValue);\r\n }\r\n }", "public void setURL(String url);", "public static void setPaymentURL(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, PAYMENTURL, value);\r\n\t}", "public void setItem(Item item) {\n this.item = item;\n }", "public StockEvent setUrl(String url) {\n this.url = url;\n return this;\n }", "public void setUrl(URL url)\n {\n this.url = url;\n }", "public void setItemLink(MethodLinkBuilderFactory<GamesItemThymeleafController> itemLink) {\n this.itemLink = itemLink;\n }", "public Series setUrl(UriDt theValue) {\n\t\tmyUrl = theValue;\n\t\treturn this;\n\t}", "public void setUrl(String newUrl) {\r\n\t\turl = newUrl;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (cn != null) {\r\n\t\t\t\tcn.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcn = null;\r\n\t\tinit();\r\n\t}", "protected void setImageUrl(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{\n\t\t\n\t\tString imageUrl = rs.getString(UiActionTable.COLUMN_IMAGE_URL);\n\t\t\n\t\tif(imageUrl == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tuiAction.setImageUrl(imageUrl);\n\t}", "public void setUrl(String url) {\n if(url != null && !url.endsWith(\"/\")){\n url += \"/\";\n }\n this.url = url;\n }", "public void setURL(String URL) {\n mURL = URL;\n }", "public void setAmusementObjectWebsite(String website){\r\n amusementObjectWebsite = Uri.parse(website);\r\n }", "public void setItem (Item item)\n\t{\n\t\tthis.item = item;\n\t}", "@Override\r\n\tpublic void updateOrder(String userId, String placeId, int order, String city) {\n\t\tif (conn == null) {\r\n\t\t\tSystem.err.println(\"DB connection failed\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM favorites WHERE user_id = ? AND place_id = ?\";\r\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\r\n\t\t\tps.setString(1, userId);\r\n\t\t\tps.setString(2, placeId);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\r\n\t\t\tif (rs.next()) { // if it is already in the table, update the order\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsql = \"UPDATE favorites f \"\r\n\t\t\t\t\t\t\t+ \"SET f.access_order = ? \"\r\n\t\t\t\t\t\t\t+ \"WHERE f.user_id = ? AND f.place_id = ?\";\r\n\t\t\t\t\tPreparedStatement stmt = conn.prepareStatement(sql);\r\n\t\t\t\t\tstmt.setInt(1, order);\r\n\t\t\t\t\tstmt.setString(2, userId);\r\n\t\t\t\t\tstmt.setString(3, placeId);\r\n\t\t\t\t\tstmt.setString(4, city);\r\n\t\t\t\t\tstmt.execute();\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t} else { // it it is not in the table yet, insert the column with new order\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsql = \"INSERT IGNORE INTO favorites(user_id, place_id, access_order, city) VALUES (? ,? ,?, ?)\";\r\n\t\t\t\t\tPreparedStatement stmt = conn.prepareStatement(sql);\r\n\t\t\t\t\tstmt.setString(1, userId);\r\n\t\t\t\t\tstmt.setString(2, placeId);\r\n\t\t\t\t\tstmt.setInt(3, order);\r\n\t\t\t\t\tstmt.setString(4, city);\r\n\t\t\t\t\tstmt.execute();\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\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}", "public void setPaymentURL( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public void setUrl(String url);", "public void setUrl(String url);", "public void setUrl(String url) throws BuildException {\n jdbcUrl = url;\n }", "public SeriesInstance setUrl(UriDt theValue) {\n\t\tmyUrl = theValue;\n\t\treturn this;\n\t}", "public void setURL(String key, URL value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.toString());\n\t\telse\n\t\t\tinternal.remove(key);\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "void setUrl(String url) {\n this.url = Uri.parse(url);\n }", "public final native void setUrl(String url) /*-{\n this.setUrl(url);\n }-*/;", "public void setProductUrl(String productUrl) {\n\t\tthis.productUrl = productUrl;\n\t}", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t\tthis.handleConfig(\"url\", url);\n\t}", "public void setUrl(String url){\n\t\t_url=url;\n\t}", "public void setUrl( String url )\n {\n this.url = url;\n }", "public void setUrl( String url )\n {\n this.url = url;\n }", "public void setOrderItemName(String orderItemName) {\n this.orderItemName = orderItemName == null ? null : orderItemName.trim();\n }", "public void setPaymentURL(org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(this.model, this.getResource(), PAYMENTURL, value);\r\n\t}", "public void setUrl(String url) {\n this.url = url;\n }", "public void setHTTP_URL(String url) {\r\n\t\ttry {\r\n\t\t\tURL u = new URL(url);\r\n\t\t\tu.toURI();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tthis.settings.setProperty(\"HTTP_URL\", url);\r\n\t\tthis.saveChanges();\r\n\t}", "@Override\n public void setUrl(String url) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Directory manager \" + directoryManager);\n }\n try {\n super.setUrl(directoryManager.replacePath(url));\n } catch (Exception e) {\n LOGGER.error(\"Exception thrown when setting URL \", e);\n throw new IllegalStateException(e);\n }\n }", "public void setOpenUrlValueForCustomAction(String openURLValue) {\n\t\tthis.openUrlValue = openURLValue;\n\t}", "public native final void setUrl(String url)/*-{\n this.url = url;\n }-*/;", "Builder addUrl(String value);", "Builder addUrl(URL value);", "public void setUrl(String Url) {\n this.Url = Url;\n }", "public void setURL(int parameterIndex, URL x) throws SQLException {\n currentPreparedStatement.setURL(parameterIndex, x);\n\n }", "@JsonIgnore\n public void setDataUrl(String dataUrl) {\n this.dataUrl = dataUrl;\n }", "public void setUrl(String url)\n {\n this.url = url;\n }", "public void editUrl(String purl, String url) {\n Citation entity = citationRepo_.findOne(purl);\n entity.setUrl(url);\n }", "public void setUrl(Uri url) {\n this.urlString = url.toString();\n }", "void setPointOfReference(String url)\n throws IOException, SoapException;", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}", "public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}", "@NoProxy\n @NoWrap\n @NoDump\n @IcalProperty(pindex = PropertyInfoIndex.LOCATION_HREF,\n jname = \"locationHref\",\n required = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true)\n public void setLocationHref(final String val) {\n locationHref = val;\n }", "public void setItem (jkt.hms.masters.business.MasStoreItem item) {\n\t\tthis.item = item;\n\t}", "protected void setItemPrice(Double itemPrice) {\n this.itemPrice = itemPrice;\n }", "@Column(length = 2048)\r\n @PlaceHolder(key = \"schema\")\r\n public String getUrlPath() {\r\n return urlPath;\r\n }", "public void setUrl(String url) {\n\t\turl = url == null ? null : url.trim();\n\n\t\tsetField(\"url\", url);\n\t}", "@IcalProperty(pindex = PropertyInfoIndex.URL,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true,\n freeBusyProperty = true)\n public void setLink(final String val) {\n link = val;\n }", "public void setUrl(String url) {\n\t\tthis.url = url == null ? null : url.trim();\n\t}", "@JsonProperty(\"ProductURL\")\n public String getProductURL() {\n return productURL;\n }", "@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public void setURL(@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n String inURL);", "@Test\n void setUrl() {\n g.setUrl(url);\n assertEquals(url, g.getUrl(), \"URL mismatch\");\n }", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "protected void updateItemTx(HomeItemImpl item)\n\t{\n\t\tString sql = \"UPDATE HOME_ITEM SET SITE=?, PUBLISHED=?, RELEASE_DATE=?, SOURCE=?, TITLE=?, CONTENT=?, URL=?, DIMENSIONS=?, ALT=?, CREATED_BY=?, CREATED_ON=?, MODIFIED_BY=?, MODIFIED_ON=? WHERE ID=?\";\n\n\t\tObject[] fields = new Object[14];\n\t\tint i = 0;\n\t\tfields[i++] = item.getSite().getId();\n\t\tfields[i++] = item.getPublished();\n\t\tfields[i++] = item.getReleaseDate();\n\t\tfields[i++] = item.getSource().getCode();\n\t\tfields[i++] = item.getTitle();\n\t\tfields[i++] = item.getContentReferenceId();\n\t\tfields[i++] = item.getUrl();\n\t\tfields[i++] = item.getDimensions();\n\t\tfields[i++] = item.getAlt();\n\t\tfields[i++] = item.getCreatedBy().getId();\n\t\tfields[i++] = item.getCreatedOn();\n\t\tfields[i++] = item.getModifiedBy().getId();\n\t\tfields[i++] = item.getModifiedOn();\n\n\t\tfields[i++] = item.getId();\n\n\t\tsqlService().update(sql, fields);\n\t}", "public void setUrl(String url) {\n this.url = url;\n }", "public void setURL(String url) {\n\t\tthis.url = url;\n\t}", "public void xsetUrlKey(org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlKey urlKey)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlKey target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlKey)get_store().find_attribute_user(URLKEY$0);\r\n if (target == null)\r\n {\r\n target = (org.biocatalogue.x2009.xml.rest.TagsParameters.Sort.UrlKey)get_store().add_attribute_user(URLKEY$0);\r\n }\r\n target.set(urlKey);\r\n }\r\n }", "public void setURLObject(URL url) {\n\t\tthis.url = url;\n\t}", "public void setItem(\r\n @NonNull\r\n final List<SalesOrderItem> value) {\r\n if (toItem == null) {\r\n toItem = Lists.newArrayList();\r\n }\r\n toItem.clear();\r\n toItem.addAll(value);\r\n }", "private void updateItem(Item item) throws SQLException\n {\n int itemId = item.getId();\n logger.debug(\"Updating Item with id \" + itemId + \"...\");\n try(Statement statement = connection.createStatement())\n {\n String sql = MessageFormat.format(\"UPDATE Items SET (title, description, price) = ({0}, {1}, {2}) WHERE id = {3}\",\n escapeStringValue(item.getTitle()), escapeStringValue(item.getDescription()), item.getPrice(), itemId);\n statement.addBatch(sql);\n statement.addBatch(\"DELETE FROM Items_Locations WHERE item_id = \" + itemId);\n statement.executeBatch();\n addItemQuantitiesPerLocation(item);\n }\n logger.debug(\"Updated Item successfully.\");\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setURL(String aURL)\n{\n if(RMUtils.equals(aURL, getURL())) return; // If value already set, just return\n Object oldValue = put(\"RMShapeURL\", RMStringUtils.min(aURL)); // Cache old value\n firePropertyChange(\"RMShapeURL\", oldValue, aURL, -1); // Set new value and fire PropertyChange\n}", "public String generateURL(XYDataset dataset, int series, int item) { return getURL(series, item); }", "@ApiModelProperty(value = \"website or ecommerce URL\")\n @JsonProperty(\"url\")\n public String getUrl() {\n return url;\n }", "public void setUrl(String url) {\n\t\tthis.url = utf8URLencode(url);\n\t}", "public void setImgUrl(String imgUrl) {\r\n this.imgUrl = imgUrl;\r\n }" ]
[ "0.6392612", "0.5665146", "0.55747396", "0.544376", "0.53782445", "0.5376989", "0.52337265", "0.51925474", "0.51836723", "0.5080247", "0.5077796", "0.50396186", "0.4996698", "0.49628714", "0.49597853", "0.49464074", "0.49242315", "0.4920189", "0.48912737", "0.48672125", "0.48595354", "0.48585796", "0.48544595", "0.4850615", "0.48409694", "0.48242894", "0.48202413", "0.47948223", "0.47878587", "0.47859058", "0.47820514", "0.47741592", "0.47688517", "0.4756698", "0.47485402", "0.47485402", "0.47424227", "0.47421384", "0.47406593", "0.47334898", "0.47334898", "0.47332132", "0.4729759", "0.47241905", "0.47135302", "0.47099847", "0.46972528", "0.46972528", "0.4683085", "0.46791524", "0.46777472", "0.46739185", "0.4670654", "0.46701604", "0.46647605", "0.46638963", "0.46591052", "0.46571195", "0.46555984", "0.4654026", "0.46536878", "0.4652649", "0.4650282", "0.46423078", "0.4629527", "0.4629527", "0.4629527", "0.46282846", "0.46282846", "0.46262226", "0.4619031", "0.46157676", "0.46074483", "0.46074015", "0.4604148", "0.46020293", "0.46009436", "0.4600031", "0.45978376", "0.4589461", "0.45876142", "0.458654", "0.45854878", "0.45854402", "0.4582252", "0.45801052", "0.4578832", "0.45663995", "0.45663995", "0.45663995", "0.45663995", "0.45663995", "0.45663995", "0.45663995", "0.45663995", "0.4561428", "0.45597684", "0.4557348", "0.45538393", "0.4552489" ]
0.7250964
0
This method was generated by MyBatis Generator. This method returns the value of the database column eshop_order_item.product_id
public String getProductId() { return productId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getProduct_id() {\r\n\t\treturn product_id;\r\n\t}", "public int getProduct_id() {\n\t\treturn product_id;\n\t}", "public Integer getProductId() {\r\n return productId;\r\n }", "public Integer getProductId() {\r\n return productId;\r\n }", "public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public String getProduct_id() {\n return product_id;\n }", "public String getProduct_id() {\n return product_id;\n }", "public Integer getProductId() {\n\t\treturn productId;\n\t}", "@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}", "public int getProductId() {\n return productId;\n }", "public int getProductId() {\n return productId;\n }", "public Long getProductId() {\n\t\treturn productId;\n\t}", "public String getProductid() {\n return productid;\n }", "public String getProductID() {\r\n return productID;\r\n }", "public int getProductId() {\n\t\treturn productId;\n\t}", "public String getProductId() {\r\n\t\treturn productId;\r\n\t}", "protected String getProductId() {\n return productId;\n }", "public int getM_Product_ID();", "public int getM_Product_ID();", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}", "public String getProductoId() {\n\t\treturn productoId;\n\t}", "public short getIdProduct() {\r\n\t\treturn idProduct;\r\n\t}", "private int getProductIdFromDatabase() throws ClassNotFoundException, SQLException\r\n {\n String randomKey = Helper.getRandomString();\r\n \r\n //Importiamo il driver di mysql\r\n \r\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\r\n //Tramite l'oggetto conn, stiamo creando la connessione al database \r\n Connection con = Helper.getDatabaseConnection();\r\n \r\n //L'oggetto stmt esegue fisicamente la query sul db\r\n Statement stmt=con.createStatement();\r\n //Genero la query da eseguire\r\n String query = \"INSERT INTO products (price,name,randomkey) VALUES ('\" + this.price + \"','\" + this.name + \"','\" + randomKey + \"')\";\r\n //Eseguo la query di inserimento sul DB\r\n stmt.executeUpdate(query);\r\n \r\n //Genero la query che estrae l'id della macchinetta appena inserita\r\n query = \"SELECT products_id FROM products WHERE randomkey='\" + randomKey + \"'\";\r\n //Estraggo i dati della query, associati ad un oggetto di tipo ResultSet\r\n ResultSet rs=stmt.executeQuery(query);\r\n \r\n //Leggo la prima riga dei risultati dello statement\r\n rs.next();\r\n \r\n //Converto in intero il primo campo del resultset relativo alla query precedente\r\n int retvalue =rs.getInt(1);\r\n \r\n //Cancello dal database la randomkey che non mi serve più\r\n query = \"UPDATE products SET randomkey = NULL WHERE products_id = \" + retvalue;\r\n stmt.executeUpdate(query);\r\n \r\n return retvalue;\r\n }", "@Override\n\tpublic int getIdByPhysIdUserIdProductId(int physicianId, int userId, int productId) {\n\t\ttry{\n\t\t\treturn jdbcTemplate.queryForObject(FETCHID_BY_PHYS_USER_PROD, (rs, rownum) -> {\n\t\t\t\treturn rs.getInt(\"appointmentId\");\n\t\t\t\t}, userId, physicianId, productId);\n\t\t\t\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn 0;\n\t}", "@JsonGetter(\"product_id\")\n public Integer getProductId ( ) { \n return this.productId;\n }", "@Override\r\n\tpublic Long getID(ProductIngredientParam param) {\n\t\treturn param.getId();\r\n\t}", "public long getProductStock(Integer product_id) {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tLong row=session.selectOne(\"com.liangyu.entity.Product.getProductStock\",product_id);\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}", "public long getItemShopBasketId();", "public int getOrderProductNum()\r\n {\n return this.orderProductNum;\r\n }", "public Integer getProductUomId() {\n return productUomId;\n }", "public Integer getProductUomId() {\n return productUomId;\n }", "public int getProdId() {\n\t\treturn prodId;\n\t}", "Product getProductByID(Long id);", "public String getProductId() ;", "public Integer getProductAttributeValueId() {\n return productAttributeValueId;\n }", "@Override\r\n\tpublic Product getProduct(int productId) {\n\t\treturn dao.getProduct(productId);\r\n\t}", "public int getProductId(){\n connect();\n int id = 0;\n String sql = \"SELECT MAX(id_producto) FROM productos\";\n ResultSet result = null;\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n result = ps.executeQuery();\n //result = getQuery(sql);\n if(result != null){\n while(result.next()){\n id = result.getInt(1);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return id; \n }", "public Integer getProductTypeId() {\r\n return productTypeId;\r\n }", "public String getProd_id() {\r\n\t\treturn prod_id;\r\n\t}", "public int getIdProducto() {\n return idProducto;\n }", "public String getProductId();", "public int getAD_Tree_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"AD_Tree_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public String getExternalproductid() {\r\n return externalproductid;\r\n }", "public int getM_Product_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Product_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}", "Product getProductDetails(int idproduct) throws DataBaseException;", "@Override\n\tpublic int getProductId(final String producerCode)\n\t{\n\t\tint item = 0;\n\t\ttry\n\t\t{\n\t\t\tdb = dbconnection.getConnection();\n\t\t\tString sql = \"select i.item from item i where producer_code = '\" + producerCode + \"'\";\n\t\t\tps = this.db.prepareStatement(sql);\n\t\t\tProductRset = ps.executeQuery();\n\t\t\tMyLogger.LogMessage(\"ProductDAOImpl.getProductId(): Returning item\"\n\t\t\t\t\t+ \"select i.item from item where producer_code = '\" + producerCode\n\t\t\t\t\t+ \"' returning item\");\n\t\t\twhile (ProductRset.next())\n\t\t\t{\n\t\t\t\titem = ProductRset.getInt(\"item\");\n\t\t\t}\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tMyLogger.Log(\"ProductDAOImpl.getProductId():\", ex.getMessage());\n\t\t}\n\n\t\treturn item;\n\n\t}", "public String getIdProducto() {\n\t\treturn idProducto;\n\t}", "CafeProduct getProductById(final Integer productId);", "public Product getProductFromId(Integer prodId) throws BackendException;", "Product getProductById(Integer productId);", "Product getProductById(Integer productId);", "public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }", "public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "String getProductId();", "@Override\r\n\tpublic Product getProduct(String productId) {\n\t\treturn dao.getProduct(productId);\r\n\t}", "@Override\n\tpublic Product getById(int productId) {\n\t\treturn session.get(Product.class, productId);\n\t}", "public void setProduct_id(int product_id) {\r\n\t\tthis.product_id = product_id;\r\n\t}", "public static Product getProductFromProductId(int temp) {\n\n\t\tProduct productdb = new Product();\n\t\tSession session = factory.openSession();\n\n\t\tTransaction transaction = session.beginTransaction();\n\n\t\tproductdb = (Product) session.get(Product.class, temp);\n\n\t\ttransaction.commit();\n\n\t\treturn productdb;\n\t}", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public Integer getProductCode() {\n\t\treturn productCode;\n\t}", "public List<Product> getProductByID() {\n List<Product> listProduct= productBean.getProductByID(productId);\n return listProduct;\n }", "@Override\n\tpublic int insertProduct(Product product) throws ProductRepositoryException {\n\t\ttry (Connection conn = DriverManager.getConnection(dbUrl, userName, password)) {\n\n\t\t\t// creating statement, returns result-set with the key-values\n\t\t\tPreparedStatement stmt = conn.prepareStatement(INSERT_PRODUCT_STATEMENT, Statement.RETURN_GENERATED_KEYS);\n\n\t\t\tsetCommonParameters(product, stmt);\n\t\t\t// executing the command, result is the count of the affected data-sets\n\t\t\tint rowAffected = stmt.executeUpdate();\n\t\t\tif (rowAffected != 1) {\n\t\t\t\tSystem.out.println(\"No dataset involved with the insert ????\");\n\t\t\t\tthrow new ProductRepositoryException(\"No dataset is involved with the insert.\");\n\t\t\t}\n\n\t\t\t// when everything went right, getting the key\n\t\t\tResultSet keys = stmt.getGeneratedKeys();\n\t\t\tif (keys.next()) {\n\t\t\t\tint id = keys.getInt(1);\n\t\t\t\tSystem.out.printf(\"Object inserted with the new ID=%d\\n\", id);\n\t\t\t\treturn id;\n\t\t\t} else {\n\t\t\t\t// shouldn't happen\n\t\t\t\tSystem.err.printf(\"Object inserted, new ID unknown!\");\n\t\t\t\tthrow new ProductRepositoryException(\"The dataset was inserted but the ID couldn't be identified\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Error when inserting product datatset\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ProductRepositoryException(\"Error inserting the product-datasetz\", e);\n\t\t}\n\t}", "public long getShopBasketId();", "public Product findProduct(int productId) {\n\t\treturn null;\n\t}", "List<ProductItem> findByProduct_Id(Long productId);", "@Override\r\n public int getProductQuantity(Product product) {\r\n int i = 0;\r\n for (Product p : this.productList) {\r\n if (p.getId() == product.getId()) {\r\n return this.productQuantity.get(i);\r\n }\r\n i++;\r\n }\r\n return -1;\r\n }", "Product getProductById(Integer productID);", "@Override\n\t@Transactional\n\tpublic Product getProductById(int productId) {\n\t\tOptional<Product>product = productDAO.findById(productId);\n\t\tif(product.isPresent()) return product.get();\n\t\telse return null;\n\t}", "public void retrieveProductFromDatabase(){\r\n // retrieve product from the database here\r\n System.out.println(\"Product Retrieved using ID --> \" + this.productId);\r\n \r\n }", "@Exclude\n public String getIdProduct() {\n return idProduct;\n }", "@Override\n\tpublic PromotionEntity getByProductId(int appId, int productId) {\n\t\treturn promotionDao.getByProductId(appId,productId);\n\t}", "public void setProductId(Integer productId) {\n\t\tthis.productId = productId;\n\t}", "public void setProductId(int productId) {\n this.productId = productId;\n }", "public void setProductId(int productId) {\n this.productId = productId;\n }", "@Override\n\tpublic Product getById(int id) throws SQLException {\n\t\treturn productDao.getById(id);\n\t}", "public String getProductIdForSKU(String pSkuId){\n String productId = null;\n RepositoryItem sku;\n try {\n sku = getCatalogTools().findSKU(pSkuId);\n \n CatalogProperties catalogProperties = getCatalogTools().getCatalogProperties();\n if (sku != null){\n Collection parentProducts = (Collection) sku.getPropertyValue(catalogProperties.getParentProductsPropertyName());\n if (parentProducts != null && parentProducts.size() > 0){\n // there are parent products, get the first one\n productId = ((RepositoryItem)parentProducts.iterator().next()).getRepositoryId();\n }\n }\n } catch (RepositoryException e) {\n if(isLoggingError()) {\n logError(\"Cannot find SKU \", e);\n }\n }\n return productId;\n }", "public int newProductId() {\n int newId = 0;\n for (Product product : allProducts) {\n if(newId <= product.getId()) {\n newId = product.getId();\n }\n }\n return ++newId;\n }", "public long getPrimaryKey() {\n\t\treturn _telefonoSolicitudProducto.getPrimaryKey();\n\t}", "public void setProductId(String productId) {\n this.productId = productId;\n }", "@Override\n\tpublic Products queryProductbyId(Integer id) {\n\t\treturn (Products)getSqlMapClientTemplate().queryForObject(buildId(SQL_PREFIX, \"queryProductbyId\"),id);\n\t}", "@ManyToOne(fetch=FetchType.LAZY)\r\n\t@JoinColumn(name=\"PID\")\r\n\tpublic Product getProduct() {\r\n\t\treturn this.product;\r\n\t}" ]
[ "0.70988405", "0.7020138", "0.6911321", "0.6911321", "0.6875195", "0.6875195", "0.6875195", "0.6861903", "0.6861903", "0.6861903", "0.6861903", "0.6861903", "0.6861903", "0.6848228", "0.6848228", "0.6745218", "0.66935515", "0.6653076", "0.6653076", "0.66522783", "0.66286665", "0.65946686", "0.65760106", "0.65622723", "0.65408444", "0.65252256", "0.65252256", "0.6518962", "0.6363423", "0.63510734", "0.6291043", "0.6273837", "0.6226006", "0.6181842", "0.6154445", "0.61542475", "0.6138226", "0.6100939", "0.6100939", "0.60723114", "0.6071094", "0.60437936", "0.60417736", "0.60417014", "0.6040566", "0.60076916", "0.59951687", "0.59927976", "0.5965472", "0.5933678", "0.59137183", "0.58986807", "0.5894806", "0.5886109", "0.58788484", "0.5877559", "0.5866107", "0.58651936", "0.58632267", "0.58632267", "0.58605653", "0.58605653", "0.58471864", "0.58471864", "0.58471864", "0.58471864", "0.58471864", "0.58471864", "0.5838225", "0.5830012", "0.5824137", "0.5822844", "0.5812208", "0.58113545", "0.5808214", "0.58037835", "0.5793213", "0.57848173", "0.5761642", "0.5761113", "0.57577467", "0.5751108", "0.5716586", "0.57151365", "0.5708971", "0.57056874", "0.5702505", "0.5686999", "0.5686999", "0.56808186", "0.56755805", "0.5675541", "0.5666643", "0.56603944", "0.5654147", "0.56411403" ]
0.66540474
21
This method was generated by MyBatis Generator. This method sets the value of the database column eshop_order_item.product_id
public void setProductId(String productId) { this.productId = productId == null ? null : productId.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProductId(int productId) {\n this.productId = productId;\n }", "public void setProductId(int productId) {\n this.productId = productId;\n }", "public void setM_Product_ID (int M_Product_ID);", "public void setM_Product_ID (int M_Product_ID);", "public void setProduct_id(int product_id) {\r\n\t\tthis.product_id = product_id;\r\n\t}", "public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }", "public void setProductId(Integer productId) {\r\n this.productId = productId;\r\n }", "public void setProductId(String productId) ;", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n this.productId = productId;\n }", "protected void setProductId(String productId) {\n this.productId = productId;\n }", "public void setProductId(Integer productId) {\n\t\tthis.productId = productId;\n\t}", "public void setProductId(String productId) {\n this.productId = productId;\n }", "public void setProductId(Long productId) {\n\t\tthis.productId = productId;\n\t}", "public void setProductId(String productId) {\r\n\t\tthis.productId = productId;\r\n\t}", "public int getProduct_id() {\r\n\t\treturn product_id;\r\n\t}", "@Override\n\tpublic void setId(long id) {\n\t\t_buySellProducts.setId(id);\n\t}", "public int getProduct_id() {\n\t\treturn product_id;\n\t}", "public void setProductId(int v) throws TorqueException\n {\n \n if (this.productId != v)\n {\n this.productId = v;\n setModified(true);\n }\n \n \n if (aProductRelatedByProductId != null && !(aProductRelatedByProductId.getProductId() == v))\n {\n aProductRelatedByProductId = null;\n }\n \n }", "public Integer getProductId() {\r\n return productId;\r\n }", "public Integer getProductId() {\r\n return productId;\r\n }", "public void setIdProducto(int value) {\n this.idProducto = value;\n }", "public String getProduct_id() {\n return product_id;\n }", "public String getProduct_id() {\n return product_id;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public Integer getProductId() {\n return productId;\n }", "public void setM_Product_ID(int M_Product_ID) {\n\t\tif (M_Product_ID < 1)\n\t\t\tthrow new IllegalArgumentException(\"M_Product_ID is mandatory.\");\n\t\tset_Value(\"M_Product_ID\", new Integer(M_Product_ID));\n\t}", "public void setProduct(entity.APDProduct value);", "public void setProductid(String productid) {\n this.productid = productid == null ? null : productid.trim();\n }", "protected String getProductId() {\n return productId;\n }", "public void setProductID(String ProductID) {\n try {\n if(ProductID!=null)\n this.productID = ProductID;\n else {\n this.productID = \"\";\n throw new SupplyOrderException(\"Invalid Product ID\");\n }\n } catch(SupplyOrderException soe){\n soe.getMessage();\n }\n }", "public int getProductId() {\n return productId;\n }", "public int getProductId() {\n return productId;\n }", "public void updateProductById(Product p, int id) {\n\t\tp.setId(id);\r\n\t\tp.setCreateDate(new java.sql.Date(new Date().getTime()));\r\n\t\tproductMapper.updateProductById(p);\r\n\t}", "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n return productId;\n }", "public String getProductId() {\n return productId;\n }", "public void setProductUomId(Integer productUomId) {\n this.productUomId = productUomId;\n }", "public void setProductUomId(Integer productUomId) {\n this.productUomId = productUomId;\n }", "@JsonSetter(\"product_id\")\n public void setProductId (Integer value) { \n this.productId = value;\n }", "public void setM_Product_ID(int M_Product_ID) {\n\t\tif (M_Product_ID < 1)\n\t\t\tthrow new IllegalArgumentException(\"M_Product_ID is mandatory.\");\n\t\tset_ValueNoCheck(\"M_Product_ID\", new Integer(M_Product_ID));\n\t}", "public Long getProductId() {\n\t\treturn productId;\n\t}", "public int getProductId() {\n\t\treturn productId;\n\t}", "public Integer getProductId() {\n\t\treturn productId;\n\t}", "public String getProductId() {\r\n\t\treturn productId;\r\n\t}", "public String getProductid() {\n return productid;\n }", "Product updateProductById(Long id);", "public void setProduct(Product product) {\n this.product = product;\n }", "public void setProductRelatedByProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setProductId(((NumberKey) key).intValue());\n }", "void updateOfProductById(long id);", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "public void setProductRelatedByProductId(Product v) throws TorqueException\n {\n if (v == null)\n {\n setProductId( 1000);\n }\n else\n {\n setProductId(v.getProductId());\n }\n aProductRelatedByProductId = v;\n }", "public void setProduct(Product selectedProduct) {\n\t\t\n\t\tthis.modifiedProduct = selectedProduct;\n\n\t\tidField.setText(Integer.toString(modifiedProduct.getId()));\n\t\tproductNameField.setText(modifiedProduct.getName());\n\t\tpriceField.setText(Double.toString(modifiedProduct.getPrice()));\n\t\tinvField.setText(Integer.toString(modifiedProduct.getStock()));\n\t\tmaxField.setText(Integer.toString(modifiedProduct.getMax()));\n\t\tminField.setText(Integer.toString(modifiedProduct.getMin()));\n\t\t\t\t\n\t\tdummyList = modifiedProduct.getAllAssociatedParts();\n\t\tpartListProductTable.setItems(dummyList);\n\t}", "public String getProductID() {\r\n return productID;\r\n }", "public void updateProductIds(String productID){\n\t\t\n\t\tproductIds.add(productID);\n\t}", "@Override\r\n\tpublic int updateProductById(HashMap<String, Object> map) {\n\t\tProduct product = (Product) map.get(\"product\");\r\n\t\tdao.updateProductById(product);\r\n\t\tList<ProductOption> oldList = (List<ProductOption>) map.get(\"oldList\");\r\n\t\tfor(int idx=0; idx<oldList.size(); idx++){\r\n\t\t\toldList.get(idx).setProductId(product.getProductId());\r\n\t\t\tdao.updateProductOptionById(oldList.get(idx));\r\n\t\t}\r\n\t\tList<ProductOption> newList = (List<ProductOption>) map.get(\"newList\");\r\n\t\tif(map.get(\"newList\")!=null){\r\n\t\t\tfor(int idx=0; idx<newList.size(); idx++){\r\n\t\t\t\tnewList.get(idx).setProductId(product.getProductId());\r\n\t\t\t\toptionDao.insertOption(newList.get(idx));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif( map.get(\"image\")!=null){\r\n\t\t\tProductDetailImage image = ((ProductDetailImage) map.get(\"image\"));\r\n\t\t\tdao.updateDetailImageById(image);\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public void setProduct(String product) {\r\n this.product = product;\r\n }", "public void setProductIds(Set<Long> productIdsIn) {\n productIds = productIdsIn;\n }", "public void setM_Product_ID (int M_Product_ID, int C_UOM_ID)\n\t{\n\t\tif (M_Product_ID != 0)\n\t\t\tsuper.setM_Product_ID (M_Product_ID);\n\t\tsuper.setC_UOM_ID(C_UOM_ID);\n\t\tsetM_AttributeSetInstance_ID(0);\n\t\tm_product = null;\n\t}", "@Override\r\n\tpublic void update(Product product) {\n\t\tproductMapper.updateByPrimaryKeySelective(product);\r\n\t}", "public void setProductAttributeValueId(Integer productAttributeValueId) {\n this.productAttributeValueId = productAttributeValueId;\n }", "public void setProduct(Product product) {\n this.product = product;\n this.updateTotalPrice();\n }", "@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}", "public int updateProductDao(Product product) {\n\t\treturn 0;\n\t}", "public void setProduct(java.lang.String product) {\n this.product = product;\n }", "public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public int getM_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public void setProduct(final ProductReference product);", "public void setProductoId(String productoId) {\n\t\tthis.productoId = productoId;\n\t}", "public void setProductToCompare(String productId) {\n mProductToCompare = productId;\n if (isLoggingDebug())\n logDebug(\"ProductToCompare:\" + productId);\n }", "@Override\r\n\tpublic int updateProduct(Product product) {\n\t\treturn 0;\r\n\t}", "Product update(Product product, long id);", "@Override\n\tpublic void update(Product product) throws SQLException {\n\t\tproductDao.update(product);\n\t}", "public String getProductoId() {\n\t\treturn productoId;\n\t}", "public void setProductPrice(Integer productPrice) {\n\t\tthis.productPrice = productPrice;\n\t}", "public void setProductTypeId(Integer productTypeId) {\r\n this.productTypeId = productTypeId;\r\n }", "@UICallout public void setM_Product_ID (String oldM_Product_ID, \n\t\t\tString newM_Product_ID, int windowNo) throws Exception\n\t{\n\t\tif (newM_Product_ID == null || newM_Product_ID.length() == 0)\n\t\t\treturn;\n\t\tint M_Product_ID = Integer.parseInt(newM_Product_ID);\n\t\tif (M_Product_ID == 0)\n\t\t{\n\t\t\tsetM_AttributeSetInstance_ID(0);\n\t\t\treturn;\n\t\t}\n\t\t//\n\t\tsuper.setM_Product_ID(M_Product_ID);\n\t\tsetC_Charge_ID(0);\n\t\t\n\t\t//\tSet Attribute & Locator\n\t\tint M_Locator_ID = 0;\n\t\tif (getCtx().getContextAsInt(EnvConstants.WINDOW_INFO, EnvConstants.TAB_INFO, \"M_Product_ID\") == M_Product_ID\n\t\t\t&& getCtx().getContextAsInt(EnvConstants.WINDOW_INFO, EnvConstants.TAB_INFO, \"M_AttributeSetInstance_ID\") != 0)\n\t\t{\n\t\t\tsetM_AttributeSetInstance_ID(getCtx().getContextAsInt(EnvConstants.WINDOW_INFO, EnvConstants.TAB_INFO, \"M_AttributeSetInstance_ID\"));\n\t\t\t//\tLocator from Info Window - ASI\n\t\t\tM_Locator_ID = getCtx().getContextAsInt(EnvConstants.WINDOW_INFO, EnvConstants.TAB_INFO, \"M_Locator_ID\");\n\t\t\tif (M_Locator_ID != 0)\n\t\t\t\tsetM_Locator_ID(M_Locator_ID);\n\t\t}\n\t\telse\n\t\t\tsetM_AttributeSetInstance_ID(0);\n\t\t//\n\t\tboolean IsSOTrx = getCtx().isSOTrx(windowNo);\n\t\tif (IsSOTrx)\n\t\t\treturn;\n\n\t\t//\tPO - Set UOM/Locator/Qty\n\t\tMProduct product = getProduct();\n\t\tsetC_UOM_ID(product.getC_UOM_ID());\n\t\tBigDecimal QtyEntered = getQtyEntered();\n\t\tsetMovementQty(QtyEntered);\n\t\tif (M_Locator_ID != 0)\n\t\t\t;\t\t//\talready set via ASI\n\t\telse\n\t\t{\n\t\t\tint M_Warehouse_ID = getCtx().getContextAsInt(windowNo, \"M_Warehouse_ID\");\n\t\t\tM_Locator_ID = MProductLocator.getFirstM_Locator_ID (product, M_Warehouse_ID);\n\t\t\tif (M_Locator_ID != 0)\n\t\t\t\tsetM_Locator_ID(M_Locator_ID);\n\t\t\telse\n\t\t\t{\n\t\t\t\tMWarehouse wh = MWarehouse.get (getCtx(), M_Warehouse_ID);\n\t\t\t\tif(wh.isWMSEnabled())\n\t\t\t\t\tM_Locator_ID = wh.getM_RcvLocator_ID();\n\t\t\t\t\n\t\t\t\tif(M_Locator_ID == 0)\n\t\t\t\t\tM_Locator_ID = wh.getDefaultM_Locator_ID();\n\t\t\t\t\n\t\t\t\tsetM_Locator_ID(M_Locator_ID);\n\t\t\t}\n\t\t}\n\t}", "public void setProductColorId(Integer productColorId) {\r\n this.productColorId = productColorId;\r\n }", "public void enterItem(String productId) {\r\n\t\tproduct = ProductCatalog.getProductCatalogMap().get(productId);\r\n\t\tBigDecimal subTotal = fetchSaleLineItem();\r\n\t\ttaxModel.setTaxTypeModelList(TaxCalculationHelper.fetchAllTaxTypes());\r\n\t\ttaxModel.setProductPriceIncludingTax(TaxCalculationHelper.calculatePriceWithTax(subTotal));\r\n\t\tpublishPropertyEventBeforeSale();\r\n\t}", "@Override\n\tpublic void save(Product product) throws SQLException {\n\t\tproductDao.save(product);\n\t}", "public void setProduct(final String productValue) {\n this.product = productValue;\n }", "public void setProduct(Product product){\n //set the product fields\n productIdField.setText(String.valueOf(product.getId()));\n productNameField.setText(product.getName());\n productInvField.setText(String.valueOf(product.getInv()));\n productPriceField.setText(Double.toString(product.getPrice()));\n productMaxField.setText(String.valueOf(product.getMax()));\n productMinField.setText(String.valueOf(product.getMin()));\n\n //set the associated parts to the associatedPartTableView\n tmpAssociatedParts.addAll(product.getAllAssociatedParts());\n associatedPartTableView.setItems(tmpAssociatedParts);\n\n }", "public short getIdProduct() {\r\n\t\treturn idProduct;\r\n\t}", "public void setRelProductId(int v) throws TorqueException\n {\n \n if (this.relProductId != v)\n {\n this.relProductId = v;\n setModified(true);\n }\n \n \n if (aProductRelatedByRelProductId != null && !(aProductRelatedByRelProductId.getProductId() == v))\n {\n aProductRelatedByRelProductId = null;\n }\n \n }", "public void setAD_Tree_Product_ID(int AD_Tree_Product_ID) {\n\t\tif (AD_Tree_Product_ID <= 0)\n\t\t\tset_ValueNoCheck(\"AD_Tree_Product_ID\", null);\n\t\telse\n\t\t\tset_ValueNoCheck(\"AD_Tree_Product_ID\", new Integer(\n\t\t\t\t\tAD_Tree_Product_ID));\n\t}", "public void retrieveProductIndex(int productIndex) {\n this.productIndex = productIndex;\n }", "void setProduct(x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product product);" ]
[ "0.7025234", "0.7025234", "0.7014021", "0.7014021", "0.69851416", "0.6968231", "0.6968231", "0.695249", "0.69450647", "0.69450647", "0.69450647", "0.69450647", "0.69450647", "0.69450647", "0.6902946", "0.6788284", "0.67036617", "0.6617477", "0.6601437", "0.6510071", "0.64845294", "0.64303887", "0.6386414", "0.63517296", "0.63517296", "0.6330429", "0.6306938", "0.6306938", "0.6289922", "0.6289922", "0.6289922", "0.6289922", "0.6289922", "0.6289922", "0.6271849", "0.62623596", "0.62171245", "0.62086594", "0.6197732", "0.61895955", "0.61895955", "0.618706", "0.6185352", "0.6185352", "0.6185352", "0.6185352", "0.6185352", "0.6184983", "0.6184983", "0.61447805", "0.61386144", "0.61332995", "0.61269504", "0.61170673", "0.61088455", "0.60991335", "0.6094098", "0.60890913", "0.60876733", "0.608053", "0.60692525", "0.60609126", "0.6043458", "0.60166454", "0.6014009", "0.5996987", "0.59944385", "0.5920688", "0.59125465", "0.58910054", "0.5875115", "0.58677113", "0.5860206", "0.5818404", "0.5810473", "0.58026934", "0.58026934", "0.58026934", "0.57981217", "0.57711774", "0.5757528", "0.5753867", "0.5745606", "0.57454103", "0.5745384", "0.57423025", "0.57390666", "0.5689572", "0.5637007", "0.56300515", "0.56218797", "0.5620336", "0.56091994", "0.5607949", "0.5603127", "0.5602413", "0.55984294", "0.5590309" ]
0.6492498
22
This method was generated by MyBatis Generator. This method corresponds to the database table eshop_order_item
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", isDel=").append(isDel); sb.append(", updateTime=").append(updateTime); sb.append(", createTime=").append(createTime); sb.append(", orderId=").append(orderId); sb.append(", colorId=").append(colorId); sb.append(", sizeId=").append(sizeId); sb.append(", orderItemName=").append(orderItemName); sb.append(", orderItemProice=").append(orderItemProice); sb.append(", orderItemAmount=").append(orderItemAmount); sb.append(", orderItemUrl=").append(orderItemUrl); sb.append(", productId=").append(productId); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OrderItemDto getOrderItem(long id) throws SQLException;", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "public List<OrderItem> searchOrderItem() throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT * FROM order_Item ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n lista.add(oi);\n }\n \n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "public List<OrderItem> searchOrderItem(int idOrderItem) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT * FROM order_Item WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, idOrderItem);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "public void createSourceOrderItemTable() throws SQLException {\n sourceExecuteWithLog(extraSQLCommand.getCreateTableOrderItem());\n }", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "public void buildItems() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT\"\n + \" EXISTS items (order_id TEXT, item TEXT, FOREIGN KEY (order_id)\"\n + \" REFERENCES orders(id) ON DELETE CASCADE ON UPDATE CASCADE);\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }", "public interface OrderMapper {\n\n //购物车确认订单之后插入订单商品信息(确认,但未发货)\n @Insert(\"insert into `order` ( order_code,order_time,username,goods_code,goods_name,goods_currentPrice,goods_counts,goods_image,goods_singlePrice,goods_totalPrice,goods_remark,goods_status) values (#{order_code},#{order_time},#{username},#{goods_code},#{goods_name},#{goods_currentPrice},#{goods_counts},#{goods_image},#{goods_singlePrice},#{goods_totalPrice},#{goods_remark},#{goods_status})\")\n int insertIntoOrder(Order order);\n\n //根据商品状态(未发货,待接收,待评价,已完成,已取消)查询商品信息\n @Select(\"select *from `order` where goods_status=#{goods_status} and username=#{username} \")\n List<Order> selectOrderByGoodsStatus(Order order) ;\n\n //改变商品订单的状态(根据商品订单和商品状态)\n @Update(\"update `order` set goods_status = #{goods_status} where order_code=#{order_code}\")\n int updateOrderStatus(Order order);\n\n}", "@Override\n public String toString() {\n return \"OrderItems{\" +\n \"itemId='\" + itemId + '\\'' +\n \", itemName='\" + itemName + '\\'' +\n \", itemPrice=\" + itemPrice +\n \", itemQuantity=\" + itemQuantity +\n \", itemAmount=\" + itemAmount +\n '}';\n }", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public List<OrderItem> findAllOrderItem(){\n List<OrderItem> orderItems=findAll();\n return orderItems;\n }", "public void insertOrderedItems(TireList orderedItems){\n for(int i=0; i<orderedItems.listSize(); i++){\n int temp = Integer.parseInt(orderedItems.getTire(i).getStock()) - orderedItems.getTire(i).getQuantity();\n orderedItems.getTire(i).setStock(temp + \"\");\n orderedItems.getTire(i).updateTire();\n sql=\"Insert into OrderedItems (OrderID, TireID, Quantity) VALUES ('\"+newID+\"','\"+orderedItems.getTire(i).getStockID()+\"',\"+orderedItems.getTire(i).getQuantity()+\")\";\n db.insertDB(sql); \n }\n }", "public List<OrderItem> findAllOrderItems()\n\t{\n\t\tList<OrderItem> list=orderItemDAO.findAll();\n\t\treturn list;\n\t}", "public int registerOrderItem(OrderItem i) {\n int ok = 0;\n try {\n String query = \"INSERT INTO order_Item (id_Order_Item, amount, product_id_Product, order_id_Order) VALUES (?, ?, ?, ?) ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n\n st.setInt(1, 0);\n st.setInt(2, i.getAmount());\n st.setInt(3, i.getProductIdProduct());\n st.setInt(4, i.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the insert\n st.close(); //Close the Statment\n con.close(); //Close the connection\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ok;\n }", "@Override\r\n\tpublic Order modelFromResultSet(ResultSet resultSet) throws SQLException {\r\n\t\t\r\n\t\t// build customer\r\n\t\tLong customerId = resultSet.getLong(\"customer_id\");\r\n\t\tCustomer customer = new Customer(customerId);\r\n\t\t\r\n\t\t// build items\r\n\t\tString[] itemArray = resultSet.getString(\"items\").split(\";\");\r\n\t\t\r\n\t\tHashMap<Item, Long> itemMap = new HashMap<>();\r\n\t\t\r\n\t\tArrays.stream(itemArray)\r\n\t\t\t\t.map(s -> s.split(\",\"))\r\n\t\t\t\t.forEach(s -> itemMap.put(\r\n\t\t\t\t\t\tnew Item(Long.parseLong(s[0]), s[1], Double.parseDouble(s[2])), \r\n\t\t\t\t\t\tLong.parseLong(s[3])));\r\n\t\t\r\n\t\tHashMap<Item, Long> sortedItemMap = itemMap.entrySet()\r\n\t\t\t\t.stream()\r\n .sorted(Comparator.comparingLong(e -> e.getKey().getId()))\r\n .collect(Collectors.toMap(Map.Entry::getKey,\r\n Map.Entry::getValue,\r\n (left, right) -> left,\r\n LinkedHashMap::new));\t// sort map after ordering issue from ORDER_BY clause\r\n\t\t\r\n\r\n\t\t// build order\r\n\t\tLong orderId = resultSet.getLong(\"order_id\");\r\n\t\tOrder order = new Order(orderId, customer, sortedItemMap);\r\n\t\t\r\n\t\treturn order;\r\n\t}", "@Override\r\n\tpublic void addItem(Items item) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t List<Items> allItems = new ArrayList<Items>();\r\n\t\t int flag=0;\r\n\t\t try\r\n\t\t {\r\n\t\t\t allItems = session.createQuery(\"from Items\").list();\r\n\t\t\t for (Items item1 : allItems) {\r\n\t\t\t\t\tif(item1.getUserName().equals(item.getUserName()) && item1.getItemName().equals(item.getItemName())){\r\n\t\t\t\t\t\tflag=1;\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You need to choose other name for this task\", \"Error\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t break;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t} \r\n\t\t\t if(flag==0)\r\n\t\t\t {\r\n\t\t\t\t session.beginTransaction();\r\n\t\t\t\t session.save(item);\r\n\t\t\t\t session.getTransaction().commit();\r\n\t\t\t }\r\n\t\t }\r\n\t\t catch (HibernateException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t if(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t }\r\n\t\t finally\r\n\t\t {\r\n\t\t\t if(session != null) \r\n\t\t\t\t{ \r\n\t\t\t\t\tsession.close(); \r\n\t\t\t\t} \r\n\t\t }\t\r\n\t}", "@Override\r\n\tpublic OrderItem createOrderItem(OrderItem newOrderItem) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tsession.save(newOrderItem);\r\n\t\treturn newOrderItem;\r\n\r\n\t}", "@Mapper\r\npublic interface OrderMapper {\r\n /**\r\n * 添加库存\r\n *\r\n * @param order\r\n */\r\n void addOrder(Order order);\r\n\r\n /**\r\n * 获得所有库存\r\n *\r\n * @return\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods WHERE or_supplier_id=supplier_id and or_goods_id=su_id and or_check=3;\")\r\n List<Order> getList();\r\n\r\n\r\n @Select(\"SELECT COUNT(*) FROM ms_sale WHERE sale_check =1;\")\r\n Integer getCount();\r\n\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods WHERE or_supplier_id=supplier_id and or_goods_id=su_id and or_check=3 limit #{rows} offset #{offset};;\")\r\n List<Order> getListByPage(@Param(\"rows\") Integer rows, @Param(\"offset\") Integer offset);\r\n\r\n\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods WHERE or_supplier_id=supplier_id and or_goods_id=su_id and or_check=3 LIMIT #{row} OFFSET #{page};\")\r\n List<Order> getListByPageAndRow(@Param(\"row\") Integer row, @Param(\"page\") Integer page);\r\n\r\n /**\r\n * 获得公司进货记录\r\n */\r\n @Select(\"SELECT * FROM gongxiao.repertory WHERE or_id=#{id}\")\r\n Order getById(Integer id);\r\n\r\n /**\r\n * 获得库存物品信息\r\n *\r\n * @param val\r\n * @return\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,ms_goods WHERE ms_order.or_goods_id =#{val} and or_goods_id=su_id and or_supplier_id=supplier_id and or_check='3';\")\r\n List<Order> getGoodsInfoInBound(Integer val);\r\n\r\n /**\r\n * 设置发票状况\r\n *\r\n * @param key\r\n */\r\n @Update(\"UPDATE `gongxiao`.`ms_order` SET `or_invoice`=#{value} WHERE `or_id`=#{key};\")\r\n void setInvoice(@Param(\"key\") Integer key, @Param(\"value\") Integer value);\r\n\r\n /**\r\n * 结款\r\n *\r\n * @param id\r\n * @return\r\n */\r\n @Update(\"UPDATE `gongxiao`.`ms_order` SET `or_payment`=6 WHERE `or_id`=#{id};\")\r\n void setPayment(Integer id);\r\n\r\n /**\r\n * 获得待审核进货信息\r\n *\r\n * @param check\r\n * @return\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods WHERE or_supplier_id=supplier_id and or_goods_id=su_id and ms_order.or_check=#{check};\")\r\n List<Order> getOrderWhereCheck(Integer check);\r\n\r\n /**\r\n * 删除库存\r\n *\r\n * @param id\r\n */\r\n @Delete(\"DELETE FROM `gongxiao`.`ms_order` WHERE `or_id`=#{id};\")\r\n void deleteOrderById(Integer id);\r\n\r\n /**\r\n * 获得库存状态\r\n *\r\n * @return\r\n */\r\n @Select(\"select su_name,SUM(or_number) as su_sum from repertory group by su_name;\")\r\n List<Statistics> getStatistics();\r\n\r\n /**\r\n * 查找相似物品的库存信息\r\n *\r\n * @param like\r\n * @return\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods where ms_goods.su_name like #{like} and or_supplier_id=supplier_id and or_check='3' and or_goods_id = su_id\")\r\n List<Order> getLikeOrderInBound(String like);\r\n\r\n /**\r\n * 查找货号的库存信息\r\n *\r\n * @param like\r\n * @return\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods where ms_goods.su_No like #{like} and or_supplier_id=supplier_id and or_check='3' and or_goods_id = su_id\")\r\n List<Order> getListByNo(String like);\r\n\r\n\r\n void updateOrderNumInBound(UpdateItem updateItem);\r\n\r\n /**\r\n * 审核入库\r\n */\r\n @Update(\"UPDATE `gongxiao`.`ms_order` SET `or_check`= 3 WHERE `or_id`=#{id};\")\r\n void orderInBound(Integer id);\r\n\r\n /**\r\n * 刷新库存\r\n */\r\n void refreshOrderInBound();\r\n\r\n /**\r\n * 根据日期和供货商获得库存信息\r\n *\r\n * @param item\r\n * @return\r\n */\r\n List<Order> getOrderByDateAndSupplierId(OfIdAndDateItem item);\r\n\r\n /**\r\n * 获得仓库预警库存\r\n *\r\n * @return\r\n */\r\n @Select(\"SELECT * FROM gongxiao.repertory WHERE or_number<=or_alarm;\")\r\n List<Order> getBoundAlarm();\r\n\r\n /**\r\n * 获得仓库预期\r\n * 只显示库存大于0的,小鱼0的不需要显示!\r\n *\r\n * @param time\r\n * @return\r\n */\r\n @Select(\"SELECT * FROM gongxiao.repertory WHERE or_deaddate<=#{s} and or_number >0;\")\r\n List<Order> getListByDead(Date time);\r\n\r\n /**\r\n * 重设预警值\r\n *\r\n * @param val\r\n * @param key\r\n */\r\n @Update(\"UPDATE `gongxiao`.`ms_order` SET `or_alarm`=#{val} WHERE `or_id`=#{key};\")\r\n void resetAlarm(@Param(\"val\") Integer val, @Param(\"key\") Integer key);\r\n\r\n /**\r\n * 根据公司ID获得库存信息\r\n */\r\n @Select(\"SELECT ms_order.*,ms_supplier.supplier_office,ms_goods.* FROM gongxiao.ms_order,gongxiao.ms_supplier,gongxiao.ms_goods where or_supplier_id=supplier_id and or_check='3' and or_goods_id = su_id and supplier_id=#{id}\")\r\n List<Order> getListBySupId(Integer id);\r\n\r\n /**\r\n * 获得公司库存金额\r\n *\r\n * @return\r\n */\r\n @Select(\"SELECT sum(or_price*or_number) FROM gongxiao.ms_order WHERE or_check =3;\")\r\n Double getAmount();\r\n\r\n /**\r\n * 修改备注\r\n */\r\n @Update(\"UPDATE `gongxiao`.`ms_order` SET `or_other`=#{val} WHERE `or_id`=#{key};\")\r\n void updateOther(@Param(\"val\") String val, @Param(\"key\") Integer key);\r\n}", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public List<OrderItem> searchOrderIdOrder(int OrderIdOrder) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT order_Item.*, product.*, category.* FROM order_Item, product, category WHERE order_Item.product_id_Product = product.id_Product AND product.category_id_Category = category.id_Category AND order_Item.order_id_Order = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, OrderIdOrder);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n oi.setIdProduct(rs.getInt(\"id_Product\"));\n oi.setCategoryIdCategory(rs.getInt(\"category_id_Category\"));\n oi.setColor(rs.getString(\"color\"));\n oi.setFinishingProcess(rs.getString(\"finishing_Process\"));\n oi.setCubaType(rs.getString(\"cuba_Type\"));\n oi.setDescription(rs.getString(\"description\"));\n oi.setStock(rs.getInt(\"stock\"));\n oi.setUnitaryValue(rs.getDouble(\"unitary_Value\"));\n oi.setImageLink(rs.getString(\"image_Link\"));\n\n oi.setIdCategory(rs.getInt(\"id_Category\"));\n oi.setCategory(rs.getString(\"category\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "@Override\n\tpublic int update(OrderItem objectToUpdate) throws SQLException {\n\t\treturn 0;\n\t}", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public OrderItem insertOrderItem(OrderItem orderItem)\n\t{\n\t\tOrderItem orderIt=orderItemDAO.insert(orderItem);\n\t\tif(findOrderItemById(orderIt.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat nu a putut fi inserat\");\n\t\t\treturn null;\n\t\t}\n\t\treturn orderIt;\n\t}", "public TireList findOrderedItems(){\n \n try{\n sql = \"Select * From OrderedItems Where OrderID = \" + getOrderID();\n ResultSet resultSetOrder = db.SelectDB(sql);\n \n Tire orderedTire;\n while(resultSetOrder.next()){\n orderedTire = new Tire();\n orderedTire.setQuantity(resultSetOrder.getInt(\"Quantity\"));\n ResultSet resultSetTire = db.SelectDB(\"Select * From Tire Where TireID = \" + resultSetOrder.getString(\"TireID\"));\n while(resultSetTire.next()){\n orderedTire.setStockID(resultSetTire.getString(\"TireID\"));\n orderedTire.setType(resultSetTire.getString(\"TireType\"));\n orderedTire.setSize(resultSetTire.getString(\"TireSize\"));\n orderedTire.setBrand(resultSetTire.getString(\"Brand\"));\n orderedTire.setStock(resultSetTire.getString(\"Stock\"));\n orderedTire.setPrice(resultSetTire.getString(\"Price\"));\n orderedTire.setVehicleType(resultSetTire.getString(\"VehicleType\"));\n orderedItems.addItem(orderedTire);\n }\n }\n }\n catch(SQLException e){\n System.out.println(\"Error generating list of Orders: \" + e);\n }\n return orderedItems;\n }", "public static void createItemTable() {\n\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\t// Drop table if already exists and as per SQL query available in\n\t\t\t// Query.xml\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_DROP_ITEM_TABLE));\n\t\t\t// Create new items table as per SQL query available in\n\t\t\t// Query.xml\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_CREATE_ITEM_TABLE));\n\t\t\t// Insert records into item table in the beginning as per SQL query available in\n\t\t\t// Query.xml\t\t\t\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_INSERT_BEGIN_ITEM_TABLE));\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t}\n\t}", "public static void createItemTable() {\n\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\t// Drop table if already exists and as per SQL query available in\n\t\t\t// Query.xml\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_DROP_ITEM_TABLE));\n\t\t\t// Create new items table as per SQL query available in\n\t\t\t// Query.xml\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_CREATE_ITEM_TABLE));\n\t\t\t// Insert records into item table in the beginning as per SQL query available in\n\t\t\t// Query.xml\t\t\t\n\t\t\tstatement.executeUpdate(QueryUtil.queryByID(CommonConstants.QUERY_ID_INSERT_BEGIN_ITEM_TABLE));\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t}\n\t}", "public VendingMachineDaoInMemImpl() {\n Item itemOne = new Item(1, \"Snickers\", new BigDecimal(1.85).setScale(2, RoundingMode.HALF_UP),9);\n Item itemTwo = new Item(2, \"M&Ms\", new BigDecimal(1.50).setScale(2, RoundingMode.HALF_UP),2); \n Item itemThree = new Item(3, \"Pringles\", new BigDecimal(2.10).setScale(2, RoundingMode.HALF_UP),5);\n Item itemFour = new Item(4, \"Reese's\", new BigDecimal(1.85).setScale(2, RoundingMode.HALF_UP), 4);\n Item itemFive = new Item(5, \"Pretzels\", new BigDecimal(1.25).setScale(2, RoundingMode.HALF_UP), 9);\n Item itemSix = new Item(6, \"Twinkies\", new BigDecimal(1.95).setScale(2, RoundingMode.HALF_UP), 3);\n Item itemSeven = new Item(7, \"Doritos\", new BigDecimal(1.75).setScale(2, RoundingMode.HALF_UP), 11);\n Item itemEight = new Item(8, \"Almond Joy\", new BigDecimal(1.85).setScale(2, RoundingMode.HALF_UP),0);\n Item itemNine = new Item(9, \"Trident\", new BigDecimal(1.95).setScale(2, RoundingMode.HALF_UP), 6);\n \n allItems.put(1, itemOne);\n allItems.put(2, itemTwo);\n allItems.put(3, itemThree);\n allItems.put(4, itemFour);\n allItems.put(5, itemFive);\n allItems.put(6, itemSix);\n allItems.put(7, itemSeven);\n allItems.put(8, itemEight);\n allItems.put(9, itemNine);\n }", "public OrderItem updateOrderItem(OrderItem orderItem)\n\t{\n\t\tif(findOrderItemById(orderItem.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat care se incearca updatat nu exista\");\n\t\t\treturn null;\n\t\t}\n\t\tOrderItem orderIt=orderItemDAO.update(orderItem);\n\t\treturn orderIt;\n\t}", "List<LineItem> listLineItemByOrderId(Integer orderId);", "@Test\n\tpublic void testMapBookOrderItemToBookOrderItemEntity() {\n\t\t// Given\n\t\tBookOrderItem bookOrderItem = new BookOrderItem();\n\t\tbookOrderItem.setQuantity(mockValues.nextInteger());\n\t\tbookOrderItem.setPrice(mockValues.nextBigDecimal());\n\n\t\tBookOrderItemEntity bookOrderItemEntity = new BookOrderItemEntity();\n\t\t\n\t\t// When\n\t\tbookOrderItemServiceMapper.mapBookOrderItemToBookOrderItemEntity(bookOrderItem, bookOrderItemEntity);\n\t\t\n\t\t// Then\n\t\tassertEquals(bookOrderItem.getQuantity(), bookOrderItemEntity.getQuantity());\n\t\tassertEquals(bookOrderItem.getPrice(), bookOrderItemEntity.getPrice());\n\t}", "@SuppressWarnings(\"all\")\npublic interface I_i_ordertrx_temp \n{\n\n /** TableName=i_ordertrx_temp */\n public static final String Table_Name = \"i_ordertrx_temp\";\n\n /** AD_Table_ID=1000126 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name count_order */\n public static final String COLUMNNAME_count_order = \"count_order\";\n\n\t/** Set count_order\t */\n\tpublic void setcount_order (int count_order);\n\n\t/** Get count_order\t */\n\tpublic int getcount_order();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name i_ordertrx_temp_ID */\n public static final String COLUMNNAME_i_ordertrx_temp_ID = \"i_ordertrx_temp_ID\";\n\n\t/** Set Semeru Order Temporary\t */\n\tpublic void seti_ordertrx_temp_ID (int i_ordertrx_temp_ID);\n\n\t/** Get Semeru Order Temporary\t */\n\tpublic int geti_ordertrx_temp_ID();\n\n /** Column name insert_order */\n public static final String COLUMNNAME_insert_order = \"insert_order\";\n\n\t/** Set insert_order\t */\n\tpublic void setinsert_order (boolean insert_order);\n\n\t/** Get insert_order\t */\n\tpublic boolean isinsert_order();\n\n /** Column name order_detail */\n public static final String COLUMNNAME_order_detail = \"order_detail\";\n\n\t/** Set order_detail\t */\n\tpublic void setorder_detail (String order_detail);\n\n\t/** Get order_detail\t */\n\tpublic String getorder_detail();\n\n /** Column name orders */\n public static final String COLUMNNAME_orders = \"orders\";\n\n\t/** Set orders\t */\n\tpublic void setorders (String orders);\n\n\t/** Get orders\t */\n\tpublic String getorders();\n\n /** Column name pos */\n public static final String COLUMNNAME_pos = \"pos\";\n\n\t/** Set pos\t */\n\tpublic void setpos (String pos);\n\n\t/** Get pos\t */\n\tpublic String getpos();\n\n /** Column name Result */\n public static final String COLUMNNAME_Result = \"Result\";\n\n\t/** Set Result.\n\t * Result of the action taken\n\t */\n\tpublic void setResult (String Result);\n\n\t/** Get Result.\n\t * Result of the action taken\n\t */\n\tpublic String getResult();\n\n /** Column name transaction_id */\n public static final String COLUMNNAME_transaction_id = \"transaction_id\";\n\n\t/** Set transaction_id\t */\n\tpublic void settransaction_id (int transaction_id);\n\n\t/** Get transaction_id\t */\n\tpublic int gettransaction_id();\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n}", "@Override\r\n\tpublic int addOrder(Order order, List<OrderItem> OrderItem, OrderShipping orderShipping) {\n\t\treturn odi.addOrder(order, OrderItem, orderShipping);\r\n\t}", "public OrderItem() {}", "@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }", "@Test\n\tpublic void testMapBookOrderItemEntityToBookOrderItem() {\n\t\t// Given\n\t\tBookOrderItemEntity bookOrderItemEntity = new BookOrderItemEntity();\n\t\tbookOrderItemEntity.setQuantity(mockValues.nextInteger());\n\t\tbookOrderItemEntity.setPrice(mockValues.nextBigDecimal());\n\t\t\n\t\t// When\n\t\tBookOrderItem bookOrderItem = bookOrderItemServiceMapper.mapBookOrderItemEntityToBookOrderItem(bookOrderItemEntity);\n\t\t\n\t\t// Then\n\t\tassertEquals(bookOrderItemEntity.getQuantity(), bookOrderItem.getQuantity());\n\t\tassertEquals(bookOrderItemEntity.getPrice(), bookOrderItem.getPrice());\n\t}", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "List<List<Order>> getAllOrdersByQuantity() throws OrderBookOrderException;", "public static int insert(OrderItems o) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n System.out.println(\"DBSetup @ LINE 101\");\n String query\n = \"INSERT INTO orderItem (orderNumber, productCode, quantity) \"\n + \"VALUES (?, ?, ?)\";\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, o.getOrderNumber());\n ps.setString(2, o.getProduct().getProductCode());\n ps.setInt(3, o.getQuantity());\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "public static void addOrderedItem() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Adding ordered item************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\n\t\tItemManager itemManager = new ItemManager();\n\t\tList listOfItems = itemManager.onStartUp();\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tItem item = null;\n\t\tOrderedItem orderedItem = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (listOfItems.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no items!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to add the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tdo {\n\t\t\t\tfor (i = 0; i < listOfItems.size(); i++) {\n\t\t\t\t\titem = (Item) listOfItems.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \" + item.getId()\n\t\t\t\t\t\t\t+ \" | Name: \" + item.getName() + \" | Price: $\"\n\t\t\t\t\t\t\t+ item.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.print(\"Select an item to add into order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\titem = (Item) listOfItems.get(choice - 1);\n\n\t\t\t\t\torderedItem = new OrderedItem();\n\t\t\t\t\torderedItem.setItem(item);\n\t\t\t\t\torderedItem.setOrder(order);\n\t\t\t\t\torderedItem.setPrice(item.getPrice());\n\n\t\t\t\t\torder.addOrderedItem(orderedItem);\n\n\t\t\t\t\tcheck = orderedItemManager.createOrderedItem(orderedItem);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Item added into order successfully!\");\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out.println(\"Failed to add item into order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of adding items************\");\n\t}", "public List<Item> createOrderItem(Long orderId, Long itemId) {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"INSERT INTO order_items(order_id, item_id) VALUES ('\" + orderId \n\t\t\t\t+ \"','\" + itemId + \"')\");\n\t\t\treturn readLatestOrderItem();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Order create(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders(customer_id) values(%d)\",\r\n\t\t\t\t\torder.getCustomer().getId()));\r\n\t\t\t\tHashMap<Item, Long> items = order.getItems();\r\n\t\t\t\tfor (Entry<Item, Long> entry : items.entrySet()) {\r\n\t\t\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders_items(order_id, item_id, quantity) \"\r\n\t\t\t\t\t\t\t+ \"values(last_insert_id(), %d, %d)\", entry.getKey().getId(), entry.getValue()));\r\n\t\t\t\t}\r\n\t\t\treturn readLatest();\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}", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "@Override\r\n\tpublic void insertEncoreItem2(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem2\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item2\");\r\n\t}", "@Select({\n \"select\",\n \"id, orderid, name, price, userid\",\n \"from order\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @ResultMap(\"BaseResultMap\")\n Order selectByPrimaryKey(Long id);", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethod(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryNoClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}", "@Override\r\n\tpublic List<Top5OrderItems> allorderItems() {\n\t\tList<Object[]> list=null;\r\n\t\tList<Top5OrderItems> top5OrderItems=null;\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlist=boardDao.allorderItems();\r\n\t\t\ttop5OrderItems=new ArrayList<Top5OrderItems>();\r\n\t\t\tIterator<Object[]> iterator=list.iterator();\r\n\t\t\twhile(iterator.hasNext())\r\n\t\t\t{\r\n\t\t\t\tObject[] objects=(Object[])iterator.next();\r\n\t\t\t\tTop5OrderItems orderItems=new Top5OrderItems();\r\n\t\t\t\torderItems.setMaterial((String)objects[0]);\r\n\t\t\t\torderItems.setQuantity(Float.valueOf((String)objects[1]));\r\n\t\t\t\ttop5OrderItems.add(orderItems);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t}\r\n\t\treturn top5OrderItems;\r\n\t}", "public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }", "@Test\n public void ItemMapperTest(){\n// item.setItemCode(UUID.randomUUID().toString().substring(0,5));\n// itemMapper.updateByPrimaryKeySelective(item);\n// System.out.println(item.toString());\n\n ItemMapper itemMapper1 = sqlSession.getMapper(ItemMapper.class);\n//\n for(int i=22;i<25;i++){\n Item item1 = new Item(UUID.randomUUID().toString().substring(0,5),\"米\",\"无\",new Date(),new Date());\n// item1.setItemId((long)i);\n// Item item1 = new Item();\n item1.setItemId((long)i);\n item1.setItemCode(\"ITEM00\"+i);\n itemMapper1.insertBatch(item1);\n// System.out.println(itemMapper1.selectByPrimaryKey((long)i).toString());\n }\n }", "@Mapper\npublic interface OrderMapper {\n @Insert(\" insert into t_order (order_id, order_type, city_id, \\n\" +\n \" platform_id, user_id, supplier_id, \\n\" +\n \" goods_id, order_status, remark, \\n\" +\n \" create_by, create_time, update_by, \\n\" +\n \" update_time)\\n\" +\n \" values (#{orderId}, #{orderType}, #{cityId}, \\n\" +\n \" #{platformId}, #{userId}, #{supplierId}, \\n\" +\n \" #{goodsId}, #{orderStatus}, #{remark}, \\n\" +\n \" #{createBy}, #{createTime}, #{updateBy}, \\n\" +\n \" #{updateTime})\")\n /**\n * statement=\"\":表示定义的子查询语句\n * before=true:表示在之前执行,booler类型的,所以为true\n * keyColumn=\"myNo\":表示查询所返回的类名\n * resultType=int.class:表示返回值得类型\n * keyProperty=\"empNo\" :表示将该查询的属性设置到某个列中,此处设置到empNo中\n * //进行添加、修改等操作的时候只能返回数字,而不能返回java类或其他!\n * // SELECT LAST_INSERT_ID() 适合那种主键是自增的类型\n * // 1 insert语句需要写id字段了,并且 values里面也不能省略\n * // 2 selectKey 的order属性需要写成BEFORE 因为这样才能将生成的uuid主键放入到model中,\n * // 这样后面的insert的values里面的id才不会获取为空\n * // 跟自增主键相比就这点区别,当然了这里的获取主键id的方式为 select uuid()\n */\n @SelectKey(keyColumn = \"id\", keyProperty = \"id\", resultType = long.class, before = false, statement = \"select last_insert_id()\")\n long insertSelective(Order record);\n\n @Update(\"update t_order set order_status=#{status},update_by=#{updateBy},update_time=#{updateTime} where order_id=#{orderId}\")\n int updateOrderStatus(@Param(\"orderId\") String orderId, @Param(\"status\") String status, @Param(\"updateBy\") String updateBy, @Param(\"updateTime\") Date updateTime);\n\n @Select(\"select *from t_order\\n\" +\n \" where order_id = #{orderId}\")\n Order selectByPrimaryKey(String orderId);\n}", "public OrderItem insertOrderItem(OrderItem oi) {\n insert(oi);\n return oi;\n }", "public void add( Order item ) {\n\t\tsuper.internalAdd(item);\n\t}", "@Override\r\n\tpublic void updateItem(Items updateItem, String itemNameToUpdate) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t try\r\n\t\t {\r\n\t\t session.beginTransaction();\r\n\t\t Query query = session.createQuery(\"from Items where userName = :user AND ItemName = :item\");\r\n\t\t query.setParameter(\"user\", updateItem.getUserName());\r\n\t\t Items ifItemExist =(Items) query.setParameter(\"item\", itemNameToUpdate).uniqueResult();\r\n\t\t \r\n\t\t long id=0;\r\n\t\t if(ifItemExist != null){\r\n\t\t \tid = ifItemExist.getId();\r\n\t\t }\r\n\t\t System.out.println(id + \" \" + ifItemExist );\r\n\t\t Query query2 = session.createQuery(\"UPDATE Items SET status = :stat , itemName = :item , userName= :user , priority= :prio , dueDate= :date , note= :note\" +\r\n\t\t \" where id = :d\");\r\n\t\t query2.setParameter(\"stat\", updateItem.getStatus());\r\n\t\t query2.setParameter(\"item\", updateItem.getItemName());\r\n\t\t query2.setParameter(\"user\", updateItem.getUserName());\r\n\t\t query2.setParameter(\"prio\", updateItem.getPriority());\r\n\t\t query2.setParameter(\"date\", updateItem.getDueDate());\r\n\t\t query2.setParameter(\"note\", updateItem.getNote());\r\n\t\t query2.setParameter(\"d\", id);\r\n\t\t query2.executeUpdate();\r\n\t\t session.getTransaction().commit();\r\n\t\t \r\n\t\t }\r\n\t\t catch (HibernateException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t if(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t }\r\n\t\t finally\r\n\t\t {\r\n\t\t\t if(session != null) \r\n\t\t\t\t{ \r\n\t\t\t\t\tsession.close(); \r\n\t\t\t\t}\r\n\t\t } \r\n\r\n\t}", "public void addOrderItem(OrderItem item)\r\n\t{\r\n\t\torderItemList.add(item);\r\n\t}", "@Override\n\tpublic List<OrderVO> orderList() throws Exception {\n\t\treturn session.selectList(\"orderMapper.orderList\");\n\t}", "public List<Item> readAllOrderItem(Long orderId) {\n\n\t\tString query = \"SELECT oi.id, i.name, i.value \"\n\t\t\t\t\t\t+ \"FROM order_items oi \"\n\t\t\t\t\t\t+ \"JOIN items i on oi.item_id = i.id \"\n\t\t\t\t\t\t+ \"WHERE oi.order_id = \" + orderId + \";\";\n\t\t\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(query); ) {\n\t\t\tList<Item> orderItemList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\titem = itemDAO.modelFromResultSet(resultSet);\n\t\t\t\torderItemList.add(item);\n\t\t\t}\n\t\t\treturn orderItemList;\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "public void addOrder(Order o) {\n medOrder.add(o);\n //System.out.println(\"in adding order\");\n for(OrderItem oi: o.getOrderItemList())\n {\n MedicineProduct p=oi.getProduct();\n //System.out.println(\"in for oop produscts \"+p);\n Medicine med = this.searchMedicine(p.getProdName());\n if(med!=null){\n int i = med.getAvailQuantity()+oi.getQuantity();\n med.setAvailQuantity(i);\n // System.out.println(\"in adding quntity \"+i);\n \n }\n }\n \n }", "public int placeOrder(Order order, String cust_no, Connection conn) {\r\n\t\ttry {\r\n\t\t\tint item_no=0;\r\n\t\t\tArrayList<Item> item_collection = new ArrayList<Item>();\r\n\t\t\titem_collection = order.getItemCollection(); \r\n\t\t\tfor(Item i : item_collection)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t\titem_no = i.getItemNo();\r\n\t\t\t}\r\n\t\t\tint order_no = 0;\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select max(orderno) from order_XXXX\");\r\n\t\t\twhile (rset.next()) {\r\n\t\t\t\torder_no = rset.getInt(1);\r\n\t\t\t\torder_no++;\r\n\t\t\t}\r\n\t\t\tPreparedStatement pstmt = conn\r\n\t\t\t\t\t.prepareStatement(\"insert into order_XXXX(orderno,item_no,ord_qty,custno) values(?,?,?,?)\");\r\n\t\t\tpstmt.setInt(1, order_no);\r\n\t\t\tpstmt.setInt(2, item_no);\r\n\t\t\tpstmt.setInt(3, order.getOrderQty());\r\n\t\t\tpstmt.setString(4, cust_no);\r\n\t\t\tint count = pstmt.executeUpdate();\r\n\t\t\tPreparedStatement pstmt1 = conn.prepareStatement(\"update item_XXXX set qty=qty-? where item_no = ?\");\r\n\t\t\tpstmt1.setInt(1, order.getOrderQty());\r\n\t\t\tpstmt1.setInt(2, item_no);\r\n\t\t\tpstmt1.executeUpdate();\r\n\t\t\treturn count;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic List<Item> findItemListByQuery() {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t//\tCriteriaQuery<Item> query = cb.createQuery(Item.class); \n // Root<Item> item = query.from(Item.class);\n TypedQuery<Item> iquery=entityManager.createQuery(\"select i from Item i\", Item.class);\n\t\treturn iquery.getResultList();\n\t\t\n\t}", "public OrderItem_() {\n }", "@Override\r\n\tpublic Orderitem queryByUidAndPid(Orderitem oi) {\n\t\treturn orderitemDao.queryByUidAndPid(oi);\r\n\t}", "@VTID(10)\r\n int getOrder();", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public interface OrderManager {\n\n\n OrderDTO getOrderDTO(Long orderId,Long sellerid,String appKey);\n\n List<OrderDTO> queryOrder(OrderQTO orderQTO, String appKey) throws ItemException;\n}", "@Test\n\tpublic void testGet() throws ApiException {\n\n\t\tOrderItemPojo db_orderitem_pojo = order_service.get(orderitems.get(0).getId());\n\t\tassertEquals(orderitems.get(0).getOrder(), db_orderitem_pojo.getOrder());\n\t\tassertEquals(orderitems.get(0).getProduct(), db_orderitem_pojo.getProduct());\n\t\tassertEquals(orderitems.get(0).getQuantity(), db_orderitem_pojo.getQuantity());\n\t\tassertEquals(orderitems.get(0).getSellingPrice(), db_orderitem_pojo.getSellingPrice(), 0.001);\n\t}", "public void makeOrder(Order order) {\n for(Order_Item x : order.getOrdered()){\n TableRow item_row = build_row(x.getItem().getName(), String.valueOf(x.getQuantity()), (x.getPrice()*x.getQuantity()) + \"€\");\n orderLayout.addView(item_row);\n }\n\n refreshPriceView();\n }", "ClOrderInfo selectByPrimaryKey(String orderId);", "public void AddOrder(Shoporder model) {\n\t\tmapper.AddOrder(model);\n\t}", "public ItemsPk insert(Items dto) throws ItemsDaoException;", "private void getAllItems() {\n\n try {\n double sellingPrice = 0;\n ArrayList<Item> allItems = ItemController.getAllItems();\n for (Item item : allItems) {\n double selling_margin = item.getSelling_margin();\n if (selling_margin > 0) {\n sellingPrice = item.getSellingPrice() - (item.getSellingPrice() * selling_margin / 100);\n } else {\n sellingPrice = item.getSellingPrice();\n }\n Object row[] = {item.getItemCode(), item.getDescription(), Validator.BuildTwoDecimals(item.getQuantity()), Validator.BuildTwoDecimals(sellingPrice)};\n tableModel.addRow(row);\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void loadAllToTable() {\n try {\n ArrayList<ItemDTO> allItems=ip.getAllItems();\n DefaultTableModel dtm=(DefaultTableModel) tblItems.getModel();\n dtm.setRowCount(0);\n \n if(allItems!=null){\n for(ItemDTO item:allItems){\n \n Object[] rowdata={\n item.getiId(),\n item.getDescription(),\n item.getQtyOnHand(),\n item.getUnitPrice()\n \n };\n dtm.addRow(rowdata);\n \n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }", "public void write(Order_Item _o) {\n\t\tthis.write(_o.get_id() + \" \" + this.format.format(_o.get_delivery_time_stamp()).toString());\n\t}", "public ArrayList getOrderItems() \r\n\t{\r\n\t\treturn orderItemList;\r\n\t}", "@Override\n\tpublic List<Item> findItemList() {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t\tCriteriaQuery<Item> query = cb.createQuery(Item.class); \n // Root<Item> item = query.from(Item.class);\n List<Item> itemList= entityManager.createQuery(query).getResultList();\n\t\treturn itemList;\n\t}", "public void putRowToTable(String userId, String restaurantId, String order, Double price) throws IOException;", "public boolean addItem(Item item) throws RemoteException, ClassNotFoundException, SQLException {\n Connection conn = DBConnection.getConnection();\n PreparedStatement stm = conn.prepareStatement(\"Insert into Item values(?,?,?,?)\");\n Object[] itemData = {item.getCode(), item.getDescription(), item.getUnitPrice(), item.getQtyOnHand()};\n for (int i = 0; i < itemData.length; i++) {\n stm.setObject(i + 1, itemData[i]);\n }\n return stm.executeUpdate() > 0;\n }", "public void setOrderItemAmount(Integer orderItemAmount) {\n this.orderItemAmount = orderItemAmount;\n }", "public Integer getOrderItemAmount() {\n return orderItemAmount;\n }", "Order placeOrder(Set<Item> menu){\n\t\tHashMap<Integer,Item> indexItemMap = new HashMap<Integer,Item>();\n\t\tint indexVal = 1; //initial index for HashMap\n\t\tfor(Item item:menu)\n\t\t{\n\t\t\tItem itemObject = new Item();\n\t\t\titemObject.setItemId(item.getItemId());\n\t\t\titemObject.setItemName(item.getItemName());\n\t\t\titemObject.setItemPrice(item.getItemPrice());\t\t\t\n\t\t\tindexItemMap.put(indexVal,itemObject);\n\t\t\tindexVal++; //incrementing the index to add items to HashMap\n\t\t}\n\t\tint maxIndex = indexVal-1;\n\n\t\t//creating empty list of ItemsOrdered \n\t\tList<ItemsOrdered> itemList = new ArrayList<ItemsOrdered>();\n\t\tScanner itemChoice = new Scanner(System.in);\n\t\tboolean startOrder = true;\n\t\twhile(startOrder)\n\t\t{ // validation of item no. entered by customer\n\t\t\tint index = -1; \n\t\t\twhile(index<0){\n\n\t\t\t\tSystem.out.println(\"Enter Item Id :\");\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\t//index = Integer.parseInt(itemChoice.next());\n\t\t\t\t\tindex = itemChoice.nextInt();\n\t\t\t\t\tif(!(index>0&&index<=maxIndex))\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = -1;\n\t\t\t\t\t\tSystem.out.println(\"Please Enter a valid id\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tindex = -1;\n\t\t\t\t\tSystem.out.println(\"Please Enter a valid id\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t // validation of itemQuantity entered by customer\n\t\t\tint currentQuantity = -1;\n\t\t\twhile(currentQuantity<0){\n\n\t\t\t\tSystem.out.println(\"Enter quantity :\");\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\t//quantity = Integer.parseInt(itemChoice.next());\n\t\t\t\t\tcurrentQuantity= itemChoice.nextInt();\n\t\t\t\t\tif(!(currentQuantity>0&&currentQuantity<50))\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentQuantity = -1;\n\t\t\t\t\t\tSystem.out.println(\"Please Enter a valid quantity\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tcurrentQuantity = -1;\n\t\t\t\t\tSystem.out.println(\"Please Enter a valid quantity\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//ItemsOrdered ordItem = indexItemMap.get(index);\n\t\t\t//System.out.println(\"Item is \"+ordItem.getItemName());\n \n\t\t\t\n\t\t\t//creating new ItemsOrdered object to store single item at a time from customer\n\t\t\tItemsOrdered itemsOrderedObject = new ItemsOrdered();\n\t\t\n\t\t\titemsOrderedObject.setItem(indexItemMap.get(index)); \n\n\t\t\t\n\t\t\tint previousQuantity=0; //itemQuanity initialized to 0\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"here\");\n\t\t\tfor(ItemsOrdered itemsOrdered: itemList)\n\t\t\t{\n\t\t\t\t//System.out.println(i.getItem().getItemId()+\" : \"+ordItem.getItemId());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(itemsOrdered.getItem().getItemId()==itemsOrderedObject.getItem().getItemId())\n\t\t\t\t{previousQuantity=itemsOrdered.getItemQuantity();\n\t\t\t\titemsOrdered.setItemQuantity(currentQuantity+previousQuantity);\n\t\t\t\t//System.out.println(\"Going here\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n//\t\t\tordItem.setItemQuantity(quantity+quant);\n\t\t\t\n\t\t\tif(previousQuantity==0)\n\t\t\t{\titemsOrderedObject.setItemQuantity(currentQuantity);\n\t\t\titemList.add(itemsOrderedObject);}\n//\t\t\t\n//\t\t\t\tordItem.setItemQuantity(quant+quantity);\n\t\t\t\n\t\t\t\n\n\t\t\tboolean continueOrder = true;\n\t\t\twhile(continueOrder)\n\t\t\t{\n\t\t\tSystem.out.println(\"Do you want to order more? (Y or N)\");\n\t\t\tString orderChoice = itemChoice.next();\n\n\t\t\tif(orderChoice.equalsIgnoreCase(\"y\") | orderChoice.equalsIgnoreCase(\"n\"))\n\t\t\t{\n\t\t\t\tif(!orderChoice.equalsIgnoreCase(\"y\")){\n\t\t\t\t\tstartOrder = false;\n\t\t\t\t\t//Display final list and Confirm order or cancel order\n\t\t\t\t\tSystem.out.println(\"Item Name\\tQuantity\\n\");\n\t\t\t\t\tfor(ItemsOrdered itemsOrdered: itemList){\n\t\t\t\t\t\tSystem.out.println(itemsOrdered.getItem().getItemName()+\"\\t\\t\"+itemsOrdered.getItemQuantity()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tboolean confirm = true;\n\t\t\t\t\twhile(confirm)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Press 'Y' to Confirm Order or 'N' to order again\");\n\t\t\t\t\t\torderChoice = itemChoice.next();\n\t\t\t\t\t\tif(orderChoice.equalsIgnoreCase(\"y\") | orderChoice.equalsIgnoreCase(\"n\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!orderChoice.equalsIgnoreCase(\"y\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstartOrder = true; \n\t\t\t\t\t\t\t\titemList.clear();\n\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\tconfirm = false;\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\tSystem.out.println(\"Please Enter Valid Choice\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\tcontinueOrder= false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Please Enter Valid Input\");\n\t\t\t\t//Test.main(null);\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\torder = new Order();\n\t\torder.setItems(itemList);\n\t\t//itemChoice.close();\n\t\treturn order;\n\t}", "public List<SalesOrderItem> fetchItem()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderItem.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Item\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderItem> entityList = result.asList(SalesOrderItem.class);\r\n for (SalesOrderItem entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "@Column(name = \"order_id\", precision = 10)\n @GeneratedValue\n @Id\n public Integer getOrderId() {\n return orderId;\n }", "public void loadItemsTable(String reqId) {\n dao.setup();\n ObservableList<RequisitionItemEntity> items = FXCollections.observableArrayList(dao.read(RequisitionItemEntity.class));\n dao.exit();\n\n TableColumn<RequisitionItemEntity, String> poIdCol = new TableColumn<>(\"Purchase ID\");\n poIdCol.setCellValueFactory(new PropertyValueFactory<RequisitionItemEntity, String>(\"poid\"));\n\n TableColumn<RequisitionItemEntity, String> reqIdCol = new TableColumn<>(\"Requisiton ID\");\n reqIdCol.setCellValueFactory(new PropertyValueFactory<>(\"reqid\"));\n\n TableColumn<RequisitionItemEntity, Number> supidCol = new TableColumn<>(\"Supplier ID\");\n supidCol.setCellValueFactory(new PropertyValueFactory<>(\"supplier_id\"));\n\n TableColumn<RequisitionItemEntity, Double> tamontCol = new TableColumn<>(\"Total Amount\");\n tamontCol.setCellValueFactory(new PropertyValueFactory<>(\"total_amount\"));\n\n for (RequisitionItemEntity item : items){\n if(reqId == item.getReqId())\n tableItems.getItems().add(item);\n }\n\n tableItems.getColumns().addAll(poIdCol,reqIdCol,supidCol,tamontCol);\n\n\n }", "@Override\n public void takeOrder(List<Item> restItem, int constID) {\n\n }", "public Order() {\n\t\tsuper();\n\t\titems = new HashMap<>();\n\t}", "public void orderItem(Item i) {\r\n\r\n\r\n\r\n this.o.orderItem(i);\r\n\r\n }", "public List<Output> viewOrders(){\n Session session = HibernateUtil.getSessionFactory().openSession();\n List<PurchaseOrder> poList = new ArrayList<PurchaseOrder>();\n List<Output> outputList = new ArrayList<>();\n\n try {\n session.beginTransaction();\n\n String sqlQuery = \"select po.id , po.poNumber, po.seller_vendor, po.dueDate, po.status, po.priority, org.shipFrom, des.shipTo, po.transResp \\n\" +\n \"from PurchaseOrder po \\n\" +\n \"join purchaseorder_origin_address porg on po.id=porg.PurchaseOrder_id\\n\" +\n \"join origin_address org on org.ID=porg.originAddresses_ID\\n\" +\n \"join purchaseorder_destination_address pd on po.id=pd.PurchaseOrder_id\\n\" +\n \"join destination_address des on des.ID=pd.destinationAddresses_ID \";\n\n SQLQuery query = session.createSQLQuery(sqlQuery);\n query.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP);\n /*query.setFirstResult(RetrieveAction.count*5);\n RetrieveAction.count++;\n query.setMaxResults(5);*/\n poList = query.list();\n tx.commit();\n session.close();\n for(Object po : poList){\n Map m = (Map) po;\n Output output = new Output();\n output.setPoNumber((int)m.get(\"poNumber\"));\n output.setSupplier(m.get(\"seller_vendor\").toString());\n output.setDueDate((Date) m.get(\"dueDate\"));\n output.setStatus(m.get(\"status\").toString());\n output.setPriority(m.get(\"priority\").toString());\n output.setShipfrom(m.get(\"shipFrom\").toString());\n output.setShipto(m.get(\"shipTo\").toString());\n output.setTransresp(m.get(\"transResp\").toString());\n outputList.add(output);\n }\n\n return outputList;\n\n } catch (Exception e) {\n System.err.println(\"Error getting Users :\" + e.getMessage());\n session.getTransaction().rollback();\n }\n return outputList;\n }", "@ResponseBody\n @RequestMapping(method = RequestMethod.POST, value = \"/{orderId}/item}\")\n public ResultData viewItem(@PathVariable(\"orderId\") String orderId) {\n ResultData result = new ResultData();\n Map<String, Object> condition = new HashMap<>();\n condition.put(\"orderId\", orderId);\n List<Integer> status = new ArrayList<>(Arrays.asList(OrderStatus.PAYED.getCode(), OrderStatus.PATIAL_SHIPMENT.getCode(), OrderStatus.FULLY_SHIPMENT.getCode(), OrderStatus.FINISHIED.getCode()));\n condition.put(\"status\", status);\n ResultData response = orderService.fetchOrder(condition);\n if (response.getResponseCode() == ResponseCode.RESPONSE_OK) {\n Order order = ((List<Order>) response.getData()).get(0);\n\n }\n return result;\n }", "public void printOrderItem(){\r\n\t\tSystem.out.print(this.quantity+\" x \"+this.menuItem.getName()+\" ---- \");\r\n\t\tSystem.out.printf(\"$%.2f\\n\",this.calculatePrice());\r\n\t}", "@Mapper(componentModel = \"spring\", uses = {ProOrderMapper.class})\r\npublic interface ProOrderItemMapper extends EntityMapper<ProOrderItemDTO, ProOrderItem> {\r\n\r\n @Mapping(source = \"proOrder.id\", target = \"proOrderId\")\r\n ProOrderItemDTO toDto(ProOrderItem proOrderItem);\r\n\r\n @Mapping(source = \"proOrderId\", target = \"proOrder\")\r\n ProOrderItem toEntity(ProOrderItemDTO proOrderItemDTO);\r\n\r\n default ProOrderItem fromId(Long id) {\r\n if (id == null) {\r\n return null;\r\n }\r\n ProOrderItem proOrderItem = new ProOrderItem();\r\n proOrderItem.setId(id);\r\n return proOrderItem;\r\n }\r\n}", "public void insertItemDetails(String itemName, Integer quantityOfItem, Double rateOfItem);", "@Dao\npublic interface ItemDao {\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertSingleItem(Item item);\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insertMultipleItem(List<Item> itemList);\n\n @Query(\"SELECT * FROM Item WHERE item_id = :itemId\")\n Flowable<Item> fetchItemByItemId(int itemId);\n\n @Query(\"SELECT * FROM Item\")\n Flowable<List<Item>> fetchItems();\n\n @Update\n void updateItem(Item item);\n\n @Delete\n void deleteItem(Item item);\n\n}", "public void addPoItems(List<ShoppingCartItemBean> items, int pid) throws Exception {\n String query = \"INSERT INTO POItem (id, bid, price, quantity) VALUES (?,?,?,?)\";\n try (Connection con = this.ds.getConnection();\n PreparedStatement p = con.prepareStatement(query)) {\n for (ShoppingCartItemBean item : items) {\n p.setInt(1, pid);\n p.setString(2, item.getBook().getBid());\n p.setInt(3, item.getPrice());\n p.setInt(4, item.getQuantity());\n p.addBatch();\n }\n p.executeBatch();\n p.close();\n con.close();\n }\n }", "io.opencannabis.schema.commerce.OrderItem.ItemOrBuilder getItemOrBuilder(\n int index);", "@Mapper\n@Repository\npublic interface OrderDAO {\n\n @Insert(\"insert into order_one values(#{order.id},#{order.number},#{order.name})\")\n int insert(@Param(\"order\") Order order);\n\n}", "@Override\n @Transactional\n public void update(Item item) {\n Produto produto = item.getProduto();\n produtoDao.updateEstoqueProduto(produto.getQuantidade() - item.getQuantidade(), produto.getId());\n }", "public String getOrderItemName() {\n return orderItemName;\n }", "@Insert({\n \"insert into SALEORDERDETAIL (SOID, LINENO, \",\n \"MID, MNAME, STANDARD, \",\n \"UNITID, UNITNAME, \",\n \"NUM, BEFOREDISCOUNT, \",\n \"DISCOUNT, PRICE, \",\n \"TOTALPRICE, TAXRATE, \",\n \"TOTALTAX, TOTALMONEY, \",\n \"BEFOREOUT, ESTIMATEDATE, \",\n \"LEFTNUM, ISGIFT, \",\n \"FROMBILLTYPE, FROMBILLID)\",\n \"values (#{soid,jdbcType=VARCHAR}, #{lineno,jdbcType=DECIMAL}, \",\n \"#{mid,jdbcType=VARCHAR}, #{mname,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR}, \",\n \"#{unitid,jdbcType=VARCHAR}, #{unitname,jdbcType=VARCHAR}, \",\n \"#{num,jdbcType=DECIMAL}, #{beforediscount,jdbcType=DECIMAL}, \",\n \"#{discount,jdbcType=DECIMAL}, #{price,jdbcType=DECIMAL}, \",\n \"#{totalprice,jdbcType=DECIMAL}, #{taxrate,jdbcType=DECIMAL}, \",\n \"#{totaltax,jdbcType=DECIMAL}, #{totalmoney,jdbcType=DECIMAL}, \",\n \"#{beforeout,jdbcType=DECIMAL}, #{estimatedate,jdbcType=TIMESTAMP}, \",\n \"#{leftnum,jdbcType=DECIMAL}, #{isgift,jdbcType=DECIMAL}, \",\n \"#{frombilltype,jdbcType=DECIMAL}, #{frombillid,jdbcType=VARCHAR})\"\n })\n int insert(Saleorderdetail record);", "@Override\r\n\tpublic void insertEncoreItem(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item1\");\r\n\t}", "public String getOrderID() {return orderID;}", "public String getOrderItemsByTableName(String tableName){\r\n ShippingDataAccess shippingOrder = new ShippingDataAccess(this.sqlServerIp);\r\n String log = null;\r\n List<ShippingOrderItem> items = shippingOrder.selectShippingOrderItemsByTableName(tableName, log);\r\n if (items != null) {\r\n StringBuilder result = new StringBuilder();\r\n for (ShippingOrderItem order : items) {\r\n result.append(order.toString() + \"\\n\");\r\n }\r\n return result.toString();\r\n } else {\r\n return null;\r\n }\r\n }" ]
[ "0.67173195", "0.61220187", "0.6023239", "0.60001504", "0.59771234", "0.5893141", "0.5888202", "0.58662295", "0.5844385", "0.5736397", "0.5695209", "0.56934094", "0.56871617", "0.5670401", "0.56508803", "0.5632582", "0.562337", "0.56204325", "0.5603306", "0.5602965", "0.56012803", "0.5587502", "0.5585531", "0.55604804", "0.55601686", "0.5557927", "0.5557927", "0.55486697", "0.5517153", "0.54873586", "0.5484079", "0.54742616", "0.5472284", "0.54504824", "0.5437778", "0.542161", "0.54190826", "0.54155713", "0.5409743", "0.5399867", "0.5364209", "0.53192085", "0.53084904", "0.53004116", "0.52884024", "0.5272995", "0.52725023", "0.5261743", "0.5256372", "0.5239916", "0.5232115", "0.52198577", "0.52143294", "0.51912147", "0.5184162", "0.5169192", "0.51561844", "0.5154355", "0.51532334", "0.51511395", "0.51466906", "0.51443404", "0.5140281", "0.513933", "0.5132589", "0.51292557", "0.5118331", "0.511199", "0.51118994", "0.5108885", "0.5107399", "0.51073056", "0.5096047", "0.5095955", "0.5091644", "0.50862795", "0.508309", "0.50810236", "0.50774956", "0.50744843", "0.5073296", "0.5068449", "0.50653327", "0.5060075", "0.50507164", "0.50395197", "0.50355875", "0.50307894", "0.50091195", "0.5008523", "0.5008491", "0.50054634", "0.5004289", "0.50009173", "0.49936065", "0.4992777", "0.49892694", "0.49879885", "0.49863014", "0.49766734", "0.49755025" ]
0.0
-1
Function call to invoke the method vertical("hey now");} /This function accepts a string as its parameter and prints each letter of the string on separate lines.
public static void main(String[] args) { public static void vertical (String str)) system.out.println("The call of vertical (\"" +strt"\") produce the followin output:"); for (int i=o;i<str.length(); i++) { //Display the output Syste.out.println(str.charAt(i)); } */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void t(){\n System.out.println( \"Some text \"); \n }", "public void displayTextToConsole();", "public void haha(){\n System.out.println(\"thavasi\");\n }", "@Override\r\n\tpublic void alimentar() {\n\t\tSystem.out.print(\" como carne, yummy, yummy\");\r\n\t}", "public static void f_menu(){\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"------------------------------------------------\");\n System.out.println(\"-------------Soft_AVERAGE_HEIGHT-----------------\");\n System.out.println(\"-------------version 1.0 23-oct-2020------------\");\n System.out.println(\"-------------make by Esteban Gaona--------------\");\n System.out.println(\"-------------------------------------------------\");\n System.out.println(\"-------------------------------------------------\");\n}", "private void mian()\r\n {\n System.out.println(\"Hello World222222221111\");\n System.out.println(\"12345\");\n }", "private void printWelcome()//Method was given\n {\n System.out.println();\n System.out.println(\"Welcome to Zork!\");\n System.out.println(\"This Zork is a new adventure game. Find your way through the building and get to the exit by solving riddles and escaping each room. Good luck!\");\n System.out.println(\"Type 'help' to see a list of command words that you can use to play the game.\");\n System.out.println();\n System.out.println(currentRoom.longDescription());\n }", "public String printVerticalLine(int number){\n int count = 0;\n StringJoiner joiner = new StringJoiner(\"\\n\");\n\n while (count < number){\n joiner.add(printAsterisk());\n count = count + 1;\n }\n return joiner.toString();\n }", "public void Display_A(String string) {\n\t\t\r\n\t}", "void message(){\n\t\tSystem.out.println(\"Hello dude as e dey go \\\\ we go see for that side\");\n\t\tSystem.out.print (\" \\\"So it is what it is\\\" \");\n\n\t}", "void printTextToConsole(String content){\n }", "private void printLine()\r\n\t{\r\n\t}", "public void println();", "public void Practice1(){\n System.out.println(\"Hello\");\n }", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Rectangle()\");\n\t}", "private void txt() {\n\n\t}", "public static void main(String[] args) {\n String str = \"welcome to Programr!\";\n\n System.out.println(\"UpperCase: - \"+str.toUpperCase());\n }", "public static void main(String[] args) {\nSystem.out.println(\"hello\");\r\nSystem.out.println(\"world\");\r\nSystem.out.println(\"haaai\");\r\nSystem.out.println(\"hell\");\r\n\t}", "void vorbereiten(){\n\t\tSystem.out.println(\"vorbereiten \");\n\t}", "public void method() {\n\t\t\r\n\t\t\r\n\t\tnew Inter() {\t\t\t\t\t\t\t//实现Inter接口\r\n\t\t\tpublic void print() {\t\t\t\t//重写抽象方法\r\n\t\t\t\tSystem.out.println(\"print\");\r\n\t\t\t}\r\n\t\t}.print();\r\n\t\t\r\n\t\t\r\n\t}", "public static void printUpperCase()\n {\n for(char i = 'A'; i <= 'Z'; i++){\n System.out.print(i + \" \");\n }\n System.out.println();\n }", "public static void main(String[] args) {\n System.out.println(\"Wazaaaaa\");\n System.out.println(\"hello\"+\"\\n\"+\"world\");\n printTable(8, 9);\n }", "@Override\n\tpublic void textTwo() {\n\t\tSystem.out.println(\"Aclass textTwo\");\n\t\t\n\t}", "@Override\n\tpublic void textOne() {\n\t\tSystem.out.println(\"Aclass textone\");\n\t}", "public Recusive_Methods(){\n int[][] array = {\n {1,2,3,4},\n {5,6,7,8},\n {9,10,11,12},\n {13,14,15,16},\n {17,18,19,20},\n };\n printer(array,0,0,array[0].length-1,array.length-1,0);\n\n StringReverse(\"this function writes the sentence in reverse\");\n StringReverse(\"selam alp emir bilek ben\");\n\n elfish(\"alpemir\",0,0,0);\n elfish(\"leaf\",0,0,0);\n elfish(\"waffles\",0,0,0);\n }", "void miau() {\r\n\t\tSystem.out.println(\"Miauuuu!\");\r\n\t}", "static void it(String s) {\n System.out.println(\" ======> \" + s);\n }", "private void printHelp()//Method was given\n {\n System.out.println(\"Your command words are:\");\n parser.showCommands();\n }", "public void voice() {\n System.out.println(\"My name is \"+ this.name + \",\" +\n \"I'm a smart dog and I'm \" + this.age + \"!\" + \" I'm \" + this.color + \".\"); //Task 19\n }", "void println(String line);", "public void sentence(){\n \n System.out.println(\"Your first boyfriend's name was \" + getName() + \".\\n\");\n }", "static void MichelMethod() {\n String CSI = \"\\u001B[\";\n System.out.print(CSI + \"32\" + \"m\");\n\n System.out.println(\"This is the group U calculator.\");\n System.out.println(\"Thanks for your preference!\");\n System.out.println(CSI + \"m\");\n\n }", "public void println(String line);", "public void print() {\r\n System.out.println(c() + \"(\" + x + \", \" + y + \")\");\r\n }", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Hyunjun\");\n\t}", "public void eat(){\n System.out.println(\"Bat Eatz\");\n }", "public static void method1(){\n System.out.println(\"*****\");\n System.out.println(\"*****\");\n System.out.println(\" * *\");\n System.out.println(\" *\");\n System.out.println(\" * *\");\n }", "public void eat(){\r\n System.out.println(\"Life Isn't Precious\");}", "@Override\n\tpublic void habla() {\n\t\tSystem.out.println(\"Miau, Miau!!\");\n\t}", "public static void say(String string){\n System.out.println(string);\n return;\n }", "@Override\n\tpublic void Say() {\n\t\tSystem.out.println(\"I am a teacher\");\n\t}", "default void method3(String string)\n {\n System.out.println(string);\n }", "public static void main(String[] args) {\n System.out.println(\"kkkjhhdjh\");\r\n System.out.println(\"pppppppppppppppp\");\r\n System.out.println(\"Overwriden\");\r\n\t}", "abstract public void printLine(String text) throws TerminalException;", "public static void main(String[] args) {\nString str=\"Welcome To Coding Ninja\";\n\nSystem.out.println(reverse_each(str));\n\t\t\n\t}", "void print(){\n\t\tSystem.out.println(\"[\"+x+\",\"+y+\"]\");\n\t}", "@Override\n\tpublic void printtest(String s)\n\t{\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Now executing the command \" + s + \"...\");\n\t\tSystem.out.println(\"The Results of this command are:\");\n\t\tif(!s.contentEquals(\"toString\")) System.out.println(toStringCursor());\n\t\telse System.out.println(toString());\n\t}", "public void method(String name) {\n System.out.printf(\"Called method with parameters %s \\n\", name);\n }", "public static void main(String args[]) throws CloneNotSupportedException, ClassNotFoundException, IOException{\n\t\tchar xyz=Character.toUpperCase('a');\n\t\tSystem.out.println(xyz);\n\t \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "void showInConsole();", "void emi(){\n\t\tSystem.out.println(\"This is HomeLoan EMi\");\n\t}", "private void sysout() {\nSystem.out.println(\"pandiya\");\n}", "private static void printLine(String message){\n\t\tSystem.out.println(message);\n\t}", "@Override\n\tpublic void sayHello() {\n\t\tSystem.out.println(\"Hello^=^\");\n\t}", "public String print();", "public void cars_of_my_father(){\n System.out.println(\"Royal Rayce, Maruti Suzuki, Mazda\");\n }", "public static void print() { //This is a Java method,Which will print \"Hello World\" on the cmd prompt.\n //Note : Keywords used : -\n //public : for the public access of method anywhere in this file or Another file.\n //static : It is used for a constant variable or a method that is same for every instance of a class.\n //void : returns nothing.\n System.out.println(\"Hello World\");\n }", "public static void hi (String stuff){\n\t\tSystem.out.println(stuff);\n\t}", "public void display2(){\n System.out.println(\"codegym\");\n }", "public static void main(String[] args) {\n\t\tSecondUpper s=new SecondUpper();\r\n\t\tSystem.out.println(s.getSecondWordInUppercase(\"Hello \"));\r\n\r\n\t}", "public void print(String line);", "public static void Mostra(String s){\r\n System.out.println(s);\r\n }", "public void takevideo() {\nSystem.out.println(\"take a video\");\r\n}", "String print() {\n\t\treturn \"Hi\";\n\t}", "public static void main(String[] args) throws Exception {\nSystem.out.println(\"i love nayanthara\");\nSystem.out.println(\"i love trisha\");\nSystem.out.println(\"i love keerthisuresh\");\n\n \n \n\t }", "public static void sayHello() {\r\n System.out.println(\"Hello\");\r\n }", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "public void cosoleText(String line)\n\t{\n\t\tconsole.setText(line);\n\t}", "public void sub() {\n\t\tSystem.out.println(\"I am from substraion method\");\n\t\t\n\t}", "void println(String message);", "@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"This is rectangle\");\n\t}", "public static void print(Pointer object) {\n\t\tString str = object.display(); // put result of display method to str\r\n\t\tif(object instanceof CapitalPrint) // if the object is instance of CapitalPrint class\r\n\t\t\tstr = str.toUpperCase(); // str change the UpperCase\r\n\t\tSystem.out.println(str); // print out str\r\n\t\t\r\n\t}", "private static void showJava(String string) { TODO Auto-generated method stub\n\t//\n\t\n}", "public void callmetoo(){\r\n\tSystem.out.println(\"This is a concrete method\");\r\n\t}", "public void printToViewConsole(String arg);", "@Override\n public void print() {\n System.out.println(\"Hello World Old Style!!\");\n }", "@Override\n\tpublic void show() {\n\t\tSystem.out.println(\"Line\");\n\t}", "public void sayText(Object ... strings)\n {\n System.out.print (strings);\n System.out.println ();\n }", "public void printRoutine()\n\t{\n\t\tfor (String name: vertices.keySet())\n\t\t{\n\t\t\tString value = vertices.get(name).toString();\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}", "abstract void consoleMessage(String message);", "@Override\n public void eatMeat()\n {\n setEatText(\"nomnomnom oink thx\");\n System.out.println(getEatText());\n }", "public static void printTriangle(String word)\n\t{\n\t\tString current = word.substring(0,1);\n\t\tint amount = 1;\n\t\tfor(int i = 1; i <= word.length(); i++) \n\t\t{\n\t\t\tcurrent = word.substring(0, i);\n\t\t\tfor(int y = 0; y < amount; y++) {\n\t\t\t\tSystem.out.print(current);\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\tamount += 1;\n\t\t}\n\t\t\n\t}", "public void meny(){\r\n System.out.println(\"\\nMeny\");\r\n System.out.println(\"1. Legg til ny person\");\r\n System.out.println(\"2. Kjop ny DVD\");\r\n System.out.println(\"3. Laan bort DVD\");\r\n System.out.println(\"4. Vis info om valgt person\");\r\n System.out.println(\"5. Vis oversikt over personer\");\r\n System.out.println(\"6. Returner DVD\");\r\n System.out.println(\"7. Avslutt\");\r\n }", "public void print () {\n }", "public void show() {\n\n System.out.println(a);\n System.out.println(b);\n System.out.println(c);\n System.out.println(\"In a nested class method\");\n }", "public static void main(String[] args) {\n\t\tScanner console = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter a sentence: \");\n\t\tsentence = console.nextLine();\n\n\t\tSystem.out.println(getBlankPositions());\n\t\tSystem.out.println(countWords());\n\t\tString[] wordArr = getWords();\n\n\t\t// print wordArr in the proper format\n\t\tSystem.out.print(\"{\");\n\t\tfor (int i =0 ; i < wordArr.length; i++) {\n\t\t\tSystem.out.print(wordArr[i]);\n\t\t\tif (i < wordArr.length - 1)\tSystem.out.print(\",\");\n\t\t}\n\t\tSystem.out.println(\"}\");\n\t}", "@Override\n public void walks(String movement){\n System.out.println(\"The dog \"+movement);\n }", "public static void functionCalled(String message) {\n if(enabled) {\n for (int i = 0; i < depth; i++)\n System.out.print(\"\\t\");\n System.out.println(message);\n depth++;\n }\n }", "public static void main(String[] args) {\n\t\treverseAlternate(\"Hello Good Morning nanshu\");\n\t\t\t//reverseWords1(\"Hello Good Morning\");\n\t\t\t\n\t\t\t\n\t\t\t//String str1 = \"nashu\";\n\t\t\t//Middle(str1);\n\t}", "@Override\n\tpublic void juxing() {\n\t\tSystem.out.println(\"***************\");\n\t\tSystem.out.println(\"***************\");\n\t\tSystem.out.println(\"***************\");\n\t\tSystem.out.println(\"***************\");\n\t\tSystem.out.println(\"***************\");\n\t}", "public void displayMessage(Message mes)//Method which accepts the object of ABSTRACT/INTERFACE Message\n\t{\n\t\tSystem.out.println(mes.greet()+ \" ,This is an example of Anonymous classas an argument \");\n\t\t}", "private void syso() {\nSystem.out();\r\n}", "public static void box(){\n System.out.println(\" ********************* ********************* ********************* \");\n System.out.println(\" *** *** *** *** *** *** \");\n System.out.println(\" *** 1 *** *** 2 *** *** 3 *** \");\n System.out.println(\" *** *** *** *** *** *** \");\n System.out.println(\" ********************* ********************* ********************* \"); \n }", "@Test\n\tpublic void fortheLine() {\n\t\tString stringOfTestingWord = (\"aword\");\n\t\tStringBuilder MethodResult = object1.theLine(stringOfTestingWord);\n\t\tStringBuilder ExpectedResult = new StringBuilder();\n\t\tfor (int i = 0; i < stringOfTestingWord.length(); i++) {\n\t\t\tExpectedResult.append(\"-\");\n\t\t}\n\t\tassertEquals(ExpectedResult.toString(), MethodResult.toString());\n\n\t}", "public static void main(String[] args) {\n\n for(char ch='A'; ch<='Z'; ch++){\n System.out.print(ch+\" \");\n }\n System.out.println();\n\n //backword--descending\n for (char ch='Z'; ch>='A'; ch--){\n System.out.print(ch+\" \");\n }\n System.out.println();\n\n //lower case\n for(char ch ='a'; ch<='z'; ch++){\n System.out.print(ch+ \" \");\n }\n\n\n\n }", "public static void main(String[] args) {\n\t\tprint((a,b) -> System.out.println(a+\" \"+b), \"Hello\",\"Java\");\r\n\t\tprint((a,b) -> System.out.println(a+\"-\"+b), \"Hello\",\"Java\");\r\n\t}", "@Override\r\n\tpublic void sayhello() {\n\t\tSystem.out.println(\"say 22222222...\");\r\n\t}", "public static void main(String[] args) {\n\t\tsample obj = new sample() {\n\t\t\t@Override\n\t\t\tvoid cat() {\n\t\t\t\tSystem.out.println(\"mew mew\");\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t};\n\t\tobj.cat();\n\t}", "public abstract void execAndPrint(String s);", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}" ]
[ "0.60399026", "0.5918733", "0.58541393", "0.57745856", "0.57398134", "0.5678024", "0.5618655", "0.55902326", "0.55276686", "0.5512663", "0.5507656", "0.5473453", "0.54729867", "0.5446319", "0.5440366", "0.5424404", "0.54220176", "0.54191107", "0.5414117", "0.5410601", "0.539997", "0.53994566", "0.5391716", "0.5388474", "0.5385431", "0.53803957", "0.5375875", "0.5351662", "0.5349039", "0.5341985", "0.53382623", "0.5336383", "0.5334465", "0.5334363", "0.531283", "0.5298878", "0.5291777", "0.5289555", "0.5280484", "0.52786994", "0.5255029", "0.52536225", "0.52503073", "0.5250071", "0.5242355", "0.5240889", "0.5225442", "0.5224876", "0.5215321", "0.5214855", "0.52146244", "0.5209181", "0.52054226", "0.5204999", "0.52028555", "0.5202476", "0.5201034", "0.5195255", "0.51938397", "0.519228", "0.51922643", "0.5190214", "0.5186942", "0.51858276", "0.5181868", "0.5180892", "0.5176319", "0.51743305", "0.51711035", "0.5167959", "0.516342", "0.51530206", "0.5152778", "0.515255", "0.51497555", "0.5142556", "0.5140544", "0.5136273", "0.5135866", "0.51347744", "0.51323795", "0.5120997", "0.51208556", "0.5119545", "0.51186526", "0.5118545", "0.5118493", "0.51164514", "0.5108876", "0.5108258", "0.5105594", "0.51014054", "0.5099097", "0.50985605", "0.5084461", "0.508385", "0.50792325", "0.50781864", "0.5077608", "0.507466" ]
0.8036765
0
TODO Autogenerated method stub
@Override public int describeContents() { 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
/ this will be called once when the agent starts and can be used for initialization work note that when this method is executed, (a) it is not guaranteed that all the other agents are already started and/or their actions are known, and (b) the agent's execution has not yet started, so do not wait for any actions to be completed in this method (you can invoke actions, though, if they are already known to the agent) if you want to use a SpaceObserver to listen to messages, this is might be a good place to add it, but you could also check messages in execute() and only temporarily attach a SpaceObserver for specific purposes
@Override public void doStart() throws Exception { log.info("starting..."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setup() {\n\t\tSystem.out.println(\"Messenger agent \"+getAID().getName()+\" is ready.\");\r\n\t\tagentList = new ArrayList();\r\n\t\trefreshActiveAgents();\r\n\r\n\t\tmessageGUI = new MessageAgentGui(this);\r\n\t\tmessageGUI.displayGUI();\r\n\r\n\t\tDFAgentDescription dfd = new DFAgentDescription();\r\n\t\tdfd.setName(getAID());\r\n\t\tServiceDescription sd = new ServiceDescription();\r\n\t\tsd.setType(\"messenger-agent\");\r\n\t\tsd.setName(getLocalName()+\"-Messenger agent\");\r\n\t\tdfd.addServices(sd);\r\n\t\ttry {\r\n\t\t\tDFService.register(this, dfd);\r\n\t\t}\r\n\t\tcatch (FIPAException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\t\taddBehaviour(new ReceiveMessage());\r\n\t}", "protected void setup(){\n this.setEnabledO2ACommunication(true, 0);\n \n showMessage(\"Agent (\" + getLocalName() + \") .... [OK]\");\n \n // Register the agent to the DF\n ServiceDescription sd1 = new ServiceDescription();\n sd1.setType(UtilsAgents.BOAT_COORDINATOR);\n sd1.setName(getLocalName());\n sd1.setOwnership(UtilsAgents.OWNER);\n DFAgentDescription dfd = new DFAgentDescription();\n dfd.addServices(sd1);\n dfd.setName(getAID());\n try {\n DFService.register(this, dfd);\n showMessage(\"Registered to the DF\");\n }catch (FIPAException e) {\n System.err.println(getLocalName() + \" registration with DF \" + \"unsucceeded. Reason: \" + e.getMessage());\n doDelete();\n }\n \n //Search for the CentralAgent\n ServiceDescription searchBoatCoordCriteria = new ServiceDescription();\n searchBoatCoordCriteria.setType(UtilsAgents.COORDINATOR_AGENT);\n this.coordinatorAgent = UtilsAgents.searchAgent(this, searchBoatCoordCriteria);\n\n // Register response behaviours\n //TODO canviar i posar l'altra content\n MessageTemplate mt = MessageTemplate.MatchContent(\"Movement request\");\n this.addBehaviour(new RequestResponseBehaviour(this,mt ));\n }", "@Override\r\n\tprotected void setup() {\n\t\tlog=LogManager.getLogger();\r\n\t\tmyAgent.addGoal(new SendMsgGoal());\r\n//\t\tlog.info(\"Send message goal is added\");\r\n\t\t\r\n\t}", "public void initiateAction() {\r\n\t\t// TODO Auto-generated method stub\t\r\n\t}", "private void initializeAgent() {\n if (Math.random() < PROBABILITY_START_WITH_AGENT) {\n agent = new SugarscapeAgent();\n }\n }", "private Behavior<Command> onStart() {\n List<ActorRef<Worker.Command>> workerList = new ArrayList<>();\n //Spawn workers and store them in the list\n for(int i = 0; i < numberOfWorkers; i++){\n workerList.add(getContext().spawn(Worker.create(), \"Worker\"+i, DispatcherSelector.fromConfig(\"first-dispatcher\")));\n }\n timeAfterSetup = System.nanoTime();\n int startNumber = 0;\n for(ActorRef<Worker.Command> worker : workerList){\n worker.tell(new Worker.DoWork(numberToSearch, numberOfWorkers, startNumber, getContext().getSelf()));\n startNumber++;\n }\n\n return this;\n }", "@Override\n\tpublic void execute() {\n\t\tlog.info(\"running...\");\n\n\n\t\t/* example for finding the server agent */\n\t\tIAgentDescription serverAgent = thisAgent.searchAgent(new AgentDescription(null, \"ServerAgent\", null, null, null, null));\n\t\tif (serverAgent != null) {\n\t\t\tthis.server = serverAgent.getMessageBoxAddress();\n\n\t\t\t// TODO\n\t\t\tif (!hasGameStarted) {\n\t\t\t\tStartGameMessage startGameMessage = new StartGameMessage();\n\t\t\t\tstartGameMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\tstartGameMessage.gridFile = \"/grids/h_01.grid\";\n\t\t\t\t// Send StartGameMessage(BrokerID)\n\t\t\t\tsendMessage(server, startGameMessage);\n\t\t\t\treward = 0;\n\t\t\t\tthis.hasGameStarted = true;\n\t\t\t}\n\n\t\t} else {\n\t\t\tSystem.out.println(\"SERVER NOT FOUND!\");\n\t\t}\n\n\n\t\t/* example of handling incoming messages without listener */\n\t\tfor (JiacMessage message : memory.removeAll(new JiacMessage())) {\n\t\t\tObject payload = message.getPayload();\n\n\t\t\tif (payload instanceof StartGameResponse) {\n\t\t\t\t/* do something */\n\n\t\t\t\t// TODO\n\t\t\t\tStartGameResponse startGameResponse = (StartGameResponse) message.getPayload();\n\n\t\t\t\tthis.maxNum = startGameResponse.initialWorkers.size();\n\t\t\t\tthis.agentDescriptions = getMyWorkerAgents(this.maxNum);\n\t\t\t\tthis.gameId = startGameResponse.gameId;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + startGameResponse.toString());\n\n\t\t\t\t// TODO handle movements and obstacles\n\t\t\t\tthis.gridworldGame = new GridworldGame();\n\t\t\t\tthis.gridworldGame.obstacles.addAll(startGameResponse.obstacles);\n\n\n\n\t\t\t\t// TODO nicht mehr worker verwenden als zur Verfügung stehen\n\n\t\t\t\t/**\n\t\t\t\t * Initialize the workerIdMap to get the agentDescription and especially the\n\t\t\t\t * MailBoxAdress of the workerAgent which we associated with a specific worker\n\t\t\t\t *\n\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAId.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\t\t\t\t} */\n\n\t\t\t\t/**\n\t\t\t\t * Send the Position messages to each Agent for a specific worker\n\t\t\t\t * PositionMessages are sent to inform the worker where it is located\n\t\t\t\t * additionally put the position of the worker in the positionMap\n\t\t\t\t */\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tpositionMap.put(worker.id, worker.position);\n\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAID.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(worker.id);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\t// Send each Agent their current position\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = startGameResponse.gameId;\n\t\t\t\t\tpositionMessage.position = worker.position;\n\t\t\t\t\tpositionMessage.workerIdForServer = worker.id;\n\t\t\t\t\t//System.out.println(\"ADDRESS IS \" + workerAddress);\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t\t//break;\n\t\t\t\t}\n\n\t\t\t\thasAgents = true;\n\n\t\t\t\tfor (Order order: savedOrders) {\n\t\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(order);\n\t\t\t\t\tPosition workerPosition = null;\n\t\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tint steps = workerPosition.distance(order.position) + 2;\n\t\t\t\t\tint rewardMove = (steps > order.deadline)? 0 : order.value - steps * order.turnPenalty;\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\t\ttakeOrderMessage.orderId = order.id;\n\t\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\t\ttakeOrderMessage.gameId = gameId;\n\t\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionConfirm) {\n\t\t\t\tPositionConfirm positionConfirm = (PositionConfirm) message.getPayload();\n\t\t\t\tif(positionConfirm.state == Result.FAIL) {\n\t\t\t\t\tString workerId = workerIdReverseAID.get(positionConfirm.workerId);\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(workerId);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = positionConfirm.gameId;\n\t\t\t\t\tpositionMessage.position = positionMap.get(workerId);\n\t\t\t\t\tpositionMessage.workerIdForServer = workerId;\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t} else {\n\t\t\t\t\tactiveWorkers.add(message.getSender());\n\t\t\t\t\tfor (String orderId: orderMessages) {\n\t\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(this.orderMap.get(orderId));\n\t\t\t\t\t\tif(workerAddress.equals(message.getSender())){\n\t\t\t\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\t\t\t\tassignOrderMessage.order = this.orderMap.get(orderId);\n\t\t\t\t\t\t\tassignOrderMessage.gameId = gameId;\n\t\t\t\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\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\n\t\t\t}\n\n\n\t\t\tif (payload instanceof OrderMessage) {\n\n\t\t\t\t// TODO entscheide, ob wir die Order wirklich annehmen wollen / können\n\n\t\t\t\tOrderMessage orderMessage = (OrderMessage) message.getPayload();\n\n\t\t\t\tif (!hasAgents){\n\t\t\t\t\tsavedOrders.add(orderMessage.order);\n\t\t\t\t\tcontinue;\n\t\t\t\t}else {\n\t\t\t\t\tOrder thisOrder = orderMessage.order;\n\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(thisOrder);\n\t\t\t\tPosition workerPosition = null;\n\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tint steps = workerPosition.distance(thisOrder.position) + 1;\n\t\t\t\t\tint rewardMove = (steps > thisOrder.deadline)? 0 : thisOrder.value - steps * thisOrder.turnPenalty;\n\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\ttakeOrderMessage.orderId = orderMessage.order.id;\n\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\ttakeOrderMessage.gameId = orderMessage.gameId;\n\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\tOrder order = ((OrderMessage) message.getPayload()).order;\n\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + orderMessage.toString());\n\n\t\t\t\t// Save order into orderMap\n\n\t\t\t}\n\n\t\t\tif (payload instanceof TakeOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\t// Got Order ?!\n\t\t\t\tTakeOrderConfirm takeOrderConfirm = (TakeOrderConfirm) message.getPayload();\n\t\t\t\tResult result = takeOrderConfirm.state;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + takeOrderConfirm.toString());\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\n\t\t\t\t\t// Remove order from orderMap as it was rejected by the server\n\t\t\t\t\tthis.orderMap.remove(takeOrderConfirm.orderId);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\t// TODO send serverAddress\n\t\t\t\t// Assign order to Worker(Bean)\n\t\t\t\t// Send the order to the first agent\n\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\tassignOrderMessage.order = this.orderMap.get(takeOrderConfirm.orderId);\n\t\t\t\tassignOrderMessage.gameId = takeOrderConfirm.gameId;\n\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(assignOrderMessage.order);\n\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t} else {\n\t\t\t\t\torderMessages.add(takeOrderConfirm.orderId);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (payload instanceof AssignOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\tAssignOrderConfirm assignOrderConfirm = (AssignOrderConfirm) message.getPayload();\n\t\t\t\tResult result = assignOrderConfirm.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\t\t\t\t\t// TODO\n\t\t\t\t\tICommunicationAddress alternativeWorkerAddress = getAlternativeWorkerAddress(((AssignOrderConfirm) message.getPayload()).workerId);\n\t\t\t\t\treassignOrder(alternativeWorkerAddress, assignOrderConfirm);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\torderMessages.remove(assignOrderConfirm.orderId);\n\n\t\t\t\t// TODO Inform other workers that this task is taken - notwendig??\n\n\t\t\t}\n\n\t\t\tif (payload instanceof OrderCompleted) {\n\n\t\t\t\tOrderCompleted orderCompleted = (OrderCompleted) message.getPayload();\n\t\t\t\tResult result = orderCompleted.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// TODO Handle failed order completion -> minus points for non handled rewards\n\t\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t// TODO remove order from the worker specific order queues\n\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionUpdate) {\n\n\t\t\t\tPositionUpdate positionUpdate = (PositionUpdate) message.getPayload();\n\t\t\t\tupdateWorkerPosition(positionUpdate.position, positionUpdate.workerId);\n\n\t\t\t}\n\n\t\t\tif (payload instanceof EndGameMessage) {\n\n\t\t\t\tEndGameMessage endGameMessage = (EndGameMessage) message.getPayload();\n\t\t\t\t// TODO lernen lernen lernen lol\n\t\t\t\tSystem.out.println(\"Reward: \" + endGameMessage.totalReward);\n\t\t\t}\n\n\t\t}\n\t}", "protected void initialize() {\n\t\tRobot.firstAutonomousCommandDone = true;\n\t}", "protected void setup(){\n\n\t\tsuper.setup();\n\n\t\tfinal Object[] args = getArguments();\n\t\tif(args!=null && args[0]!=null && args[1]!=null){\n\t\t\tdeployAgent((Environment) args[0],(EntityType)args[1]);\n\t\t}else{\n\t\t\tSystem.err.println(\"Malfunction during parameter's loading of agent\"+ this.getClass().getName());\n System.exit(-1);\n }\n\t\t\n\t\t//############ PARAMS ##########\n\n\t\tthis.nbmodifsmin \t\t= 30;\t\t\t//nb modifs minimum pour renvoyer la carte\n\t\tthis.timeOut \t\t\t= 1000 * 4;\t\t//secondes pour timeout des messages (*1000 car il faut en ms)\n\t\tthis.sleepbetweenmove \t= 200;\t\t\t//in MS\n\t\tthis.nbmoverandom\t\t= 4;\t\t\t// nb random moves by default\n\t\t\n\t\t//#############################\n\t\t//setup graph\n\t\t//setupgraph();\n\t\tthis.graph = new SingleGraph(\"graphAgent\");\n\t\tinitMyGraph();\n\t\tthis.step = 0;\n\t\tthis.stepMap = new HashMap<String, Integer>();\n\t\tthis.path = new ArrayList<String>();\n\t\tthis.mailbox = new Messages(this);\n\t\tthis.lastMsg = null;\n\t\tthis.switchPath = true;\n\t\tthis.lastsender = null;\n\t\tthis.lastSentMap = new HashMap<String, Integer>(); //nbmodifs\n\t\tthis.remakepath = false; // changes to true if the map changed in a way that requires a new path\n\t\tthis.nbmoverandomoriginal = this.nbmoverandom;\n\t\t\n\t\tthis.toSendMap = new HashMap<String, Graph>(); //actual hashmap graph\n\t\t\n\t\tSystem.out.println(\"the agent \"+this.getLocalName()+ \" is started\");\n\t}", "void initAgents() {\n Runtime rt = Runtime.instance();\n\n //Create a container to host the Default Agent\n Profile p = new ProfileImpl();\n p.setParameter(Profile.MAIN_HOST, \"localhost\");\n //p.setParameter(Profile.MAIN_PORT, \"10098\");\n p.setParameter(Profile.GUI, \"false\");\n ContainerController cc = rt.createMainContainer(p);\n\n HashMap<Integer, String> neighbors = new HashMap <Integer, String>();\n neighbors.put(1, \"2, 4, 3\");\n neighbors.put(2, \"1, 3\");\n neighbors.put(3, \"1, 2, 4\");\n neighbors.put(4, \"1, 3, 5\");\n neighbors.put(5, \"4\");\n\n//Create a container to host the Default Agent\n try {\n for (int i = 1; i <= MainController.numberOfAgents; i++) {\n AgentController agent = cc.createNewAgent(Integer.toString(i), \"ru.spbu.mas.DefaultAgent\",\n new Object[]{neighbors.get(i)});\n agent.start();\n }\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n }", "protected void initialize() {\n\t\tRobot.conveyor.Forward();\n\n\t}", "protected void setup() {\n\t\tSystem.out.println(\" Searching \" + getAID().getName() + \"starts\");\n\t\taddBehaviour(new WakerBehaviour(this, 1000) {\n\t\t\tprotected void handleElapsedTimeout() {\n\t\t\t\t// perform operation X\n\t\t\t\tDFAgentDescription template = new DFAgentDescription();\n\t\t\t\tServiceDescription sd = new ServiceDescription();\n\t\t\t\tsd.setType(\"Cloth adviser\");\n\t\t\t\ttemplate.addServices(sd);\n\t\t\t\ttry {\n\t\t\t\t\tDFAgentDescription[] resultOfAdviser = DFService.search(myAgent, template);\n\t\t\t\t\tadviser= resultOfAdviser[0].getName();\n\t\t\t\t} catch (FIPAException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\t\t\t\t\n\t\t\t\tACLMessage recMessage = blockingReceive();\n\t\t\t\tif (recMessage != null) {\n\t\t\t\t\tString senderName = recMessage.getSender().getName();\n\t\t\t\t\tSystem.out.println(getName()+\" receive message from \" + senderName);\n\t\t\t\t\tString rec = recMessage.getContent();\n\t\t\t\t\tSystem.out.println(\"receive message is \" + rec);\n\t\t\t\t\tACLMessage sendMessage = new ACLMessage(ACLMessage.INFORM);\n\t\t\t\t\tsendMessage.setContent(rec);\n\t\t\t\t\tsendMessage.addReceiver(adviser);\n\t\t\t\t\tsend(sendMessage);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"null exception\");\n\t\t\t\t\tblock();\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}\n\t\t});\n\t}", "private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }", "public void autonomousInit() {\n\t\tautonomousCommand.start();\r\n\t}", "@Override\n protected void initialize() {\n Robot.collector.open();\n }", "public static void helloAgent(){\n\t\tHelloAgent agent = new HelloAgent();\r\n\t\r\n\t}", "@Override\n public void autonomousInit() {\n //ds.set(Value.kForward);\n /*m_autonomousCommand = m_chooser.getSelected();\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n * \n */\n\n // schedule the autonomous command (example)\n /*if (m_autonomousCommand != null) {\n m_autonomousCommand.start();\n }*/\n //new VisionProcess().start();\n //SmartDashboard.putNumber(\"heerer\", value)\n new TeleOpCommands().start();\n }", "public void autonomousInit() {\n if (autonomousCommand != null) autonomousCommand.start();\n }", "public void gameInit() {\n lobbyRoom.sendPortToAll();\n lobbyRoom.sendPlayers(game.getCars());\n lobbyRoom.sendTrack(game.getTrack());\n lobbyRoom.sendPowerupManager(game.getManager());\n this.running = true;\n }", "@Override\n\tpublic void robotInit() {\n\t\tdrive = new Drive();\n\t\tintake = new Intake();\n\t\tshooter = new Shooter();\n\t\taimShooter = new AimShooter();\n\t\tvision = new Vision();\n\t\tintakeRoller = new IntakeRoller();\n\t\taManipulators = new AManipulators();\n\t\tshooterLock = new ShooterLock();\n\n\t\t// autochooser\n\t\t// autoChooser = new SendableChooser();\n\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\tlowGearCommand = new LowGear();\n\n\t\t// auto chooser commands\n\t\t// autoChooser.addDefault(\"FarLeftAuto\", new FarLeftAuto());\n\t\t// autoChooser.addObject(\"MidLeftAuto\", new MidLeftAuto());\n\t\t// autoChooser.addObject(\"MidAuto\", new MidAuto());\n\t\t// autoChooser.addObject(\"MidRightAuto\", new MidRightAuto());\n\t\t// autoChooser.addObject(\"FarRightAuto\", new FarRightAuto());\n\t\t// autoChooser.addObject(\"Uber Auto\", new UberAuto());\n\t\t// autoChooser.addObject(\"Paper Weight\", new PaperWeightAuto());\n\t\t//\n\t\t// SmartDashboard.putData(\"Autonomous\", autoChooser);\n\n\t\t// autonomousCommand = (Command) autoChooser.getSelected();\n\t\tautonomousCommand = new FarLeftAuto();\n\t\t// autonomousCommand = new MidAuto();\n\t\t// CameraServer.getInstance().startAutomaticCapture(\"cam3\");\n\t\t// autonomousCommand = new FarLeftAuto\n\n\t\tpovUpTrigger.whenActive(new MoveActuatorsUp());\n\t\tpovDownTrigger.whenActive(new MoveActuatorsDown());\n\t}", "@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }", "@Override\n\tpublic void start()\n\t{\n\t\tarena = \"scenarios/boxpushing/arena/pioneer.controller.arena.txt\"; \n\n\t\t\n\t\tschedule.reset();\n\n\t\tsuper.start();\n\n\t\tresetBehavior();\n\n\t}", "protected void init_actions()\r\n {\r\n action_obj = new CUP$LuaGrammarCup$actions(this);\r\n }", "public void start() {\n\t\tthis.obstacleController.start();\n\t}", "@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }", "public void action()\n {\n if(timeout > 0 && timeout < 2)\n {\n timeout = 0;\n agent.removeBehaviour(introNegotiation);\n introNegotiation = null;\n counter = 0;\n\n\n }\n //If this is the very first time getting to this state or if the timeout reset the counter to 0\n if(counter < 1)\n {\n //Clean the list of receivers in case there is something\n if(!receivers.isEmpty())\n receivers.removeAllElements();\n //Calculate the duration of the intro\n calculateDurationIntro();\n //Find a receiver\n findAllReceivers();\n constructACLMessage();\n introNegotiation = new IntroNegotiation(agent,msg);\n introNegotiation.setDataStore(getDataStore());\n agent.addBehaviour(introNegotiation);\n }\n\n\n //Handle where I'm heading to from here.\n switch (steps)\n {\n case 0:\n transition = 29;\n break;\n case 1:\n agent.removeBehaviour(introNegotiation);\n introNegotiation = null;\n transition = 17;\n\n }\n\n\n\n }", "protected void setup() {\n DFAgentDescription dfd = new DFAgentDescription();\n dfd.setName(getAID());\n ServiceDescription sd = new ServiceDescription();\n sd.setName(\"Storage Agent\");\n sd.setType(\"Storage\");\n dfd.addServices(sd);\n try {\n DFService.register(this, dfd);\n } catch (FIPAException fe) {\n fe.printStackTrace();\n }\n waitForAgents = new waitAgents();\n receiveAgents = new receiveFromAgents();\n operate = new opMicrogrid();\n decision = new takeDecision();\n\n addBehaviour(waitForAgents);\n\n //add a ticker behavior to monitor PV production, disable PLay button in the meanwhile\n addBehaviour(new TickerBehaviour(this, 5000) {\n protected void onTick() {\n if (AgentsUp == 0) {\n appletVal.playButton.setEnabled(false);\n ACLMessage msg = new ACLMessage(ACLMessage.INFORM);\n msg.addReceiver(new AID(AgentAIDs[2].getLocalName(), AID.ISLOCALNAME));\n msg.setContent(\"Inform!!!\");\n send(msg);\n String stripedValue = \"\";\n msg = receive();\n if (msg != null) {\n // Message received. Process it\n String val = msg.getContent().toString();\n stripedValue = (val.replaceAll(\"[\\\\s+a-zA-Z :]\", \"\"));\n //PV\n if (val.contains(\"PV\")) {\n System.out.println(val);\n PV = Double.parseDouble(stripedValue);\n appletVal.playButton.setEnabled(true);\n appletVal.SetAgentData(PV, 0, 2);\n }\n\n } else {\n block();\n }\n\n }\n }\n });\n\n }", "public void requestStart(){\r\n\t\t\r\n\t\tIterator <NavigationObserver> navOb = this.navega.iterator();\r\n\t\twhile ( navOb.hasNext()){\r\n\t\t\tnavOb.next().initNavigationModule(this.navega.getCurrentPlace(), this.direction);\r\n\t\t}\r\n\t\tIterator <RobotEngineObserver> robOb = this.iterator();\r\n\t\twhile (robOb.hasNext()){\r\n\t\t\trobOb.next().robotUpdate(fuel, recycledMaterial);\r\n\t\t}\r\n\t}", "public void startAgent(String agName);", "private void initActions() \n {\n // Quits the application\n this.quitAction = new AbstractAction (\"Quit\") \n {\n public static final long serialVersionUID = 2L;\n\n @Override\n public void actionPerformed (ActionEvent arg0) \n { \n System.exit(0);\n }\n };\n\n // Creates a new model\n this.newGameAction = new AbstractAction (\"New Game\") \n {\n public static final long serialVersionUID = 3L;\n\n @Override\n public void actionPerformed(ActionEvent arg0) \n {\n AsteroidsFrame.this.newGame ();\n }\n };\n }", "public void robotInit() {\n\t\toi = new OI();\n // instantiate the command used for the autonomous period\n }", "public void startSimulation(){\n Enumeration enumAgents = agents.elements();\n\n while (enumAgents.hasMoreElements()) {\n ProcessData data = (ProcessData) enumAgents.nextElement();\n createThreadFor(data.agent).start();\n }\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tSystem.out.println(\"onStart\");\n\t\t\t\tif(listener!=null) listener.onMessage(\"onStart\");\n\t\t\t\tisRun = true;\n\t\t\t}", "protected void init_actions()\n {\n action_obj = new CUP$PCLParser$actions(this);\n }", "@Override\n public void initialize() {\n System.out.print(\"shooter out starting\");\n isDone = false;\n shooter.shooterRaise();\n shooter.shooterMotorShootOut();\n hopper.hopperShootOut();\n }", "@Override\n public void init(String[] args) {\n super.init(args);\n\t\tbridge.connect(\"ws://localhost:9090\", true);\n\t\tlogger.info(\"Environment started, connection with ROS established.\");\t\n\t\t\n\t\t/* Subscribe for calculating the distance between the Gantry and the human */\n\t\tbridge.subscribe(SubscriptionRequestMsg.generate(\"/ariac_human/state\") \n\t\t\t\t.setType(\"ariac_msgs/msg/HumanState\") \n\t\t\t\t.setThrottleRate(1)\n\t\t\t\t.setQueueLength(1),\n\t\t\tnew RosListenDelegate() {\n\t\t\t\tpublic void receive(JsonNode data, String stringRep) {\n\t\t\t\t\tMessageUnpacker<HumanState> unpacker = new MessageUnpacker<HumanState>(HumanState.class);\n\t\t\t\t\tHumanState msg = unpacker.unpackRosMessage(data);\n\n\t\t\t\t\tgpX = msg.robot_position.x; hpX = msg.human_position.x;\n\t\t\t\t\tgpY = msg.robot_position.y; hpY = msg.human_position.y;\n\t\t\t\t\tgpZ = msg.robot_position.z;\n\t\t\t\t\t\n\t\t\t\t\tdouble distance_robotHuman = calculateDistanceRH(msg);\n\t\t\t\t\tdouble safe_distanceRH = calSafeDistanceRH(msg);\n\n\t\t\t\t\t//Check if they are approximating (getting close from each other)\n\t\t\t\t\tif(distance_robotHuman < previousDistance)\n\t\t\t\t\t\tisAproximating = true;\n\t\t\t\t\telse \n\t\t\t\t\t\tisAproximating = false;\n\t\t\t\t\tpreviousDistance = distance_robotHuman;\n\n\t\t\t\t\tlong timeNow = System.currentTimeMillis(); //Time check\n\n\t\t\t\t\tif ((distance_robotHuman < safe_distanceRH*1.75) && \n\t\t\t\t\t\t(timeNow-lastHumanState_MsgT > 20000) && (isAproximating == true)){\n\t\t\t\t\t\t//clearPercepts(\"human\");\n\t\t\t\t\t\tlastHumanState_MsgT=timeNow;\n\t\t\t\t\t\tlogger.info(\"SAFE[\"+ safe_distanceRH +\"] I see the Gantry robot in \" + distance_robotHuman +\" meters: gantry_detected\");\n\t\t\t\t\t\tLiteral gDetectedLit = new LiteralImpl(\"gantry_detected\"); \n\t\t\t\t\t\tgDetectedLit.addTerm(new NumberTermImpl(ctrDt++)); \n\t\t\t\t\t\tif(simulationStarted==true)\n\t\t\t\t\t\t\taddPercept(\"human\",gDetectedLit); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t); // END bridge.subscribe(...\"/ariac_human/state\") \n\t\n\t\t/* Subscriber for getting the information that the Gantry has been disabled */\n\t\tbridge.subscribe(SubscriptionRequestMsg.generate(\"/ariac_human/unsafe_distance\") \n\t\t\t\t.setType(\"std_msgs/Bool\")\n\t\t\t\t.setThrottleRate(1)\n\t\t\t\t.setQueueLength(1),\n\t\t\tnew RosListenDelegate() {\n\t\t\t\tpublic void receive(JsonNode data, String stringRep) {\n\t\t\t\t\tlong timeNow = System.currentTimeMillis(); //Time check\n\n\t\t\t\t\tMessageUnpacker<PrimitiveMsg<Boolean>> unpacker = new MessageUnpacker<PrimitiveMsg<Boolean>>(PrimitiveMsg.class);\n\t\t\t\t\tPrimitiveMsg<Boolean> msg = unpacker.unpackRosMessage(data);\n\t\t\t\t\tif((simulationStarted==true) && (timeNow-lastUnsafeD_MsgT > 10000)){ \n\t\t\t\t\t\t//clearPercepts(\"human\");\n\t\t\t\t\t\tlastUnsafeD_MsgT = timeNow;\n\n\t\t\t\t\t\tif(msg.data){ \n\t\t\t\t\t\t\tlogger.info(\"Gantry has been disabled!\");\n\t\t\t\t\t\t\tLiteral gUnsafeLit = new LiteralImpl(\"gantry_disabled\"); \n\t\t\t\t\t\t\tgUnsafeLit.addTerm(new NumberTermImpl(ctrUnsf++)); \n\t\t\t\t\t\t\taddPercept(\"human\",gUnsafeLit); \n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{ \n\t\t\t\t\t\t\tlogger.info(\"UAV danger!\");\n\t\t\t\t\t\t\tLiteral gUnsafeLit = new LiteralImpl(\"agv_danger\"); \n\t\t\t\t\t\t\tgUnsafeLit.addTerm(new NumberTermImpl(ctrUnsf++)); \n\t\t\t\t\t\t\taddPercept(\"human\",gUnsafeLit); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t); // END bridge.subscribe(...\"/ariac_human/unsafe_distance\") \n\t\n\t\t/* Subscriber for move_base result */\t\t\n\t\tbridge.subscribe(SubscriptionRequestMsg.generate(\"/ariac_human/position_reached\")\n\t\t\t\t.setType(\"std_msgs/Bool\")\n\t\t\t\t.setThrottleRate(1)\n\t\t\t\t.setQueueLength(1),\n\t\t\tnew RosListenDelegate() {\n\t\t\t\tpublic void receive(JsonNode data, String stringRep) {\n\t\t\t\t\tMessageUnpacker<PrimitiveMsg<Boolean>> unpacker = new MessageUnpacker<PrimitiveMsg<Boolean>>(PrimitiveMsg.class);\n\t\t\t\t\tPrimitiveMsg<Boolean> msg = unpacker.unpackRosMessage(data);\n\t\t\t\t\t//clearPercepts(\"human\");\n\t\t\t\t\tlogger.info(\"Human reached waypoint\t!\");\n\t\t\t\t\tLiteral movebase_result = new LiteralImpl(\"work_completed\"); \n\t\t\t\t\tmovebase_result.addTerm(new NumberTermImpl(cont++)); \n\t\t\t\t\tlogger.info(\"cont: \"+cont);\n\t\t\t\t\tif(simulationStarted==true)\n\t\t\t\t\t\t\taddPercept(\"human\", movebase_result);\n\t\t\t\t}\n\t\t\t}\n\t ); // END bridge.subscribe(...\"/ariac_human/position_reached\")\n\t\t\n\t\t/* Subscriber for getting the START message */\n\t\tbridge.subscribe(SubscriptionRequestMsg.generate(\"/ariac/start_human\") \n\t\t\t\t.setType(\"std_msgs/Bool\")\n\t\t\t\t.setThrottleRate(1)\n\t\t\t\t.setQueueLength(1),\n\t\t\tnew RosListenDelegate() {\n\t\t\t\tpublic void receive(JsonNode data, String stringRep) {\n\t\t\t\t\tMessageUnpacker<PrimitiveMsg<Boolean>> unpacker = new MessageUnpacker<PrimitiveMsg<Boolean>>(PrimitiveMsg.class);\n\t\t\t\t\tPrimitiveMsg<Boolean> msg = unpacker.unpackRosMessage(data);\n\t\t\t\t\t//logger.info(\"Simulation will start!\");\n\t\t\t\t\tif (msg.data){\n\t\t\t\t\t\t//clearPercepts(\"human\");\n\t\t\t\t\t\tlogger.info(\"Simulation started!\");\n\t\t\t\t\t\taddPercept(\"human\",Literal.parseLiteral(\"human_start\"));\n\t\t\t\t\t\tsimulationStarted = true; \n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t); // END bridge.subscribe(...\"/ariac/start_human\")\n\t}", "@Override\r\n\tpublic void initActions() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n isStarted = false;\n setTimeout(12);\n isDone = false;\n // Start the climb\n Robot.climber.frontDown();\n Robot.climber.rearDown();\n\n }", "@Override\n\tprotected void setup() {\n\t\tObject[] args = getArguments();\n\t\tif (args == null || args.length == 0 || !(args[0] instanceof AntConfig)) {\n\t\t\tLOG.error(\"no agent config found\");\n\t\t\tdoDelete();\n\t\t\treturn;\n\t\t}\n\t\tAntConfig config = (AntConfig) args[0];\n\t\tmsgUtil = config.getMessageUtil();\n\t\tlisteners = config.getListeners();\n\t\tString service = config.getService();\n\n\t\t// login\n\t\tDFAgentDescription[] results = findService(service, service);\n\t\tif (results == null || results.length == 0) {\n\t\t\tLOG.error(\"game service {} not found\", service);\n\t\t\tdoDelete();\n\t\t\treturn;\n\t\t}\n\t\tif (results.length > 1) {\n\t\t\tLOG.warn(\"more than once instance of service {}:{} found, defaulting to first occurrence\", service,\n\t\t\t\t\tservice);\n\t\t}\n\t\tAID antWorld = results[0].getName();\n\t\tsendLogin(antWorld);\n\t\tLOG.info(\"login message sent: {}\", getLocalName());\n\n\t\t// add behaviour for NOT_UNDERSTOOD message from antworld\n\t\tMessageTemplate mtAWNotUnderstood = MessageTemplate.and(MessageTemplate.MatchSender(antWorld),\n\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.NOT_UNDERSTOOD));\n\t\taddBehaviour(new ReceiveMessageBehaviour(mtAWNotUnderstood, this::onAWNotUnderstood));\n\n\t\t// add behaviour for INFORM message from antworld\n\t\tMessageTemplate mtAWInform = MessageTemplate.and(MessageTemplate.MatchSender(antWorld),\n\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.INFORM));\n\t\taddBehaviour(new ReceiveMessageBehaviour(mtAWInform, this::onAWInform));\n\n\t\t// add behaviour for REFUSE messag from antworld\n\t\tMessageTemplate mtAWRefuse = MessageTemplate.and(MessageTemplate.MatchSender(antWorld),\n\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.REFUSE));\n\t\taddBehaviour(new ReceiveMessageBehaviour(mtAWRefuse, this::onAWRefuse));\n\n\t\t// add behaviour for any other message\n\t\tMessageTemplate mtOther = MessageTemplate\n\t\t\t\t.not(MessageTemplate.or(mtAWNotUnderstood, MessageTemplate.or(mtAWInform, mtAWRefuse)));\n\t\taddBehaviour(new ReceiveMessageBehaviour(mtOther, this::onUnknownMessage));\n\n\t\t// add behaviour to decide and send the next action\n\t\taddBehaviour(new CyclicBehaviour(this) {\n\t\t\tprivate static final long serialVersionUID = -4875267971659894785L;\n\n\t\t\t@Override\n\t\t\tpublic void action() {\n\t\t\t\tdecideNextAction();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void autonomousInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.start();\n\t}", "private void startGame() {\r\n\t\tlog(mName + \": print an opening message (something useful, it is up to you)\");\r\n\t\tnew Thread(new Host(mRightPercent)).start();\r\n\r\n\t\tfor (Contestant c : Contestant.mGame.getContestants()) {\r\n\t\t\tlog(mName + \": Welcome \" + c.getName() + \" to the game.\");\r\n\t\t\tsynchronized (c.mConvey) {\r\n\t\t\t\tc.mConvey.notify();\r\n\t\t\t}\r\n\r\n\t\t\tsynchronized (intro) {\r\n\t\t\t\twaitForSignal(intro, null);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsynchronized (Contestant.mGame) {\r\n\t\t\tContestant.mGame.setGameStarted(true);\r\n\t\t\tContestant.mGame.notify();\r\n\t\t}\r\n\t}", "protected void initialize() {\n \tRobot.intake.runIntake(this.m_speed, this.m_speed);\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n // robot.leftBumper.setPosition(.5);\n // robot.leftStageTwo.setPosition(1);\n // robot.rightStageTwo.setPosition(0.1);\n robot.colorDrop.setPosition(0.45);\n robot.align.setPosition(0.95);\n\n // robot.rightBumper.setPosition(.7);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "@Override\n public void autonomousInit() {\n\tgameData.readGameData();\n\tautonomousCommand = (Command) chooserMode.getSelected();\n\tdriveSubsystem.resetEncoders();\n\televatorSubsystem.resetEncoder();\n\t// schedule the autonomous command\n\tif (autonomousCommand != null) {\n\t // SmartDashboard.putString(\"i\", \"nit\");\n\t autonomousCommand.start();\n\t}\n }", "public void start() {\n ArrayList<String> names = new ArrayList<>();\n game.initialize(names);\n //game.play(this.mainPkmn, this.attack);\n\n }", "protected void initialize() {\n \tSystem.out.println(\"initialize ReturnToStart\");\n \tRobot.claw.goRetract();\n \tRobot.claw.goUp();\n \tRobot.claw.goOpen();\n \tRobot.claw.spinStop();\n }", "public void startOfGame() {\r\n\t\tif (enemyTracker.allEnemiesScanned() && oneTime) {\r\n\r\n\t\t\tif (myPlaceInList == 0) {\r\n\t\t\t\tif (!enemyTracker.getEnemyList().isEmpty()) {\r\n\t\t\t\t\tradarTarget = enemyTracker.getEnemyList().get(0);\r\n\r\n\t\t\t\t\ttargetTracking.add(new AllyWithTarget(allyTracker.getMrRobots().get(myPlaceInList), radarTarget));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tradarTarget = enemyTracker.getTarget();\r\n\t\t\t\t\ttargetTracking.add(new AllyWithTarget(allyTracker.getMrRobots().get(myPlaceInList), radarTarget));\r\n\t\t\t\t}\r\n\t\t\t\tgotTarget = true;\r\n\t\t\t\tmrRobot.sendMessage(4, \"2\");\r\n\r\n\t\t\t}\r\n\t\t\toneTime = false;\r\n\t\t}\r\n\t}", "public void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\tteleopCommand = new TeleopCommand();\n }", "private void init() {\n // see if a serialized FilterAgent exists\n try {\n FilterAgent tmpFilterAgent = FilterAgent.restoreFromFile(FilterAgent.fileName);\n if (tmpFilterAgent != null) filterAgent = tmpFilterAgent;\n } catch (Exception e) {\n // no error, just catch the exception and use default/new agent\n }\n filterAgent.infoFilter = this;\n filterAgent.addCIAgentEventListener(this); // for trace msgs\n\n newsReaderAgent.addCIAgentEventListener(this);\n newsReaderAgent.initialize(); // intialize it\n newsReaderAgent.startAgentProcessing(); // start it running\n uRLReaderAgent.addCIAgentEventListener(this);\n uRLReaderAgent.initialize(); // initialize it\n uRLReaderAgent.startAgentProcessing(); // start it running\n filterAgent.initialize(); // initialize it\n filterAgent.startAgentProcessing(); // start the Filter agent thread\n openFileDialog = new java.awt.FileDialog(this);\n openFileDialog.setMode(FileDialog.LOAD);\n openFileDialog.setTitle(\"Open\");\n saveFileDialog = new java.awt.FileDialog(this);\n saveFileDialog.setMode(FileDialog.SAVE);\n saveFileDialog.setTitle(\"Save\");\n }", "protected void setup() {\n /**\n * Content manager manages the content languages and ontologies \"known\" by a given agent.\n * We register new languages that is required that our agent knows.\n * SLCodec is the codec class for the FIPA-SLn languages.\n * MobilityOntology is the class that represents the ontology used for JADE mobility.\n */\n getContentManager().registerLanguage(new SLCodec());\n getContentManager().registerOntology(MobilityOntology.getInstance());\n\n /**\n * Create containers. ProfileImpl allows us to set boot-parameters for the new containers.\n */\n homeContainer = getContainerController(); //retrieve the containercontroller that this agent lives in\n createdContainers = new AgentContainer[3]; //we require 3 containers for this scenario\n ProfileImpl curatorContainer1 = new ProfileImpl();\n curatorContainer1.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-1\");\n ProfileImpl curatorContainer2 = new ProfileImpl();\n curatorContainer2.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-2\");\n ProfileImpl artistManagerContainer = new ProfileImpl();\n artistManagerContainer.setParameter(ProfileImpl.CONTAINER_NAME, \"Artistmanager-Container\");\n createdContainers[0] = runtime.createAgentContainer(curatorContainer1);\n createdContainers[1] = runtime.createAgentContainer(curatorContainer2);\n createdContainers[2] = runtime.createAgentContainer(artistManagerContainer);\n doWait(2000); //wait while containers initializes\n\n /**\n * Request a list of all containers on the platform from AMS\n */\n getAllContainers();\n\n /**\n * Initialize gui\n */\n\n myGui = new ControllerAgentGUI(this, (String[]) containersOnPlatform.keySet().toArray(new String[containersOnPlatform.keySet().size()]));\n myGui.setVisible(true);\n }", "@Override\n\tpublic void teleopInit() {\n\t\tservoCIMCommand.start();\n\t\tmonitorCommand.start();\n\t\twindowCommand.start();\n\t\t\n\t}", "@Override\n\tpublic void teleopInit() {\n\t\tif (driveTrainCommand != null) {\n\t\t\tdriveTrainCommand.start();\n\t\t}\n\t\tif (colorCommand != null) {\n\t\t\tcolorCommand.start();\n\t\t}\n\t\tif (intakeCommand != null) {\n\t\t\tintakeCommand.start();\n\t\t}\n\t\tif (outtakeCommand != null) {\n\t\t\touttakeCommand.start();\n\t\t}\n\t}", "public void init()\r\n {\r\n m_active = false;\r\n m_entryTimes = new HashMap<String, Long>();\r\n m_tsm = BotAction.getBotAction().getTSM();\r\n m_tsm.setOperatorLevel(ER_LEVEL);\r\n registerSettings();\r\n m_tsm.addTSChangeListener(this);\r\n m_botAction.setPlayerPositionUpdating(500);\r\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n telemetry.addData(\"Status\", \"Initialized\");\n }", "protected void initialize() {\n \tRobot.telemetry.setAutonomousStatus(\"Starting \" + commandName + \": \" + distance);\n \tRobot.drivetrain.resetEncoder();\n \t\n \tRobot.driveDistancePID.setSetpoint(distance);\n \tRobot.driveDistancePID.setRawTolerance(RobotPreferences.drivetrainTolerance());\n \tRobot.driveDistancePID.enable();\n \t\n \texpireTime = timeSinceInitialized() + (RobotPreferences.timeOut());\n }", "protected void initialize() {\n \tif ((deploy && Robot.intake.getHopperTracker() == Status.deployed) || \n \t\t\t(!deploy && Robot.intake.getHopperTracker() == Status.stowed)) {\n \t\t// Hopper is already in desired position, so do nothing\n \t\twaitForMovement = false;\n \t} else if (deploy && (Robot.intake.getIntakeTracker() != Status.deployed)) {\n \t\t// Can't deploy hopper if intake is not deployed (ie., if stowed or unknown or moving)\n \t\twaitForMovement = false;\n \t} else {\n \t\t// OK, we can move the hopper\n \t\twaitForMovement = true;\n \t\tRobot.intake.setHopperTracker(Status.unknown);\t// put in unknown state while hopper is moving\n \tif (deploy) Robot.intake.deployHopper();\n \telse { Robot.intake.stowHopper(); }\n \t}\n }", "@Override\n\tprotected void start() {\n\t\tif (Cfg.DEBUG) {\n\t\t\tCheck.log(TAG + \" (actualStart)\");\n\t\t}\n\t\treadChatMessages();\n\t}", "private void start() {\n \t\tisFinished = false;\n \t\trunning = true;\n \t\tpluginHandler.startAll();\n \t\tThread engine = new Thread(this, \"engine\");\n \t\tengine.start();\n \t\tissueHandler.checkAllIssues();\n \t}", "protected void init_actions()\r\n {\r\n action_obj = new CUP$CircuitCup$actions(this);\r\n }", "protected void initialize() {\n \tif (state == PistonPositions.Extended) moving = Robot.armPiston.smartExtend();\n \telse Robot.armPiston.smartRetract();\n }", "public void initialize() {\n\tMain.getPartida().recuperarData();\n\taction();\n\t\n\t}", "public void robotInit()\n\t{\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\t// autonomousCommand = new Driver();\n\t}", "@Override\n protected void initialize() {\n Start = Robot.m_drivetrain.getAngle();\n if (TurnGoal >= 0) {\n IsLeft = false;\n } else {\n IsLeft = true;\n }\n SmartDashboard.putNumber(\"TurnCommand_TurnGoal\", TurnGoal);\n SmartDashboard.putBoolean(\"TurnCommand Is Left\", IsLeft);\n }", "@Override\n public void initComponent() {\n ActionManager am = ActionManager.getInstance();\n }", "@Override\n public void startAgents(IOfflineMessageServer messageServer) {\n \n for (IAgentConfig agentConfig : this.agentConfigs) {\n OfflineAgentRunnable agentRunnable = new OfflineAgentRunnable(\n agentConfig.getAgentClass(), agentConfig.getAgentName(), messageServer);\n \n this.agentRunnables.add(agentRunnable); \n }\n \n for (OfflineAgentRunnable agentRunnable : this.agentRunnables) {\n agentRunnable.run(); \n }\n }", "@Override\r\n\tprotected void setup()\r\n\t{\r\n\r\n\t\t//adding the desired behaviour to the agent\r\n\t\taddBehaviour(new RoadAgentBehaviour(this));\r\n\t}", "public void start(){\n started = true;\n bot.setHumanInputEnabled(false);\n scriptStart();\n }", "@Override\n public void preStart() {\n greeter = getContext().actorOf(Props.create(Greeter.class), \"greeter\");\n System.out.println(\"Greeter actor path:\" + greeter.path());\n // tell it to perform the greeting\n greeter.tell(new Message(2, Arrays.asList(\"2\", \"dsf\")), getSelf());\n }", "public final void begin() {\n Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {\n public void uncaughtException(Thread t, Throwable e) {\n\t\t\t\t/*\n\t\t\t\t * Thread interruptions will always throw a thread death exception, and since thread.stop()\n\t\t\t\t * is called from another thread, this default exception handler always receives the throwable, even if thread.stop is surrounded\n\t\t\t\t * by a try-catch.\n\t\t\t\t * TLDR; dont print em...\n\t\t\t\t */\n if (e instanceof ThreadDeath) return;\n log(Level.SEVERE, e.getClass().getSimpleName() + \" caught in thread \" + t.getName() + \": \" + e.getMessage());\n for (StackTraceElement ste : e.getStackTrace()) {\n log(Level.SEVERE, ste.toString());\n }\n }\n });\n\t\t/*\n\t\t * Load the random event pool\n\t\t */\n if (!(this instanceof RandomEvent)) {\n context.randomEvents = new RandomEventPool(context);\n }\n\t\t\n\t\t/*\n\t\t * Check if the script wants to execute\n\t\t */\n boolean initialized = false;\n try {\n initialized = init();\n } catch (Exception exc) {\n //ignore it\n }\n if (!initialized) {\n log(Level.WARNING, \"Script \" + manifest.name() + \" refused to start.\");\n context.getBot().popScript();\n }\n }", "@Override\n public void init() {\n \n \n rightFront = hardwareMap.dcMotor.get(\"frontR\");\n rightBack = hardwareMap.dcMotor.get(\"backR\");\n \n \n \n rightFront.setDirection(DcMotor.Direction.FORWARD); \n rightBack.setDirection(DcMotor.Direction.FORWARD);\n \n \n \n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "public void start() {\n this.messenger.start();\n }", "@Override\r\n\t\tpublic void action() {\n\t\t\tswitch (state) {\r\n\t\t\tcase REGISTER:\r\n\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t+ \" trying to register\");\r\n\t\t\t\t\r\n\t\t\t\t// searching for waiter agent\r\n\t\t\t\twhile(waiter == null) {\r\n\t\t\t\t\twaiter = searchWaiterAgent(\"waiter-service\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tACLMessage cfp = new ACLMessage(ACLMessage.CFP);\r\n\t\t\t\tcfp.addReceiver(waiter);\r\n\t\t\t\tcfp.setContent(\"philosopher-agent\");\r\n\t\t\t\tcfp.setConversationId(\"philosopher-waiter-fork\");\r\n\t\t\t\tcfp.setReplyWith(\"cfp\"+System.currentTimeMillis());\r\n\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t+ \" send registration request \" + cfp);\r\n\t\t\t\tmyAgent.send(cfp);\r\n\t\t\t\t\r\n\t\t\t\t// Prepare template to get response\r\n\t\t\t\t//mt = MessageTemplate.and(MessageTemplate.MatchConversationId(\"philosopher-waiter-fork\"),\r\n\t\t\t\t//\t\tMessageTemplate.MatchInReplyTo(request.getReplyWith()));\r\n\t\t\t\tmt = MessageTemplate.MatchConversationId(\"philosopher-waiter-fork\");\r\n\t\t\t\tstate = State.REGISTERED;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase REGISTERED:\r\n\t\t\t\tACLMessage response = myAgent.receive();\r\n\t\t\t\tif (response != null && response.getConversationId().equals(\"philosopher-waiter-fork\")) {\r\n\t\t\t\t\tif (response.getPerformative() == ACLMessage.SUBSCRIBE) {\r\n\t\t\t\t\t\t// behaviour can be finished\r\n\t\t\t\t\t\tregistered = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t\t\t+ \" registered Successfully\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tregistered = false;\r\n\t\t\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t\t\t+ \" registration in progress\");\r\n\t\t\t\t\t\tstate = State.REGISTER;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(myAgent.getAID().getName() + \" blocked\");\r\n\t\t\t\t\tblock();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}", "protected void setup() {\n \tObject[] args = getArguments();\r\n \tif (args != null && args.length > 0) {\r\n \t\tnResponders = args.length;\r\n \t\tenvironment = (String) args[0];\r\n \t\t\r\n \t\tACLMessage msg = new ACLMessage(ACLMessage.QUERY_IF);\r\n \t\tmsg.addReceiver(new AID(environment, AID.ISLOCALNAME));\r\n \t\tmsg.setContent(WARN_ME_ABOUT_VIOLATORS);\r\n \t\tsend(msg);\r\n \t\tACLMessage msg2 = null;\r\n \t\twhile (msg2 == null) {\r\n \t\t\tmsg2 = receive();\r\n \t\t\tif (msg2 != null && \"OK\".equals(msg2.getContent())) {\r\n \t\t\t\tprintAgentMessage(\"Guarda de transito inicia ronda!\");\r\n \t\t\t\taddBehaviour(new LookforViolator(this));\r\n \t\t\t}\r\n \t\t\telse msg2 = null;\r\n \t\t}\r\n \t\t\r\n \t}\r\n \telse {\r\n \t\tSystem.out.println(\"No responder specified.\");\r\n \t}\r\n }", "@Override\r\n\tpublic void preStart() throws Exception {\n\t\tgetContext().actorOf(ClassifyingActor.props(\"context\"), \"ca1\");\r\n\t getContext().actorOf(ClassifyingActor.props(\"gender\"), \"ca2\");\r\n\t getContext().actorOf(ClassifyingActor.props(\"language\"), \"ca3\");\r\n\t getContext().actorOf(ClassifyingActor.props(\"spam\"), \"ca4\");\r\n\t \r\n\t}", "private void init() \n\t{\n\t\tgoalReached = false;\n\t\tGdx.input.setInputProcessor(this);\n\t\tcameraHelper = new CameraHelper();\n\t\tlives = Constants.LIVES_START;\n\t\tlivesVisual = lives;\n\t\ttimeLeftGameOverDelay = 0;\n\t\tinitLevel();\n\n\t}", "public void teleopInit() {\n // Initalize test command\n Jagbot.isAutonomous = false;\n MessageWindow.write(1, \"Robot init\");\n //testCommand = new TestCommand();\n //testCommand.start();\n }", "@Override\n\tprotected void onInitialAgentsCreation() {\n\t\tSystem.out.println(\"Création drones\");\n\t\tDrone drone = null;\n\t\tDroneBuilder droneBuilder;\n\t\tfor (int i = 0; i < INITIAL_DRONE_COUNT; i++) {\n\t\t\tdrone = new Drone(this, getEnvironment().getRandom().nextInt(World.WIDTH), getEnvironment().getRandom().nextInt(World.HEIGHT));\n\t\t\tdroneBuilder = new DroneBuilder();\n\t\t\tdroneBuilder.setDrone(drone);\n\t\t\tdroneBuilder.buildBehaviorStates();\n\t\t\tdroneBuilder.buildAgentPhase();\n\t\t}\n\t}", "public void start() {\n\n\t\t// There will be no established screen at startup.\n\t\tif (screen != null)\n\t\t\tthrow new RuntimeException(\"Multiple instances of the game cannot be run.\");\n\n\t\t// Fire up the main menu screen.\n\t\tsetCurrentScreen(new MainMenuScreen());\n\t}", "@Override\n public void teleopInit() {\n if (autonomousCommand != null) \n {\n autonomousCommand.cancel();\n }\n\n new ArcadeDrive().start();\n\n new BackElevatorControl().start();\n\n new IntakeControl().start();\n\n new FrontElevatorManual().start();\n\n new ElevatorAutomatic().start();\n }", "private void initBeginOfTurn()\n\t{\n\t\tfor(Action action : this.getCurrentPlayer().getPersonalityCard().getActions())\n\t\t{\n\t\t\taction.execute(this);\n\t\t}\n\t\t\n\t\tcanPlayPlayerCard = true;\n\t\tthis.getCurrentPlayer().getDataInput().printMessage(this.getEntireGameStatus());\n\t\tthis.getCurrentPlayer().getDataInput().printMessage(this.getCurrentPlayerGameStatus());\n\t\tthis.showSaveGame = true;\n\t\t\n\t\tfor(Card card : this.getCurrentPlayer().getCityAreaCardDeck())\n\t\t{\n\t\t\tcard.setActiveState(true);\n\t\t}\n\t}", "public void beginControl() {\n\t\tCommandInfo curCommand;\n\t\tCommandExecutor curCommandExecuter;\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\t//take command from the queue\n\t\t\t\tcurCommand = commandsQueue.take();\n\t\t\t} catch(Exception e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t//execute the command\n\t\t\t\tcurCommandExecuter = this.nameCommandMap.get(curCommand.name);\n\t\t\t\tcurCommandExecuter.execute(curCommand.additionalInfo);\n\t\t\t} catch(NewGameException e) {\n\t\t\t\tSystem.out.println(\"Starting new Game!\");\n\t\t\t\tthis.startCountTime();\n\t\t\t} catch(EndGameException e) {\n\t\t\t\tbreak;\n\t\t\t} catch(Exception ignored) {\n\t\t\t}\n\t\t}\n\t\t//stop time counter thread and stop controller's action .\n\t\tthis.stopCountTime();\n\t\tSystem.exit(0);\n\t}", "@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}", "@Override\r\n\t\tpublic void action() {\n\t\t\t\r\n\t\t\tACLMessage request = new ACLMessage (ACLMessage.REQUEST);\r\n\t\t\trequest.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n\t\t\trequest.addReceiver(new AID(\"BOAgent\",AID.ISLOCALNAME));\r\n\t\t\trequest.setLanguage(new SLCodec().getName());\t\r\n\t\t\trequest.setOntology(RequestOntology.getInstance().getName());\r\n\t\t\tInformMessage imessage = new InformMessage();\r\n\t\t\timessage.setPrice(Integer.parseInt(price));\r\n\t\t\timessage.setVolume(Integer.parseInt(volume));\r\n\t\t\ttry {\r\n\t\t\t\tthis.agent.getContentManager().fillContent(request, imessage);\r\n\t\t\t} catch (CodecException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (OntologyException 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\tthis.agent.addBehaviour(new AchieveREInitiator(this.agent, request)\r\n\t\t\t{\t\t\t\r\n\t\t\t/**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = -8866775600403413061L;\r\n\r\n\t\t\t\tprotected void handleInform(ACLMessage inform)\r\n\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}", "protected void init_actions()\n {\n action_obj = new CUP$include$actions(this);\n }", "private void prepareAgents() {\n\t\tGodsProperties.setGodsStatus(GodsStatus.PREPARING);\n\n\t\t// Send prepare events to all agents\n\t\tfor (String host : GodsProperties.getHosts()) {\n\n\t\t\tPrepareEvent prepareEvent = new PrepareEvent(1);\n\n\t\t\tint[] slotsRange = getSlotRangeFor(host);\n\t\t\tprepareEvent.setSlotsRange(slotsRange);\n\n\t\t\tControlCenter.getInstance().notifyAgent(host, prepareEvent);\n\t\t\tlog.info(\"Sent Prepare Event to:\" + host + \" with slots range: [\"\n\t\t\t\t\t+ slotsRange[0] + \" - \" + slotsRange[1] + \"]\");\n\t\t}\n\t}", "public void start() {\n mStateMachine.sendMessage(SoftApStateMachine.CMD_START, mApConfig);\n }", "@Override\n public void robotInit() {\n\toi = new OI();\n\tgameData = new GameData();\n\tcubeVision.start();\n\n\tinitializeDashboard();\n }", "@Override\n\tpublic void teleopInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.cancel();\n\t}", "void initialize() {\n refreshIntents();\r\n\r\n initialized = true;\r\n\r\n }", "@Override\n public synchronized void start() {\n init();\n }", "public abstract void init_actions() throws Exception;", "protected void init_actions()\n {\n action_obj = new CUP$CompParser$actions(this);\n }", "@Override\n\tpublic void robotInit() {\n\t\tSmartDashboard.putData(new TestLIDARCommand());\n\n\t\tdriveSubsystem = new DriveSubsystem();\n\t\tshooterSubsystem = new ShooterSubsystem();\n\t\tfeederSubsystem = new FeederSubsystem();\n\t\tintakeSubsystem = new IntakeSubsystem();\n\t\tgearSubsystem = new GearSubsystem();\n\t\tclimberSubsystem = new ClimberSubsystem();\n\t\tcameraSubsystem = new CameraSubsystem();\n\n\t\tnavigator = new Navigator();\n\t\toi = new OI();\n\n\t\tm_chooser = new SendableChooser<>();\n\t\tm_chooser.addDefault(\"Do Nothing\", new PistonReleaseCommand());\n\t\t//m_chooser.addObject(\"Boiler Auto (side hopper)\", new SelectBoilerAutoCommand());\n\t\tm_chooser.addObject(\"Boiler Auto (front hopper)\", new SelectBoilerAutoFrontCommand());\n\t\tm_chooser.addObject(\"Test drive straight\", new MeasureDistanceCommand(1500, 100000));\n\t\tm_chooser.addObject(\"Test max speed\", new TimedDriveCommand(5.0, 1.00));\n\t\tm_chooser.addObject(\"Gear Auto (boiler)\", new SelectGearBoilerCommand());\n\t\tm_chooser.addObject(\"Gear Auto (feeder)\", new SelectGearFeederCommand());\n\t\tm_chooser.addObject(\"Gear Auto (middle)\", new SelectGearMiddleAutoCommand());\n\t\tSmartDashboard.putData(\"Auto mode\", m_chooser);\n\n\t\tRobot.navigator.startMeasuringDistance();\n\t}", "private void initShooter() {\n m_task = new ShooterThread(this);\n m_task.start();\n }", "public void onStart() {\n\t new Thread() {\n\t @Override public void run() {\n\t receive();\n\t }\n\t }.start();\n\t }", "@Override\n\tprotected void execute() {\n\t\tRobot.collector.setMawOpen(Robot.oi.getCollectorOpen());\n\t\tRobot.collector.setIntakeSpeed(Robot.oi.getCollectorSpeed());\n\t\tRobot.collector.setWristStageOneRetracted(Robot.oi.getWristStageOneRetracted());\n\t\tRobot.collector.setWristStageTwoRetracted(Robot.oi.getWristStageTwoRetracted());\n\t}", "public void start() {\n\t\tconnection.start((sender, message) -> message.accept(new Visitor(sender)));\n\t\tloadData();\n\t}", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }" ]
[ "0.65650463", "0.6433548", "0.6316348", "0.6226614", "0.62156534", "0.62010556", "0.6194444", "0.6191234", "0.61623317", "0.61325705", "0.6042222", "0.59962523", "0.5987287", "0.596843", "0.5920479", "0.59194255", "0.59121525", "0.5908909", "0.5908361", "0.5903139", "0.58594644", "0.58297426", "0.581401", "0.58115554", "0.5810836", "0.58086467", "0.5804832", "0.5789084", "0.5763308", "0.57567716", "0.57561094", "0.575319", "0.5749098", "0.574085", "0.5733956", "0.5715267", "0.5707045", "0.57070255", "0.5705095", "0.5668215", "0.5666018", "0.5664527", "0.5653134", "0.56523657", "0.56438756", "0.5640159", "0.5635542", "0.56328166", "0.5629035", "0.56280667", "0.5625353", "0.56168133", "0.56162345", "0.5616183", "0.5614098", "0.56131613", "0.56084955", "0.5605168", "0.56025493", "0.5600074", "0.55995893", "0.5597017", "0.55900085", "0.5587079", "0.55833834", "0.5574599", "0.55707484", "0.55690086", "0.5567263", "0.5563489", "0.55586666", "0.55576205", "0.55492306", "0.5547303", "0.5540761", "0.5540518", "0.552897", "0.552372", "0.55220026", "0.5520102", "0.5512716", "0.5503235", "0.5500293", "0.5495286", "0.54949105", "0.5492607", "0.5481649", "0.5481576", "0.5473833", "0.54663545", "0.54661167", "0.5466092", "0.54605377", "0.54596835", "0.54535514", "0.5453149", "0.5450286", "0.54474694", "0.54474694", "0.54474694", "0.54474694" ]
0.0
-1
/ this is executed periodically by the agent; use the executeInterval in the XML file to configure how often exactly this is probably where the bulk of your logic will go; if you are not using a listener to receive messages (see WorkerBean.java), you can use memory.readAll or memory.removeAll to get messages from the memory, where they are stored when received; make sure to remove messages from memory to not create a memory leak you may find the methods thisAgent::getAgentNode and thisAgent::searchAllAgents useful for finding your fellow Worker agents. Examples are included in here
@Override public void execute() { log.info("running..."); /* example for finding the server agent */ IAgentDescription serverAgent = thisAgent.searchAgent(new AgentDescription(null, "ServerAgent", null, null, null, null)); if (serverAgent != null) { this.server = serverAgent.getMessageBoxAddress(); // TODO if (!hasGameStarted) { StartGameMessage startGameMessage = new StartGameMessage(); startGameMessage.brokerId = thisAgent.getAgentId(); startGameMessage.gridFile = "/grids/h_01.grid"; // Send StartGameMessage(BrokerID) sendMessage(server, startGameMessage); reward = 0; this.hasGameStarted = true; } } else { System.out.println("SERVER NOT FOUND!"); } /* example of handling incoming messages without listener */ for (JiacMessage message : memory.removeAll(new JiacMessage())) { Object payload = message.getPayload(); if (payload instanceof StartGameResponse) { /* do something */ // TODO StartGameResponse startGameResponse = (StartGameResponse) message.getPayload(); this.maxNum = startGameResponse.initialWorkers.size(); this.agentDescriptions = getMyWorkerAgents(this.maxNum); this.gameId = startGameResponse.gameId; /** * * DEBUGGING * */ System.out.println("SERVER SENDING " + startGameResponse.toString()); // TODO handle movements and obstacles this.gridworldGame = new GridworldGame(); this.gridworldGame.obstacles.addAll(startGameResponse.obstacles); // TODO nicht mehr worker verwenden als zur Verfügung stehen /** * Initialize the workerIdMap to get the agentDescription and especially the * MailBoxAdress of the workerAgent which we associated with a specific worker * for (Worker worker: startGameResponse.initialWorkers) { workerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker))); workerIdReverseAId.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id); } */ /** * Send the Position messages to each Agent for a specific worker * PositionMessages are sent to inform the worker where it is located * additionally put the position of the worker in the positionMap */ for (Worker worker: startGameResponse.initialWorkers) { positionMap.put(worker.id, worker.position); workerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker))); workerIdReverseAID.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id); IAgentDescription agentDescription = workerIdMap.get(worker.id); ICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress(); // Send each Agent their current position PositionMessage positionMessage = new PositionMessage(); positionMessage.workerId = agentDescription.getAid(); positionMessage.gameId = startGameResponse.gameId; positionMessage.position = worker.position; positionMessage.workerIdForServer = worker.id; //System.out.println("ADDRESS IS " + workerAddress); sendMessage(workerAddress, positionMessage); //break; } hasAgents = true; for (Order order: savedOrders) { // 3 Runden anfangs zum Initialisieren ICommunicationAddress workerAddress = decideOrderAssigment(order); Position workerPosition = null; for (IAgentDescription agentDescription: agentDescriptions) { if (agentDescription.getMessageBoxAddress().equals(workerAddress)) { String workerId = workerIdReverseAID.get(agentDescription.getAid()); workerPosition = positionMap.get(workerId); break; } } int steps = workerPosition.distance(order.position) + 2; int rewardMove = (steps > order.deadline)? 0 : order.value - steps * order.turnPenalty; System.out.println("REWARD: " + rewardMove); if(rewardMove > 0) { TakeOrderMessage takeOrderMessage = new TakeOrderMessage(); takeOrderMessage.orderId = order.id; takeOrderMessage.brokerId = thisAgent.getAgentId(); takeOrderMessage.gameId = gameId; sendMessage(server, takeOrderMessage); // Save order into orderMap this.orderMap.put(order.id, order); } } } if (payload instanceof PositionConfirm) { PositionConfirm positionConfirm = (PositionConfirm) message.getPayload(); if(positionConfirm.state == Result.FAIL) { String workerId = workerIdReverseAID.get(positionConfirm.workerId); IAgentDescription agentDescription = workerIdMap.get(workerId); ICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress(); PositionMessage positionMessage = new PositionMessage(); positionMessage.workerId = agentDescription.getAid(); positionMessage.gameId = positionConfirm.gameId; positionMessage.position = positionMap.get(workerId); positionMessage.workerIdForServer = workerId; sendMessage(workerAddress, positionMessage); } else { activeWorkers.add(message.getSender()); for (String orderId: orderMessages) { ICommunicationAddress workerAddress = decideOrderAssigment(this.orderMap.get(orderId)); if(workerAddress.equals(message.getSender())){ AssignOrderMessage assignOrderMessage = new AssignOrderMessage(); assignOrderMessage.order = this.orderMap.get(orderId); assignOrderMessage.gameId = gameId; assignOrderMessage.server = this.server; if(activeWorkers.contains(workerAddress)){ sendMessage(workerAddress, assignOrderMessage); } } } } } if (payload instanceof OrderMessage) { // TODO entscheide, ob wir die Order wirklich annehmen wollen / können OrderMessage orderMessage = (OrderMessage) message.getPayload(); if (!hasAgents){ savedOrders.add(orderMessage.order); continue; }else { Order thisOrder = orderMessage.order; ICommunicationAddress workerAddress = decideOrderAssigment(thisOrder); Position workerPosition = null; for (IAgentDescription agentDescription: agentDescriptions) { if (agentDescription.getMessageBoxAddress().equals(workerAddress)) { String workerId = workerIdReverseAID.get(agentDescription.getAid()); workerPosition = positionMap.get(workerId); break; } } // 3 Runden anfangs zum Initialisieren int steps = workerPosition.distance(thisOrder.position) + 1; int rewardMove = (steps > thisOrder.deadline)? 0 : thisOrder.value - steps * thisOrder.turnPenalty; System.out.println("REWARD: " + rewardMove); if(rewardMove > 0) { TakeOrderMessage takeOrderMessage = new TakeOrderMessage(); takeOrderMessage.orderId = orderMessage.order.id; takeOrderMessage.brokerId = thisAgent.getAgentId(); takeOrderMessage.gameId = orderMessage.gameId; sendMessage(server, takeOrderMessage); // Save order into orderMap Order order = ((OrderMessage) message.getPayload()).order; this.orderMap.put(order.id, order); } } /** * * DEBUGGING * */ System.out.println("SERVER SENDING " + orderMessage.toString()); // Save order into orderMap } if (payload instanceof TakeOrderConfirm) { // TODO // Got Order ?! TakeOrderConfirm takeOrderConfirm = (TakeOrderConfirm) message.getPayload(); Result result = takeOrderConfirm.state; /** * * DEBUGGING * */ System.out.println("SERVER SENDING " + takeOrderConfirm.toString()); if (result == Result.FAIL) { // Handle failed confirmation // Remove order from orderMap as it was rejected by the server this.orderMap.remove(takeOrderConfirm.orderId); continue; } // TODO send serverAddress // Assign order to Worker(Bean) // Send the order to the first agent AssignOrderMessage assignOrderMessage = new AssignOrderMessage(); assignOrderMessage.order = this.orderMap.get(takeOrderConfirm.orderId); assignOrderMessage.gameId = takeOrderConfirm.gameId; assignOrderMessage.server = this.server; ICommunicationAddress workerAddress = decideOrderAssigment(assignOrderMessage.order); if(activeWorkers.contains(workerAddress)){ sendMessage(workerAddress, assignOrderMessage); } else { orderMessages.add(takeOrderConfirm.orderId); } } if (payload instanceof AssignOrderConfirm) { // TODO AssignOrderConfirm assignOrderConfirm = (AssignOrderConfirm) message.getPayload(); Result result = assignOrderConfirm.state; if (result == Result.FAIL) { // Handle failed confirmation // TODO ICommunicationAddress alternativeWorkerAddress = getAlternativeWorkerAddress(((AssignOrderConfirm) message.getPayload()).workerId); reassignOrder(alternativeWorkerAddress, assignOrderConfirm); continue; } orderMessages.remove(assignOrderConfirm.orderId); // TODO Inform other workers that this task is taken - notwendig?? } if (payload instanceof OrderCompleted) { OrderCompleted orderCompleted = (OrderCompleted) message.getPayload(); Result result = orderCompleted.state; if (result == Result.FAIL) { // TODO Handle failed order completion -> minus points for non handled rewards reward += orderCompleted.reward; continue; } reward += orderCompleted.reward; // TODO remove order from the worker specific order queues } if (payload instanceof PositionUpdate) { PositionUpdate positionUpdate = (PositionUpdate) message.getPayload(); updateWorkerPosition(positionUpdate.position, positionUpdate.workerId); } if (payload instanceof EndGameMessage) { EndGameMessage endGameMessage = (EndGameMessage) message.getPayload(); // TODO lernen lernen lernen lol System.out.println("Reward: " + endGameMessage.totalReward); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n \t@Override\n \tpublic void run() {\n \t\tif (--interval > 0) {\n\t\t\tinterval = 1;\n \t\t\treturn;\n \t\t}\n \n \t\t// First try to connect\n \t\tif (!mbeanClient.isConnected()) {\n \t\t\tmbeanClient.connect();\n \t\t}\n \n \t\t// If it can not be connected, make an error message.\n \t\tif (!mbeanClient.isConnected()) {\n \t\t\tinterval = ERRORS;\n \t\t\treturn;\n \t\t}\n \n \t\t// mbeanClient.flush();\n \t\tList<MonitorCollectionInfoDomain> mxBeans = collection.getMXBean();\n \t\tfor (MonitorCollectionInfoDomain mxBean : mxBeans) {\n \t\t\ttry {\n \t\t\t\tCompositeData cd = (CompositeData) mbeanClient.getAttribute(mxBean.getObjectName(),\n \t\t\t\t\t\tmxBean.getAttrName());\n \n \t\t\t\tClass<? extends MonitorInfo> returnClass = (Class<? extends MonitorInfo>) Class.forName(cd\n \t\t\t\t\t\t.getCompositeType().getTypeName());\n \t\t\t\tMonitorInfo retData = returnClass.newInstance();\n \t\t\t\tretData.parse(cd);\n \n \t\t\t\t// new time?\n \t\t\t\tretData.setCollectTime(System.currentTimeMillis());\n \n \t\t\t\tStringBuffer methodName = new StringBuffer().append(MonitorConstants.RECODER_METHOD_PREFIX).append(\n \t\t\t\t\t\tretData.getClass().getSimpleName());\n \n\t\t\t\tMethod method = recoder.getClass().getMethod(methodName.toString(), key.getClass(), retData.getClass(),\n\t\t\t\t\t\tagentInfo.getClass());\n \n \t\t\t\tif (method != null) {\n \t\t\t\t\tmethod.invoke(recoder, key, retData, agentInfo);\n \t\t\t\t}\n \t\t\t} catch (Exception e) {\n \t\t\t\tLOG.error(\"Error while MonitorExecutorWorker is runnng. Disconnect this MBean client.\", e);\n \t\t\t\tmbeanClient.disconnect();\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}", "private VoltTable[] getMemoryData(long interval, final long now) {\n ParameterSet parameters = new ParameterSet();\n parameters.setParameters((byte)interval, now);\n \n return this.executeOncePerSite(SysProcFragmentId.PF_nodeMemory,\n SysProcFragmentId.PF_nodeMemoryAggregator,\n parameters);\n }", "private static void getMessagesFromMaster() {\r\n while (true) {\r\n SocketMessage sm = socket_to_master.getMessage();\r\n\r\n /* GC debugging: report GC usage: */\r\n GcTracker.report();\r\n\r\n if (sm.getMessageNum() == SocketMessage.WORK_TO_SLAVE) {\r\n /* Start the thread that processes the Work list: */\r\n new SlaveWorker((Work) sm.getData()).start();\r\n }\r\n\r\n else if (sm.getMessageNum() == SocketMessage.REQUEST_SLAVE_STATISTICS) {\r\n /* Data received from master: */\r\n /* long[0]: request_sequence_number */\r\n /* long[1]: last_interval */\r\n /* long[2]: last_warmup */\r\n long[] info = (long[]) sm.getData();\r\n long request_number = info[0];\r\n boolean last_interval = info[1] != 0;\r\n boolean last_warmup = info[2] != 0;\r\n\r\n Fifo.printFifoStatuses();\r\n\r\n if (ThreadMonitor.active()) {\r\n ThreadMonitor.reportAllDetail(ThreadMonitor.getAllData());\r\n ThreadMonitor.saveAllPrevious();\r\n }\r\n\r\n /* Check with the UserClass code: */\r\n Vector userdata = User.ControlUsers.getIntervalDataForMaster();\r\n\r\n /* Forcing delay in the return of statistics: */\r\n if (common.get_debug(common.HOLD_UP_STATISTICS) && request_number % 5 == 0)\r\n common.sleep_some(3000);\r\n\r\n /* Send all data to the master: */\r\n SlaveStats sts = CollectSlaveStats.getStatsForMaster(request_number, last_interval, last_warmup);\r\n sts.setUserData(userdata);\r\n sm = new SocketMessage(SocketMessage.SLAVE_STATISTICS, sts);\r\n socket_to_master.putMessage(sm);\r\n\r\n if (common.get_debug(common.PRINT_MEMORY)) {\r\n common.memory_usage();\r\n Native.printMemoryUsage();\r\n }\r\n }\r\n\r\n else if (sm.getMessageNum() == SocketMessage.USER_DATA_TO_SLAVES)\r\n ControlUsers.receivedIntervalDataFromMaster((UserData[]) sm.getData());\r\n\r\n else if (sm.getMessageNum() == SocketMessage.GET_LUN_INFO_FROM_SLAVE) {\r\n InfoFromHost hinfo = (InfoFromHost) sm.getData();\r\n InfoFromHost.getInfoForMaster(hinfo);\r\n\r\n /* This call assures that remote clients also have their maps cleaned up: */\r\n if (hinfo.validate)\r\n MapFile.cleanupOrphanMapFiles();\r\n }\r\n\r\n else if (sm.getMessageNum() == SocketMessage.SLAVE_GO) {\r\n if (SlaveWorker.work == null)\r\n common.failure(\"Received 'SLAVE_GO' message without first receiving Work\");\r\n\r\n /* Before we start all work, get the thread monitor baselines: */\r\n if (ThreadMonitor.active()) {\r\n ThreadMonitor.getAllData();\r\n ThreadMonitor.saveAllPrevious();\r\n }\r\n\r\n wait_to_run.release();\r\n\r\n /* Get starting stats to prepare for first interval: */\r\n if ((common.onSolaris() || common.onWindows()) && SlaveJvm.isFirstSlaveOnHost()) {\r\n CpuStats.getNativeCpuStats();\r\n CollectSlaveStats.getAllKstatData();\r\n\r\n if (common.onSolaris())\r\n NfsStats.getAllNfsDeltasFromKstat();\r\n\r\n if (SlaveWorker.work.nw_monitor_now)\r\n NwStats.loadStatistics();\r\n }\r\n\r\n }\r\n\r\n else if (sm.getMessageNum() == SocketMessage.WORKLOAD_DONE) {\r\n SlaveJvm.setWorkloadDone(true);\r\n SlaveJvm.setMasterDone();\r\n Fifo.printQueues();\r\n }\r\n\r\n else if (sm.getMessageNum() == SocketMessage.CLEAN_SHUTDOWN_SLAVE) {\r\n common.ptod(\"Master is requesting slave shutdown\");\r\n break;\r\n }\r\n\r\n else if (sm.getMessageNum() == SocketMessage.MASTER_ABORTING) {\r\n master_aborting = true;\r\n\r\n /* Is it really worth it trying to shut down everything nicely? No! */\r\n common.failure(master_abort_msg);\r\n\r\n }\r\n\r\n else if (sm.getMessageNum() == SocketMessage.HEARTBEAT_MESSAGE) {\r\n SlaveJvm.sendMessageToMaster(SocketMessage.HEARTBEAT_MESSAGE);\r\n }\r\n\r\n else if (sm.getMessageNum() == SocketMessage.STOP_NEW_IO)\r\n stopWork();\r\n\r\n else\r\n common.failure(\"Unknown socket message: \" + sm.getMessageText());\r\n }\r\n\r\n }", "protected abstract Simulate collectAgentData ();", "public static void main(String[] args) throws MalformedURLException, InterruptedException\n\t{\n\n\t\tint meterNum = 10;\n//\t\tif(Integer.parseInt(args[1]) > 0) {\n//\t\t\tmeterNum = Integer.parseInt(args[1]);\n//\t\t}\n\t\t\n\t\tint threadNum = 5;\n\t\tint totalDocNum = 10;\n\t\t\n\t\tSystem.gc();\n\t\t\n\t\tmeterStream[] ms = new meterStream[meterNum]; \t\t\t\n\t\t\n\t\tfor(int i = 0 ; i < meterNum ; i++)\n\t\t{\n\t\t\tms[i] = new meterStream();\n\t\t\t//ms[i].setUrl(\"http://service2.allenworkspace.net/xml/xmldata/testxml\"+(i+1)+\".xml\");\n\t\t\tms[i].setUrl(\"http://program.allenworkspace.net/xml/xmldata/testxml\"+(i+1)+\".xml\");\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t/*\n\t\tString[] xpathArray = new String[] {\"/a0CC175B9C0F1B6A831C399E269772661/a92EB5FFEE6AE2FEC3AD71C777531578F/@aB80BB7740288FDA1F201890375A60C8F\",\n\t\t\t\t\"/a0CC175B9C0F1B6A831C399E269772661/a4A8A08F09D37B73795649038408B5F33/@a2063C1608D6E0BAF80249C42E2BE5804\"};\n\t\t*/\n\t\t\n\t\tString[] xpathArray = new String[] {\"/a0CC175B9C0F1B6A831C399E269772661/a92EB5FFEE6AE2FEC3AD71C777531578F/\",\n\t\t\t\t\"/a0CC175B9C0F1B6A831C399E269772661/a4A8A08F09D37B73795649038408B5F33/\"};//YFilter專用\n\t\t\n\t\tList<String> xpathList = new ArrayList<String>();\n\t\tCollections.addAll(xpathList, xpathArray);\n\t\t\n\t\t//List<XMLDogTask> taskPool = null;\n\t\t//List<SaxonTask> taskPool = null;\n\t\tList<YFilterTask> taskPool = null;\n\t\t\n\t\tif(threadNum > 0) {\n\t\t\t//taskPool = TaskPool.CreateXMLDogTasks(threadNum, xpathList);\n\t\t\t//taskPool = TaskPool.CreateSaxonTasks(threadNum, xpathList);\n\t\t\ttaskPool = TaskPool.CreateYFilterTasks(threadNum, xpathList);\n\t\t\t\n\t\t\t/*\n\t\t\tfor(int i = 0; i < threadNum; ++i) {\n\t\t\t\tDefaultNamespaceContext nsContext = new DefaultNamespaceContext(); // an implementation of javax.xml.namespace.NamespaceContext\n\t\t\t\tnsContext.declarePrefix(\"xsd\", Namespaces.URI_XSD);\n\t\t\t\tdog = new XMLDog(nsContext);\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tExpression xpath1 = dog.addXPath(\"/a0CC175B9C0F1B6A831C399E269772661/a92EB5FFEE6AE2FEC3AD71C777531578F/@aB80BB7740288FDA1F201890375A60C8F\");\n\t\t\t\t\tExpression xpath2 = dog.addXPath(\"/a0CC175B9C0F1B6A831C399E269772661/a4A8A08F09D37B73795649038408B5F33/@a2063C1608D6E0BAF80249C42E2BE5804\");\t\n\t\t\t\t} \n\t\t\t\tcatch (SAXPathException e) \n\t\t\t\t{\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t} */\n\t\t}\n\t\t\n\t\tExecutorService executorService = Executors.newFixedThreadPool(threadNum);\n\t\tExecutorService reducerService = Executors.newCachedThreadPool(); \n\t\tList<Future<List<String>>> resultList = null;\n\t\t\n\t\tlong starttime = System.currentTimeMillis();\n\t\t\n\t\tfor(int i = 0 ; i < totalDocNum ; i++ )\n\t\t{\n\t\t\t//callXMLDogFilter myFilter = new callXMLDogFilter(ms[i%meterNum].strURI);\n\t\t\t//callSaxonFilter myFilter = new callSaxonFilter(ms[i%meterNum].strURI);\n\t\t\tcallYFilter myFilter = new callYFilter(ms[i%meterNum].strURI);\n\t\t\t\n\t\t\tmyFilter.SetTaskList(taskPool);\n\t\t\t// myFilter.setStream(ms[i%meterNum].getStream());\n\t\t\t/* myThreads[t] = new Thread(testFilter[t]);\n\t\t\tmyThreads[t].start(); */\n\t\t\tFuture<List<String>> result = executorService.submit(myFilter);\n\t\t\tif(i % meterNum == 0) {\n\t\t\t\tresultList = new ArrayList<Future<List<String>>>();\n\t\t\t} \n\t\t\tresultList.add(result);\n\t\t\tif(resultList.size() == meterNum) {\n\t\t\t\t//ExecuteService myReducer = Executors.newFixedThreadPool(threadNum)\n\t\t\t\tString taskID = (i/meterNum)+\"\";\n\t\t\t\t\n\t\t\t\t//XMLDogTaskReducer reducer = (XMLDogTaskReducer) TaskReducerFactory.Create(\"XMLDogTaskReducer\");\n\t\t\t\t//SaxonTaskReducer reducer = (SaxonTaskReducer) TaskReducerFactory.Create(\"SaxonTaskReducer\");\n\t\t\t\tYFilterTaskReducer reducer = (YFilterTaskReducer) TaskReducerFactory.Create(\"YFilterTaskReducer\");\n\t\t\t\t\n\t\t\t\treducer.SetID(taskID);\n\t\t\t\treducer.resultList = resultList;\t\t\t\t\t\n\t\t\t\treducerService.execute(reducer);\n\t\t\t}\n\t\t\t// resultList.add(result);\n\t\t}\n\t\texecutorService.shutdown(); \n\t\texecutorService.awaitTermination(30, TimeUnit.MINUTES);\n\t\treducerService.shutdown();\n\t\treducerService.awaitTermination(30, TimeUnit.MINUTES);\n\t\t\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\tSystem.out.println((\"duration:\" + (endTime - starttime)));\n\t}", "@Override\n public void receiveMessages() {\n // put message to currentIncoming message store\n FFIByteVector tmpVector = (FFIByteVector) FFIByteVectorFactory.INSTANCE.create();\n long bytesOfReceivedMsg = 0;\n while (grapeMessager.getPureMessage(tmpVector)) {\n // The retrieved tmp vector has been resized, so the cached objAddress is not available.\n // trigger the refresh\n tmpVector.touch();\n // OutArchive will do the resize;\n if (logger.isDebugEnabled()) {\n logger.debug(\"Frag [{}] digest message of size {}\", fragId, tmpVector.size());\n }\n ///////////////////////////////////////////\n currentIncomingMessageStore.digest(tmpVector);\n ///////////////////////////////////////////\n bytesOfReceivedMsg += tmpVector.size();\n }\n logger.info(\n \"Frag [{}] totally Received [{}] bytes from others starting deserialization\",\n fragId,\n bytesOfReceivedMsg);\n }", "private List<IAgentDescription> getMyWorkerAgents(int maxNum) {\n\t\tString nodeId = thisAgent.getAgentNode().getUUID();\n\t\treturn thisAgent.searchAllAgents(new AgentDescription(null, null, null, null, null, nodeId)).stream()\n\t\t\t\t.filter(a -> a.getName().startsWith(\"WorkerAgent\"))\n\t\t\t\t.limit(maxNum)\n\t\t\t\t.collect(Collectors.toList());\n\t}", "public void receiveMessage(Node sender, Message message) {\r\n\t\tMessage newMessage;\r\n\t\tif (message.isType(\"what is your load?\")){\r\n\t\t\tnewMessage = new Message(sender,\"My load is\");\r\n\t\t\tnewMessage.put(\"load\",get(\"load\"));\r\n\t\t\tsend(newMessage);\r\n\r\n\t\t}else if (message.isType(\"My load is\")){\r\n\t\t\tload = message.getInt(\"load\");\r\n\t\t\tloadMap.put(sender,new Integer(load));\r\n\t\t\tif(loadMap.size()== size-1){\r\n\t\t\t\tNode worker=this;\r\n\t\t\t\tlowLoad=getInt(\"load\");\r\n\t\t\t\tIterator iterator=loadMap.keySet().iterator();\r\n\t\t\t\twhile(iterator.hasNext()){\r\n\t\t\t\t\tNode key=(Node)iterator.next();\r\n\t\t\t\t\tint current=((Integer)loadMap.get(key)).intValue();\r\n\t\t\t\t\tif(current<lowLoad){\t\r\n\t\t\t\t\t\tlowLoad=current;\r\n\t\t\t\t\t\tworker=key;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (worker==this){\r\n\t\t\t\t\t newMessage = new Message(worker,\"Do work\");\r\n\t\t\t\t\t receiveMessage(this,newMessage);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//do something\r\n\t\t\t\t\tnewMessage = new Message(worker,\"Do work\");\r\n\t\t\t\t\tsend(newMessage);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if (message.isType(\"Do work\")){\r\n\t\t\t\t\tsetImage(busyImage);\r\n\t\t\t\t\tsetInt(\"load\",getInt(\"load\") + 10);\r\n\t\t\t\t\tschedule(new DoWork(),0);\r\n\t\t}\r\n }", "@Override\n public void startAgents(IOfflineMessageServer messageServer) {\n \n for (IAgentConfig agentConfig : this.agentConfigs) {\n OfflineAgentRunnable agentRunnable = new OfflineAgentRunnable(\n agentConfig.getAgentClass(), agentConfig.getAgentName(), messageServer);\n \n this.agentRunnables.add(agentRunnable); \n }\n \n for (OfflineAgentRunnable agentRunnable : this.agentRunnables) {\n agentRunnable.run(); \n }\n }", "public synchronized void run() {\r\n\t\tsetName(\"I02 - Load messages\");\r\n\t\tboolean run = true;\r\n\t\twhile (run) {\r\n\t\t\tif (tablaMensajes.isDisposed() || vista.getEmpleadoActual().getEmplId()==0) run = false;\r\n\t\t\telse {\r\n\t\t\t\tif (!tabFolder.isDisposed()) {\r\n\t\t\t\t\t// Cargar remitentes\r\n\t\t\t\t\tremitentes = new ArrayList<String>();\r\n\t\t\t\t\t// Añadir nombre remitentes a lista remitentes\r\n\t\t\t\t\tfor (int i = 0; i < vista.getTodosMensajesEntrantes().size(); i++) {\r\n\t\t\t\t\t\tremitentes.add(vista.getEmpleado(vista.getTodosMensajesEntrantes().get(i).getRemitente()).getNombreCompleto());\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Actualizar tabla\r\n\t\t\t\t\tif (!tabFolder.isDisposed()) {\r\n\t\t\t\t\t\ttabFolder.getDisplay().asyncExec(new Runnable () {\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tmostrarMensajes();\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// TODO Espera 5 segundos (¿Como lo dejamos?)\r\n\t\t\t\t\twait(5000);\r\n\t\t\t\t\t//desplazarVentanaMensajes(0);\r\n\t\t\t\t\t//vista.loadTodosMensajes();\r\n\t\t\t\t\tnotify();\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public abstract Message[] getMessages(MessageRetrievalListener listener)\n throws MessagingException;", "private void run()\n\t\t{\n\t\tObjectItemBuf<JobSchedulerMessage> buf =\n\t\t\tObjectBuf.buffer ((JobSchedulerMessage) null);\n\t\tStatus status = null;\n\t\tJobSchedulerMessage message = null;\n\t\tJobFrontendRef frontend = null;\n\n\t\treceiveloop : for (;;)\n\t\t\t{\n\t\t\t// Receive a message from any channel.\n\t\t\ttry\n\t\t\t\t{\n\t\t\t\tstatus = myChannelGroup.receive (null, null, buf);\n\t\t\t\t}\n\t\t\tcatch (ChannelGroupClosedException exc)\n\t\t\t\t{\n\t\t\t\t// Normal termination.\n\t\t\t\tbreak receiveloop;\n\t\t\t\t}\n\t\t\tcatch (Throwable exc)\n\t\t\t\t{\n\t\t\t\tmyLog.log (\"Exception while receiving message\", exc);\n\t\t\t\tbreak receiveloop;\n\t\t\t\t}\n\t\t\tmessage = buf.item;\n\n\t\t\t// Get job frontend proxy associated with channel.\n\t\t\tfrontend = (JobFrontendRef) status.channel.info();\n\n\t\t\t// Process message.\n\t\t\ttry\n\t\t\t\t{\n\t\t\t\tmessage.invoke (this, frontend);\n\t\t\t\t}\n\t\t\tcatch (Throwable exc)\n\t\t\t\t{\n\t\t\t\tmyLog.log (\"Exception while processing message\", exc);\n\t\t\t\t}\n\n\t\t\t// Enable garbage collection of no-longer-needed objects while\n\t\t\t// waiting to receive next message.\n\t\t\tbuf.item = null;\n\t\t\tstatus = null;\n\t\t\tmessage = null;\n\t\t\tfrontend = null;\n\t\t\t}\n\t\t}", "private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n logger = ProActiveLogger.getLogger(Loggers.JMX_MBEAN);\n notificationsLogger = ProActiveLogger.getLogger(Loggers.JMX_NOTIFICATION);\n \n if ((logger != null) && logger.isDebugEnabled()) {\n logger.debug(\"[Serialisation.readObject]#Deserialization of the MBean\");\n }\n \n in.defaultReadObject();\n \n // Warning objectName is transient\n this.objectName = FactoryName.createActiveObjectName(this.id);\n \n // Warning nodeUrl is transient\n // We get the url of the new node.\n this.nodeUrl = this.body.getNodeURL();\n logger.debug(\"BodyWrapper.readObject() nodeUrl=\" + nodeUrl);\n \n // Warning notifications is transient\n this.notifications = new ConcurrentLinkedQueue<Notification>();\n \n // Register the MBean into the MBean Server\n try {\n ManagementFactory.getPlatformMBeanServer().registerMBean(this, objectName);\n } catch (InstanceAlreadyExistsException e) {\n logger.error(\"A Mean is already registered with this objectName \" + objectName, e);\n } catch (MBeanRegistrationException e) {\n logger.error(\"The MBean \" + objectName +\n \" can't be registered on the MBean server during the deserialization of the MBean\", e);\n } catch (NotCompliantMBeanException e) {\n logger.error(\"Exception throws during the deserialization of the MBean\", e);\n }\n \n launchNotificationsThread();\n }", "@Test\n public void actorShouldProcessAllMessages() {\n ActorRef ref1 = system.actorOf(MyTestActor.class);\n\n Actor act = ((MyTestActorSystem)system).giveMeActor(ref1);\n\n ((MyTestActor)act).setRefAs((AbsActorSystem)system);\n\n for (int i = 0; i < 2000; i++) {\n ref1.send(new TrivialMessage(), ref1);\n }\n\n system.stop(ref1);\n\n // messaggi spediti all'attore effettivamente aggiunti alla sua mailBox\n int sendM = ((MyTestActorSystem)system).getNumSendMessages();\n // messaggi presenti nella mailBox dell'attore che sono stati processati\n int reciveM = ((MyTestActorSystem)system).getRecivedMessage();\n\n Assert.assertEquals(\"Devono essere processati tutti i messaggi effettivamente spediti\", sendM, reciveM);\n\n }", "public void run() {\n System.out.println(\"NS: in service NameServer worker!\");\n\n PrintStream out;\n BufferedReader in;\n\n try {\n out = new PrintStream(serv.getOutputStream());\n in = new BufferedReader(new InputStreamReader(serv.getInputStream()));\n\n String input = in.readLine();\n StringTokenizer parsedIn = new StringTokenizer(input, \"&\");\n\n \n //if the message sent is a host registering, take the info and put it in\n //the host info list.\n if (input.contains(\"HOST:\")) {\n parsedIn.nextToken();\n String ip = parsedIn.nextToken();\n int port = Integer.parseInt(parsedIn.nextToken());\n HostInfo newHost = new HostInfo(ip, port);\n HostInfoList.add(newHost);\n\n out.println(\"Host registered with NameServer: \" + newHost.toString());\n out.flush();\n\n } else if (input.startsWith(\"NEWAGENT:\")) {\n //register agent with its ID number... assign it a name\n //give all the names of group members\n parsedIn.nextToken();\n AgentInfo agent = newAgent(parsedIn);\n\n out.println(\"NEWAGENT:&\" + agent.getName() + \"&\" + agent.getGroupId());\n out.flush();\n\n\n } else if (input.startsWith(\"AGENTMIGRATE:\")) {\n /*\n * updates info on the agent.\n */\n parsedIn.nextToken();\n String agentId = parsedIn.nextToken();\n AgentInfo agent = null;\n List<AgentInfo> agentList = AgentInfoList.getList();\n for (AgentInfo a : agentList){\n if (a.agentId.equals(agentId))\n agent = a;\n }\n\n //agent.getCurLocation().setNumAgents(agent.getCurLocation().getNumAgents() - 1);\n agent.getCurLocation().incNumAgents();\n HostInfo newHost = HostInfoList.getRandomHost();\n agent.setCurLocation(newHost);\n //newHost.setNumAgents(newHost.getNumAgents() + 1);\n newHost.incNumAgents();\n\n out.println(\"AGENTMIGRATE:&\" + newHost.getIp() + \"&\" + newHost.getPort());\n out.flush();\n\n \n\n \n \n } else if (input.startsWith(\"REAGENT:\")){\n System.out.println(\"NS: receiving: \");\n parsedIn.nextToken();\n String agentId = parsedIn.nextToken();\n int newPort = Integer.parseInt(parsedIn.nextToken());\n List<AgentInfo> agentList = AgentInfoList.getList();\n for (AgentInfo a : agentList){\n if (a.agentId.equals(agentId))\n a.setPort(newPort);\n }\n \n }\n else {\n System.out.println(\"NS: Agent or HostServer requesting unimplemented action from service port.\");\n }\n\n\n } catch (IOException e) {\n System.out.println(\"NS: issue with connection in service NameServer worker!\");\n }\n\n\n }", "public void readMessagingNodesList() {\n\t\tiStream = new ByteArrayInputStream(marshalledBytes);\t\n\t\tdin = new DataInputStream(new BufferedInputStream(iStream));\n\t\ttry {\n\t\t\tint totalCr = din.readInt();\n\t\t\tint nNeededConnections = din.readInt();\n\t\t\tint listByteLength = din.readInt();\n\t\t\tbyte[] listBytes = new byte[listByteLength];\n\t\t\tdin.readFully(listBytes);\n\n\t\t\tMessagingNodesList newList = new MessagingNodesList();\n\t\t\t//Unmarshall object of Messaging Nodes in list\n\t\t\tByteArrayInputStream bis = new ByteArrayInputStream(listBytes);\n\t\t\tDataInputStream dis = new DataInputStream(bis);\n\n\t\t\tint nLength, nLPort; byte[] nodeLinkBytes; String nIP;\n\t\t\tfor (int i=0; i< nNeededConnections; i++ ) {\n\t\t\t\tnLength = dis.readInt();\n\t\t\t\tnodeLinkBytes = new byte[nLength];\n\t\t\t\tdis.readFully(nodeLinkBytes);\n\t\t\t\tnIP= new String(nodeLinkBytes);\n\t\t\t\tnLPort = dis.readInt();\n\t\t\t\tnewList.addNode(nIP, nLPort);\n\t\t\t}\n\t\t\tiStream.close(); din.close();\n\t\t\t\n\t\t\tnode.setMessagingNodesList(newList,totalCr);\n\t\t\tnode.setPeerNumber(totalCr+node.getNumberNeededPeers());\n\t\t\tif(node.getNumberNeededPeers() ==0 ) System.out.println(\"All connections are established. Number of connections: \"+(node.getCurrentMessagingNodesList().getSize()));\n\n\t\t\t// Creating a registration message for each node in the messagingNodesList\n\t\t\tfor(int i=0; i<node.getFutureMessagingNodesList().getSize(); i++) {\n\t\t\t\tMessage message = new RegisterMessage(node.ipAddr, node.portNum);\n\t\t\t\tString friendIP = node.getFutureMessagingNodesList().getNodeAtIndex(i).ipAddress;\n\t\t\t\tint friendPort = node.getFutureMessagingNodesList().getNodeAtIndex(i).port;\n\n\t\t\t\t// Creating a socket that connects directly to the registry.\n\t\t\t\tSocket senderSocket = new Socket(friendIP, friendPort );\n\t\t\t\tnode.getConnections().addConnection(friendIP, senderSocket);\n\t\t\t\tnew TCPSender(senderSocket, message);\n\t\t\t}\n\t\t} catch (IOException e) {System.out.println(\"Failed to read message. \"); }\n\t}", "javax.management.ObjectName getMessageCache();", "public void sendToManager(){\n String receiveMessage;\n while((receiveMessage=receiveFrom(messageReader)) != null){\n manager.manage(receiveMessage);\n }\n }", "@Override\n public void run() {\n while (!BodyWrapper.this.body.isActive() && BodyWrapper.this.body.isAlive()) {\n try {\n Thread.sleep(updateFrequence);\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n \n // and once the body is activated, we can forward the\n // notifications\n while (BodyWrapper.this.body.isActive()) {\n try {\n Thread.sleep(updateFrequence);\n sendNotifications();\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n }", "@Override\n\tpublic void run() {\n\t\twhile(isactive){\n\t\t//读取每个接入交换机的table?\n\t\tlong time1=System.currentTimeMillis();\t\n\t\tfor(Node node:nodes){\n\t\t\tTableReader tableReader=new TableReader();\n\t\t\ttableReader.setNode(node.getNode_id());\n\t\t\ttableReader.setTableid(tableid);\n\t\t\t//读取每条流表的static信息\n\t\t\tif(tableid==\"5\"){\n\t\t\ttry {\n\t\t\t\tfor(String id:tableReader.read().keySet()){\n\t\t\t\t\t//读取table中的每条流表\n\t\t\t\t\tFlow flow=tableReader.read().get(id);\n\t\t\t\t\t//是否存在inport 匹配\n\t\t\t\t\tMonTag monTag=new MonTag();\n\t\t\t\t\tif(flow.getMatch()!=null && flow.getMatch().getEthernet_Match()!=null && flow.getMatch().getIn_port()!=null){\n\t\t\t\t\t\tString in_port=flow.getMatch().getIn_port();\n\t\t\t\t\t\t//将监控标签加入该port\n\t\t\t\t\t\t\n\t\t\t\t\t\tmonTag.setInport(in_port);\n\t\t\t\t\t\t//是否存在源mac\n\t\t\t\t\tif(flow.getMatch().getEthernet_Match().getEthernet_source()!=null){\n\t\t\t\t\t\tEthernet_source source=flow.getMatch().getEthernet_Match().getEthernet_source();\n\t\t\t\t\t\tmonTag.setSrcmac(source.getAddress());\n\t\t\t\t\t}\n\t\t\t\t\t//是否存在目的mac\n\t\t\t\t\tif(flow.getMatch().getEthernet_Match().getEthernet_destination()!=null){\n\t\t\t\t\t\tEthernet_destination destination=flow.getMatch().getEthernet_Match().getEthernet_destination();\n\t\t\t\t\t\tmonTag.setDestmac(destination.getAddress());\n\t\t\t\t\t}\n\t\t\t\t\t//获取当前流表的数据\n\t\t\t\t\tlong nowbyte=flow.getFlow_Statistic().getByte_count();\n\t\t\t\t\tlong nowpkt=flow.getFlow_Statistic().getPacket_count();\n\t\t\t\t\tNetStatic netStatic=new NetStatic();\n\t\t\t\t\t//设置监控统计项\n\t\t\t\t\tnetStatic.setBytecount(nowbyte)\n\t\t\t\t\t\t\t .setPacketcount(nowpkt);\n\t\t\t\t\t//判断是否是第一次读取\n\t\t\t\t\tif(netMonitorMap.get(monTag)!=null){\n\t\t\t\t\t\n\t\t\t\t\t\tlong oldbyte=netMonitorMap.get(monTag).getBytecount();\n\t\t\t\t\t\tlong oldpkt=netMonitorMap.get(monTag).getPacketcount();\n\t\t\t\t\t\tif(nowbyte < oldbyte){\n\t\t\t\t\t\t\tnowbyte=oldbyte+nowbyte;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//计算速度\n\t\t\t\t\t\tlong bytespeed=(nowbyte-oldbyte)/(3000/1000);\n\t\t\t\t\t\tlong pktspeed=(nowpkt-oldpkt)/(3000/1000);\n\t\t\t\t\t\tnetStatic.setPacketspeed(pktspeed).setBytespeed(bytespeed);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tthis.netMonitorMap.put(monTag, netStatic);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (TableReadException 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\t\t\telse if(tableid==\"3\") {\n\t\t\t\n\t\t\t//\tmonTag.setNode(node.getNode_id());\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tfor(String id:tableReader.read().keySet()){\n\t\t\t\t\t\tMonTag monTag=new MonTag();\n\t\t\t\t\t\tmonTag.setNode(node.getNode_id());\n\t\t\t\t\t\tNetStatic netStatic=new NetStatic();\n\t\t\t\t\t\tFlow flow=tableReader.read().get(id);\n\t\t\t\t\t\t//流表是否存在inport匹配域\n\t\t\t\t\t\tif(flow.getMatch().getIn_port()!=null){\n\t\t\t\t\t\t\tString inport=flow.getMatch().getIn_port();\t\n\t\t\t\t\t\t\tmonTag.setInport(inport);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//流表是否存在protocol域\n\t\t\t\t\t\tif(flow.getMatch().getIp_Match()!=null && flow.getMatch().getIp_Match().getIp_protocol()!=null){\n\t\t\t\t\t\t\tString ipProtocol=flow.getMatch().getIp_Match().getIp_protocol();\n\t\t\t\t\t\t\tProtocol_Type protocol_Type=Protocol_Type.Valueof(Integer.parseInt(ipProtocol));\n\t\t\t\t\t\t\tmonTag.setProtocol_Type(protocol_Type);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tmonTag.setProtocol_Type(Protocol_Type.UNKNOW);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//获取当前流表的数据\n\t\t\t\t\t\tlong nowbyte=flow.getFlow_Statistic().getByte_count();\n\t\t\t\t\t\tlong nowpkt=flow.getFlow_Statistic().getPacket_count();\n\t\t\t\t\t\tnetStatic.setBytecount(nowbyte)\n\t\t\t\t\t\t .setPacketcount(nowpkt);\n\t\t\t\t\t\t//判断是否是第一次读取\n\t\t\t\t\t\tif(netMonitorMap.get(monTag)!=null){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tlong oldbyte=netMonitorMap.get(monTag).getBytecount();\n\t\t\t\t\t\t\tlong oldpkt=netMonitorMap.get(monTag).getPacketcount();\n\t\t\t\t\t\t\tif(nowbyte < oldbyte){\n\t\t\t\t\t\t\t\tnowbyte=oldbyte+nowbyte;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//计算速度\n\t\t\t\t\t\t\tlong bytespeed=(nowbyte-oldbyte)/(3000/1000);\n\t\t\t\t\t\t\tlong pktspeed=(nowpkt-oldpkt)/(3000/1000);\n\t\t\t\t\t\t\tnetStatic.setPacketspeed(pktspeed).setBytespeed(bytespeed);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"MonTag \"+monTag.getInport()+\"<<<>>>\"+monTag.getProtocol_Type());\n\t\t\t\t\t\tlong bytespeed=netStatic.getBytespeed();\n\t\t\t\t\t\n\t\t\t\t\t\tthis.netMonitorMap.put(monTag, netStatic);\n\t\t\t\t\t\t//for(MonTag monTag1:netMonitorMap.keySet()){\n\t\t\t\t\t\t//\tSystem.out.println(\"MonTag \"+monTag1.getInport()+\" \"+monTag1.getProtocol_Type());\n\t\t\t\t\t//\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (NumberFormatException | TableReadException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlong time2=System.currentTimeMillis();\n\t\tinterval=3000-(time2-time1);\n\t\tSystem.out.println(\"Monitoring\");\n\t\ttry {\n\t\t\tThread.sleep(interval);\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\t\n\t\t}\n\t}", "public void run() {\n // Check if the specified connector is null\n //\n if(this.connector == null) {\n System.out.println(\"[ERROR] connector is null aborting\");\n return;\n }\n\n //\n // Keep reading messages\n //\n while (true) {\n AeMessage inMsg = connector.read();\n if(inMsg == null) {\n System.out.println(\"[ERROR] Received an invalid message\");\n connector.reconnect();\n try {\n Thread.sleep(10000);\n }\n catch(Exception e) {\n }\n }\n else {\n //\n // Reject messages over two minutes old\n //\n if(inMsg.checkMessageOlderThan(120) == 1) {\n System.out.println(\"[INFO] Message has expired: \" + inMsg.toString());\n }\n else if(inMsg.getMessageType().equals(\"22\")) {\n System.out.println(\"[INFO] Received message:\" + inMsg.toString());\n if(messageStore.reportMessage(inMsg)) {\n System.out.println(\"[INFO] Successfully added message to the store\");\n }\n else {\n System.out.println(\"[ERROR] Failed to add message to the store\");\n }\n }\n }\n }\n }", "private void process(Msg msg) {\n\tUTILS.Constants.MESSAGE_TYPE mt = msg.get_msg_type();\n\tif (mt == Constants.MESSAGE_TYPE.READ_MEM) {\n\t if (verbose) {\n\t\tSystem.out.println(\" [DN] > Processing READ_MEM\");\t \n\t }\n\t Address ret_add = msg.get_return_address();\n\t ChunkName n = msg.get_chunk_name();\n\t String data = this.read_from_mem(n);\n\t \n\t Msg reply = new Msg();\n\t reply.set_msg_type(Constants.MESSAGE_TYPE.READ_MEM_REPLY);\n\t reply.set_return_address(my_address);\n\t reply.set_data(data);\n\t try {\n\t\tthis.write_to_NN(reply);\n\t } catch (IOException e) {\n\t\te.printStackTrace();\n\t }\n\t catch (ClassNotFoundException e) {\n\t\te.printStackTrace();\n\t }\n\t} else if (mt == Constants.MESSAGE_TYPE.WRITE_MEM) {\n\t if (verbose) {\n\t\tSystem.out.println(\" [DN] > Processing WRITE_MEM\");\t \n\t }\n\t Address ret_add = msg.get_return_address();\n\t ChunkName n = msg.get_chunk_name();\n\t String data = msg.get_data();\n\t this.write_to_mem(n, data);\n\n\t Msg reply = new Msg();\n\t reply.set_msg_type(Constants.MESSAGE_TYPE.WRITE_MEM_REPLY);\n\t reply.set_return_address(my_address);\n\t try {\n\t\tthis.write_to_NN(reply);\n\t } catch (IOException e) {\n\t\te.printStackTrace();\n\t }\n\t catch (ClassNotFoundException e) {\n\t\te.printStackTrace();\n\t }\n\t}\n }", "public void communicate() {\n // Send\n for (int i = 0; i < robots.length; i++) {\n if (i != this.id) {\n if (objectFound) {\n System.out.println(\"Robot \" + this.id + \": Telling everyone else...\");\n this.robots[i].mailbox[i] = new Message(this.id, this.objectFound, goal);\n } else {\n this.robots[i].mailbox[i] = new Message(this.id, this.objectFound, null);\n }\n }\n }\n // Read\n for (int i = 0; i < mailbox.length; i++) {\n if (i != this.id && mailbox[i] != null && mailbox[i].objectFound) {\n this.objectFound = true;\n this.goal = mailbox[i].objectLocation;\n }\n }\n }", "ListenerThreads(Process chimera, Chimera chimeraObject, CyLogger logger) {\n\t\tthis.chimera = chimera;\n\t\tthis.chimeraObject = chimeraObject;\n\t\tthis.logger = logger;\n\t\treplyLog = new HashMap<String, List<String>>();\n \t \t// Get a line-oriented reader\n \treadChan = chimera.getInputStream();\n\t\tlineReader = new BufferedReader(new InputStreamReader(readChan));\n\t}", "@Override\n\tpublic void run() {\n\t\tList<ProfileData> base=this.readBattery(this.batteryBasedFile);\n\t\tList<ProfileData> cpuFull=this.readBattery(this.batteryCPUFile);\n\t\t\n\t\tDefaultNetworkEnergyManager nem = MANAGER_FACTORY.createNetworkEnergyManager(networkEnergyManagerEnable, wifiSignalStrength);\n\t\tDefaultBatteryManager sb=MANAGER_FACTORY.createBatteryManager(2, startCharge, startUptime, batteryCapacityInJoules);\n\t\tfor(ProfileData b:base)\n\t\t\tsb.addProfileData(0, b);\n\t\tfor(ProfileData b:cpuFull)\n\t\t\tsb.addProfileData(1, b);\n\t\t\n\t\tDefaultExecutionManager se=MANAGER_FACTORY.createExecutionManager();\t\t\n\t\tse.setMips(this.flops);\n\t\tDevice d= MANAGER_FACTORY.createDevice(this.nodeId, sb, se, nem);\n\t\t\n\t\tsimLock.lock();\n\t\tNetworkModel.getModel().addNewNode(d);\n\t\tSimulation.addEntity(d);\n\t\tthis.dId=Simulation.getEntityId(this.nodeId);\n\t\tsimLock.unlock();\n\t\t\n\t\tsb.setDevice(d);\n\t\tse.setDevice(d);\n\t\tnem.setDevice(d);\n\t\tse.setBatteryManager(sb);\n\t\tnem.setBatteryManager(sb);\n\t\tsb.setSEASExecutionManager(se);\n\t\t\t\t\t\t\n\t\tthis.readCPUEvents();\n\t\t\n\t\tthis.eventLock.lock();\n\t\tEvent e=Event.createEvent(Event.NO_SOURCE, this.startTime, this.dId, Device.EVENT_TYPE_DEVICE_START, null);\n\t\tthis.eventLock.unlock();\n\t\tthis.simLock.lock();\n\t\tSimulation.addEvent(e);\n\t\tthis.simLock.unlock();\n\t}", "public interface HelloMBean {\r\n\t/**\r\n\t * setting the value of message as userdefined string\r\n\t * @param message\r\n\t */\r\n\tpublic void setMessage(String message);\r\n\t/**\r\n\t * getting the value of message \r\n\t * @return message\r\n\t */\r\n\tpublic String getMessage();\r\n\t/**\r\n\t * To publish the hello statement to user\r\n\t * @param name\r\n\t * @return String\r\n\t */\r\n\tpublic String sayHello(String name);\r\n\t/**\r\n\t * just to say hi\r\n\t */\r\n\tpublic void sayHi();\r\n\r\n}", "public VoltTable[] run(String selector, long interval) throws VoltAbortException {\n VoltTable[] results;\n final long now = System.currentTimeMillis();\n if ((selector.toUpperCase().equals(SysProcSelector.MEMORY.name())) ||\n (selector.toUpperCase().equals(\"NODEMEMORY\"))) {\n results = getMemoryData(interval, now);\n assert(results.length == 1);\n }\n else if (selector.toUpperCase().startsWith(SysProcSelector.TRANSACTION.name())) {\n results = getTransactionData(interval, now);\n }\n else if (selector.toUpperCase().equals(SysProcSelector.TABLE.name())) {\n results = getTableData(interval, now);\n }\n else if (selector.toUpperCase().equals(SysProcSelector.PROCEDURE.name())) {\n results = getProcedureData(interval, now);\n }\n else if (selector.toUpperCase().equals(SysProcSelector.PARTITIONCOUNT.name())) {\n results = getPartitionCountData();\n }\n else if (selector.toUpperCase().equals(SysProcSelector.IOSTATS.name())) {\n results = getIOStatsData(interval, now);\n }\n else if (selector.toUpperCase().equals(SysProcSelector.MANAGEMENT.name())) {\n VoltTable[] memoryResults = getMemoryData(interval, now);\n VoltTable[] txnResults = getTransactionData(interval, now);\n VoltTable[] tableResults = getTableData(interval, now);\n VoltTable[] procedureResults = getProcedureData(interval, now);\n VoltTable[] initiatorResults = getInitiatorData(interval, now);\n VoltTable[] ioResults = getIOStatsData(interval, now);\n VoltTable[] starvationResults = getIOStatsData(interval, now);\n results = new VoltTable[] {\n memoryResults[0],\n txnResults[0],\n initiatorResults[0],\n procedureResults[0],\n ioResults[0],\n tableResults[0],\n starvationResults[0]\n };\n final long endTime = System.currentTimeMillis();\n final long delta = endTime - now;\n HOST_LOG.debug(\"Statistics invocation of MANAGEMENT selector took \" + delta + \" milliseconds\");\n } else {\n throw new VoltAbortException(String.format(\"Invalid Statistics selector %s.\", selector));\n }\n \n return results;\n }", "private void launchNotificationsThread() {\n Thread t = new Thread(\"JMXNotificationThread for \" + BodyWrapper.this.objectName) {\n @Override\n public void run() {\n // first we wait for the creation of the body\n while (!BodyWrapper.this.body.isActive() && BodyWrapper.this.body.isAlive()) {\n try {\n Thread.sleep(updateFrequence);\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n \n // and once the body is activated, we can forward the\n // notifications\n while (BodyWrapper.this.body.isActive()) {\n try {\n Thread.sleep(updateFrequence);\n sendNotifications();\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n }\n };\n t.setDaemon(true);\n t.start();\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (DefaultResourceAllocator.this) {\n\t\t\t\t\tAgent agent = agentManager.load(agentId);\n\t\t\t\t\tagentResourceQuotas.put(agentId, agent.getResources());\n\t\t\t\t\tagentResourceUsages.put(agentId, new HashMap<>());\n\t\t\t\t\n\t\t\t\t\tfor (QueryCache cache: queryCaches.values()) {\n\t\t\t\t\t\tif (cache.query.matches(agent))\n\t\t\t\t\t\t\tcache.result.add(agentId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public ServiceExampleWorker() {\n super(\"ServiceExampleWorker\");\n shouldExecute = true;\n messageBinder = new IMessageBinder.Stub() {\n private List<ISubscriber> subscriberList = new ArrayList<>();\n\n @Override\n public void addSubscriber(ISubscriber subscriber) throws RemoteException {\n subscriberList.add(subscriber);\n }\n\n @Override\n public void removeSubscriber(ISubscriber subscriber) throws RemoteException {\n subscriberList.remove(subscriber);\n }\n\n @Override\n public void sendUpdate(String data) throws RemoteException {\n for (ISubscriber subscriber : subscriberList) {\n subscriber.send(data);\n }\n }\n\n @Override\n public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString) throws RemoteException {\n\n }\n };\n }", "private void dequeueMessages()\n\t{\n\t\twhile (_msg_queue.size() > 0)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t_ml.messageReceived( (Serializable) _msg_queue.removeFirst());\n\t\t\t}\n\t\t\tcatch (RuntimeException rte)\n\t\t\t{\n\t\t\t\trte.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "protected abstract RemoteFactory.Agent<Msg, Ref> make_Agent();", "public AsyncResult<IQ> requestAllMessages() {\r\n return xmppSession.query(IQ.get(new OfflineMessage(true, false)));\r\n }", "void initAgents() {\n Runtime rt = Runtime.instance();\n\n //Create a container to host the Default Agent\n Profile p = new ProfileImpl();\n p.setParameter(Profile.MAIN_HOST, \"localhost\");\n //p.setParameter(Profile.MAIN_PORT, \"10098\");\n p.setParameter(Profile.GUI, \"false\");\n ContainerController cc = rt.createMainContainer(p);\n\n HashMap<Integer, String> neighbors = new HashMap <Integer, String>();\n neighbors.put(1, \"2, 4, 3\");\n neighbors.put(2, \"1, 3\");\n neighbors.put(3, \"1, 2, 4\");\n neighbors.put(4, \"1, 3, 5\");\n neighbors.put(5, \"4\");\n\n//Create a container to host the Default Agent\n try {\n for (int i = 1; i <= MainController.numberOfAgents; i++) {\n AgentController agent = cc.createNewAgent(Integer.toString(i), \"ru.spbu.mas.DefaultAgent\",\n new Object[]{neighbors.get(i)});\n agent.start();\n }\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n }", "public void removeAllAgents() {\n\t\tagents.clear();\n\t}", "public interface MessageListener {\n\t\n\t/**\n\t * Method used to consume message\n\t * @param message\tMessage that You want to consume\n\t */\n\tvoid consumeMessage(String message);\n\t\n\t/**\n\t * Method used when You want to get all consumed messages\n\t * @return\tList of messages consumed from a jms queue/topic\n\t */\n\tList<String> getFeeds();\n\n}", "public void start()\n throws Exception\n { \n log.info(\"Reading resource: \\\"\" + this.monitoredObjectsResName + \"\\\"\");\n \n // Organise the handle to the subscription definition resource\n InputStreamReader in = null;\n \n try {\n in = new InputStreamReader(\n this.getClass().getResourceAsStream(this.monitoredObjectsResName));\n }\n catch (Exception e) {\n log.error(\"Accessing resource \\\"\" + this.monitoredObjectsResName + \"\\\"\", e);\n throw e;\n }\n \n // Parse and read-in the resource file\n MonitoredObjList monitoredObjList = null;\n \n try {\n monitoredObjList = MonitoredObjList.unmarshal(in);\n }\n catch (Exception e) {\n log.error(\"Parsing resource \\\"\" + this.monitoredObjectsResName + \"\\\"\", e);\n throw e;\n }\n \n log.info(\"\\\"\" + this.monitoredObjectsResName + \"\\\" \" + \n (monitoredObjList.isValid() ? \"valid\" : \"invalid\") +\n \". Read \" + monitoredObjList.getMonitoredObjCount() + \n \" monitored objects\");\n \n log.info(\"Executing resource: \\\"\" + this.monitoredObjectsResName + \"\\\"\");\n \n // Organise enough space to store the subscribed object names\n this.monitoredObjectsCache =\n new ArrayList(monitoredObjList.getMonitoredObjCount());\n \n // Iterate over the read monitoredObjects and act upon them \n for (int i = 0; i < monitoredObjList.getMonitoredObjCount(); i++) {\n \n // Get monitored object\n MonitoredObj s = monitoredObjList.getMonitoredObj(i);\n \n // Get target object name\n String targetName = s.getObjectName();\n \n if (log.isDebugEnabled())\n log.debug(\"Object \" + i + \" target: \\\"\" + targetName + \"\\\"\");\n \n // Get event types that are of interest and fill in the notification\n // filter\n RegExpNotificationFilterSupport filter =\n new RegExpNotificationFilterSupport();\n \n for (int j = 0; j < s.getNotificationTypeCount(); j++) {\n String eventType = s.getNotificationType(j);\n \n try {\n filter.enableType(eventType);\n \n if (log.isDebugEnabled())\n log.debug(\"Event type \" + (j+1) + \": \\\"\" + eventType + \"\\\"\"); \n }\n catch (REException e) {\n log.warn(\"Error compiling monitored object #\" + i + \n \": Event type \\\"\" + eventType + \"\\\"\", e);\n } \n }\n \n try {\n // Subscribe the notification collector to the monitored object\n ObjectName targetObjectName = new ObjectName(targetName);\n \n server.addNotificationListener(\n targetObjectName, \n listener, \n filter, \n listener.toString());\n \n // Record the object that has been subscribed to \n this.monitoredObjectsCache.add(targetObjectName); \n } \n catch (Exception e) {\n log.warn(\"Error executing monitored object directive #\" + i, e);\n }\n }\n log.info(\"Subscription manager done\");\n }", "public static void monitoring(){\n\t\tWebSelector.click(Xpath.monitoring);\n\t}", "public interface DistributedReplicantManagerImplMBean\n extends org.jboss.ha.framework.interfaces.DistributedReplicantManager\n{\n String listContent () throws Exception;\n String listXmlContent () throws Exception;\n}", "List<AgentReference> getCurrentAgents();", "public abstract MBeanNotificationInfo[] getNotificationInfo();", "void retreiveNotificationManagerProperties() {\r\n\r\n\t\tfinal EventManager evtMgr = EventManager.getInstance();\r\n\r\n\t\t// setting the path of the xmlfile for reading the file.\r\n\t\tfinal String sFileNameWithPath = evtMgr.getConfigXMLFilePath() != null ? evtMgr.getConfigXMLFilePath()\r\n\t\t\t\t: EventConstants.DEF_XMLFILE_PATH;\r\n\t\tfinal StringBuffer sbFileNamePath = new StringBuffer();\r\n\r\n\t\tif (sFileNameWithPath.endsWith(File.separator)) {\r\n\t\t\tsbFileNamePath.append(sFileNameWithPath);\r\n\t\t\tsbFileNamePath.append(EventConstants.XMLFILENAME);\r\n\t\t} else {\r\n\t\t\tsbFileNamePath.append(sFileNameWithPath);\r\n\t\t\tsbFileNamePath.append(File.separator);\r\n\t\t\tsbFileNamePath.append(EventConstants.XMLFILENAME);\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t// parsing the xml fil\r\n\t\t\t// XMLReader parser =\r\n\t\t\t// XMLReaderFactory.createXMLReader(EventConstants.XMLPARSER);\r\n\t\t\t// parser.setContentHandler(this);\r\n\t\t\t// parser.parse(new InputSource(new InputStreamReader(new\r\n\t\t\t// BufferedInputStream(new\r\n\t\t\t// FileInputStream(sbFileNamePath.toString())), \"UTF-8\")));\r\n\t\t\tStaticUtilities.parseXML(this, new File(sbFileNamePath.toString()));\r\n\t\t} catch (final Exception ex) {\r\n\t\t\tfinal StringBuffer sbException = new StringBuffer(RM.getString(\"VALUE_ERROR_PARSING_MSG\")); //$NON-NLS-1$\r\n\t\t\tsbException.append(sbFileNamePath.toString());\r\n\t\t\tsbException.append(\" file:\\n\"); //$NON-NLS-1$\r\n\t\t\tsbException.append(ex.toString());\r\n\r\n\t\t\tthrow new RuntimeException(sbException.toString());\r\n\t\t}\r\n\t}", "public interface Listener extends Remote{\n \n /**\n * \n * Handles new updated readings\n * @param sensors\n * @param monitorCount\n * @param sensorCount\n * @throws java.rmi.RemoteException \n */\n public void Changed(List<Sensor> sensors, int monitorCount, int sensorCount) throws java.rmi.RemoteException;\n \n /**\n * \n * Alerts monitor if the temperatures reach critical levels\n * @param sensor\n * @throws RemoteException \n */\n public void alertMonitor(Sensor sensor) throws RemoteException;\n \n /**\n * \n * Notifies monitors when a particular sensor is down\n * @param sensor\n * @throws RemoteException \n */\n public void notifySensorFailure(Sensor sensor) throws RemoteException;\n}", "protected void doWork() {\n\t\ttry {\n\t\t\twhile ((_cli != null) && _cli.hasNext()) {\n\t\t\t\tConversationMessage cm = _cli.next2();\n\t\t\t\t_messages.add(cm);\n\t\t\t}\n\t\t\tThread.sleep(_DOWORK_WAIT);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void get()\n {\n Session session = new Session(\"udp:\"+\"\"+\"/161\", writer);\n\n // creating PDU\n session.getBulk(\"1.3.6.1.2.1.1.1\");\n session.getBulk(\"1.3.6.1.2.1.1.2\");\n\n List<String> oList = new ArrayList<String>();\n oList.add(\"1.3.6.1.2.1.25.3.2.1.3.768\");\n oList.add(\"1.3.6.1.2.1.25.3.2.1.3.770\");\n\n session.get(oList);\n\n\n // creating PDU\n session.walk(\"1.3.6.1.2.1.25.3.2.1.3\");\n\n // wait for all sessions to complete\n while (!session.isComplete())\n {\n session.printStats();\n try {\n Thread.currentThread();\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }//sleep for 100 ms\n\n }\n session.printStats();\n writer.close();\n }", "public static void helloAgent(){\n\t\tHelloAgent agent = new HelloAgent();\r\n\t\r\n\t}", "public interface SimpleEventBusStatisticsMXBean {\n\n /**\n * Returns the amount of registered listeners.\n *\n * @return long representing the amount of registered listeners\n */\n long getListenerCount();\n\n /**\n * Returns a list of simple class names (class name without its package) of the registered listeners. Multiple\n * listeners with the same name are supported\n *\n * @return List of string representing the names of the registered listeners\n */\n List<String> getListenerTypes();\n\n /**\n * Returns the amount of received events.\n *\n * @return long representing the amount of received events\n */\n long getReceivedEventsCount();\n\n /**\n * resets the amount of events received.\n */\n void resetReceivedEventsCount();\n}", "@Override\n public long processTimer (long interval)\n {\n state.incVersion ();\n\n Map <String, JiniPeer> peers = agent.getPeers ();\n if (peers.size () > 0)\n {\n GossipMsg.Ping msg = new GossipMsg.Ping ();\n msg.appendDigest (state.getMessage ());\n\n for (JiniPeer peer : peers.values ()) {\n State peerState = (State) peer.getAttached ();\n if (peerState != null)\n msg.appendDigest (peerState.getMessage ());\n }\n\n // Gossip to some random live member\n boolean seed = sendGossip (msg, liveEndpoints);\n\n // Gossip to some unreachable member with some probability to check if he is back up\n sendGossipDead (msg);\n\n if (!seed || liveEndpoints.size() < seeds.size())\n sendGossip (msg, seeds);\n\n checkState ();\n }\n \n return interval;\n }", "protected void messageList() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tmessageStore.print();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "public interface Mailbox\n{\n\t/**\n\t * @return the message id of this mailbox.\n\t */\n\tpublic Long getMessageId();\n\n\t/**\n\t * Queues the message to the mailbox.\n\t * @param sender\n\t * @param msg\n\t * @return true if the message was accepted.\n\t * @throws Exception\n\t */\n\tpublic boolean message( Who sender, Message msg ) throws Exception;\n\n\t/**\n\t * @return the next message to be read from the mailbox, or null if\n\t * the mailbox is empty and closed. Wait forever for such a message\n\t * to be delivered.\n\t * @throws InterruptedException thread interrupt.\n\t */\n\tpublic Element read() throws InterruptedException;\n\n\t/**\n\t * @param maxDelay the maximum amount of time in milliseconds to\n\t * wait to read a message from an empty mailbox. 0 means wait\n\t * forever, -1 means don't wait at all.\n\t * @return the message read from the mailbox, or null if the mailbox\n\t * is empty and closed, or if the time limit was exceeeded.\n\t * @throws InterruptedException thread interrupt.\n\t */\n\tpublic Element read( int maxDelay ) throws InterruptedException;\n\t\n\t/**\n\t * Closes the mailbox so that no more messages can be delivered.\n\t * Queued messages remain to be read. Reading an empty closed\n\t * mailbox returns null.\n\t * @return true if this call closed the mailbox (that is, if action was\n\t * taken), false if the mailbox was already closed.\n\t */\n\tpublic boolean closeDelivery();\n\t\n\t/**\n\t * Closes the mailbox so that no more messages will be delivered or\n\t * read. Any remaining queued messages are delivered to a default\n\t * handler.\n\t * @return true if this call closed the mailbox (that is, if action was\n\t * taken), false if the mailbox was already closed.\n\t * @throws Exception\n\t */\n\tpublic boolean closeRead() throws Exception;\n\t\n\t/**\n\t * Registers a Notify interface implementation to receive a callback\n\t * when a mailbox's status is changed.\n\t * @param notify a Notify interface implementation to report the\n\t * delivery status to.\n\t * @param state a state value to pass thru to the Notify interface\n\t * implementation.\n\t * @param maxDelay the maximum amount of time in milliseconds to\n\t * wait for delivery of a message to the mailbox. 0 means wait\n\t * forever. The mailbox is closed upon timeout.\n\t * @throws IllegalStateException notify already registered.\n\t */\n\tpublic void registerNotify( Notify notify, Object state, int maxDelay );\n\t\n\t/**\n\t * Unregisters a Notify interface implementation from receiving a callback\n\t * when a mailbox's status is changed. Cancels any timeout.\n\t * @param notify a Notify interface implementation which was previously\n\t * registered.\n\t * @throws IllegalStateException the specified notify is not registered.\n\t */\n\tpublic void unregisterNotify( Notify notify );\n\n\t/**\n\t * @return true if the mailbox is empty.\n\t */\n\tpublic boolean isEmpty();\n\t\n\t/**\n\t * @return true if the mailbox is closed.\n\t */\n\tpublic boolean isClosed();\n\n\t/**\n\t * @return true if the mailbox is full.\n\t */\n\tpublic boolean isFull();\n\t\n\t/**\n\t * The message as queued, including src and sender.\n\t */\n\tpublic final class Element\n\t{\n\t\t/**\n\t\t * @param sender the message sender.\n\t\t * @param msg the message.\n\t\t */\n\t\tpublic Element( Who sender, Message msg )\n\t\t{\n\t\t\tthis.sender = sender;\n\t\t\tthis.msg = msg;\n\t\t}\n\t\t\n\t\t/**\n\t\t * The message sender.\n\t\t */\n\t\t\n\t\tpublic final Who sender;\n\t\t/**\n\t\t * the message.\n\t\t */\n\t\tpublic final Message msg;\n\t}\n\t\n\t/**\n\t * Interface used to notify of mailbox status.\n\t */\n\tpublic interface Notify\n\t{\n\t\t/**\n\t\t * Notifies of mailbox status change.\n\t\t * @param mb the mailbox whose status has changed.\n\t\t * @param state the state object passed in the register\n\t\t * method.\n\t\t * @param closed true if the mailbox timeout has expired and\n\t\t * the mailbox is now closed to delivery, false if a message\n\t\t * has arrived.\n\t\t */\n\t\tpublic void mailboxStatus( Mailbox mb, Object state, boolean closed );\n\t}\n}", "public interface Mailbox extends Runnable {\n /**\n * You should stop.\n */\n public void shutdown ();\n\n /**\n * The message host calls this to put a message in the mailbox.\n *\n * Beware that this method is called from the mailman's thread.\n */\n public void putMessage (Message message);\n}", "public void body() {\r\n \t // wait for a little while for about 3 seconds.\r\n // This to give a time for GridResource entities to register their\r\n // services to GIS (GridInformationService) entity.\r\n super.gridSimHold(1000.0);\r\n System.out.println(name_ + \": retrieving GridResourceList\");\r\n LinkedList resList = super.getGridResourceList();\r\n double[] sendTime = new double[totalGridlet];\r\n double[] receiveTime = new double[totalGridlet];\r\n \r\n // initialises all the containers\r\n int totalResource = resList.size();\r\n write(name_ + \": obtained \" + totalResource + \" resource IDs in GridResourceList\");\r\n int resourceID[] = new int[totalResource];\r\n String resourceName[] = new String[totalResource];\r\n \r\n //get characteristics of resources\r\n ResourceCharacteristics resChar;\r\n double resourceCost[] = new double[totalResource];\r\n double resourcePEs[] = new double[totalResource];\r\n int i = 0 ;\r\n for (i = 0; i < totalResource; i++)\r\n {\r\n // Resource list contains list of resource IDs not grid resource\r\n // objects.\r\n resourceID[i] = ( (Integer)resList.get(i) ).intValue();\r\n\r\n // Requests to resource entity to send its characteristics\r\n super.send(resourceID[i], GridSimTags.SCHEDULE_NOW,\r\n GridSimTags.RESOURCE_CHARACTERISTICS, this.myId_);\r\n\r\n // waiting to get a resource characteristics\r\n resChar = (ResourceCharacteristics) super.receiveEventObject();\r\n resourceName[i] = resChar.getResourceName();\r\n resourceCost[i] = resChar.getCostPerSec();\r\n resChar.getNumFreePE();\r\n resourcePEs[i] = resChar.getNumPE();\r\n\r\n write(\"Received ResourceCharacteristics from \" +\r\n resourceName[i] + \", with id = \" + resourceID[i] + \" with \" + resourcePEs[i] + \" PEs\");\r\n\r\n // record this event into \"stat.txt\" file\r\n super.recordStatistics(\"\\\"Received ResourceCharacteristics \" +\r\n \"from \" + resourceName[i] + \"\\\"\", \"\");\r\n }\r\n \r\n //total PE number\r\n double totalPEs = 0;\r\n for(i = 0; i < totalResource; i++){\r\n \ttotalPEs += resourcePEs[i];\r\n }\r\n\r\n\r\n ////////////////////////////////////////////////\r\n // SUBMIT Gridlets\r\n Gridlet gl = null;\r\n boolean success;\r\n \r\n //initial populating of PEs\r\n \r\n int j = 0; //number of gridlet\r\n int k = 0; // number of PE\r\n startTime = GridSim.clock(); ///Start time of the submission;\r\n for(i = 0; i < totalResource; i++){ \r\n \tfor(k = 0; k < resourcePEs[i] && j < list_.size(); k++){\r\n \t\tgl = (Gridlet) list_.get(j);\r\n \t\tif(j % chunkSize == 0){\r\n \t\t\tSystem.out.println(\" .\" + j + \" / \" + totalGridlet );\r\n \t\t\t//write(name_ + \"Sending Gridlet #\" + j + \"with id \" + gl.getGridletID() + \" to PE \" + k + \" at \" + resourceName[i] + \" at time \" + GridSim.clock());\r\n \t\t}\r\n \t\t\t//write(gridletToString(gl));\r\n success = super.gridletSubmit(gl, resourceID[i]);\r\n sendTime[j]= GridSim.clock(); //remember the time when the gridlet was submited\r\n j++;\r\n \t}\r\n }\r\n write(name_ +\"%%%%%%%%%%% \" + j + \"gridlets submitted, \" + (list_.size() - j) + \" gridlets left after initial submision\");\r\n \r\n ////////////////////////////////////////////////////////\r\n // RECEIVES Gridlets and submit new\r\n\r\n // hold for few period - few seconds since the Gridlets length are\r\n // quite huge for a small bandwidth\r\n //super.gridSimHold(5);\r\n \r\n int resourceFromID = 0;\r\n String resourceFromName = null;\r\n \r\n // receives the gridlet back\r\n for (i = 0; i < totalGridlet; i++){ //loop over received gridlets\r\n gl = (Gridlet) super.receiveEventObject(); // gets the Gridlet\r\n if( i==0 ) { saturationStart = GridSim.clock();} //first gridlet received \r\n receiveTime[list_.indexOf(gl)]= GridSim.clock(); //remember the time when the gridlet was received\r\n receiveList_.add(gl); // add into the received list \r\n resourceFromID = gl.getResourceID(); //resource which has a free PE\r\n resourceFromName = GridSim.getEntityName(resourceFromID);\r\n //if(j % (list_.size() / 100) == 0){\r\n \t//write(name_ + \": Receiving Gridlet #\" +\r\n //gl.getGridletID() + \"from: \" + resourceFromName + \" at time = \" + GridSim.clock() );\r\n //}\r\n \r\n if(j < totalGridlet){ //if not all gridlets are submitted\r\n \t//submit next gridlet\r\n \tgl = (Gridlet) list_.get(j);\r\n \t//if(j % (list_.size() / 100) == 0){\r\n \t\t//write(name_ + \"Sending next Gridlet #\" + j + \"with id \" + gl.getGridletID() + \" to \" + resourceFromName + \" at time \" + GridSim.clock());\r\n \t//}\r\n \t\r\n \t\tif(j % chunkSize == 0){\r\n \t\t\tSystem.out.println(\" .\" + j + \" / \" + totalGridlet );\r\n \t\t}\r\n \tsuccess = super.gridletSubmit(gl, resourceFromID);\r\n sendTime[j]= GridSim.clock(); //remember the time when the gridlet was submited\r\n j++;\r\n if (j == totalGridlet){\r\n \twrite(name_ + \" ALL GRIDLETS SUBMITTED\");\r\n \tsaturationFinish = GridSim.clock();\r\n }\r\n } \r\n }\r\n finishTime = GridSim.clock();\r\n \r\n ////////////print statistics\r\n //printGridletList(receiveList_, name_);\r\n for (i = 0; i < list_.size(); i += list_.size() / 5){\r\n \tgl = (Gridlet) list_.get(i);\r\n \tprintGridletHist(gl);\r\n }\r\n \r\n ////print transfer times \r\n System.out.println(\"-------------gridlet log--------------\");\r\n System.out.println(\"getGridletID getResourceID getGridletLength \tgetGridletFileSize\t getGridletOutputSize\t \tinTransfer\t \t\toutTransfer\t\t getWallClockTime\t\ttotalTime \t\t\tslowdown\");\r\n\r\n double inTransfer, outTransfer, totalTime, slowdown; \r\n String indent = \"\t\t\";\r\n for (i = 0; i < list_.size(); i += chunkSize / 5){\r\n \tgl = (Gridlet) list_.get(i);\r\n \tinTransfer = gl.getExecStartTime() - sendTime[i];\r\n \toutTransfer = receiveTime[i] - gl.getFinishTime();\r\n \ttotalTime = receiveTime[i] - sendTime[i];\r\n \tslowdown = totalTime / gl.getWallClockTime();\r\n \twrite(gl.getGridletID() + indent + gl.getResourceID() + indent + gl.getGridletLength() + indent + gl.getGridletFileSize() + indent + gl.getGridletOutputSize() + indent +\r\n \t\t\tinTransfer + indent + outTransfer + indent + gl.getWallClockTime() + indent + totalTime + indent + slowdown);\r\n \t\r\n }\r\n\r\n\r\n ////////////////////////////////////////////////////////\r\n //ping resources\r\n for(i = 0; i < totalResource; i++){ \r\n \tpingRes(resourceID[i]);\r\n }\r\n \r\n ///calculate computational efficiency per resource\r\n double[] firstJobSend = new double[totalResource];\r\n double[] lastJobReceived = new double[totalResource];\r\n double[] work = new double[totalResource];\r\n int[] jobs = new int[totalResource];\r\n \r\n double[] outminTransferTime = new double[totalResource];\r\n double[] outmaxTransferTime = new double[totalResource];\r\n double[] outtransferTime = new double[totalResource];\r\n \r\n double[] minTransferTime = new double[totalResource];\r\n double[] maxTransferTime = new double[totalResource];\r\n double[] transferTime = new double[totalResource];\r\n //initialize values\r\n for(i = 0; i < totalResource; i++){\r\n \tfirstJobSend[i] = Double.MAX_VALUE;\r\n \tlastJobReceived[i] = 0.0;\r\n \twork[i] = 0.0;\r\n \tjobs[i] = 0;\r\n \tminTransferTime[i] = Double.MAX_VALUE;\r\n \tmaxTransferTime[i] = 0.0;\r\n \ttransferTime[i] = 0.0;\r\n \t\r\n \toutminTransferTime[i] = Double.MAX_VALUE;\r\n \toutmaxTransferTime[i] = 0.0;\r\n \touttransferTime[i] = 0.0;\r\n }\r\n \r\n double gridletTransferTime;\r\n double outgridletTransferTime;\r\n for (j = 0; j < list_.size(); j++){ //loop over gridlets\r\n \tgl = (Gridlet) list_.get(j);\r\n \tfor(i = 0; i < totalResource; i++){ //loop over resources\r\n \t\tif(gl.getResourceID() == resourceID[i]){\r\n \t\t\tjobs[i]++;\r\n \t\t\twork[i] += gl.getActualCPUTime();\r\n \t\t\tgridletTransferTime = gl.getSubmissionTime() - sendTime[j];\r\n \t\t\toutgridletTransferTime = receiveTime[j] - gl.getFinishTime();\r\n \t\t\ttransferTime[i] += gridletTransferTime;\r\n \t\t\touttransferTime[i] += outgridletTransferTime;\r\n \t\t\tif(firstJobSend[i] > sendTime[j]) { firstJobSend[i] = sendTime[j]; } //serch for the first job submited to the resource \r\n \t\t\tif( lastJobReceived[i] < receiveTime[j] ) { lastJobReceived[i] = receiveTime[j]; } //search for the last job arrived from the resource \r\n \t\t\tif( minTransferTime[i] > gridletTransferTime ) { minTransferTime[i] = gridletTransferTime; }\r\n \t\t\tif( maxTransferTime[i] < gridletTransferTime ) { maxTransferTime[i] = gridletTransferTime; }\r\n \t\t\tif( outminTransferTime[i] > outgridletTransferTime ) { outminTransferTime[i] = outgridletTransferTime; }\r\n \t\t\tif( outmaxTransferTime[i] < outgridletTransferTime ) { outmaxTransferTime[i] = outgridletTransferTime; }\r\n \t\t\t\r\n \t\t\tbreak;\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }\r\n \r\n ///////////////////////////////////////\r\n //print computational efficiency \r\n double cost = 1.0;\r\n double efficiency = 0.0;\r\n indent = \"\t\";\r\n System.out.println(\"#####################Computational efficiency######################\");\r\n System.out.println(\"Name PEs\tjobs\tfirstJobSend\tlastJobReceived\tcost\t\twork\tefficiency\tminTransfer\tmaxTransfer\t\"\r\n \t\t+ \"averageTransfer\toutminTrans\toutmaxTrans\taverageOutTrans\");\r\n for(i = 0; i < totalResource; i++){ //loop over resources\r\n \tcost = (lastJobReceived[i] - firstJobSend[i]) * resourcePEs[i] ;\r\n \tefficiency = work[i] / cost; \t\r\n \t\r\n \tSystem.out.print(String.format(\"%6s\t\", resourceName[i]));\r\n \tSystem.out.print(String.format(\"%5.0f\t\",resourcePEs[i] ));\r\n \tSystem.out.print(String.format(\"%d\t\",jobs[i] ));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",firstJobSend[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",lastJobReceived[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",cost));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",work[i])); \t\r\n \tSystem.out.print(String.format(\"%2.3f\t\",efficiency));\r\n \t\r\n \tSystem.out.print(String.format(\"%10.3f\t\",minTransferTime[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",maxTransferTime[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",(transferTime[i] / jobs[i]) ) );\r\n \tSystem.out.print(String.format(\"%10.3f\t\",outminTransferTime[i]));\r\n \tSystem.out.print(String.format(\"%10.3f\t\",outmaxTransferTime[i]));\r\n \tSystem.out.println(String.format(\"%10.3f\t\",(outtransferTime[i] / jobs[i]) ));\r\n \t\r\n\r\n \r\n \tSystem.out.println();\r\n \r\n }\r\n \r\n /////////////////////////////\r\n //print overall statistics\r\n write(\"---------------summary------------------\");\r\n write(\"Number of gridlets: \" + totalGridlet);\r\n write(\" Resources: \" + totalResource);\r\n write(\" PEs: \" + totalPEs);\r\n \r\n write(\" Submission start: \" + startTime);\r\n write(\" saturationStart: \" + saturationStart);\r\n write(\" saturationFinish: \" + saturationFinish);\r\n write(\" Last receive: \" + finishTime);\r\n \r\n write(\" Makespan: \" + (finishTime - startTime));\r\n write(\" Saturated interval: \" + (saturationFinish - saturationStart));\r\n write(\" Saturated time ratio: \" + (saturationFinish - saturationStart) / (finishTime - startTime));\r\n write(\"------------------------------------------\");\r\n\r\n ////////////////////////////////////////////////////////\r\n // shut down I/O ports\r\n shutdownUserEntity();\r\n terminateIOEntities();\r\n\r\n // don't forget to close the file\r\n if (report_ != null) {\r\n report_.finalWrite();\r\n }\r\n\r\n write(this.name_ + \": sending and receiving of Gridlets\" +\r\n \" complete at \" + GridSim.clock() );\r\n \r\n\r\n \r\n \r\n ////////////////////////////////////////////////////////\r\n // shut down I/O ports\r\n shutdownUserEntity();\r\n terminateIOEntities();\r\n System.out.println(this.name_ + \":%%%% Exiting body() at time \" +\r\n GridSim.clock());\r\n }", "public ITCMessage[] readMessages(int inNumberMessages) throws IOException;", "public void loadMessages() {\n\t\tList<Message> messages = null;\n\t\ttry {\n\t\t\tmessages = msgHelper.getMessages();\n\t\t} catch (URLException e) {\n\t\t\tLog.d(\"MESSAGE\", \"Tried loading messages without a URL configured.\");\n\t\t\tcancelTask();\n\t\t}\n\t\tif (messages == null) {\n\t\t\treturn;\n\t\t}\n\t\tLog.d(\"MESSAGE\", \"Adding messages: \" + messages.size());\n\t\tif (messages.size() > 0) {\n\t\t\taddMessages(messages);\n\t\t}\n\t\t//pruneMessages(messageList, MAX_MESSAGES);\n\t\tupdateHandler.post(updateRunner);\n\t}", "public void action() {\n try {\n //System.out.println(\"LoadAgent\"+neighId[i]);\n DFAgentDescription template = new DFAgentDescription();\n ServiceDescription sd = new ServiceDescription();\n sd.setName(\"DSO agent\");\n template.addServices(sd);\n DFAgentDescription[] result = DFService.search(myAgent, template);\n AgentAIDs[0] = result[0].getName();\n sd.setName(\"PV Agent\");\n template.addServices(sd);\n result = DFService.search(myAgent, template);\n AgentAIDs[2] = result[0].getName();\n sd.setName(\"Load Agent\");\n template.addServices(sd);\n result = DFService.search(myAgent, template);\n AgentAIDs[3] = result[0].getName();\n\n } catch (FIPAException ex) {\n Logger.getLogger(CurtailAgent.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n //initializa GUI and add listeners\n appletVal = new SetCellValues();\n appletVal.playButton.addActionListener(new listener());\n appletVal.playButton.setEnabled(true);\n appletVal.resetButton.addActionListener(new listener());\n appletVal.resetButton.setEnabled(true);\n //operate microgrid\n addBehaviour(operate);\n\n }", "private void receive() {\n\t\tMQGetMessageOptions gmo = new MQGetMessageOptions();\n\t\tif (keepMessages) {\n\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t| MQConstants.MQGMO_BROWSE_FIRST;\n\t\t} else {\n\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2;\n\t\t\tif (syncPoint) {\n\t\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_SYNCPOINT;\n\t\t\t}\n\t\t}\n\t\tgmo.matchOptions = MQConstants.MQMO_NONE;\n\t\tgmo.waitInterval = this.waitInterval;\n\n\t\ttry {\n\t\t\tint lastSeqNo = 0;\n\t\t\tlong lastTs = 0;\n\t\t\tint messagecounter = 0;\n\t\t\twhile (true) {\n\t\t\t\tif (!(qmgr.isConnected())) {\n\t\t\t\t\treconnectMq();\n\t\t\t\t}\n\t\t\t\tif (!(queue.isOpen())) {\n\t\t\t\t\treconnectMq();\n\t\t\t\t}\n\t\t\t\thaltFileExists();\n\t\t\t\tif (haltStatus) {\n\t\t\t\t\treadQueue = false;\n\t\t\t\t} else {\n\t\t\t\t\treadQueue = true;\n\t\t\t\t}\n\t\t\t\tint queueNotInhibited = queue.getInhibitGet();\n\t\t\t\tif (queueNotInhibited == MQConstants.MQQA_GET_INHIBITED) {\n\t\t\t\t\treadQueue = false;\n\t\t\t\t}\n\t\t\t\tproduceCounts();\n\t\t\t\tif (readQueue) {\n\t\t\t\t\tqueueDepth = queue.getCurrentDepth();\n\t\t\t\t\tif (queueDepth != 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\trcvMessage = new MQMessage();\n\t\t\t\t\t\t\tif (mqccsid != 0) {\n\t\t\t\t\t\t\t\trcvMessage.characterSet = mqccsid;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tqueue.get(rcvMessage, gmo);\n\t\t\t\t\t\t\trecordCountsRcvd++;\n\t\t\t\t\t\t\tstrLen = rcvMessage.getMessageLength();\n\t\t\t\t\t\t\tstrData = new byte[strLen];\n\t\t\t\t\t\t\trcvMessage.readFully(strData);\n\t\t\t\t\t\t\tmessagePutMs = rcvMessage.putDateTime.getTimeInMillis();\n\t\t\t\t\t\t\tseqNo = rcvMessage.messageSequenceNumber;\n\t\t\t\t\t\t\tif (lastTs == messagePutMs && seqNo == 1) {\n\t\t\t\t\t\t\t\tseqNo = lastSeqNo + seqNo;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmsgText = new String(strData);\n\t\t\t\t\t\t\tjsonOut = new JSONArray();\n\t\t\t\t\t\t\tjsonKey = new JSONObject();\n\t\t\t\t\t\t\tjsonValue = new JSONObject();\n\t\t\t\t\t\t\tjsonKey.put(\"key\", Long.toString(messagePutMs) + \"_\" + seqNo);\n\t\t\t\t\t\t\tjsonValue.put(\"value\", msgText);\n\t\t\t\t\t\t\tLOG.debug(\"MQ MsgKey: \" + Long.toString(messagePutMs) + \"_\" + seqNo);\n\t\t\t\t\t\t\tLOG.debug(\"MQ MsgValue: \" + msgText);\n\t\t\t\t\t\t\tjsonOut.put(jsonKey);\n\t\t\t\t\t\t\tjsonOut.put(jsonValue);\n\t\t\t\t\t\t\tmsgList.add(jsonOut.toString());\n\t\t\t\t\t\t\tlastTs = messagePutMs;\n\t\t\t\t\t\t\tlastSeqNo = seqNo;\n\t\t\t\t\t\t\tmessagecounter++;\n\t\t\t\t\t\t\t// move cursor to next message\n\t\t\t\t\t\t\tif (msgList.size() > maxUMsg / 2) {\n\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (msgList.size() > queueDepth) {\n\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (keepMessages) {\n\t\t\t\t\t\t\t\tgmo.options = MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t\t\t\t\t\t| MQConstants.MQGMO_WAIT | MQConstants.MQGMO_BROWSE_NEXT;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tgmo.options = MQConstants.MQGMO_CONVERT | MQConstants.MQGMO_PROPERTIES_FORCE_MQRFH2\n\t\t\t\t\t\t\t\t\t\t| MQConstants.MQGMO_WAIT;\n\t\t\t\t\t\t\t\tif (syncPoint) {\n\t\t\t\t\t\t\t\t\tgmo.options = gmo.options | MQConstants.MQGMO_SYNCPOINT;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (MQException e) {\n\t\t\t\t\t\t\tif (e.reasonCode == MQConstants.MQRC_NO_MSG_AVAILABLE) {\n\t\t\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnoMessagesCounter++;\n\t\t\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t\t\t} else if (e.reasonCode == MQConstants.MQRC_SYNCPOINT_LIMIT_REACHED) {\n\t\t\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnoMessagesCounter++;\n\t\t\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\tCalendar.getInstance().getTime() + \" - MQ Reason Code: \" + e.reasonCode);\n\t\t\t\t\t\t\t\treconnectMq();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\t\t\tSystem.out.println(Calendar.getInstance().getTime() + \" - Error: \" + ioe.getMessage());\n\t\t\t\t\t\t\treconnectMq();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthreadWait();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (msgList.size() > 0) {\n\t\t\t\t\t\tcommitMessages();\n\t\t\t\t\t}\n\t\t\t\t\tthreadWait();\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Throwable t) {\n\t\t\t// restart if there is any other error\n\t\t\trestart(Calendar.getInstance().getTime() + \" - Error receiving data from Queue or QMGR\", t);\n\t\t}\n\n\t}", "public void startSimulation(){\n Enumeration enumAgents = agents.elements();\n\n while (enumAgents.hasMoreElements()) {\n ProcessData data = (ProcessData) enumAgents.nextElement();\n createThreadFor(data.agent).start();\n }\n }", "public static void main(String[] args) throws StaleProxyException\n {\n AgentController Data=main1.createNewAgent(\"Data\",\"test.Data\",null);\n Data.start();\n }", "@Test\n public void testMemoryMetric() {\n MetricValue mv = new MetricValue.Builder().load(40).add();\n\n MEMORY_METRICS.forEach(cmt -> testUpdateMetricWithoutId(cmt, mv));\n MEMORY_METRICS.forEach(cmt -> testLoadMetric(nodeId, cmt, mv));\n }", "public static void main(String[] args) {\n ApplicationContext context = new ClassPathXmlApplicationContext(\"spring-rabbitmq-context.xml\");\n\n AmqpTemplate aTemplate = (AmqpTemplate) context.getBean(\"myTemplate\");// getting a reference to the sender bean\n\n List<String> strings = readChangeLogFile();\n\n String routingKey = \"storm.rabbitmq.int.message\";\n\n for (int i = 0; i < 100; i++) {\n for (String msg : strings) {\n aTemplate.convertAndSend(routingKey, msg);\n }\n\n }\n\n }", "public void run()\n {\n //while (still executing jobs on grid)\n // attempt to sample data\n while (processingJobs)\n {\n //if (not paused)\n // sample data\n if (!paused)\n {\n //get the storage element object appropriate for this thread\n int ind = nodeChoice.indexOf('e');\n String siteno = nodeChoice.substring(ind+1);\n int siteID = Integer.parseInt(siteno);\n site = _gc.findGridSiteByID(siteID);\n StorageElement se = site.getSE();\n //sample time\n long timeMillis = time.getRunningTimeMillis();\n timeSecs = (int)(timeMillis/1000);\n //sample capacity\n capacity = se.getCapacity();\n float usage = (capacity - se.getAvailableSpace())/100;\n /* if (range values identical for last three readings)\n * remove intermediate statistic\n */\n if (usage==prevUsage&&usage==prevPrevUsage)\n { \n int itemCount = seriesSEUVTime.getItemCount();\n if (itemCount>2)\n seriesSEUVTime.remove(itemCount-1);\n } \n prevPrevUsage = prevUsage;\n prevUsage = usage;\n seriesSEUVTime.add(timeSecs, usage);\n pieDataset.setValue(\"Used Storage (GB)\", new Integer((int)((capacity - se.getAvailableSpace())/100)));\n pieDataset.setValue(\"Free Storage (GB)\", new Integer((int)((se.getAvailableSpace())/100)));\n //if (not saving all graphs)\n // try to refresh statistics\n if(!printingAll)\n this.sendDatatoGUI();\n }\n \n //delay next sample by short time\n try\n {\n if (paused)\n sleep(Integer.MAX_VALUE);\n else\n sleep(samplingDelay);\n }\n catch (InterruptedException e)\n {\n //in here if user is wishing to see chart from this object\n this.sendDatatoGUI();\n } \n }\n \n //out here only when all jobs have finished.\n //thread shall sleep for long time but can be \n //re-awakened if user wants to see statistics \n //from this object when run is complete.\n while (true)\n {\n try\n {\n sleep(Integer.MAX_VALUE);\n }\n catch (InterruptedException e)\n {\n //in here if user is wishing to see chart from this object\n this.sendDatatoGUI();\n }\n }\n }", "private void receive() {\n\t\t\ttry{\n\t\t\t\twhile(true){\n\t\t\t\t\tsuper.store(generateSimulateData());\n\t\t\t\t\tSystem.out.println(\"模拟接收数据\");\n\t\t\t\t\tThread.sleep(10000);\n\t\t\t\t}\n\t\t\t}catch(Exception ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t }", "@Override\n public void run() {\n Message message;\n while(true){\n logger.debug(\"SMS Reader Thread is waiting for incoming messages\");\n message = messageQueue.getInputSMS().poll() ;\n logger.debug(\"SMS message has been received from \"+ message.getFromWhom());\n view.receivedMessages.append(message.getFromWhom().toString() +\" :\");\n view.receivedMessages.append(message.getData() + \"\\n\");\n view.setPreferredSize(new Dimension(view.getSize().height+10, view.getSize().width));\n view.jScrollPaneReceivedMessages.getVerticalScrollBar().setValue(view.jScrollPaneReceivedMessages.getVerticalScrollBar().getMaximum());\n view.revalidate();\n }\n }", "public interface DeviceGatewayMonitorJMXMBean {\n\t/**\n\t * @return current tunnel connection count\n\t */\n\tint getTunnelConnectionCount();\n\n\t/**\n\t * @return heartbeat request times in last second\n\t */\n\tlong getHeartbeatCount();\n\n\t/**\n\t * @return list message request times in last second\n\t */\n\tlong getListRequestCount();\n\n\t/**\n\t * @return list message request successful times in last second\n\t */\n\tlong getListSuccessCount();\n\n\t/**\n\t * @return list message service unavailable times in last second\n\t */\n\tlong getListServiceUnavailableCount();\n\n\t/**\n\t * @return register request times in last second\n\t */\n\tlong getRegisterRequestCount();\n\n\t/**\n\t * @return register request successful times in last second\n\t */\n\tlong getRegisterSuccessCount();\n\n\t/**\n\t * @return register service unavailable times in last second\n\t */\n\tlong getRegisterServiceUnavailableCount();\n\n\t/**\n\t * @return auth request times in last second\n\t */\n\tlong getAuthRequestCount();\n\n\t/**\n\t * @return auth request successful times in last second\n\t */\n\tlong getAuthSuccessCount();\n\n\t/**\n\t * @return auth service unavailable times in last second\n\t */\n\tlong getAuthServiceUnavailableCount();\n\n\t/**\n\t * @return count request times in last second\n\t */\n\tlong getCountRequestCount();\n\n\t/**\n\t * @return count request successful times in last second\n\t */\n\tlong getCountSuccessCount();\n\n\t/**\n\t * @return Count service unavailable times in last second\n\t */\n\tlong getCountServiceUnavailableCount();\n\n\t/**\n\t * @return update request times in last second\n\t */\n\tlong getUpdateRequestCount();\n\n\t/**\n\t * @return update request successful times in last second\n\t */\n\tlong getUpdateSuccessCount();\n\n\t/**\n\t * @return update service unavailable times in last second\n\t */\n\tlong getUpdateServiceUnavailableCount();\n\n\t/**\n\t * @return bind request times in last second\n\t */\n\tlong getBindRequestCount();\n\n\t/**\n\t * @return bind request successful times in last second\n\t */\n\tlong getBindSuccessCount();\n\n\t/**\n\t * @return bind service unavailable times in last second\n\t */\n\tlong getBindServiceUnavailableCount();\n\n\t/**\n\t * @return unbind request times in last second\n\t */\n\tlong getUnbindRequestCount();\n\n\t/**\n\t * @return unbind request successful times in last second\n\t */\n\tlong getUnbindSuccessCount();\n\n\t/**\n\t * @return unbind service unavailable times in last second\n\t */\n\tlong getUnbindServiceUnavailableCount();\n\n\t/**\n\t * @return list message request times in last second\n\t */\n\tlong getAckListRequestCount();\n\n\t/**\n\t * @return list message request successful times in last second\n\t */\n\tlong getAckListSuccessCount();\n\n\t/**\n\t * @return list message service unavailable times in last second\n\t */\n\tlong getAckListServiceUnavailableCount();\n}", "@Override\n public Receive<Command> createReceive() {\n return newReceiveBuilder()\n .onMessageEquals(Start.INSTANCE, this::onStart) //Call onStart when Start.INSTANCE is received\n .onMessage(SendPrimesFound.class, this::onSendPrimesFound) //Call onSendPrimesFound when SendPrimesFound class is received\n .onMessage(SetNumbersToSearchAndNumberOfWorkers.class, this::onSetNumbersToSearchAndNumberOfWorkers) //Call onSetNumbersToSearchAndNumberOfWorkers when SetNumbersToSearchAndNumberOfWorkers is received\n .build();\n\n }", "public interface ServerMonitorMXBean extends Statistic {\n\n String getHostName();\n\n int getPort();\n\n String getStartupAt();\n\n /**\n * The block IPs\n */\n Set<String> getBlackList();\n}", "public void listMessages() {\n\t\tSystem.out.println(\"== The wall of \" + name + \" ==\");\n\t\tfor(String msg : messages)\n\t\t{\n\t\t\tSystem.out.println(msg);\n\t\t}\n\t}", "void onKernelMessage(KernelMessage msg) {\n\t\tassert(msg!=null);\n\t\tNetworkMessageTransportService mts = getMTS(NetworkMessageTransportService.class);\n\t\tswitch(msg.TYPE) {\n\t\t\n\t\tcase YELLOW_PAGE_REGISTERING:\n\t\t\tif ((msg.IDENTIFIER!=null)&&\n\t\t\t\t(msg.SERVICE!=null)&&\n\t\t\t\t(!isRegisteredAgent(msg.SERVICE,(AgentIdentifier)msg.IDENTIFIER))) {\n\t\t\t\tNetworkKernel.displayKernelMessage(\"Registration of \" //$NON-NLS-1$\n\t\t\t\t\t\t+msg.IDENTIFIER.toString()\n\t\t\t\t\t\t+\" for service \" //$NON-NLS-1$\n\t\t\t\t\t\t+msg.SERVICE);\n\t\t\t\tregisterService(msg.SERVICE,(AgentIdentifier)msg.IDENTIFIER);\n\t\t\t\tmts.broadcast(msg);\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase YELLOW_PAGE_UNREGISTERING:\n\t\t\tif ((msg.IDENTIFIER!=null)&&\n\t\t\t\t(msg.SERVICE!=null)&&\n\t\t\t\t(isRegisteredAgent(msg.SERVICE,(AgentIdentifier)msg.IDENTIFIER))) {\n\t\t\t\tNetworkKernel.displayKernelMessage(\"Unregistration of \" //$NON-NLS-1$\n\t\t\t\t\t\t+msg.IDENTIFIER.toString()\n\t\t\t\t\t\t+\" for service \" //$NON-NLS-1$\n\t\t\t\t\t\t+msg.SERVICE);\n\t\t\t\tunregisterService(msg.SERVICE,(AgentIdentifier)msg.IDENTIFIER);\n\t\t\t\tmts.broadcast(msg);\n\t\t\t}\n\t\t\telse if ((msg.IDENTIFIER==null)&&\n\t\t\t\t\t (msg.SERVICE!=null)&&\n\t\t\t\t\t (isRegisteredService(msg.SERVICE))) {\n\t\t\t\tNetworkKernel.displayKernelMessage(\"Unregistration of the service \" //$NON-NLS-1$\n\t\t\t\t\t\t+msg.SERVICE);\n\t\t\t\tunregisterService(msg.SERVICE);\n\t\t\t\tmts.broadcast(msg);\n\t\t\t}\n\t\t\telse if ((msg.IDENTIFIER!=null)&&\n\t\t\t\t\t (msg.SERVICE==null)&&\n\t\t\t\t\t (isRegisteredAgent((AgentIdentifier)msg.IDENTIFIER))) {\n\t\t\t\tNetworkKernel.displayKernelMessage(\"Unregistration of the agent \" //$NON-NLS-1$\n\t\t\t\t\t\t+msg.SERVICE\n\t\t\t\t\t\t+\" for all there services\"); //$NON-NLS-1$\n\t\t\t\tunregisterServices((AgentIdentifier)msg.IDENTIFIER);\n\t\t\t\tmts.broadcast(msg);\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase KERNEL_PRESENTATION:\n\t\t\tif (msg.IDENTIFIER!=null) {\n\t\t\t\tNetworkKernel.displayKernelMessage(\"Forwarding service definitions to \" //$NON-NLS-1$\n\t\t\t\t\t\t+msg.IDENTIFIER.toString());\n\t\t\t\tString[] services = getAllServices();\n\t\t\t\tfor(int idxServ=0; idxServ<services.length; idxServ++) {\n\t\t\t\t\tAgentIdentifier[] agents = getAgents(services[idxServ]);\n\t\t\t\t\tfor(int idxAg=0; idxAg<agents.length; idxAg++) {\n\t\t\t\t\t\tKernelMessage m = new KernelMessage(\n\t\t\t\t\t\t\t\tYellowPages.class,\n\t\t\t\t\t\t\t\tKernelMessage.Type.YELLOW_PAGE_REGISTERING,\n\t\t\t\t\t\t\t\tservices[idxServ],\n\t\t\t\t\t\t\t\tagents[idxAg]);\n\t\t\t\t\t\tmts.send((KernelIdentifier)msg.IDENTIFIER,m);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\t// Ignore all other kernel messages\n\t\t}\n\t}", "public void travelMessages() {\n Set<MessageInterface> messages = travelingMessages.keySet();\n \n Statistics statistics = Statistics.getStatistics();\n statistics.calculateNetworkLoad(messages.size());\n Set<MessageInterface> messagesToBeRemoved = new HashSet<>();\n for (MessageInterface message : messages) {\n Integer leftDistance = travelingMessages.get(message) - 1;\n if (leftDistance <= 0) {\n messagesToBeRemoved.add(message);\n arrivedMessages.add(message);\n } else {\n travelingMessages.put(message, leftDistance);\n }\n }\n messagesToBeRemoved.forEach(message -> travelingMessages.remove(message));\n }", "public void run() {\n\t\tZMQ.Socket sender = context.socket(ZMQ.PUSH);\n\t\tsender.bind(\"tcp://*:5557\");\n\t\t\n\t\t//this lets you go to another machine to start a worker\n\t\tSystem.out.println(\"Press Enter when the workers are ready: \");\n\t\ttry {\n\t\t\tSystem.in.read();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Messaging sending loop\n\t\tSystem.out.println(\"Sending tasks to workers\\n\");\n\t\twhile (!Thread.interrupted()) {\n\t\t\ttry {\n\t\t\t\t// If there are jobs to be sent, send them\n\t\t\t\t// Synchronize access to workParts structure before accessing it\n\t\t\t\tsynchronized (Master.lock) {\n\t\t\t\t\tif (!workParts.isEmpty()) {\t\n\t\t\t\t\t\tfor (Computation comp : workParts.values()) {\n\t\t\t\t\t\t\t// Submit only unsubmitted jobs\n\t\t\t\t\t\t\tif (!comp.isSubmitted()) {\n\t\t\t\t\t\t\t\tfor (int i=0; i < comp.getNumOfSubmissions(); i++) {\n\t\t\t\t\t\t\t\t\tsendJob(sender, comp);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Set submitted flag\n\t\t\t\t\t\t\t\tcomp.setSubmitted(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Take a short break before reading the job list again\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "void processAllMessages() {\n ArrayList<HdmiCecMessage> copiedBuffer = new ArrayList<>(mBuffer);\n mBuffer.clear();\n for (HdmiCecMessage message : copiedBuffer) {\n mDevice.onMessage(message);\n HdmiLogger.debug(\"Processing message:\" + message);\n }\n }", "ReadResponseMessage fetchAllMessages();", "@Override\n\tpublic void teleopPeriodic() {\n\t\tOI.refreshAll();\n\t\tScheduler.getInstance().run();\n\t\tlog();\n\t}", "private void RecoverMessages()\n {\n String messages = new String();\n int nodeIndex = getNodeIndex(localport);\n int i;\n String msgToSend;\n for(i=nodeIndex+1;i<=nodeIndex+2;i++)\n {\n msgToSend = localport;\n String temp = (sendMsg(nodes[i % 5], \"RECOVER##\" + msgToSend));\n if(temp !=null && !temp.equals(\"null\"))\n messages+=temp;\n }\n\n Log.i(\"current node\",Integer.toString(nodeIndex));\n for(i=nodeIndex+4;i>=nodeIndex+3;i--)\n {\n Log.i(\"replicate from\",nodes[i % 5]);\n msgToSend = nodes[i % 5];\n String temp = (sendMsg(nodes[i % 5], \"RECOVER##\" + msgToSend));\n if(temp !=null && !temp.equals(\"null\"))\n messages+=temp;\n }\n Log.i(\"messages recovered\", messages);\n if(!messages.equals(\"null\") && messages.length()>0)\n {\n Log.i(\"sasa\",Integer.toString(messages.length()));\n String msgs = messages.substring(0,messages.length()-1);\n String[] Allmessages = msgs.split(\" \");\n Log.i(\"recover\",msgs);\n for(String msg: Allmessages)\n {\n String key = msg.split(\"&&\")[0];\n String value = msg.split(\"&&\")[1];\n if(myKeys.containsKey(key))\n continue;\n myKeys.put(key,value);\n }\n\n }\n }", "public static void any() {\n\t\tlong date = System.currentTimeMillis();\n\t\tString body = IO.readContentAsString(request.body);\n\t\tif (body == null) {\n\t\t\terror(StatusCode.INTERNAL_ERROR,\n\t\t\t\t\t\"Message is malformed (null body)...\");\n\t\t}\n\n\t\tDocument soapMessage = XML.getDocument(body);\n\t\tif (soapMessage == null) {\n\t\t\terror(StatusCode.INTERNAL_ERROR,\n\t\t\t\t\t\"Message is malformed (not XML)...\");\n\t\t}\n\n\t\t// parse the body and calculate required data...\n\t\tNode n = XPath.selectNode(\"//ReportListBean\", soapMessage);\n\t\tif (n == null) {\n\t\t\terror(StatusCode.INTERNAL_ERROR,\n\t\t\t\t\t\"Message is malformed (not a valid report)...\");\n\t\t}\n\n\t\t// can be optimized...\n\t\tString reportList = XMLHelper.createStringFromDOMNode(n, true);\n\t\tif (reportList == null) {\n\t\t\terror(StatusCode.INTERNAL_ERROR,\n\t\t\t\t\t\"Message is malformed (can not generate reportList)...\");\n\t\t}\n\n\t\tReportListBean reportListBean = null;\n\t\ttry {\n\t\t\treportListBean = JAXBHelper.unmarshall(new ByteArrayInputStream(\n\t\t\t\t\treportList.getBytes()));\n\t\t} catch (MessageExchangeException e) {\n\t\t\terror(StatusCode.INTERNAL_ERROR, e.getMessage());\n\t\t}\n\n\t\tMessage message = new Message();\n\t\tfor (ReportBean report : reportListBean.getReports()) {\n\t\t\tif (\"t1\".equalsIgnoreCase(report.getType())) {\n\t\t\t\tmessage.t1 = report.getDate();\n\t\t\t} else if (\"t2\".equalsIgnoreCase(report.getType())) {\n\t\t\t\tmessage.t2 = report.getDate();\n\t\t\t} else if (\"t3\".equalsIgnoreCase(report.getType())) {\n\t\t\t\tmessage.t3 = report.getDate();\n\t\t\t} else if (\"t4\".equalsIgnoreCase(report.getType())) {\n\t\t\t\tmessage.t4 = report.getDate();\n\t\t\t}\n\n\t\t\t// monitoring api needs to be fixed since all informations are the\n\t\t\t// same for the target\n\t\t\tmessage.endpoint = report.getEndpoint();\n\t\t\tmessage.itf = report.getItf();\n\t\t\tmessage.service = report.getServiceName();\n\t\t\tmessage.operation = report.getOperation();\n\t\t}\n\t\tmessage.date = date;\n\t\tmessage.exception = false;\n\t\tWebSocket.liveStream.publish(message);\n\t\t\n\t\trender(\"Services/MonitoringService_Response.xml\");\n\t}", "public static void getMemoryUsage(){\r\n MemoryMeasurement actMemoryStatus = new MemoryMeasurement();\r\n //MemoryMeasurement.printMemoryUsage(actMemoryStatus);\r\n memoryUsageList.add(actMemoryStatus);\r\n }", "@Override\n public void run() {\n //gets messages\n byte[] b = new byte[65000];\n try {\n multicastSocket = new MulticastSocket(mcastPort);\n multicastSocket.joinGroup(InetAddress.getByName(mscastAdress));\n\n while (true) {\n try {\n DatagramPacket received = new DatagramPacket(b, b.length);\n multicastSocket.receive(received);\n DealWithPacketBackup deal = new DealWithPacketBackup(received , multicastSocket , Peer.getPeerId());\n Peer.getExecutor().execute(deal);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void run()\n {\n try\n {\n logger.debug(\"Starting server-side thread\");\n while (active)\n {\n List<Node> nodesFromQuery = null;\n if (clients.size() > 0)\n {\n nodesFromQuery = BeanLocator.getRouterService().findNodesWithNumberOfMessages(routerId);\n logger.debug(\"Number of nodesFromQuery for this routerId :\" + routerId + \" is:\" + nodesFromQuery.size());\n\n for (Node node : nodesFromQuery)\n {\n // if node exists in map\n if (this.nodes.get(node.getId()) != null)\n {\n logger.debug(\"Node already in map\");\n // check if something has been updated on the node - using hashcode\n\n logger.debug(this.nodes.get(node.getId()).getNumberOfMessagesHandled().toString());\n logger.debug(node.getNumberOfMessagesHandled().toString());\n boolean hasNumberOfMessagesChanged = !this.nodes.get(node.getId()).getNumberOfMessagesHandled().equals(node.getNumberOfMessagesHandled());\n if (hasNumberOfMessagesChanged)\n {\n logger.debug(\"Fire update event..\");\n // if something has changed fire update event\n this.nodes.put(node.getId(), node);\n fireNodeUpdatedEvent(node);\n } else\n {\n // nothing changed - ignore and log\n logger.info(\"Nothing changed on node :\" + node.getId());\n }\n } else\n {\n // else if node does not exist store the node in the map\n logger.debug(\"Storing node in map\");\n this.nodes.put(node.getId(), node);\n fireNodeUpdatedEvent(node);\n }\n }\n } else\n {\n logger.info(\"Thread running but no registered clients\");\n }\n Thread.sleep(CALLBACK_INTERVALL);\n }\n logger.debug(\"Stopping server-side thread. Clearing nodes and clients.\");\n clients.clear();\n nodes.clear();\n }\n catch (InterruptedException ex)\n {\n logger.warn(\"Thread interrupted.\", ex);\n }\n }", "private MainMemory() {\n\t\tPropertiesParser prop = PropertiesLoader.getPropertyInstance();\n\t\tnumOfbank = prop.getIntProperty(\"sim.mem.numberofbank\", 8);\n\t\tlogger.debug(\"numOfBank in main memory :\"+ numOfbank);\n\t\t\n\t\tinit();\n\t}", "public synchronized void loadAll(LoadListener ll) throws IOException {\n\t\tll.loadStarted(\"\");\n\n\t\t// Scan all its valid subdirectories.\n\t\tFile[] subdirs = baseDir.listFiles(new FileFilter() {\n\n\t\t\tpublic boolean accept(File f) {\n\t\t\t\treturn f.isDirectory() && f.getName().startsWith(RECEIVER_PREFIX);\n\t\t\t}\n\n\t\t});\n\t\tfor(int i = 0; i < subdirs.length; i++) {\n\n\t\t\tFile subdir = subdirs[i];\n\n\t\t\t// Scan all its valid files.\n\t\t\tFile[] files = subdir.listFiles(new FileFilter() {\n\n\t\t\t\tpublic boolean accept(File f) {\n\t\t\t\t\treturn !f.isDirectory() && f.getName().startsWith(MESSAGE_PREFIX);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfor(int j = 0; j < files.length; j++) {\n\n\t\t\t\tFile toRead = files[j];\n\n\t\t\t\t// Read the file content\n\t\t\t\tBufferedReader in = new BufferedReader(new FileReader(toRead));\n\n\t\t\t\t// Read the number of copies\n\t\t\t\tString strHowMany = in.readLine();\n\n\t\t\t\tlong howMany = 1;\n\t\t\t\ttry {\n\t\t\t\t\thowMany = Long.parseLong(strHowMany);\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException nfe) {\n\t\t\t\t\t// Do nothing; the default value will be used\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\t// NL (23/01/04) GenericMessage are now stored using Java serialization\n\t\t\t\t\tString encodedMsg = in.readLine();\n\t\t\t\t\t// String.getBytes is, in general, an irreversible operation. However, in this case, because\n\t\t\t\t\t// the content was previously encoded Base64, we can expect that we will have only valid Base64 chars. \n\t\t\t\t\tByteArrayInputStream istream = new ByteArrayInputStream(Base64.decodeBase64(encodedMsg.getBytes(\"US-ASCII\"))); \n\t\t\t\t\tObjectInputStream p = new ObjectInputStream(istream);\n\t\t\t\t\tGenericMessage message = (GenericMessage) p.readObject();\n\t\t\t\t\tistream.close(); \n\n\t\t\t\t\t// Use an ACL codec to read in the receiver AID\n\t\t\t\t\tStringACLCodec codec = new StringACLCodec(in, null);\n\t\t\t\t\t// Read the receiver AID\n\t\t\t\t\tAID receiver = codec.decodeAID();\n\n\t\t\t\t\t// Notify the listener that a new item was loaded\n\t\t\t\t\tfor(int k = 0; k < howMany; k++) {\n\t\t\t\t\t\tll.itemLoaded(toRead.getName(), message, receiver);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(ACLCodec.CodecException ce) {\n\t\t\t\t\tSystem.err.println(\"Error reading file \" + toRead.getName() + \" [\" + ce.getMessage() + \"]\");\n\t\t\t\t}\n\t\t\t\tcatch(ClassNotFoundException cnfe) {\n\t\t\t\t\tSystem.err.println(\"Error reading file \" + toRead.getName() + \" [\" + cnfe.getMessage() + \"]\");\n\t\t\t\t}\n\t\t\t\tfinally {\n\t\t\t\t\tin.close();\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\n\t\t// Notify the listener that the load process ended\n\t\tll.loadEnded(\"\");\n\n\t}", "private static void collectProfilingData() throws ClassNotFoundException, IOException{\r\n\r\n //TODO - clean lists in each iteration (when data packet is received)\r\n List<MemoryMeasurement> memoryData;\r\n List<CPUmeasurement> cpuData;\r\n List<ThreadMeasurement> threadData;\r\n List<ClassMeasurement> classData;\r\n Map<String, TimeMeasurement> methodRunList;\r\n String message = null;\r\n\r\n do{\r\n message = (String)serverObjectInputStream.readObject();\r\n\r\n if(message.equals(\"DATA\")){\r\n System.out.println(\"Server: packet received: \" + message);\r\n\r\n ProfilingPacketType.deserializePacket();\r\n memoryData = ProfilingPacketType.memoryUsageList;\r\n //System.out.println(\"MemoryData: \" + memoryData);\r\n ProfilingMemoryPage.prepareMemoryData(memoryData);\r\n cpuData = ProfilingPacketType.cpuUsageList;\r\n ProfilingCPUPage.prepareData(cpuData);\r\n //printCpuData(cpuData);\r\n threadData = ProfilingPacketType.threadList;\r\n ProfilingThreadsPage.prepareData(threadData);\r\n //System.out.println(\"Received thread data: \" + threadData.size());\r\n classData = ProfilingPacketType.classUsageList;\r\n ProfilingClassesPage.prepareData(classData);\r\n //System.out.println(classData.size());\r\n methodRunList = ProfilingPacketType.methodTimeList;\r\n ProfilingMethodsPage.prepareData(methodRunList);\r\n //printMethodRuns(methodRunList);\r\n\r\n ProfilingOverviewPage.getProfilingData();\r\n ProfilingVMSummaryPage.collectVMData();\r\n\r\n }\r\n\r\n }while (!message.equals(Attributes.PROFILING_PACKET_MESSAGE_TERMINATE));\r\n throw new EOFException(\"Agent has finished it's job.\");\r\n }", "@SuppressWarnings(\"unchecked\")\n public List<Message> getParts(Object location) throws MessageAccessException, MessageParseException {\n if (!(location instanceof XPath)) {\n throw new MessageAccessException(\"Only XPath location's are supported for accessing XMLMessage parts - \" +\n \"received: \" + location.getClass());\n }\n XPath xpath = (XPath) location;\n\n String key = GET_PARTS_KEY_PREFIX + xpath.getText();\n if (getCache().containsKey(key)) {\n return (List<Message>) getCache().get(key);\n } else {\n List<Node> result = (List<Node>) xpath.selectNodes(getDocument());\n List<Message> resultsAsIndex = new LinkedList<Message>();\n for (Node node : result) {\n Message indexedResult = new XMLMessageFactory().build(node, true);\n resultsAsIndex.add(indexedResult);\n }\n getCache().put(key, resultsAsIndex);\n return resultsAsIndex;\n }\n }", "io.netifi.proteus.admin.om.Metrics getMetrics();", "public void run() {\n orphanedMessageSet.clear();\r\n \r\n // Commit the folder message cache\r\n folderMessageCache.commit();\r\n \r\n // Clear the flag indicating that a refresh operation is in progress\r\n refreshInProgress.set(false);\r\n \r\n // Notify listeners of the end of the operation\r\n mailStoreServices.fireFolderMessagesAvailable(folderTreeItem, null, false, false);\r\n \r\n // Enqueue any folder-related requests that arrived during the refresh\r\n invokePostRefreshTasks(success);\r\n }", "public interface IPSAgent\n{\n /**\n * This method is the first one to be called by the Agent Manager just after\n * instantiating the implementing class object. This is called only once in\n * the object's life cycle.\n * @param configData - DOM Element representing the configuration data\n * defined in the configuration file. The implementor dictates the DTD for\n * the element depending on what he needs.\n * @throws PSAgentException if initialization fails for any reason\n */\n void init(Element configData) throws PSAgentException;\n\n /**\n * This method is the engine of the agent and called any time a service from\n * this agent is requested by the Agent Manager.\n * @param action - name of the action to be excuted by the agent.\n * @param params - Map (name, value pairs) of all parameters from the\n * request\n * @param response <code>IPSAgentHandlerResponse</code> object that can be\n * used to set the results of execution of the action. If the requested\n * action is not implmented or enough parameters are not supplied to execute\n * the action, the result can be set to error.\n */\n void executeAction(String action, Map params,\n IPSAgentHandlerResponse response);\n\n /**\n * This method is called by the Agent Manager while shuttingdown. May be\n * used to do any cleaning.\n */\n void terminate();\n}", "public void run() {\n\t\tString line = null;\n\t\tMessage message;\n\t\tBufferQueueElement<Message> messageList = new BufferQueueElement<Message>();\n\t\tlong t1 = System.nanoTime();\n\t long t2 = 0;\n\t\ttry {\n\t\t\twhile ((line = messageIO.readMessage()) != null) {\n\t\t\t\tt2 = System.nanoTime();\n\t\t\t\t/* Ok, we can close the stream. But process the last message list. */\n\t\t\t\tif (CLOSE_STREAM.equals(line)) {\n\t\t\t\t\tmessageList.setStreamClosed(true);\n\t\t\t\t\tqueue.put(messageList);\n\t\t\t\t\tbreak;\n\t\t\t\t} else if((t2 - t1) < ONE_SECOND) {\n\t\t\t\t\tmessage = new Message(line);\n\t\t\t\t\tmessageList.setMessageElement(message);\n\t\t\t\t} else {\n\t\t\t\t\tqueue.put(messageList);\n\t\t\t\t\tmessageList = new BufferQueueElement<Message>();\n\t\t\t\t\tt1 = System.nanoTime();\n\t\t\t\t\tmessage = new Message(line);\n\t\t\t\t\tmessageList.setMessageElement(message);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "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 }", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "java.util.List<io.dstore.engine.Message> \n getMessageList();", "public void run() {\n boolean quiesceRequested = false;\n // A sleeper that sleeps for msgInterval.\n Sleeper sleeper = new Sleeper(this.msgInterval, this.stopRequested);\n try {\n init(reportForDuty(sleeper));\n long lastMsg = 0;\n // Now ask master what it wants us to do and tell it what we have done\n for (int tries = 0; !stopRequested.get() && isHealthy();) {\n long now = System.currentTimeMillis();\n if (lastMsg != 0 && (now - lastMsg) >= serverLeaseTimeout) {\n // It has been way too long since we last reported to the master.\n LOG.warn(\"unable to report to master for \" + (now - lastMsg) +\n \" milliseconds - retrying\");\n }\n if ((now - lastMsg) >= msgInterval) {\n HMsg outboundArray[] = null;\n synchronized(this.outboundMsgs) {\n outboundArray =\n this.outboundMsgs.toArray(new HMsg[outboundMsgs.size()]);\n this.outboundMsgs.clear();\n }\n try {\n doMetrics();\n this.serverInfo.setLoad(new HServerLoad(requestCount.get(),\n onlineRegions.size(), this.metrics.storefiles.get(),\n this.metrics.memcacheSizeMB.get()));\n this.requestCount.set(0);\n HMsg msgs[] = hbaseMaster.regionServerReport(\n serverInfo, outboundArray, getMostLoadedRegions());\n lastMsg = System.currentTimeMillis();\n if (this.quiesced.get() && onlineRegions.size() == 0) {\n // We've just told the master we're exiting because we aren't\n // serving any regions. So set the stop bit and exit.\n LOG.info(\"Server quiesced and not serving any regions. \" +\n \"Starting shutdown\");\n stopRequested.set(true);\n this.outboundMsgs.clear();\n continue;\n }\n \n // Queue up the HMaster's instruction stream for processing\n boolean restart = false;\n for(int i = 0;\n !restart && !stopRequested.get() && i < msgs.length;\n i++) {\n LOG.info(msgs[i].toString());\n switch(msgs[i].getType()) {\n case MSG_CALL_SERVER_STARTUP:\n // We the MSG_CALL_SERVER_STARTUP on startup but we can also\n // get it when the master is panicing because for instance\n // the HDFS has been yanked out from under it. Be wary of\n // this message.\n if (checkFileSystem()) {\n closeAllRegions();\n try {\n log.closeAndDelete();\n } catch (Exception e) {\n LOG.error(\"error closing and deleting HLog\", e);\n }\n try {\n serverInfo.setStartCode(System.currentTimeMillis());\n log = setupHLog();\n this.logFlusher.setHLog(log);\n } catch (IOException e) {\n this.abortRequested = true;\n this.stopRequested.set(true);\n e = RemoteExceptionHandler.checkIOException(e); \n LOG.fatal(\"error restarting server\", e);\n break;\n }\n reportForDuty(sleeper);\n restart = true;\n } else {\n LOG.fatal(\"file system available check failed. \" +\n \"Shutting down server.\");\n }\n break;\n \n case MSG_REGIONSERVER_STOP:\n stopRequested.set(true);\n break;\n \n case MSG_REGIONSERVER_QUIESCE:\n if (!quiesceRequested) {\n try {\n toDo.put(new ToDoEntry(msgs[i]));\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Putting into msgQueue was \" +\n \"interrupted.\", e);\n }\n quiesceRequested = true;\n }\n break;\n \n default:\n if (fsOk) {\n try {\n toDo.put(new ToDoEntry(msgs[i]));\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Putting into msgQueue was \" +\n \"interrupted.\", e);\n }\n }\n }\n }\n // Reset tries count if we had a successful transaction.\n tries = 0;\n \n if (restart || this.stopRequested.get()) {\n toDo.clear();\n continue;\n }\n } catch (Exception e) {\n if (e instanceof IOException) {\n e = RemoteExceptionHandler.checkIOException((IOException) e);\n }\n if (tries < this.numRetries) {\n LOG.warn(\"Processing message (Retry: \" + tries + \")\", e);\n tries++;\n } else {\n LOG.error(\"Exceeded max retries: \" + this.numRetries, e);\n checkFileSystem();\n }\n if (this.stopRequested.get()) {\n \tLOG.info(\"Stop was requested, clearing the toDo \" +\n \t\t\t\"despite of the exception\");\n toDo.clear();\n continue;\n }\n }\n }\n // Do some housekeeping before going to sleep\n housekeeping();\n sleeper.sleep(lastMsg);\n } // for\n } catch (OutOfMemoryError error) {\n abort();\n LOG.fatal(\"Ran out of memory\", error);\n } catch (Throwable t) {\n LOG.fatal(\"Unhandled exception. Aborting...\", t);\n abort();\n }\n RegionHistorian.getInstance().offline();\n this.leases.closeAfterLeasesExpire();\n this.worker.stop();\n this.server.stop();\n if (this.infoServer != null) {\n LOG.info(\"Stopping infoServer\");\n try {\n this.infoServer.stop();\n } catch (InterruptedException ex) {\n ex.printStackTrace();\n }\n }\n \n // Send interrupts to wake up threads if sleeping so they notice shutdown.\n // TODO: Should we check they are alive? If OOME could have exited already\n cacheFlusher.interruptIfNecessary();\n logFlusher.interrupt();\n compactSplitThread.interruptIfNecessary();\n logRoller.interruptIfNecessary();\n \n if (abortRequested) {\n if (this.fsOk) {\n // Only try to clean up if the file system is available\n try {\n if (this.log != null) {\n this.log.close();\n LOG.info(\"On abort, closed hlog\");\n }\n } catch (IOException e) {\n LOG.error(\"Unable to close log in abort\",\n RemoteExceptionHandler.checkIOException(e));\n }\n closeAllRegions(); // Don't leave any open file handles\n }\n LOG.info(\"aborting server at: \" +\n serverInfo.getServerAddress().toString());\n } else {\n ArrayList<HRegion> closedRegions = closeAllRegions();\n try {\n log.closeAndDelete();\n } catch (IOException e) {\n LOG.error(\"Close and delete failed\",\n RemoteExceptionHandler.checkIOException(e));\n }\n try {\n HMsg[] exitMsg = new HMsg[closedRegions.size() + 1];\n exitMsg[0] = HMsg.REPORT_EXITING;\n // Tell the master what regions we are/were serving\n int i = 1;\n for (HRegion region: closedRegions) {\n exitMsg[i++] = new HMsg(HMsg.Type.MSG_REPORT_CLOSE,\n region.getRegionInfo());\n }\n \n LOG.info(\"telling master that region server is shutting down at: \" +\n serverInfo.getServerAddress().toString());\n hbaseMaster.regionServerReport(serverInfo, exitMsg, (HRegionInfo[])null);\n } catch (IOException e) {\n LOG.warn(\"Failed to send exiting message to master: \",\n RemoteExceptionHandler.checkIOException(e));\n }\n LOG.info(\"stopping server at: \" +\n serverInfo.getServerAddress().toString());\n }\n if (this.hbaseMaster != null) {\n HbaseRPC.stopProxy(this.hbaseMaster);\n this.hbaseMaster = null;\n }\n join();\n LOG.info(Thread.currentThread().getName() + \" exiting\");\n }", "private void freeAgent() {\n }", "@Override\n public void run() {\n try {\n boolean busy = true;\n while (busy) {\n AbstractBasicMessage msg = readMsg();\n if (msg != null) {\n busy = msg.operate(this.persistor, this.pushServer);\n }\n }\n } catch (IOException e) {\n // Treat an IOException as a termination of the message\n // exchange, and let this message-processing thread die.\n\n // CODE VON DOZENTEN...\n } catch (OperationNotSupportedException ex) {\n System.out.println(\"Error while reading incoming message\");\n ex.printStackTrace();\n }\n }", "protected void setup() {\n\t\tSystem.out.println(\"Messenger agent \"+getAID().getName()+\" is ready.\");\r\n\t\tagentList = new ArrayList();\r\n\t\trefreshActiveAgents();\r\n\r\n\t\tmessageGUI = new MessageAgentGui(this);\r\n\t\tmessageGUI.displayGUI();\r\n\r\n\t\tDFAgentDescription dfd = new DFAgentDescription();\r\n\t\tdfd.setName(getAID());\r\n\t\tServiceDescription sd = new ServiceDescription();\r\n\t\tsd.setType(\"messenger-agent\");\r\n\t\tsd.setName(getLocalName()+\"-Messenger agent\");\r\n\t\tdfd.addServices(sd);\r\n\t\ttry {\r\n\t\t\tDFService.register(this, dfd);\r\n\t\t}\r\n\t\tcatch (FIPAException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\t\taddBehaviour(new ReceiveMessage());\r\n\t}", "public static void getWatch() {\n for ( String nodeId : getNodes() ){\n Wearable.MessageApi.sendMessage(\n mGoogleApiClient, nodeId, \"GET_WATCH\", new byte[0]).setResultCallback(\n new ResultCallback<MessageApi.SendMessageResult>() {\n @Override\n public void onResult(MessageApi.SendMessageResult sendMessageResult) {\n if (!sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"Failed to send message with status code: \"\n + sendMessageResult.getStatus().getStatusCode());\n } else if (sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"onResult successful!\");\n }\n }\n }\n );\n }\n }", "public final void testCall() throws Exception\n {\n \n Logger.getLogger(this.getClass()).info(\"waiting for Remote message...\");\n \n Logger.getLogger(this.getClass()).info(\"press enter to shutdown server\");\n \n //TODO raffaele.picardi: report this class out of this test and remain only Monitor.onWait for itnegration test\n // Monitor.waitOn(WAIT);\n //Init section to transfer in External system\n UMOMessage result=null;\n MuleClient client;\n while (true) {\n try {\n \n client = new MuleClient();\n RemoteDispatcher rd = client.getRemoteDispatcher(MessagesTest.getString(\"EHelloServiceObjectArrayTest.10\")); //$NON-NLS-1$\n \n/* SoapMethod method = new SoapMethod(new QName(\"\", Messages.getString(\"SOAP_METHOD_NAME\")));\n method.addNamedParameter(new QName( Messages.getString(\"NAMED_PARAMETER\")), new javax.xml.namespace.QName( Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QNAME\")), \"in\");\n method.setReturnType( new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n method.setReturnClass(Class.forName(Messages.getString(\"RETURN_CLASSNAME\")));\n */\n \n Map props = new HashMap();\n props.put(\"style\", \"wrapped\");\n props.put(\"use\", \"literal\"); \n //props.put(MuleProperties.MULE_SOAP_METHOD, method);\n \n props.put(\"resourceKey\", MessagesTest.getString(\"RESOURCE_KEY\"));\n props.put(WSRFParameter.SERVICE_NAMESPACE , MessagesTest.getString(\"SERVICE_NAMESPACE_URI\"));\n props.put(WSRFParameter.RESOURCE_KEY_NAME , MessagesTest.getString(\"RESOURCE_KEY_NAME\"));\n props.put(WSRFParameter.RETURN_QNAME, MessagesTest.getString(\"RETURN_QNAME\"));\n \n /* props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n \n props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString(\"SERVICE_NAMESPACE_URI\"), Messages.getString(\"RETURN_QTYPE_NAME\")));\n */\n \n props.put(WSRFParameter.RETURN_CLASS, Class.forName(MessagesTest.getString(\"RETURN_CLASSNAME\")));\n props.put(WSRFParameter.SOAP_ACTION_URI, MessagesTest.getString(\"SOAP_ACTION_URI\"));\n result = rd.sendRemote(\"vm://vmQueue\", new Integer(2), props);\n \n //result = rd.sendRemote(Messages.getString(\"EHelloServiceObjectArrayTest.11\"),\"\", null); //$NON-NLS-1$\n //logger.info(this, \"invoke done.\",\"\"); //$NON-NLS-1$\n System.out.println(\"invoke done.\");\n Thread.sleep(5000);\n } \n catch (UMOException e) \n {\n\n e.printStackTrace();\n } \n catch (InterruptedException e) \n {\n\n e.printStackTrace();\n }\n finally \n {\n if (result != null)\n {\n System.out.println(result.getPayload().toString()); //$NON-NLS-1$\n }\n else\n {\n System.out.println(\"result is null\");\n }\n \n }\n //end section to transfer in External system\n }\n \n }", "private SensorData collectMemoryInfo() throws SigarException {\n \n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Collecting Memory Utilization Information\");\n }\n SensorData data = new SensorData();\n \n Mem mem = sigar.getMem();\n \n data.add(SensorAttributeConstants.MemoryConstants.TOTAL_MEMORY, (mem.getTotal() / (1024 * 1024)));\n data.add(SensorAttributeConstants.MemoryConstants.FREE_MEMORY, (mem.getFree() / (1024 * 1024)));\n data.add(SensorAttributeConstants.MemoryConstants.MEM_ACTUAL_USED, (mem.getActualUsed() / (1024 * 1024)));\n \n return data;\n }", "public SharedMemory infos();" ]
[ "0.5365421", "0.524071", "0.5238131", "0.5052642", "0.5018494", "0.4988456", "0.49696782", "0.48763627", "0.4867188", "0.48564935", "0.48138654", "0.47982335", "0.47802556", "0.47689614", "0.47344464", "0.47304937", "0.4694586", "0.4690885", "0.46769446", "0.46720257", "0.46640128", "0.46606258", "0.4658666", "0.4652116", "0.46465966", "0.46383858", "0.46307912", "0.46192628", "0.4607954", "0.45939672", "0.45869195", "0.4579663", "0.4570457", "0.45628738", "0.4559028", "0.45509866", "0.4546759", "0.45399347", "0.45366478", "0.45156112", "0.45151186", "0.45107675", "0.4506464", "0.44987437", "0.4498264", "0.44876558", "0.4485088", "0.44846106", "0.44817284", "0.44810852", "0.4471097", "0.44700602", "0.4464534", "0.44494358", "0.44447485", "0.44440737", "0.4443831", "0.44433987", "0.44370148", "0.4434753", "0.44340232", "0.44211617", "0.44195685", "0.4417877", "0.441716", "0.44076607", "0.44057024", "0.44034684", "0.44029135", "0.44009194", "0.4400519", "0.43957487", "0.4395029", "0.4392443", "0.439131", "0.43901744", "0.4385877", "0.43850604", "0.43846592", "0.43839028", "0.43834847", "0.43822658", "0.43810362", "0.4377697", "0.4374022", "0.43720642", "0.43700048", "0.4368526", "0.4368526", "0.4368526", "0.4368526", "0.4368526", "0.43681675", "0.4366558", "0.43665144", "0.4357262", "0.435673", "0.43553707", "0.4354545", "0.43536353" ]
0.50320184
4
/ You can implement some functions and helper methods here. get a different workerAddress than the one passed as the argument
private void updateWorkerPosition(Position position, String workerAgentId) { String workerId = workerIdReverseAID.get(workerAgentId); positionMap.replace(workerId, position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ICommunicationAddress getAlternativeWorkerAddress(String workerId) {\n\t\tICommunicationAddress workerAddress = null;\n\t\tfor(IAgentDescription agentDescription: this.agentDescriptions) {\n\n\t\t\t// TODO add datastructure to find most likely alternative for assigning an order to alternative worker\n\t \t\tString workerAgentId = workerIdReverseAID.get(workerId);\n\n\t\t\tif (agentDescription.getAid().equals(workerAgentId)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t workerAddress = agentDescription.getMessageBoxAddress();\n\t\t\tbreak;\n\t\t}\n\n\t\treturn workerAddress;\n\t}", "Value worker(String main, String address);", "public String getAddress(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getString(WorkerController.ADDRESS);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "java.lang.String getWorkerId();", "java.lang.String getBrokerAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "public InternetAddress getFromAddress();", "@Override\n public InetSocketAddress localAddressFor(Handle<GameAppContext> that) \n {\n return manager.localAddressFor(that);\n }", "java.lang.String getServerAddress();", "InetAddress getAddress();", "InetAddress getAddress();", "SocketAddress socketAddress();", "String getAddr();", "public abstract String getWorkerName();", "abstract String getRemoteAddress();", "java.lang.String getDelegatorAddress();", "java.lang.String getDelegatorAddress();", "GetWorkerResult getWorker(GetWorkerRequest getWorkerRequest);", "java.lang.String getBitcoinAddress();", "public String getInternalAddress();", "MessageAddress getMessageAddress();", "public String get_worker() {\n return this._worker;\n }", "SocketAddress getLocalAddress();", "String getAddress();", "String getAddress();", "AddressI getAddress();", "public String getExternalAddress();", "public String getRpcServerAddress() throws HMServiceException {\n return rpcServerAddress.orElseThrow(() -> new HMServiceException(\"No RPC server address given! Check builder procedure. \"\n + \"May passed the wrong path during building\"));\n }", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "public SocketAddress method_4118() {\n return null;\n }", "@Test\n public void testAddress() throws UnknownHostException {\n InetAddress address = InetAddress.getByAddress(\"www.baidu.com\", new byte[]{(byte) 192, (byte) 168, 0, 1});\n System.out.println(address.getHostName());\n InetSocketAddress socketAddress = new InetSocketAddress(address, 8009);\n System.out.println(socketAddress.getHostString());\n }", "private URI resolveWebServerBindAddress(final Config config) {\n\t\tfinal String[] brokerHostPort = config.getBroker().getHostPort().split(\":\");\n \tfinal JerseyUriBuilder builder = new JerseyUriBuilder();\n \tfinal BootstrapConfiguration bs = config.getBootstrap();\n\t\tfinal String[] webHostPort = bs.getWebServerHostPort().split(\":\");\n\t\tint webPort = Integer.parseInt(webHostPort[1]);\n\t\tfinal boolean untouched = bs.getWebServerHostPort().equals(BootstrapConfiguration.WEB_SERVER_HOST_PORT);\n\t\tString webhostport;\n\t\tif (untouched) {\n\t\t\tint brokerPort = Integer.parseInt(brokerHostPort[1]);\n\t\t\twebPort = brokerPort == BrokerConfiguration.PORT ? webPort: brokerPort + 100;\n\t\t\tfinal String host = config.getResolvedShardId().getId().split(\":\")[0];\n\t\t\tbuilder.host(host).port(webPort);\n\t\t\twebhostport = host + \":\" + webPort;\n\t\t} else {\n\t\t\tbuilder.host(webHostPort[0]).port(webPort);\n\t\t\twebhostport = webHostPort[0]+ \":\" + webPort;\n\t\t}\n\t\tconfig.getResolvedShardId().setWebHostPort(webhostport);\n\t\tconfig.getBootstrap().setWebServerHostPort(webhostport);\n\t\tlogger.info(\"{}: {} Web host:port = {}\", name, tenant.getConnectReference(), webhostport);\n\t\tbuilder.path(config.getBootstrap().getWebServerContextPath());\n\t\treturn builder.build();\n\t}", "int getAddr();", "@java.lang.Override\n public java.lang.String getBrokerAddress() {\n java.lang.Object ref = brokerAddress_;\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 brokerAddress_ = s;\n return s;\n }\n }", "public Address getCurrentCallRemoteAddress();", "private InetSocketAddress getClientAddress(Socket socket) {\n InetAddress address = socket.getInetAddress();\n int port = socket.getPort();\n \n return new InetSocketAddress(address, port);\n }", "public void createWorker(Worker worker){\n }", "public SocketAddress method_4128() {\n return null;\n }", "@Override public String brokerAddress() { return brokerAddress; }", "protected static String getDUnitLocatorAddress() {\n return Host.getHost(0).getHostName();\n }", "InetSocketAddress peerAddress();", "public java.lang.String getBrokerAddress() {\n java.lang.Object ref = brokerAddress_;\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 brokerAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public abstract String getWorkerString();", "String getQueueManagerHost();", "protected final static EndpointAddress mkAddress(ID destPeer, String serv, String parm) {\r\n\r\n EndpointAddress addr = new EndpointAddress(MESSAGE_NAMESPACE_NAME, destPeer.getUniqueValue().toString(), serv, parm);\r\n\r\n return addr;\r\n }", "private String GetHostAddress() throws UnknownHostException {\n return Inet4Address.getLocalHost().getHostAddress();\n }", "void updateCustomServerAddress(String customServerAddress);", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "String getIntegHost();", "public static InetSocketAddress getBindAddress(Configuration conf) {\n return conf.getSocketAddr(JHAdminConfig.MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_PORT);\n }", "@Test\n\tpublic void testGetWorker() {\n\t\tInetSocketAddress address = InetSocketAddress.createUnresolved(\n\t\t\t\"localhost\", 1337);\n\t\tMockWorker worker = new MockWorker(address);\n\t\tWorkerLoadSnapshot instance = WorkerLoadSnapshot.newSnapshot(worker);\n\t\tassertSame(worker, instance.getWorker());\n\t}", "private ICommunicationAddress decideOrderAssigment(Order order) {\n\n\t\tICommunicationAddress workerAddress = null;\n\t\tPosition orderPosition = order.position;\n\t\tPosition currentWorkerPosition = null;\n\n\t\tint minimum = Integer.MAX_VALUE;\n\t\tint currentDistance = 0;\n\n\t\tString[] workerAgentId = workerIdReverseAID.values().toArray(new String[0]);\n\t\tfor (String currentWorkerId: workerAgentId) {\n\n\t\t\tcurrentWorkerPosition = positionMap.get(currentWorkerId);\n\t\t\tcurrentDistance = orderPosition.distance(currentWorkerPosition);\n\t\t\tif (orderPosition.distance(currentWorkerPosition) < minimum) {\n\t\t\t\tminimum = currentDistance;\n\t\t\t\tworkerAddress = workerIdMap.get(currentWorkerId).getMessageBoxAddress();\n\t\t\t}\n\n\t\t}\n\n\t\treturn workerAddress;\n\n\t}", "String getStartAddress();", "public InetSocketAddress getAddress ( ) {\n\t\treturn extract ( handle -> handle.getAddress ( ) );\n\t}", "public java.lang.String getFromAddress()\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(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "SocketAddress getRemoteAddress();", "private String getIPAddress() throws Exception {\n //Don't need the line of code below, TODO: delete it!\n InetAddress getIP = InetAddress.getLocalHost();\n String thisSystemAddress = \"\";\n try{\n URL thisUrl = new URL(\"http://bot.whatismyipaddress.com\");\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(thisUrl.openStream()));\n thisSystemAddress = bufferedReader.readLine().trim();\n } catch (Exception e){\n e.printStackTrace();\n e.getCause();\n }\n\n return thisSystemAddress;\n }", "@Option String getSimulinkAddress();", "@Override\r\n public String getIPAddress() {\r\n return address;\r\n }", "public abstract InetSocketAddress listeningAddress();", "java.lang.String getValidatorAddress();", "java.lang.String getValidatorAddress();", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "private String seederAddress() {\n return CEBayHelper.GetRemoteActorRef(getSelf());\n }", "EndpointAddress getDestinationAddress();", "public static String getNintendoWiiUInternetProtocolAddress() throws IOException, InterruptedException,\n\t\t\tExecutionException\n\t{\n\t\tString localIPAddress = NetworkUtilities.getLocalInternetProtocolAddress();\n\t\tint networkMaskLength = NetworkUtilities.getLocalNetworkMaskLength();\n\t\tString[] subNetworkAddresses = NetworkUtilities.getAllSubNetworkAddresses(localIPAddress, networkMaskLength);\n\n\t\treturn getWiiUIPAddress(subNetworkAddresses);\n\t}", "com.google.protobuf.ByteString getWorkerIdBytes();", "worker(long workOn) {\n this.workOn = workOn;\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "protected final static EndpointAddress mkAddress(String destPeer, String serv, String parm) {\r\n\r\n ID asID = ID.create(URI.create(destPeer));\r\n return mkAddress(asID, serv, parm);\r\n }", "public void setAddress(java.lang.String param) {\r\n localAddressTracker = param != null;\r\n\r\n this.localAddress = param;\r\n }", "private String computeAddress(String domain) throws ProtocolUnderTCPException {\n String address;\n try {\n address = DNS.getAddress(domain);\n } catch (DNSException e) {\n throw new ProtocolUnderTCPException(\"Unable to determine address.\", e);\n }\n return address;\n }", "String getEndAddress();", "com.google.protobuf.ByteString getAddressBytes();", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n }\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "protected InetAddress getAddress(String username) {\n\t\ttry {\n\t\t\tPreparedStatement pstmt = \n\t\t\t\t\tthis.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\t\t\tthis.agent.getDatabaseManager().selectByName);\n\t pstmt.setString(1,username);\n\t ResultSet rs = pstmt.executeQuery();\n\t return InetAddress.getByName(rs.getString(\"address\"));\n\t\t} catch (Exception e) {\n\t\t\tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to get address of user %s in the database\\n\",username), e);\n\t\t}\n return null; // Pas accessible\n\t}", "public void handleNetworkException(WorkerChore chore, CallNetworkException e);", "public String getMessageAddress();", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getAddress();", "public SocketAddress getPeerName()\n throws IOException,IllegalArgumentException\n {\n getPeerNameNative();\n if (_remoteAddress == null) {\n return null;\n }\n InetAddress remoteIP = InetAddress.getByName (_remoteAddress);\n InetSocketAddress addr = new InetSocketAddress (remoteIP, _remotePort);\n return addr;\n }", "public static void AddWorker(ExecutorService worker)\n\t{\n\t\t//TODO something reasonable\n\t}", "public InetAddress getHost();", "public Builder setServerAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n serverAddress_ = value;\n onChanged();\n return this;\n }", "public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\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 serverAddress_ = s;\n return s;\n }\n }", "@Override\n\t\tpublic String getLocalAddr() {\n\t\t\treturn null;\n\t\t}", "void bind(WorkerPool workerPool);", "private static String[] getServerAddress(String p_78863_0_) {\n/* */ try {\n/* 87 */ String var1 = \"com.sun.jndi.dns.DnsContextFactory\";\n/* 88 */ Class.forName(\"com.sun.jndi.dns.DnsContextFactory\");\n/* 89 */ Hashtable<Object, Object> var2 = new Hashtable<>();\n/* 90 */ var2.put(\"java.naming.factory.initial\", \"com.sun.jndi.dns.DnsContextFactory\");\n/* 91 */ var2.put(\"java.naming.provider.url\", \"dns:\");\n/* 92 */ var2.put(\"com.sun.jndi.dns.timeout.retries\", \"1\");\n/* 93 */ InitialDirContext var3 = new InitialDirContext(var2);\n/* 94 */ Attributes var4 = var3.getAttributes(\"_minecraft._tcp.\" + p_78863_0_, new String[] { \"SRV\" });\n/* 95 */ String[] var5 = var4.get(\"srv\").get().toString().split(\" \", 4);\n/* 96 */ return new String[] { var5[3], var5[2] };\n/* */ }\n/* 98 */ catch (Throwable var6) {\n/* */ \n/* 100 */ return new String[] { p_78863_0_, Integer.toString(25565) };\n/* */ } \n/* */ }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private static InetAddress getLocalInetAddress() throws SocketException {\n // Before we connect somewhere, we cannot be sure about what we'd be bound to; however,\n // we only connect when the message where client ID is, is long constructed. Thus,\n // just use whichever IP address we can find.\n Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();\n while (interfaces.hasMoreElements()) {\n NetworkInterface current = interfaces.nextElement();\n if (!current.isUp() || current.isLoopback() || current.isVirtual()) {\n continue;\n }\n Enumeration<InetAddress> addresses = current.getInetAddresses();\n while (addresses.hasMoreElements()) {\n InetAddress addr = addresses.nextElement();\n if (!addr.isLoopbackAddress()) {\n return addr;\n }\n }\n }\n\n throw new SocketException(\"Can't get our ip address, interfaces are: \" + interfaces);\n }", "private String getAddress() {\n\t\tif (localIp != null) {\n\t\t\treturn localIp;\n\t\t}\n\t\tString address = \"\";\n\t\tInetAddress lanIp = null;\n\t\ttry {\n\t\t\tString ipAddress = null;\n\t\t\tEnumeration<NetworkInterface> net = null;\n\t\t\tnet = NetworkInterface.getNetworkInterfaces();\n\t\t\twhile (net.hasMoreElements()) {\n\t\t\t\tNetworkInterface element = net.nextElement();\n\t\t\t\tEnumeration<InetAddress> addresses = element.getInetAddresses();\n\t\t\t\twhile (addresses.hasMoreElements()) {\n\t\t\t\t\tInetAddress ip = addresses.nextElement();\n\t\t\t\t\tif (ip instanceof Inet4Address) {\n\t\t\t\t\t\tif (ip.isSiteLocalAddress()) {\n\t\t\t\t\t\t\tipAddress = ip.getHostAddress();\n\t\t\t\t\t\t\tlanIp = InetAddress.getByName(ipAddress);\n\t\t\t\t\t\t\tSystem.out.println(\"found local address: \" + ipAddress);\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\tif (lanIp == null)\n\t\t\t\treturn null; \n\t\t\taddress = lanIp.toString().replaceAll(\"^/+\", \"\"); \n\t\t} catch (UnknownHostException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch (SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn address;\n\n\t}", "public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\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 serverAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static InetAddress getJustLocalAddress()\n {\n if (localInetAddress == null)\n {\n if (DatabaseDescriptor.getListenAddress() == null)\n {\n try\n {\n localInetAddress = InetAddress.getLocalHost();\n logger.info(\"InetAddress.getLocalHost() was used to resolve listen_address to {}, double check this is \"\n + \"correct. Please check your node's config and set the listen_address in cassandra.yaml accordingly if applicable.\",\n localInetAddress);\n }\n catch(UnknownHostException e)\n {\n logger.info(\"InetAddress.getLocalHost() could not resolve the address for the hostname ({}), please \"\n + \"check your node's config and set the listen_address in cassandra.yaml. Falling back to {}\",\n e,\n InetAddress.getLoopbackAddress());\n // CASSANDRA-15901 fallback for misconfigured nodes\n localInetAddress = InetAddress.getLoopbackAddress();\n }\n }\n else\n localInetAddress = DatabaseDescriptor.getListenAddress();\n }\n return localInetAddress;\n }" ]
[ "0.7180606", "0.6911513", "0.67166805", "0.6145593", "0.6137217", "0.60565615", "0.60565615", "0.60565615", "0.60565615", "0.60565615", "0.60565615", "0.6006913", "0.59798104", "0.5976859", "0.59736127", "0.59736127", "0.5920321", "0.58700174", "0.58646536", "0.5841446", "0.5837786", "0.5837786", "0.5837007", "0.5808633", "0.5788531", "0.5756274", "0.57232594", "0.57112455", "0.5698467", "0.5698467", "0.5692498", "0.56828135", "0.56644034", "0.565268", "0.5647098", "0.5636662", "0.5634586", "0.5619385", "0.5615898", "0.5609074", "0.5590799", "0.5590529", "0.5535579", "0.5505735", "0.5483767", "0.5466031", "0.54592925", "0.5443986", "0.5435194", "0.54306537", "0.54292965", "0.54191667", "0.5407503", "0.5405564", "0.5392099", "0.5378693", "0.5377353", "0.53748035", "0.53709406", "0.5363375", "0.53567064", "0.5354971", "0.53507775", "0.5349112", "0.5343055", "0.53410244", "0.53410244", "0.53360987", "0.53256774", "0.5312818", "0.5283859", "0.5277518", "0.52694696", "0.5260096", "0.5260096", "0.52569455", "0.52476186", "0.52459145", "0.5245136", "0.52374226", "0.52320325", "0.522755", "0.5217987", "0.5214108", "0.5208982", "0.52082825", "0.52026916", "0.52016956", "0.51997775", "0.51962817", "0.5192705", "0.5191093", "0.5191021", "0.51900065", "0.5186588", "0.51838404", "0.51838404", "0.5177671", "0.51748866", "0.5173299", "0.5172723" ]
0.0
-1
get a different workerAddress than the one passed as the argument
private ICommunicationAddress decideOrderAssigment(Order order) { ICommunicationAddress workerAddress = null; Position orderPosition = order.position; Position currentWorkerPosition = null; int minimum = Integer.MAX_VALUE; int currentDistance = 0; String[] workerAgentId = workerIdReverseAID.values().toArray(new String[0]); for (String currentWorkerId: workerAgentId) { currentWorkerPosition = positionMap.get(currentWorkerId); currentDistance = orderPosition.distance(currentWorkerPosition); if (orderPosition.distance(currentWorkerPosition) < minimum) { minimum = currentDistance; workerAddress = workerIdMap.get(currentWorkerId).getMessageBoxAddress(); } } return workerAddress; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ICommunicationAddress getAlternativeWorkerAddress(String workerId) {\n\t\tICommunicationAddress workerAddress = null;\n\t\tfor(IAgentDescription agentDescription: this.agentDescriptions) {\n\n\t\t\t// TODO add datastructure to find most likely alternative for assigning an order to alternative worker\n\t \t\tString workerAgentId = workerIdReverseAID.get(workerId);\n\n\t\t\tif (agentDescription.getAid().equals(workerAgentId)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t workerAddress = agentDescription.getMessageBoxAddress();\n\t\t\tbreak;\n\t\t}\n\n\t\treturn workerAddress;\n\t}", "Value worker(String main, String address);", "public String getAddress(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getString(WorkerController.ADDRESS);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "java.lang.String getWorkerId();", "InetAddress getAddress();", "InetAddress getAddress();", "SocketAddress socketAddress();", "java.lang.String getBrokerAddress();", "@Override\n public InetSocketAddress localAddressFor(Handle<GameAppContext> that) \n {\n return manager.localAddressFor(that);\n }", "SocketAddress getLocalAddress();", "public InternetAddress getFromAddress();", "java.lang.String getServerAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "@java.lang.Override\n public java.lang.String getBrokerAddress() {\n java.lang.Object ref = brokerAddress_;\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 brokerAddress_ = s;\n return s;\n }\n }", "private InetSocketAddress getClientAddress(Socket socket) {\n InetAddress address = socket.getInetAddress();\n int port = socket.getPort();\n \n return new InetSocketAddress(address, port);\n }", "java.lang.String getDelegatorAddress();", "java.lang.String getDelegatorAddress();", "public String get_worker() {\n return this._worker;\n }", "public SocketAddress method_4118() {\n return null;\n }", "String getAddr();", "public String getRpcServerAddress() throws HMServiceException {\n return rpcServerAddress.orElseThrow(() -> new HMServiceException(\"No RPC server address given! Check builder procedure. \"\n + \"May passed the wrong path during building\"));\n }", "MessageAddress getMessageAddress();", "java.lang.String getBitcoinAddress();", "private URI resolveWebServerBindAddress(final Config config) {\n\t\tfinal String[] brokerHostPort = config.getBroker().getHostPort().split(\":\");\n \tfinal JerseyUriBuilder builder = new JerseyUriBuilder();\n \tfinal BootstrapConfiguration bs = config.getBootstrap();\n\t\tfinal String[] webHostPort = bs.getWebServerHostPort().split(\":\");\n\t\tint webPort = Integer.parseInt(webHostPort[1]);\n\t\tfinal boolean untouched = bs.getWebServerHostPort().equals(BootstrapConfiguration.WEB_SERVER_HOST_PORT);\n\t\tString webhostport;\n\t\tif (untouched) {\n\t\t\tint brokerPort = Integer.parseInt(brokerHostPort[1]);\n\t\t\twebPort = brokerPort == BrokerConfiguration.PORT ? webPort: brokerPort + 100;\n\t\t\tfinal String host = config.getResolvedShardId().getId().split(\":\")[0];\n\t\t\tbuilder.host(host).port(webPort);\n\t\t\twebhostport = host + \":\" + webPort;\n\t\t} else {\n\t\t\tbuilder.host(webHostPort[0]).port(webPort);\n\t\t\twebhostport = webHostPort[0]+ \":\" + webPort;\n\t\t}\n\t\tconfig.getResolvedShardId().setWebHostPort(webhostport);\n\t\tconfig.getBootstrap().setWebServerHostPort(webhostport);\n\t\tlogger.info(\"{}: {} Web host:port = {}\", name, tenant.getConnectReference(), webhostport);\n\t\tbuilder.path(config.getBootstrap().getWebServerContextPath());\n\t\treturn builder.build();\n\t}", "AddressI getAddress();", "public String getInternalAddress();", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "InetSocketAddress peerAddress();", "public java.lang.String getBrokerAddress() {\n java.lang.Object ref = brokerAddress_;\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 brokerAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static InetSocketAddress getBindAddress(Configuration conf) {\n return conf.getSocketAddr(JHAdminConfig.MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_PORT);\n }", "public SocketAddress method_4128() {\n return null;\n }", "int getAddr();", "public InetSocketAddress getAddress ( ) {\n\t\treturn extract ( handle -> handle.getAddress ( ) );\n\t}", "public Address getCurrentCallRemoteAddress();", "SocketAddress getRemoteAddress();", "GetWorkerResult getWorker(GetWorkerRequest getWorkerRequest);", "abstract String getRemoteAddress();", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public abstract String getWorkerName();", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public InetSocketAddress getClientAddress() {\n SocketChannel socket = channel.getSocket();\n Socket client = socket.socket();\n \n return getClientAddress(client);\n }", "String getAddress();", "String getAddress();", "protected final static EndpointAddress mkAddress(ID destPeer, String serv, String parm) {\r\n\r\n EndpointAddress addr = new EndpointAddress(MESSAGE_NAMESPACE_NAME, destPeer.getUniqueValue().toString(), serv, parm);\r\n\r\n return addr;\r\n }", "public String getExternalAddress();", "com.google.protobuf.ByteString getWorkerIdBytes();", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n }\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "protected static String getDUnitLocatorAddress() {\n return Host.getHost(0).getHostName();\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "com.google.protobuf.ByteString getAddressBytes();", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Test\n public void testAddress() throws UnknownHostException {\n InetAddress address = InetAddress.getByAddress(\"www.baidu.com\", new byte[]{(byte) 192, (byte) 168, 0, 1});\n System.out.println(address.getHostName());\n InetSocketAddress socketAddress = new InetSocketAddress(address, 8009);\n System.out.println(socketAddress.getHostString());\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\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 serverAddress_ = s;\n return s;\n }\n }", "public java.lang.String getFromAddress()\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(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public SocketAddress getLocalSocketAddress() {\n if (state >= BOUND)\n return new InetSocketAddress (localAddr, localPort);\n else\n return null;\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static InetAddress getJustLocalAddress()\n {\n if (localInetAddress == null)\n {\n if (DatabaseDescriptor.getListenAddress() == null)\n {\n try\n {\n localInetAddress = InetAddress.getLocalHost();\n logger.info(\"InetAddress.getLocalHost() was used to resolve listen_address to {}, double check this is \"\n + \"correct. Please check your node's config and set the listen_address in cassandra.yaml accordingly if applicable.\",\n localInetAddress);\n }\n catch(UnknownHostException e)\n {\n logger.info(\"InetAddress.getLocalHost() could not resolve the address for the hostname ({}), please \"\n + \"check your node's config and set the listen_address in cassandra.yaml. Falling back to {}\",\n e,\n InetAddress.getLoopbackAddress());\n // CASSANDRA-15901 fallback for misconfigured nodes\n localInetAddress = InetAddress.getLoopbackAddress();\n }\n }\n else\n localInetAddress = DatabaseDescriptor.getListenAddress();\n }\n return localInetAddress;\n }", "public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\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 serverAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getRpcAddress() {\n java.lang.Object ref = rpcAddress_;\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 rpcAddress_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t} else {\n\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\taddress_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t}\n\t\t\t}", "public abstract InetSocketAddress listeningAddress();", "java.lang.String getValidatorAddress();", "java.lang.String getValidatorAddress();", "public java.lang.String getAddress() {\n\t\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\t\taddress_ = s;\n\t\t\t\t\t\treturn s;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t\t}\n\t\t\t\t}", "public void createWorker(Worker worker){\n }", "public InetSocketAddress getLocalAddress() {\r\n return (InetSocketAddress) channel.localAddress();\r\n }", "private String seederAddress() {\n return CEBayHelper.GetRemoteActorRef(getSelf());\n }", "EndpointAddress getDestinationAddress();", "public SocketAddress getPeerName()\n throws IOException,IllegalArgumentException\n {\n getPeerNameNative();\n if (_remoteAddress == null) {\n return null;\n }\n InetAddress remoteIP = InetAddress.getByName (_remoteAddress);\n InetSocketAddress addr = new InetSocketAddress (remoteIP, _remotePort);\n return addr;\n }", "@Override public String brokerAddress() { return brokerAddress; }", "public Inet4Address assignNewIPAddress() {\n\t\tbyte[] rawNewAddr = Arrays.copyOf(subnetAddress.getAddress(), 4);\n\n\t\t//TODO find an available IP address and register it to usedAddresses\n\t\t//TODO hardcoding 256 assuming that mask == 24; all trying ones would be in this subnet\n\t\t// starting from 2 since 0 and 1 are assumed to be used already (for network and gateway)\n\t\tfor (int i = 2; i < 256; i++) {\n\t\t\trawNewAddr[3] = (byte) i;\n\t\t\tInet4Address newAddr;\n\n\t\t\ttry {\n\t\t\t\tnewAddr = (Inet4Address) Inet4Address.getByAddress(rawNewAddr);\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t// shouldn't happen\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!isAddressAlreadyRegistered(newAddr)) {\n\t\t\t\t//address not registered yet -> let's register\n\t\t\t\tusedAddresses.add(newAddr);\n\t\t\t\treturn newAddr;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n public String getIPAddress() {\r\n return address;\r\n }", "private String GetHostAddress() throws UnknownHostException {\n return Inet4Address.getLocalHost().getHostAddress();\n }", "public LocalSocketAddress getSockAddress() throws IOException {\n // This method has never been implemented.\n return null;\n }", "protected final static EndpointAddress mkAddress(String destPeer, String serv, String parm) {\r\n\r\n ID asID = ID.create(URI.create(destPeer));\r\n return mkAddress(asID, serv, parm);\r\n }", "private static InetAddress getLocalInetAddress() throws SocketException {\n // Before we connect somewhere, we cannot be sure about what we'd be bound to; however,\n // we only connect when the message where client ID is, is long constructed. Thus,\n // just use whichever IP address we can find.\n Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();\n while (interfaces.hasMoreElements()) {\n NetworkInterface current = interfaces.nextElement();\n if (!current.isUp() || current.isLoopback() || current.isVirtual()) {\n continue;\n }\n Enumeration<InetAddress> addresses = current.getInetAddresses();\n while (addresses.hasMoreElements()) {\n InetAddress addr = addresses.nextElement();\n if (!addr.isLoopbackAddress()) {\n return addr;\n }\n }\n }\n\n throw new SocketException(\"Can't get our ip address, interfaces are: \" + interfaces);\n }", "String getQueueManagerHost();", "@Option String getSimulinkAddress();", "public java.lang.String getRpcAddress() {\n java.lang.Object ref = rpcAddress_;\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 rpcAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tInetSocketAddress remoteAddress();", "public java.lang.String getAddress() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.lang.String) __getCache(\"address\")));\n }", "private String getPrefAddress() {\n\t\treturn mPreferences.getString( PREF_ADDR, DEFAULT_ADDR );\n\t}", "public synchronized String getProxyAddress() {\n \n return this.address;\n }", "@Test\n\tpublic void testGetWorker() {\n\t\tInetSocketAddress address = InetSocketAddress.createUnresolved(\n\t\t\t\"localhost\", 1337);\n\t\tMockWorker worker = new MockWorker(address);\n\t\tWorkerLoadSnapshot instance = WorkerLoadSnapshot.newSnapshot(worker);\n\t\tassertSame(worker, instance.getWorker());\n\t}", "public InetAddress getAddress ()\n {\n return address;\n }", "public java.lang.String getBitcoinAddress() {\n java.lang.Object ref = bitcoinAddress_;\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 bitcoinAddress_ = s;\n }\n return s;\n }\n }", "public String getBindAddress() {\n return agentConfig.getBindAddress();\n }", "String getStartAddress();" ]
[ "0.69680905", "0.6644712", "0.6469867", "0.6073851", "0.60495883", "0.60495883", "0.60490096", "0.5998105", "0.59902763", "0.5882829", "0.585939", "0.58357173", "0.579588", "0.579588", "0.579588", "0.579588", "0.579588", "0.579588", "0.57284844", "0.57052535", "0.5695844", "0.5695844", "0.5693918", "0.56812584", "0.5676605", "0.5666375", "0.56475294", "0.56402516", "0.56366163", "0.5622995", "0.5621272", "0.56172293", "0.5612432", "0.5603731", "0.5600933", "0.55917674", "0.5590418", "0.5587743", "0.5539188", "0.55383366", "0.55253184", "0.5523562", "0.55107296", "0.5467139", "0.5449813", "0.5436201", "0.5436201", "0.54235035", "0.5412417", "0.5412417", "0.54123443", "0.5409027", "0.54040617", "0.53909314", "0.53866476", "0.53803563", "0.5350382", "0.53474104", "0.5342478", "0.5340988", "0.5332565", "0.5332565", "0.53266436", "0.53188056", "0.5307619", "0.5301885", "0.5297501", "0.529346", "0.5291792", "0.5291792", "0.5291792", "0.5291285", "0.52902454", "0.52894837", "0.5265234", "0.5265234", "0.52570313", "0.5241985", "0.5240097", "0.52302", "0.52239156", "0.52217495", "0.52174646", "0.520846", "0.5205055", "0.5204101", "0.5197871", "0.51951545", "0.5181825", "0.51741076", "0.5156946", "0.51544917", "0.5150853", "0.51488805", "0.5148464", "0.5142008", "0.5139116", "0.5137039", "0.5130456", "0.51228696", "0.51226836" ]
0.0
-1
get a different workerAddress than the one passed as the argument
private ICommunicationAddress getAlternativeWorkerAddress(String workerId) { ICommunicationAddress workerAddress = null; for(IAgentDescription agentDescription: this.agentDescriptions) { // TODO add datastructure to find most likely alternative for assigning an order to alternative worker String workerAgentId = workerIdReverseAID.get(workerId); if (agentDescription.getAid().equals(workerAgentId)) { continue; } workerAddress = agentDescription.getMessageBoxAddress(); break; } return workerAddress; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Value worker(String main, String address);", "public String getAddress(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getString(WorkerController.ADDRESS);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "java.lang.String getWorkerId();", "InetAddress getAddress();", "InetAddress getAddress();", "SocketAddress socketAddress();", "java.lang.String getBrokerAddress();", "@Override\n public InetSocketAddress localAddressFor(Handle<GameAppContext> that) \n {\n return manager.localAddressFor(that);\n }", "SocketAddress getLocalAddress();", "public InternetAddress getFromAddress();", "java.lang.String getServerAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "@java.lang.Override\n public java.lang.String getBrokerAddress() {\n java.lang.Object ref = brokerAddress_;\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 brokerAddress_ = s;\n return s;\n }\n }", "private InetSocketAddress getClientAddress(Socket socket) {\n InetAddress address = socket.getInetAddress();\n int port = socket.getPort();\n \n return new InetSocketAddress(address, port);\n }", "java.lang.String getDelegatorAddress();", "java.lang.String getDelegatorAddress();", "public String get_worker() {\n return this._worker;\n }", "public SocketAddress method_4118() {\n return null;\n }", "String getAddr();", "public String getRpcServerAddress() throws HMServiceException {\n return rpcServerAddress.orElseThrow(() -> new HMServiceException(\"No RPC server address given! Check builder procedure. \"\n + \"May passed the wrong path during building\"));\n }", "MessageAddress getMessageAddress();", "java.lang.String getBitcoinAddress();", "private URI resolveWebServerBindAddress(final Config config) {\n\t\tfinal String[] brokerHostPort = config.getBroker().getHostPort().split(\":\");\n \tfinal JerseyUriBuilder builder = new JerseyUriBuilder();\n \tfinal BootstrapConfiguration bs = config.getBootstrap();\n\t\tfinal String[] webHostPort = bs.getWebServerHostPort().split(\":\");\n\t\tint webPort = Integer.parseInt(webHostPort[1]);\n\t\tfinal boolean untouched = bs.getWebServerHostPort().equals(BootstrapConfiguration.WEB_SERVER_HOST_PORT);\n\t\tString webhostport;\n\t\tif (untouched) {\n\t\t\tint brokerPort = Integer.parseInt(brokerHostPort[1]);\n\t\t\twebPort = brokerPort == BrokerConfiguration.PORT ? webPort: brokerPort + 100;\n\t\t\tfinal String host = config.getResolvedShardId().getId().split(\":\")[0];\n\t\t\tbuilder.host(host).port(webPort);\n\t\t\twebhostport = host + \":\" + webPort;\n\t\t} else {\n\t\t\tbuilder.host(webHostPort[0]).port(webPort);\n\t\t\twebhostport = webHostPort[0]+ \":\" + webPort;\n\t\t}\n\t\tconfig.getResolvedShardId().setWebHostPort(webhostport);\n\t\tconfig.getBootstrap().setWebServerHostPort(webhostport);\n\t\tlogger.info(\"{}: {} Web host:port = {}\", name, tenant.getConnectReference(), webhostport);\n\t\tbuilder.path(config.getBootstrap().getWebServerContextPath());\n\t\treturn builder.build();\n\t}", "AddressI getAddress();", "public String getInternalAddress();", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "InetSocketAddress peerAddress();", "public java.lang.String getBrokerAddress() {\n java.lang.Object ref = brokerAddress_;\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 brokerAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static InetSocketAddress getBindAddress(Configuration conf) {\n return conf.getSocketAddr(JHAdminConfig.MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_PORT);\n }", "public SocketAddress method_4128() {\n return null;\n }", "int getAddr();", "public InetSocketAddress getAddress ( ) {\n\t\treturn extract ( handle -> handle.getAddress ( ) );\n\t}", "public Address getCurrentCallRemoteAddress();", "SocketAddress getRemoteAddress();", "GetWorkerResult getWorker(GetWorkerRequest getWorkerRequest);", "abstract String getRemoteAddress();", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public abstract String getWorkerName();", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public InetSocketAddress getClientAddress() {\n SocketChannel socket = channel.getSocket();\n Socket client = socket.socket();\n \n return getClientAddress(client);\n }", "String getAddress();", "String getAddress();", "protected final static EndpointAddress mkAddress(ID destPeer, String serv, String parm) {\r\n\r\n EndpointAddress addr = new EndpointAddress(MESSAGE_NAMESPACE_NAME, destPeer.getUniqueValue().toString(), serv, parm);\r\n\r\n return addr;\r\n }", "public String getExternalAddress();", "com.google.protobuf.ByteString getWorkerIdBytes();", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n }\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "protected static String getDUnitLocatorAddress() {\n return Host.getHost(0).getHostName();\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "com.google.protobuf.ByteString getAddressBytes();", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Test\n public void testAddress() throws UnknownHostException {\n InetAddress address = InetAddress.getByAddress(\"www.baidu.com\", new byte[]{(byte) 192, (byte) 168, 0, 1});\n System.out.println(address.getHostName());\n InetSocketAddress socketAddress = new InetSocketAddress(address, 8009);\n System.out.println(socketAddress.getHostString());\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\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 serverAddress_ = s;\n return s;\n }\n }", "public java.lang.String getFromAddress()\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(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public SocketAddress getLocalSocketAddress() {\n if (state >= BOUND)\n return new InetSocketAddress (localAddr, localPort);\n else\n return null;\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static InetAddress getJustLocalAddress()\n {\n if (localInetAddress == null)\n {\n if (DatabaseDescriptor.getListenAddress() == null)\n {\n try\n {\n localInetAddress = InetAddress.getLocalHost();\n logger.info(\"InetAddress.getLocalHost() was used to resolve listen_address to {}, double check this is \"\n + \"correct. Please check your node's config and set the listen_address in cassandra.yaml accordingly if applicable.\",\n localInetAddress);\n }\n catch(UnknownHostException e)\n {\n logger.info(\"InetAddress.getLocalHost() could not resolve the address for the hostname ({}), please \"\n + \"check your node's config and set the listen_address in cassandra.yaml. Falling back to {}\",\n e,\n InetAddress.getLoopbackAddress());\n // CASSANDRA-15901 fallback for misconfigured nodes\n localInetAddress = InetAddress.getLoopbackAddress();\n }\n }\n else\n localInetAddress = DatabaseDescriptor.getListenAddress();\n }\n return localInetAddress;\n }", "public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\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 serverAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getRpcAddress() {\n java.lang.Object ref = rpcAddress_;\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 rpcAddress_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t} else {\n\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\taddress_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t}\n\t\t\t}", "public abstract InetSocketAddress listeningAddress();", "java.lang.String getValidatorAddress();", "java.lang.String getValidatorAddress();", "public java.lang.String getAddress() {\n\t\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\t\taddress_ = s;\n\t\t\t\t\t\treturn s;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t\t}\n\t\t\t\t}", "public void createWorker(Worker worker){\n }", "public InetSocketAddress getLocalAddress() {\r\n return (InetSocketAddress) channel.localAddress();\r\n }", "private String seederAddress() {\n return CEBayHelper.GetRemoteActorRef(getSelf());\n }", "EndpointAddress getDestinationAddress();", "public SocketAddress getPeerName()\n throws IOException,IllegalArgumentException\n {\n getPeerNameNative();\n if (_remoteAddress == null) {\n return null;\n }\n InetAddress remoteIP = InetAddress.getByName (_remoteAddress);\n InetSocketAddress addr = new InetSocketAddress (remoteIP, _remotePort);\n return addr;\n }", "@Override public String brokerAddress() { return brokerAddress; }", "public Inet4Address assignNewIPAddress() {\n\t\tbyte[] rawNewAddr = Arrays.copyOf(subnetAddress.getAddress(), 4);\n\n\t\t//TODO find an available IP address and register it to usedAddresses\n\t\t//TODO hardcoding 256 assuming that mask == 24; all trying ones would be in this subnet\n\t\t// starting from 2 since 0 and 1 are assumed to be used already (for network and gateway)\n\t\tfor (int i = 2; i < 256; i++) {\n\t\t\trawNewAddr[3] = (byte) i;\n\t\t\tInet4Address newAddr;\n\n\t\t\ttry {\n\t\t\t\tnewAddr = (Inet4Address) Inet4Address.getByAddress(rawNewAddr);\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t// shouldn't happen\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!isAddressAlreadyRegistered(newAddr)) {\n\t\t\t\t//address not registered yet -> let's register\n\t\t\t\tusedAddresses.add(newAddr);\n\t\t\t\treturn newAddr;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n public String getIPAddress() {\r\n return address;\r\n }", "private String GetHostAddress() throws UnknownHostException {\n return Inet4Address.getLocalHost().getHostAddress();\n }", "public LocalSocketAddress getSockAddress() throws IOException {\n // This method has never been implemented.\n return null;\n }", "protected final static EndpointAddress mkAddress(String destPeer, String serv, String parm) {\r\n\r\n ID asID = ID.create(URI.create(destPeer));\r\n return mkAddress(asID, serv, parm);\r\n }", "private static InetAddress getLocalInetAddress() throws SocketException {\n // Before we connect somewhere, we cannot be sure about what we'd be bound to; however,\n // we only connect when the message where client ID is, is long constructed. Thus,\n // just use whichever IP address we can find.\n Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();\n while (interfaces.hasMoreElements()) {\n NetworkInterface current = interfaces.nextElement();\n if (!current.isUp() || current.isLoopback() || current.isVirtual()) {\n continue;\n }\n Enumeration<InetAddress> addresses = current.getInetAddresses();\n while (addresses.hasMoreElements()) {\n InetAddress addr = addresses.nextElement();\n if (!addr.isLoopbackAddress()) {\n return addr;\n }\n }\n }\n\n throw new SocketException(\"Can't get our ip address, interfaces are: \" + interfaces);\n }", "String getQueueManagerHost();", "@Option String getSimulinkAddress();", "public java.lang.String getRpcAddress() {\n java.lang.Object ref = rpcAddress_;\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 rpcAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tInetSocketAddress remoteAddress();", "public java.lang.String getAddress() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.lang.String) __getCache(\"address\")));\n }", "private String getPrefAddress() {\n\t\treturn mPreferences.getString( PREF_ADDR, DEFAULT_ADDR );\n\t}", "public synchronized String getProxyAddress() {\n \n return this.address;\n }", "@Test\n\tpublic void testGetWorker() {\n\t\tInetSocketAddress address = InetSocketAddress.createUnresolved(\n\t\t\t\"localhost\", 1337);\n\t\tMockWorker worker = new MockWorker(address);\n\t\tWorkerLoadSnapshot instance = WorkerLoadSnapshot.newSnapshot(worker);\n\t\tassertSame(worker, instance.getWorker());\n\t}", "public InetAddress getAddress ()\n {\n return address;\n }", "public java.lang.String getBitcoinAddress() {\n java.lang.Object ref = bitcoinAddress_;\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 bitcoinAddress_ = s;\n }\n return s;\n }\n }", "public String getBindAddress() {\n return agentConfig.getBindAddress();\n }", "String getStartAddress();" ]
[ "0.6644712", "0.6469867", "0.6073851", "0.60495883", "0.60495883", "0.60490096", "0.5998105", "0.59902763", "0.5882829", "0.585939", "0.58357173", "0.579588", "0.579588", "0.579588", "0.579588", "0.579588", "0.579588", "0.57284844", "0.57052535", "0.5695844", "0.5695844", "0.5693918", "0.56812584", "0.5676605", "0.5666375", "0.56475294", "0.56402516", "0.56366163", "0.5622995", "0.5621272", "0.56172293", "0.5612432", "0.5603731", "0.5600933", "0.55917674", "0.5590418", "0.5587743", "0.5539188", "0.55383366", "0.55253184", "0.5523562", "0.55107296", "0.5467139", "0.5449813", "0.5436201", "0.5436201", "0.54235035", "0.5412417", "0.5412417", "0.54123443", "0.5409027", "0.54040617", "0.53909314", "0.53866476", "0.53803563", "0.5350382", "0.53474104", "0.5342478", "0.5340988", "0.5332565", "0.5332565", "0.53266436", "0.53188056", "0.5307619", "0.5301885", "0.5297501", "0.529346", "0.5291792", "0.5291792", "0.5291792", "0.5291285", "0.52902454", "0.52894837", "0.5265234", "0.5265234", "0.52570313", "0.5241985", "0.5240097", "0.52302", "0.52239156", "0.52217495", "0.52174646", "0.520846", "0.5205055", "0.5204101", "0.5197871", "0.51951545", "0.5181825", "0.51741076", "0.5156946", "0.51544917", "0.5150853", "0.51488805", "0.5148464", "0.5142008", "0.5139116", "0.5137039", "0.5130456", "0.51228696", "0.51226836" ]
0.69680905
0
get a different workerAddress than the one passed as the argument
private void reassignOrder(ICommunicationAddress workerAddress, AssignOrderConfirm assignOrderConfirm) { // TODO AssignOrderMessage assignOrderMessage = new AssignOrderMessage(); assignOrderMessage.order = this.orderMap.get(assignOrderConfirm.orderId); assignOrderMessage.gameId = assignOrderConfirm.gameId; assignOrderMessage.server = this.server; sendMessage(workerAddress, assignOrderMessage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ICommunicationAddress getAlternativeWorkerAddress(String workerId) {\n\t\tICommunicationAddress workerAddress = null;\n\t\tfor(IAgentDescription agentDescription: this.agentDescriptions) {\n\n\t\t\t// TODO add datastructure to find most likely alternative for assigning an order to alternative worker\n\t \t\tString workerAgentId = workerIdReverseAID.get(workerId);\n\n\t\t\tif (agentDescription.getAid().equals(workerAgentId)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t workerAddress = agentDescription.getMessageBoxAddress();\n\t\t\tbreak;\n\t\t}\n\n\t\treturn workerAddress;\n\t}", "Value worker(String main, String address);", "public String getAddress(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getString(WorkerController.ADDRESS);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "java.lang.String getWorkerId();", "SocketAddress socketAddress();", "InetAddress getAddress();", "InetAddress getAddress();", "java.lang.String getBrokerAddress();", "@Override\n public InetSocketAddress localAddressFor(Handle<GameAppContext> that) \n {\n return manager.localAddressFor(that);\n }", "SocketAddress getLocalAddress();", "public InternetAddress getFromAddress();", "java.lang.String getServerAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "@java.lang.Override\n public java.lang.String getBrokerAddress() {\n java.lang.Object ref = brokerAddress_;\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 brokerAddress_ = s;\n return s;\n }\n }", "private InetSocketAddress getClientAddress(Socket socket) {\n InetAddress address = socket.getInetAddress();\n int port = socket.getPort();\n \n return new InetSocketAddress(address, port);\n }", "java.lang.String getDelegatorAddress();", "java.lang.String getDelegatorAddress();", "public String get_worker() {\n return this._worker;\n }", "public SocketAddress method_4118() {\n return null;\n }", "String getAddr();", "public String getRpcServerAddress() throws HMServiceException {\n return rpcServerAddress.orElseThrow(() -> new HMServiceException(\"No RPC server address given! Check builder procedure. \"\n + \"May passed the wrong path during building\"));\n }", "MessageAddress getMessageAddress();", "java.lang.String getBitcoinAddress();", "private URI resolveWebServerBindAddress(final Config config) {\n\t\tfinal String[] brokerHostPort = config.getBroker().getHostPort().split(\":\");\n \tfinal JerseyUriBuilder builder = new JerseyUriBuilder();\n \tfinal BootstrapConfiguration bs = config.getBootstrap();\n\t\tfinal String[] webHostPort = bs.getWebServerHostPort().split(\":\");\n\t\tint webPort = Integer.parseInt(webHostPort[1]);\n\t\tfinal boolean untouched = bs.getWebServerHostPort().equals(BootstrapConfiguration.WEB_SERVER_HOST_PORT);\n\t\tString webhostport;\n\t\tif (untouched) {\n\t\t\tint brokerPort = Integer.parseInt(brokerHostPort[1]);\n\t\t\twebPort = brokerPort == BrokerConfiguration.PORT ? webPort: brokerPort + 100;\n\t\t\tfinal String host = config.getResolvedShardId().getId().split(\":\")[0];\n\t\t\tbuilder.host(host).port(webPort);\n\t\t\twebhostport = host + \":\" + webPort;\n\t\t} else {\n\t\t\tbuilder.host(webHostPort[0]).port(webPort);\n\t\t\twebhostport = webHostPort[0]+ \":\" + webPort;\n\t\t}\n\t\tconfig.getResolvedShardId().setWebHostPort(webhostport);\n\t\tconfig.getBootstrap().setWebServerHostPort(webhostport);\n\t\tlogger.info(\"{}: {} Web host:port = {}\", name, tenant.getConnectReference(), webhostport);\n\t\tbuilder.path(config.getBootstrap().getWebServerContextPath());\n\t\treturn builder.build();\n\t}", "AddressI getAddress();", "public String getInternalAddress();", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "InetSocketAddress peerAddress();", "public java.lang.String getBrokerAddress() {\n java.lang.Object ref = brokerAddress_;\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 brokerAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static InetSocketAddress getBindAddress(Configuration conf) {\n return conf.getSocketAddr(JHAdminConfig.MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_ADDRESS,\n JHAdminConfig.DEFAULT_MR_HISTORY_PORT);\n }", "public SocketAddress method_4128() {\n return null;\n }", "int getAddr();", "public InetSocketAddress getAddress ( ) {\n\t\treturn extract ( handle -> handle.getAddress ( ) );\n\t}", "public Address getCurrentCallRemoteAddress();", "SocketAddress getRemoteAddress();", "abstract String getRemoteAddress();", "GetWorkerResult getWorker(GetWorkerRequest getWorkerRequest);", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public abstract String getWorkerName();", "@java.lang.Override\n public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "public InetSocketAddress getClientAddress() {\n SocketChannel socket = channel.getSocket();\n Socket client = socket.socket();\n \n return getClientAddress(client);\n }", "protected final static EndpointAddress mkAddress(ID destPeer, String serv, String parm) {\r\n\r\n EndpointAddress addr = new EndpointAddress(MESSAGE_NAMESPACE_NAME, destPeer.getUniqueValue().toString(), serv, parm);\r\n\r\n return addr;\r\n }", "String getAddress();", "String getAddress();", "public String getExternalAddress();", "com.google.protobuf.ByteString getWorkerIdBytes();", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n }\n return s;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "protected static String getDUnitLocatorAddress() {\n return Host.getHost(0).getHostName();\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n }\n }", "com.google.protobuf.ByteString getAddressBytes();", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Test\n public void testAddress() throws UnknownHostException {\n InetAddress address = InetAddress.getByAddress(\"www.baidu.com\", new byte[]{(byte) 192, (byte) 168, 0, 1});\n System.out.println(address.getHostName());\n InetSocketAddress socketAddress = new InetSocketAddress(address, 8009);\n System.out.println(socketAddress.getHostString());\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\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 serverAddress_ = s;\n return s;\n }\n }", "public java.lang.String getFromAddress()\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(FROMADDRESS$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public SocketAddress getLocalSocketAddress() {\n if (state >= BOUND)\n return new InetSocketAddress (localAddr, localPort);\n else\n return null;\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static InetAddress getJustLocalAddress()\n {\n if (localInetAddress == null)\n {\n if (DatabaseDescriptor.getListenAddress() == null)\n {\n try\n {\n localInetAddress = InetAddress.getLocalHost();\n logger.info(\"InetAddress.getLocalHost() was used to resolve listen_address to {}, double check this is \"\n + \"correct. Please check your node's config and set the listen_address in cassandra.yaml accordingly if applicable.\",\n localInetAddress);\n }\n catch(UnknownHostException e)\n {\n logger.info(\"InetAddress.getLocalHost() could not resolve the address for the hostname ({}), please \"\n + \"check your node's config and set the listen_address in cassandra.yaml. Falling back to {}\",\n e,\n InetAddress.getLoopbackAddress());\n // CASSANDRA-15901 fallback for misconfigured nodes\n localInetAddress = InetAddress.getLoopbackAddress();\n }\n }\n else\n localInetAddress = DatabaseDescriptor.getListenAddress();\n }\n return localInetAddress;\n }", "public java.lang.String getServerAddress() {\n java.lang.Object ref = serverAddress_;\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 serverAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getAddress() {\n java.lang.Object ref = address_;\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 address_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getRpcAddress() {\n java.lang.Object ref = rpcAddress_;\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 rpcAddress_ = s;\n return s;\n }\n }", "public java.lang.String getAddress() {\n\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t} else {\n\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\taddress_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t}\n\t\t\t}", "public abstract InetSocketAddress listeningAddress();", "java.lang.String getValidatorAddress();", "java.lang.String getValidatorAddress();", "public java.lang.String getAddress() {\n\t\t\t\t\tjava.lang.Object ref = address_;\n\t\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\t\taddress_ = s;\n\t\t\t\t\t\treturn s;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t\t}\n\t\t\t\t}", "public void createWorker(Worker worker){\n }", "public InetSocketAddress getLocalAddress() {\r\n return (InetSocketAddress) channel.localAddress();\r\n }", "private String seederAddress() {\n return CEBayHelper.GetRemoteActorRef(getSelf());\n }", "EndpointAddress getDestinationAddress();", "public SocketAddress getPeerName()\n throws IOException,IllegalArgumentException\n {\n getPeerNameNative();\n if (_remoteAddress == null) {\n return null;\n }\n InetAddress remoteIP = InetAddress.getByName (_remoteAddress);\n InetSocketAddress addr = new InetSocketAddress (remoteIP, _remotePort);\n return addr;\n }", "@Override public String brokerAddress() { return brokerAddress; }", "public Inet4Address assignNewIPAddress() {\n\t\tbyte[] rawNewAddr = Arrays.copyOf(subnetAddress.getAddress(), 4);\n\n\t\t//TODO find an available IP address and register it to usedAddresses\n\t\t//TODO hardcoding 256 assuming that mask == 24; all trying ones would be in this subnet\n\t\t// starting from 2 since 0 and 1 are assumed to be used already (for network and gateway)\n\t\tfor (int i = 2; i < 256; i++) {\n\t\t\trawNewAddr[3] = (byte) i;\n\t\t\tInet4Address newAddr;\n\n\t\t\ttry {\n\t\t\t\tnewAddr = (Inet4Address) Inet4Address.getByAddress(rawNewAddr);\n\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t// shouldn't happen\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!isAddressAlreadyRegistered(newAddr)) {\n\t\t\t\t//address not registered yet -> let's register\n\t\t\t\tusedAddresses.add(newAddr);\n\t\t\t\treturn newAddr;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n public String getIPAddress() {\r\n return address;\r\n }", "private String GetHostAddress() throws UnknownHostException {\n return Inet4Address.getLocalHost().getHostAddress();\n }", "public LocalSocketAddress getSockAddress() throws IOException {\n // This method has never been implemented.\n return null;\n }", "protected final static EndpointAddress mkAddress(String destPeer, String serv, String parm) {\r\n\r\n ID asID = ID.create(URI.create(destPeer));\r\n return mkAddress(asID, serv, parm);\r\n }", "private static InetAddress getLocalInetAddress() throws SocketException {\n // Before we connect somewhere, we cannot be sure about what we'd be bound to; however,\n // we only connect when the message where client ID is, is long constructed. Thus,\n // just use whichever IP address we can find.\n Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();\n while (interfaces.hasMoreElements()) {\n NetworkInterface current = interfaces.nextElement();\n if (!current.isUp() || current.isLoopback() || current.isVirtual()) {\n continue;\n }\n Enumeration<InetAddress> addresses = current.getInetAddresses();\n while (addresses.hasMoreElements()) {\n InetAddress addr = addresses.nextElement();\n if (!addr.isLoopbackAddress()) {\n return addr;\n }\n }\n }\n\n throw new SocketException(\"Can't get our ip address, interfaces are: \" + interfaces);\n }", "String getQueueManagerHost();", "@Option String getSimulinkAddress();", "public java.lang.String getRpcAddress() {\n java.lang.Object ref = rpcAddress_;\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 rpcAddress_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tInetSocketAddress remoteAddress();", "private String getPrefAddress() {\n\t\treturn mPreferences.getString( PREF_ADDR, DEFAULT_ADDR );\n\t}", "public java.lang.String getAddress() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.lang.String) __getCache(\"address\")));\n }", "public synchronized String getProxyAddress() {\n \n return this.address;\n }", "@Test\n\tpublic void testGetWorker() {\n\t\tInetSocketAddress address = InetSocketAddress.createUnresolved(\n\t\t\t\"localhost\", 1337);\n\t\tMockWorker worker = new MockWorker(address);\n\t\tWorkerLoadSnapshot instance = WorkerLoadSnapshot.newSnapshot(worker);\n\t\tassertSame(worker, instance.getWorker());\n\t}", "public InetAddress getAddress ()\n {\n return address;\n }", "public java.lang.String getBitcoinAddress() {\n java.lang.Object ref = bitcoinAddress_;\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 bitcoinAddress_ = s;\n }\n return s;\n }\n }", "public String getBindAddress() {\n return agentConfig.getBindAddress();\n }", "String getStartAddress();" ]
[ "0.6967113", "0.66437554", "0.6468692", "0.60706913", "0.6048389", "0.604805", "0.604805", "0.5996791", "0.59887975", "0.58810335", "0.58585554", "0.58344233", "0.5795183", "0.5795183", "0.5795183", "0.5795183", "0.5795183", "0.5795183", "0.57284576", "0.5703494", "0.5693232", "0.5693232", "0.56915957", "0.56815976", "0.5673517", "0.5665505", "0.56475234", "0.56396836", "0.56356853", "0.5622434", "0.5620599", "0.561879", "0.56113106", "0.56038374", "0.55982184", "0.55920166", "0.5587405", "0.55860037", "0.55367815", "0.5536454", "0.5522211", "0.55216587", "0.5511627", "0.546435", "0.545047", "0.5437198", "0.5437198", "0.5421072", "0.54117244", "0.5411249", "0.5411249", "0.5408058", "0.54018855", "0.53918284", "0.5387592", "0.5378343", "0.5351302", "0.5348778", "0.53433", "0.53414994", "0.53333336", "0.53333336", "0.5326765", "0.53186196", "0.5305945", "0.53026605", "0.5296248", "0.5293486", "0.52925503", "0.52925503", "0.52925503", "0.52920115", "0.5290887", "0.52879035", "0.5263972", "0.5263972", "0.5257601", "0.5239802", "0.52374357", "0.5228504", "0.5222631", "0.52212596", "0.5217132", "0.5208147", "0.52048826", "0.52026373", "0.5196807", "0.51947355", "0.51791775", "0.51709735", "0.5156724", "0.5155125", "0.5149563", "0.51478225", "0.51477927", "0.51412475", "0.51382", "0.5136627", "0.5131164", "0.5120765", "0.5119797" ]
0.0
-1
example function for using getAgentNode() and retrieving a list of all worker agents
private List<IAgentDescription> getMyWorkerAgents(int maxNum) { String nodeId = thisAgent.getAgentNode().getUUID(); return thisAgent.searchAllAgents(new AgentDescription(null, null, null, null, null, nodeId)).stream() .filter(a -> a.getName().startsWith("WorkerAgent")) .limit(maxNum) .collect(Collectors.toList()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<JavaAgent> getJavaAgents();", "List<AgentReference> getCurrentAgents();", "public java.util.List<org.biocatalogue.x2009.xml.rest.Agent> getAgentList()\r\n {\r\n final class AgentList extends java.util.AbstractList<org.biocatalogue.x2009.xml.rest.Agent>\r\n {\r\n public org.biocatalogue.x2009.xml.rest.Agent get(int i)\r\n { return AgentsResultsImpl.this.getAgentArray(i); }\r\n \r\n public org.biocatalogue.x2009.xml.rest.Agent set(int i, org.biocatalogue.x2009.xml.rest.Agent o)\r\n {\r\n org.biocatalogue.x2009.xml.rest.Agent old = AgentsResultsImpl.this.getAgentArray(i);\r\n AgentsResultsImpl.this.setAgentArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.biocatalogue.x2009.xml.rest.Agent o)\r\n { AgentsResultsImpl.this.insertNewAgent(i).set(o); }\r\n \r\n public org.biocatalogue.x2009.xml.rest.Agent remove(int i)\r\n {\r\n org.biocatalogue.x2009.xml.rest.Agent old = AgentsResultsImpl.this.getAgentArray(i);\r\n AgentsResultsImpl.this.removeAgent(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return AgentsResultsImpl.this.sizeOfAgentArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new AgentList();\r\n }\r\n }", "@Override\r\n\tpublic List<Agent> agentWhole() {\n\t\treturn agentMapper.agentWhole();\r\n\t}", "Agent getAgent();", "public Collection<String> getAgentsNames();", "ListWorkersResult listWorkers(ListWorkersRequest listWorkersRequest);", "public Set<Agent> getAllAgents() {\n return agents.keySet();\n }", "public org.biocatalogue.x2009.xml.rest.Agent[] getAgentArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List<org.biocatalogue.x2009.xml.rest.Agent> targetList = new java.util.ArrayList<org.biocatalogue.x2009.xml.rest.Agent>();\r\n get_store().find_all_element_users(AGENT$0, targetList);\r\n org.biocatalogue.x2009.xml.rest.Agent[] result = new org.biocatalogue.x2009.xml.rest.Agent[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public List<ServerWorker> getWorkerList()\n {\n return workerList;\n }", "void initAgents() {\n Runtime rt = Runtime.instance();\n\n //Create a container to host the Default Agent\n Profile p = new ProfileImpl();\n p.setParameter(Profile.MAIN_HOST, \"localhost\");\n //p.setParameter(Profile.MAIN_PORT, \"10098\");\n p.setParameter(Profile.GUI, \"false\");\n ContainerController cc = rt.createMainContainer(p);\n\n HashMap<Integer, String> neighbors = new HashMap <Integer, String>();\n neighbors.put(1, \"2, 4, 3\");\n neighbors.put(2, \"1, 3\");\n neighbors.put(3, \"1, 2, 4\");\n neighbors.put(4, \"1, 3, 5\");\n neighbors.put(5, \"4\");\n\n//Create a container to host the Default Agent\n try {\n for (int i = 1; i <= MainController.numberOfAgents; i++) {\n AgentController agent = cc.createNewAgent(Integer.toString(i), \"ru.spbu.mas.DefaultAgent\",\n new Object[]{neighbors.get(i)});\n agent.start();\n }\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic List<String> agentAllName() {\n\t\treturn agentMapper.agentAllName();\r\n\t}", "public Map<UUID, T> getJobs(UUID agentId) throws RemoteException;", "private static List<Employee> readWorkers(int arg) {\r\n\t\treturn WorkersLoader.readAllEmployyes(arg);\r\n\t}", "public List<Agente> getAllAgentes(){\r\n\t\treturn resAgenteDAO.getAllAgentes();\r\n\t}", "public java.util.List<com.appscode.api.ci.v1beta1.Agent> getAgentsList() {\n if (agentsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(agents_);\n } else {\n return agentsBuilder_.getMessageList();\n }\n }", "public ArrayList<String> AMSGetAllConnectedAgents() {\n ArrayList<String> res = new ArrayList<>();\n AMSAgentDescription list[];\n list = this.AMSQuery(\"\");\n for (AMSAgentDescription list1 : list) {\n res.add(list1.getName().getLocalName());\n }\n return res;\n }", "public List<WorkGroupDTO> getWorkGroupToAgent();", "public String getAgentsName()\n {\n return this.agentsName;\n }", "java.util.concurrent.Future<DescribeAgentsResult> describeAgentsAsync(DescribeAgentsRequest describeAgentsRequest);", "@Override\r\n\tpublic List<Map<String, Object>> agentActive() {\n\t\treturn agentMapper.agentActive();\r\n\t}", "public int\t\t\t\t\t\t\tgetAgentsCount()\t\t\t\t\t\t\t{ return this.agents; }", "public int getAgentsCount() {\n return agents_.size();\n }", "public java.util.List<? extends com.appscode.api.ci.v1beta1.AgentOrBuilder> \n getAgentsOrBuilderList() {\n if (agentsBuilder_ != null) {\n return agentsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(agents_);\n }\n }", "public java.util.List<com.appscode.api.ci.v1beta1.Agent> getAgentsList() {\n return agents_;\n }", "List<Agent> listEnrollmentAgentsHaveCredential();", "private String getAgentLista() {\n return agentLista;\n }", "org.beangle.security.session.protobuf.Model.Agent getAgent();", "java.util.List<io.netifi.proteus.admin.om.Node> \n getNodesList();", "public java.util.List<? extends com.appscode.api.ci.v1beta1.AgentOrBuilder> \n getAgentsOrBuilderList() {\n return agents_;\n }", "public List<Agent> listAgentNotMappedwithDevice();", "public int getNumberOfAgents()\n {\n return this.numberOfAgents;\n }", "public Agent getAgent() {\r\n\t\treturn this.AGENT;\r\n\t}", "public List<Agent> listAgentByAgentType(String code);", "public List<Product> getAgentProducts() {\n if (this.agentProducts == null) {\n this.agentProducts = Engine.getInstance()\n .parseUserAgent(getAgent());\n }\n return this.agentProducts;\n }", "public Agent getAgent() {\n\t\treturn agent;\n\t}", "private GRIDagent getTestAgent()\n {\n String agtID = \"testAgent001\",\n currentLink = \"401538273_2_r\", // 40963664_0 106292026_0 1to2 17005466_7_r\n currentIntrx = \"401538273_2_r\", // 1040921516 // 1to2\n destIntrx = \"17005466_7_r\"; // 72823276_0 99to99 24to25 401538273_2_r\n // 864162469 - 1400447055 99282649_0_r [72823276_0 problem link]\n\n GRIDagent myAgent = new GRIDagent(agtID,currentLink,currentIntrx,destIntrx, false, false);\n\n return myAgent;\n }", "ArrayList<Actor> getActors();", "java.lang.String getAgentName();", "public String getAgent() {\n return agent;\n }", "private static ArrayList<NameId> getAgentroles() {\n\t\tArrayList<NameId> modelList = new ArrayList<NameId>();\n\t\tif (CONSTANTS.agentroleNames().length != AccessControl.AGENT_ROLES.length) {Window.alert(\"AgentPopup getAgentroles()\");}\n\t\tfor (int i = 0; i < AccessControl.AGENT_ROLES.length; i++) {modelList.add(new NameId(CONSTANTS.agentroleNames()[i], String.valueOf(AccessControl.AGENT_ROLES[i])));}\n\t\treturn modelList;\n\t}", "public List<Agent> listAgentsByIdentiyNumber(String identityNumber);", "public interface NodeAdmin {\n\n /** Start/stop NodeAgents and schedule next NodeAgent ticks with the given NodeAgentContexts */\n void refreshContainersToRun(Set<NodeAgentContext> nodeAgentContexts);\n\n /** Update node admin metrics */\n void updateMetrics(boolean isSuspended);\n\n /**\n * Attempts to freeze/unfreeze all NodeAgents and itself. To freeze a NodeAgent means that\n * they will not pick up any changes from NodeRepository.\n *\n * @param frozen whether NodeAgents and NodeAdmin should be frozen\n * @return True if all the NodeAgents and NodeAdmin has converged to the desired state\n */\n boolean setFrozen(boolean frozen);\n\n /**\n * Returns whether NodeAdmin itself is currently frozen, meaning it will not pick up any changes\n * from NodeRepository.\n */\n boolean isFrozen();\n\n /**\n * Returns an upper bound on the time some or all parts of the node admin (including agents)\n * have been frozen. Returns 0 if not frozen, nor trying to freeze.\n */\n Duration subsystemFreezeDuration();\n\n /**\n * Stop all services on these nodes\n */\n void stopNodeAgentServices();\n\n /**\n * Start node-admin schedulers.\n */\n void start();\n\n /**\n * Stop the NodeAgents. Will not delete the storage or stop the container.\n */\n void stop();\n}", "public String getAgent() {\r\n\t\treturn agent;\r\n\t}", "org.jacorb.imr.HostInfo[] list_hosts();", "@Override\n public void startAgents(IOfflineMessageServer messageServer) {\n \n for (IAgentConfig agentConfig : this.agentConfigs) {\n OfflineAgentRunnable agentRunnable = new OfflineAgentRunnable(\n agentConfig.getAgentClass(), agentConfig.getAgentName(), messageServer);\n \n this.agentRunnables.add(agentRunnable); \n }\n \n for (OfflineAgentRunnable agentRunnable : this.agentRunnables) {\n agentRunnable.run(); \n }\n }", "public String getAgent() {\n return this.agent;\n }", "public List<Route> getRoutes() throws ExecutionException, InterruptedException {\n\n //Initialize variables\n List<Route> routes = new ArrayList<>();\n\n //Start backgroung thread and retrieve data\n ExecutorService executor = Executors.newSingleThreadExecutor();\n RoutesWorkerClass routeWorker = new RoutesWorkerClass();\n Future<List<Route>> futures = executor.submit(routeWorker);\n executor.shutdown();\n\n if (futures.get() != null) {\n routes = futures.get();\n }\n\n return routes;\n\n }", "public int getAgentsCount() {\n if (agentsBuilder_ == null) {\n return agents_.size();\n } else {\n return agentsBuilder_.getCount();\n }\n }", "List<Uuid> getTaskManagers(int numRequested) throws RemoteException;", "public List<Object[]> listAgentIdName();", "ListWorkerFleetsResult listWorkerFleets(ListWorkerFleetsRequest listWorkerFleetsRequest);", "public org.biocatalogue.x2009.xml.rest.Agent getAgentArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.Agent target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.Agent)get_store().find_element_user(AGENT$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "GetWorkerResult getWorker(GetWorkerRequest getWorkerRequest);", "private List<Node> getNodes() {\n List<Node> nodes = new ArrayList<Node>();\n NodeApi.GetConnectedNodesResult rawNodes =\n Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).await();\n for (Node node : rawNodes.getNodes()) {\n nodes.add(node);\n }\n return nodes;\n }", "protected abstract Simulate collectAgentData ();", "public void addAllAgents(Collection agents){\n Iterator itr = agents.iterator();\n while(itr.hasNext()){\n MonitorAgent agent = (MonitorAgent)itr.next();\n addAgent(agent);\n }\n }", "default Promise<List<String>> findHealthyNodes() {\n final Promise<List<String>> promise = Promises.promise();\n promise.resolve(Collections.emptyList());\n return promise;\n }", "public Integer getAgent() {\r\n return agent;\r\n }", "@Override\r\n\tpublic List<Map<String, Object>> agentDay(String agentname) {\n\t\treturn agentMapper.agentDay(agentname);\r\n\t}", "public NetworkInstance[] getServers();", "public Collection getThreads();", "public com.appscode.api.ci.v1beta1.Agent getAgents(int index) {\n return agents_.get(index);\n }", "public List<Agent> findAgentsInterne() {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') AND A.lastDirection IN(SELECT D.code FROM Direction D WHERE D.internExtern=?1) ORDER BY A.personne.name\");\n q.setParameter(1, InterneExterne.Interne);\n List<Agent> list = q.getResultList();\n return list;\n }", "@Test\r\n\tpublic void selectAgentsTest() {\r\n\t\tSet<AgentInfo> recentlyUsedAgents = getRecentlyUsedAgents();\r\n\t\thazelcastService.put(DIST_MAP_NAME_RECENTLY_USED_AGENTS, TEST_USER_ID, recentlyUsedAgents);\r\n\r\n\t\tUser testUser = new User();\r\n\t\ttestUser.setUserId(TEST_USER_ID);\r\n\r\n\t\tSet<AgentInfo> allFreeAgents = getFreeAgents();\r\n\t\tSet<AgentInfo> selectedAgents = agentService.selectAgent(testUser, allFreeAgents, 5);\r\n\r\n\t\tassertThat(selectedAgents.size(), is(5));\r\n\r\n\t\tList<AgentInfo> selectedDedicatedAgents = selectedAgents\r\n\t\t\t.stream()\r\n\t\t\t.filter(agentInfo -> StringUtils.isNotEmpty(agentInfo.getOwner()))\r\n\t\t\t.collect(toList());\r\n\t\tassertThat(selectedDedicatedAgents.size(), is(2));\r\n\r\n\t\t// Check if recently used agents are selected.\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-1\")));\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-3\")));\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-5\")));\r\n\r\n\t\t// Add recently used agents.\r\n\t\trecentlyUsedAgents.add(createAgentInfo(\"test-agent-11\", \"test-region\", TEST_USER_ID));\r\n\t\trecentlyUsedAgents.add(createAgentInfo(\"test-agent-14\", \"test-region\", TEST_USER_ID));\r\n\t\thazelcastService.put(DIST_MAP_NAME_RECENTLY_USED_AGENTS, TEST_USER_ID, recentlyUsedAgents);\r\n\r\n\t\t// Add owned agents for another test.\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-8\", \"test-region\", \"another-user\"));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-9\", \"test-region\", \"another-user\"));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-10\", \"test-region\", \"another-user\"));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-11\", \"test-region\", TEST_USER_ID));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-12\", \"test-region\", TEST_USER_ID));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-13\", \"test-region\", TEST_USER_ID));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-14\", \"test-region\", TEST_USER_ID));\r\n\t\tallFreeAgents.add(createAgentInfo(\"test-agent-15\", \"test-region\", TEST_USER_ID));\r\n\r\n\t\tselectedAgents = agentService.selectAgent(testUser, allFreeAgents, 3);\r\n\r\n\t\tassertThat(selectedAgents.size(), is(3));\r\n\t\t// Check if recently used owned agents are selected.\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-6\")));\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-11\")));\r\n\t\tassertTrue(selectedAgents.contains(createAgentInfo(\"test-agent-14\")));\r\n\r\n\t\thazelcastService.delete(DIST_MAP_NAME_RECENTLY_USED_AGENTS, TEST_USER_ID);\r\n\t}", "public ArrayList<AgentObject> getAllAgentDetailsFromDelphiClientWithEmail(String email) {\n try {\n Map<String, ArrayList> accountServiceMap = AccountsService.getInstance().getAccountDetailsObjectFromEmail(httpclient, email);\n if ((accountServiceMap.get(\"code\")) != null) {\n log.info(accountServiceMap.get(\"message\"));\n } else {\n ArrayList<String> meshIDs = accountServiceMap.get(\"mesh_ids\");\n if (meshIDs.size() != 0) {\n ArrayList<AgentObject> agentObjectList = DelphiService.getInstance().getAgentObjectListFromMeshId(httpclient, meshIDs.get(0));\n// AgentObject agentObject = getEachAgentDetailsFromAgentObjectList(agentObjectList);\n\n }\n }\n } catch (IndexOutOfBoundsException iob) {\n iob.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return agentObjectList;\n }", "public interface ComponentAgent extends QueryAgent{\r\n\t\r\n\t/**\r\n\t * get ID. of the component.\r\n\t * \r\n\t * @return ID or null if it hasn't.\r\n\t */\r\n\tString getId();\r\n\t\r\n\t/**\r\n\t * get UUID. of the component.\r\n\t * \r\n\t * @return UUID.\r\n\t */\r\n\tString getUuid();\r\n\t\r\n\t/**\r\n\t * get attribute by specify name.\r\n\t * \r\n\t * @param name\r\n\t * attribute name.\r\n\t * @return attribute value or null if not found or otherwise.\r\n\t */\r\n\tObject getAttribute(String name);\r\n\r\n\t/**\r\n\t * get children agents.\r\n\t * \r\n\t * @return always return a list of children (may be empty).\r\n\t */\r\n\tList<ComponentAgent> getChildren();\r\n\r\n\t/**\r\n\t * get child by specify index.\r\n\t * \r\n\t * @param index\r\n\t * @return child agent or null if index is out of boundary.\r\n\t */\r\n\tComponentAgent getChild(int index);\r\n\t\r\n\t/**\r\n\t * Returns the associated owner component of this agent\r\n\t * @return\r\n\t */\r\n\t<T extends Component> T getOwner();\r\n\r\n\t/**\r\n\t * Returns the first child, if any.\r\n\t * \r\n\t * @since 1.2.1\r\n\t * @return the first child agent or null.\r\n\t */\r\n\tComponentAgent getFirstChild();\r\n\t\r\n\t/**\r\n\t * Returns the last child, if any.\r\n\t * \r\n\t * @since 1.2.1\r\n\t * @return the last child agent or null.\r\n\t */\r\n\tComponentAgent getLastChild();\r\n\t\r\n\t/**\r\n\t * Returns the next sibling, if any. \r\n\t * \r\n\t * @since 1.2.1\r\n\t * @return the next sibling agent or null.\r\n\t */\r\n\tComponentAgent getNextSibling();\r\n\t\r\n\t/**\r\n\t * Returns the previous sibling, if any. \r\n\t * \r\n\t * @since 1.2.1\r\n\t * @return the previous sibling agent or null.\r\n\t */\r\n\tComponentAgent getPreviousSibling();\r\n\r\n\t/**\r\n\t * get parent agent.\r\n\t * \r\n\t * @return parent agent or null if this is root agent.\r\n\t */\r\n\tComponentAgent getParent();\r\n\r\n\t/**\r\n\t * get desktop agent this component belonged to.\r\n\t * \r\n\t * @return desktop agent.\r\n\t */\r\n\tDesktopAgent getDesktop();\r\n\r\n\t/**\r\n\t * get page agent this component belonged to.\r\n\t * \r\n\t * @return page agent.\r\n\t */\r\n\tPageAgent getPage();\r\n\t\r\n\t/**\r\n\t * Click on this component, A short cut of {@link ClickAgent#click()} <p/>\r\n\t * If this component doesn't support {@link ClickAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see ClickAgent\r\n\t */\r\n\tvoid click();\r\n\t\r\n\t/**\r\n\t * Type on this component, it is a short cut of {@link InputAgent#type(String)} <p/>\r\n\t * If this component doesn't support {@link InputAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see InputAgent\r\n\t */\r\n\tvoid type(String value);\r\n\t\r\n\t/**\r\n\t * Input to this component, it is a short cut of {@link InputAgent#input(Object)} <p/>\r\n\t * If this component doesn't support {@link InputAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see InputAgent\r\n\t */\r\n\tvoid input(Object value);\r\n\t\r\n\t/**\r\n\t * Focus this component, it is a short cut of {@link FocusAgent#focus()} <p/>\r\n\t * If this component doesn't support {@link FocusAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see FocusAgent\r\n\t */\r\n\tvoid focus();\r\n\t\r\n\t/**\r\n\t * Blur this component, it is a short cut of {@link FocusAgent#blur()} <p/>\r\n\t * If this component doesn't support {@link FocusAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see FocusAgent\r\n\t */\r\n\tvoid blur();\r\n\t\r\n\t/**\r\n\t * Check this component, it is a short cut of {@link CheckAgent#check(boolean)}<p/>\r\n\t * If this component doesn't support {@link CheckAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see CheckAgent\r\n\t */\r\n\tvoid check(boolean checked);\r\n\t\r\n\t/**\r\n\t * Stroke a key on this component, it is a short cut of {@link KeyStrokeAgent#stroke(String)}<p/>\r\n\t * If this component doesn't support {@link KeyStrokeAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see KeyStrokeAgent\r\n\t */\r\n\tvoid stroke(String key);\r\n\t\r\n\t/**\r\n\t * Select this component, it is a short cut of {@link SelectAgent#select()}<p/>\r\n\t * If this component doesn't support {@link SelectAgent}, it will throw exception.\r\n\t * @see #as(Class)\r\n\t * @see SelectAgent\r\n\t */\r\n\tvoid select();\r\n}", "@Override\r\n\tpublic List<Map<String, Object>> agentMarket(String agentname) {\n\t\treturn agentMapper.agentMarket(agentname);\r\n\t}", "public java.util.List<com.appscode.api.ci.v1beta1.Agent.Builder> \n getAgentsBuilderList() {\n return getAgentsFieldBuilder().getBuilderList();\n }", "public com.appscode.api.ci.v1beta1.Agent getAgents(int index) {\n if (agentsBuilder_ == null) {\n return agents_.get(index);\n } else {\n return agentsBuilder_.getMessage(index);\n }\n }", "public String getAgentName ()\n {\n return agentName;\n\n }", "private void countAgents(){\r\n\t\t\tfor(Agent agent : agents){\r\n\t\t\t\tif(agent.isActive()) activeAgent ++;\r\n\t\t\t\telse if(agent.getJailTerm() > 0) jailedAgent ++;\r\n\t\t\t\telse quietAgent ++;\r\n\t\t\t}\r\n\t\t}", "public DiscoveryAgent getDiscoveryAgent() {\n return discoveryAgent;\n }", "public List<NetworkNode> listNetworkNode();", "@Override\r\n\tpublic List<Map<String, Object>> dayAgent(int day) {\n\t\treturn agentMapper.dayAgent(day);\r\n\t}", "public static void main (String args[]) throws Exception{\n\t\t// 1. Before starting the nodes, manually create the registry with the rmiregistry command.\n\t\t// 2. Connect to the registry. Call getRegistry method of the NodeImplementation class on port registryPort.\n\t\t// 3. Register in the registry, notify the others that you've joined the network.\n\t\t// 4. If there are enough nodes have joined then start the algorithm.\n\t\t\n\t\tString myURL = args[0];\n\t\tint registryPort = Integer.parseInt(args[1]);\n\t\tint nodePort = Integer.parseInt(args[2]);\n\t\tString upstreamURL = args[3];\n\t\tString downstreamURL = args[4];\n//\t\tSystem.out.println(registryPort + \"\" + nodePort);\n\t\t// Create and install a security manager\n\t\tif (System.getSecurityManager() == null){\n\t\t\tSystem.setSecurityManager(new RMISecurityManager());\n\t\t}\n\t\tGSImplementation node = new GSImplementation(registryPort, nodePort, upstreamURL, downstreamURL, expectedNetworkSize, myURL);\n\t\tnode.notifyOthers();\n\t\tSystem.out.println(\"Waiting for the incoming messages...\");\n\t}", "public IDiogenAgent getHostAgent() {\n return this.hostAgent;\n }", "private Set<String> getWorkerQuorum(final List<AcceptableState> quorumConfiguration, final File lockDirectory) throws InterruptedException {\n final Set<String> workers = getWatcher().watchAndWait(lockDirectory, new Watcher.Watch<Set<String>>() {\n Set<String> workers = Sets.newHashSet();\n\n @Override\n public void changeNotify(Watcher watcher, File f) {\n workers.addAll(Lists.newArrayList(lockDirectory.list()));\n if (acceptable(this.getStart(), quorumConfiguration, workers)) {\n finish(workers);\n }\n }\n\n @Override\n public void timeoutNotify(Watcher watcher, File f) {\n log.error(\"Timed out during setup. Shouldn't happen.\");\n finish(null);\n }\n }, -1);\n\n if (workers == null || workers.size() == 0) {\n log.error(\"No workers available\");\n return Collections.emptySet();\n }\n return workers;\n }", "java.util.List<entities.Torrent.NodeSearchResult>\n getResultsList();", "List<String> getHosts();", "EdgeModulesClient getEdgeModules();", "protected AgentConfig getAgentConfig() {\n return agentConfig;\n }", "java.util.List<entities.Torrent.NodeId>\n getNodesList();", "List<Node> getNodes();", "WithMembers withExistingJobAgent(String resourceGroupName, String serverName, String jobAgentName);", "public List<ServerHardware> getServers();", "public int getWorkers() {\r\n return workers;\r\n }", "public com.appscode.api.ci.v1beta1.AgentOrBuilder getAgentsOrBuilder(\n int index) {\n return agents_.get(index);\n }", "java.util.List<com.google.cloud.compute.v1.AcceleratorConfig> getGuestAcceleratorsList();", "public List<byte[]> getAllActorInfo() {\n // Fetch a actor list with protobuf bytes format from GCS.\n synchronized (GlobalStateAccessor.class) {\n validateGlobalStateAccessorPointer();\n return this.nativeGetAllActorInfo(globalStateAccessorNativePointer);\n }\n }", "void setAgentListDialogWithAgentsList(List<String> agents);", "public List<Clients> getallClients();", "public List<Neighbour> getAvailableHosts() {\n return new ArrayList<>(routes.keySet());\n }", "private Agent getRecommenderFromNode()\n\t{\n\t\tMap<String,ComputationOutputBuffer> nodeInputs =\n\t\t\t\tcomputationNode.getInputs();\n\n\t\tAgent agent = new Agent();\n\t\tagent.setType(computationNode.getRecommenderClass());\n if (options == null) {\n \tOptionEdge optionEdge = (OptionEdge)\n \t\t\tnodeInputs.get(\"options\").getNext();\n nodeInputs.get(\"options\").block();\n options = new NewOptions(optionEdge.getOptions());\n }\n\t\tagent.setOptions(options.getOptions());\n\t\treturn agent;\n\t}", "public String getLocators() {\n return agentConfig.getLocators();\n }", "public ArrayList<AgentObject> getAllAgentDetailsFromDelphiClientWithMeshId(String meshId) {\n try {\n agentObjectList = DelphiService.getInstance().getAgentObjectListFromMeshId(httpclient, meshId);\n\n// AgentObject agentObject = getEachAgentDetailsFromAgentObjectList(agentObjectList);\n } catch (IndexOutOfBoundsException iob) {\n iob.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return agentObjectList;\n }", "public List<Agent> listOfAgentByArea(String servicePointCode);", "public String getAgentName() {\n return agentName;\n }", "T setJavaAgents(List<JavaAgent> javaAgents);", "public java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureNode.Builder> \n getNodeBuilderList() {\n return getNodeFieldBuilder().getBuilderList();\n }" ]
[ "0.6825142", "0.6550877", "0.63142145", "0.6306193", "0.60218024", "0.5992649", "0.59484977", "0.58506006", "0.5770537", "0.5766439", "0.57499546", "0.5671119", "0.563823", "0.5634647", "0.5629522", "0.56282413", "0.55224913", "0.5493111", "0.54637194", "0.54185843", "0.5401165", "0.5400148", "0.53810525", "0.53567696", "0.5327431", "0.53244317", "0.53179204", "0.53099227", "0.5280685", "0.52737224", "0.5223842", "0.52166164", "0.52156234", "0.5198707", "0.51972234", "0.51807755", "0.5180414", "0.5163661", "0.515801", "0.5155715", "0.5149874", "0.51471364", "0.5146123", "0.51289225", "0.51243293", "0.5112079", "0.51105064", "0.5107928", "0.50973", "0.50885224", "0.5084571", "0.50718015", "0.50501597", "0.50399864", "0.50384253", "0.50342983", "0.50129277", "0.5006746", "0.49990422", "0.49926803", "0.49844578", "0.4969649", "0.4950853", "0.4947024", "0.49458978", "0.49433678", "0.49418917", "0.49287522", "0.49279585", "0.49243537", "0.4918863", "0.49173927", "0.49120668", "0.49111208", "0.49073327", "0.4902136", "0.489868", "0.4879286", "0.48785144", "0.4876325", "0.48628354", "0.48620093", "0.48611262", "0.48566583", "0.48491883", "0.48444334", "0.48346087", "0.4832874", "0.4829858", "0.48296043", "0.48288342", "0.48224118", "0.4819871", "0.4816308", "0.48146296", "0.481078", "0.48067403", "0.4803376", "0.48030075", "0.47997832" ]
0.67737705
1
example function to send messages to other agents
private void sendMessage(ICommunicationAddress receiver, IFact payload) { Action sendAction = retrieveAction(ICommunicationBean.ACTION_SEND); JiacMessage message = new JiacMessage(payload); invoke(sendAction, new Serializable[] {message, receiver}); System.out.println("BROKER SENDING " + payload); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void send(Message msg);", "void sendMessage(String msg);", "public void message(String from,String msg,String to);", "void sendMessage() {\n\n\t}", "private void sendMessage(String content, String room) {\n }", "public boolean message( Who sender, Message msg ) throws Exception;", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "public void sendMessage(String message) {}", "void sendTo(String from, String to, String m_id);", "void send(String message);", "public void sendMsg(String address, String title, String content);", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "public void send(Address from, String message);", "public void sendMessage(String message);", "@Override\n\tpublic void send(String msg) {\n\t}", "public void sendMessage() {\n\t\tString myPosition=this.agent.getCurrentPosition();\n\t\tif (myPosition!=null){\n\t\t\t\n\t\t\tList<String> wumpusPos = ((CustomAgent)this.myAgent).getStenchs();\n\t\t\t\n\t\t\tif(!wumpusPos.isEmpty()) {\n\t\t\t\tList<String> agents =this.agent.getYellowpage().getOtherAgents(this.agent);\n\t\t\t\t\n\t\t\t\tACLMessage msg=new ACLMessage(ACLMessage.INFORM);\n\t\t\t\tmsg.setSender(this.myAgent.getAID());\n\t\t\t\tmsg.setProtocol(\"WumpusPos\");\n\t\t\t\tmsg.setContent(wumpusPos.get(0)+\",\"+myPosition);\n\t\t\t\t\n\t\t\t\tfor(String a:agents) {\n\t\t\t\t\tif(this.agent.getConversationID(a)>=0) {\n\t\t\t\t\t\tif(a!=null) msg.addReceiver(new AID(a,AID.ISLOCALNAME));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.agent.sendMessage(msg);\n\t\t\t\tthis.lastPos=myPosition;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "void send();", "public void send(String destination, String message, String identifier){\n return;\n }", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "public abstract void sendToChain(String mesg);", "@Override\n\tpublic void sendMsg(String msg) {\n\n\t}", "@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}", "public void sendMessage(String[] messages) {}", "protected void sendMessage() throws IOException {\r\n\t\tif (smscListener != null) {\r\n\t\t\tint procCount = processors.count();\r\n\t\t\tif (procCount > 0) {\r\n\t\t\t\tString client;\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tlistClients();\r\n\t\t\t\tif (procCount > 1) {\r\n\t\t\t\t\tSystem.out.print(\"Type name of the destination> \");\r\n\t\t\t\t\tclient = keyboard.readLine();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(0);\r\n\t\t\t\t\tclient = proc.getSystemId();\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tif (proc.getSystemId().equals(client)) {\r\n\t\t\t\t\t\tif (proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"Type the message> \");\r\n\t\t\t\t\t\t\tString message = keyboard.readLine();\r\n\t\t\t\t\t\t\tDeliverSM request = new DeliverSM();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trequest.setShortMessage(message);\r\n\t\t\t\t\t\t\t\tproc.serverRequest(request);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sent.\");\r\n\t\t\t\t\t\t\t} catch (WrongLengthOfStringException e) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sending failed\");\r\n\t\t\t\t\t\t\t\tevent.write(e, \"\");\r\n\t\t\t\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\t\t\t} catch (PDUException pe) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"This session is inactive.\");\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} else {\r\n\t\t\t\tSystem.out.println(\"No client connected.\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "void messageSent();", "public void sendMessage ( UUID sender , String message ) {\n\t\texecute ( handle -> handle.sendMessage ( sender , message ) );\n\t}", "public void sendTo(P2PUser dest, Object msg) throws IOException;", "public void sendMessage2Client(String msg){\n\t\t\t\n\t\t\toutPrintStream.println(msg);\n\t\t\t\n\t\t}", "private void sendMessageToAll(String message){\n for(Session s : sessions){\n try {\n s.getBasicRemote().sendText(message);\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }", "public void sendMessageToClient(Object message, String username) {\n\n }", "private void sendGMToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n try{\r\n //Get the client's ObjectOutputStream\r\n ObjectOutputStream oos = ch.getOOS();\r\n //Print the message to the client\r\n oos.writeObject(new DataWrapper(0, msg, true));\r\n } catch(IOException ioe) {\r\n System.out.println(\"IOException occurred: \" + ioe.getMessage());\r\n ioe.printStackTrace();\r\n }\r\n }\r\n }", "public void sendTurno() throws RemoteException, InterruptedException, IOException ;", "public void send(String raw_msg, AbstractVisitor sender) {\n\n for(AbstractVisitor user : users) {\n if(sender != user) {\n user.receive(\"From \" + sender.getName() + \" to \" + user.getName() + \": \" + raw_msg);\n }\n }\n\n }", "public void sendMessage ( UUID sender , String... messages ) {\n\t\texecute ( handle -> handle.sendMessage ( sender , messages ) );\n\t}", "void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Não foi possível enviar a mesagem !!!\");\n\t\t}\n\t}", "public void sendMsg(Message msg){\n messagesParser.sendMsg(msg);\n }", "@Override\n public void sendMessage(Message m) {\n commSender.sendMessage(m);\n }", "@Override\n public void sendMessage(String to, String content)\n {\n if (to.equals(\"all\"))\n {\n agent.sendBroadcast(content);\n return;\n }\n agent.sendMessage(to, content);\n }", "private void sendCommand(int recipient, int action) {\r\n\t\tString command = \"*\" + recipient + \";\" + action + \";\" + \"0\" + \";\" + \"0\"\r\n\t\t\t\t+ \"#\";\r\n\t\tlogger.debug(\"Sende Kommando\");\r\n\t\tcom.sendString(command);\r\n\t\tlogger.debug(\"Senden des Kommandos beendet\");\r\n\t}", "public void send() {\n\t}", "@Test\n public void actorShouldProcessAllMessages() {\n ActorRef ref1 = system.actorOf(MyTestActor.class);\n\n Actor act = ((MyTestActorSystem)system).giveMeActor(ref1);\n\n ((MyTestActor)act).setRefAs((AbsActorSystem)system);\n\n for (int i = 0; i < 2000; i++) {\n ref1.send(new TrivialMessage(), ref1);\n }\n\n system.stop(ref1);\n\n // messaggi spediti all'attore effettivamente aggiunti alla sua mailBox\n int sendM = ((MyTestActorSystem)system).getNumSendMessages();\n // messaggi presenti nella mailBox dell'attore che sono stati processati\n int reciveM = ((MyTestActorSystem)system).getRecivedMessage();\n\n Assert.assertEquals(\"Devono essere processati tutti i messaggi effettivamente spediti\", sendM, reciveM);\n\n }", "public void send(){ \n\t\tserverAddress=tfTxtIpServer.getText();\n\t\tserverPort=\"3232\";\n\t\ttext=tfTxtMsg.getText();\n try{\n\t\t\t// get the \"registry\"\n registry=LocateRegistry.getRegistry(\n serverAddress,\n (new Integer(serverPort)).intValue()\n );\n\t\t // look up the remote object\n rmiServer=(ReceiveMessageInterface)(registry.lookup(\"rmiServer\"));\n\t\t\t// call the remote method\n rmiServer.receiveMessage(text);\n }\n catch(RemoteException e){\n e.printStackTrace();\n }\n catch(NotBoundException e){\n e.printStackTrace();\n } \n }", "public long message(User from, String msg) throws RemoteException;", "@Override\n\tpublic void run(String... args) throws Exception {\n\t\tsender.send();\n\t\tsender.send(123);\n\t}", "void send() throws ImsException;", "public Reply sender(String senderText) throws ThingsException, InterruptedException;", "@Override\n\tpublic void SendMessage(String message) {\n\t\t\n\t\ttry\n\t\t{\n\t\tprintWriters.get(clients.get(0)).println(message);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}", "public abstract void sendMessage(String message);", "public void sendMessage(int value, String uname, String msg) {\n\t\t\tif (value == 1) {\n\t\t\t\toutput.println(uname + \" : \" + msg);\n\t\t\t} else if (value == 3) {\n\t\t\t\toutput.println(\"Server: The User \" + msg + \" does not Exis!!\");\n\t\t\t} else if (value == 5) {\n\t\t\t\toutput.println(\"Server: Private Message to yourself!\");\n\t\t\t} else {\n\t\t\t\toutput.println(uname + \"(Private)\" + \" : \" + msg);\n\t\t\t}\n\t\t}", "public void broadcastmsg(String msg){\r\n Server.getUsers().forEach((user) -> {\r\n user.sendmsg(msg);\r\n });\r\n }", "private void sendMessage() {\n\n // Get the right Prefix\n String prefix = null;\n\n if ( !messageGroup.getPrefix().equalsIgnoreCase(\"\") ) {\n prefix = messageGroup.getPrefix();\n } else {\n prefix = Announcer.getInstance().getConfig().getString(\"Settings.Prefix\");\n }\n\n Announcer.getInstance().getCaller().sendAnnouncment( messageGroup, prefix, counter);\n\n counter();\n\n }", "protected void sendMessage(String addr, Object[] args) {\n\t\ttry {\n\t\t\t_sender.send(args == null ? new OSCMessage(addr) : new OSCMessage(\n\t\t\t\t\taddr, args));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void sendMsg(String msg) {\n if (this.server.getOwnClientName().equals(username)) {\n StringJoiner joiner = new StringJoiner(Constants.MSG_DELIMETER);\n joiner.add(MsgType.UNICAST.toString());\n joiner.add(msg);\n toClient.println(joiner.toString());\n }\n }", "@Override\n public void action() {\n ACLMessage acl = blockingReceive();\n System.err.println(\"Hola, que gusto \" + acl.getSender() + \", yo soy \" + getAgent().getName());\n new EnviarMensaje().enviarMensajeString(ACLMessage.INFORM, \"Ag4\", getAgent(), \"Hola agente, soy \" + getAgent().getName(),\n \"COD0001\");\n }", "public void receberMensagem(String msg);", "@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.513 -0500\", hash_original_method = \"9DAC7AFA4C14A1022E9DEC304018391F\", hash_generated_method = \"B2E7772166FCACAF852F55F44CB46D51\")\n \npublic void sendMessage(Message msg) {\n msg.replyTo = mSrcMessenger;\n try {\n mDstMessenger.send(msg);\n } catch (RemoteException e) {\n replyDisconnected(STATUS_SEND_UNSUCCESSFUL);\n }\n }", "protected abstract void send(final IMessageWrapper message, final ISender sender);", "private void sendToAll(String msg){\r\n for(ClientHandler ch: clientThreads){\r\n try{\r\n //Get the client's ObjectOutputStream\r\n ObjectOutputStream oos = ch.getOOS();\r\n //Print the message to the client\r\n oos.writeObject(new DataWrapper(DataWrapper.STRINGCODE, msg, false));\r\n } catch(IOException ioe) {\r\n System.out.println(\"IOException occurred: \" + ioe.getMessage());\r\n ioe.printStackTrace();\r\n }\r\n }\r\n }", "protected void sendMessage(String msg) {\n message = msg; \n newMessage = true;\n }", "void send(Runnable msg);", "@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }", "@Test\n public void testSend() throws Exception {\n//TODO: Test goes here...\n message.send(\"hello\", \"Bob\");\n }", "static void sendMsg(String msg){\r\n for(ServerThread t: threads){\r\n t.sendMsgToClient(msg);\r\n }\r\n }", "public void sendMessage(Message msg) {\n network.sendAsync(msg);\n }", "public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }", "public void sendmessage(String recipients,String message){\n String username = \"tolclin\";\n String apiKey = \"a134b86cef192b3e597957d96fe486f6dd887ba4592ecf31ed737c2f1407b348\";\n // Specify the numbers that you want to send to in a comma-separated list\n // Please ensure you include the country code (+254 for Kenya in this case)\n //String recipients = \"+254723095840\";--------------------was active\n // And of course we want our recipients to know what we really do\n //String message = \"We are tolclin IT. We code all day and sleep all night\";--------------was active\n // Create a new instance of our awesome gateway class\n AfricasTalkingGateway gateway = new AfricasTalkingGateway(username, apiKey);\n /*************************************************************************************\n NOTE: If connecting to the sandbox:\n 1. Use \"sandbox\" as the username\n 2. Use the apiKey generated from your sandbox application\n https://account.africastalking.com/apps/sandbox/settings/key\n 3. Add the \"sandbox\" flag to the constructor\n AfricasTalkingGateway gateway = new AfricasTalkingGateway(username, apiKey, \"sandbox\");\n **************************************************************************************/\n // Thats it, hit send and we'll take care of the rest. Any errors will\n // be captured in the Exception class below\n try {\n JSONArray results = gateway.sendMessage(recipients, message);\n //JOptionPane.showMessageDialog(null, \"Message Sent Successfully...\");\n// for( int i = 0; i < results.length(); ++i ) {\n// JSONObject result = results.getJSONObject(i);\n// //System.out.print(result.getString(\"status\") + \",\"); // status is either \"Success\" or \"error message\"\n// System.out.print(result.getString(\"statusCode\") + \",\");\n// System.out.print(result.getString(\"number\") + \",\");\n// System.out.print(result.getString(\"messageId\") + \",\");\n// System.out.println(result.getString(\"cost\"));\n// \n// }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null,\"Encountered an error while sending. Check on your internet connection...\");\n }\n }", "void sendMessage(String pid,String cmd,MintReply mr,int flags)\n{\n sendMessage(pid,cmd,null,mr,flags);\n}", "public void MessageInvitCommand(String msg)\n {\n System.out.println(\"> \"+msg);\n }", "private void sendHelloMessage(String uName){\n HelloMessage hello = new HelloMessage(uName);\n ni.performSendHello(hello);\n Logger.log(\"Sending Hello to everyone \");\n\n }", "private void sendMessage(ChatMessage msg) {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to client => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "private void sendMessage(Space jSpace, int playerID, String msg) throws InterruptedException {\n\t\tsendHeader(jSpace, playerID, ServerCommands.message);\n\t\tjSpace.put(playerID, msg);\n\t}", "public void sendMessage(String content, String toUser) throws IOException, BadLocationException{\r\n\t\tdataSending.sendMessage(content, toUser);\r\n\t\tuserModel.getArchive().getArchiveWriter().addNewTalk(toUser,\"Messeage sent to user\" +toUser + System.lineSeparator() + content);\r\n\t\tclientView.addNewMesseage(content, \"sent to user: \"+toUser);\r\n\t\t\r\n\t}", "public static void privateMessage(Player fromPlayer, Player toPlayer, String[] message) {\n PlayerDataObject fromPDO = PlayerManager.getPlayerDataObject(fromPlayer);\n PlayerDataObject toPDO = PlayerManager.getPlayerDataObject(toPlayer);\n //target.sendMessage(ChatColor.DARK_GRAY + \"[\" + player.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n //player.sendMessage(ChatColor.DARK_GRAY + \"[You > \" + target.getDisplayName() + ChatColor.DARK_GRAY + \"]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n ComponentBuilder toComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[\" + fromPDO.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]\" + ChatColor.WHITE + \":\");\n toComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + fromPDO.getPlainNick()).create()));\n toComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + fromPDO.getName() + \" \"));\n toComp.append(\" \").reset();\n \n ComponentBuilder fromComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[You > \" + toPDO.getDisplayName() + ChatColor.DARK_GRAY + \"]\" + ChatColor.WHITE + \":\");\n fromComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + toPDO.getPlainNick()).create()));\n fromComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + toPDO.getName() + \" \"));\n fromComp.append(\" \").reset();\n \n TextComponent messageComp = new TextComponent();\n for (String part : message) {\n if (part.matches(\"^.*(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|].*$\")) {\n messageComp.addExtra(assembleURLComponent(part));\n messageComp.addExtra(\" \");\n } else {\n messageComp.addExtra(part + \" \");\n }\n }\n \n BaseComponent[] toMSG = toComp\n .append(messageComp)\n .create();\n BaseComponent[] fromMsg = fromComp\n .append(messageComp)\n .create();\n \n toPDO.sendMessageIf(toMSG);\n fromPDO.sendMessageIf(fromMsg);\n }", "void send(IMessage message, IChannel channel);", "@Override\n\tpublic void messageReceived(IoSession session, Object message) throws Exception {\n\t\t\n\t\tSmsObject sms = (SmsObject) message;\n\t\t//log.info(\"The message is [\" + sms.getMessage() + \"]\");\n\n\t\t/*\n\t\t * other operate\n\n\t\tSystem.out.println(\"================================================\");\n\t\tSystem.out.println(\"Data From : \" + session.getRemoteAddress());\n\t\tSystem.out.println(\"Receiver : [\" + sms.getReceiver() + \"]\");\n\t\tSystem.out.println(\"Data Type : [\" + sms.getDataType() + \"]\");\n\t\tSystem.out.println(\"Data Receiver : [\" + sms.getDataReceiver() + \"]\");\n\t\tSystem.out.println(\"Data Sender : [\" + sms.getDataSender() + \"]\");\n\t\tSystem.out.println(\"Data : [\" + sms.getData() + \"]\");\n\t\tSystem.out.println(\"================================================\");\n\t\t\n\t\t * */\t\n\t\t\n\t\t//The processing of registration information \n\t\tInteger i = new Integer(255);\n\t\tif( i.equals(sms.getReceiver()) &&\n\t\t\ti.equals(sms.getDataType()) &&\n\t\t\ti.equals(sms.getDataReceiver()) &&\n\t\t\ti.equals(sms.getDataSender())) {\n\t\t\t\n\t\t\tcli.addCli(session, sms.getData());\n\t\t\tSystem.out.println(\"Client : \" + session.getRemoteAddress() + \" DONE\");\n\t\t} else {\n\t\t\t//Forwarding\n\t\t\tArrayList<IoSession> tempList = new ArrayList<IoSession>();\n\t\t\ttempList = cli.getCli(sms.getReceiver());\n\t\t\t\n\t\t\tSystem.out.println(\"tempting=======>\" + session.getRemoteAddress() + \" with receiver : \" + sms.getReceiver());\n\t\t\tif(tempList != null) {\n\t\t\t\t//System.out.println(\"true\");\n\t\t\t\tfor (IoSession session1 : tempList){\n\t\t\t\t\tSystem.out.println(\"Send =========>\" + session1.getRemoteAddress());\n\t\t\t\t\tsession1.write(sms);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"================================================\");\n\t\t\t}\n\t\t\telse System.out.println(\"forwarding false\");\n\t\t}\n\t\t\n\t\t//Trigger the client\n\t\tsms.setReceiver(i);\n\t\tsms.setDataType(i);\n\t\tsms.setDataReceiver(i);\n\t\tsms.setDataSender(i);\n\t\tsms.setData(\" \");\n\t\tsession.write(sms);\n\n\t}", "public abstract void send(String data, String toAddress);", "public void communicate() {\n // Send\n for (int i = 0; i < robots.length; i++) {\n if (i != this.id) {\n if (objectFound) {\n System.out.println(\"Robot \" + this.id + \": Telling everyone else...\");\n this.robots[i].mailbox[i] = new Message(this.id, this.objectFound, goal);\n } else {\n this.robots[i].mailbox[i] = new Message(this.id, this.objectFound, null);\n }\n }\n }\n // Read\n for (int i = 0; i < mailbox.length; i++) {\n if (i != this.id && mailbox[i] != null && mailbox[i].objectFound) {\n this.objectFound = true;\n this.goal = mailbox[i].objectLocation;\n }\n }\n }", "public void sendMessage(String msg) {\n Player player = RegionOwn.server.getPlayer(name);\n if (player != null) {\n player.sendMessage(msg);\n } else if (RegionOwn.pm.isPluginEnabled(\"TextPlayer\")) {\n User user = TextPlayer.findUser(name);\n user.sendText(\"Region Security System\", msg);\n }\n }", "private void broadcast(String msg) {\n\t\tfor (PrintWriter out : clients) {\n\t\t\tout.println(msg);\n\t\t\tout.flush();\n\t\t}\n\t}", "private <T extends QMessage> void sendTestMsg(T msg) {\n\n\t\ttry {\n\t\t\tString token = KeycloakUtils.getAccessToken(\"http://keycloak.genny.life\", \"genny\", \"genny\",\n\t\t\t\t\t\"056b73c1-7078-411d-80ec-87d41c55c3b4\", \"user1\", \"password1\");\n\t\t\tmsg.setToken(token);\n\n\t\t\t/* get the bridge url to publish the message to webcmd channel */\n\t\t\tString bridgetUrl = ENV_GENNY_BRIDGE_URL + \"/api/service?channel=webdata\";\n\n\t\t\tQwandaUtils.apiPostEntity(bridgetUrl, JsonUtils.toJson(msg), token);\n\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}", "public void sendToManager(){\n String receiveMessage;\n while((receiveMessage=receiveFrom(messageReader)) != null){\n manager.manage(receiveMessage);\n }\n }", "public void sendMessage ( String... messages ) {\n\t\texecute ( handle -> handle.sendMessage ( messages ) );\n\t}", "public void sendMessage(NetMessage message) {\n ClientDirector.getDataManager().sendMessage(message);\n }", "void messageSent(IMSession session, String messageId);", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to server => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "public interface ProvaAgent {\n\n void receive(ProvaList terms) throws Exception;\n\n void send(String dest, ProvaList terms) throws Exception;\n\n String getAgentName();\n\n}", "private void sendSMS(String msg) {\n SmsManager smsManager = SmsManager.getDefault();\n for (String destinationAddress : destinationAddresses) {\n smsManager.sendTextMessage(\n destinationAddress,\n null,\n msg,\n null,\n null\n );\n }\n }", "public void sendChat(String client, String message) {\n\t\t//enqueue(\"PRIVMSG #\"+myself+\" :.w \"+client + \" imGlitch \" + message); //whisper\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch (@\"+client + \") \" + message);\n\t}", "public void sendMessage(String msg, int client) throws Exception{\n \tlastMessageSent = new String(msg);\n \tif(client == Constants.ROBOT){\n \t\trobotHandler.sendMessage(msg);\n \t} else {\n \t\tHumanClientHandler.sendMessage(msg);\n \t}\n }", "public void broadcast(Object msg);", "@Override\n public void sendMessage(Token token) throws JSimSecurityException, JSimInvalidParametersException {\n double random_number = uniform(0.5, 2.5);\n switch((int) Math.round(random_number)){\n //Notificar\n case 1:{\n //this.PE9.receiveMessage(token);\n System.out.println(\"** Enviando mensaje desde PE7 hacia PE9\");\n token.setSender(this.getName());\n token.setPosting(\"PE9\");\n JSimLink link = new JSimLink(token);\n link.into(this.getProcessor().getQueue());\n break;\n }\n //Llamar a emergencias\n case 2:{\n //this.PE8.receiveMessage(token);\n System.out.println(\"** Enviando mensaje desde PE7 hacia PE8\");\n token.setSender(this.getName());\n token.setPosting(\"PE8\");\n JSimLink link = new JSimLink(token);\n link.into(this.getProcessor().getQueue());\n break;\n }\n \n }\n \n }", "public static void sendAction(Action act, String hubAddress, Context c) {\n try {\n \t// Loading my identity from preferences\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(c);\n\n // for saving the last time the device sent a message to any device\n SharedPreferences.Editor editor = sharedPref.edit();\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tString curTime = sdf.format(calendar.getTime());\n\t\t\teditor.putString(\"lastDeviceMsg\", curTime);\n\t\t\teditor.commit();\n\n\t\t\tString myIdentity = sharedPref.getString(\"my_identity\", \"\");\n \tact.addArgument(\"fromUser\", myIdentity);\n \t\n \tString msg = serializeAction(act);\n \n \tIntent i = new Intent(c, GenericService.class);\n \n i.setAction(Constants.SEND_MSG_INTENT);\n i.putExtra(\"action\", msg); // msgTextToSend\n i.putExtra(\"hub_address\", hubAddress);\n \n Log.v(\"Helper\", \"Sending: \" + msg + \"To: \" + hubAddress);\n \n c.startService(i);\n } catch(Exception e) {\n \tLog.e(\"sendAction\", \"Something goofy:\" + e.getMessage());\n }\n\t}", "void sendMessageToTarget(@ParamName(\"message\") String message);", "@FXML\n private void sendMessage(ActionEvent actionEvent) {\n String playerName = RiskMain.getInstance().getDomain().getPlayerName();\n System.out.println(messageInput.getText());\n String text = playerName + \": \" + messageInput.getText();\n if (RiskMain.getInstance().getDomain().isServer()) {\n this.serverInterface = RiskMain.getInstance().getDomain().getServer();\n this.serverInterface\n .sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n } else {\n this.clientPlayerInterface = RiskMain.getInstance().getDomain().getClient();\n this.clientPlayerInterface.sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n }\n }", "void sendMulticast(String message);", "public abstract void message(String channel, String message);", "public void action(BotInstance bot, Message message);", "@Test\n public void whenSendOtherMessageThenOracleDontUnderstand() {\n this.testClient(\n Joiner.on(LN).join(\n \"Hello, dear friend, I'm a oracle.\",\n \"\",\n \"I don't understand you.\",\n \"\",\n \"\"\n ),\n Joiner.on(LN).join(\n \"Hello oracle\",\n \"How're you?\",\n \"Exit\",\n \"\"\n )\n );\n }", "public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }" ]
[ "0.7351372", "0.7151302", "0.7140463", "0.7016317", "0.69483346", "0.6941165", "0.6930654", "0.68461466", "0.68215364", "0.68182606", "0.68144363", "0.6811061", "0.67776716", "0.6746597", "0.6732765", "0.6693555", "0.6684653", "0.66777724", "0.6674068", "0.66672856", "0.6662886", "0.66462636", "0.6613505", "0.6591309", "0.6580311", "0.65677565", "0.6543737", "0.6541303", "0.65367275", "0.65357757", "0.6510415", "0.6506363", "0.6502802", "0.6484797", "0.64785045", "0.6476182", "0.64651513", "0.646406", "0.64609873", "0.64556164", "0.6444801", "0.64372015", "0.6435212", "0.64308345", "0.6429161", "0.6408464", "0.6405032", "0.6404939", "0.64015794", "0.6397246", "0.6389401", "0.6383113", "0.63783276", "0.6378064", "0.6378054", "0.63543606", "0.6335558", "0.6331914", "0.63292813", "0.6327603", "0.6323581", "0.63115007", "0.63035697", "0.63017344", "0.63015616", "0.63012254", "0.6299805", "0.6298775", "0.6294254", "0.6293971", "0.6287044", "0.62829554", "0.6281052", "0.6271275", "0.62637043", "0.62627655", "0.6260935", "0.62608725", "0.6249063", "0.62476355", "0.62437564", "0.62411416", "0.62385285", "0.62330544", "0.62247103", "0.6222029", "0.6222022", "0.62176496", "0.6217439", "0.6212709", "0.6208548", "0.62084234", "0.6203458", "0.6202116", "0.6198531", "0.6197123", "0.6190213", "0.6183791", "0.6182378", "0.61806846" ]
0.626663
74
you cannot have more than 1 public class public class has the same name as a file
public static void main(String[] args) { System.out.println("Class 1"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getClassName(String fileName){\n String className = FilenameUtils.getBaseName(fileName);\n return className;\n }", "private static boolean isClassFile(WebFile aFile)\n {\n String path = aFile.getPath();\n if (!path.endsWith(\".class\"))\n return false;\n if (isIgnorePath(path))\n return false;\n return true;\n }", "private static String getClassNameForClassFile(WebFile aFile)\n {\n String filePath = aFile.getPath();\n String filePathNoExtension = filePath.substring(1, filePath.length() - 6);\n String className = filePathNoExtension.replace('/', '.');\n return className;\n }", "protected JBuilderRenameClassRefactoring()\n\t{\n\t\tsuper();\n\t}", "private void readClasses(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t for (Class javaClass : SB_ClassMap.getBaseJavaClasses()) {\r\n\t addJavaClass(book, javaClass.getSimpleName(), javaClass.getName());\r\n\t }\r\n\t \r\n\t List<String> importedClasses = _dataModel.getJavaScript().getImportedJavaClasses();\r\n\t\tfor( String javaClassName : importedClasses) {\r\n\t\t\tString classPackage = javaClassName;\r\n\t\t\tString className = javaClassName.substring(javaClassName.lastIndexOf('.') + 1);\r\n\t\t\taddJavaClass(book, className, classPackage);\r\n\t }\r\n\t\t\r\n\t\t//Now that all classes read in, convert class descriptions\r\n\t\ttry\r\n\t\t{\r\n\t\t book.getUserClassMap().convertClassDescriptions(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex)\r\n\t\t{\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t}", "private void checkClassName(String className) throws ClassNotFoundException {\n StringTokenizer tokenizer = new StringTokenizer(className, \".\");\n boolean first = true;\n while (tokenizer.hasMoreTokens()) {\n String token = tokenizer.nextToken();\n // Each dot-separated piece must be a valid identifier\n // and the first token can also be \"*\". (Note that\n // numeric class ids are not permitted. They must\n // match a loaded class.)\n if (!Utils.isJavaIdentifier(token) && !(first && token.equals(\"*\"))) {\n throw new ClassNotFoundException();\n }\n first = false;\n }\n }", "public OOP_207(){\n\n }", "private String checkName(String filename,int start_off){\n String name=FilenameUtil.setForwardSlash(filename);\n\n // check that it is a possibility\n if(name==null || name.length()<=0) return null;\n if(name.indexOf(matchname)<0) \n if( name.indexOf( matchname1) < 0) return null;\n if(! name.endsWith(\".class\") ) return null;\n if(name.indexOf(\"$\")>name.lastIndexOf(\"/\")) return null;\n \n // chop off the class part\n name=name.substring(start_off,name.length()-6);\n name=name.replace('/','.');\n \n return name;\n }", "private void classDeclaration(Modifier modifier, Scope scope, String basename)\r\n {\r\n Vector queue = new Vector();\r\n HashSet dummy = unresolved;\r\n ClassType x = new ClassType();\r\n unresolved = x.unresolved;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n }\r\n\r\n matchKeyword(Keyword.CLASSSY);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n x.name = nextToken;\r\n\r\n //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0)\r\n // modifier.access &= ~Keyword.PUBLICSY.value;\r\n\r\n modifier.check(modifier.classes | modifier.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1));\r\n\r\n if ((modifier.cur & Keyword.ABSTRACTSY.value) == 0)\r\n modifier.methods &= ~Keyword.ABSTRACTSY.value;\r\n else\r\n modifier.methods |= Keyword.ABSTRACTSY.value;\r\n\r\n x.modify |= modifier.cur;\r\n\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n declMember(scope, x);\r\n\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n\r\n if (nextSymbol == Keyword.EXTENDSSY)\r\n {\r\n lookAhead();\r\n Type t = type();\r\n x.extend = new ClassType(t.ident.string.substring(t.ident.string.lastIndexOf('.') + 1));\r\n }\r\n else if (((x.modify & Keyword.STATICSY.value) != 0 || (Scope)scopeStack.get(0) == scope) && x.name.string.compareTo(\"Object\") != 0)\r\n {\r\n x.extend = new ClassType(\"Object\");\r\n unresolved.add(x.extend.name.string);\r\n }\r\n else\r\n x.extend = new ClassType();\r\n\r\n if (nextSymbol == Keyword.IMPLEMENTSSY)\r\n {\r\n lookAhead();\r\n x.implement = typeList();\r\n }\r\n else\r\n x.implement = new ClassType[0];\r\n\r\n if ((modifier.cur & Keyword.ABSTRACTSY.value) != 0 && (modifier.cur & modifier.constructors) == 0)\r\n modifier.cur |= Keyword.PUBLICSY.value ;\r\n\r\n modifier.cur &= modifier.constructors;\r\n\r\n classBody(x, new Modifier(), \"\", queue);\r\n\r\n Iterator iter = x.scope.iterator();\r\n\r\n while(iter.hasNext())\r\n {\r\n Basic b = (Basic)iter.next();\r\n\r\n if (b instanceof MethodType)\r\n if ((b.modify & Keyword.STATICSY.value) != 0)\r\n { // remove this from static method\r\n MethodType m = (MethodType)b;\r\n m.scope.remove(\"§this\");\r\n if (m.parameter.length > 0 && m.parameter[0].name.string.compareTo(\"§this\") == 0)\r\n {\r\n Parameter [] p = new Parameter[m.parameter.length - 1];\r\n\r\n for(int i = 0; i < p.length; i++)\r\n p[i] = m.parameter[i + 1];\r\n\r\n m.parameter = p;\r\n }\r\n }\r\n }\r\n\r\n // add queue to constructors\r\n addToConstructor(x, queue);\r\n unresolved = dummy;\r\n\r\n writeList(x);\r\n }", "private void enforceTransitiveClassUsage() {\n HashSet<String> tmp = new HashSet<String>(usedAppClasses);\n for(String className : tmp) {\n enforceTransitiveClassUsage(className);\n }\n }", "public void firstClass(){\n }", "public void testClassName() {\n\t\tClassName name = this.compiler.createClassName(\"test.Example\");\n\t\tassertEquals(\"Incorrect package\", \"generated.officefloor.test\", name.getPackageName());\n\t\tassertTrue(\"Incorrect class\", name.getClassName().startsWith(\"Example\"));\n\t\tassertEquals(\"Incorrect qualified name\", name.getPackageName() + \".\" + name.getClassName(), name.getName());\n\t}", "boolean isProperClass(String str)\n {\n File f = new File(MutationSystem.MUTANT_HOME, str);\n File[] dirs = f.listFiles(new DirFileFilter());\n if ((dirs == null) || (dirs.length == 0)) \n return false;\n \n String[] names = {\"\", \"original\"};\n switch(getMutantType())\n {\n case MutationSystem.TM: names[0] = \"mutants\";\n break;\n case MutationSystem.EM: names[0] = \"exceptional_mutants\";\n break;\n }\n \n for (int i=0; i<names.length; i++)\n {\n boolean found = false;\n for (int j=0; j<dirs.length; j++)\n {\n if (dirs[j].getName().equals(names[i]))\n {\n found = true;\n break;\n }\n }\n if (!found) \n return false;\n }\n return true;\n }", "private File getClassFile(String name) {\n File file = new File(\"/Users/dingchenchen/Downloads/Test.class\");\n return file;\n }", "public ClassParser(final String file_name) {\n this.file_name = file_name;\n fileOwned = true;\n }", "private static void Demo2() {\n\t\tClass<?> class1 = null;\r\n\t\tClass<?> class2 = null;\r\n\t\ttry {\r\n\t\t\tclass1 = Class.forName(\"CH16.Person\");\r\n\t\t\tSystem.out.println(\"包名:\" + class1.getPackage().getName());\r\n\t\t\tSystem.out.println(\"类名:\" + class1.getName());\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}\r\n\r\n\t\tclass2 = Person.class;\r\n\t\tSystem.out.println(\"包名:\" + class2.getPackage().getName());\r\n\t\tSystem.out.println(\"类名:\" + class2.getName());\r\n\r\n\t}", "@Override\n\tprotected Class<?> findClass(String name) throws ClassNotFoundException {\n\t\tFile file = new File(getSimpleName(name) + \".class\");\n FileInputStream fis = null;\n Class<?> clazz = null;\n try {\n fis = new FileInputStream(file);\n int content = 0;\n int i = 0;\n byte[] data = new byte[fis.available()];\n while ((content = fis.read()) != -1) {\n // convert to char and display it\n data[i] = (byte) content;\n i++;\n }\n clazz = defineClass(name, data, 0, data.length);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n \t\tex.printStackTrace();\n \t}\n }\n return clazz;\n\t}", "private ClassUtil() {}", "abstract String getClassName();", "public void testTrashInClassDef() throws ParseException {\n SourceFile s = _parseString(\"fdsa public sad static class A {\\n\"+\n \"}\");\n assertEquals(\"Number of classes\",1,s.getClasses().length);\n assertEquals(\"the class name is A\", \"A\", s.getClasses()[0].getName().getText());\n assertEquals(\"the class has 2 modifiers\", 1, s.getClasses()[0].getMav().getModifiers().length);\n }", "public void setClassName(String name) {\n\t\tlines.append(\".class public l2j/generated/\");\n\t\tlines.append(name);\n\t\tclassName = \"l2j/generated/\" + name;\n\t\tlines.append(\"\\n\");\n\n\t\t// stupid check\n\t\tif (dest.indexOf(name) == -1)\n\t\t\tthrow new IllegalStateException(\"Bad class name\");\n\t}", "Object getClass_();", "Object getClass_();", "private String fixClassName(String strClassName) {\r\n\t\tstrClassName = strClassName.replace('\\\\', '.');\r\n\t\tstrClassName = strClassName.replace('/', '.');\r\n\t\tstrClassName = strClassName.substring(0, strClassName.length() - 6);\r\n\t\t// remove \".class\"\r\n\t\treturn strClassName;\r\n\t}", "private static void processClass(File file_name, final Histogram class_use, final Histogram method_use) {\n try {\n final InputStream object_stream=new FileInputStream(file_name);\n MethodCallEnumerator.analyzeClass(object_stream,class_use,method_use);\n object_stream.close();\n } catch (Exception e) {\n throw new IllegalStateException(\"while processing: \" + e);\n }\n }", "private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}", "public ObjectsPublicTest(String name) {\n\t\tsuper(name);\n\t}", "private FileUtil() {\n \t\tsuper();\n \t}", "public void testJavaClassRepository873() throws Exception {\n\t\tJavaClassRepository var2730 = new JavaClassRepository();\n\t\tvar2730.getClass(CyclomaticMethods.class.getCanonicalName());\n\t\tvar2730.getClass(LineNumbersForConditionals.class.getCanonicalName());\n\t\tvar2730.getClass(LoDMultipleSameInvocations.class.getCanonicalName());\n\t}", "private ControlloFile() {\n\t}", "boolean hasClassname();", "public void testJavaClassRepository872() throws Exception {\n\t\tJavaClassRepository var2730 = new JavaClassRepository();\n\t\tvar2730.getClass(SingleMethodClass.class.getCanonicalName());\n\t\tvar2730.getClass(Example.class.getCanonicalName());\n\t}", "private FileUtility() {\r\n\t}", "private Class<?> findInternalClass(String name){\n Class<?> clazz = null;\n for (int i = 0; i < urls.length; i++) {\n String root = urls[i].getPath();\n clazz = realFindClass(root,name);\n if(clazz != null)\n break;\n }\n if(clazz != null) {\n classes.put(name,clazz);\n return clazz;\n }\n return null;\n }", "private static String getSimpleClassName(String className) {\n\n\n\t\tString[] names = className.split(\"\\\\.\");\n\n\t\tfor (int i = 0; i < names.length; i++) {\n\t\t\tLog.d(\"\", \"names =\" + names[i]);\n\t\t}\n\n\t\treturn names[names.length - 1];\n\t}", "public ClassFile getClassFile(String name) throws IOException {\n if (name.indexOf('.') > 0) {\n int i = name.lastIndexOf('.');\n String pathname = name.replace('.', File.separatorChar) + \".class\";\n if (baseFileName.equals(pathname) ||\n baseFileName.equals(pathname.substring(0, i) + \"$\" +\n pathname.substring(i+1, pathname.length()))) {\n return readClassFile(path);\n }\n } else {\n if (baseFileName.equals(name.replace('/', File.separatorChar) + \".class\")) {\n return readClassFile(path);\n }\n }\n return null;\n }", "public void extractClassInheritance(String file) throws NotAClassException {\n Matcher m = CLASS_DEFINITION.matcher(file);\n if(m.find()){\n String result = m.group();\n Matcher classNameMatcher = IDENTIFIER_NODOTS.matcher(result);\n\n for(int i=0; i<2 && classNameMatcher.find(); i++);\n\n className = classNameMatcher.group(0);\n\n\n Matcher genericMatcher = CLASS_GENERIC_DEFINITION.matcher(result);\n if(genericMatcher.find()){\n String generics = genericMatcher.group();\n Matcher genericIdentifiers = IDENTIFIER_NODOTS.matcher(generics);\n while (genericIdentifiers.find()){\n genericTypes.add(genericIdentifiers.group());\n }\n }\n\n //retrieve inheritance\n //replace all < > with whitespace\n Matcher matcher = HOOK_BRACKETS.matcher(file);\n String noHookBrackets = matcher.replaceAll(\" \");\n\n Matcher inheritanceMatcher = EXTENDS_OR_IMPLEMENTS_DEFINITION.matcher(noHookBrackets);\n if(inheritanceMatcher.find()){\n String extendsOrImplements = inheritanceMatcher.group();\n Matcher identifiers = IDENTIFIER_MAYDOTS.matcher(extendsOrImplements);\n while(identifiers.find()){\n String r = identifiers.group();\n if(!(r.equals(\"extends\")||r.equals(\"implements\"))){\n dependencies.add(r);\n }\n }\n }\n }\n if(className == null){\n throw new NotAClassException();\n }\n }", "private String getClassName( Class c ) {\n\treturn c.getName().substring(c.getName().lastIndexOf('.')+1);\n }", "@Test\n public void testClassForName() throws Exception {\n Class<?> mainClass = MainClassForNameSubClass.class;\n runTest(\n mainClass,\n ImmutableList.of(mainClass, SuperClass.class, SubClass.class),\n // Prevent SuperClass from being merged into SubClass.\n keepMainProguardConfiguration(mainClass, ImmutableList.of(\"-keep class **.SuperClass\")),\n this::checkAllClassesPresentWithDefaultConstructor);\n }", "protected void fixClassNames() {\n // Sort the class definitions so that they will appear in\n // ascending order based on the opening brace line. Note that\n // the opening brace line is more accurate in terms of computing\n // the names of inner classes. But we still use the first line\n // of code (beginLine) elsewhere.\n Collections.sort(classLines, new Comparator() {\n @Override\n\t\t\t\tpublic int compare(Object o1, Object o2) {\n ClassDefinition cd1 = (ClassDefinition) o1;\n ClassDefinition cd2 = (ClassDefinition) o2;\n return cd1.getBraceLine() - cd2.getBraceLine();\n }\n });\n\n // We will prepend the outer class names to the inner classes.\n // This has O(n^2) running time, which is not good but it's only\n // done once and the list is likely to be pretty short.\n // Anonymous inner classes fall within the widest containing\n // class, as opposed to the closest fitting inner class.\n\n List newClassNames = new ArrayList();\n int anonymousNum = 1;\n ClassDefinition outtermostClass = null;\n for (int ii = 0; ii < classLines.size(); ii++) {\n ClassDefinition cd = (ClassDefinition) classLines.get(ii);\n // Is this a new outtermost class (begin line after end line\n // of current outtermost class; if none, the answer is yes)?\n if (outtermostClass == null\n || outtermostClass.getEndLine() < cd.getBraceLine()) {\n // Yes, save reference to outtermostClass and reset the\n // anonymous class counter to one.\n outtermostClass = cd;\n anonymousNum = 1;\n }\n\n String classname = cd.getClassName();\n // Is this class an anonymous inner class?\n if (classname == ANONYMOUS_CLASS_NAME) {\n // Yes, give it the name of the outter most class plus\n // the anonymous number value.\n classname = outtermostClass.getClassName() + '$'\n + anonymousNum;\n anonymousNum++;\n } else {\n // Not an inner class; have to prepend the names of all\n // containing classes to this one.\n for (int jj = ii - 1; jj >= 0; jj--) {\n ClassDefinition cc = (ClassDefinition) classLines.get(jj);\n if ((cc.getBraceLine() <= cd.getBraceLine())\n && (cc.getEndLine() >= cd.getEndLine())) {\n classname = cc.getClassName() + '$' + classname;\n }\n }\n }\n\n // Append to another list so as not to pollute the original.\n newClassNames.add(classname);\n }\n\n boolean hasPackage = packageName != null && packageName.length() > 0;\n for (int ii = classLines.size() - 1; ii >= 0; ii--) {\n ClassDefinition cd = (ClassDefinition) classLines.get(ii);\n String newname = (String) newClassNames.get(ii);\n if (hasPackage) {\n // Add the package name to the front of the class names.\n cd.setClassName(packageName + '.' + newname);\n } else {\n cd.setClassName(newname);\n }\n }\n }", "public static boolean start(RootDoc root) {\n System.out.println(\"ClassDoc packages: \" + root.classes().length);\n Path rootPath = FileSystems.getDefault().getPath(gitRepoRoot);\n\n for (String hierarchyRoot: hierarchyRoots) {\n ClassDoc hierarchyRootDoc = root.classNamed(hierarchyRoot);\n if (hierarchyRootDoc == null) {\n System.err.printf(\"Root class not found: '%s'\\n\", hierarchyRoot);\n System.exit(-2);\n }\n ClassTree javadocTree = new ClassTree(root, new EmptyJavadocConfiguration());\n\n List<ClassDoc> classDocs;\n\n if (hierarchyRootDoc.isInterface()) {\n classDocs = javadocTree.implementingclasses(hierarchyRootDoc);\n } else {\n classDocs = javadocTree.allSubs(hierarchyRootDoc, false);\n }\n classDocs.add(hierarchyRootDoc); //not to forget the main one\n\n\n // for (ClassDoc classDoc : root.classes()) {\n for (ClassDoc classDoc : classDocs) {\n Tag[] sinceTags = classDoc.tags(\"since\");\n String sinceVal = null;\n if (sinceTags != null && sinceTags.length > 0) {\n if (sinceTags.length > 1) {\n sinceVal = \"Multiple since tags!\";\n } else {\n sinceVal = sinceTags[0].text();\n }\n }\n\n\n Path containingPath = classDoc.position().file().toPath();\n String containingFileName = containingPath.getFileName().toString();\n String className = classDoc.name();\n System.out.printf(\"Class: %s (%s): @since: %s\\n\", className, containingFileName, (sinceVal == null) ? \"not found\" : sinceVal);\n currentFileToPath.put(containingFileName, rootPath.relativize(containingPath).toString());\n if (firstOccurance.containsKey(containingFileName)) {\n System.err.printf(\"Already stored %s from %s, must be an inner class; skipping!\\n\", className, containingFileName);\n } else {\n firstOccurance.put(containingFileName, sinceVal);\n }\n }\n }\n return true;\n }", "public void checkPublic() {\n }", "public Class(String name) {\n\t\tthis.name = name;\n\t\tarrayMethods = new ArrayList<Method>();\n\t\tcode_Smells = new HashMap<String, Boolean>();\n\n\t}", "private CommonMethods() {\n }", "@Test\r\n\tpublic void testContainsClass() {\r\n\t\tassertTrue(breaku1.containsClass(class1));\r\n\t\tassertTrue(externu1.containsClass(class1));\r\n\t\tassertTrue(meetingu1.containsClass(class1));\r\n\t\tassertTrue(teachu1.containsClass(class1));\r\n\t}", "private GraphFileManager() {\n\t}", "private NaturePackage() {}", "public BrihaspatiProFile() {\n }", "public static void main(String[] args) {\n PdfFile pdfFile=new PdfFile(\"PDF File\");\n pdfFile.open();\n pdfFile.close();\n pdfFile.edit();\n WordFile wordFile=new WordFile(\"Word File\");\n wordFile.open();\n wordFile.close();\n wordFile.edit();\n JavaFile javaFile=new JavaFile(\"Java File\");\n javaFile.open();\n javaFile.close();\n javaFile.edit();\n\n }", "public abstract String getClassName();", "public String getClassName(String path);", "public void testMultipleImplementations() throws Exception {\n\n\t\t// Create the source\n\t\tStringWriter bufferOne = new StringWriter();\n\t\tPrintWriter sourceOne = new PrintWriter(bufferOne);\n\t\tsourceOne.println(\"package net.officefloor.test;\");\n\t\tsourceOne.println(\"public class SimpleImpl implements \" + Simple.class.getName().replace('$', '.') + \"{\");\n\t\tsourceOne.println(\" public String getMessage() {\");\n\t\tsourceOne.println(\" return net.officefloor.test.MockMultiple.MESSAGE;\");\n\t\tsourceOne.println(\" }\");\n\t\tsourceOne.println(\"}\");\n\t\tsourceOne.flush();\n\n\t\t// Create the source\n\t\tStringWriter bufferTwo = new StringWriter();\n\t\tPrintWriter sourceTwo = new PrintWriter(bufferTwo);\n\t\tsourceTwo.println(\"package net.officefloor.test;\");\n\t\tsourceTwo.println(\"public class MockMultiple {\");\n\t\tsourceTwo.println(\" public static final String MESSAGE = \\\"MULTIPLE\\\";\");\n\t\tsourceTwo.println(\"}\");\n\t\tsourceTwo.flush();\n\n\t\t// Compile the sources\n\t\tJavaSource javaSource = this.compiler.addSource(\"net.officefloor.test.SimpleImpl\", bufferOne.toString());\n\t\tthis.compiler.addSource(\"net.officefloor.test.MockMultiple\", bufferTwo.toString());\n\t\tMap<JavaSource, Class<?>> classes = this.compiler.compile();\n\t\tClass<?> clazz = classes.get(javaSource);\n\n\t\t// Ensure can use\n\t\tSimple multiple = (Simple) clazz.getConstructor().newInstance();\n\t\tassertEquals(\"Incorrect compiled result\", \"MULTIPLE\", multiple.getMessage());\n\t}", "public ClassCreator(){\n\n\n\t\tScanner fin = null;\n\n\t\ttry {\n\t\t\tString[] nameHandler = fileName.split(\"\\\\.\");\n\n\t\t\tString className = nameHandler[0].replaceAll(\" |_|\\\\s$|0|1|2|3|4|5|6|7|8|9\", \"\");\n\n\n\t\t\t//Setting Up Scanners/PrintWriter\n\t\t\tfin = new Scanner(new File(fileName));\n\n\n\t\t\tPrintWriter pw = new PrintWriter(className + \".java\");\n\n\n\t\t\tString[] prop = fin.nextLine().split(\"\\t\");\n\t\t\tString[] data = fin.nextLine().split(\"\\t\");\n\n\t\t\tfor(int i = 0; i<prop.length; i++) {\n\t\t\t\tpropertyList.add(new Properties(prop[i].replaceAll(\"\\\\s\", \"\"), getDataType(data[i])));\n\t\t\t}\n\n\t\t\t//Imports\n\t\t\tpw.println(\"import java.util.Scanner;\\n\\n\");\n\t\t\t\n\t\t\t//Class Line\n\t\t\tpw.println(\"\\npublic class \" + className + \" {\");\n\n\t\t\t//Properties\n\t\t\tpw.println(\"\\n\\t//======================================================= Properties\\n\");\n\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateProperty());\n\t\t\t}\n\n\t\t\t//Constructors\n\t\t\tpw.println(\"\\n\\t//======================================================= Constructors\\n\");\n\n\t\t\t//================= Workhorse Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getDataType() + \" \" + propertyList.get(i).getFieldName() + \", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getDataType() + \" \" \n\t\t\t\t\t+ propertyList.get(propertyList.size()-1).getFieldName() + \"){\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetCall(p));\n\t\t\t}\n\t\t\tpw.println(\"\\t}\\n\");\n\n\t\t\t//================= Scanner Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(Scanner fin) throws Exception {\\n\");\n\t\t\tpw.println(\"\\t\\tString[] parts = fin.nextLine().split(\\\"\\\\t\\\");\");\n\t\t\tint arrayCount = 0;\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tif(p.getDataType().equals(\"int\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Integer.parseInt(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"double\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Double.parseDouble(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"long\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Long.parseLong(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"boolean\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Boolean.parseBoolean(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpw.println(p.generateSetCall(\"parts[\" + arrayCount + \"]\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpw.println(\"\\n\\t}\");\n\n\t\t\t//Methods\n\t\t\tpw.println(\"\\n\\t//======================================================= Methods\\n\");\n\n\t\t\t\t//Equals\n\t\t\tpw.println(\"\\tpublic boolean equals(Object obj) {\");\n\t\t\tpw.println(\"\\t\\tif(!(obj instanceof \" + className + \")) return false;\");\n\t\t\tpw.println(\"\\t\\t\" + className + \" \" + className.substring(0,1).toLowerCase() + \" = (\" + className + \")obj;\");\n\t\t\tpw.println(\"\\t\\treturn getEqualsString().equals(\" + className.substring(0,1).toLowerCase() + \".getEqualsString());\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//EqualsHelper\n\t\t\tpw.println(\"\\n\\tprivate String getEqualsString() {\");\n\t\t\tpw.print(\"\\t\\treturn \");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getFieldName() + \" + \\\"~\\\" + \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//toString\n\t\t\tpw.println(\"\\n\\tpublic String toString() {\");\n\t\t\tpw.print(\"\\t\\treturn \\\"\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).generateUpperCase() + \": \\\" + \" + propertyList.get(i).getFieldName() + \" + \\\", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).generateUpperCase() + \": \\\" + \" + propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\n\t\t\t//Getters/Setters\n\t\t\tpw.println(\"\\n\\t//======================================================= Getters/Setters\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateGetter());\n\t\t\t}\n\t\t\tpw.println();\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetter());\n\t\t\t}\n\n\t\t\t//End of the file code\n\t\t\tpw.print(\"\\n\\n}\");\n\t\t\tfin.close();\n\t\t\tpw.close();\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t} finally { //Checked Last after try\n\t\t\ttry {fin.close();} catch (Exception e) {} //Just Double Checking\n\n\t\t}\n\n\n\n\n\t}", "@Override\n\tpublic void rename(String newName) {\n\t\tint lastDot = newName.lastIndexOf('.');\n\t\tif (lastDot == -1) {\n\t\t\tclsInfo.changeShortName(newName);\n\t\t\treturn;\n\t\t}\n\t\tif (isInner()) {\n\t\t\taddWarn(\"Can't change package for inner class: \" + this + \" to \" + newName);\n\t\t\treturn;\n\t\t}\n\t\t// change class package\n\t\tString newPkg = newName.substring(0, lastDot);\n\t\tString newShortName = newName.substring(lastDot + 1);\n\t\tif (changeClassNodePackage(newPkg)) {\n\t\t\tclsInfo.changePkgAndName(newPkg, newShortName);\n\t\t} else {\n\t\t\tclsInfo.changeShortName(newShortName);\n\t\t}\n\t}", "public static RedefinitionRule sameClassRule() {\n\t\treturn new SameClassRule();\n\t}", "public String[] readClasses();", "public void testAddDuplicateSecondaryType() throws JavaModelException {\n IPath projectPath = env.addProject(\"Project\");\n env.addExternalJars(projectPath, Util.getJavaClassLibs());\n // remove old package fragment root so that names don't collide\n env.removePackageFragmentRoot(projectPath, \"\");\n IPath root = env.addPackageFragmentRoot(projectPath, \"src\");\n env.setOutputFolder(projectPath, \"bin\");\n env.addClass(root, \"p\", \"C\", \"package p;\t\\n\" + \"public class C {}\t\\n\" + \"class CC {}\");\n fullBuild(projectPath);\n expectingNoProblems();\n IPath pathToD = env.addClass(root, \"p\", \"D\", \"package p;\t\\n\" + \"public class D {}\t\\n\" + \"class CC {}\");\n incrementalBuild(projectPath);\n expectingProblemsFor(pathToD, \"Problem : The type CC is already defined [ resource : </Project/src/p/D.java> range : <37,39> category : <-1> severity : <2>]\");\n expectingSpecificProblemsFor(pathToD, new Problem[] { new Problem(\"\", \"The type CC is already defined\", pathToD, 37, 39, -1, IMarker.SEVERITY_ERROR) });\n env.removeProject(projectPath);\n }", "private static void removeDuplicateCheckcasts(String filename, String output) {\n try {\n JavaClass clazz = new ClassParser(filename).parse();\n Method[] methods = clazz.getMethods();\n ConstantPoolGen cp = new ConstantPoolGen(clazz.getConstantPool());\n\n for (int i = 0; i < methods.length; i++) {\n if (!(methods[i].isAbstract() || methods[i].isNative())) {\n MethodGen mg = new MethodGen(methods[i], clazz.getClassName(), cp);\n Method stripped = removeDuplicateCheckcasts(mg);\n\n if (stripped != null)\n methods[i] = stripped;\n }\n }\n\n clazz.setConstantPool(cp.getFinalConstantPool());\n clazz.dump(output);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void testRenameToNonJava() throws JavaModelException {\n\t\tIPath projectPath = env.addProject(\"Project\"); //$NON-NLS-1$\n\t\tenv.addExternalJars(projectPath, Util.getJavaClassLibs());\n\t\t\n\t\t// remove old package fragment root so that names don't collide\n\t\tenv.removePackageFragmentRoot(projectPath,\"\"); //$NON-NLS-1$\n\t\t\n\t\tIPath root = env.addPackageFragmentRoot(projectPath, \"src\"); //$NON-NLS-1$\n\t\tenv.setOutputFolder(projectPath, \"bin\"); //$NON-NLS-1$\n\t\t\n\t\tIPath cuPath = env.addClass(root, \"p1\", \"X\", //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\"package p1;\\n\"+ //$NON-NLS-1$\n\t\t\t\"public class X extends Y {\\n\"+ //$NON-NLS-1$\n\t\t\t\"}\\n\" //$NON-NLS-1$\n\t\t\t);\n\t\t\t\n\t\tfullBuild(projectPath);\n\t\texpectingOnlyProblemsFor(cuPath);\n\t\texpectingOnlySpecificProblemFor(cuPath, new Problem(\"X\", \"Y cannot be resolved to a type\", cuPath, 35, 36, CategorizedProblem.CAT_TYPE)); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\n\t\t\n\t\tenv.renameCU(root.append(\"p1\"), \"X.java\", \"X.txt\"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t\tincrementalBuild(projectPath);\n\t\texpectingNoProblems();\n\t}", "public void testJavaClassRepository874() throws Exception {\n\t\tJavaClassRepository var2730 = new JavaClassRepository();\n\t\tvar2730.getClass(Gadget.class.getCanonicalName());\n\t\tvar2730.getClass(LoDStaticCall.class.getCanonicalName());\n\t}", "private void connectClasses(Header [] list)\r\n {\r\n Vector queue;\r\n Vector garbage = new Vector();\r\n\r\n Find.setCrossreference(list);\r\n\r\n for(int i = 0; list != null && i < list.length; i++)\r\n {\r\n queue = list[i].scopes;\r\n\r\n for(int j = 0; j < queue.size(); j++)\r\n for(Iterator iter = ((Scope)queue.get(j)).iterator(); iter.hasNext();)\r\n {\r\n Iterator a = null;\r\n Basic x = (Basic)iter.next();\r\n\r\n if (x instanceof ClassType)\r\n {\r\n ClassType y = (ClassType)x;\r\n ClassType [] z;\r\n boolean done = false;\r\n String st = null;\r\n\r\n if (y.extend != null && y.extend.name != null && y.extend.scope == null)\r\n { // look for superclass\r\n st = y.extend.name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int k = 0; k < z.length; k++)\r\n if (z[k].scope.javaPath(\"\").endsWith(st) || z[k].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.extend = z[k];\r\n garbage.add(st);\r\n done = true;\r\n }\r\n }\r\n\r\n for(int k = 0; k < y.implement.length; k++)\r\n if (y.implement[k].name != null && y.implement[k].scope == null)\r\n { // look for interface\r\n st = y.implement[k].name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n done = false;\r\n \r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int l = 0; l < z.length && !done; l++)\r\n if (z[l].scope.javaPath(\"\").endsWith(st) || z[l].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.implement[k] = z[l];\r\n garbage.add(st);\r\n done = true;\r\n break;\r\n }\r\n }\r\n\r\n a = null;\r\n while(garbage.size() > 0)\r\n {\r\n st = (String)garbage.get(0);\r\n garbage.remove(0);\r\n y.unresolved.remove(st);\r\n }\r\n }\r\n }\r\n }\r\n }", "ClassType memberClassNamed(String name);", "public Ext2Class1() {\n }", "private ShifuFileUtils() {\n }", "private Singletion3() {}", "private void ensureCorrectJavaFormat(File javaFile) throws FileNotFoundException, IOException\n\t{\n\t\tFile temp = new File(\"action.temp\");\n\t\tPrintWriter printer = new PrintWriter(new BufferedWriter(new FileWriter(temp)));\n\t\tString fileName = javaFile.getName();\n\t\tString directoryName = javaFile.getParentFile().getName();\n\t\ttry(BufferedReader buffyTheFileSlayer = new BufferedReader(new FileReader(javaFile)))\n\t\t{\n\t\t\tboolean foundPackage = false;\n\t\t\tboolean foundClass = false;\n\t\t\tString line;\n\t\t\twhile((line = buffyTheFileSlayer.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(!foundPackage && line.matches(\"package .+\"))\n\t\t\t\t{\n\t\t\t\t\tfoundPackage = true;\n\t\t\t\t\tif(!line.matches(\".*\" + directoryName + \".*\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tline = \"package \" + directoryName + \";\";\n\t\t\t\t\t}\n\t\t\t\t} else if(!foundClass && line.matches(\"public class .+ implements ActionNode\"))\n\t\t\t\t{\n\t\t\t\t\tfoundClass = true;\n\t\t\t\t\tif(!line.matches(\".*\" + fileName + \".*\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tline = \"public class \" + fileName + \" extends ActionNode\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprinter.println(line);\n\t\t\t}\n\t\t\tprinter.close();\n\t\t\tjavaFile.delete();\n\t\t\ttemp.renameTo(javaFile);\n\t\t}\n\t}", "private FileEntry() {\n // intentionally empty\n }", "public abstract File mo41087j();", "private SourcecodePackage() {}", "public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\tIOUtils.loadMethodIODeps(\"cb\");\n\t\t\n\t\tFile clazz = new File(args[0]);\n\n\t\tfinal ClassReader cr1 = new ClassReader(new FileInputStream(clazz));\n//\t\tPrintWriter pw = new PrintWriter(new FileWriter(\"z.txt\"));\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t/*ClassWriter cw1 = new ClassWriter(ClassWriter.COMPUTE_FRAMES) {\n\t\t\t@Override\n\t\t\tprotected String getCommonSuperClass(String type1, String type2) {\n\t\t\t\ttry {\n\t\t\t\t\treturn super.getCommonSuperClass(type1, type2);\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t//\t\t\t\t\tSystem.err.println(\"err btwn \" + type1 + \" \" +type2);\n\t\t\t\t\treturn \"java/lang/Unknown\";\n\t\t\t\t}\n\t\t\t}\n\t\t};*/\n\t\t\n\t\tClassWriter cw1 = new ClassWriter(ClassWriter.COMPUTE_MAXS);\n\t\t\n\t\tcr1.accept(new ClassVisitor(Opcodes.ASM5, cw1) {\n\t\t\t@Override\n\t\t\tpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new JSRInlinerAdapter(super.visitMethod(access, name, desc, signature, exceptions), access, name, desc, signature, exceptions);\n\t\t\t}\n\t\t}, ClassReader.EXPAND_FRAMES);\n\t\t\n\t\tfinal ClassReader cr = new ClassReader(cw1.toByteArray());\n\t\tTraceClassVisitor tcv = new TraceClassVisitor(null,new Textifier(),pw);\n\t\t//ClassWriter tcv = new ClassWriter(cr, ClassWriter.COMPUTE_MAXS);\n\t\tClassVisitor cv = new ClassVisitor(Opcodes.ASM5, tcv) {\n\t\t\tString className;\n\n\t\t\t@Override\n\t\t\tpublic void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {\n\t\t\t\tsuper.visit(version, access, name, signature, superName, interfaces);\n\t\t\t\tthis.className = name;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tboolean isSynthetic = ClassInfoUtils.checkAccess(access, Opcodes.ACC_SYNTHETIC);\n\t\t\t\tboolean isNative = ClassInfoUtils.checkAccess(access, Opcodes.ACC_NATIVE);\n\t\t\t\tboolean isInterface = ClassInfoUtils.checkAccess(access, Opcodes.ACC_INTERFACE);\n\t\t\t\tboolean isAbstract = ClassInfoUtils.checkAccess(access, Opcodes.ACC_ABSTRACT);\n\t\t\t\t\n\t\t\t\tMethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);\n\t\t\t\tif (name.equals(\"toString\") && desc.equals(\"()Ljava/lang/String;\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (name.equals(\"equals\") && desc.equals(\"(Ljava/lang/Object;)Z\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (name.equals(\"hashCode\") && desc.equals(\"()I\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (isSynthetic || isNative || isInterface || isAbstract) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else {\n\t\t\t\t\tmv = new DependencyAnalyzer(className, \n\t\t\t\t\t\t\taccess, \n\t\t\t\t\t\t\tname, \n\t\t\t\t\t\t\tdesc, \n\t\t\t\t\t\t\tsignature, \n\t\t\t\t\t\t\texceptions, \n\t\t\t\t\t\t\tmv, \n\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\ttrue, \n\t\t\t\t\t\t\ttrue);\n\t\t\t\t\t//mv = new CalleeAnalyzer(className, access, name, desc, signature, exceptions, mv, true);\n\t\t\t\t\treturn mv;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcr.accept(cv, ClassReader.EXPAND_FRAMES);\n\t\tpw.flush();\n\t}", "private void verifyClassName() {\n\t\t\n\t\tif (classNameTF.getText().isEmpty()) {\n\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: Class Name\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tClass newClass = new Class(classNameTF.getText());\n\t\t\tteacher.addClass(newClass);\n\t\t\ttAddClassWindow.dispose();\n\t\t\ttPortalWindow.dispose();\n\t\t\tteacherPortalScreen();\n\t\t}\n\t}", "private ObiWanKenobi(){\n }", "public interface g {\n\n /* compiled from: AccessibilityViewCommand */\n public static abstract class a {\n\n /* renamed from: a reason: collision with root package name */\n private static final Bundle f2690a = new Bundle();\n\n /* renamed from: b reason: collision with root package name */\n Bundle f2691b;\n\n public void a(Bundle bundle) {\n this.f2691b = bundle;\n }\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class b extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class c extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class d extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class e extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class f extends a {\n }\n\n /* renamed from: b.g.i.a.g$g reason: collision with other inner class name */\n /* compiled from: AccessibilityViewCommand */\n public static final class C0028g extends a {\n }\n\n /* compiled from: AccessibilityViewCommand */\n public static final class h extends a {\n }\n\n boolean a(View view, a aVar);\n}", "private Rekenhulp()\n\t{\n\t}", "protected boolean isSingleJavaFile() {\r\n System.out.println(\"RefactoringAction.isSingleJavaFile()\");\r\n if (selectedFileSet == null) {\r\n return true;\r\n } else {\r\n return selectedFileSet.isSingleJavaFile();\r\n }\r\n }", "java.lang.String getClass_();", "java.lang.String getClass_();", "public void doClass(String callerName) throws LexemeException {\n\t\tlogMessage(\"<class>--> class ID [extends ID]{{<member>}}\");\n\t\tfunctionStack.push(\"<class>\");\n\t\tconsumeToken(); // consume class token\n\t\t// check ID token\n\t\tif (ifPeekThenConsume(\"ID_\")) {\n\t\t\t// check for optional EXTENDS_ token\n\t\t\tif (ifPeek(\"EXTENDS_\")) {\n\t\t\t\tconsumeToken();\n\t\t\t\tifPeekThenConsume(\"ID_\");\n\t\t\t}\n\t\t\t// check for left curly\n\t\t\tif (ifPeekThenConsume(\"L_CURLY_\")) {\n\n\t\t\t\twhile (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\") || ifPeekIsType()) {\n\t\t\t\t\t// check for optional PUBLIC_ & STATIC_ tokens\n\t\t\t\t\tif (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\")) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t} else if (ifPeekIsType()) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// TODO check for arraytype!!\n\t\t\t\t// CHECK ClOSING CURLY\n\n\t\t\t\t// TODO uncomment line\n\t\t\t\tifPeekThenConsume(\"R_CURLY_\");\n\t\t\t}\n\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}", "private MApi() {}", "public ClassDefinition isClass(String name) throws DmcNameClashException, DmcValueException {\n \treturn(classDefinitions.getDefinition(name));\n// return((ClassDefinition)classDefs.get(getDefName(name)));\n }", "public ClassFile(byte[] abClazz)\n {\n setBytes(abClazz);\n }", "private FileManager() {}", "private void writeClassesKey() {\n writeSpacesCorrespondingToNestedLevel(PKG_INFO_NEST_LEVEL);\n writer.println(\"classes:\");\n }", "public SplitFile() {\n\t}", "public interface PackageScanner {\n String FILE_SUFFIX = \".class\";\n\n /**\n * Find target element blow package except two class name.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except, String except2) throws Exception;\n\n /**\n * Find target element blow package except single class name.\n *\n * @param packageName\n * @param except\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except) throws Exception;\n\n /**\n * Scanning target class blow package except @param except and @param except2 class.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n */\n Set<?> scan(String packageName, Class<?> except, Class<?> except2) throws Exception;\n\n /**\n * Scanning target class blow package except @param except class.\n *\n * @param packageName\n * @param except\n * @return\n */\n Set<?> scan(String packageName, Class<?> except) throws Exception;\n\n /**\n * Instantiation a class set.\n *\n * @param classNames\n * @return\n */\n Set<?> instantiation(Set<String> classNames, Class<?> tClass) throws IOException;\n}", "private FileUtil() {}", "private SolutionsPackage() {}", "public abstract List<String> scanAllClassNames();", "@Test\n public void equalsDifferentName(){\n\n InputStream url1= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1.json\");\n InputStream url1h= getClass().getClassLoader().getResourceAsStream(\"backupTest/backup_1h.json\");\n\n Backup backup_a = Backup.initFromFile(url1);\n Backup backup_b = Backup.initFromFile(url1h);\n\n assertNotEquals(backup_a, backup_b);\n }", "default boolean isClass() {\n return false;\n }", "public AllButTwoOfAKind( java.lang.String name) \r\n\t{\r\n\t\tsuper(name);\t\r\n\t}", "public String getClassName();", "private stendhal() {\n\t}", "public synchronized void defineClass(String fullClassName, byte[] bytes)\r\n {\r\n try\r\n {\r\n defineClass(fullClassName, bytes, 0, bytes.length);\r\n }\r\n finally\r\n {\r\n }\r\n }", "public boolean equals(Object obj)\n {\n if (obj instanceof ClassFile)\n {\n ClassFile that = (ClassFile) obj;\n if (this == that)\n {\n return true;\n }\n\n // equal iff .class structure is identical\n byte[] abThis = this.getBytes();\n byte[] abThat = that.getBytes();\n return Arrays.equals(abThis, abThat);\n }\n return false;\n }", "private static boolean matchesPackage(Class<?> param2Class, String param2String) {\n/* 654 */ String str = param2Class.getName();\n/* 655 */ return (str.startsWith(param2String) && str.lastIndexOf('.') == param2String.length() - 1);\n/* */ }", "private boolean isJavaFile(JarEntry file){\n\t\treturn file.getName().toLowerCase().endsWith(\".java\");\n\t}", "private Public() {\n super(\"public\", null);\n }", "private static boolean classModifiers_1_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"classModifiers_1_1_0\")) return false;\n boolean r;\n r = consumeToken(b, BASE);\n if (!r) r = consumeToken(b, INTERFACE);\n if (!r) r = consumeToken(b, FINAL);\n return r;\n }", "String getClassName();", "String getClassName();" ]
[ "0.5885593", "0.55906063", "0.5586122", "0.5567926", "0.5563033", "0.55342656", "0.5508908", "0.54744184", "0.54734343", "0.54518163", "0.5445115", "0.5427275", "0.53529686", "0.53480434", "0.5343703", "0.5314971", "0.53025395", "0.5299794", "0.5299743", "0.52838105", "0.5260614", "0.52480495", "0.52480495", "0.52415794", "0.5205322", "0.5196876", "0.5194125", "0.5175801", "0.5174845", "0.51740795", "0.51641625", "0.5161494", "0.5159212", "0.5157626", "0.5151589", "0.51438403", "0.5115136", "0.5108834", "0.5101", "0.5095449", "0.50875914", "0.5085267", "0.50623226", "0.5055809", "0.50549483", "0.50487083", "0.5048031", "0.504686", "0.5038298", "0.5034453", "0.5011102", "0.5006672", "0.50041556", "0.5000132", "0.49981114", "0.49935934", "0.49877375", "0.49871087", "0.49862376", "0.498525", "0.49842936", "0.4982583", "0.49743634", "0.4964878", "0.49628696", "0.49617785", "0.4958932", "0.4941622", "0.49398914", "0.49349335", "0.49346638", "0.49319184", "0.49274886", "0.4926934", "0.49225774", "0.49189538", "0.49189538", "0.4915812", "0.4913736", "0.49122062", "0.49094328", "0.49056506", "0.49027306", "0.49007818", "0.4898434", "0.48931032", "0.48906326", "0.48867282", "0.48858964", "0.48852235", "0.4880774", "0.487977", "0.4871185", "0.48687005", "0.48684016", "0.4865599", "0.48646176", "0.4862726", "0.48585662", "0.48583317", "0.48583317" ]
0.0
-1
Test for with just Exclude list
public void test5() throws Exception { //$NON-NLS-1$ IFolder buildFolder = newTest("test5"); //$NON-NLS-1$ String buildXMLPath = buildFolder.getFile("build.xml").getLocation().toOSString(); Properties properties = new Properties(); //$NON-NLS-1$ //$NON-NLS-2$ properties.put("reference_location", buildFolder.getFile("before").getLocation().toOSString()); //$NON-NLS-1$ //$NON-NLS-2$ properties.put("current_location", buildFolder.getFile("after").getLocation().toOSString()); //$NON-NLS-1$ properties.put("report_location", buildFolder.getLocation().toOSString()); //$NON-NLS-1$ runAntScript(buildXMLPath, new String[] { "run" }, buildFolder.getLocation().toOSString(), properties); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse("allNonApiBundles must not exist", buildFolder.getFolder("allNonApiBundles").exists()); //$NON-NLS-1$ IFolder folder = buildFolder.getFolder("deltatest"); //$NON-NLS-1$ assertTrue("deltatest folder must exist", folder.exists()); //$NON-NLS-1$ folder = buildFolder.getFolder("deltatest1"); //$NON-NLS-1$ assertTrue("deltatest1 folder must exist", folder.exists()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue("report.xml file must be there", folder.getFile("report.xml").exists()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isExcluded();", "static public boolean excludesAll(Collection source, Collection arg) {\n\t\tIterator it = arg.iterator();\n\t\twhile ( it.hasNext() ) {\n\t\t\tObject elem = it.next();\n\t\t\tif ( source.contains(elem) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public void setExcludes(String excludes)\n {\n this.excludes = excludes;\n }", "public void setExcludeList(List<WafExcludeListEntry> excludeList) {\n this.excludeList = excludeList;\n }", "@Test\n\tpublic void testExcludeEligible() throws InterruptedException, ExecutionException,\n\t\t\tIOException, TimeoutException {\n\t\ttestExcludeEligible(null, null, null, Arrays.asList(1, 2));\n\t\ttestExcludeEligible(Boolean.TRUE, null, null, Arrays.asList(2));\n\t\ttestExcludeEligible(Boolean.FALSE, null, null, Arrays.asList(1, 2));\n\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), null,\n\t\t\t\tArrays.asList(1, 2));\n\t\ttestExcludeEligible(null, Arrays.asList(1), null, Arrays.asList(2));\n\t\ttestExcludeEligible(null, Arrays.asList(2), null, Arrays.asList(1));\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), null,\n\t\t\t\tCollections.<Integer>emptyList());\n\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList(), Collections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), Arrays.asList(1),\n\t\t\t\tArrays.asList(1));\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), Arrays.asList(2),\n\t\t\t\tArrays.asList(2));\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), Arrays.asList(1, 2),\n\t\t\t\tArrays.asList(1, 2));\n\n\t\ttestExcludeEligible(null, Arrays.asList(1), Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1), Arrays.asList(1),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1), Arrays.asList(2), Arrays.asList(2));\n\t\ttestExcludeEligible(null, Arrays.asList(1), Arrays.asList(1, 2),\n\t\t\t\tArrays.asList(2));\n\n\t\ttestExcludeEligible(null, Arrays.asList(2), Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(2), Arrays.asList(1), Arrays.asList(1));\n\t\ttestExcludeEligible(null, Arrays.asList(2), Arrays.asList(2),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(2), Arrays.asList(1, 2),\n\t\t\t\tArrays.asList(1));\n\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Arrays.asList(1),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Arrays.asList(2),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Arrays.asList(1, 2),\n\t\t\t\tCollections.<Integer>emptyList());\n\t}", "public void setExcludes( List<ExcludeClasses> excludes )\n {\n this.excludes = excludes;\n }", "boolean isExcluded(Individual ind);", "public String[] getExcludes()\n {\n return m_excludes;\n }", "static void exclude(User user, String content, MessageChannel chan) {\n if(!content.toLowerCase().startsWith(\"!exclude \"))\n return;\n\n ArrayList<String> tagList = new ArrayList<>(Arrays.asList(\n content.substring(\"!exclude \".length()).split(\" \")));\n ArrayList<String> excludeList = new ArrayList<>(Arrays.asList(\n excludeMap.getOrDefault(user.getIdLong(), \"\").split(\" \")));\n boolean changed = false;\n\n for(String tag : tagList){\n tag = tag.replaceAll(\"\\\\s\",\" \");\n if(!tag.startsWith(\"-\")){\n tag = \"-\" + tag;\n }\n if(!excludeList.contains(tag)){\n excludeList.add(tag);\n changed = true;\n }\n }\n\n if(changed){\n StringBuilder sb = new StringBuilder();\n for(String exclude : excludeList)\n sb.append(exclude).append(\" \");\n\n // will update list\n excludeMap.put(user.getIdLong(), sb.toString().trim());\n if(!saveMap(excludeMap, Config.exclude_data_filename)){\n chan.sendMessage(\"Couldn't save your exclude list, probably due to me being in test mode.\" +\n \" Sorry!\").queue();\n }\n else {\n chan.sendMessage(\"Ok. Exclude list is now: \" + sb).queue();\n }\n }\n else {\n chan.sendMessage(\"Exclude list is unchanged: \" + excludeMap.get(user.getIdLong())).queue();\n }\n\n }", "protected boolean isExcluded( String name )\n {\n for( int i = 0; i < excludes.length; i++ )\n {\n if( matchPath( excludes[ i ], name, isCaseSensitive ) )\n {\n return true;\n }\n }\n return false;\n }", "public List<ExcludeClasses> getExcludes()\n {\n return excludes;\n }", "protected abstract boolean matchesExclusion(String paramString, int paramInt);", "public void containsNoneIn(Iterable<?> excluded) {\n containsNone(\"contains no elements in\", excluded);\n }", "public List<WafExcludeListEntry> getExcludeList() {\n return excludeList;\n }", "ExcludeType createExcludeType();", "@Override\n protected ArrayList<String> generateExclusions()\n {\n ArrayList<String> retVal = new ArrayList<>();\n switch (monsterList.get(monsterList.size() - 1))\n {\n case \"Spheric Guardian\":\n retVal.add(\"Sentry and Sphere\");\n break;\n case \"3 Byrds\":\n retVal.add(\"Chosen and Byrds\");\n break;\n case \"Chosen\":\n retVal.add(\"Chosen and Byrds\");\n retVal.add(\"Cultist and Chosen\");\n break;\n }\n return retVal;\n }", "public Agg exclude(Object value) {\n attrList.put(\"exclude\", value);\n return this;\n }", "public final void mEXCLUDING() throws RecognitionException {\n try {\n int _type = EXCLUDING;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2829:3: ( 'excluding' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2830:3: 'excluding'\n {\n match(\"excluding\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "private static boolean isExcludeService(String[] excludeServicesList, String serviceName) {\n\t\tboolean isExcludeService = false;\n\t\t\n\t\t// Se itera por la lista buscando coincidencias.\n\t\tfor (String excludeService : excludeServicesList) {\n\t\t\tif (excludeService.trim().toLowerCase().equals(serviceName.trim().toLowerCase())) {\n\t\t\t\tisExcludeService = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isExcludeService;\n\t}", "boolean exclude(V1Secret secret);", "Collection<String> getExcludeExceptions();", "protected boolean isExcluded(String name) {\r\n return (this.excludeRE == null) ? false : this.excludeRE.match(name);\r\n }", "public void setExcludeUrls(String[] excludeUrls) {\n this.excludeUrls = excludeUrls;\n }", "protected abstract List<String> getSecondaryIndexExcludeList();", "private final boolean excludeColumn(String col, String[] excludes) {\n\t\tfor (int i = 0; i < excludes.length; i++) {\n\t\t\tif (col.equals(excludes[i])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public String[] getExcludedPatterns()\n/* */ {\n/* 122 */ return this.excludedPatterns;\n/* */ }", "@Override\n\tpublic String[] OnExclusions() {\n\t\treturn new String[] {\"sqlid\", \"item\"};\n\t}", "private boolean isOnIgnoreList(final String part) {\n return IGNORE_LIST.contains(part);\n }", "public boolean isExcluded()\n {\n return excluded.booleanValue();\n }", "@Test\n public void testList(){\n ArrayList<Integer> integers = Lists.newArrayList(1, 2, 3, 4);\n ArrayList<Integer> integers2 = Lists.newArrayList(1, 2, 3, 4, 5);\n// integers2.removeAll(integers);\n// System.out.println(integers2);\n integers2.retainAll(integers);\n System.out.println(integers2);\n }", "public static Predicate<CharSequence> includesExcludes(Iterable<String> includes, Iterable<String> excludes) {\n checkNotNull(includes, \"includes\");\n checkNotNull(excludes, \"excludes\");\n Predicate<CharSequence> incl = isEmpty(includes) ? ALWAYS_TRUE : containsAny(includes);\n Predicate<CharSequence> excl = isEmpty(excludes) ? ALWAYS_FALSE : containsAny(excludes);\n return and(incl, not(excl));\n }", "private List<ClassEntity> excludeInners(List<ClassEntity> list) {\n List<ClassEntity> result = new ArrayList<>();\n for (ClassEntity classEntity :\n list) {\n CompilationUnit cu = classEntity.getCu();\n int i = 0;\n for (Node node :\n cu.getTypes().get(0).getChildrenNodes()) {\n if (node instanceof ClassOrInterfaceDeclaration) {\n i++;\n }\n }\n if (i == 0) {\n result.add(classEntity);\n }\n }\n return result;\n }", "static void excludes(User user, String content, MessageChannel chan) {\n if(content.toLowerCase().equals(\"!excludes\")){\n String excludes = excludeMap.get(user.getIdLong());\n if(excludes == null){\n chan.sendMessage(\"None given.\").queue();\n return;\n }\n chan.sendMessage(\"Your exclude tags: \" + excludes).queue();\n }\n else if(content.toLowerCase().equals(\"!excludes clear\")){\n excludeMap.remove(user.getIdLong());\n saveMap(excludeMap, Config.exclude_data_filename);\n chan.sendMessage(\"Ok, removed all excludes.\").queue();\n }\n }", "public void excludedValues(BooleanExpression excluded) {\n\t\tthis.setOperator(new DBPermittedValuesOperator(excluded));\n\t\tnegateOperator();\n\t}", "public void setFilterExcludeProperties(List<String> filterExcludeProperties) {\n\n\t\tthis.filterExcludeProperties = filterExcludeProperties;\n\t}", "public void setExcludes( String[] excludes )\n {\n if( excludes == null )\n {\n this.excludes = null;\n }\n else\n {\n this.excludes = new String[ excludes.length ];\n for( int i = 0; i < excludes.length; i++ )\n {\n String pattern;\n pattern = excludes[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n if( pattern.endsWith( File.separator ) )\n {\n pattern += \"**\";\n }\n this.excludes[ i ] = pattern;\n }\n }\n }", "void setExcludeList(SynchronizationRequest req, Zipper zipper) {\n\n try { \n String serverName = req.getServerName();\n List list = (List)_excludeCache.get(serverName);\n if (list == null) {\n Properties env = req.getEnvironmentProperties();\n // admin config context\n ConfigContext ctx = _ctx.getConfigContext();\n Domain domain = (Domain) ctx.getRootConfigBean();\n Server server = domain.getServers().getServerByName(serverName);\n if (server != null) {\n ServerDirector director=new ServerDirector(ctx, serverName);\n List excludes = director.constructExcludes();\n list = new ArrayList();\n int size = excludes.size();\n for (int i=0; i<size; i++) {\n String path = (String) excludes.get(i);\n String tPath = \n TextProcess.tokenizeConfig(path, serverName, env);\n list.add(tPath);\n }\n // add the list to the cache\n _excludeCache.put(serverName, list);\n }\n }\n _logger.log(Level.FINE, \"Excluded List \" + list);\n zipper.addToExcludeList(list);\n } catch (Exception e) {\n _logger.log(Level.FINE, \"Excluded List can not be set\", e);\n }\n }", "AggregationBuilder buildExcludeFilteredAggregation(Set<String> excludeNames);", "private boolean isSourceExcluded(IClasspathEntry entry) {\n IPath[] exclusionPatterns = entry.getExclusionPatterns();\n if (exclusionPatterns != null) {\n for (IPath exclusionPattern : exclusionPatterns) {\n if (\"**\".equals(exclusionPattern.toString())) {\n return true;\n }\n }\n }\n return false;\n }", "public <T> void addNotInFilter(@Nullable String fieldName, @NonNull List<T> values) {\n addFilter(fieldName, FilterOperator.NOT_IN, values);\n }", "public static Predicate<BiomeSelectionContext> excludeByKey(Collection<RegistryKey<Biome>> keys) {\n\t\treturn context -> !keys.contains(context.getBiomeKey());\n\t}", "@Test\n public void testContainsAll_Not_Contain() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 5);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "public boolean isExcluded()\n {\n return project.isExcluded(this);\n }", "@NotNull\n Stream<StandardMethodContract> excludeContract(StandardMethodContract contract) {\n assert contract.getParameterCount() == myParameters.length;\n List<ValueConstraint> constraints = contract.getConstraints();\n List<ValueConstraint> template = StreamEx.constant(ValueConstraint.ANY_VALUE, myParameters.length).toList();\n List<StandardMethodContract> antiContracts = new ArrayList<>();\n for (int i = 0; i < constraints.size(); i++) {\n ValueConstraint constraint = constraints.get(i);\n if (constraint == ValueConstraint.ANY_VALUE) continue;\n template.set(i, constraint.negate());\n antiContracts.add(new StandardMethodContract(template.toArray(new ValueConstraint[0]), getReturnValue()));\n template.set(i, constraint);\n }\n return StreamEx.of(antiContracts).map(this::intersect).nonNull();\n }", "@Test\n public void testIgnore_excludedClasses() throws Throwable {\n RunNotifier notifier = spy(new RunNotifier());\n RunListener listener = mock(RunListener.class);\n notifier.addListener(listener);\n Bundle ignores = new Bundle();\n ignores.putString(LongevityClassRunner.FILTER_OPTION, FailingTest.class.getCanonicalName());\n mRunner = spy(new LongevityClassRunner(FailingTest.class, ignores));\n mRunner.run(notifier);\n verify(listener, times(1)).testIgnored(any());\n }", "private static String[] getExcludeServices() {\n\t\tString[] excludeServicesList = null;\n\t\ttry {\n\t\t\texcludeServicesList = ATUIUtils.getDefault().getString(ATUI_EXCLUDE_SERVICES_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 excludeServicesList;\n\t}", "protected boolean allow(String value) {\n if(includes.isEmpty()) {\n if(excludes.isEmpty()) {\n return true;\n } else {\n return !excludes.contains(value);\n }\n } else {\n boolean rv = includes.contains(value);\n if(!rv) return false;\n if(excludes.isEmpty()) {\n return true;\n } else {\n return !excludes.contains(value);\n }\n }\n }", "public void setExcludedPatterns(String... excludedPatterns)\n/* */ {\n/* 110 */ Assert.notEmpty(excludedPatterns, \"'excludedPatterns' must not be empty\");\n/* 111 */ this.excludedPatterns = new String[excludedPatterns.length];\n/* 112 */ for (int i = 0; i < excludedPatterns.length; i++) {\n/* 113 */ this.excludedPatterns[i] = StringUtils.trimWhitespace(excludedPatterns[i]);\n/* */ }\n/* 115 */ initExcludedPatternRepresentation(this.excludedPatterns);\n/* */ }", "public boolean excludeUnmated() {\n return mExcludeUnmated;\n }", "public void excludedValues(Boolean excluded) {\n\t\tthis.setOperator(new DBPermittedValuesOperator(excluded));\n\t\tnegateOperator();\n\t}", "public SamFilterParamsBuilder excludeUnmated(final boolean val) {\n mExcludeUnmated = val;\n return this;\n }", "boolean isHiddenFromList();", "java.util.List<java.lang.Float> getNotInList();", "@Test\n public void testRemove_Not_Contains() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n\n Integer item = 2;\n boolean expResult = false;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }", "@Test\n public void testContains_Not_Contain() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n instance.add(2);\n\n boolean expResult = false;\n boolean result = instance.contains(3);\n assertEquals(expResult, result);\n }", "private List<String> getExcludedFields() {\n List<String> temp = new ArrayList<>();\n temp.add(\"_rallyAPIMajor\");\n temp.add(\"_rallyAPIMinor\");\n temp.add(\"_ref\");\n temp.add(\"_refObjectUUID\");\n temp.add(\"_objectVersion\");\n temp.add(\"_refObjectName\");\n temp.add(\"ObjectUUID\");\n temp.add(\"VersionId\");\n temp.add(\"_type\");\n return temp;\n }", "@Test\n public void testRemoveAll() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "private static List<Integer> notInList(List<String> inputs, int num) {\n List<Integer> set = new ArrayList<Integer>();\n for(int i = 1; i <= num; i++) {\n set.add(Integer.valueOf(i));\n }\n for(String string: inputs) {\n Integer n = Integer.valueOf(string);\n set.remove(n);\n }\n Collections.sort(set);\n return set;\n }", "public static boolean isExcluded(RenderLayer layer) {\n\t\treturn layer.getDrawMode() != DrawMode.QUADS || EXCLUSIONS.contains(layer);\n\t}", "@Test public void excludeWithoutInclude() throws Exception {\n Schema schema = new RepoBuilder()\n .add(\"service.proto\", \"\"\n + \"message MessageA {\\n\"\n + \" optional string b = 1;\\n\"\n + \" optional string c = 2;\\n\"\n + \"}\\n\")\n .schema();\n Schema pruned = schema.prune(new IdentifierSet.Builder()\n .exclude(\"MessageA#c\")\n .build());\n assertThat(((MessageType) pruned.getType(\"MessageA\")).field(\"b\")).isNotNull();\n assertThat(((MessageType) pruned.getType(\"MessageA\")).field(\"c\")).isNull();\n }", "public interface SearchIndexExcluderList {\n\n\t/**\n\t * Do any required setup on the individual Excluders.\n\t */\n\tvoid startIndexing();\n\n\t/**\n\t * Do any required teardown on the individual Excluders.\n\t */\n\tvoid stopIndexing();\n\n\t/**\n\t * Poll the list of excluders regarding this individual.\n\t *\n\t * If any returns non-null, the individual is excluded. If all return null,\n\t * the individual is not excluded.\n\t */\n\tboolean isExcluded(Individual ind);\n\n}", "public static ArrayList<String> complement(ArrayList<String> universe, ArrayList<String> value) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tfor(String element : universe) {\n\t\t\tif(!value.contains(element)) {\n\t\t\t\tresult.add(element);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private String[] getExcluded(Resource resource) {\n\n\t\tCollection<String> excludes = new LinkedList<String>();\n\n\t\tString relativePath = PathUtils.subtract(resource.getDirectory(),\n\t\t\t\tthis.project.getBasedir().getAbsolutePath()\n\t\t\t\t\t\t+ PathSeparator.get());\n\n\t\tfor (Platform platform : Platform.fromString(this.platforms)) {\n\n\t\t\tString preStart = platform.behave(this.preStart);\n\n\t\t\texcludes.add(PathUtils.subtract(preStart, relativePath));\n\t\t}\n\n\t\treturn excludes.toArray(new String[] {});\n\t}", "public void setExcludedPattern(String excludedPattern)\n/* */ {\n/* 101 */ setExcludedPatterns(new String[] { excludedPattern });\n/* */ }", "private boolean isIncluded(StackTraceElementProxy step) {\n if (!excludes.isEmpty()) {\n StackTraceElement stackTraceElement = step.getStackTraceElement();\n String testString = stackTraceElement.getClassName() + \".\" + stackTraceElement.getMethodName();\n \n for (Pattern exclusionPattern : excludes) {\n if (exclusionPattern.matcher(testString).find()) {\n return false;\n }\n }\n }\n return true;\n }", "public Units whereNot(UnitSelector.BooleanSelector selector)\n\t{\n\t\tUnits result = new Units();\n\t\tfor (Unit unit : this)\n\t\t{\n\t\t\tif (!selector.isTrueFor(unit))\n\t\t\t{\n\t\t\t\tresult.add(unit);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public GlobFileSet addExcludeFiles(Object... files)\n\t\t{\n\t\tif ((files.length == 1) && (files[0] instanceof Iterable))\n\t\t\treturn (addExcludeFiles((Iterable<Object>)files[0]));\n\t\telse\n\t\t\treturn (addExcludeFiles(Arrays.asList(files)));\n\t\t}", "@Test\n public void testRemoveAll_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "public boolean isExcludeSubtype() {\n\t\treturn excludeSubtypes;\n\t}", "public void setExcludedQualifiers(String excludedQualifiers) {\r\n this.excludedQualifiers = excludedQualifiers;\r\n }", "protected void discardExtraAccommodationOfferings(final List<String> returnedAccommodationOfferings,\n\t\t\tfinal List<PropertyData> properties)\n\t{\n\t\tfinal List<String> propertyCodes = properties.stream()\n\t\t\t\t.map(PropertyData::getAccommodationOfferingCode).collect(Collectors.toList());\n\n\t\tfinal Collection<String> propertyCodeIntersection = CollectionUtils.intersection(propertyCodes, returnedAccommodationOfferings);\n\n\t\tfinal List<PropertyData> accommodationOfferingToRemove = properties.stream().filter(\n\t\t\t\taccommodationOffering -> BooleanUtils.isNotTrue(accommodationOffering.isIgnoreRules()) && !propertyCodeIntersection\n\t\t\t\t\t\t.contains(accommodationOffering.getAccommodationOfferingCode())).collect(Collectors.toList());\n\t\tproperties.removeAll(accommodationOfferingToRemove);\n\t}", "public boolean containsNotOperator() {\r\n\t\tfor (int n = 0; n < elements.size(); ++n) {\r\n\t\t\tObject ob = elements.get(n);\r\n\t\t\tif (ob instanceof Operator) {\r\n\t\t\t\tif (((Operator) ob).isNot()) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void setExclusionPatterns(java.util.Collection<String> exclusionPatterns) {\n if (exclusionPatterns == null) {\n this.exclusionPatterns = null;\n return;\n }\n\n this.exclusionPatterns = new java.util.ArrayList<String>(exclusionPatterns);\n }", "public void registerExcluded(List<String> excludedFiles) {\n excluded.addAll(excludedFiles);\n }", "public StringConf exclude(String value) { \n excludes.add(value); \n return this;\n }", "@Override\r\n\tpublic Field[] getExcludedFields() {\n\t\treturn null;\r\n\t}", "public static boolean notListvalue(String value, String list)\r\n\t{\r\n\t\treturn !isListvalue(value, list);\r\n\t}", "private void applyExclusionToSelectedNodeRecords( final boolean exclusion ) {\n\t\tfinal int[] selectedRows = getSelectedNodeRecordRows();\n\t\tfinal List<NodeRecord> records = getNodeRecords( selectedRows );\n\t\tfor ( final NodeRecord record : records ) {\n\t\t\trecord.setExclude( exclusion );\n\t\t}\n\t\trefreshRows( selectedRows );\n\t\tsetHasChanges( true );\n\t}", "public <T> void addNotInFilter(@Nullable String fieldName, @NonNull T[] values) {\n addFilter(fieldName, FilterOperator.NOT_IN, values);\n }", "public boolean isNotIn() {\n return notIn;\n }", "private IgnoreListHelper() {\n\t}", "@Test\n public void testRemove_Not_Contains_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n\n Integer item = 2;\n boolean expResult = false;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testNotAMatchOfAnyKind() {\n\t\tassertFalse(s4.equals(s3));\n\t\tassertFalse(streetAddresses.contains(s4));\n\t\tassertFalse(streetAddresses.stream().anyMatch(s -> comparator.compare(s4, s) == 0));\n\t}", "public Set getExcludeMethods() {\n return mExcludeMethods;\n }", "public java.util.List<String> getExclusionPatterns() {\n return exclusionPatterns;\n }", "public static SetExpression notIn(String propertyName, Collection<? extends Object> values) {\n return notIn(propertyName, values.toArray());\n }", "public void addDefaultExcludes()\n {\n int excludesLength = excludes == null ? 0 : excludes.length;\n String[] newExcludes;\n newExcludes = new String[ excludesLength + DEFAULTEXCLUDES.length ];\n if( excludesLength > 0 )\n {\n System.arraycopy( excludes, 0, newExcludes, 0, excludesLength );\n }\n for( int i = 0; i < DEFAULTEXCLUDES.length; i++ )\n {\n newExcludes[ i + excludesLength ] = DEFAULTEXCLUDES[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n }\n excludes = newExcludes;\n }", "@Test\n public void testExcludesuser() throws Exception {\n String testName = \"excludesuser\";\n EkstaziPaths.removeEkstaziDirectories(getClass(), testName);\n executeCleanTestStep(testName, 0, 2);\n }", "public void setNewExcludedExtensions(List<String> excludedExtenions) {\n\t\tthis.filter = new Filter(excludedExtenions);\n\t}", "public Instances notCoveredBy(Instances data) {\n\n Instances r = new Instances(data, data.numInstances());\n Enumeration enu = data.enumerateInstances();\n while (enu.hasMoreElements()) {\n\tInstance i = (Instance) enu.nextElement();\n\tif (resultRule(i) == -1) {\n\t r.add(i);\n\t}\n }\n r.compactify();\n return r;\n }", "public static void ignoreElements() {\n Observable.fromIterable(Utils.getData())\n .ignoreElements()\n .subscribe(new MyCompletableObserver());\n }", "public static List<String> listDiffWithExclusion(@Nonnull List<String> existing, @Nonnull List<String> updated,\n @Nonnull List<Pattern> exclusions) {\n existing.removeAll(updated);\n\n return existing.stream()\n .filter(s -> exclusions.stream().noneMatch(p -> p.matcher(s).find()))\n .collect(Collectors.toList());\n }", "private boolean isPackageExcluded(final FullIdent fullIdent) {\n Boolean result = null;\n final String packageName = fullIdent.getText();\n for (final String excludesPackageName : excludePackages) {\n if (packageName.startsWith(excludesPackageName)) {\n result = true;\n break;\n }\n }\n if (result == null) {\n for (final String includePackageName : packages) {\n if (packageName.startsWith(includePackageName)) {\n result = false;\n break;\n }\n }\n }\n if (result == null) {\n result = true;\n }\n return result;\n }", "public static void main(String[] args) {\nArrayList<String> al1= new ArrayList<String>();\nal1.add(\"a\");\nal1.add(\"b\");\nal1.add(\"a\");\nal1.add(\"d\");\nal1.add(\"e\");\nal1.add(\"e\");\n\nArrayList<String> al2=new ArrayList<String>();\nal2.add(\"a\");\nal2.add(\"e\");\n\n// al1.removeAll(al2); --> b/d\nal1.retainAll(al2);\n\nfor(String a:al1)\nSystem.out.println(a);\n}", "@Test\r\n public void testRegexpSetExclusion() {\r\n rs.getRegexp(reString);\r\n final Set<String> s1 = rs.getRegexpSet();\r\n stringSet.add(reString);\r\n s1.removeAll(stringSet);\r\n assertTrue(s1.isEmpty());\r\n }", "public static boolean isAllNotEqual(String str, String... strs) {\n\treturn null != str && null != strs && !Arrays.asList(strs).contains(str);\n }", "public static void main(String[] args) {\n\n List<String> listOfStrings= new ArrayList<>();\n listOfStrings.add(\"Jeden\");\n listOfStrings.add(\"Dwa\");\n listOfStrings.add(\"Trzy\");\n listOfStrings.add(\"Cztery\");\n listOfStrings.add(\"Piec\");\n\n boolean contains=listOfStrings.contains(\"Jeden\");\n boolean notContains=listOfStrings.contains(\"Szesc\");\n System.out.println(contains);\n System.out.println(notContains);\n }", "private void setExcludeUnlistedClasses(String value) {\n if (!_excludeUnlistedSet) {\n BigDecimal version = getPersistenceVersion();\n boolean excludeUnlisted;\n if (version.compareTo(VERSION_1_0) > 0) {\n excludeUnlisted = !(\"false\".equalsIgnoreCase(value));\n } else {\n excludeUnlisted = \"true\".equalsIgnoreCase(value);\n }\n _info.setExcludeUnlistedClasses(excludeUnlisted);\n _excludeUnlistedSet = true;\n }\n }", "public SamFilterParamsBuilder excludeMated(final boolean val) {\n mExcludeMated = val;\n return this;\n }", "public void disableRemoveFromList() {\n System.out.println(\"disable remove from list\");\n members_addToList.setDisable(false);\n members_removeFromList.setDisable(true);\n teams_addToList.setDisable(false);\n teams_removeFromList.setDisable(true);\n \n }", "public static <T> List<T> difference(List<T> a, List<T> b) {\n\t\tList<T> acc = new ArrayList<T>();\n\t\tfor (T t : a)\n\t\t\tif (!b.contains(t))\n\t\t\t\tacc.add(t);\n\t\treturn acc;\n\t}" ]
[ "0.7621308", "0.6857722", "0.67650336", "0.6674922", "0.66341263", "0.65977865", "0.6536632", "0.6517297", "0.6437787", "0.6283926", "0.6210879", "0.62051344", "0.61924267", "0.6179424", "0.6156248", "0.6069186", "0.60099226", "0.60092324", "0.60038835", "0.6001229", "0.5999036", "0.5975839", "0.59598374", "0.59536636", "0.5943307", "0.59138656", "0.5883306", "0.58724385", "0.58558214", "0.58046466", "0.57662755", "0.57259774", "0.5724976", "0.57234263", "0.57225364", "0.5714352", "0.5709158", "0.57074463", "0.57011396", "0.56815284", "0.5678982", "0.5677908", "0.5670251", "0.5662993", "0.56623936", "0.5596758", "0.5591265", "0.55871177", "0.5585241", "0.5580723", "0.55742246", "0.5551388", "0.55495036", "0.5537539", "0.55316937", "0.5509013", "0.5495976", "0.54933256", "0.54932183", "0.54842377", "0.5472133", "0.5469166", "0.54664993", "0.54661816", "0.54631543", "0.5444693", "0.5438997", "0.54310495", "0.5422752", "0.54217917", "0.540872", "0.5357067", "0.53389126", "0.53363657", "0.5325191", "0.53169763", "0.53163034", "0.5315791", "0.53051835", "0.5284155", "0.526848", "0.5266769", "0.5266495", "0.5258171", "0.5242648", "0.5237105", "0.5236775", "0.5223096", "0.5219298", "0.52149016", "0.521094", "0.52095234", "0.5197068", "0.51954573", "0.51884353", "0.5188278", "0.5176283", "0.51752836", "0.51538527", "0.51462424", "0.51436937" ]
0.0
-1
Test for with just Include list
public void test6() throws Exception { //$NON-NLS-1$ IFolder buildFolder = newTest("test6"); //$NON-NLS-1$ String buildXMLPath = buildFolder.getFile("build.xml").getLocation().toOSString(); Properties properties = new Properties(); //$NON-NLS-1$ //$NON-NLS-2$ properties.put("reference_location", buildFolder.getFile("before").getLocation().toOSString()); //$NON-NLS-1$ //$NON-NLS-2$ properties.put("current_location", buildFolder.getFile("after").getLocation().toOSString()); //$NON-NLS-1$ properties.put("report_location", buildFolder.getLocation().toOSString()); //$NON-NLS-1$ runAntScript(buildXMLPath, new String[] { "run" }, buildFolder.getLocation().toOSString(), properties); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse("allNonApiBundles must not exist", buildFolder.getFolder("allNonApiBundles").exists()); //$NON-NLS-1$ IFolder folder = buildFolder.getFolder("deltatest2"); //$NON-NLS-1$ assertTrue("deltatest2 folder must exist", folder.exists()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue("report.xml file must be there", folder.getFile("report.xml").exists()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIncludes(String includes)\n {\n this.includes = includes;\n }", "public void setIncludes( List<IncludeClasses> includes )\n {\n this.includes = includes;\n }", "public boolean getIncluded();", "public boolean isIncluded(IResource included) {\n ensureInitialized();\n String mapKey = getMapKey(included);\n List<String> result = mIncludedBy.get(mapKey);\n if (result == null) {\n String name = getResourceName(included);\n if (!name.equals(mapKey)) {\n result = mIncludedBy.get(name);\n }\n }\n\n return result != null && result.size() > 0;\n }", "public void includes(Object includeRoots) {\n includes.from(includeRoots);\n }", "public String[] getIncludes()\n {\n return m_includes;\n }", "private void setIncludedBy(String includer, List<String> included) {\n for (String target : included) {\n List<String> list = mIncludedBy.get(target);\n if (list == null) {\n list = new ArrayList<String>(2); // We don't expect many includes\n mIncludedBy.put(target, list);\n }\n if (!list.contains(includer)) {\n list.add(includer);\n }\n }\n }", "public List<IncludeClasses> getIncludes()\n {\n return includes;\n }", "protected boolean isIncluded( String name )\n {\n for( int i = 0; i < includes.length; i++ )\n {\n if( matchPath( includes[ i ], name, isCaseSensitive ) )\n {\n return true;\n }\n }\n return false;\n }", "private List<String> getIncludesFrom(String includer) {\n ensureInitialized();\n\n return mIncludes.get(includer);\n }", "@Nullable\n public List<Reference> getIncludedBy(IResource included) {\n ensureInitialized();\n String mapKey = getMapKey(included);\n List<String> result = mIncludedBy.get(mapKey);\n if (result == null) {\n String name = getResourceName(included);\n if (!name.equals(mapKey)) {\n result = mIncludedBy.get(name);\n }\n }\n\n if (result != null && result.size() > 0) {\n List<Reference> references = new ArrayList<Reference>(result.size());\n for (String s : result) {\n references.add(new Reference(mProject, s));\n }\n return references;\n } else {\n return null;\n }\n }", "IIndexFragmentInclude[] findIncludedBy(IIndexFragmentFile file) throws CoreException;", "private static void parseInclude(Document doc) throws XPathExpressionException, IOException, SAXException {\n NodeList nodeList = (NodeList) XPATH_SERVER_INCLUDE.evaluate(doc, XPathConstants.NODESET);\n\n for (int i = 0; i < nodeList.getLength(); i++) {\n String nodeValue = nodeList.item(i).getAttributes().getNamedItem(\"location\").getNodeValue();\n\n if (!nodeValue.isEmpty()) {\n Document docIncl = getIncludeDoc(nodeValue);\n\n if (docIncl != null) {\n parseApplication(docIncl, XPATH_SERVER_APPLICATION);\n parseApplication(docIncl, XPATH_SERVER_WEB_APPLICATION);\n parseApplication(docIncl, XPATH_SERVER_ENTERPRISE_APPLICATION);\n // handle nested include elements\n parseInclude(docIncl);\n }\n }\n }\n }", "public Vector<YANG_Include> getIncludes() {\n\t\tVector<YANG_Include> includes = new Vector<YANG_Include>();\n\t\tfor (Enumeration<YANG_Linkage> el = getLinkages().elements(); el\n\t\t\t\t.hasMoreElements();) {\n\t\t\tYANG_Linkage linkage = el.nextElement();\n\t\t\tif (linkage instanceof YANG_Include)\n\t\t\t\tincludes.add((YANG_Include) linkage);\n\t\t}\n\t\treturn includes;\n\t}", "Rule Include() {\n // Push 1 IncludeNode onto the value stack\n return Sequence(\n \"include\",\n WhiteSpace(),\n Literal(),\n actions.pushIncludeNode(),\n WhiteSpace());\n }", "public void setIncluded(boolean included);", "private boolean validateInclude(\n ActionExecutionContext actionExecutionContext,\n Set<Artifact> allowedIncludes,\n Set<PathFragment> looseHdrsDirs,\n Iterable<PathFragment> ignoreDirs,\n Artifact include) {\n return include.isFileType(CppFileTypes.CPP_MODULE)\n ||\n // TODO(b/145253507): Exclude objc module maps from check, due to bad interaction with\n // local_objc_modules feature.\n include.isFileType(CppFileTypes.OBJC_MODULE_MAP)\n ||\n // It's a declared include/\n allowedIncludes.contains(include)\n ||\n // Ignore headers from built-in include directories.\n FileSystemUtils.startsWithAny(include.getExecPath(), ignoreDirs)\n || isDeclaredIn(cppConfiguration(), actionExecutionContext, include, looseHdrsDirs);\n }", "public IAstPreprocessorIncludeDirective[] getIncludeFiles();", "protected boolean isIncluded(String name) {\r\n return (this.includeRE == null) ? true : this.includeRE.match(name);\r\n }", "private static boolean scanFiles_isIncluded(String path, String[] includes, String[] excludes) {\n if (includes != null && includes.length != 0) {\n boolean included = false;\n for (int i = 0; !included && i < includes.length; i++) {\n if (match(includes[i], path) || match(includes[i] + \"/*\", path))\n included = true;\n }\n if (!included)\n return false;\n }\n // if null, means exclude nothing\n if (excludes != null && excludes.length != 0) {\n for (int i = 0; i < excludes.length; i++) {\n if (match(excludes[i], path))\n return false;\n }\n }\n return true;\n }", "public IAstPreprocessorIncludeDirective findInclude(ISourceFile file);", "@NonNull\n private static List<String> findIncludesInDocument(@NonNull Document document) {\n List<String> includes = findIncludesInDocument(document, null);\n if (includes == null) {\n includes = Collections.emptyList();\n }\n return includes;\n }", "public boolean isIsIncluded() {\n return isIncluded;\n }", "private boolean readSettings() {\n try {\n String encoded = mProject.getPersistentProperty(CONFIG_INCLUDES);\n if (encoded != null) {\n mIncludes = decodeMap(encoded);\n\n // Set up a reverse map, pointing from included files to the files that\n // included them\n mIncludedBy = new HashMap<String, List<String>>(2 * mIncludes.size());\n for (Map.Entry<String, List<String>> entry : mIncludes.entrySet()) {\n // File containing the <include>\n String includer = entry.getKey();\n // Files being <include>'ed by the above file\n List<String> included = entry.getValue();\n setIncludedBy(includer, included);\n }\n\n return true;\n }\n } catch (CoreException e) {\n AdtPlugin.log(e, \"Can't read include settings\");\n }\n\n return false;\n }", "private static void includeExtract(IASTPreprocessorIncludeStatement include) {\n\t\tvxlFragment.append(VxlManager.includeDirective(StringProcessor.processString(include.getName().toString())));\n\t}", "void include(Set<S> segments);", "public IAstPreprocessorIncludeDirective findInclude(String string);", "public void testIncludeMode()\r\n {\r\n IncludeDirective include = \r\n new IncludeDirective( IncludeDirective.REF, null, \"value\", PROPERTIES );\r\n assertEquals( \"mode\", IncludeDirective.REF, include.getMode() );\r\n }", "private boolean isIncluded(ArrayList<Instance> inputs, Instance ins){\n boolean isAdded = false;\n for (Instance i: inputs){\n if (i == ins)\n return true;\n Concept temp = i.getConcept();\n while (true){\n if (temp == null)\n break;\n if (temp == ins.getConcept())\n return true;\n temp = temp.getSuperConcept(); \n }\n }\n return isAdded;\n }", "public void testIncludeValue()\r\n {\r\n IncludeDirective include = \r\n new IncludeDirective( IncludeDirective.REF, null, \"value\", PROPERTIES );\r\n assertEquals( \"value\", \"value\", include.getValue() );\r\n }", "protected boolean couldHoldIncluded( String name )\n {\n for( int i = 0; i < includes.length; i++ )\n {\n if( matchPatternStart( includes[ i ], name, isCaseSensitive ) )\n {\n return true;\n }\n }\n return false;\n }", "public Agg include(Object value) {\n attrList.put(\"include\", value);\n return this;\n }", "@Test\n public void fieldInclude() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // We can use an INCLUDE field to import a portion of another document in the local file system.\n // The bookmark from the other document that we reference with this field contains this imported portion.\n FieldInclude field = (FieldInclude) builder.insertField(FieldType.FIELD_INCLUDE, true);\n field.setSourceFullName(getMyDir() + \"Bookmarks.docx\");\n field.setBookmarkName(\"MyBookmark1\");\n field.setLockFields(false);\n field.setTextConverter(\"Microsoft Word\");\n\n Assert.assertTrue(field.getFieldCode().matches(\" INCLUDE .* MyBookmark1 \\\\\\\\c \\\"Microsoft Word\\\"\"));\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.INCLUDE.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.INCLUDE.docx\");\n field = (FieldInclude) doc.getRange().getFields().get(0);\n\n Assert.assertEquals(FieldType.FIELD_INCLUDE, field.getType());\n Assert.assertEquals(\"First bookmark.\", field.getResult());\n Assert.assertTrue(field.getFieldCode().matches(\" INCLUDE .* MyBookmark1 \\\\\\\\c \\\"Microsoft Word\\\"\"));\n\n Assert.assertEquals(getMyDir() + \"Bookmarks.docx\", field.getSourceFullName());\n Assert.assertEquals(\"MyBookmark1\", field.getBookmarkName());\n Assert.assertFalse(field.getLockFields());\n Assert.assertEquals(\"Microsoft Word\", field.getTextConverter());\n }", "@VisibleForTesting\n /* package */ void setIncluded(String includer, List<String> included, boolean detectCycles) {\n // Remove previously linked inverse mappings\n List<String> oldIncludes = mIncludes.get(includer);\n if (oldIncludes != null && oldIncludes.size() > 0) {\n for (String includee : oldIncludes) {\n List<String> includers = mIncludedBy.get(includee);\n if (includers != null) {\n includers.remove(includer);\n }\n }\n }\n\n mIncludes.put(includer, included);\n // Reverse mapping: for included items, point back to including file\n setIncludedBy(includer, included);\n\n if (detectCycles) {\n detectCycles(includer);\n }\n }", "private boolean isIncluded(StackTraceElementProxy step) {\n if (!excludes.isEmpty()) {\n StackTraceElement stackTraceElement = step.getStackTraceElement();\n String testString = stackTraceElement.getClassName() + \".\" + stackTraceElement.getMethodName();\n \n for (Pattern exclusionPattern : excludes) {\n if (exclusionPattern.matcher(testString).find()) {\n return false;\n }\n }\n }\n return true;\n }", "void processAlwaysInclude(SynchronizationRequest req, Zipper zipper) \n throws ConfigException {\n\n if (req.isClientRepositoryInfoSent()) {\n\n // list of application names in client\n Set clientInfo = req.getClientRepositoryInfo();\n\n // name of server instance\n String clientName = req.getServerName();\n\n // config context\n ConfigContext ctx = _ctx.getConfigContext();\n\n // client is a server instance\n if (ServerHelper.isAServer(ctx, clientName)) {\n\n // associated applications for the server\n ApplicationRef[] appRefs = \n ServerHelper.getApplicationReferences(ctx, clientName);\n\n for (int i=0; i<appRefs.length; i++) {\n String appName = appRefs[i].getRef();\n\n // if client does not have the application\n if (!clientInfo.contains(appName)) {\n zipper.addToAlwaysIncludeList(appName);\n }\n }\n }\n }\n }", "@TestProperties(name = \"test the parameters sorting\")\n\tpublic void testEmptyInclude(){\n\t}", "public TransferAllDetails include() {\n return this.include;\n }", "private static void parseIncludeVariables(Document doc) throws XPathExpressionException, IOException, SAXException {\n NodeList nodeList = (NodeList) XPATH_SERVER_INCLUDE.evaluate(doc, XPathConstants.NODESET);\n\n for (int i = 0; i < nodeList.getLength(); i++) {\n String nodeValue = nodeList.item(i).getAttributes().getNamedItem(\"location\").getNodeValue();\n\n if (!nodeValue.isEmpty()) {\n Document docIncl = getIncludeDoc(nodeValue);\n\n if (docIncl != null) {\n parseVariables(docIncl);\n // handle nested include elements\n parseIncludeVariables(docIncl);\n }\n }\n }\n }", "public final void mINCLUDING() throws RecognitionException {\n try {\n int _type = INCLUDING;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2823:3: ( 'including' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2824:3: 'including'\n {\n match(\"including\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public boolean isEverythingIncluded()\n {\n return everythingIncluded;\n }", "public IAstSourceFile findIncludeFile(ISourceFile file);", "private Item getIncludedItem(Element itemElement, ArrayList<Item> items) {\n Item include = null;\n for (int i = 0; i <= items.size() - 1; i++) {\n if (items.get(i).getName()\n .equals(itemElement.getElementsByTagName(\"name\").item(0).getTextContent())) {\n include = items.get(i);\n }\n }\n return include;\n }", "public void setIncludedQualifiers(String includedQualifiers) {\r\n this.includedQualifiers = includedQualifiers;\r\n }", "private void handleInclude() {\n definedGrammar.include(getGrammar(getAbsPath()));\n }", "public void setSingleInclude(final SingleIncludeChecker singleInclude) {\n this.singleInclude = singleInclude;\n }", "static Set<SchemaModelImpl> getMegaIncludedModels(\n SchemaModelImpl sModel, String soughtNs, ResolveSession session) {\n //\n// if (true) {\n// // For optimization tests only\n // Uncomment and run tests to check how often the mega-include is called. \n// throw new RuntimeException(\"MEGA INCLUDE\");\n// }\n //\n Schema mySchema = sModel.getSchema();\n if (mySchema == null) {\n return Collections.EMPTY_SET;\n }\n //\n // If the current model has empty target namespace, then it can be included anywhere\n // If the current model has not empty target namespace, then it can be included only\n // to models with the same target namespace.\n String myTargetNs = mySchema.getTargetNamespace();\n if (myTargetNs != null && !Util.equal(soughtNs, myTargetNs)) {\n return Collections.EMPTY_SET;\n }\n //\n // The graph is lazy initialized in session and can be reused during\n // the resolve session.\n BidirectionalGraph<SchemaModelImpl> graph = \n session.getInclusionGraph(sModel, soughtNs);\n //\n // Now there is forward and back inclusion graphs.\n if (graph.isEmpty()) {\n return Collections.EMPTY_SET;\n }\n //\n // Look for the roots of inclusion.\n // Root s the top schema model, which includes current schema recursively,\n // but isn't included anywhere itself.\n Set<SchemaModelImpl> inclusionRoots = graph.getRoots(sModel, false);\n //\n HashSet<SchemaModelImpl> result = new HashSet<SchemaModelImpl>();\n for (SchemaModelImpl root : inclusionRoots) {\n // The namespace of the inclusion root has to be exectly the same\n // as required.\n if (Util.equal(root.getSchema().getTargetNamespace(), soughtNs)) {\n MultivalueMap.Utils.populateAllSubItems(graph, root, sModel, result);\n }\n }\n //\n result.remove(sModel);\n //\n return result;\n }", "public void setIncludes( String[] includes )\n {\n if( includes == null )\n {\n this.includes = null;\n }\n else\n {\n this.includes = new String[ includes.length ];\n for( int i = 0; i < includes.length; i++ )\n {\n String pattern;\n pattern = includes[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n if( pattern.endsWith( File.separator ) )\n {\n pattern += \"**\";\n }\n this.includes[ i ] = pattern;\n }\n }\n }", "@Override\n public NestedSet<Artifact> getDeclaredIncludeSrcs() {\n return ccCompilationContext.getDeclaredIncludeSrcs();\n }", "public void setQuoteIncludePath(@Nonnull List<String> path) {\r\n this.quoteincludepath = path;\r\n }", "protected List getDependenciesIncludeList()\n throws MojoExecutionException\n {\n List includes = new ArrayList();\n\n for ( Iterator i = getDependencies().iterator(); i.hasNext(); )\n {\n Artifact a = (Artifact) i.next();\n\n if ( project.getGroupId().equals( a.getGroupId() ) && project.getArtifactId().equals( a.getArtifactId() ))\n {\n continue;\n }\n\n includes.add( a.getGroupId() + \":\" + a.getArtifactId() );\n }\n\n return includes;\n }", "@Internal(\"The paths for include directories are tracked via the includePaths property, the contents are tracked via discovered inputs\")\n public ConfigurableFileCollection getIncludes() {\n return includes;\n }", "public boolean isXIncludeAware() {\r\n return xIncludeAware != null && xIncludeAware.booleanValue();\r\n }", "boolean hasContains();", "public final void mT__154() throws RecognitionException {\r\n try {\r\n int _type = T__154;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // InternalSpringConfigDsl.g:155:8: ( 'include' )\r\n // InternalSpringConfigDsl.g:155:10: 'include'\r\n {\r\n match(\"include\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "public static boolean include(String str, String[] strArray) {\n return in(str, strArray);\n }", "public String getHeadIncludes() {\n return (String) get(\"head_includes\");\n }", "protected boolean include(@Nonnull VirtualFile file)\r\n throws IOException,\r\n LexerException {\r\n // System.out.println(\"Try to include \" + ((File)file).getAbsolutePath());\r\n if (!file.isFile())\r\n return false;\r\n if (getFeature(Feature.DEBUG))\r\n LOG.debug(\"pp: including \" + file);\r\n includes.add(file);\r\n push_source(file.getSource(), true);\r\n return true;\r\n }", "protected boolean allow(String value) {\n if(includes.isEmpty()) {\n if(excludes.isEmpty()) {\n return true;\n } else {\n return !excludes.contains(value);\n }\n } else {\n boolean rv = includes.contains(value);\n if(!rv) return false;\n if(excludes.isEmpty()) {\n return true;\n } else {\n return !excludes.contains(value);\n }\n }\n }", "private boolean mustProcess(final IFile file) {\n\t\t// include paths?\n\t\tif (includePaths.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// paths\n\t\tfinal IPath path = file.getProjectRelativePath();\n\t\tfinal IPath parent = path.removeLastSegments(1);\n\n\t\t// check within the parent\n\t\tif (includePaths.contains(parent)) {\n\t\t\treturn true;\n\t\t} else if (excludePaths.contains(parent)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// check children\n\t\tfinal Predicate<IPath> predicate = p -> p.isPrefixOf(path);\n\t\treturn includePaths.stream().anyMatch(predicate);\n\t}", "public IAstSourceFile findIncludeFile(String string);", "protected boolean include(@Nonnull Iterable<String> path, @Nonnull String name)\r\n throws IOException,\r\n LexerException {\r\n for (String dir : path) {\r\n VirtualFile file = getFileSystem().getFile(dir, name);\r\n if (include(file))\r\n return true;\r\n }\r\n return false;\r\n }", "public void setIsIncluded(boolean value) {\n this.isIncluded = value;\n }", "boolean getContainEntities();", "private static boolean isDeclaredIn(\n CppConfiguration cppConfiguration,\n ActionExecutionContext actionExecutionContext,\n Artifact input,\n Set<PathFragment> declaredIncludeDirs) {\n // If it's a derived artifact, then it MUST be listed in \"srcs\" as checked above.\n // We define derived here as being not source and not under the include link tree.\n if (!input.isSourceArtifact()\n && !input.getRoot().getExecPath().getBaseName().equals(\"include\")) {\n return false;\n }\n // Need to do dir/package matching: first try a quick exact lookup.\n PathFragment includeDir = input.getRootRelativePath().getParentDirectory();\n if (!cppConfiguration.validateTopLevelHeaderInclusions() && includeDir.isEmpty()) {\n return true; // Legacy behavior nobody understands anymore.\n }\n if (declaredIncludeDirs.contains(includeDir)) {\n return true; // OK: quick exact match.\n }\n // Not found in the quick lookup: try the wildcards.\n for (PathFragment declared : declaredIncludeDirs) {\n if (declared.getBaseName().equals(\"**\")) {\n if (includeDir.startsWith(declared.getParentDirectory())) {\n return true; // OK: under a wildcard dir.\n }\n }\n }\n // Still not found: see if it is in a subdir of a declared package.\n Root root = actionExecutionContext.getRoot(input);\n Path dir = actionExecutionContext.getInputPath(input).getParentDirectory();\n if (dir.equals(root.asPath())) {\n return false; // Bad: at the top, give up.\n }\n // As we walk up along parent paths, we'll need to check whether Bazel build files exist, which\n // would mean that the file is in a sub-package and not a subdir of a declared include\n // directory. Do so lazily to avoid stats when this file doesn't lie beneath any declared\n // include directory.\n List<Path> packagesToCheckForBuildFiles = new ArrayList<>();\n while (true) {\n packagesToCheckForBuildFiles.add(dir);\n dir = dir.getParentDirectory();\n if (dir.equals(root.asPath())) {\n return false; // Bad: at the top, give up.\n }\n if (declaredIncludeDirs.contains(root.relativize(dir))) {\n for (Path dirOrPackage : packagesToCheckForBuildFiles) {\n FileStatus fileStatus = null;\n try {\n // This file system access shouldn't exist at all and has to go away when this is\n // rewritten in Starlark.\n // TODO(b/187366935): Consider globbing everything eagerly instead.\n fileStatus =\n actionExecutionContext\n .getSyscallCache()\n .statIfFound(dirOrPackage.getRelative(BUILD_PATH_FRAGMENT), Symlinks.FOLLOW);\n } catch (IOException e) {\n // Previously, we used Path.exists() to check whether the BUILD file exists. This did\n // return false on any error. So by ignoring the exception are maintaining current\n // behaviour.\n }\n if (fileStatus != null && fileStatus.isFile()) {\n return false; // Bad: this is a sub-package, not a subdir of a declared package.\n }\n }\n return true; // OK: found under a declared dir.\n }\n }\n }", "IncludeType createIncludeType();", "AggregationBuilder buildIncludeFilteredAggregation(Set<String> includeNames);", "@And(\"response customer properties includes\")\n public void response_properties_includes(Map<String, Object> responseFields) {\n Map<String, Object> map = mapper.convertValue(customerReponse.getProperties(), new TypeReference<Map<String, Object>>() {\n });\n compareFields(map, responseFields);\n }", "@VisibleForTesting\n @NonNull\n static List<String> findIncludesInXml(@NonNull String xml) {\n Document document = DomUtilities.parseDocument(xml, false /*logParserErrors*/);\n if (document != null) {\n return findIncludesInDocument(document);\n }\n\n return Collections.emptyList();\n }", "boolean hasList();", "public IncludeDirective getIncludeDirective() {\n return includeDirective;\n }", "@Test\n \tpublic void whereClauseForNodeInclusion() {\n \t\tnode23.addJoin(new Inclusion(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"<=\", \"_node23.left\", \"_node42.left\"),\n \t\t\t\tjoin(\">=\", \"_node23.right\", \"_node42.right\")\n \t\t);\n \t}", "@VisibleForTesting\n @NonNull\n static List<String> findIncludes(@NonNull String xml) {\n int index = xml.indexOf(ATTR_LAYOUT);\n if (index != -1) {\n return findIncludesInXml(xml);\n }\n\n return Collections.emptyList();\n }", "public boolean isSetIncludeVariantIds() {\r\n return this.includeVariantIds != null;\r\n }", "boolean allFileIncluded(File file){\n\t\tif(file.getName().length()==0) return false;\n\t\treturn ((file.lastModified() > OLDEST_DATE));\n\t}", "private Boolean HasMatch(String line, Pattern includePattern, Pattern excludePattern)\n {\n Boolean foundMatch = false;\n\n Matcher includeMatcher = includePattern.matcher(line);\n Matcher excludeMatcher = excludePattern.matcher(line);\n\n try\n {\n if (includeMatcher.find() && !excludeMatcher.find())\n {\n foundMatch = true;\n }\n\n\n } catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to find matches in: '%s'.\", line);\n e.printStackTrace();\n }\n\n return (foundMatch);\n }", "@And(\"response customer includes\")\n public void response_customer_includes(Map<String, Object> responseFields) {\n Map<String, Object> map = mapper.convertValue(customerReponse, new TypeReference<Map<String, Object>>() {\n });\n compareFields(map, responseFields);\n }", "@Test\n public void testRetainAll() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.retainAll(c);\n\n assertEquals(expectedResult, result);\n }", "private void include(\r\n @CheckForNull String parent, int line,\r\n @Nonnull String name, boolean quoted, boolean next)\r\n throws IOException,\r\n LexerException {\r\n if (name.startsWith(\"/\")) {\r\n VirtualFile file = filesystem.getFile(name);\r\n if (include(file))\r\n return;\r\n StringBuilder buf = new StringBuilder();\r\n buf.append(\"File not found: \").append(name);\r\n error(line, 0, buf.toString());\r\n return;\r\n }\r\n\r\n VirtualFile pdir = null;\r\n if (quoted) {\r\n if (parent != null) {\r\n VirtualFile pfile = filesystem.getFile(parent);\r\n pdir = pfile.getParentFile();\r\n }\r\n if (pdir != null) {\r\n VirtualFile ifile = pdir.getChildFile(name);\r\n if (include(ifile))\r\n return;\r\n }\r\n if (include(quoteincludepath, name))\r\n return;\r\n } else {\r\n int idx = name.indexOf('/');\r\n if (idx != -1) {\r\n String frameworkName = name.substring(0, idx);\r\n String headerName = name.substring(idx + 1);\r\n String headerPath = frameworkName + \".framework/Headers/\" + headerName;\r\n if (include(frameworkspath, headerPath))\r\n return;\r\n }\r\n }\r\n\r\n if (include(sysincludepath, name))\r\n return;\r\n\r\n StringBuilder buf = new StringBuilder();\r\n buf.append(\"File not found: \").append(name);\r\n buf.append(\" in\");\r\n if (quoted) {\r\n buf.append(\" .\").append('(').append(pdir).append(')');\r\n for (String dir : quoteincludepath)\r\n buf.append(\" \").append(dir);\r\n }\r\n for (String dir : sysincludepath)\r\n buf.append(\" \").append(dir);\r\n error(line, 0, buf.toString());\r\n }", "private boolean isScopeIncluded(Artifact artifact) {\n\t\tboolean include = false;\n\t\tfor (String scope:scopes)\n\t\t{\n\t\t\t//If the artifact matches the root project it should always be included (scope is not relevant)\n\t\t\tif (rootProject != null && rootProject.getGroupId().equals(artifact.getGroupId()) && rootProject.getArtifactId().equals(artifact.getArtifactId()))\n\t\t\t{\n\t\t\t\tinclude = true;\n\t\t\t}\n\t\t\telse if (artifact.getScope() == null && scope.equals(\"compile\"))\n\t\t\t{\n\t\t\t\tinclude = true;\n\t\t\t}\n\t\t\telse if (artifact.getScope() != null && artifact.getScope().equals(scope))\n\t\t\t{\n\t\t\t\tinclude = true;\n\t\t\t}\n\t\t}\n\t\treturn include;\n\t}", "public void testIncludeCategory()\r\n {\r\n IncludeDirective include = \r\n new IncludeDirective( IncludeDirective.REF, Category.PROTECTED, \"value\", PROPERTIES );\r\n assertEquals( \"category\", Category.PROTECTED, include.getCategory() );\r\n }", "@Test\n public void week_firstMondayOfMarchInFirstWeek_true() {\n assertTrue(firstWeek.includes(firstMondayOfMarch));\n }", "private XIncluder() {}", "protected boolean checkSelfInclusion(Vector mbrs) {\n Object mbr;\n if(mbrs == null)\n return false;\n for(int i=0; i < mbrs.size(); i++) {\n mbr=mbrs.elementAt(i);\n if(mbr != null && local_addr.equals(mbr))\n return true;\n }\n return false;\n }", "public boolean includes(LinkedPosition position) {\n\t\treturn includes(position.getDocument(), position.getOffset(), position.getLength());\n\t}", "private void doIncludeModule(RubyModule baseModule) {\n List<RubyModule> modulesToInclude = gatherModules(baseModule);\n \n RubyModule currentInclusionPoint = this;\n ModuleLoop: for (RubyModule nextModule : modulesToInclude) {\n checkForCyclicInclude(nextModule);\n \n boolean superclassSeen = false;\n \n // scan class hierarchy for module\n for (RubyClass nextClass = this.getSuperClass(); nextClass != null; nextClass = nextClass.getSuperClass()) {\n if (doesTheClassWrapTheModule(nextClass, nextModule)) {\n // next in hierarchy is an included version of the module we're attempting,\n // so we skip including it\n \n // if we haven't encountered a real superclass, use the found module as the new inclusion point\n if (!superclassSeen) currentInclusionPoint = nextClass;\n \n continue ModuleLoop;\n } else {\n superclassSeen = true;\n }\n }\n \n currentInclusionPoint = proceedWithInclude(currentInclusionPoint, nextModule);\n }\n }", "public final void mINCLUDE() throws RecognitionException {\r\n try {\r\n int _type = INCLUDE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:265:9: ( '#include' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:265:11: '#include'\r\n {\r\n match(\"#include\"); \r\n\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "public boolean isInList();", "@Override\n\tpublic boolean getIncludesNull() {\n\t\treturn false;\n\t}", "public boolean isInterestedInAllItems();", "public boolean includes(DocumentEvent event) {\n\t\treturn includes(event.getDocument(), event.getOffset(), event.getLength());\n\t}", "@Test\r\n\tpublic void testContains() {\r\n\t\tAssert.assertTrue(list.contains(new Munitions(2, 3, \"iron\")));\r\n\t\tAssert.assertFalse(list.contains(new Munitions(2, 5, \"ferrum\")));\r\n\t}", "boolean hasImported();", "public static Predicate<CharSequence> includesExcludes(Iterable<String> includes, Iterable<String> excludes) {\n checkNotNull(includes, \"includes\");\n checkNotNull(excludes, \"excludes\");\n Predicate<CharSequence> incl = isEmpty(includes) ? ALWAYS_TRUE : containsAny(includes);\n Predicate<CharSequence> excl = isEmpty(excludes) ? ALWAYS_FALSE : containsAny(excludes);\n return and(incl, not(excl));\n }", "@Override\n\tpublic boolean test(TreeNode node) {\n\t\tif (includedInResultByNode.containsKey(node)) {\n\t\t\treturn includedInResultByNode.get(node);\n\t\t} else if (node.getParent() == null || node.getParent() == evaluationRootNode) { // this is a root node, so it is considered eager\n\t\t\tincludedInResultByNode.put(node, true);\n\t\t\treturn true;\n\t\t} else if (node.getParent().isLazyChildren() && !node.getParent().isExpanded()) { // parent has lazy children\n\t\t\tincludedInResultByNode.put(node, false);\n\t\t\treturn false;\n\t\t} else { // whatever holds for the parent, also holds for this node\n\t\t\tboolean parentIncluded = test(node.getParent());\n\t\t\tincludedInResultByNode.put(node, parentIncluded);\n\t\t\treturn parentIncluded;\n\t\t}\n\t}", "@Test\n public void testContainsAll_Not_Contain() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 5);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "boolean fileIncluded(File file){\n\t\tif(file.getName().length()==0) return false;\n\t\tString lcname = file.getName().trim().toLowerCase();\n\t\treturn ((lcname.endsWith(LC_JAR) ||\n\t\t lcname.endsWith(LC_SVB) ||\n\t\t lcname.endsWith(LC_EXE) ||\n\t\t lcname.endsWith(LC_DAT)) &&\n\t\t (file.lastModified() > OLDEST_DATE));\n\t}", "@Test\n\tpublic void testIncluye() {\n\t\tassertFalse(l.incluye(0));\n\t\t\n\t\t//Test de busqueda sobre el primer elemento\n\t\tl.agregar(0, 0);\n\t\tassertTrue(l.incluye(0));\n\t\tassertFalse(l.incluye(1));\n\t\t\n\t\t//Test con mas elementos\n\t\tl.agregar(1, 1);\n\t\tl.agregar(2, 2);\n\t\tassertTrue(l.incluye(1));\n\t\tassertFalse(l.incluye(4));\n\t\t\n\t}", "public boolean include(final DatabaseEngineType engine) {\n return (engine == DatabaseEngineType.DERBY)\n || (engine == DatabaseEngineType.HSQL)\n || (engine == DatabaseEngineType.MYSQL)\n || (engine == DatabaseEngineType.ORACLE)\n || (engine == DatabaseEngineType.POSTGRESQL)\n || (engine == DatabaseEngineType.SQL_SERVER)\n || (engine == DatabaseEngineType.SAPDB);\n }", "public boolean include(final DatabaseEngineType engine) {\n return (engine == DatabaseEngineType.DERBY)\n || (engine == DatabaseEngineType.HSQL)\n || (engine == DatabaseEngineType.MYSQL)\n || (engine == DatabaseEngineType.ORACLE)\n || (engine == DatabaseEngineType.POSTGRESQL)\n || (engine == DatabaseEngineType.SAPDB)\n || (engine == DatabaseEngineType.SQL_SERVER);\n }", "public boolean isProjectionIncluded() {\n return geometry.almostZero(projectionDistance);\n }" ]
[ "0.6944547", "0.6831093", "0.6710978", "0.6621914", "0.6587452", "0.6508415", "0.64230853", "0.63687444", "0.6351816", "0.63049513", "0.62709117", "0.62417346", "0.6240719", "0.6233289", "0.6206808", "0.6202088", "0.6186156", "0.6166132", "0.61474985", "0.61378336", "0.6131896", "0.6118249", "0.6006203", "0.59848255", "0.59686756", "0.5952078", "0.59482336", "0.59010977", "0.590047", "0.58946824", "0.58460784", "0.58450305", "0.57787794", "0.5752442", "0.57391727", "0.57038265", "0.5688714", "0.56794035", "0.5653274", "0.5646843", "0.5573645", "0.5543688", "0.553883", "0.55326647", "0.5516394", "0.5514265", "0.5484579", "0.5467912", "0.5431423", "0.5380425", "0.5375078", "0.5364154", "0.53398913", "0.5336452", "0.53214395", "0.5319493", "0.53056085", "0.52641386", "0.5262531", "0.52283496", "0.52236927", "0.5213702", "0.5196836", "0.5185483", "0.51823956", "0.51783055", "0.5119403", "0.509394", "0.5088362", "0.50578403", "0.50528157", "0.5047436", "0.5044137", "0.5041107", "0.50347865", "0.5005863", "0.5005792", "0.5005247", "0.50033367", "0.49906623", "0.4962551", "0.49614516", "0.49573794", "0.49536395", "0.49489495", "0.4940414", "0.49286538", "0.49265414", "0.49198735", "0.49074998", "0.489038", "0.4873285", "0.4866283", "0.48592287", "0.485824", "0.48564333", "0.48528656", "0.48520416", "0.48507446", "0.48481646", "0.4847469" ]
0.0
-1
Test for with both Exclude and Include list
public void test7() throws Exception { //$NON-NLS-1$ IFolder buildFolder = newTest("test7"); //$NON-NLS-1$ String buildXMLPath = buildFolder.getFile("build.xml").getLocation().toOSString(); Properties properties = new Properties(); //$NON-NLS-1$ //$NON-NLS-2$ properties.put("reference_location", buildFolder.getFile("before").getLocation().toOSString()); //$NON-NLS-1$ //$NON-NLS-2$ properties.put("current_location", buildFolder.getFile("after").getLocation().toOSString()); //$NON-NLS-1$ properties.put("report_location", buildFolder.getLocation().toOSString()); //$NON-NLS-1$ runAntScript(buildXMLPath, new String[] { "run" }, buildFolder.getLocation().toOSString(), properties); //$NON-NLS-1$ //$NON-NLS-2$ assertFalse("allNonApiBundles must not exist", buildFolder.getFolder("allNonApiBundles").exists()); //$NON-NLS-1$ IFolder folder = buildFolder.getFolder("deltatest"); //$NON-NLS-1$ assertTrue("deltatest folder must exist", folder.exists()); //$NON-NLS-1$ //$NON-NLS-2$ assertTrue("report.xml file must be there", folder.getFile("report.xml").exists()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isExcluded();", "private boolean isIncluded(StackTraceElementProxy step) {\n if (!excludes.isEmpty()) {\n StackTraceElement stackTraceElement = step.getStackTraceElement();\n String testString = stackTraceElement.getClassName() + \".\" + stackTraceElement.getMethodName();\n \n for (Pattern exclusionPattern : excludes) {\n if (exclusionPattern.matcher(testString).find()) {\n return false;\n }\n }\n }\n return true;\n }", "public void setExcludes(String excludes)\n {\n this.excludes = excludes;\n }", "public static Predicate<CharSequence> includesExcludes(Iterable<String> includes, Iterable<String> excludes) {\n checkNotNull(includes, \"includes\");\n checkNotNull(excludes, \"excludes\");\n Predicate<CharSequence> incl = isEmpty(includes) ? ALWAYS_TRUE : containsAny(includes);\n Predicate<CharSequence> excl = isEmpty(excludes) ? ALWAYS_FALSE : containsAny(excludes);\n return and(incl, not(excl));\n }", "public void setExcludes( List<ExcludeClasses> excludes )\n {\n this.excludes = excludes;\n }", "private static boolean scanFiles_isIncluded(String path, String[] includes, String[] excludes) {\n if (includes != null && includes.length != 0) {\n boolean included = false;\n for (int i = 0; !included && i < includes.length; i++) {\n if (match(includes[i], path) || match(includes[i] + \"/*\", path))\n included = true;\n }\n if (!included)\n return false;\n }\n // if null, means exclude nothing\n if (excludes != null && excludes.length != 0) {\n for (int i = 0; i < excludes.length; i++) {\n if (match(excludes[i], path))\n return false;\n }\n }\n return true;\n }", "static public boolean excludesAll(Collection source, Collection arg) {\n\t\tIterator it = arg.iterator();\n\t\twhile ( it.hasNext() ) {\n\t\t\tObject elem = it.next();\n\t\t\tif ( source.contains(elem) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\n\tpublic void testExcludeEligible() throws InterruptedException, ExecutionException,\n\t\t\tIOException, TimeoutException {\n\t\ttestExcludeEligible(null, null, null, Arrays.asList(1, 2));\n\t\ttestExcludeEligible(Boolean.TRUE, null, null, Arrays.asList(2));\n\t\ttestExcludeEligible(Boolean.FALSE, null, null, Arrays.asList(1, 2));\n\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), null,\n\t\t\t\tArrays.asList(1, 2));\n\t\ttestExcludeEligible(null, Arrays.asList(1), null, Arrays.asList(2));\n\t\ttestExcludeEligible(null, Arrays.asList(2), null, Arrays.asList(1));\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), null,\n\t\t\t\tCollections.<Integer>emptyList());\n\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList(), Collections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), Arrays.asList(1),\n\t\t\t\tArrays.asList(1));\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), Arrays.asList(2),\n\t\t\t\tArrays.asList(2));\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), Arrays.asList(1, 2),\n\t\t\t\tArrays.asList(1, 2));\n\n\t\ttestExcludeEligible(null, Arrays.asList(1), Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1), Arrays.asList(1),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1), Arrays.asList(2), Arrays.asList(2));\n\t\ttestExcludeEligible(null, Arrays.asList(1), Arrays.asList(1, 2),\n\t\t\t\tArrays.asList(2));\n\n\t\ttestExcludeEligible(null, Arrays.asList(2), Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(2), Arrays.asList(1), Arrays.asList(1));\n\t\ttestExcludeEligible(null, Arrays.asList(2), Arrays.asList(2),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(2), Arrays.asList(1, 2),\n\t\t\t\tArrays.asList(1));\n\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Arrays.asList(1),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Arrays.asList(2),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Arrays.asList(1, 2),\n\t\t\t\tCollections.<Integer>emptyList());\n\t}", "protected boolean allow(String value) {\n if(includes.isEmpty()) {\n if(excludes.isEmpty()) {\n return true;\n } else {\n return !excludes.contains(value);\n }\n } else {\n boolean rv = includes.contains(value);\n if(!rv) return false;\n if(excludes.isEmpty()) {\n return true;\n } else {\n return !excludes.contains(value);\n }\n }\n }", "public boolean getIncluded();", "public void setExcludeList(List<WafExcludeListEntry> excludeList) {\n this.excludeList = excludeList;\n }", "private boolean isSourceExcluded(IClasspathEntry entry) {\n IPath[] exclusionPatterns = entry.getExclusionPatterns();\n if (exclusionPatterns != null) {\n for (IPath exclusionPattern : exclusionPatterns) {\n if (\"**\".equals(exclusionPattern.toString())) {\n return true;\n }\n }\n }\n return false;\n }", "protected boolean isExcluded( String name )\n {\n for( int i = 0; i < excludes.length; i++ )\n {\n if( matchPath( excludes[ i ], name, isCaseSensitive ) )\n {\n return true;\n }\n }\n return false;\n }", "public String[] getExcludes()\n {\n return m_excludes;\n }", "private boolean isIncluded(ArrayList<Instance> inputs, Instance ins){\n boolean isAdded = false;\n for (Instance i: inputs){\n if (i == ins)\n return true;\n Concept temp = i.getConcept();\n while (true){\n if (temp == null)\n break;\n if (temp == ins.getConcept())\n return true;\n temp = temp.getSuperConcept(); \n }\n }\n return isAdded;\n }", "protected abstract boolean matchesExclusion(String paramString, int paramInt);", "public List<ExcludeClasses> getExcludes()\n {\n return excludes;\n }", "boolean isExcluded(Individual ind);", "@Test\n\tvoid combineIncludedAndExcludedGroups() {\n\t\tInfinitestConfiguration configuration = InfinitestConfiguration.builder().includedGroups(\"slow\").excludedGroups(\"mixed\").build();\n\n\t\trunner.setTestConfigurationSource(withConfig(configuration));\n\n\t\tTestResults results = runner.runTest(CLASS_UNDER_TEST);\n\n\t\tassertThat(results).hasSize(1);\n\t}", "ExcludeType createExcludeType();", "public void containsNoneIn(Iterable<?> excluded) {\n containsNone(\"contains no elements in\", excluded);\n }", "private boolean isOnIgnoreList(final String part) {\n return IGNORE_LIST.contains(part);\n }", "public void setIncludes(String includes)\n {\n this.includes = includes;\n }", "private void setIncludedBy(String includer, List<String> included) {\n for (String target : included) {\n List<String> list = mIncludedBy.get(target);\n if (list == null) {\n list = new ArrayList<String>(2); // We don't expect many includes\n mIncludedBy.put(target, list);\n }\n if (!list.contains(includer)) {\n list.add(includer);\n }\n }\n }", "public boolean isExcluded()\n {\n return project.isExcluded(this);\n }", "public boolean isExcluded()\n {\n return excluded.booleanValue();\n }", "@Test\n void include() {\n DocServiceFilter include = (plugin, service, method) -> true;\n DocServiceFilter exclude = (plugin, service, method) -> false;\n Map<String, ServiceInfo> services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME, HELLO_NAME);\n\n // 2. Exclude specified.\n exclude = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\");\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME, HELLO_NAME);\n List<String> methods = methods(services);\n\n assertThat(methods).containsExactlyInAnyOrder(\"bar1\", \"bar3\", \"bar4\", \"bar5\", \"bar6\");\n\n // 3-1. Include serviceName specified.\n include = DocServiceFilter.ofServiceName(FOO_NAME);\n // Set the exclude to the default.\n exclude = (plugin, service, method) -> false;\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME);\n\n methods = methods(services);\n assertThat(methods).containsExactlyInAnyOrder(\"bar1\", \"bar2\", \"bar3\", \"bar4\", \"bar5\", \"bar6\");\n\n // 3-2. Include methodName specified.\n include = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\");\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME);\n\n methods = methods(services);\n assertThat(methods).containsOnlyOnce(\"bar2\");\n\n // 4-1. Include and exclude specified.\n include = DocServiceFilter.ofServiceName(FOO_NAME);\n exclude = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\").or(DocServiceFilter.ofMethodName(\"bar3\"));\n services = services(include, exclude);\n assertThat(services).containsOnlyKeys(FOO_NAME);\n\n methods = methods(services);\n assertThat(methods).containsExactlyInAnyOrder(\"bar1\", \"bar4\", \"bar5\", \"bar6\");\n\n // 4-2. Include and exclude specified.\n include = DocServiceFilter.ofMethodName(FOO_NAME, \"bar2\");\n exclude = DocServiceFilter.ofServiceName(FOO_NAME);\n services = services(include, exclude);\n assertThat(services.size()).isZero();\n }", "@Test\n public void testContains_Not_Contain() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n instance.add(2);\n\n boolean expResult = false;\n boolean result = instance.contains(3);\n assertEquals(expResult, result);\n }", "protected boolean isIncluded( String name )\n {\n for( int i = 0; i < includes.length; i++ )\n {\n if( matchPath( includes[ i ], name, isCaseSensitive ) )\n {\n return true;\n }\n }\n return false;\n }", "@Override\r\n protected boolean excludesAnd(AbstractResourceFilter<T> filter) {\n return this.equals(filter);\r\n }", "public void setIncluded(boolean included);", "static void exclude(User user, String content, MessageChannel chan) {\n if(!content.toLowerCase().startsWith(\"!exclude \"))\n return;\n\n ArrayList<String> tagList = new ArrayList<>(Arrays.asList(\n content.substring(\"!exclude \".length()).split(\" \")));\n ArrayList<String> excludeList = new ArrayList<>(Arrays.asList(\n excludeMap.getOrDefault(user.getIdLong(), \"\").split(\" \")));\n boolean changed = false;\n\n for(String tag : tagList){\n tag = tag.replaceAll(\"\\\\s\",\" \");\n if(!tag.startsWith(\"-\")){\n tag = \"-\" + tag;\n }\n if(!excludeList.contains(tag)){\n excludeList.add(tag);\n changed = true;\n }\n }\n\n if(changed){\n StringBuilder sb = new StringBuilder();\n for(String exclude : excludeList)\n sb.append(exclude).append(\" \");\n\n // will update list\n excludeMap.put(user.getIdLong(), sb.toString().trim());\n if(!saveMap(excludeMap, Config.exclude_data_filename)){\n chan.sendMessage(\"Couldn't save your exclude list, probably due to me being in test mode.\" +\n \" Sorry!\").queue();\n }\n else {\n chan.sendMessage(\"Ok. Exclude list is now: \" + sb).queue();\n }\n }\n else {\n chan.sendMessage(\"Exclude list is unchanged: \" + excludeMap.get(user.getIdLong())).queue();\n }\n\n }", "private boolean validateInclude(\n ActionExecutionContext actionExecutionContext,\n Set<Artifact> allowedIncludes,\n Set<PathFragment> looseHdrsDirs,\n Iterable<PathFragment> ignoreDirs,\n Artifact include) {\n return include.isFileType(CppFileTypes.CPP_MODULE)\n ||\n // TODO(b/145253507): Exclude objc module maps from check, due to bad interaction with\n // local_objc_modules feature.\n include.isFileType(CppFileTypes.OBJC_MODULE_MAP)\n ||\n // It's a declared include/\n allowedIncludes.contains(include)\n ||\n // Ignore headers from built-in include directories.\n FileSystemUtils.startsWithAny(include.getExecPath(), ignoreDirs)\n || isDeclaredIn(cppConfiguration(), actionExecutionContext, include, looseHdrsDirs);\n }", "private static boolean isExcludeService(String[] excludeServicesList, String serviceName) {\n\t\tboolean isExcludeService = false;\n\t\t\n\t\t// Se itera por la lista buscando coincidencias.\n\t\tfor (String excludeService : excludeServicesList) {\n\t\t\tif (excludeService.trim().toLowerCase().equals(serviceName.trim().toLowerCase())) {\n\t\t\t\tisExcludeService = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isExcludeService;\n\t}", "@Override\n\tpublic String[] OnExclusions() {\n\t\treturn new String[] {\"sqlid\", \"item\"};\n\t}", "protected boolean isExcluded(String name) {\r\n return (this.excludeRE == null) ? false : this.excludeRE.match(name);\r\n }", "public interface SearchIndexExcluderList {\n\n\t/**\n\t * Do any required setup on the individual Excluders.\n\t */\n\tvoid startIndexing();\n\n\t/**\n\t * Do any required teardown on the individual Excluders.\n\t */\n\tvoid stopIndexing();\n\n\t/**\n\t * Poll the list of excluders regarding this individual.\n\t *\n\t * If any returns non-null, the individual is excluded. If all return null,\n\t * the individual is not excluded.\n\t */\n\tboolean isExcluded(Individual ind);\n\n}", "public List<WafExcludeListEntry> getExcludeList() {\n return excludeList;\n }", "@Test public void excludeWithoutInclude() throws Exception {\n Schema schema = new RepoBuilder()\n .add(\"service.proto\", \"\"\n + \"message MessageA {\\n\"\n + \" optional string b = 1;\\n\"\n + \" optional string c = 2;\\n\"\n + \"}\\n\")\n .schema();\n Schema pruned = schema.prune(new IdentifierSet.Builder()\n .exclude(\"MessageA#c\")\n .build());\n assertThat(((MessageType) pruned.getType(\"MessageA\")).field(\"b\")).isNotNull();\n assertThat(((MessageType) pruned.getType(\"MessageA\")).field(\"c\")).isNull();\n }", "@Nonnull protected Predicate<String> getIncludeExcludePredicate(@Nonnull final CriteriaSet criteria) {\n \n final SignatureSigningConfigurationCriterion criterion =\n criteria.get(SignatureSigningConfigurationCriterion.class);\n assert criterion != null;\n \n return resolveIncludeExcludePredicate(criteria, criterion.getConfigurations());\n }", "public boolean isExcludeSubtype() {\n\t\treturn excludeSubtypes;\n\t}", "private Boolean HasMatch(String line, Pattern includePattern, Pattern excludePattern)\n {\n Boolean foundMatch = false;\n\n Matcher includeMatcher = includePattern.matcher(line);\n Matcher excludeMatcher = excludePattern.matcher(line);\n\n try\n {\n if (includeMatcher.find() && !excludeMatcher.find())\n {\n foundMatch = true;\n }\n\n\n } catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to find matches in: '%s'.\", line);\n e.printStackTrace();\n }\n\n return (foundMatch);\n }", "public boolean isCoveredBy(Filter f);", "@Nonnull protected Predicate<String> getIncludeExcludePredicate(@Nonnull final CriteriaSet criteria) {\n final EncryptionConfigurationCriterion criterion = criteria.get(EncryptionConfigurationCriterion.class);\n assert criterion != null;\n\n return resolveIncludeExcludePredicate(criteria, criterion.getConfigurations());\n }", "public static void initIncludeExcludeType() {\r\n \r\n final boolean useGrouperIncludeExclude = GrouperConfig.retrieveConfig().propertyValueBoolean(\"grouperIncludeExclude.use\", false);\r\n final boolean useGrouperRequireGroups = GrouperConfig.retrieveConfig().propertyValueBoolean(\"grouperIncludeExclude.requireGroups.use\", false);\r\n \r\n final String includeExcludeGroupTypeName = GrouperConfig.retrieveConfig().propertyValueString(\"grouperIncludeExclude.type.name\");\r\n final String requireGroupsTypeName = GrouperConfig.retrieveConfig().propertyValueString(\"grouperIncludeExclude.requireGroups.type.name\");\r\n\r\n GrouperSession grouperSession = null;\r\n\r\n try {\r\n\r\n grouperSession = GrouperSession.startRootSession(false);\r\n\r\n GrouperSession.callbackGrouperSession(grouperSession, new GrouperSessionHandler() {\r\n\r\n public Object callback(GrouperSession grouperSession)\r\n throws GrouperSessionException {\r\n try {\r\n \r\n @SuppressWarnings(\"unused\")\r\n GroupType includeExcludeGroupType = useGrouperIncludeExclude ? \r\n GroupType.createType(grouperSession, includeExcludeGroupTypeName, false) : null;\r\n\r\n GroupType requireGroupsType = useGrouperRequireGroups ? \r\n GroupType.createType(grouperSession, requireGroupsTypeName, false) : null;\r\n\r\n //first the requireGroups\r\n String attributeName = GrouperConfig.retrieveConfig().propertyValueString(\"grouperIncludeExclude.requireGroups.attributeName\");\r\n\r\n if (useGrouperRequireGroups && !StringUtils.isBlank(attributeName)) {\r\n requireGroupsType.addAttribute(grouperSession,attributeName, false);\r\n }\r\n\r\n if (useGrouperRequireGroups) {\r\n //add types/attributes from grouper.properties\r\n int i=0;\r\n while (true) {\r\n String propertyName = \"grouperIncludeExclude.requireGroup.name.\" + i;\r\n String attributeOrTypePropertyName = \"grouperIncludeExclude.requireGroup.attributeOrType.\" + i;\r\n\r\n String propertyValue = GrouperConfig.retrieveConfig().propertyValueString(propertyName);\r\n if (StringUtils.isBlank(propertyValue)) {\r\n break;\r\n }\r\n String attributeOrTypeValue = GrouperConfig.retrieveConfig().propertyValueString(attributeOrTypePropertyName);\r\n boolean attributeOrType = StringUtils.equals(\"attribute\", attributeOrTypeValue);\r\n if (attributeOrType) {\r\n requireGroupsType.addAttribute(grouperSession, propertyValue, false);\r\n } else {\r\n GroupType.createType(grouperSession, propertyValue, false);\r\n }\r\n i++;\r\n }\r\n }\r\n \r\n } catch (Exception e) {\r\n throw new RuntimeException(e.getMessage(), e);\r\n } finally {\r\n GrouperSession.stopQuietly(grouperSession);\r\n }\r\n return null;\r\n }\r\n \r\n });\r\n \r\n //register the hook if not already\r\n GroupTypeTupleIncludeExcludeHook.registerHookIfNecessary(true);\r\n \r\n } catch (Exception e) {\r\n throw new RuntimeException(\"Problem adding include/exclude type: \" + includeExcludeGroupTypeName, e);\r\n }\r\n\r\n }", "private final boolean excludeColumn(String col, String[] excludes) {\n\t\tfor (int i = 0; i < excludes.length; i++) {\n\t\t\tif (col.equals(excludes[i])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected boolean couldHoldIncluded( String name )\n {\n for( int i = 0; i < includes.length; i++ )\n {\n if( matchPatternStart( includes[ i ], name, isCaseSensitive ) )\n {\n return true;\n }\n }\n return false;\n }", "@Test\n public void testContainsAll_Not_Contain() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 5);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "protected boolean isIncluded(String name) {\r\n return (this.includeRE == null) ? true : this.includeRE.match(name);\r\n }", "public boolean skipTest() {\r\n if( client != null ) {\r\n Project project = client.getProject();\r\n if( project != null ) {\r\n if( ifProp != null && project.getProperty(ifProp) == null) {\r\n // skip if \"if\" property is not set\r\n result = true;\r\n return true;\r\n }\r\n // Allow a comma separated list of properties for \"unless\"\r\n // so after using a sequence of properties, each in an \"if\",\r\n // you can include the list in an \"unless\" to implement the\r\n // default.\r\n if( unlessProp != null) {\r\n StringTokenizer st = new StringTokenizer(unlessProp,\",\");\r\n while( st.hasMoreElements() ) {\r\n String prop = (String)st.nextElement();\r\n if( project.getProperty(prop) != null ) {\r\n // skip if an \"unless\" property is set\r\n result = true;\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public final void mEXCLUDING() throws RecognitionException {\n try {\n int _type = EXCLUDING;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2829:3: ( 'excluding' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2830:3: 'excluding'\n {\n match(\"excluding\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public boolean isIncluded(IResource included) {\n ensureInitialized();\n String mapKey = getMapKey(included);\n List<String> result = mIncludedBy.get(mapKey);\n if (result == null) {\n String name = getResourceName(included);\n if (!name.equals(mapKey)) {\n result = mIncludedBy.get(name);\n }\n }\n\n return result != null && result.size() > 0;\n }", "public boolean filterOperations(String path, String verb, List<String> tags) {\n if (filterConfig.getExclude().isEmpty() && filterConfig.getInclude().isEmpty())\n return false;\n // Check if there is any SPECIFIC EXCLUDE filter is excluding the operation\n for (APISpecIncludeExcludeFilter filter : filterConfig.getExclude()) {\n if (filter.filter(path, verb, tags, false, true)) {\n // Must be filtered in any case, as it is specific, even it might be included as\n // exclude overwrite includes\n return true;\n }\n }\n // Check if there is any SPECIFIC INCLUDE filter is including the operation\n for (APISpecIncludeExcludeFilter filter : filterConfig.getInclude()) {\n if (filter.filter(path, verb, tags, false, true)) {\n // Should be included as it is given with a specific filter\n return false;\n }\n }\n // Now, check for WILDCARD EXCLUDES, which have less priority, than the specific\n // filters\n for (APISpecIncludeExcludeFilter filter : filterConfig.getExclude()) {\n if (filter.filter(path, verb, tags, true, false)) {\n // Should be filtered\n return true;\n }\n }\n // Check if there is any WILDCARD INCLUDE configured\n for (APISpecIncludeExcludeFilter filter : filterConfig.getInclude()) {\n if (filter.filter(path, verb, tags, true, false)) {\n return false;\n }\n }\n // If there is at least one include - Filter it anyway\n // Otherwise dont filter\n return !filterConfig.getInclude().isEmpty();\n\n }", "public boolean validateStateFilters(Collection include, Collection exclude, int line)\n {\n if (!include.isEmpty() && !exclude.isEmpty())\n {\n ThreadLocalToolkit.log(new AmbiguousStateFilterError(), getSourcePath(), line);\n return false;\n }\n \n if (unresolvedStateIdentifier(include, line) || unresolvedStateIdentifier(exclude, line))\n {\n return false;\n }\n \n return true;\n }", "public void setIncludes( List<IncludeClasses> includes )\n {\n this.includes = includes;\n }", "Collection<String> getExcludeExceptions();", "void setExcludeList(SynchronizationRequest req, Zipper zipper) {\n\n try { \n String serverName = req.getServerName();\n List list = (List)_excludeCache.get(serverName);\n if (list == null) {\n Properties env = req.getEnvironmentProperties();\n // admin config context\n ConfigContext ctx = _ctx.getConfigContext();\n Domain domain = (Domain) ctx.getRootConfigBean();\n Server server = domain.getServers().getServerByName(serverName);\n if (server != null) {\n ServerDirector director=new ServerDirector(ctx, serverName);\n List excludes = director.constructExcludes();\n list = new ArrayList();\n int size = excludes.size();\n for (int i=0; i<size; i++) {\n String path = (String) excludes.get(i);\n String tPath = \n TextProcess.tokenizeConfig(path, serverName, env);\n list.add(tPath);\n }\n // add the list to the cache\n _excludeCache.put(serverName, list);\n }\n }\n _logger.log(Level.FINE, \"Excluded List \" + list);\n zipper.addToExcludeList(list);\n } catch (Exception e) {\n _logger.log(Level.FINE, \"Excluded List can not be set\", e);\n }\n }", "static void excludes(User user, String content, MessageChannel chan) {\n if(content.toLowerCase().equals(\"!excludes\")){\n String excludes = excludeMap.get(user.getIdLong());\n if(excludes == null){\n chan.sendMessage(\"None given.\").queue();\n return;\n }\n chan.sendMessage(\"Your exclude tags: \" + excludes).queue();\n }\n else if(content.toLowerCase().equals(\"!excludes clear\")){\n excludeMap.remove(user.getIdLong());\n saveMap(excludeMap, Config.exclude_data_filename);\n chan.sendMessage(\"Ok, removed all excludes.\").queue();\n }\n }", "public void setFilterExcludeProperties(List<String> filterExcludeProperties) {\n\n\t\tthis.filterExcludeProperties = filterExcludeProperties;\n\t}", "boolean hasContains();", "boolean isNotAllMedia();", "@Test(enabled = false)\n\tpublic void shouldOnlyHaveEligibleMediaModels() {\n\t\tList<BirdModel> list = dao.findAll();\n\n\t\tfor (BirdModel model: list) {\n\t\t\tfor (MediaModel soundModel: model.getSounds()) {\n\t\t\t\tassertTrue(soundModel.isEligible(), String.format(\"Sound model %s isn't eligible\", soundModel.getId()));\n\t\t\t}\n\n\t\t\tfor (MediaModel photoModel: model.getPhotos()) {\n\t\t\t\tassertTrue(photoModel.isEligible(), String.format(\"Photo model %s isn't eligible\", photoModel.getId()));\n\t\t\t}\n\t\t}\n\t}", "boolean annotatedWithIgnore(JsonViewSerializer.AccessibleProperty f) {\n return memoizer.annotatedWithIgnore(f, () -> {\n JsonIgnore jsonIgnore = getAnnotation(f, JsonIgnore.class);\n JsonIgnoreProperties classIgnoreProperties = getAnnotation(f.declaringClass, JsonIgnoreProperties.class);\n JsonIgnoreProperties fieldIgnoreProperties = null;\n boolean backReferenced = false;\n\n //make sure the referring field didn't specify properties to ignore\n if(referringField != null) {\n fieldIgnoreProperties = getAnnotation(referringField, JsonIgnoreProperties.class);\n }\n\n //make sure the referring field didn't specify a backreference annotation\n if(getAnnotation(f, JsonBackReference.class) != null && referringField != null) {\n for(JsonViewSerializer.AccessibleProperty lastField : getAccessibleProperties(referringField.declaringClass)) {\n JsonManagedReference fieldManagedReference = getAnnotation(lastField, JsonManagedReference.class);\n if(fieldManagedReference != null && lastField.type.equals(f.declaringClass)) {\n backReferenced = true;\n break;\n }\n }\n }\n\n return (jsonIgnore != null && jsonIgnore.value()) ||\n (classIgnoreProperties != null && asList(classIgnoreProperties.value()).contains(f.name)) ||\n (fieldIgnoreProperties != null && asList(fieldIgnoreProperties.value()).contains(f.name)) ||\n backReferenced;\n });\n }", "public void setExcludedQualifiers(String excludedQualifiers) {\r\n this.excludedQualifiers = excludedQualifiers;\r\n }", "@VisibleForTesting\n /* package */ void setIncluded(String includer, List<String> included, boolean detectCycles) {\n // Remove previously linked inverse mappings\n List<String> oldIncludes = mIncludes.get(includer);\n if (oldIncludes != null && oldIncludes.size() > 0) {\n for (String includee : oldIncludes) {\n List<String> includers = mIncludedBy.get(includee);\n if (includers != null) {\n includers.remove(includer);\n }\n }\n }\n\n mIncludes.put(includer, included);\n // Reverse mapping: for included items, point back to including file\n setIncludedBy(includer, included);\n\n if (detectCycles) {\n detectCycles(includer);\n }\n }", "boolean isInterested(Polygon p, ObjectInMap exclusion) {\n for (ObjectInMap objectInMap : objectsInMap)\n if (!objectInMap.equals(exclusion) && objectInMap.isBlocking && objectInMap.intersects(p))\n if (!(objectInMap instanceof Bullet && ((Bullet) objectInMap).owner.equals(exclusion))) {\n return true;\n }\n return false;\n }", "private void applyExclusionToSelectedNodeRecords( final boolean exclusion ) {\n\t\tfinal int[] selectedRows = getSelectedNodeRecordRows();\n\t\tfinal List<NodeRecord> records = getNodeRecords( selectedRows );\n\t\tfor ( final NodeRecord record : records ) {\n\t\t\trecord.setExclude( exclusion );\n\t\t}\n\t\trefreshRows( selectedRows );\n\t\tsetHasChanges( true );\n\t}", "@Override\n protected ArrayList<String> generateExclusions()\n {\n ArrayList<String> retVal = new ArrayList<>();\n switch (monsterList.get(monsterList.size() - 1))\n {\n case \"Spheric Guardian\":\n retVal.add(\"Sentry and Sphere\");\n break;\n case \"3 Byrds\":\n retVal.add(\"Chosen and Byrds\");\n break;\n case \"Chosen\":\n retVal.add(\"Chosen and Byrds\");\n retVal.add(\"Cultist and Chosen\");\n break;\n }\n return retVal;\n }", "public static boolean isExcluded(RenderLayer layer) {\n\t\treturn layer.getDrawMode() != DrawMode.QUADS || EXCLUSIONS.contains(layer);\n\t}", "public void setExcludeUrls(String[] excludeUrls) {\n this.excludeUrls = excludeUrls;\n }", "protected abstract List<String> getSecondaryIndexExcludeList();", "AggregationBuilder buildExcludeFilteredAggregation(Set<String> excludeNames);", "private List<String> getIncludesFrom(String includer) {\n ensureInitialized();\n\n return mIncludes.get(includer);\n }", "public boolean isSetExcludeVariantIds() {\r\n return this.excludeVariantIds != null;\r\n }", "boolean hasIsPartOf();", "public Agg exclude(Object value) {\n attrList.put(\"exclude\", value);\n return this;\n }", "private boolean readSettings() {\n try {\n String encoded = mProject.getPersistentProperty(CONFIG_INCLUDES);\n if (encoded != null) {\n mIncludes = decodeMap(encoded);\n\n // Set up a reverse map, pointing from included files to the files that\n // included them\n mIncludedBy = new HashMap<String, List<String>>(2 * mIncludes.size());\n for (Map.Entry<String, List<String>> entry : mIncludes.entrySet()) {\n // File containing the <include>\n String includer = entry.getKey();\n // Files being <include>'ed by the above file\n List<String> included = entry.getValue();\n setIncludedBy(includer, included);\n }\n\n return true;\n }\n } catch (CoreException e) {\n AdtPlugin.log(e, \"Can't read include settings\");\n }\n\n return false;\n }", "public void registerExcluded(List<String> excludedFiles) {\n excluded.addAll(excludedFiles);\n }", "@Test\n @DisplayName(\"Test Filtering of the Metrics with includedKeyValues \"\n + \"of Monitoring Exporter on both upper and sublevel.\")\n void testFilterExcludedKeysFromBothLevels() throws Exception {\n logger.info(\"Testing filtering only excluded specific app name in the metrics \");\n List<String> checkIncluded = new ArrayList<>();\n checkIncluded.add(\"servletName=\\\"com.oracle.wls.exporter.webapp.ExporterServlet\\\"\");\n checkIncluded.add(\"app=\\\"myear1\\\"\");\n List<String> checkExcluded = new ArrayList<>();\n checkExcluded.add(\"servletName=\\\"com.oracle.wls.exporter.webapp.MainServlet\\\"\");\n checkExcluded.add(\"app=\\\"myear123\\\"\");\n replaceConfigurationWithFilter(RESOURCE_DIR\n + \"/exporter/rest_filter_excluded_webapp_and_servlet_names.yaml\",checkIncluded, checkExcluded);\n }", "public static boolean IntersectExceptOperator(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"IntersectExceptOperator\")) return false;\n if (!nextTokenIs(b, \"<intersect except operator>\", K_EXCEPT, K_INTERSECT)) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, INTERSECT_EXCEPT_OPERATOR, \"<intersect except operator>\");\n r = consumeToken(b, K_INTERSECT);\n if (!r) r = consumeToken(b, K_EXCEPT);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "boolean isHiddenFromList();", "@TestProperties(name = \"test the parameters sorting\")\n\tpublic void testEmptyInclude(){\n\t}", "boolean hasConditionList();", "public void testIncludeMode()\r\n {\r\n IncludeDirective include = \r\n new IncludeDirective( IncludeDirective.REF, null, \"value\", PROPERTIES );\r\n assertEquals( \"mode\", IncludeDirective.REF, include.getMode() );\r\n }", "private String[] getExcluded(Resource resource) {\n\n\t\tCollection<String> excludes = new LinkedList<String>();\n\n\t\tString relativePath = PathUtils.subtract(resource.getDirectory(),\n\t\t\t\tthis.project.getBasedir().getAbsolutePath()\n\t\t\t\t\t\t+ PathSeparator.get());\n\n\t\tfor (Platform platform : Platform.fromString(this.platforms)) {\n\n\t\t\tString preStart = platform.behave(this.preStart);\n\n\t\t\texcludes.add(PathUtils.subtract(preStart, relativePath));\n\t\t}\n\n\t\treturn excludes.toArray(new String[] {});\n\t}", "public void setExcludes( String[] excludes )\n {\n if( excludes == null )\n {\n this.excludes = null;\n }\n else\n {\n this.excludes = new String[ excludes.length ];\n for( int i = 0; i < excludes.length; i++ )\n {\n String pattern;\n pattern = excludes[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n if( pattern.endsWith( File.separator ) )\n {\n pattern += \"**\";\n }\n this.excludes[ i ] = pattern;\n }\n }\n }", "public boolean isNotIn() {\n return notIn;\n }", "@Test\n public void testIgnore_excludedClasses() throws Throwable {\n RunNotifier notifier = spy(new RunNotifier());\n RunListener listener = mock(RunListener.class);\n notifier.addListener(listener);\n Bundle ignores = new Bundle();\n ignores.putString(LongevityClassRunner.FILTER_OPTION, FailingTest.class.getCanonicalName());\n mRunner = spy(new LongevityClassRunner(FailingTest.class, ignores));\n mRunner.run(notifier);\n verify(listener, times(1)).testIgnored(any());\n }", "public boolean overridesSet(){\n return overrides.stream().anyMatch(k->!k.dontAllowSet());\n }", "public Set getExcludeMethods() {\n return mExcludeMethods;\n }", "@Test\n public void testRemove_Not_Contains() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n\n Integer item = 2;\n boolean expResult = false;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }", "@Test\n public void testContains_Not_Contain_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n boolean expResult = false;\n boolean result = instance.contains(7);\n assertEquals(expResult, result);\n }", "public void addDefaultExcludes()\n {\n int excludesLength = excludes == null ? 0 : excludes.length;\n String[] newExcludes;\n newExcludes = new String[ excludesLength + DEFAULTEXCLUDES.length ];\n if( excludesLength > 0 )\n {\n System.arraycopy( excludes, 0, newExcludes, 0, excludesLength );\n }\n for( int i = 0; i < DEFAULTEXCLUDES.length; i++ )\n {\n newExcludes[ i + excludesLength ] = DEFAULTEXCLUDES[ i ].replace( '/', File.separatorChar ).replace( '\\\\', File.separatorChar );\n }\n excludes = newExcludes;\n }", "public GlobFileSet addExcludeFiles(Object... files)\n\t\t{\n\t\tif ((files.length == 1) && (files[0] instanceof Iterable))\n\t\t\treturn (addExcludeFiles((Iterable<Object>)files[0]));\n\t\telse\n\t\t\treturn (addExcludeFiles(Arrays.asList(files)));\n\t\t}", "public Mapping filter(Collection<String> includes, Collection<String> excludes) {\n if (includes.isEmpty() && excludes.isEmpty()) {\n return this;\n }\n\n List<Field> filtered = new ArrayList<Field>();\n List<FieldFilter.NumberedInclude> convertedIncludes = FieldFilter.toNumberedFilter(includes);\n\n boolean intact = true;\n for (Field fl : this.getFields()) {\n intact &= filterField(fl, null, filtered, convertedIncludes, excludes);\n }\n\n return (intact ? this : new Mapping(this.getIndex(), this.getType(), filtered));\n }", "boolean canBeSkipped();", "private List<ClassEntity> excludeInners(List<ClassEntity> list) {\n List<ClassEntity> result = new ArrayList<>();\n for (ClassEntity classEntity :\n list) {\n CompilationUnit cu = classEntity.getCu();\n int i = 0;\n for (Node node :\n cu.getTypes().get(0).getChildrenNodes()) {\n if (node instanceof ClassOrInterfaceDeclaration) {\n i++;\n }\n }\n if (i == 0) {\n result.add(classEntity);\n }\n }\n return result;\n }", "public boolean disjoint (Set<Block> a, Set<Block> b) {\n\t\tfor (Block block : a) {\n\t\t\tif (b.contains(block)) return false;\n\t\t}\n\t\treturn true;\n\t}", "@Test\r\n\tpublic void testContains() {\r\n\t\tAssert.assertTrue(list.contains(new Munitions(2, 3, \"iron\")));\r\n\t\tAssert.assertFalse(list.contains(new Munitions(2, 5, \"ferrum\")));\r\n\t}", "public boolean isIsIncluded() {\n return isIncluded;\n }", "public void setExclusionPatterns(java.util.Collection<String> exclusionPatterns) {\n if (exclusionPatterns == null) {\n this.exclusionPatterns = null;\n return;\n }\n\n this.exclusionPatterns = new java.util.ArrayList<String>(exclusionPatterns);\n }" ]
[ "0.71429867", "0.64198047", "0.62950754", "0.6288808", "0.6181019", "0.6170492", "0.60858613", "0.6077032", "0.59699184", "0.5909083", "0.58225703", "0.57817787", "0.57680273", "0.57451427", "0.5742474", "0.57369375", "0.5726583", "0.56981385", "0.564295", "0.5586625", "0.5540188", "0.5524521", "0.5512371", "0.55024534", "0.5493763", "0.5493091", "0.5492571", "0.5476373", "0.5463036", "0.5450744", "0.54328406", "0.5428896", "0.54260653", "0.5421664", "0.54211104", "0.5404177", "0.53911996", "0.5355414", "0.53403413", "0.53195316", "0.53156996", "0.5296049", "0.5293712", "0.52760583", "0.5274333", "0.5269627", "0.5269557", "0.5252073", "0.5224131", "0.5208241", "0.51839536", "0.51781297", "0.51751006", "0.5171287", "0.516872", "0.5165137", "0.51616246", "0.5160891", "0.51374024", "0.51336783", "0.51136875", "0.51125884", "0.5109707", "0.5103594", "0.5103103", "0.50659275", "0.5061433", "0.5056712", "0.50515854", "0.50447345", "0.50282687", "0.50253564", "0.50246346", "0.50166535", "0.50083715", "0.49979883", "0.49778977", "0.49769172", "0.4953226", "0.49388418", "0.4929498", "0.49285063", "0.4922143", "0.49208087", "0.4916439", "0.49158368", "0.49062407", "0.48974335", "0.48918617", "0.4884969", "0.48729822", "0.4870416", "0.48657018", "0.4861822", "0.4860982", "0.48590094", "0.4857473", "0.4852974", "0.4844757", "0.4843474", "0.48254114" ]
0.0
-1
Convert upper camel SDK field names to lower camel
static String normalizedNameOf(SdkField<?> field) { String name = field.memberName(); return name.length() > 1 && Ascii.isLowerCase(name.charAt(1)) ? Ascii.toLowerCase(name.charAt(0)) + name.substring(1) : name.toLowerCase(Locale.ROOT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String upFirstLetter(){\n\t\tString firstLetter = nameField.substring(0,1);\n\t\tfirstLetter = firstLetter.toUpperCase();\n\t\treturn firstLetter + nameField.substring(1,nameField.length());\n\t}", "public static String getFieldUpperCase(String name) {\r\n\t\tString aux = name.substring(0, 1);\r\n\t\tString mayus = aux.toUpperCase()+name.substring(1);\r\n\t\treturn mayus;\r\n\t}", "public void remCamelCaseName(){\n ((MvwDefinitionDMO) core).remCamelCaseName();\n }", "static String normalizePropertyName(String name, String... ignorePrefixes) {\n if (ignorePrefixes.length > 0) {\n return normalizePropertyName(stripPrefixes(name, ignorePrefixes));\n }\n if (name == null || name.isEmpty()) {\n return name;\n } else if (!name.contains(\".\") && !name.contains(\"-\")) {\n return name;\n } else {\n String[] parts = name.replaceAll(\" \", \"\").split(\"-|\\\\.\");\n StringBuilder sb = new StringBuilder();\n if (parts.length > 0) {\n sb.append(parts[0]);\n for (int i = 1; i < parts.length; i++) {\n String s = parts[i-1].length() > 0 ?\n parts[i].substring(0, 1).toUpperCase() + parts[i].substring(1) :\n parts[i];\n sb.append(s);\n }\n }\n return sb.toString();\n }\n }", "public static String getSchemaFieldName(String fieldName) {\n StringBuilder sb = new StringBuilder(fieldName);\n sb.setCharAt(0, Character.toLowerCase(sb.charAt(0)));\n return sb.toString();\n }", "private static String getCamelCasedPropertyName(String propertyName) {\n return propertyName.substring(0, 1).toUpperCase() +\n propertyName.substring(1);\n }", "public void setFieldName(String newValue) {\n TF_Field_Name = newValue.toUpperCase().trim(); // Field names are all in UPPER CASE.\n }", "public static String getFieldName(String schemaFieldName) {\n StringBuilder sb = new StringBuilder(schemaFieldName);\n sb.setCharAt(0, Character.toUpperCase(sb.charAt(0)));\n return sb.toString();\n }", "@Override\n\tpublic String fieldConvert(String field) {\n\t\tif (!StringUtils.isEmpty(field)) {\n\t\t\tswitch (field) {\n\t\t\tcase \"code\":\n\t\t\t\treturn \"CODE\";\n\t\t\tcase \"name\":\n\t\t\t\treturn \"NAME\";\n\t\t\tcase \"createTime\":\n\t\t\t\treturn \"CREATE_TIME\";\n\t\t\tcase \"updateTime\":\n\t\t\t\treturn \"UPDATE_TIME\";\n\t\t\tdefault:\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "public static String describe(String fieldName)\r\n {\r\n StringBuffer buf = new StringBuffer();\r\n boolean uppercase = false;\r\n for (int i = 0; i < fieldName.length(); i++)\r\n {\r\n char c = fieldName.charAt(i);\r\n if (Character.isUpperCase(c))\r\n {\r\n if (!uppercase)\r\n buf.append(' ');\r\n buf.append(Character.toLowerCase(c));\r\n uppercase = true;\r\n }\r\n else if (c == '_')\r\n {\r\n buf.append(' ');\r\n uppercase = false;\r\n }\r\n else\r\n {\r\n buf.append(c);\r\n uppercase = false;\r\n }\r\n }\r\n return buf.toString();\r\n }", "private static String capName(String name) { return name.substring(0, 1).toUpperCase() + name.substring(1); }", "private static String toPropertyName(String str) {\n return str.toLowerCase().trim().replaceAll(\" +\", \"_\");\n }", "@SuppressWarnings(\"unused\")\r\n private static String camelCase2UpperCase(String camelCase) {\r\n return camelCase.replaceAll(\"(.)(\\\\p{Upper})\", \"$1_$2\").toUpperCase();\r\n }", "protected static String _beanMethodName(String prefix, String fieldName)\n {\n StringBuffer sb = new StringBuffer(prefix);\n sb.append(fieldName.substring(0,1).toUpperCase());\n sb.append(fieldName.substring(1));\n return sb.toString();\n }", "@Override\n public String toParamName(String name) {\n name = name.replaceAll(\"-\", \"_\");\n\n // if it's all uppper case, do nothing\n if (name.matches(\"^[A-Z_]*$\")) {\n return name;\n }\n\n // camelize(lower) the variable name\n // pet_id => petId\n name = camelize(name, true);\n\n // for reserved word or word starting with number, append _\n if (reservedWords.contains(name) || name.matches(\"^\\\\d.*\")) {\n name = escapeReservedWord(name);\n }\n\n return name;\n }", "@Override\n public String propertyToColumnName(String propertyName) {\n if (Pattern.compile(\"[A-Z]+\").matcher(propertyName).find()) {\n return \"\\\"\" + propertyName + \"\\\"\";\n } else {\n return super.propertyToColumnName(propertyName);\n }\n }", "private String preprocessName(String original){\n\t\t// Remove non-alphabetical characters from the name\n\t\toriginal = original.replaceAll( \"[^A-Za-z]\", \"\" );\n\t\t\t\t\n\t\t// Convert to uppercase to help us ignore case-sensitivity\n\t\toriginal = original.toUpperCase();\n\t\t\n\t\t// Remove all occurences of the letters outlined in step 3\n\t\toriginal = original.substring(0,1) + original.substring(1).replaceAll(\"[AEIHOUWY]\",\"\");\n\t\t\n\t\t// Return the result\n\t\treturn original;\n\t}", "Caseless getName();", "public String formatName(String name) {\n return name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();\n }", "@Override\n public String toModelName(String name) {\n if (reservedWords.contains(name)) {\n throw new RuntimeException(name + \" (reserved word) cannot be used as a model name\");\n }\n\n // camelize the model name\n // phone_number => PhoneNumber\n return camelize(name);\n }", "public String prepareClassName(String className)\n {\n return camelCaseName(className, true);\n }", "public static String toAttributeName(String name)\r\n {\r\n return StringUtils.uncapitalize(toClassName(name));\r\n }", "public static String formatEnumName(String name) {\n String[] words = name.replace('_', ' ').split(\"\\\\s\");\n StringBuilder formatted = new StringBuilder(name.length());\n for (String word : words) {\n formatted.append(word.substring(0, 1).toUpperCase());\n formatted.append(word.substring(1).toLowerCase());\n formatted.append(' ');\n }\n return formatted.toString().trim();\n }", "private String toPropertyName(String element) {\n String refPropertyName = handleRefProperty(element);\n if (refPropertyName != null) {\n return refPropertyName;\n }\n\n StringBuilder sb = new StringBuilder();\n char[] chars = element.toCharArray();\n boolean upper = true;\n for (char c : chars) {\n if (c == '_' || c == '-' || c == '.') {\n upper = true;\n } else if (upper) {\n sb.append(Character.toUpperCase(c));\n upper = false;\n } else {\n sb.append(c);\n }\n }\n return sb.toString();\n }", "String getJavaFieldName();", "private String camelToSnakeCase(String camelCaseId) {\n\t\t// https://stackoverflow.com/q/2206378/split-and-keep-delimiters\n\t\tfinal String[] parts = camelCaseId.split(\"(?=[A-Z])\"); // e.g. [\"num\", \"Of\", \"Pages\"]\n\t\treturn Arrays.stream(parts).collect(Collectors.joining(\"_\")).toLowerCase();\n\t}", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "public static String normalizeUpper(String name) {\n String nName = normalizeString(name);\n // Do not convert delimited names to upper case. They may have\n // been delimited to preserve case.\n if (!isDelimited(nName)) {\n nName = name.toUpperCase();\n }\n return nName;\n }", "public static String toCamelCase(String name)\r\n {\r\n StringBuffer buffer = new StringBuffer();\r\n String[] tokens = name.split(\"_\");\r\n if (tokens != null && tokens.length > 0)\r\n {\r\n for (int ctr = 0; ctr < tokens.length; ctr++)\r\n {\r\n buffer.append(StringUtils.capitalize(tokens[ctr].toLowerCase()));\r\n }\r\n }\r\n else\r\n {\r\n buffer.append(StringUtils.capitalize(name.toLowerCase()));\r\n }\r\n return buffer.toString();\r\n }", "static String toMixedCase(String name) {\r\n\t\tStringBuilder sb = new StringBuilder(name.toLowerCase());\r\n\t\tsb.replace(0, 1, sb.substring(0, 1).toUpperCase());\r\n\t\treturn sb.toString();\r\n\r\n\t}", "String normalizeName(String tag) {\n\t\tStringBuffer buf = new StringBuffer();\n\t\t\n\t\tboolean newWord = true;\n\t\t// capitalize first letter of each word\n\t\t// remove -'s and _'s\n\t\tfor (int i = 0; i < tag.length(); i++) {\n\t\t\tchar c = tag.charAt(i);\n\t\t\tif (c == '-' || c == '_') {\n\t\t\t\tnewWord=true;\n\t\t\t} else if (newWord) {\n\t\t\t\tbuf.append(Character.toUpperCase(c));\n\t\t\t\tnewWord = false;\n\t\t\t} else {\n\t\t\t\tbuf.append(c);\n\t\t\t\tnewWord = false;\n\t\t\t}\n\t\t}\n\t\treturn buf.toString().trim();\n\t}", "private void setName(String name) {\n name = name.trim().replaceAll(\"\\\"\", \"\");\n name = name.substring(0,1).toUpperCase() + name.substring(1);\n\n this.name = name;\n }", "public void setCamelCaseName(CamelCaseName value){\n ((MvwDefinitionDMO) core).setCamelCaseName(value);\n }", "private String getNormalisedTableName(String tableName) {\n\t\treturn tableName.toLowerCase();\n\t}", "public static final String javaName(String s, int firstCase, int otherCase,\n\t\t\t\t boolean elideDash, boolean elideDot) {\n String n = \"\";\n int nxcase = firstCase;\n for (int i = 0; i < s.length(); ++i) {\n char c = s.charAt(i);\n if (elideDash && c == '-') \t\t{ nxcase = 1; continue; }\n else if (elideDot && c == '.') \t\t{ nxcase = 1; continue; }\n else if (!Character.isLetterOrDigit(c)) \tn += '_';\n else if (nxcase < 0) \t\t\tn += Character.toLowerCase(c);\n else if (nxcase > 0) \t\t\tn += Character.toUpperCase(c);\n else \t\t\t\t\tn += c;\n nxcase = otherCase;\n }\n return n;\n }", "protected String alterCase(String value) {\n\t\tswitch (getCase()) {\n\t\tcase UPPERCASE:\n\t\t\treturn value.toUpperCase();\n\t\tcase LOWERCASE:\n\t\t\treturn value.toLowerCase();\n\t\tdefault:\n\t\t\treturn value;\n\t\t}\n\t}", "private static String kebapToUpperCamel(String input) {\n return CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, input);\n }", "public static String underscoreName(String name) {\n\t\treturn name.substring(0, 1).toLowerCase() + name.substring(1).replaceAll(\"([A-Z])\", \"_$1\").toLowerCase();\n\t}", "private static String upperCase2CamelCase(String upperCase) {\r\n StringBuilder sb = new StringBuilder(upperCase.length());\r\n\r\n boolean lastWasUnderscore = upperCase.contains(\".\");\r\n for (int i = 0; i < upperCase.length(); i++) {\r\n char curChar = upperCase.charAt(i);\r\n\r\n if (curChar == '_') {\r\n lastWasUnderscore = true;\r\n } else if (lastWasUnderscore) {\r\n sb.append(curChar);\r\n lastWasUnderscore = false;\r\n } else {\r\n sb.append(Character.toLowerCase(curChar));\r\n }\r\n }\r\n return sb.toString();\r\n }", "String getFieldName();", "private String[] getNameParts() {\n return field.getName().split(\"_\");\n }", "static String m33125a(String name) {\n StringBuilder fieldNameBuilder = new StringBuilder();\n int index = 0;\n char firstCharacter = name.charAt(0);\n int length = name.length();\n while (index < length - 1 && !Character.isLetter(firstCharacter)) {\n fieldNameBuilder.append(firstCharacter);\n index++;\n firstCharacter = name.charAt(index);\n }\n if (Character.isUpperCase(firstCharacter)) {\n return name;\n }\n fieldNameBuilder.append(m33124a(Character.toUpperCase(firstCharacter), name, index + 1));\n return fieldNameBuilder.toString();\n }", "public String getMappedFieldName(String cn)\n { // map old name to a new name\n return DBProvider.translateColumnName(cn);\n }", "private String fixupCase(String s) {\r\n boolean nextIsUpper = true;\r\n StringBuffer sb = new StringBuffer();\r\n\r\n for (int i = 0; i < s.length(); i++) {\r\n char c = s.charAt(i);\r\n if (nextIsUpper) {\r\n c = Character.toUpperCase(c);\r\n } else {\r\n c = Character.toLowerCase(c);\r\n }\r\n sb.append(c);\r\n nextIsUpper = Character.isWhitespace(c);\r\n }\r\n return sb.toString();\r\n }", "public String as(NamingConvention convention) {\n switch (convention) {\n case FLAT:\n return flatCase();\n case CAMEL:\n return camelCase();\n case DONER:\n return donerCase();\n case KEBAB:\n return kebabCase();\n case SNAKE:\n return snakeCase();\n case TRAIN:\n return trainCase();\n case PASCAL:\n return pascalCase();\n case UPPER_FLAT:\n return upperFlatCase();\n case CAMEL_SNAKE:\n return camelSnakeCase();\n case PASCAL_SNAKE:\n return pascalSnakeCase();\n case SCREAMING_KEBAB:\n return screamingKebabCase();\n case SCREAMING_SNAKE:\n return screamingSnakeCase();\n default:\n throw new IllegalArgumentException(\n \"The naming convention '\"\n + convention\n + \"', you requested, is currently not supported.\");\n }\n }", "public String getLowerCaseName() {\n\t\treturn getName().toLowerCase();\n\t}", "java.lang.String getField1848();", "public static String underscoreToCamelCase(final String undescoredString) {\r\n\r\n // Split the string for each underscore\r\n final String[] parts = undescoredString.split(\"_\");\r\n final StringBuilder camelCaseString = new StringBuilder(undescoredString.length());\r\n camelCaseString.append(parts[0].toLowerCase(Locale.getDefault()));\r\n\r\n // Skip the first part already added\r\n for (int i = 1; i < parts.length; i++) {\r\n // First letter to upper case\r\n camelCaseString.append(parts[i].substring(0, 1).toUpperCase(Locale.getDefault()));\r\n // Others to lower case\r\n camelCaseString.append(parts[i].substring(1).toLowerCase(Locale.getDefault()));\r\n }\r\n return camelCaseString.toString();\r\n\r\n }", "public TestRenameFieldRefactoring(String name) {\r\n super(name);\r\n }", "java.lang.String getField1882();", "private static String qualifiedName2FirstCharacterUppercasedString(final String s) {\n final StringBuffer result = new StringBuffer();\n final Matcher m = Pattern.compile(\"(?:\\\\.|^)(.)\").matcher(s);\n while (m.find()) {\n m.appendReplacement(result,\n m.group(1).toUpperCase());\n }\n m.appendTail(result);\n return result.toString().replaceAll(\"\\\\[\\\\]\", \"Array\");\n }", "public String toString() {return name().charAt(0) + name().substring(1).toLowerCase();}", "public static String getRealClassNameLowerCamelCase(Object object) {\n\n return CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_CAMEL, object.getClass().getSimpleName());\n\n }", "public String getPropertyNameMapped(String aName) { return aName; }", "public static String camelify(String name) {\n int dash = name.indexOf('-');\n return dash < 0? name : camelify(name, dash);\n }", "private String formatName(String name) {\n Character firstCharacter = name.charAt(0);\n firstCharacter = Character.toUpperCase(firstCharacter);\n\n final String remainingCharacters = name.substring(1);\n\n return String.valueOf(firstCharacter) + remainingCharacters;\n }", "private String getNormalisedColumnName(String columnName) {\n\t\t// Avoid double-quotes - if a column name is in quotes, then PG will\n\t\t// add more quotes around it causing the query to fail\n\t\t//\n\t\tif (columnName.startsWith(\"\\\"\") && columnName.endsWith(\"\\\"\")) {\n\t\t\tcolumnName = columnName.substring(1, columnName.length() - 1);\n\t\t}\n\t\treturn columnName;\n\t}", "java.lang.String getField1818();", "public static String toClassName(String name)\r\n {\r\n return toCamelCase(name);\r\n }", "public UpperCaseField() {\n this(null, 0, 0);\n }", "@Override\r\n public String toString() {\r\n String prettyName = this.name();\r\n prettyName = prettyName.toLowerCase();\r\n prettyName = Utils.capitalizeFirstLetter(prettyName);\r\n \r\n return prettyName;\r\n }", "public String capitalCaseToSnakeCase(String text) {\n String textArray[] = text.split(\"(?=\\\\p{Upper})\");\n String capitalcaseToSnakeCase = \"\";\n for (String word: textArray) {\n if(!word.equals(\"\"))\n capitalcaseToSnakeCase += \"_\" + word.toLowerCase();\n }\n capitalcaseToSnakeCase = \"categorias\" + capitalcaseToSnakeCase;\n return capitalcaseToSnakeCase;\n }", "java.lang.String getField1710();", "public static String staticField(final String externalName) {\n requireNonNull(externalName);\n return toUnderscoreSeparated(javaNameFromExternal(externalName)).toUpperCase();\n }", "@Override\r\n\tpublic String displayElementName(String elementName) {\r\n\t\tString[] words = StringUtils.split(elementName, \"-\");\r\n\t\tList<String> capitalized = new ArrayList<String>();\r\n\t\tfor (String word : words) {\r\n\t\t\tcapitalized.add(StringUtils.capitalize(word));\r\n\t\t}\r\n\t\treturn StringUtils.join(capitalized, \" \");\r\n\t}", "private static String capitalize (String input) {\n\n String output = WordUtils.capitalize(input.toLowerCase());\n\n return output;\n }", "public static Field<?> getSortableField(String columnName) {\n Field<?> field = DSL.field(columnName);\n if (field.getType().equals(String.class)) {\n Field<String> fieldTypedString = field.cast(String.class);\n field = DSL.lower(fieldTypedString);\n }\n return field;\n }", "String getDBQualifiedFieldName(String fieldName);", "private void mapFieldName(Map<String, Field> mappedFields, Field field) {\n final String fieldName = field.getName();\n\n logger.trace(\"Retrieving @Column annotation for field '{}'\", fieldName);\n final Column columnAnnotation = field.getAnnotation(Column.class);\n\n logger.trace(\"Setting '{}' accessibility to true\", fieldName);\n field.setAccessible(true);\n\n if (columnAnnotation != null) {\n final String columnName = columnAnnotation.name();\n\n logger.trace(\"@Column annotation found for '{}'\", fieldName);\n logger.trace(\"The field name strategy will be overruled. Mapping '{}' to '{}'\", fieldName, columnName);\n mappedFields.put(columnName, field);\n } else {\n final String transformedName = fieldNamingStrategy.transform(fieldName);\n\n logger.trace(\"No @Column annotation found for '{}'\", fieldName);\n logger.trace(\"Mapping '{}' to '{}'\", fieldName, transformedName);\n mappedFields.put(transformedName, field);\n }\n }", "public UpperCaseField(final String value) {\n this(value, 0, 0);\n }", "public FieldNamingStrategy getFieldNamingStrategy() {\n return this.fieldNamingStrategy;\n }", "java.lang.String getField1865();", "private SortCaseOrder(String strName) { m_strName = strName; }", "public static String camel(final String value) {\r\n\t\tif (!isBlank(value)) {\r\n\t\t\treturn value.substring(0, 1).toLowerCase() + value.substring(1);\r\n\t\t} else {\r\n\t\t\treturn value;\r\n\t\t}\r\n\t}", "public static String A(BaseObject obj)\n\t{\t\t\n\t\tString aStr = Format.a(obj);\n\t\treturn aStr.substring(0, 1).toUpperCase();\n\t}", "public void renameField(Class<?> type, String oldFieldName, String newFieldName) {\n\t\trenameField(type.getName(), oldFieldName, newFieldName);\n\t}", "public static String modifyResultName(String sName) {\n\n sName = sName.replaceAll(\"\\\\.\", \"_\");\n sName = sName.replaceAll(\" \", \"_\");\n sName = sName.replaceAll(\"\\\\[\", \"_\");\n sName = sName.replaceAll(\"\\\\]\", \"_\");\n sName = sName.replaceAll(\"\\\\(\", \"_\");\n sName = sName.replaceAll(\"\\\\)\", \"_\");\n sName = sName.replaceAll(\"á\", \"a\");\n sName = sName.replaceAll(\"é\", \"e\");\n sName = sName.replaceAll(\"í\", \"i\");\n sName = sName.replaceAll(\"ó\", \"o\");\n sName = sName.replaceAll(\"ú\", \"u\");\n sName = sName.replaceAll(\"ñ\", \"n\");\n\n return sName;\n\n }", "public ICase retourneLaCase() ;", "@Override\n public String toString() {\n String name = this.name().substring(0,1);\n if (this.name().length() > 1) {\n for (int i = 1; i < this.name().length(); i++) {\n String charAt = this.name().substring(i, i + 1);\n if (charAt.equals(\"_\"))\n charAt = \" \";\n name += charAt.toLowerCase();\n }\n }\n return name;\n }", "public static final String javaName(String s) {\n StringBuffer n = new StringBuffer(s);\n for (int i = 0; i < s.length(); ++i) {\n if (i == 0) n.setCharAt(i, Character.toUpperCase(n.charAt(i)));\n if (!Character.isLetterOrDigit(n.charAt(i))) \n\tn.setCharAt(i, '_');\n }\n return n.toString();\n }", "abstract public FieldNames getFieldNames();", "public String getName() {\n return Util.uncapitalize(getCapName());\n }", "private String out_name(Enum<?> e) {\n return e.name().toLowerCase();\n }", "private static String kebapToConstant(String input) {\n return CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_UNDERSCORE, input);\n }", "public static String formatter(String s) {\n return s.replaceAll(\"[^a-zA-Z]\", \"\").toLowerCase();\n }", "static private String formats(String target)\n\t{\n\t\tString tmp = target.trim();\n\t\tif (tmp.length() < 1) return \"NaName\";\n\t\treturn (Character.toString(tmp.charAt(0)).toUpperCase()) + tmp.substring(1,tmp.length()).toLowerCase();\n\t}", "public void renameField(String typeName, String oldFieldName, String newFieldName) {\n\t\tFieldNameRenamer renamer = buildFieldNameRenamer(typeName, oldFieldName, newFieldName);\n\t\tgetStateObject().accept(renamer);\n\t}", "private String transformName(String originName,String prefix,String separator){\n if(StringUtils.isNotBlank(originName)){\n originName = StringUtils.removeStart(originName,prefix);\n }\n if(StringUtils.isNotBlank(separator)){\n List<String> names = Splitter.on(separator).omitEmptyStrings().trimResults().splitToList(originName);\n List<String> javaStyleNames = Lists.transform(names, new Function<String, String>() {\n public String apply(String input) {\n return ContextUtil.onlyFirstLetterIsUp(input);\n }\n });\n originName = Joiner.on(\"\").join(javaStyleNames);\n }else {\n originName = ContextUtil.onlyFirstLetterIsUp(originName);\n }\n return ContextUtil.upperFirstLetter(originName);\n }", "@Override\n\tpublic String[] getFieldName() {\n\t\treturn new String[]{\"编码\",\"名称\",\"属性\"};\n\t}", "public String getFieldName();", "public static String camel(String s) {\n if (s == null) {\n return null;\n }\n final var result = new char[s.length()];\n int dst = 0;\n var capIt = true;\n for (int src = 0; src < s.length(); src++) {\n if (s.charAt(src) == '_') {\n capIt = true;\n } else {\n if (capIt) {\n capIt = false;\n result[dst++] = Character.toUpperCase(s.charAt(src));\n } else {\n result[dst++] = Character.toLowerCase(s.charAt(src));\n }\n }\n }\n return new String(result, 0, dst);\n }", "private final static String toTitleCase( String s ) {\n\n char[] ca = s.toCharArray();\n\n boolean changed = false;\n boolean capitalise = true;\n\n for ( int i=0; i<ca.length; i++ ) {\n char oldLetter = ca[i];\n if ( oldLetter <= '/'\n || ':' <= oldLetter && oldLetter <= '?'\n || ']' <= oldLetter && oldLetter <= '`' ) {\n /* whitespace, control chars or punctuation */\n /* Next normal char should be capitalized */\n capitalise = true;\n } else {\n char newLetter = capitalise\n ? Character.toUpperCase(oldLetter)\n : Character.toLowerCase(oldLetter);\n ca[i] = newLetter;\n changed |= (newLetter != oldLetter);\n capitalise = false;\n }\n } // end for\n\n return new String (ca);\n\n }", "private String getSplitNames(String className){\n String nameSplited = \"\";\n\n for (String character : className.split(\"(?<!(^|[A-Z]))(?=[A-Z])|(?<!^)(?=[A-Z][a-z])\")){\n nameSplited = nameSplited + character + \" \";\n }\n\n return nameSplited;\n }", "private void formatCustomerName(String customerName) {\n\t\t// if the customer has a first and last name, separate them and\n\t\t// instantiate the respective instance variable\n\t\t// if the customer only has a first name, declare the last name to \"\"\n\t\t// (blank string)\n\t\tif (customerName.contains(\" \")) {\n\t\t\tthis.firstName = customerName.substring(0, customerName.indexOf(\" \")).toLowerCase();\n\t\t\tthis.lastName = customerName.substring(customerName.indexOf(\" \") + 1).toLowerCase();\n\t\t} else {\n\t\t\tthis.firstName = customerName.toLowerCase();\n\t\t\tthis.lastName = Customer.EMPTY_LAST_NAME;\n\t\t}\n\n\t\t// update the customer's username\n\t\tthis.updateUserName();\n\t}", "public void setCamelCaseName(Object value) throws DmcValueException {\n ((MvwDefinitionDMO) core).setCamelCaseName(value);\n }", "private String normalize(String name) {\n return Normalizer.normalize(name, Normalizer.Form.NFKD);\n }", "public String getLowercaseFunction() {\n \t\treturn \"lower\";\n \t}", "private String derivePrefixFromClassName(String className) {\n int prefixIdx = 0;\n int lastUpperIndex = 0;\n char[] prefix = new char[PREFIX_LENGTH];\n char[] src = className.toCharArray();\n\n prefix[prefixIdx++] = Character.toLowerCase(src[0]);\n\n for (int i = 1; i < src.length; i++) {\n char c = src[i];\n if (Character.isUpperCase(c)) {\n prefix[prefixIdx++] = Character.toLowerCase(c);\n if (prefixIdx == PREFIX_LENGTH) {\n return new String(prefix);\n }\n lastUpperIndex = i;\n }\n }\n\n while (prefixIdx < PREFIX_LENGTH) {\n prefix[prefixIdx++] = Character.toLowerCase(src[++lastUpperIndex]);\n }\n\n return new String(prefix);\n }", "@Override\n public JsonNode visit(JmesPathField fieldNode, JsonNode input) {\n if (input.isObject()) {\n //TODO : CamelCase will need to change at some point\n return input.get(CamelCaseUtils.toCamelCase(fieldNode.getValue()));\n }\n return NullNode.getInstance();\n }", "java.lang.String getField1826();" ]
[ "0.67715377", "0.6680607", "0.6512355", "0.6398486", "0.6309279", "0.6284367", "0.62154096", "0.61340296", "0.6101502", "0.60986227", "0.6094252", "0.60901195", "0.606606", "0.5995498", "0.5976948", "0.5914572", "0.5895382", "0.5875452", "0.58577096", "0.5856027", "0.5791691", "0.57820433", "0.57710224", "0.5758646", "0.57476145", "0.57463694", "0.569359", "0.5688773", "0.5678382", "0.5672953", "0.56401193", "0.560282", "0.5568686", "0.55300504", "0.55268216", "0.55219114", "0.5517894", "0.5511333", "0.5508115", "0.5496415", "0.54797184", "0.5467021", "0.5462141", "0.5459123", "0.5455751", "0.5443218", "0.53963256", "0.53951657", "0.53679013", "0.5366755", "0.53589964", "0.5354164", "0.53539896", "0.53288215", "0.5321882", "0.5301687", "0.52978987", "0.52904963", "0.52892774", "0.52874696", "0.52769", "0.5274531", "0.5274033", "0.525525", "0.52435607", "0.5238424", "0.5234305", "0.52325356", "0.52198654", "0.5219198", "0.52082324", "0.52061886", "0.520329", "0.51919097", "0.51795995", "0.5178582", "0.51705825", "0.5168255", "0.51676005", "0.5166889", "0.51587576", "0.5157629", "0.5150089", "0.51470417", "0.51460445", "0.51437694", "0.5138114", "0.51337963", "0.51335293", "0.51280737", "0.51213074", "0.5119077", "0.5114348", "0.51134384", "0.51128215", "0.5109113", "0.5105102", "0.51035357", "0.5101657", "0.51008373" ]
0.7580473
0
Unsafe operation, wrapping bytes directly as done by core for byte arrays / buffers
private static SdkBytes toSdkBytes(Object sdkBytes) { return SdkBytes.fromByteArrayUnsafe((byte[]) sdkBytes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IUnsafe {\n\n byte getByte(long address);\n\n void putByte(long address, byte x);\n\n short getShort(long address);\n\n void putShort(long address, short x);\n\n char getChar(long address);\n\n void putChar(long address, char x);\n\n int getInt(long address);\n\n void putInt(long address, int x);\n\n long getLong(long address);\n\n void putLong(long address, long x);\n\n float getFloat(long address);\n\n void putFloat(long address, float x);\n\n double getDouble(long address);\n\n void putDouble(long address, double x);\n\n int getInt(Object o, long address);\n\n void putInt(Object o, long address, int x);\n\n Object getObject(Object o, long address);\n\n void putObject(Object o, long address, Object x);\n\n boolean getBoolean(Object o, long address);\n\n void putBoolean(Object o, long address, boolean x);\n\n byte getByte(Object o, long address);\n\n void putByte(Object o, long address, byte x);\n\n short getShort(Object o, long address);\n\n void putShort(Object o, long address, short x);\n\n char getChar(Object o, long address);\n\n void putChar(Object o, long address, char x);\n\n long getLong(Object o, long address);\n\n void putLong(Object o, long address, long x);\n\n float getFloat(Object o, long address);\n\n void putFloat(Object o, long address, float x);\n\n double getDouble(Object o, long address);\n\n void putDouble(Object o, long address, double x);\n\n\n\n long getAddress(long address);\n\n void putAddress(long address, long x);\n\n long allocateMemory(long bytes);\n\n long reallocateMemory(long address, long bytes);\n\n void setMemory(Object o, long offset, long bytes, byte value);\n\n default void setMemory(long address, long bytes, byte value) {\n setMemory(null, address, bytes, value);\n }\n\n void copyMemory(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes);\n\n default void copyMemory(long srcAddress, long destAddress, long bytes) {\n copyMemory(null, srcAddress, null, destAddress, bytes);\n }\n\n void freeMemory(long address);\n \n}", "public native byte[] __byteArrayMethod( long __swiftObject, byte[] arg );", "Buffer copy();", "static native int jniToBuf(Buf out, long patch);", "@Override\r\n\tpublic Buffer setBytes(int pos, byte[] b, int offset, int len) {\n\t\treturn null;\r\n\t}", "public native static long getConvertBytes();", "public native void get(byte[] bytes);", "private static byte[] get(ByteIterable bytes, boolean copy) {\n final int len = bytes.getLength();\n final byte[] data = bytes.getBytesUnsafe();\n if (data.length == len && !copy)\n return data;\n final byte[] result = new byte[len];\n System.arraycopy(data, 0, result, 0, len);\n return result;\n }", "@Override\r\n\tpublic Buffer setBytes(int pos, byte[] b) {\n\t\treturn null;\r\n\t}", "protected AbstractChannel.AbstractUnsafe newUnsafe() {\n/* 713 */ return new EmbeddedUnsafe();\n/* */ }", "@Override // c.d.a.m.w.b.AbstractC0024b\n public ByteBuffer b(byte[] bArr) {\n return ByteBuffer.wrap(bArr);\n }", "public interface ByteAdaptable {\n\n byte[] SetToByte();\n}", "public static byte[] wrap(byte[] array, int offset, int length){\r\n\t\tbyte[] arrayWrapped = new byte[length];\r\n\r\n\t\tfor(int i=0;i<length;i++) arrayWrapped[i] = array[i+offset]; \r\n\r\n\t\treturn arrayWrapped;\r\n\t}", "public byte[] marshall();", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "byte [] getBuffer ();", "public ByteBuffer getByteBuffer();", "public native byte __byteMethod( long __swiftObject, byte arg );", "private static byte[] toBytes(Object sdkBytes) {\n return ((SdkBytes) sdkBytes).asByteArrayUnsafe();\n }", "private ByteBuffer internalNioBuffer()\r\n/* 532: */ {\r\n/* 533:545 */ ByteBuffer tmpNioBuf = this.tmpNioBuf;\r\n/* 534:546 */ if (tmpNioBuf == null) {\r\n/* 535:547 */ this.tmpNioBuf = (tmpNioBuf = ByteBuffer.wrap(this.array));\r\n/* 536: */ }\r\n/* 537:549 */ return tmpNioBuf;\r\n/* 538: */ }", "public ByteBufferInputStream(java.nio.ByteBuffer r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.<init>(java.nio.ByteBuffer):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.<init>(java.nio.ByteBuffer):void\");\n }", "protected O bytesToObject(ByteBuffer data) throws OBException,\r\n InstantiationException, IllegalAccessException, IllegalIdException {\r\n return bytesToObject(data.array());\r\n }", "public interface MarshalBuffer\n{\n /**\n * @param key\n * key\n * @return DBRowColumnTypeReader\n * @see java.util.Map#containsKey(java.lang.Object)\n */\n boolean containsKey(Object key);\n\n /**\n * @return value\n */\n byte get();\n\n /**\n * @param dst\n * dst\n * @return value\n */\n ByteBuffer get(byte[] dst);\n\n /**\n * @param key\n * key\n * @return map\n * @see java.util.Map#get(java.lang.Object)\n */\n DBRowMapPair get(Object key);\n\n /**\n * @return value\n */\n boolean getBoolean(); // NOPMD\n\n /**\n * @return value\n */\n double getDouble();\n\n /**\n * @return value\n */\n int getInt();\n\n /**\n * @return value\n */\n long getLong();\n\n /**\n * @return value\n */\n int getNextSharedIndex();\n\n /**\n * @param index\n * index\n * @return value\n */\n PyBase getShared(int index);\n\n /**\n * @return value\n */\n short getShort(); // NOPMD\n\n /**\n * @throws IllegalOpCodeException\n * on wrong stream format\n */\n void initialize() throws IllegalOpCodeException;\n\n /**\n * @return value\n */\n int parentPosition();\n\n /**\n * @return value\n */\n byte peekByte();\n\n /**\n * @return value\n */\n int position();\n\n /**\n * @return value\n */\n boolean processed();\n\n /**\n * @param key\n * key\n * @param value\n * value\n * @return value\n * @see java.util.Map#put(java.lang.Object, java.lang.Object)\n */\n DBRowMapPair put(PyDBRowDescriptor key, DBRowMapPair value);\n\n /**\n * @param size\n * size\n * @return value\n */\n byte[] readBytes(int size);\n\n /**\n * @param index\n * index\n * @param pyBase\n * pyBase\n * @return value\n */\n PyBase setShared(int index, PyBase pyBase);\n}", "public abstract byte[] toBytes() throws Exception;", "public ByteBuffer toBuffer() {\n return ByteBuffer.wrap(buf, 0, count);\n }", "@Override\r\n\tpublic Buffer setBytes(int pos, ByteBuffer b) {\n\t\treturn null;\r\n\t}", "@Deprecated\n protected byte[] fixBytes(byte[] in) {\n return in; // TODO: Report to author of decompiler\n }", "void mo12206a(byte[] bArr);", "public void GetBytes(ByteBuffer bytes) {\n bytes.put(data);\n }", "public ByteBuffer raw() {\n\n\t\t// Allocate buffer\n\t\tByteBuffer b = ByteBuffer.allocate(rawLength()).order(ByteOrder.LITTLE_ENDIAN);\n\n\t\t// Populate buffer\n\t\tb.put(length.raw());\n\t\tb.put(s.getBytes(Charset.forName(\"UTF-8\")));\n\n\t\t// Return rewinded buffer\n\t\tb.rewind();\n\n\t\t// Return buffer\n\t\treturn b;\n\t}", "static native ByteBuffer loadJni(long[] nativeData, byte[] buffer, int offset, int len);", "public static int OpaqueToType(byte[] b) { \n int type = b[8];\n return type; \n }", "ByteBuffer allocate() {\n\t\tvar b = ByteBuffer.allocate(size).order(LITTLE_ENDIAN);\n\t\tb.putInt(ordinal());\n\t\treturn b;\n\t}", "static native ByteBuffer createJni(long[] nativeData, int width, int height);", "static native void free(long buffer);", "private byte[] decode(ByteBuffer bytes) {\n \treturn bytes.array();\r\n }", "static native int jniFromBlobAndBuffer(\n AtomicLong out,\n long oldBlob,\n String oldAsPath,\n byte[] buffer,\n int bufferLen,\n String bufferAsPath,\n long opts);", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default byte[] asByteArray() {\n //TODO this is actually sbyte[], but @Unsigned doesn't work on arrays right now\n return notSupportedCast(\"byte[]\");\n }", "public static int putByteBuffer(byte[] bytes, int offset, ByteBuffer buf) {\n int len = buf.remaining();\n buf.get(bytes, offset, len);\n return offset + len;\n }", "public void toBuffer(ByteBufWrapper paramhd)\r\n/* 48: */ {\r\n/* 49:55 */ paramhd.b(this.a);\r\n/* 50:56 */ paramhd.writeInt(this.b);\r\n/* 51:57 */ paramhd.writeInt(this.c);\r\n/* 52:58 */ paramhd.writeInt(this.d);\r\n/* 53:59 */ paramhd.writeByte(this.e);\r\n/* 54:60 */ paramhd.writeByte(this.f);\r\n/* 55:61 */ paramhd.writeBoolean(this.g);\r\n/* 56: */ }", "public interface HttpData extends HttpObject, Bytes {\n\n /**\n * Returns an empty {@link HttpData}.\n */\n static HttpData empty() {\n return ByteArrayHttpData.EMPTY;\n }\n\n /**\n * Creates a new instance from the specified byte array. The array is not copied; any changes made in the\n * array later will be visible to {@link HttpData}.\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of the specified array is 0.\n */\n static HttpData wrap(byte[] data) {\n requireNonNull(data, \"data\");\n if (data.length == 0) {\n return empty();\n }\n\n return new ByteArrayHttpData(data);\n }\n\n /**\n * Creates a new instance from the specified byte array, {@code offset} and {@code length}.\n * The array is not copied; any changes made in the array later will be visible to {@link HttpData}.\n *\n * @return a new {@link HttpData}. {@link #empty()} if {@code length} is 0.\n *\n * @throws IndexOutOfBoundsException if {@code offset} and {@code length} are out of bounds\n */\n static HttpData wrap(byte[] data, int offset, int length) {\n requireNonNull(data, \"data\");\n if (offset < 0 || length < 0 || offset > data.length - length) {\n throw new IndexOutOfBoundsException(\n \"offset: \" + offset + \", length: \" + length + \", data.length: \" + data.length);\n }\n if (length == 0) {\n return empty();\n }\n\n if (data.length == length) {\n return new ByteArrayHttpData(data);\n }\n\n return new ByteBufHttpData(Unpooled.wrappedBuffer(data, offset, length), false);\n }\n\n /**\n * (Advanced users only) Converts the specified Netty {@link ByteBuf} into a pooled {@link HttpData}.\n * The buffer is not copied; any changes made to it will be visible to {@link HttpData}. The ownership of\n * the buffer is transferred to the {@link HttpData}. If you still need to use it after calling this method,\n * make sure to call {@link ByteBuf#retain()} first.\n *\n * @return a new {@link HttpData}. {@link #empty()} if the readable bytes of {@code buf} is 0.\n *\n * @see PooledObjects\n */\n @UnstableApi\n static HttpData wrap(ByteBuf buf) {\n requireNonNull(buf, \"buf\");\n final int length = buf.readableBytes();\n if (length == 0) {\n buf.release();\n return empty();\n }\n\n final HttpData data = new ByteBufHttpData(buf, true);\n buf.touch(data);\n return data;\n }\n\n /**\n * Creates a new instance from the specified byte array by first copying it.\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of the specified array is 0.\n */\n static HttpData copyOf(byte[] data) {\n requireNonNull(data, \"data\");\n if (data.length == 0) {\n return empty();\n }\n\n return new ByteArrayHttpData(data.clone());\n }\n\n /**\n * Creates a new instance from the specified byte array, {@code offset} and {@code length} by first copying\n * it.\n *\n * @return a new {@link HttpData}. {@link #empty()} if {@code length} is 0.\n *\n * @throws ArrayIndexOutOfBoundsException if {@code offset} and {@code length} are out of bounds\n */\n static HttpData copyOf(byte[] data, int offset, int length) {\n requireNonNull(data);\n if (offset < 0 || length < 0 || offset > data.length - length) {\n throw new ArrayIndexOutOfBoundsException(\n \"offset: \" + offset + \", length: \" + length + \", data.length: \" + data.length);\n }\n if (length == 0) {\n return empty();\n }\n\n return new ByteArrayHttpData(Arrays.copyOfRange(data, offset, offset + length));\n }\n\n /**\n * Creates a new instance from the specified {@link ByteBuf} by first copying its content. The reference\n * count of {@link ByteBuf} will not be changed.\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of the specified array is 0.\n */\n static HttpData copyOf(ByteBuf data) {\n requireNonNull(data, \"data\");\n\n data.touch(data);\n\n if (!data.isReadable()) {\n return empty();\n }\n\n return wrap(ByteBufUtil.getBytes(data));\n }\n\n /**\n * Converts the specified {@code text} into an {@link HttpData}.\n *\n * @param charset the {@link Charset} to use for encoding {@code text}\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData of(Charset charset, CharSequence text) {\n requireNonNull(charset, \"charset\");\n requireNonNull(text, \"text\");\n\n if (text instanceof String) {\n return of(charset, (String) text);\n }\n\n if (text.length() == 0) {\n return empty();\n }\n\n final CharBuffer cb = CharBuffer.wrap(text);\n final ByteBuffer buf = charset.encode(cb);\n if (buf.arrayOffset() == 0 && buf.remaining() == buf.array().length) {\n return wrap(buf.array());\n } else {\n return copyOf(buf.array(), buf.arrayOffset(), buf.remaining());\n }\n }\n\n /**\n * Converts the specified {@code text} into an {@link HttpData}.\n *\n * @param charset the {@link Charset} to use for encoding {@code text}\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData of(Charset charset, String text) {\n requireNonNull(charset, \"charset\");\n requireNonNull(text, \"text\");\n if (text.isEmpty()) {\n return empty();\n }\n\n return wrap(text.getBytes(charset));\n }\n\n /**\n * Converts the specified formatted string into an {@link HttpData}. The string is formatted by\n * {@link String#format(Locale, String, Object...)} with {@linkplain Locale#ENGLISH English locale}.\n *\n * @param charset the {@link Charset} to use for encoding string\n * @param format {@linkplain Formatter the format string} of the response content\n * @param args the arguments referenced by the format specifiers in the format string\n *\n * @return a new {@link HttpData}. {@link #empty()} if {@code format} is empty.\n */\n @FormatMethod\n static HttpData of(Charset charset, @FormatString String format, Object... args) {\n requireNonNull(charset, \"charset\");\n requireNonNull(format, \"format\");\n requireNonNull(args, \"args\");\n\n if (format.isEmpty()) {\n return empty();\n }\n\n return wrap(String.format(Locale.ENGLISH, format, args).getBytes(charset));\n }\n\n /**\n * Converts the specified {@code text} into a UTF-8 {@link HttpData}.\n *\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData ofUtf8(CharSequence text) {\n return of(StandardCharsets.UTF_8, text);\n }\n\n /**\n * Converts the specified {@code text} into a UTF-8 {@link HttpData}.\n *\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData ofUtf8(String text) {\n return of(StandardCharsets.UTF_8, text);\n }\n\n /**\n * Converts the specified formatted string into a UTF-8 {@link HttpData}. The string is formatted by\n * {@link String#format(Locale, String, Object...)} with {@linkplain Locale#ENGLISH English locale}.\n *\n * @param format {@linkplain Formatter the format string} of the response content\n * @param args the arguments referenced by the format specifiers in the format string\n *\n * @return a new {@link HttpData}. {@link #empty()} if {@code format} is empty.\n */\n @FormatMethod\n static HttpData ofUtf8(@FormatString String format, Object... args) {\n return of(StandardCharsets.UTF_8, format, args);\n }\n\n /**\n * Converts the specified {@code text} into a US-ASCII {@link HttpData}.\n *\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData ofAscii(CharSequence text) {\n return of(StandardCharsets.US_ASCII, text);\n }\n\n /**\n * Converts the specified {@code text} into a US-ASCII {@link HttpData}.\n *\n * @param text the {@link String} to convert\n *\n * @return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.\n */\n static HttpData ofAscii(String text) {\n return of(StandardCharsets.US_ASCII, text);\n }\n\n /**\n * Converts the specified formatted string into a US-ASCII {@link HttpData}. The string is formatted by\n * {@link String#format(Locale, String, Object...)} with {@linkplain Locale#ENGLISH English locale}.\n *\n * @param format {@linkplain Formatter the format string} of the response content\n * @param args the arguments referenced by the format specifiers in the format string\n *\n * @return a new {@link HttpData}. {@link #empty()} if {@code format} is empty.\n */\n @FormatMethod\n static HttpData ofAscii(@FormatString String format, Object... args) {\n return of(StandardCharsets.US_ASCII, format, args);\n }\n\n /**\n * Returns the {@link HttpData} that has the same content with this data and its HTTP/2 {@code endOfStream}\n * flag set. If this data already has {@code endOfStream} set, {@code this} will be returned.\n */\n default HttpData withEndOfStream() {\n return withEndOfStream(true);\n }\n\n /**\n * Returns the {@link HttpData} that has the same content with this data and its HTTP/2 {@code endOfStream}\n * flag set with the specified value. If this data already has the same {@code endOfStream} value set,\n * {@code this} will be returned.\n */\n HttpData withEndOfStream(boolean endOfStream);\n}", "public void toBuffer(ByteBufWrapper paramhd)\r\n/* 23: */ {\r\n/* 24:40 */ paramhd.a(a.toJson(this.b));\r\n/* 25: */ }", "public void testNIO_direct() throws Exception {\n byteBufferTest(ByteBuffer.allocateDirect(12));\n }", "private static ByteBuffer createNativeByteBuffer(int length) {\n ByteBuffer bb = ByteBuffer.allocateDirect(length);\n // use the device hardware's native byte order\n bb.order(ByteOrder.nativeOrder());\n return bb;\n }", "public void testNIO_byte_array() throws Exception {\n byteBufferTest(ByteBuffer.allocate(12));\n }", "@Override\n\tpublic BytesReceiver put(final ByteBuffer src) {\n\t\treturn put(src.array());\n\t}", "void write(ByteBuffer b, int off, int len) throws IOException;", "public static ByteBuffer allocateAndPutFlip(final byte[] bytes) {\n Objects.requireNonNull(bytes);\n ByteBuffer bb = BytesUtils.allocateAndPut(bytes);\n bb.flip();\n return (bb);\n }", "private void writeBytes( ByteBuffer byteBuffer, byte[] bytes, int len )\n {\n if ( null == bytes )\n {\n bytes = new byte[]\n {};\n }\n\n byteBuffer.put( bytes, 0, Math.min( len, bytes.length ) );\n\n // pad as necessary\n int remain = len - bytes.length;\n\n while ( remain-- > 0 )\n {\n byteBuffer.put( ( byte ) 0 );\n }\n }", "@Override\n public void serialize(ByteBuffer buf) {\n }", "void freeArray(byte[] array) {}", "CharArrayBuffer getBuffer()\n ;", "protected abstract Buffer doCreateBuffer(byte[] data)\n throws BadParameterException, NoSuccessException;", "private static Unsafe getUnsafe() {\n try {\n Field singleOneInstanceField = Unsafe.class.getDeclaredField(\"theUnsafe\");\n singleOneInstanceField.setAccessible(true);\n return (Unsafe) singleOneInstanceField.get(null);\n\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static byte[] ByteCopy(ByteBuffer b) {\n \tbyte[] output = new byte[b.limit()];\n \tfor (int i = 0; i < b.limit(); i++) {\n \t\toutput[i] = b.get(i);\n \t}\n \treturn output;\n }", "protected abstract void writeToExternal(byte[] b, int off, int len) throws IOException;", "abstract public Buffer createBufferFromData(byte[] data, int size);", "public void setDataUnsafe(Serializable data) { this.data = data; }", "public void fromBytes(ByteBuffer buffer) {\n }", "byte[] getBytes();", "byte[] getBytes();", "C4932q5 mo19394a(byte[] bArr) throws zzfn;", "public native int sendBuf(ByteBuffer buffer, int bufferSize, long nativeHandle);", "private int getBytes(int index, FileChannel out, long position, int length, boolean internal)\r\n/* 211: */ throws IOException\r\n/* 212: */ {\r\n/* 213:233 */ ensureAccessible();\r\n/* 214:234 */ ByteBuffer tmpBuf = internal ? internalNioBuffer() : ByteBuffer.wrap(this.array);\r\n/* 215:235 */ return out.write((ByteBuffer)tmpBuf.clear().position(index).limit(index + length), position);\r\n/* 216: */ }", "private ByteBuf getSendByteBuf(byte[] bytes){\n return Unpooled.unreleasableBuffer(Unpooled.copiedBuffer(\n bytes));\n }", "public void fromBuffer(ByteBufWrapper paramhd)\r\n/* 18: */ {\r\n/* 19:35 */ this.b = ((np)a.fromJson(paramhd.c(32767), np.class));\r\n/* 20: */ }", "public ByteBuf setBytes(int index, ByteBuffer src)\r\n/* 349: */ {\r\n/* 350:364 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 351:365 */ return super.setBytes(index, src);\r\n/* 352: */ }", "static native int jniFromBuffers(\n AtomicLong out,\n byte[] oldBuffer,\n int oldLen,\n String oldAsPath,\n byte[] newBuffer,\n int newLen,\n String newAsPath,\n long opts);", "public void marshal(java.nio.ByteBuffer buff) throws Exception\n{\n recordType.marshal(buff);\n changeIndicator.marshal(buff);\n entityType.marshal(buff);\n buff.putShort( (short)padding);\n buff.putInt( (int)padding1);\n}", "public interface ByteVectorIO {\n public void send(byte[] b) throws IOException;\n\n public byte[] get() throws IOException;\n\n public void close();\n}", "HRESULT SafeArrayUnaccessData(SAFEARRAY psa);", "@Nullable\n @NativeType(\"bgfx_memory_t const *\")\n public static BGFXMemory bgfx_copy(@NativeType(\"void const *\") ByteBuffer _data) {\n long __result = nbgfx_copy(memAddress(_data), _data.remaining());\n return BGFXMemory.createSafe(__result);\n }", "void mo4520a(byte[] bArr);", "public abstract void mo13593a(byte[] bArr, int i, int i2);", "HRESULT SafeArrayAccessData(SAFEARRAY psa, PointerByReference ppvData);", "public abstract byte[] toByteArray();", "public abstract byte[] toByteArray();", "public interface DirectByteBufferAccess {\n\n /**\n * Returns the native memory address of the given direct byte buffer, or 0\n * if the buffer is not direct or if obtaining the address is not supported.\n * \n * @param buffer the direct byte buffer for which to obtain the address\n * @return the native memory address or 0\n */\n long getAddress(ByteBuffer buffer);\n}", "public native char[] __charArrayMethod( long __swiftObject, char[] arg );", "void mo1751a(byte[] bArr);", "HRESULT SafeArrayLock(SAFEARRAY psa);", "public ByteBuf writeBytes(ByteBuffer src)\r\n/* 611: */ {\r\n/* 612:622 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 613:623 */ return super.writeBytes(src);\r\n/* 614: */ }", "ByteArray(byte []a) {\n\tdata = a;\n }" ]
[ "0.6189816", "0.60551023", "0.5889787", "0.581462", "0.5807963", "0.5805477", "0.5783665", "0.5721651", "0.5639017", "0.563352", "0.56090266", "0.5594449", "0.5578428", "0.5573815", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.5572615", "0.55659217", "0.55299693", "0.5508837", "0.5506437", "0.54985285", "0.54846114", "0.54703593", "0.5449909", "0.5426332", "0.5420997", "0.53873456", "0.53799826", "0.53740203", "0.5357242", "0.5353135", "0.5322945", "0.52870977", "0.528199", "0.52586514", "0.5249654", "0.5224941", "0.52170014", "0.51949936", "0.51897186", "0.51889354", "0.5179468", "0.51630515", "0.5162908", "0.5156321", "0.51480347", "0.51469", "0.5146322", "0.5141635", "0.51378167", "0.51345694", "0.5132475", "0.51202744", "0.51188105", "0.5115977", "0.51060635", "0.509051", "0.50718105", "0.50670195", "0.50540274", "0.5049051", "0.5049051", "0.50397396", "0.5030493", "0.5029728", "0.50197816", "0.50191075", "0.5004988", "0.5001082", "0.4995628", "0.49924684", "0.499121", "0.49832863", "0.4980208", "0.49677286", "0.49661368", "0.49490556", "0.49490556", "0.49488443", "0.49466798", "0.49401078", "0.49283895", "0.49281445", "0.4926211" ]
0.51538086
61
Unsafe operation, exposing bytes directly as done by core for byte arrays / buffers
private static byte[] toBytes(Object sdkBytes) { return ((SdkBytes) sdkBytes).asByteArrayUnsafe(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public native void get(byte[] bytes);", "public interface IUnsafe {\n\n byte getByte(long address);\n\n void putByte(long address, byte x);\n\n short getShort(long address);\n\n void putShort(long address, short x);\n\n char getChar(long address);\n\n void putChar(long address, char x);\n\n int getInt(long address);\n\n void putInt(long address, int x);\n\n long getLong(long address);\n\n void putLong(long address, long x);\n\n float getFloat(long address);\n\n void putFloat(long address, float x);\n\n double getDouble(long address);\n\n void putDouble(long address, double x);\n\n int getInt(Object o, long address);\n\n void putInt(Object o, long address, int x);\n\n Object getObject(Object o, long address);\n\n void putObject(Object o, long address, Object x);\n\n boolean getBoolean(Object o, long address);\n\n void putBoolean(Object o, long address, boolean x);\n\n byte getByte(Object o, long address);\n\n void putByte(Object o, long address, byte x);\n\n short getShort(Object o, long address);\n\n void putShort(Object o, long address, short x);\n\n char getChar(Object o, long address);\n\n void putChar(Object o, long address, char x);\n\n long getLong(Object o, long address);\n\n void putLong(Object o, long address, long x);\n\n float getFloat(Object o, long address);\n\n void putFloat(Object o, long address, float x);\n\n double getDouble(Object o, long address);\n\n void putDouble(Object o, long address, double x);\n\n\n\n long getAddress(long address);\n\n void putAddress(long address, long x);\n\n long allocateMemory(long bytes);\n\n long reallocateMemory(long address, long bytes);\n\n void setMemory(Object o, long offset, long bytes, byte value);\n\n default void setMemory(long address, long bytes, byte value) {\n setMemory(null, address, bytes, value);\n }\n\n void copyMemory(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes);\n\n default void copyMemory(long srcAddress, long destAddress, long bytes) {\n copyMemory(null, srcAddress, null, destAddress, bytes);\n }\n\n void freeMemory(long address);\n \n}", "byte [] getBuffer ();", "Buffer copy();", "public native byte[] __byteArrayMethod( long __swiftObject, byte[] arg );", "@Override\r\n\tpublic Buffer setBytes(int pos, byte[] b, int offset, int len) {\n\t\treturn null;\r\n\t}", "private int getBytes(int index, FileChannel out, long position, int length, boolean internal)\r\n/* 211: */ throws IOException\r\n/* 212: */ {\r\n/* 213:233 */ ensureAccessible();\r\n/* 214:234 */ ByteBuffer tmpBuf = internal ? internalNioBuffer() : ByteBuffer.wrap(this.array);\r\n/* 215:235 */ return out.write((ByteBuffer)tmpBuf.clear().position(index).limit(index + length), position);\r\n/* 216: */ }", "protected AbstractChannel.AbstractUnsafe newUnsafe() {\n/* 713 */ return new EmbeddedUnsafe();\n/* */ }", "private static byte[] get(ByteIterable bytes, boolean copy) {\n final int len = bytes.getLength();\n final byte[] data = bytes.getBytesUnsafe();\n if (data.length == len && !copy)\n return data;\n final byte[] result = new byte[len];\n System.arraycopy(data, 0, result, 0, len);\n return result;\n }", "@Override\r\n\tpublic Buffer setBytes(int pos, byte[] b) {\n\t\treturn null;\r\n\t}", "public ByteBuffer getByteBuffer();", "public native byte __byteMethod( long __swiftObject, byte arg );", "void mo12206a(byte[] bArr);", "byte[] getBytes();", "byte[] getBytes();", "private static Unsafe getUnsafe() {\n try {\n Field singleOneInstanceField = Unsafe.class.getDeclaredField(\"theUnsafe\");\n singleOneInstanceField.setAccessible(true);\n return (Unsafe) singleOneInstanceField.get(null);\n\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public void testNIO_direct() throws Exception {\n byteBufferTest(ByteBuffer.allocateDirect(12));\n }", "public interface DirectByteBufferAccess {\n\n /**\n * Returns the native memory address of the given direct byte buffer, or 0\n * if the buffer is not direct or if obtaining the address is not supported.\n * \n * @param buffer the direct byte buffer for which to obtain the address\n * @return the native memory address or 0\n */\n long getAddress(ByteBuffer buffer);\n}", "@Override\r\n\tpublic Buffer setBytes(int pos, ByteBuffer b) {\n\t\treturn null;\r\n\t}", "private ByteBuffer internalNioBuffer()\r\n/* 532: */ {\r\n/* 533:545 */ ByteBuffer tmpNioBuf = this.tmpNioBuf;\r\n/* 534:546 */ if (tmpNioBuf == null) {\r\n/* 535:547 */ this.tmpNioBuf = (tmpNioBuf = ByteBuffer.wrap(this.array));\r\n/* 536: */ }\r\n/* 537:549 */ return tmpNioBuf;\r\n/* 538: */ }", "public byte[] getBytes()\r\n {\r\n return buf;\r\n }", "public void testNIO_byte_array() throws Exception {\n byteBufferTest(ByteBuffer.allocate(12));\n }", "public interface ByteAdaptable {\n\n byte[] SetToByte();\n}", "@Override\r\n\tpublic byte[] getBytes() {\n\t\treturn buffer.array();\r\n\t}", "static native int jniToBuf(Buf out, long patch);", "ByteBuffer allocate() {\n\t\tvar b = ByteBuffer.allocate(size).order(LITTLE_ENDIAN);\n\t\tb.putInt(ordinal());\n\t\treturn b;\n\t}", "CharArrayBuffer getBuffer()\n ;", "ByteBuffer getApplicationData();", "public interface ByteVectorIO {\n public void send(byte[] b) throws IOException;\n\n public byte[] get() throws IOException;\n\n public void close();\n}", "public ByteBufferInputStream(java.nio.ByteBuffer r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.<init>(java.nio.ByteBuffer):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.<init>(java.nio.ByteBuffer):void\");\n }", "private int getBytes(int index, GatheringByteChannel out, int length, boolean internal)\r\n/* 197: */ throws IOException\r\n/* 198: */ {\r\n/* 199:222 */ ensureAccessible();\r\n/* 200: */ ByteBuffer tmpBuf;\r\n/* 201: */ ByteBuffer tmpBuf;\r\n/* 202:224 */ if (internal) {\r\n/* 203:225 */ tmpBuf = internalNioBuffer();\r\n/* 204: */ } else {\r\n/* 205:227 */ tmpBuf = ByteBuffer.wrap(this.array);\r\n/* 206: */ }\r\n/* 207:229 */ return out.write((ByteBuffer)tmpBuf.clear().position(index).limit(index + length));\r\n/* 208: */ }", "HRESULT SafeArrayAccessData(SAFEARRAY psa, PointerByReference ppvData);", "@Nullable\n @NativeType(\"bgfx_memory_t const *\")\n public static BGFXMemory bgfx_copy(@NativeType(\"void const *\") ByteBuffer _data) {\n long __result = nbgfx_copy(memAddress(_data), _data.remaining());\n return BGFXMemory.createSafe(__result);\n }", "HRESULT SafeArrayUnaccessData(SAFEARRAY psa);", "public void GetBytes(ByteBuffer bytes) {\n bytes.put(data);\n }", "public abstract void update(byte[] buf, int off, int len);", "void mo1751a(byte[] bArr);", "void freeArray(byte[] array) {}", "private native int cmdXfer0(byte[] request, byte[] response);", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default byte[] asByteArray() {\n //TODO this is actually sbyte[], but @Unsigned doesn't work on arrays right now\n return notSupportedCast(\"byte[]\");\n }", "public native int sendBuf(ByteBuffer buffer, int bufferSize, long nativeHandle);", "byte[] readBytes();", "static native void free(long buffer);", "public static Unsafe getUnsafe() {\n return THE_UNSAFE;\n }", "void mo4520a(byte[] bArr);", "void write(ByteBuffer b, int off, int len) throws IOException;", "private int writeBytes(ChannelOutboundBuffer in, ByteBuf buf) throws Exception {\n/* 267 */ int readableBytes = buf.readableBytes();\n/* 268 */ if (readableBytes == 0) {\n/* 269 */ in.remove();\n/* 270 */ return 0;\n/* */ } \n/* */ \n/* 273 */ if (buf.hasMemoryAddress() || buf.nioBufferCount() == 1) {\n/* 274 */ return doWriteBytes(in, buf);\n/* */ }\n/* 276 */ ByteBuffer[] nioBuffers = buf.nioBuffers();\n/* 277 */ return writeBytesMultiple(in, nioBuffers, nioBuffers.length, readableBytes, \n/* 278 */ config().getMaxBytesPerGatheringWrite());\n/* */ }", "public native static long getConvertBytes();", "public byte[] array()\r\n/* 127: */ {\r\n/* 128:156 */ ensureAccessible();\r\n/* 129:157 */ return this.array;\r\n/* 130: */ }", "private byte[] decode(ByteBuffer bytes) {\n \treturn bytes.array();\r\n }", "public abstract byte[] toBytes() throws Exception;", "byte[] getData();", "byte[] getData();", "byte[] getData();", "byte[] getData();", "static native ByteBuffer loadJni(long[] nativeData, byte[] buffer, int offset, int len);", "public ByteBuffer buffer() { return bb; }", "public static byte[] ByteCopy(ByteBuffer b) {\n \tbyte[] output = new byte[b.limit()];\n \tfor (int i = 0; i < b.limit(); i++) {\n \t\toutput[i] = b.get(i);\n \t}\n \treturn output;\n }", "public abstract void writeBytes(byte[] b, int offset, int length) throws IOException;", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {\n return ENCODER.encode(this);\n }", "private static Object getUnsafe() {\n\t\tObject unsafe;\n\t\ttry {\n\t\t\tunsafe = ReflectionUtils.get(Class.forName(\"sun.misc.Unsafe\"), \"theUnsafe\");\n\t\t} catch (ClassNotFoundException ex) {\n\t\t\tthrow new RuntimeException(ex);\n\t\t}\n\t\treturn unsafe;\n\t}", "public abstract void get(long position, ByteBuffer dst, int count);", "@Override\r\n\tpublic void write(IByteBuffer target, long offset) {\n\r\n\t}", "static void readBytes(ByteBufAllocator allocator, ByteBuffer buffer, int position, int length, OutputStream out) throws IOException {\n if (buffer.hasArray()) {\n out.write((byte[])buffer.array(), (int)(position + buffer.arrayOffset()), (int)length);\n return;\n }\n int chunkLen = Math.min((int)length, (int)8192);\n buffer.clear().position((int)position);\n if (length <= 1024 || !allocator.isDirectBufferPooled()) {\n ByteBufUtil.getBytes((ByteBuffer)buffer, (byte[])ByteBufUtil.threadLocalTempArray((int)chunkLen), (int)0, (int)chunkLen, (OutputStream)out, (int)length);\n return;\n }\n ByteBuf tmpBuf = allocator.heapBuffer((int)chunkLen);\n try {\n byte[] tmp = tmpBuf.array();\n int offset = tmpBuf.arrayOffset();\n ByteBufUtil.getBytes((ByteBuffer)buffer, (byte[])tmp, (int)offset, (int)chunkLen, (OutputStream)out, (int)length);\n return;\n }\n finally {\n tmpBuf.release();\n }\n }", "Buffer slice();", "protected abstract void writeToExternal(byte[] b, int off, int len) throws IOException;", "public byte[] getBytes()\n {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }", "public abstract void write(byte[] b);", "public ByteBuf setBytes(int index, ByteBuffer src)\r\n/* 349: */ {\r\n/* 350:364 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 351:365 */ return super.setBytes(index, src);\r\n/* 352: */ }", "public static int putByteBuffer(byte[] bytes, int offset, ByteBuffer buf) {\n int len = buf.remaining();\n buf.get(bytes, offset, len);\n return offset + len;\n }", "public ByteBuf getBytes(int index, ByteBuffer dst)\r\n/* 239: */ {\r\n/* 240:256 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 241:257 */ return super.getBytes(index, dst);\r\n/* 242: */ }", "byte[] byteValue() {\n\treturn data;\n }", "private ByteBuf getSendByteBuf(byte[] bytes){\n return Unpooled.unreleasableBuffer(Unpooled.copiedBuffer(\n bytes));\n }", "public byte[] GetBytes() {\n return data;\n }", "int readNonBlocking(byte[] buffer, int offset, int length);", "@Override\r\n\tpublic void read(IByteBuffer source, long offset) {\n\r\n\t}", "public byte [] getBuf() {\r\n return bop.getBuf();\r\n }", "public ByteBuf readBytes(ByteBuffer dst)\r\n/* 495: */ {\r\n/* 496:508 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 497:509 */ return super.readBytes(dst);\r\n/* 498: */ }", "@Nullable\n @NativeType(\"bgfx_memory_t const *\")\n public static BGFXMemory bgfx_copy(@NativeType(\"void const *\") IntBuffer _data) {\n long __result = nbgfx_copy(memAddress(_data), _data.remaining() << 2);\n return BGFXMemory.createSafe(__result);\n }", "public abstract void mo4380b(byte[] bArr, int i, int i2);", "public abstract byte[] toByteArray();", "public abstract byte[] toByteArray();", "public ByteBuf setBytes(int index, byte[] src)\r\n/* 337: */ {\r\n/* 338:352 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 339:353 */ return super.setBytes(index, src);\r\n/* 340: */ }" ]
[ "0.6613378", "0.6593957", "0.6422782", "0.6344241", "0.61963123", "0.6151552", "0.61502993", "0.61420155", "0.61347866", "0.603276", "0.6013491", "0.6004491", "0.5931675", "0.58251786", "0.58251786", "0.5797728", "0.5794749", "0.57813317", "0.5779569", "0.5773557", "0.5763607", "0.5760878", "0.5747695", "0.5737051", "0.57181096", "0.5702364", "0.56911355", "0.56806844", "0.5677294", "0.5676822", "0.5672282", "0.56677103", "0.5667581", "0.5634729", "0.5629487", "0.559837", "0.55866843", "0.5582369", "0.5578911", "0.55692846", "0.5569277", "0.5565884", "0.5554221", "0.5542245", "0.5537264", "0.552334", "0.5508708", "0.55075955", "0.55013496", "0.5491166", "0.547936", "0.5475004", "0.5475004", "0.5475004", "0.5475004", "0.5463587", "0.546341", "0.54561853", "0.5451448", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54367906", "0.54347074", "0.5432686", "0.54243684", "0.5421237", "0.5408773", "0.54000795", "0.5399149", "0.53973967", "0.53952646", "0.53856564", "0.5385202", "0.53831565", "0.5373034", "0.53700256", "0.536593", "0.5364799", "0.5350734", "0.53447366", "0.5334267", "0.53269184", "0.53240824", "0.53240824", "0.5323509" ]
0.55301327
45
the declaring class is the class this builder produces
private static Class<?> targetClassOf(SdkPojo builder) { return checkArgumentNotNull( builder.getClass().getDeclaringClass(), "Expected nested builder class, but got %s", builder.getClass()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected ClassBuilder getBuilder() {\n return m_classBuilder;\n }", "private Builder() {\n\t\t}", "Object getClass_();", "Object getClass_();", "private Builder() {}", "@Override\n public JDefinedClass apply(String nodeName, JsonNode node, JsonNode parent, JDefinedClass instanceClass, Schema currentSchema) {\n JDefinedClass builderClass;\n\n try {\n String builderName = ruleFactory.getNameHelper().getBuilderClassName(instanceClass);\n builderClass = instanceClass._class(JMod.PUBLIC + JMod.STATIC, builderName);\n } catch (JClassAlreadyExistsException e) {\n return e.getExistingClass();\n }\n\n // Determine which builder (if any) this builder should inherit from\n JClass parentBuilderClass = null;\n JClass parentClass = instanceClass._extends();\n if (!(parentClass.isPrimitive() || reflectionHelper.isFinal(parentClass) || Objects.equals(parentClass.fullName(), \"java.lang.Object\"))) {\n parentBuilderClass = reflectionHelper.getBuilderClass(parentClass);\n }\n\n // Determine the generic type 'T' that the builder will create instances of\n JTypeVar instanceType = builderClass.generify(\"T\", instanceClass);\n\n // For new builders we need to create an instance variable and 'build' method\n // for inheriting builders we'll receive these from the superType\n if (parentBuilderClass == null) {\n\n // Create the instance variable\n JFieldVar instanceField = builderClass.field(JMod.PROTECTED, instanceType, \"instance\");\n\n // Create the actual \"build\" method\n JMethod buildMethod = builderClass.method(JMod.PUBLIC, instanceType, \"build\");\n\n JBlock body = buildMethod.body();\n JVar result = body.decl(instanceType, \"result\");\n body.assign(result, JExpr._this().ref(instanceField));\n body.assign(JExpr._this().ref(instanceField), JExpr._null());\n body._return(result);\n\n // Create the noargs builder constructor\n generateNoArgsBuilderConstructor(instanceClass, builderClass);\n } else {\n // Declare the inheritance\n builderClass._extends(parentBuilderClass);\n \n JMethod buildMethod = builderClass.method(JMod.PUBLIC, instanceType, \"build\");\n buildMethod.annotate(Override.class);\n\n JBlock body = buildMethod.body();\n body._return(JExpr.cast(instanceType, JExpr._super().invoke(\"build\")));\n\n // Create the noargs builder constructor\n generateNoArgsBuilderConstructor(instanceClass, builderClass);\n }\n\n return builderClass;\n }", "IClassBuilder getParent();", "Object build();", "abstract Object build();", "public Builder() {\n\t\t}", "private Builder() {\n }", "private Builder() {\n }", "public abstract Object build();", "@Override\n\tpublic String typeKey() {\n\t return \"class\";\n\t}", "public Builder(){\n }", "public GantBuilder ( ) { }", "private Builder()\n {\n }", "public static Builder builder(){ return new Builder(); }", "ClassInstanceCreationExpression getClass_();", "public Object build();", "public AnnotatedTypeBuilder() {\n\t\ttypeAnnotations = new AnnotationBuilder();\n\t\tconstructors = new HashMap<Constructor<?>, AnnotationBuilder>();\n\t\tconstructorParameters = new HashMap<Constructor<?>, Map<Integer, AnnotationBuilder>>();\n\t\tconstructorParameterTypes = new HashMap<Constructor<?>, Map<Integer, Type>>();\n\t\tfields = new HashMap<Field, AnnotationBuilder>();\n\t\tfieldTypes = new HashMap<Field, Type>();\n\t\tmethods = new HashMap<Method, AnnotationBuilder>();\n\t\tmethodParameters = new HashMap<Method, Map<Integer, AnnotationBuilder>>();\n\t\tmethodParameterTypes = new HashMap<Method, Map<Integer, Type>>();\n\t}", "public static Object builder() {\n\t\treturn null;\r\n\t}", "public void buildClassTree() {\n\t\twriter.writeClassTree();\n\t}", "public void buildClassHeader() {\n\t\tString key;\n\t\tif (isInterface) {\n\t\t\tkey = \"doclet.Interface\";\n\t\t} else if (isEnum) {\n\t\t\tkey = \"doclet.Enum\";\n\t\t} else {\n\t\t\tkey = \"doclet.Class\";\n\t\t}\n\n\t\twriter.writeHeader(configuration.getText(key) + \" \" + classDoc.name());\n\t}", "SootClassBuilder(SootClass klass) {\n\t\tsuper(Opcodes.ASM4);\n\t\tthis.klass = klass;\n\t\tthis.deps = new HashSet();\n\t}", "public void consulterClassement() {\n\t\t\n\t}", "@Override\n\tpublic void buildAttributes(JDefinedClass cls) {\n\n\t}", "public static Object builder() {\n\t\treturn null;\n\t}", "@Override\n\tprotected Class<? extends DataContextSrcGener> thisClass() {\n\t\treturn this.getClass();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"class FatherClass\";\n\t}", "public TargetClass() {\n super();\n }", "DescribedClass createDescribedClass();", "public Builder() {}", "public Builder() {}", "public Builder() {}", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "public void build() {\r\n // TODO\r\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\r\n\tpublic void makerear() {\n\t\t\r\n\t}", "public Builder() {\n }", "static Builder builder() {\n return new Builder();\n }", "public Builder() {\n }", "public Builder() {\n }", "private Builder() {\n super(baconhep.TTau.SCHEMA$);\n }", "public ClassInfo declaringClass();", "abstract T build();", "private Builder() {\n super(com.autodesk.ws.avro.Call.SCHEMA$);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder toBuilder() {\n return new Builder(this);\n }", "public Builder getThis() { return this; }", "public Builder() { }", "public Class returnedClass();", "private Builder() {\n super(br.unb.cic.bionimbus.avro.gen.JobInfo.SCHEMA$);\n }", "private ReflectionResponse(Builder builder) {\n super(builder);\n }", "public static ProxyBuilder getBuilder() {\r\n\t\tClassProxyBuilder builder = new ClassProxyBuilder();\r\n\t\treturn builder;\r\n\t}", "public ObjectClassDefinitionImpl() {\n\t\t// empty\n\t}", "public void buildClassDescription() {\n\t\twriter.writeClassDescription();\n\t}", "public void buildClassSignature() {\n\t\tStringBuffer modifiers = new StringBuffer(classDoc.modifiers() + \" \");\n\t\tif (isEnum) {\n\t\t\tmodifiers.append(\"enum \");\n\t\t\tint index;\n\t\t\tif ((index = modifiers.indexOf(\"abstract\")) >= 0) {\n\t\t\t\tmodifiers.delete(index, index + (new String(\"abstract\")).length());\n\t\t\t\tmodifiers = new StringBuffer(Util.replaceText(modifiers.toString(), \" \", \" \"));\n\t\t\t}\n\t\t\tif ((index = modifiers.indexOf(\"final\")) >= 0) {\n\t\t\t\tmodifiers.delete(index, index + (new String(\"final\")).length());\n\t\t\t\tmodifiers = new StringBuffer(Util.replaceText(modifiers.toString(), \" \", \" \"));\n\t\t\t}\n\t\t} else if (!isInterface) {\n\t\t\tmodifiers.append(\"class \");\n\t\t}\n\t\twriter.writeClassSignature(modifiers.toString());\n\t}", "private Construct(Builder builder) {\n super(builder);\n }", "@Override\n public void visit(ClassDefinitionNode classDefinitionNode) {\n }", "public String getType() {\n\t\treturn \"class\";\n\t}", "public Builder mainFormatType(Class<?> mainFormatType) {\n this.mainFormatTypeClass = mainFormatType;\n return this;\n }", "private CustomClassBuilder(Configuration configuration) {\n\t\tsuper(configuration);\n\t}", "Class<?> getDeclaringClass();", "public Class getDefiningType() {\n return _class;\n }", "Object yangAugmentedInfo(Class classObject);", "Object yangAugmentedInfo(Class classObject);", "private ReflectionRequest(Builder builder) {\n super(builder);\n }", "Reproducible newInstance();", "ClassType outer();", "static Builder builder() {\n return new SourceContextImpl.Builder();\n }", "Class createClass();", "private Builder() {\n super(edu.pa.Rat.SCHEMA$);\n }", "public void buildClassTagInfo() {\n\t\twriter.writeClassTagInfo();\n\t}", "public interface Builder {\r\n public void buildBYD();\r\n public CarProduct getCar();\r\n}", "public interface Builder<T> {\n\n /**\n * The final function that creates the object built.\n * @return the built object\n */\n T build();\n}" ]
[ "0.6658516", "0.64294046", "0.6397967", "0.6397967", "0.6261471", "0.6120296", "0.61161005", "0.6097799", "0.60537505", "0.60513985", "0.60398114", "0.60398114", "0.60363007", "0.60359603", "0.59965384", "0.59950846", "0.5980074", "0.5952083", "0.5936875", "0.5928524", "0.59212035", "0.5920624", "0.5903468", "0.5903364", "0.5902713", "0.58957916", "0.5890274", "0.5881205", "0.5863719", "0.5859613", "0.58520913", "0.58365697", "0.58165514", "0.58165514", "0.58165514", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.58087474", "0.5806303", "0.5804637", "0.5801823", "0.5784133", "0.5783198", "0.57713574", "0.57713574", "0.5744586", "0.57442415", "0.5730737", "0.5711384", "0.57037586", "0.57037586", "0.57037586", "0.57037586", "0.57037586", "0.57037586", "0.57037586", "0.5693577", "0.56926453", "0.56868744", "0.5683817", "0.5683024", "0.56821144", "0.56820434", "0.5681684", "0.5676807", "0.5672692", "0.5671913", "0.5670058", "0.5660848", "0.5655828", "0.5630889", "0.56299794", "0.5624234", "0.5624234", "0.5623867", "0.56160945", "0.56069887", "0.56066096", "0.5597737", "0.5596604", "0.5594197", "0.5592905", "0.55910844" ]
0.65694135
1
TODO Autogenerated method stub
@Override public String toString() { return "Nombre: "+this.nombre+" Cantidad: "+this.cantidad+" "+this.unidadMedida; }
{ "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 compareTo(Object o) { MateriaPrima mp = (MateriaPrima)o; return this.id - mp.id; }
{ "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
Return the searching area from ChoiceBox
private String getChoice() { return searchChoiceBox.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSearchHint();", "void searchUI();", "public String getSearchArea() {\r\n return searchArea;\r\n }", "private void searchBoxUsed(String txt){\n\t\t\tJFrame frame = new JFrame();\n\t\t\tArrayList<location> simLoc = dataBase.search(txt);\n\t\t\tif (simLoc == null) JOptionPane.showMessageDialog(frame, \"'\" + txt + \"' not found.\");\n\t\t\telse if (simLoc.size() == 1){\n\t\t\t\tlocation searchedLoc = simLoc.get(0);\n\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\trefreshPanels();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString [] possibilities = new String[simLoc.size()];\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < simLoc.size(); i ++){\n\t\t\t\t\tpossibilities[i] = i + 1 + \". \" + simLoc.get(i).getName() + \", \" + simLoc.get(i).getCountryCode() + \" Lat: \" \n\t\t\t\t\t\t\t+ simLoc.get(i).getLatitude() + \" Long: \" + simLoc.get(i).getLongitude();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString response = (String) JOptionPane.showInputDialog(frame, \"Which '\" + txt + \"' did you mean?\", \"Search Location\", \n\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, null, possibilities, \"Titan\");\n\t\t\t\n\t\t\t\tif (response != null) {\n\t\t\t\t\t\tlocation searchedLoc = simLoc.get(Integer.parseInt(response.substring(0, response.indexOf('.'))) - 1);\n\t\t\t\t\t\tString[] temp = response.split(\" \");\n\t\t\t\t\t\tint length = app.getMyLocations().length;\n\t\t\t\t\t\tboolean add = true;\n\t\t\t\t\t\tfor (int i = 0; i < length; i ++){\n\t\t\t\t\t\t\tlocation checkLoc = app.getMyLocations()[i];\n\t\t\t\t\t\t\tif (checkLoc.getCityID() == searchedLoc.getCityID())\n\t\t\t\t\t\t\t\tadd = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (add) {\n\t\t\t\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\t\t\trefreshPanels();\n\t\t\t\t }\n\t\t\t}\n\t\t}", "public static int choicedialog() {\r\n List<String> choices = new ArrayList<>();\r\n choices.add(\"1a\");\r\n choices.add(\"1b\");\r\n choices.add(\"2\");\r\n choices.add(\"2u\");\r\n choices.add(\"3\");\r\n choices.add(\"3u\");\r\n choices.add(\"4\");\r\n choices.add(\"5\");\r\n\r\n ChoiceDialog<String> dialog = new ChoiceDialog<>(\"SET ZONE HERE\", choices);\r\n dialog.setTitle(\"Zone Selector\");\r\n dialog.setHeaderText(null);\r\n dialog.setContentText(\"Select Zone:\");\r\n \r\n Optional<String> result = dialog.showAndWait();\r\n if (result.isPresent()){\r\n if(result.get() == \"1a\") return 1;\r\n else if (result.get() == \"1b\") return 2;\r\n else if (result.get() == \"2\") return 3;\r\n else if (result.get() == \"2u\") return 4;\r\n else if (result.get() == \"3\") return 5;\r\n else if (result.get() == \"3u\") return 6;\r\n else if (result.get() == \"4\") return 7;\r\n else if (result.get() == \"5\") return 8;\r\n else return 0;\r\n } else return 0;\r\n }", "@Override\r\n\tpublic String popupSearch(String criteria) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String popupSearch(String criteria) {\n\t\treturn null;\r\n\t}", "TextBox getSearchContent();", "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }", "private boolean searchBoxUsedTwo(String txt){\n\t\t\tJFrame frame = new JFrame();\n\t\t\tboolean boolTemp;\n\t\t\tArrayList<location> simLoc = dataBase.search(txt);\n\t\t\tif (simLoc == null){ \n\t\t\t\tJOptionPane.showMessageDialog(frame, \"'\" + txt + \"' not found.\");\n\t\t\t\tboolTemp = false;\n\t\t\t}\n\t\t\telse if (simLoc.size() == 1){\n\t\t\t\tlocation searchedLoc = simLoc.get(0);\n\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\tboolTemp = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString [] possibilities = new String[simLoc.size()];\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < simLoc.size(); i ++){\n\t\t\t\t\tpossibilities[i] = i + 1 + \". \" + simLoc.get(i).getName() + \", \" + simLoc.get(i).getCountryCode() + \" Lat: \" \n\t\t\t\t\t\t\t+ simLoc.get(i).getLatitude() + \" Long: \" + simLoc.get(i).getLongitude();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString response = (String) JOptionPane.showInputDialog(frame, \"Which '\" + txt + \"' did you mean?\", \"Search Location\", \n\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, null, possibilities, \"Titan\");\n\t\t\t\n\t\t\t\tif (response != null) {\n\t\t\t\t\t\tlocation searchedLoc = simLoc.get(Integer.parseInt(response.substring(0, response.indexOf('.'))) - 1);\n\t\t\t\t\t\tString[] temp = response.split(\" \");\n\t\t\t\t\t\tint length = app.getMyLocations().length;\n\t\t\t\t\t\tboolean add = true;\n\t\t\t\t\t\tfor (int i = 0; i < length; i ++){\n\t\t\t\t\t\t\tlocation checkLoc = app.getMyLocations()[i];\n\t\t\t\t\t\t\tif (checkLoc.getCityID() == searchedLoc.getCityID())\n\t\t\t\t\t\t\t\tadd = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (add) {\n\t\t\t\t\t\t\tapp.addLocation(searchedLoc);\n\t\t\t\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\tboolTemp = true;\n\t\t\t}\n\t\t\treturn boolTemp;\n\t\t}", "String getSelectedAutoCompleteString();", "private void searchMenu(){\n\t\t\n\t}", "public void actionPerformed(ActionEvent event) {\n\t\tString menuName = event.getActionCommand();\n\t\t//If the Menu option = search then search for the specific box object\n\t\tif (menuName.equals(\"Search\")) {\n\t\t\tif(Project3.sorted_boxes == null) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please choose a file first\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tString input = JOptionPane.showInputDialog(null, \"Please input the dimensions of the box with the following format: x,y,z\");\n\t\t\t//StringTokenizer to break up the input string to get each individual parameter for the Box object.\n\t\t\tStringTokenizer tokens = new StringTokenizer(input, \",\");\n\t\t\tif (tokens.countTokens() != 3) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter 3 dimensions of the box in order to search.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tint length, width, height;\n\t\t\ttry {\n\t\t\t\t//change the numbers in the string into integers to be used.\n\t\t\t\tlength = Integer.parseInt(tokens.nextToken());\n\t\t\t\twidth = Integer.parseInt(tokens.nextToken());\n\t\t\t\theight = Integer.parseInt(tokens.nextToken());\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter 3 valid dimensions of the box.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif (length < 1 || width < 1 || height < 1) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The dimensions of the box cannot be less than 1.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//Find the volume of the searched box\n\t\t\tint volume = length * width * height;\n\t\t\t//Create a new JFrame in order to display the result.\n\t\t\tJFrame result = new JFrame();\n\t\t\tresult.setTitle(\"Boxes that are able to fit with the common volume of: \" + volume);\n\t\t\tresult.setSize(400, 400);\n\t\t\tresult.setLocation(800, 200);\n\t\t\tTextArea resultArea = new TextArea();\n\t\t\tresult.getContentPane().add(resultArea);\n\t\t\t\n\t\t\t//Show to results found that are greater than the box searched.\n\t\t\tBoxNode rNode = Project3.sorted_boxes.first.next;\n\t\t\twhile (rNode != null) {\n\t\t\t\tif (rNode.data.volume() >= volume) {\n\t\t\t\t\tresultArea.append(rNode.data.toString() + \"\\n\");\n\t\t\t\t}\n\t\t\t\trNode = rNode.next;\n\t\t\t}\n\t\t\tresult.setVisible(true);\n\t\t}\n\t}", "@Override\r\npublic String popupSearch(String criteria) {\n\treturn null;\r\n}", "private void processSearchButton() {\n try {\n //Stop a user from searching before a World exists to search\n if(this.world == null) {\n JOptionPane.showMessageDialog(null, \"You must read a data file first!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n //Declarations\n StringBuilder searchResults;\n String searchCriteria;\n String unfoundItem;\n int dropDownSelection;\n\n //initialize\n searchResults = new StringBuilder();\n searchCriteria = this.searchCriteriaField.getText().trim().toLowerCase();\n unfoundItem = this.searchCriteriaField.getText().trim().toLowerCase();\n dropDownSelection = this.searchCriteriaBox.getSelectedIndex();\n\n //Stop users from searching before selecting and entering any search criteria\n if(searchCriteria.equals(\"\") || searchCriteriaBox.equals(0)) {\n JOptionPane.showMessageDialog(null, \"You must SELECT and ENTER the search criteria before searching!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n //handle each dropdown selection\n switch(dropDownSelection) {\n case 0: //empty string to allow a blank default\n break;\n case 1: //by name\n for(Thing myThing : this.world.getAllThings()) {\n if (myThing.getName().toLowerCase().equals(searchCriteria)) {\n searchResults = new StringBuilder(myThing.getName() + \" \" + myThing.getIndex() + \" (\" + myThing.getClass().getSimpleName() + \")\");\n }\n } //end of forLoop for case 1\n if(searchResults.toString().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Search criteria '\" + unfoundItem + \"' does not exist in this World.\", \"Unknown Item\", JOptionPane.WARNING_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, searchResults.toString());\n }\n break;\n case 2: //by index\n for(Thing myThing : this.world.getAllThings()) {\n if (myThing.getIndex() == Integer.parseInt(searchCriteria)) {\n searchResults = new StringBuilder(myThing.getName() + \" \" + myThing.getIndex() + \" (\" + myThing.getClass().getSimpleName() + \")\");\n }\n } //end of forLoop for case 2\n if(searchResults.toString().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Search criteria '\" + unfoundItem + \"' does not exist in this World.\", \"Unknown Item\", JOptionPane.WARNING_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, searchResults.toString());\n }\n break;\n case 3: //by skill\n for(SeaPort mySeaPort : this.world.getPorts()) {\n for(Person myPerson : mySeaPort.getPersons()) {\n if(myPerson.getSkill().toLowerCase().equals(searchCriteria)) {\n searchResults.append(myPerson.getName()).append(\" \").append(myPerson.getIndex()).append(\" (\").append(myPerson.getClass().getSimpleName()).append(\")\\n Skill: \").append(myPerson.getSkill()).append(\"\\n\\n\");\n }\n }\n } //end of forLoop for case 3\n if(searchResults.toString().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Search criteria '\" + unfoundItem + \"' does not exist in this World.\", \"Unknown Item\", JOptionPane.WARNING_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, searchResults.toString());\n }\n break;\n default: break;\n } //end of switch()\n } catch(Exception e5) {\n JOptionPane.showMessageDialog(null, \"Something went wrong in the search!\\n\\n\" + e5.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n } //end of catch()\n }", "public FindWindow(JTextArea field) {\n initComponents();\n \n this.found = new ArrayList();\n this.needle = \"\";\n this.curr_index = 0;\n this.field = field;\n }", "public SearchPanel() {\n\t\t\t fs = new Font [3];\n\t\t\t fs[0] = new Font(\"Lato\", Font.BOLD, 36);\n\t\t\t fs[1] = new Font(\"Open Sans\", 0 , 20);\n\t\t\t fs[2] = new Font(\"Open Sans\", 0 , 12);\n\t\t\t enterSB = new JButton(\"Search\");\n\t\t\t backB = new JButton(\"Return\");\n\t\t\t menuL = new JLabel (\"Search Feature\");\n\t\t\t tF = new JTextField ();\n\t\t\t tA = new JTextArea ();\n\t\t\t enterSB.setFont(fs[1]);\n\t\t\t backB.setFont(fs[2]);\n\t\t\t menuL.setFont(fs[0]);\n\t\t\t tF.setPreferredSize(new Dimension( 200, 24 ));\n\t\t\t //tA.setPreferredSize(new Dimension( 200, 24 ));\n\t\t\t tA.setEditable(false);\n\t\t\t tA.setLineWrap(true);\n\t\t\t \n\t\t\t // loads UI elements in view\n\t\t\t add(menuL, BorderLayout.PAGE_START);\n\t\t\t add(tF, BorderLayout.LINE_START);\n\t\t\t add(enterSB, BorderLayout.CENTER);\t \n\t\t\t add(tA, BorderLayout.LINE_END);\n\t\t\t add(backB, BorderLayout.PAGE_END);\n\t\t\t enterSB.addActionListener( new ActionListener()\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e) // if search is clicked\n\t\t\t {\n\t\t\t \t tA.setText(\"Loading...\");\n\t\t\t \t City city = Search.search(Main.cities, tF.getText()); // search the city by name\n\t\t\t \t \n\t\t\t \t if (city == null){\n\t\t\t \t\t tA.setText(\"Couldn't find city!\");\n\t\t\t \t }\n\t\t\t \t else{\n\t\t\t \t\t tA.setText(mainGui.toString(city.getCond()));\n\t\t\t \t }\n\t\t\t }\n\t\t\t });\n\t\t\t backB.addActionListener( new ActionListener() // if back is clicked\n\t\t\t {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent e)\n\t\t\t {\n\t\t\t mainGui.paneSwitch(0); // go back to main menu\n\t\t\t }\n\t\t\t });\n\t\t }", "public SearchWindow()\n {\n // call parent and set layout\n super();\n this.setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));\n TextFieldListener tfl = new TextFieldListener();\n model = new DefaultListModel<String>();\n lsl = new SelectionListener();\n\n radioText = new JLabel(\"Combine Terms Using:\");\n\n // create and add the radio buttons and the clear button\n topButtons = new JPanel();\n topButtons.setLayout(new BoxLayout(topButtons, BoxLayout.LINE_AXIS));\n topButtons.add(Box.createRigidArea(new Dimension(20, 0)));\n\n // can be accessed by pressing A plus Alt (or whatever the users look-and-feel is)\n andRadio = new JRadioButton(\"And\");\n andRadio.setMnemonic(KeyEvent.VK_A);\n\n // can be accessed by pressing O plus Alt\n orRadio = new JRadioButton(\"Or\");\n orRadio.setMnemonic(KeyEvent.VK_O);\n\n // associate the buttons\n radioButtons = new ButtonGroup();\n radioButtons.add(andRadio);\n radioButtons.add(orRadio);\n orRadio.setSelected(true); // default setting\n\n // Listener to perform search if radio buttons are changed (UID req. 2.1)\n ChangeRadioListener crl = new ChangeRadioListener();\n orRadio.addActionListener(crl);\n andRadio.addActionListener(crl);\n\n // create Clear All Terms button with action listener\n clear = new JButton(\"Clear All Terms\");\n clear.setEnabled(false);\n ClearButtonListener cbl = new ClearButtonListener();\n clear.addActionListener(cbl);\n\n // add everything to our top panel\n topButtons.add(radioText);\n topButtons.add(Box.createRigidArea(new Dimension(20, 0)));\n topButtons.add(orRadio);\n topButtons.add(andRadio);\n topButtons.add(Box.createHorizontalGlue());\n topButtons.add(clear);\n topButtons.add(Box.createRigidArea(new Dimension(20, 0)));\n topButtons\n .setMaximumSize(new Dimension(Integer.MAX_VALUE, topButtons.getPreferredSize().height));\n topButtons\n .setMaximumSize(new Dimension(Integer.MAX_VALUE, topButtons.getPreferredSize().height));\n\n // add text fields for search terms\n highSearchPane = new JPanel();\n highSearchPane.setLayout(new BoxLayout(highSearchPane, BoxLayout.LINE_AXIS));\n highWeight = new JLabel(\"High Weight Search Terms:\");\n highTerms = new JTextField();\n highTerms.addKeyListener(tfl);\n highSearchPane.add(Box.createRigidArea(new Dimension(20, 0)));\n highSearchPane.add(highWeight);\n highSearchPane.add(Box.createRigidArea(new Dimension(20, 0)));\n highSearchPane.add(highTerms);\n highSearchPane.add(Box.createRigidArea(new Dimension(20, 0)));\n highSearchPane\n .setMaximumSize(new Dimension(Integer.MAX_VALUE, highSearchPane.getPreferredSize().height));\n lowSearchPan = new JPanel();\n lowSearchPan.setLayout(new BoxLayout(lowSearchPan, BoxLayout.LINE_AXIS));\n lowWeight = new JLabel(\"Low Weight Search Terms:\");\n lowTerms = new JTextField();\n lowTerms.addKeyListener(tfl);\n lowTerms.setMaximumSize(new Dimension(Integer.MAX_VALUE, lowTerms.getPreferredSize().height));\n lowSearchPan.add(Box.createRigidArea(new Dimension(20, 0)));\n lowSearchPan.add(lowWeight);\n lowSearchPan.add(Box.createRigidArea(new Dimension(20, 0)));\n lowSearchPan.add(lowTerms);\n lowSearchPan.add(Box.createRigidArea(new Dimension(20, 0)));\n\n // Create short form panel\n\n shortFormList = new JList<String>(model);\n shortFormList.addListSelectionListener(lsl);\n shortFormList.setFont(new Font(\"LabelStyle\", Font.BOLD, 15));\n shortFormList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n shortFormList.setModel(model);\n shortFormList.setLayoutOrientation(JList.VERTICAL);\n\n shortPane = new JPanel();\n shortPane.setLayout(new BoxLayout(shortPane, BoxLayout.LINE_AXIS));\n shortScroll = new JScrollPane(shortFormList);\n shortPane.add(Box.createRigidArea(new Dimension(20, 0)));\n shortPane.add(shortScroll);\n shortPane.setPreferredSize(new Dimension(Integer.MAX_VALUE, 3000));\n shortPane.add(Box.createRigidArea(new Dimension(20, 0)));\n\n // create books retrieved JTextField\n reviewedField = new JTextField();\n reviewedField.setOpaque(false);\n reviewedField\n .setMaximumSize(new Dimension(Integer.MAX_VALUE, reviewedField.getPreferredSize().height));\n reviewedField.setBorder(BorderFactory.createEmptyBorder());\n reviewedField.setFont(new Font(\"LabelStyle\", Font.BOLD, 12));\n\n // create long form panel\n\n longPane = new JPanel();\n longPane.setLayout(new BoxLayout(longPane, BoxLayout.LINE_AXIS));\n longForm = new JTextPane();\n longScroll = new JScrollPane(longForm);\n longForm.setEditable(false);\n longForm.setFont(new Font(\"LabelStyle\", Font.BOLD, 15));\n longPane.add(Box.createRigidArea(new Dimension(20, 0)));\n longPane.add(longScroll);\n longPane.setPreferredSize(new Dimension(Integer.MAX_VALUE, 3000));\n longPane.add(Box.createRigidArea(new Dimension(20, 0)));\n\n this.add(Box.createRigidArea(new Dimension(0, 10)));\n this.add(topButtons);\n this.add(Box.createRigidArea(new Dimension(0, 10)));\n this.add(highSearchPane);\n this.add(Box.createRigidArea(new Dimension(0, 10)));\n this.add(lowSearchPan);\n this.add(Box.createRigidArea(new Dimension(0, 20)));\n this.add(shortPane);\n this.add(Box.createRigidArea(new Dimension(0, 5)));\n this.add(reviewedField);\n this.add(Box.createRigidArea(new Dimension(0, 5)));\n this.add(longPane);\n this.add(Box.createRigidArea(new Dimension(0, 10)));\n }", "private void choiceBoxInitializer() {\n searchChoiceBox.getItems().addAll(\"Learning Applications\", \"Learning Categories\",\n \"Learning Units\");\n searchChoiceBox.setValue(\"Learning Applications\");\n }", "private void showFilterDialog(){\n final Dialog dialog = new Dialog(this);\n\n dialog.setContentView(R.layout.filter_search);\n dialog.setTitle(\"Search Filter\");\n\n Button okBtn = (Button) dialog.findViewById(R.id.okBtn);\n Button cancelBtn = (Button) dialog.findViewById(R.id.cancelBtn);\n final Spinner categorySpn = (Spinner) dialog.findViewById(R.id.categorySpn);\n final TextView rangeTw = (TextView) dialog.findViewById(R.id.rangeTw);\n String[] categories = getResources().getStringArray(R.array.question_category_array);\n\n ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(MainActivity.this, R.layout.support_simple_spinner_dropdown_item, categories);\n categorySpn.setAdapter(spinnerAdapter);\n\n cancelBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n okBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String category = categorySpn.getSelectedItem().toString();\n String range = rangeTw.getText().toString();\n range = range.equals(\"\")?\"NOT_SET\":range;\n\n if(currentLocation==null) {\n Snackbar.make(MainActivity.this.drawer,\n \"Wait until GPS find your location.\"\n ,Snackbar.LENGTH_LONG).show();\n return;\n }\n if(mSearchView.getQuery().trim().equals(\"\")){\n Snackbar.make(MainActivity.this.drawer,\n \"You need to enter some query first\"\n ,Snackbar.LENGTH_LONG).show();\n return;\n }\n mSearchView.showProgress();\n mSearchView.clearSuggestions();\n questionHandler.searchQuestions(MainActivity.this.mSearchView.getQuery(),\n category,range,\n currentLocation.getPosition().latitude,\n currentLocation.getPosition().longitude,\n REQUEST_TAG,\n new SearchQuestionListener(MainActivity.this));\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout((6*getResources().getDisplayMetrics().widthPixels)/7, DrawerLayout.LayoutParams.WRAP_CONTENT);\n\n }", "public String searchCityUI() {\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER CITY TO SEARCH BY +\");\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String city = console.promptForString(\" CITY NAME: \");\n return city;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTextFieldSearchWord = new javax.swing.JTextField();\n TextPrompt tsearch7 = new TextPrompt(\"Word tor search for\", this.jTextFieldSearchWord);\n jButtonSearch = new javax.swing.JButton();\n jLayeredPaneResultsChooser = new javax.swing.JLayeredPane();\n jCheckBoxLastIndex = new javax.swing.JCheckBox();\n jCheckBoxContains = new javax.swing.JCheckBox();\n jCheckBoxAllIndeces = new javax.swing.JCheckBox();\n jCheckBoxFirstIndex = new javax.swing.JCheckBox();\n jCheckBoxOccurrences = new javax.swing.JCheckBox();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextAreaResult = new javax.swing.JTextArea();\n\n setMaximumSize(new java.awt.Dimension(491, 267));\n setMinimumSize(new java.awt.Dimension(491, 267));\n setPreferredSize(new java.awt.Dimension(491, 267));\n\n jTextFieldSearchWord.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n jTextFieldSearchWordMouseReleased(evt);\n }\n });\n jTextFieldSearchWord.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n jTextFieldSearchWordKeyReleased(evt);\n }\n });\n\n jButtonSearch.setMnemonic('r');\n jButtonSearch.setText(\"Search\");\n jButtonSearch.setToolTipText(\"\");\n jButtonSearch.setEnabled(false);\n jButtonSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSearchActionPerformed(evt);\n }\n });\n\n jLayeredPaneResultsChooser.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Results to show\"));\n\n jCheckBoxLastIndex.setMnemonic('L');\n jCheckBoxLastIndex.setText(\"Last Index\");\n jCheckBoxLastIndex.setName(\"getLastIndex\"); // NOI18N\n\n jCheckBoxContains.setMnemonic('C');\n jCheckBoxContains.setSelected(true);\n jCheckBoxContains.setText(\"Contains\");\n jCheckBoxContains.setName(\"contains\"); // NOI18N\n\n jCheckBoxAllIndeces.setMnemonic('A');\n jCheckBoxAllIndeces.setText(\"All Indeces\");\n jCheckBoxAllIndeces.setName(\"getAllIndices\"); // NOI18N\n\n jCheckBoxFirstIndex.setMnemonic('F');\n jCheckBoxFirstIndex.setText(\"First Index\");\n jCheckBoxFirstIndex.setName(\"getFirstIndex\"); // NOI18N\n\n jCheckBoxOccurrences.setMnemonic('O');\n jCheckBoxOccurrences.setText(\"Occurrences\");\n jCheckBoxOccurrences.setName(\"countOccurrences\"); // NOI18N\n\n jLayeredPaneResultsChooser.setLayer(jCheckBoxLastIndex, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPaneResultsChooser.setLayer(jCheckBoxContains, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPaneResultsChooser.setLayer(jCheckBoxAllIndeces, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPaneResultsChooser.setLayer(jCheckBoxFirstIndex, javax.swing.JLayeredPane.DEFAULT_LAYER);\n jLayeredPaneResultsChooser.setLayer(jCheckBoxOccurrences, javax.swing.JLayeredPane.DEFAULT_LAYER);\n\n javax.swing.GroupLayout jLayeredPaneResultsChooserLayout = new javax.swing.GroupLayout(jLayeredPaneResultsChooser);\n jLayeredPaneResultsChooser.setLayout(jLayeredPaneResultsChooserLayout);\n jLayeredPaneResultsChooserLayout.setHorizontalGroup(\n jLayeredPaneResultsChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jLayeredPaneResultsChooserLayout.createSequentialGroup()\n .addComponent(jCheckBoxContains)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBoxOccurrences)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jCheckBoxFirstIndex)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jCheckBoxLastIndex)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jCheckBoxAllIndeces)\n .addContainerGap(72, Short.MAX_VALUE))\n );\n jLayeredPaneResultsChooserLayout.setVerticalGroup(\n jLayeredPaneResultsChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jLayeredPaneResultsChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBoxOccurrences)\n .addComponent(jCheckBoxFirstIndex)\n .addComponent(jCheckBoxContains))\n .addGroup(jLayeredPaneResultsChooserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jCheckBoxLastIndex)\n .addComponent(jCheckBoxAllIndeces))\n );\n\n jTextAreaResult.setColumns(20);\n jTextAreaResult.setRows(5);\n jTextAreaResult.setDisabledTextColor(new java.awt.Color(0, 0, 0));\n jTextAreaResult.setEnabled(false);\n jScrollPane1.setViewportView(jTextAreaResult);\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 .addComponent(jLayeredPaneResultsChooser)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jTextFieldSearchWord)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButtonSearch))\n .addComponent(jScrollPane1))\n .addContainerGap())\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.LEADING)\n .addComponent(jButtonSearch, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTextFieldSearchWord, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLayeredPaneResultsChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)\n .addContainerGap())\n );\n }", "private void getSearchButtonSemantics() {\n //TODO implement method\n searchView.getResultsTextArea().setText(\"\");\n if (searchView.getFieldComboBox().getSelectedItem() == null) {\n JOptionPane.showMessageDialog(new JFrame(), \"Please select a field!\",\n \"Product Inventory\", JOptionPane.ERROR_MESSAGE);\n searchView.getFieldComboBox().requestFocus();\n } else if (searchView.getFieldComboBox().getSelectedItem().equals(\"SKU\")) {\n Optional<Product> skuoptional = inventoryModel.searchBySku(searchView.getSearchValueTextField().getText());\n if (skuoptional.isPresent()) {//check if there is an inventory with that SKU\n searchView.getResultsTextArea().append(skuoptional.get().toString());\n searchView.getSearchValueTextField().setText(\"\");\n searchView.getFieldComboBox().setSelectedIndex(-1);\n searchView.getFieldComboBox().requestFocus();\n } else {\n JOptionPane.showMessageDialog(new JFrame(),\n \"The specified SKU was not found!\",\n \"Product Inventory\", JOptionPane.ERROR_MESSAGE);\n searchView.getSearchValueTextField().requestFocus();\n }\n } else if (searchView.getFieldComboBox().getSelectedItem().equals(\"Name\")) {\n List<Product> name = inventoryModel.searchByName(searchView.getSearchValueTextField().getText());\n if (!name.isEmpty()) {\n for (Product nameproduct : name) {\n searchView.getResultsTextArea().append(nameproduct.toString() + \"\\n\\n\");\n }\n searchView.getSearchValueTextField().setText(\"\");\n searchView.getFieldComboBox().setSelectedIndex(-1);\n searchView.getFieldComboBox().requestFocus();\n } else {\n JOptionPane.showMessageDialog(new JFrame(),\n \"The specified name was not found!\",\n \"Product Inventory\", JOptionPane.ERROR_MESSAGE);\n searchView.getSearchValueTextField().requestFocus();\n }\n\n } else if (searchView.getFieldComboBox().getSelectedItem().equals(\"Wholesale price\")) {\n try {\n List<Product> wholesaleprice = inventoryModel.searchByWholesalePrice(Double.parseDouble(searchView.getSearchValueTextField().getText()));\n if (!wholesaleprice.isEmpty()) {//check if there is an inventory by that wholesale price\n for (Product wholesalepriceproduct : wholesaleprice) {\n searchView.getResultsTextArea().append(wholesalepriceproduct.toString() + \"\\n\\n\");\n }\n searchView.getSearchValueTextField().setText(\"\");\n searchView.getFieldComboBox().setSelectedIndex(-1);\n searchView.getFieldComboBox().requestFocus();\n } else {\n JOptionPane.showMessageDialog(new JFrame(),\n \"The specified wholesale price was not found!\",\n \"Product Inventory\", JOptionPane.ERROR_MESSAGE);\n searchView.getSearchValueTextField().requestFocus();\n }\n } catch (NumberFormatException nfe) {\n JOptionPane.showMessageDialog(new JFrame(),\n \"The specified wholesale price is not a vaild number!\",\n \"Product Inventory\", JOptionPane.ERROR_MESSAGE);\n searchView.getSearchValueTextField().requestFocus();\n }\n } else if (searchView.getFieldComboBox().getSelectedItem().equals(\"Retail price\")) {\n try {\n List<Product> retailprice = inventoryModel.searchByRetailPrice(Double.parseDouble(searchView.getSearchValueTextField().getText()));\n if (!retailprice.isEmpty()) {\n for (Product retailpriceproduct : retailprice) {\n searchView.getResultsTextArea().append(retailpriceproduct.toString() + \"\\n\\n\");\n }\n searchView.getSearchValueTextField().setText(\"\");\n searchView.getFieldComboBox().setSelectedIndex(-1);\n searchView.getFieldComboBox().requestFocus();\n } else {\n JOptionPane.showMessageDialog(new JFrame(),\n \"The specified retail price was not found!\",\n \"Product Inventory\", JOptionPane.ERROR_MESSAGE);\n searchView.getSearchValueTextField().requestFocus();\n }\n } catch (NumberFormatException nfe) {\n JOptionPane.showMessageDialog(new JFrame(),\n \"The specified retail price is not a vaild number!\",\n \"Product Inventory\", JOptionPane.ERROR_MESSAGE);\n searchView.getSearchValueTextField().requestFocus();\n }\n } else if (searchView.getFieldComboBox().getSelectedItem().equals(\"Quantity\")) {\n try {\n List<Product> quantity = inventoryModel.searchByQuantity(Integer.parseInt(searchView.getSearchValueTextField().getText()));\n if (!quantity.isEmpty()) {\n for (Product quantityproduct : quantity) {\n searchView.getResultsTextArea().append(quantityproduct.toString() + \"\\n\\n\");\n }\n searchView.getSearchValueTextField().setText(\"\");\n searchView.getFieldComboBox().setSelectedIndex(-1);\n searchView.getFieldComboBox().requestFocus();\n } else {\n JOptionPane.showMessageDialog(new JFrame(),\n \"The specified quantity was not found!\",\n \"Product Inventory\", JOptionPane.ERROR_MESSAGE);\n searchView.getSearchValueTextField().requestFocus();\n }\n } catch (NumberFormatException nfe) {\n JOptionPane.showMessageDialog(new JFrame(),\n \"The specified quantity is not a vaild number!\",\n \"Product Inventory\", JOptionPane.ERROR_MESSAGE);\n searchView.getSearchValueTextField().requestFocus();\n }\n }\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\n String turnToString2 = txt_search.getText();\n\n try {\n\n if(begSearch != -1){\n txt_area.setCaretPosition(begSearch);\n begSearch = txt_area.getText().indexOf(turnToString2,begSearch);\n lbl_search_res.setText(\"\");\n }\n if(begSearch != -1){\n txt_area.getHighlighter().addHighlight(begSearch,begSearch + turnToString2.length(),new DefaultHighlighter.DefaultHighlightPainter(Color.yellow));\n }\n else if (begSearch <= txt_area.getText().length() && begSearch >= 0){\n txt_area.getHighlighter().addHighlight(begSearch,begSearch + turnToString2.length(),new DefaultHighlighter.DefaultHighlightPainter(Color.yellow));\n }\n if(begSearch == -1){\n lbl_search_res.setText(\"Can not found.\");\n }\n begSearch = begSearch + 1;\n\n //System.out.print(\" \"+begSearch);\n\n }\n catch (BadLocationException ex) {\n begSearch = -1;\n }\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 jButton1 = new javax.swing.JButton();\n jComboBox1 = new javax.swing.JComboBox<>();\n LPanal = new javax.swing.JPanel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(0, 204, 255));\n jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.LINE_AXIS));\n\n jButton1.setText(\"Search\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Select Lecturers\", \"Ms.Kushnara Siriwardana \", \"Mr.Jagath Mendis\", \"Ms.Disna Damayanthi\" }));\n\n LPanal.setBackground(new java.awt.Color(153, 153, 255));\n LPanal.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Lecturer Statics\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Cambria\", 0, 18))); // NOI18N\n LPanal.setLayout(new javax.swing.BoxLayout(LPanal, javax.swing.BoxLayout.LINE_AXIS));\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(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 311, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(33, 33, 33)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(212, 212, 212))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(281, 281, 281)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(LPanal, javax.swing.GroupLayout.PREFERRED_SIZE, 862, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(30, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(36, 36, 36)\n .addComponent(LPanal, javax.swing.GroupLayout.DEFAULT_SIZE, 477, Short.MAX_VALUE))\n );\n\n pack();\n }", "private String showCharacterSuggestions(String room) {\n\t\tButtonGroup characterButtons = new ButtonGroup();\n\t\tList<JRadioButton> btns = setupCharacterButtons();\n\t\t\n\t // set up dialog box\n\t\tJPanel characterPanel = new JPanel(new GridLayout(0, 1));\n\t\tJLabel lbl = new JLabel(\"You are in the \"+room+\".\"\n\t\t\t\t+ \"\\n Select the character that you suspect.\");\n\t\tcharacterPanel.add(lbl);\n\t\t\n\t // add the buttons to the panel\n\t for(JRadioButton b : btns){\n\t \tcharacterButtons.add(b);\n\t \tcharacterPanel.add(b);\n\t }\n\t \n\t\t// show dialog\n\t JOptionPane.showMessageDialog(frame, characterPanel);\n\t // decide which button has been selected\n\t for(JRadioButton b : btns){\n\t \tif(b.isSelected()){\n\t \t\treturn b.getText();\n\t \t}\n\t }\n\t return null;\n\t}", "@Override\n protected Rectangle getSelectedRegion()\n {\n // Go through all widgets and union their bounds.\n Iterator<FrameEltSelnFig<?>> selectedFigs =\n selection.getSelectedFigures();\n\n return computeUnion(selectedFigs);\n }", "public JPanel getSearchJPanel(){\n\t\treturn searchResults;//Return the search results\n\t}", "@Override\n\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\tlong arg3) {\n\t\tsearchText = spinner1.getSelectedItem().toString();\n\t\tSystem.out.println(\"Selected option = \"+searchText);\n\t\t\n\t}", "@FXML\r\n void search(ActionEvent event) {\r\n \tPlacement p1 = new Placement();\r\n \tif(startDate.getValue()!=null){p1.setStartDate(startDate.getValue().toString());}\r\n \tp1.setCohort(Cohort.getText());\r\n \tif(year.getValue()!=null){p1.setYear(year.getValue());}\r\n \tp1.setLocation(Location.getText());\r\n \tp1.setModule(Subject.getText());\r\n \tif(endDate.getValue()!=null){p1.setEndDate(endDate.getValue().toString());}\r\n \tList<Placement> searched = new ArrayList<Placement>();\r\n \ttry {\r\n \t\tsearched.addAll(SearchQueries.ComboSearchPlacement(p1));\r\n \t} catch (SQLException e) {\r\n \t\tGeneralMethods.show(\"Error in searching Lectures\", \"Error\");\r\n \t\te.printStackTrace();\r\n \t}\r\n \t\t\tObservableList<Placement> list = FXCollections.observableArrayList();\r\n \t\t\tlist.addAll(searched);\r\n \t\t\tTablePlacement.setItems(list);\r\n \t\r\n }", "public Box pickUp() {\n //System.out.println(\"Nincs mit felvenni.\");\n return null;\n }", "String searchBoxUserRecordSelected();", "void searchView(String name);", "@Override\n\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\tSystem.out.println(\"Nothing selected\");\n\t\tsearchText =\"Restaurants\";\n\t\t\n\t}", "public String search() {\r\n currentRoom = player.getCurrentRoom();\r\n String res = \"You start searching the room....\";\r\n if (currentRoom.getChestSize() > 0) {\r\n res += \"You find a treasure chest in the corner...\" + System.lineSeparator();\r\n res += \"You pick up the following items from the chest and put them in your backpack\" + System.lineSeparator();\r\n res += currentRoom.getItemsInChest();\r\n } else {\r\n res = \"You find nothing of intrest in the room...\";\r\n }\r\n return res;\r\n }", "public String searchByStateUI() {\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER STATE TO SEARCH BY +\");\n console.promptForPrintPrompt(\" +++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String state = console.promptForString(\" STATE: \");\n return state;\n }", "@Test\n\tpublic void testSearchSelection() throws Exception {\n\t\t// select an area known to have some strings\n\t\tAddressSet set = new AddressSet();\n\t\tset.addRange(addr(0x405d80), addr(0x405dc0));\n\n\t\t// select the address set\n\t\ttool.firePluginEvent(\n\t\t\tnew ProgramSelectionPluginEvent(\"Test\", new ProgramSelection(set), program));\n\n\t\twaitForSwing();\n\n\t\tdialog = getDialog();\n\t\tContainer container = dialog.getComponent();\n\n\t\t// check to make sure the search selection button is checked and enabled\n\t\tJRadioButton rb = (JRadioButton) findButton(container, \"Search Selection\");\n\t\tassertTrue(rb.isSelected());\n\t\tassertTrue(rb.isEnabled());\n\n\t\tStringTableProvider provider = performSearch();\n\t\tStringTableModel model = (StringTableModel) getInstanceField(\"stringModel\", provider);\n\t\ttoggleDefinedStateButtons(provider, false, true, false, false);\n\t\twaitForTableModel(model);\n\n\t\tassertEquals(3, model.getRowCount());\n\n\t\t// test the results size and that the correct strings are found\n\t\tint row = findRow(model, addr(0x405d81));\n\t\tassertEquals(\"00405d81\", getModelValue(model, row, addressColumnIndex).toString());\n\t\trow = findRow(model, addr(0x405d9c));\n\t\tassertEquals(\"00405d9c\", getModelValue(model, row, addressColumnIndex).toString());\n\t\trow = findRow(model, addr(0x405db4));\n\t\tassertEquals(\"00405db4\", getModelValue(model, row, addressColumnIndex).toString());\n\t}", "protected String getSearchHint() {\n if (!isMessageListReady()) {\n return \"\";\n }\n Account account = getMessageListFragment().getAccount();\n Mailbox mailbox = getSearchableMailbox();\n\n if (mailbox == null) {\n return \"\";\n }\n\n if (shouldDoGlobalSearch(account, mailbox)) {\n return mActivity.getString(R.string.search_hint);\n }\n\n // Regular mailbox, or IMAP - search within that mailbox.\n String mailboxName = FolderProperties.getInstance(mActivity).getDisplayName(mailbox);\n return String.format(\n mActivity.getString(R.string.search_mailbox_hint),\n mailboxName);\n }", "@Override\n public void actionPerformed(ActionEvent event)\n {\n showCandidatesArea.append(enterCandidateArea.getText() + \"\\n\");\n ArrayList<String> candidatesArray = candidates.get(positionJComboBox.getSelectedItem().toString());\n candidatesArray.add(enterCandidateArea.getText());\n\n enterCandidateArea.setText(\"\");\n for(String i : candidates.keySet()) {\n for(int j = 0; j < candidates.get(i).size(); j++){\n }\n }\n }", "public String returnTagLocation(){\n\t\treturn (String) tagLocationBox.getSelectedItem();//Return the tag location options\n\t}", "public void searchLocation(View v){\n EditText locationSearch = findViewById(R.id.location);\n String location = locationSearch.getText().toString();\n search(location);\n }", "private void searchSuggestionListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchSuggestionListMouseClicked\n String selectedWord = this.getSearchSuggestionList().getSelectedValue();\n \n // find the definiiton of the word\n for(int i = 0 ; i < queryResult.size() ; i++)\n {\n if(queryResult.get(i).getWord().equals(selectedWord))\n {\n String definition = queryResult.get(i).getDefinition();\n definitionTextArea.setText(definition);\n i = queryResult.size();\n }\n }\n \n // select the same word in the all word list \n ListModel<String> modelList = getAllWordsList().getModel();\n \n for(int i = 0 ; i < modelList.getSize() ; i++)\n {\n if(modelList.getElementAt(i).equals(selectedWord))\n {\n getAllWordsList().setSelectedIndex(i);\n i = modelList.getSize();\n }\n }\n }", "Object getSelection();", "public void setSearchArea(String searchArea) {\r\n this.searchArea = searchArea;\r\n }", "private void determineMenuSelection(String filePath) throws IOException {\n\t\tBufferedImage currentImage = Utils.readInImage(filePath);\n\t\tArrayList<Rectangle> boxes = model.getTemplateBoxes();\n\t\tArrayList<Rectangle> used = new ArrayList<>();\n\t\tdetermineInitSelections(boxes, used, currentImage);\n\t\tfor(int i = 7; i < boxes.size(); i++) { // Start at i = 2 for initial selections\n\t\t\t\n\t\t\tif(!used.contains(boxes.get(i))) {\n\t\t\t\tboolean a = searchBlackPixels(boxes.get(i), currentImage);\n\t\t\t\tboolean b = searchBlackPixels(boxes.get(i + 5), currentImage);\n\t\t\t\tif(a) {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else if(b) {\n\t\t\t\t\tmodel.getSelections()[i] = 'B';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblSrchStatus = new javax.swing.JLabel();\n lblSrchTarget = new javax.swing.JLabel();\n lblSrchOrigin = new javax.swing.JLabel();\n lblSrchWorktype = new javax.swing.JLabel();\n cmbSrchStatus = new javax.swing.JComboBox<>();\n cmbSrchTarget = new javax.swing.JComboBox<>();\n cmbSrchOrigin = new javax.swing.JComboBox<>();\n cmbSrchWorkType = new javax.swing.JComboBox<>();\n btnSrchSearch = new javax.swing.JButton();\n btnSrchClose = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n lblSrchStatus.setText(\"Search for Status :\");\n lblSrchStatus.setAlignmentX(12.0F);\n lblSrchStatus.setAlignmentY(12.0F);\n getContentPane().add(lblSrchStatus, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 26, -1, -1));\n\n lblSrchTarget.setText(\"Search for Target :\");\n getContentPane().add(lblSrchTarget, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 66, -1, -1));\n\n lblSrchOrigin.setText(\"Search for Origin :\");\n getContentPane().add(lblSrchOrigin, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 109, -1, -1));\n\n lblSrchWorktype.setText(\"Search for Work Type :\");\n getContentPane().add(lblSrchWorktype, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 155, -1, -1));\n\n cmbSrchStatus.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"StandBy\", \"Evaluated\", \"Done\", \"OK\", \"Not OK\", \"Cancel\", \"Post Poned\" }));\n cmbSrchStatus.setSelectedIndex(-1);\n getContentPane().add(cmbSrchStatus, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 23, 228, -1));\n\n cmbSrchTarget.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n cmbSrchTarget.setSelectedIndex(-1);\n getContentPane().add(cmbSrchTarget, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 66, 228, -1));\n\n cmbSrchOrigin.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n cmbSrchOrigin.setSelectedIndex(-1);\n getContentPane().add(cmbSrchOrigin, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 109, 228, -1));\n\n cmbSrchWorkType.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n cmbSrchWorkType.setSelectedIndex(-1);\n getContentPane().add(cmbSrchWorkType, new org.netbeans.lib.awtextra.AbsoluteConstraints(159, 152, 229, -1));\n\n btnSrchSearch.setText(\"Search\");\n btnSrchSearch.setMaximumSize(new java.awt.Dimension(80, 30));\n btnSrchSearch.setMinimumSize(new java.awt.Dimension(80, 30));\n btnSrchSearch.setPreferredSize(new java.awt.Dimension(80, 30));\n btnSrchSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSrchSearchActionPerformed(evt);\n }\n });\n getContentPane().add(btnSrchSearch, new org.netbeans.lib.awtextra.AbsoluteConstraints(291, 219, 97, 33));\n\n btnSrchClose.setText(\"Close\");\n btnSrchClose.setPreferredSize(new java.awt.Dimension(80, 30));\n btnSrchClose.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSrchCloseActionPerformed(evt);\n }\n });\n getContentPane().add(btnSrchClose, new org.netbeans.lib.awtextra.AbsoluteConstraints(159, 219, 104, 33));\n\n pack();\n }", "public String search() {\r\n\t\tgetNavigationPanel(3);\r\n\t\treturn SUCCESS;\r\n\t}", "private TextBox searchTextBoxAtLocation(Point location) {\n final List<TextBox> tb = getAllTextBox();\n tb.remove(entityName);\n return GraphicView.searchComponentWithPosition(tb, location);\n }", "public void onShowPopupNoSearchCriteria() {\n int left = view.getSearchContent().getElement().getAbsoluteLeft();\n int top = view.getSearchContent().getElement().getAbsoluteTop() + 40;\n VerticalPanel vp = new VerticalPanel();\n vp.addStyleName(StyleResource.INSTANCE.modal().suggestModal());\n vp.add(new Label(Storage.MSGS.searchNoSearchingCriteria()));\n PopupPanel popup = new PopupPanel(true);\n popup.setWidget(vp);\n popup.setPopupPosition(left, top);\n popup.show();\n }", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\tSystem.out.println(\"onNothingSelected\");\n\t\t\t\tsearchText = \"Restaurants\";\n\t\t\t}", "public int getSelection() {\n \tcheckWidget();\n \treturn selection;\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 }", "@Override\n\tpublic SuggestBox getSearchSuggestFuncTextBox() {\n\t\treturn searchSuggestFuncTextBox;\n\t}", "@Override\n public void mouseExited(MouseEvent e) {\n SearchBox source = (SearchBox) e.getComponent();\n if (source.getText().equals(\"\"))//if user didn't write anything, we set the default search box text.\n source.setText(defaultText);\n source.setFocusable(false);\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n if (parent.getItemAtPosition(position) == \"Search by tag\"){\n\n\n\n }\n else if(parent.getItemAtPosition(position) == \"Search by child\"){\n\n }\n\n\n\n\n }", "public void intitialiseGUI(){\n\t\tsetTitle(\"Search\");//Setting the title for this frame\n\t\tsetSize(1100, 650);//Setting the size for this frame\n\t setLocationRelativeTo(null);//Putting the frame in the centre of the screen\n\n\t optionsPane = new JPanel(new BorderLayout());//Creating a panel for the left hand size of the frame which will hold the options\n\t\tjpCmbBoxes = new JPanel();//Creating a panels to hold the combo boxes\n\t\tpic = new JPanel();//Creating a panel to hold the picture\n\t\tdisclaimer = new JPanel(new BorderLayout());//Creating a panel to contain the disclaimer at the bottom of the frame\n\t\tsearchResults = new JPanel();//Creating a panel to hold the search results on the right hand side of the screen\n\t\tscrollbar = new JScrollPane(searchResults, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);//Creating a new scroll pane and disabling the horizontal scroll bar\n\t\t\n\t\tdisclaim = new JLabel(j.getAcknowledgement());//Creating a label for the disclaimer\n\t\tsubTitle = new JLabel(\"Shark Tracker\");//Creating a label for the subtitle\n\t\ttrackingRangeLabel = new JLabel(\"Tracking Range\");//Creating a label for the tracking range\n\t\tgenderLabel = new JLabel(\"Gender\");//Creating a label for the gender\n\t\tstageOfLifeLabel = new JLabel(\"Stage of Life\");//Creating a label for the stage of life\n\t\ttagLocationLabel = new JLabel(\"Tag Location\");//Creating a label for the tag location\n\t\tsearchButton = new JButton(\"Search\");//Creating a label for the search button\n\t\tsearchByName = new JButton(\"Search by Name\");//Creating a label for the searchByName button\n\t\t\n\t\t/*Setting the alignment of each of the components*/\n\t\tsubTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\ttrackingRangeLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tgenderLabel.setAlignmentX(Component.CENTER_ALIGNMENT);;\n\t\tstageOfLifeLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\ttagLocationLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tsearchButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tsearchByName.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tsubTitle.setFont(new Font(\"Serif\", Font.PLAIN, 40));//Setting the font for the subtitle\n\t\t\n\t\ttrackingRange = new JComboBox<String>(ranges);//Creating a combo box for the tracking range options\n\t\tgenderBox = new JComboBox<String>(gender);//Creating a combo box for the gender options\n\t\tstageofLifeBox = new JComboBox<String>(stages);//Creating a combo box for the stage of life options\n\t\ttagLocationBox = new JComboBox<String>();//Creating a combo box for the tag location options\n\t\ttagLocationBox.addItem(\"All\");//Adding an extra field for tag location \"all\"\n\t\t\n\t\tfor(String s : locations){//This for loop gets the tag locations and then adds them to the combo box\n\t\t\ttagLocationBox.addItem(s);//Adding the location to the combo box\n\t\t}\n\t\tscrollbar = new JScrollPane(searchResults);//Adding a scroll pane for the search results\n\t}", "@Override\n\tpublic SuggestBox getSearchSuggestTextBox() {\n\t\treturn searchSuggestTextBox;\n\t}", "@Override // android.widget.PopupWindow\n public boolean findDropDownPosition(View anchor, WindowManager.LayoutParams outParams, int xOffset, int yOffset, int width, int height, int gravity, boolean allowScroll) {\n if (!this.mFullScreen) {\n return super.findDropDownPosition(anchor, outParams, xOffset, yOffset, width, height, gravity, allowScroll);\n }\n outParams.x = xOffset;\n outParams.y = yOffset;\n outParams.width = width;\n outParams.height = height;\n outParams.gravity = gravity;\n return false;\n }", "private void searchQuery() {\n edit_search.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n if (paletteComposition.getVisibility() == View.VISIBLE){\n paletteComposition.setVisibility(View.GONE);\n setComposer.setVisibility(View.VISIBLE);\n }\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n setContactThatNameContains(s.toString().trim());\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }", "public String getSelected()\r\n {\r\n if (selectedIndex == -1)\r\n return null;\r\n \r\n return towerTypes[selectedIndex];\r\n }", "public ChoiceBox getMyChoiceBox() {\n return this.myChoiceBox;\n }", "private DynamicForm createSearchBox() {\r\n\t\tfinal DynamicForm filterForm = new DynamicForm();\r\n\t\tfilterForm.setNumCols(4);\r\n\t\tfilterForm.setAlign(Alignment.LEFT);\r\n\t\tfilterForm.setAutoFocus(false);\r\n\t\tfilterForm.setWidth(\"59%\"); //make it line up with sort box\r\n\t\t\r\n\t\tfilterForm.setDataSource(SmartGWTRPCDataSource.getInstance());\r\n\t\tfilterForm.setOperator(OperatorId.OR);\r\n\t\t\r\n\t\t//Visible search box\r\n\t\tTextItem nameItem = new TextItem(\"name\", \"Search\");\r\n\t\tnameItem.setAlign(Alignment.LEFT);\r\n\t\tnameItem.setOperator(OperatorId.ICONTAINS); // case insensitive\r\n\t\t\r\n\t\t//The rest are hidden and populated with the contents of nameItem\r\n\t\tfinal HiddenItem companyItem = new HiddenItem(\"company\");\r\n\t\tcompanyItem.setOperator(OperatorId.ICONTAINS);\r\n\t\tfinal HiddenItem ownerItem = new HiddenItem(\"ownerNickName\");\r\n\t\townerItem.setOperator(OperatorId.ICONTAINS);\r\n\r\n\t\tfilterForm.setFields(nameItem,companyItem,ownerItem);\r\n\t\t\r\n\t\tfilterForm.addItemChangedHandler(new ItemChangedHandler() {\r\n\t\t\tpublic void onItemChanged(ItemChangedEvent event) {\r\n\t\t\t\tString searchTerm = filterForm.getValueAsString(\"name\");\r\n\t\t\t\tcompanyItem.setValue(searchTerm);\r\n\t\t\t\townerItem.setValue(searchTerm);\r\n\t\t\t\tif (searchTerm==null) {\r\n\t\t\t\t\titemsTileGrid.fetchData();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tCriteria criteria = filterForm.getValuesAsCriteria();\r\n\t\t\t\t\titemsTileGrid.fetchData(criteria);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn filterForm;\r\n\t}", "private String showWeaponSuggestions(String room) {\n\t\t\tButtonGroup weaponButtons = new ButtonGroup();\n\t\t\tList<JRadioButton> btns = setupWeaponButtons();\n\t \n\t JPanel weaponPanel = new JPanel(new GridLayout(0, 1));\n\t\t\tJLabel lbl = new JLabel(\"You are in the \"+frame.makeDave(room)+\".\"\n\t\t\t\t\t+ \"\\n Select the weapon that you suspect.\");\n\t\t\tweaponPanel.add(lbl);\n\t \n\t for(JRadioButton b : btns){\n\t \tweaponButtons.add(b);\n\t \tweaponPanel.add(b);\n\t }\n\t\t\t\n\t JOptionPane.showMessageDialog(frame, weaponPanel);\n\t \n\t for(JRadioButton b : btns){\n\t \tif(b.isSelected()){\n\t \t\treturn b.getText();\n\t \t}\n\t }\n\t return null;\n\t\t}", "public int getSelectionBoxStyle();", "private InputMap getInputMap(int condition) {\n if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) {\n return (InputMap)UIManager.get(\"Spinner.ancestorInputMap\"); }\n return null; }", "public int getChoice()\n {\n super.setVisible(true);\n return this.choice;\n }", "@Override\n public List<SpriteDefinition> getChosen () {\n return mySelected.getListView().getItems();\n }", "private static void menuSelector(){\r\n\t\tint answer= getNumberAnswer();\r\n\t\tswitch (answer) {\r\n\t\tcase 0:\r\n\t\t\tshowShapeInfo(shapes[0]);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcreateShape();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Its Perimeter is equal to: \" +calcShapePerimeter(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Its Area is equal to: \" +calcShapeArea(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Provide integer to use for scaling shape: \");\r\n\t\t\tscaleShape(shapes[0], getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"That's not actually an option.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public JComponent getSearchBar() {\n final SearchBar sb = new SearchBar(\n \"Search blocks\", \"Search for blocks in the drawers and workspace\", workspace);\n for (SearchableContainer con : getAllSearchableContainers()) {\n sb.addSearchableContainer(con);\n }\n return sb.getComponent();\n }", "public void handleSearch(ActionEvent actionEvent) {\n\t\tRadioButton radio = (RadioButton) toogleSearch.getSelectedToggle();\n\t\tString searchString = txtSearch.getText();\n\t\tObservableList<Item> itemList;\n\t\tif(radio == radioID){\n\t\t\ttry {\n\t\t\t\titemList = ItemDAO.searchItemById(searchString);\n\t\t\t\tpopulateItems(itemList);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t}\n\t\t} else if(radio == radioName){\n\t\t\ttry {\n\t\t\t\titemList = ItemDAO.searchItemByName(searchString);\n\t\t\t\tpopulateItems(itemList);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\titemList = ItemDAO.searchItemByLocation(searchString);\n\t\t\t\tpopulateItems(itemList);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tExp.displayException(e);\n\t\t\t}\n\t\t}\n\n\n\n\t}", "public void onSearch(View view)\n {\n PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();\n\n try {\n startActivityForResult(builder.build(this), PLACE_PICKER_REQUEST);\n } catch (GooglePlayServicesRepairableException e) {\n e.printStackTrace();\n } catch (GooglePlayServicesNotAvailableException e) {\n e.printStackTrace();\n }\n }", "TextField getTextFieldRootRecherche();", "public static JDialog createRegionDialog(final ChampionSelectGUI t) {\n\t\tfinal JPanel contentPanel = new JPanel();\n\t\tJLabel request = new JLabel(\"Please select your region\");\n\t\tcontentPanel.add(request);\n\t\trequest.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tfinal Choice input = new Choice();\n\t\tinput.add(\"---Select Region---\");\n\t\tinput.add(\"NA\");\n\t\tinput.add(\"EUW\");\n\t\tinput.add(\"KR\");\n\t\tinput.add(\"EUNE\");\n\t\tinput.add(\"BR\");\n\t\tinput.add(\"RU\");\n\t\tinput.add(\"TR\");\n\t\tinput.add(\"OCE\");\n\t\tinput.add(\"LAN\");\n\t\tinput.add(\"LAS\");\n\t\tcontentPanel.add(input);\n\t\tJButton ok = new JButton(\"ok\");\n\t\tcontentPanel.add(ok);\n\t\tok.setSize(200, 150);\n\t\tok.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tfinal JDialog d = new JDialog(t, \"Region\", true);\n\t\td.setContentPane(contentPanel);\n\t\td.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\td.setSize(400, 100);\n\t\td.setLocationRelativeTo(t);\n\t\td.setLayout(new BoxLayout(contentPanel, BoxLayout.Y_AXIS));\n\t\td.addWindowListener(new WindowListener() {\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tint ret = JOptionPane.showConfirmDialog(contentPanel, \"Are you sure you want to exit?\", \"Choose an option\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif (ret == 0) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void windowOpened(WindowEvent e) {}\n\t\t\tpublic void windowClosed(WindowEvent e) {}\n\t\t\tpublic void windowIconified(WindowEvent e) {}\n\t\t\tpublic void windowDeiconified(WindowEvent e) {}\n\t\t\tpublic void windowActivated(WindowEvent e) {}\n\t\t\tpublic void windowDeactivated(WindowEvent e) {}\n\t\t});\n\t\tok.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (input.getSelectedItem().equals(\"---Select Region---\")) {\n\t\t\t\t\tJOptionPane.showMessageDialog(contentPanel, \"Please select a region.\", \"Message\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t} else {\n\t\t\t\t\tt.regionArr[0] = input.getSelectedItem();\n\t\t\t\t\td.setVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn d;\n\t}", "public abstract Vector getAnchorPoint(Rectangle selectionBox);", "public static void SearchBox() {\r\n\tJFrame Search = new JFrame(\"Search\");\r\n\tSearch.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\tSearch.setSize(700,500);\r\n\tSearch.getContentPane();\r\n\tSearch.setVisible(true);\r\n\r\n\te7.setFont(f);\r\n\r\n\t\r\n\r\n\tSearch.getContentPane().add(GUI2Panel);\r\n\tGUI2Panel.add(e7);\r\n\tGUI2Panel.add(SearchField);\r\n\r\n\tGUI2Panel.add(SearchButton2);\r\n}", "public void getComboForSearch(CCTConnection conn) {\n\t\t\n\t}", "@FXML\r\n void searchButtonAction() {\r\n String definition=dictionary.Search(wordInput.getText());\r\n String translation=dictionary.Translate(wordInput.getText());\r\n area.setWrapText(true);\r\n area.setText(definition+\"\\n\\n\\n\\nTranslation: \"+ translation);\r\n\r\n String name = wordInput.getText().substring(0,1).toUpperCase() + wordInput.getText().substring(1).toLowerCase();\r\n wordName.setText(name);\r\n listView.getItems().addAll(wordInput.getText());\r\n }", "private void createSearchDialog() {\n final Dialog dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.search);\n Window window = dialog.getWindow();\n //window.setLayout(mWidth/2, mHeight/2);\n window.setLayout(WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT);\n\n dialog.setTitle(getString(R.string.search));\n /**Search*/\n Button btnSearch = (Button) dialog.findViewById(R.id.search);\n final EditText txtSearch = (EditText) dialog.findViewById(R.id.txtSearch);\n txtSearch.setOnKeyListener(new View.OnKeyListener() {\n @Override\n public boolean onKey(View view, int i, KeyEvent keyEvent) {\n if (i == KeyEvent.KEYCODE_ENTER) {\n diaryFragment.search(txtSearch.getText().toString());\n\n dialog.dismiss();\n }\n return false;\n }\n });\n\n btnSearch.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n diaryFragment.search(txtSearch.getText().toString());\n dialog.dismiss();\n }\n });\n\n\n dialog.show();\n }", "public String returnGenderBox(){\n\t\treturn (String) genderBox.getSelectedItem();//Return the gender options\n\t}", "public Search applyFilters() {\n if (building.getValue() == null) {\n CustomAlert.warningAlert(\"Please select a building.\");\n return null;\n }\n if (capacity.getCharacters() == null) {\n CustomAlert.warningAlert(\"Please select a capacity.\");\n return null;\n }\n if (nuOfPlugs.getCharacters() == null) {\n CustomAlert.warningAlert(\"Please select the amount of plugs.\");\n return null;\n }\n boolean isScreen = false;\n boolean isBeamer = false;\n if (screen.isSelected()) {\n isScreen = true;\n }\n if (beamer.isSelected()) {\n isBeamer = true;\n }\n int intCapacity;\n String stringCapacity = (String) capacity.getCharacters();\n intCapacity = Integer.parseInt(stringCapacity);\n int intPlugs;\n String stringPlugs = (String) nuOfPlugs.getCharacters();\n intPlugs = Integer.parseInt(stringPlugs);\n return new Search(isScreen, isBeamer, intCapacity, building.getValue(), intPlugs);\n }", "@Override\n\tint Search_List(String Search_Name)\n\t{\n\t\tint k=0;\n\t\tfor(OptionSet Op:opset)\t{\n\t\t\tif(Op.getName().equalsIgnoreCase(Search_Name.toUpperCase(Locale.getDefault())))\n\t\t\t\treturn k;\n\t\t\tk++;\n\t\t}\n\t\treturn -1;\n\t}", "public JPanel getSearchResultPanel(){return searchResultPanel;}", "private void findClubEvent () {\n \n findClubEvent (\n findButton.getText(), \n findText.getText().trim(), \n true);\n \n if (findText.getText().trim().length() == 0) {\n findText.grabFocus();\n statusBar.setStatus(\"Enter a search string\");\n }\n }", "public abstract Vector getPosition(Rectangle selectionBox);", "private void initialize() {\r\n\t\tSearch = new JFrame();\r\n\t\tSearch.setTitle(\"Search Carpools\\r\\n\");\r\n\t\tSearch.setBounds(100, 100, 543, 414);\r\n\t\tSearch.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tSearch.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel lblTime = new JLabel(\"Date\");\r\n\t\tlblTime.setBounds(10, 69, 73, 14);\r\n\t\tSearch.getContentPane().add(lblTime);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Direction\");\r\n\t\tlblNewLabel.setBounds(10, 111, 57, 14);\r\n\t\tSearch.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Spots\");\r\n\t\tlblNewLabel_1.setBounds(10, 149, 46, 14);\r\n\t\tSearch.getContentPane().add(lblNewLabel_1);\r\n\t\t\r\n\t\tJButton btnReset = new JButton(\"Reset\");\r\n\t\tbtnReset.setBounds(95, 217, 161, 23);\r\n\t\tSearch.getContentPane().add(btnReset);\r\n\t\t\r\n\t\tJRadioButton rdbtnToNorth = new JRadioButton(\"To North\");\r\n\t\trdbtnToNorth.setBounds(100, 107, 73, 23);\r\n\t\tSearch.getContentPane().add(rdbtnToNorth);\r\n\t\r\n\t\tJRadioButton rdbtnToSouth = new JRadioButton(\"To South\");\r\n\t\trdbtnToSouth.setBounds(181, 107, 109, 23);\r\n\t\tSearch.getContentPane().add(rdbtnToSouth);\r\n\t\t\r\n\t\trdbtnToNorth.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\trdbtnToSouth.setSelected(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\trdbtnToSouth.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\trdbtnToNorth.setSelected(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tSpinnerDateModel model = new SpinnerDateModel();\r\n\t\tJSpinner year = new JSpinner(model);\r\n\t\tyear.setValue(new Date());\r\n\t\tJSpinner.DateEditor editor = new JSpinner.DateEditor(year,\"yyyy-MM-dd\");\r\n\t\tyear.setEditor(editor);\r\n\t\tyear.setBounds(105, 66, 135, 20);\r\n\t\tSearch.getContentPane().add(year);\r\n\t\t\r\n\t\tJComboBox comboBox = new JComboBox();\r\n\t\tcomboBox.setModel(new DefaultComboBoxModel(new String[] {\"1\", \"2\", \"3\", \"4\"}));\r\n\t\tcomboBox.setBounds(101, 146, 139, 20);\r\n\t\tSearch.getContentPane().add(comboBox);\r\n\r\n\t\t\r\n\t\tJButton btnGoBack = new JButton(\"Search for an Offer\");\r\n\t\tbtnGoBack.setBounds(322, 166, 161, 23);\r\n\t\tSearch.getContentPane().add(btnGoBack);\r\n\t\tbtnGoBack.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tSearch.dispose();\r\n\t\t\t\tObject obj = model.getDate();\r\n\t\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t\tString dateString = formatter.format(obj);\r\n\t\t\t\tSystem.out.println(dateString);\r\n\t\t\t\tString dc = \"\";\r\n\t\t\t\tif (rdbtnToNorth.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tdc = \"n\";\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\tdc = \"s\";\r\n\t\t\t\t}\r\n\t\t\t\tint spots = Integer.parseInt((String) comboBox.getSelectedItem());\r\n\t\t\t\tOffersGUI window = new OffersGUI(dateString,dc,spots);\r\n\t\t\t\twindow.frmOfferList.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t\tJButton btnConfirm = new JButton(\"Search for a Request\");\r\n\t\tbtnConfirm.setBounds(322, 78, 161, 23);\r\n\t\tSearch.getContentPane().add(btnConfirm);\r\n\t\tbtnConfirm.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tSearch.dispose();\r\n\t\t\t\tObject obj = model.getDate();\r\n\t\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t\tString dateString = formatter.format(obj);\r\n\t\t\t\tSystem.out.println(dateString);\r\n\t\t\t\tString dc = \"\";\r\n\t\t\t\tif (rdbtnToNorth.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tdc = \"n\";\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\tdc = \"s\";\r\n\t\t\t\t}\r\n\t\t\t\tint spots = Integer.parseInt((String) comboBox.getSelectedItem());\r\n\t\t\t\tRequestsGUI window = new RequestsGUI(dateString,dc,spots);\r\n\t\t\t\twindow.frmRequestList.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t}", "@OnClick(R.id.search_estate_bt_search)\n public void search(View view) {\n Log.d(TAG, \"search: \");\n\n mSearchEstateViewModel.searchEstate(\n mEstateType.getText().toString(),\n mPrice1.getText().toString(),\n mPrice2.getText().toString(),\n mSurface1.getText().toString(),\n mSurface2.getText().toString(),\n mCity.getText().toString(),\n mNumbersRooms1.getText().toString(),\n mNumbersRooms2.getText().toString(),\n mNumbersBathrooms1.getText().toString(),\n mNumbersBathrooms2.getText().toString(),\n mNumbersBedrooms1.getText().toString(),\n mNumbersBedrooms2.getText().toString(),\n mNumbersPhoto1.getText().toString(),\n mNumbersPhoto2.getText().toString(),\n // Point of Interest\n mChipGarden.isChecked(),\n mChipLibrary.isChecked(),\n mChipRestaurant.isChecked(),\n mChipSchool.isChecked(),\n mChipSwimmingPool.isChecked(),\n mChipTownHall.isChecked()\n );\n }", "Search getSearch();", "@Override\r\n\tpublic void searchObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_actionbar_principal, menu);\n // Get the SearchView and set the searchable configuration\n SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n final SearchView searchView = (SearchView) menu.findItem(R.id.pesquisar).getActionView();\n // Assumes current activity is the searchable activity\n searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));\n searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n\n @Override\n public boolean onQueryTextChange(String s) {\n\n if (s.length() >= 4) {\n Toast.makeText(getApplicationContext(), \"Procura \" + s, Toast.LENGTH_LONG).show();\n //submitLocationQuery(s);\n }\n return true;\n }\n\n @Override\n public boolean onQueryTextSubmit(String query) {\n // submitLocationQuery(query);\n Toast.makeText(getApplicationContext(), \"Procura tudo \" + query, Toast.LENGTH_LONG).show();\n\n searchView.clearFocus();\n // esconder a caixa de texto de busca\n ///searchView.onActionViewCollapsed();\n return true;\n }\n\n });\n\n return super.onCreateOptionsMenu(menu);\n }", "abstract GridPane createSearchDashBoard();", "public int getSelectionSize();", "public Point getLocationDialog(){\n try{\n return new Point( (int)this.getLocationOnScreen().getX() +(this.getWidth() /3), (int)this.getLocationOnScreen().getY()+this.menuBarData.getHeight());\n }catch(IllegalComponentStateException e){\n return new Point(100,100);\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblWhat = new javax.swing.JLabel();\n txtSearch = new javax.swing.JTextField();\n btSearch = new javax.swing.JButton();\n btCancel = new javax.swing.JButton();\n chkMatchCase = new javax.swing.JCheckBox();\n\n setTitle(\"Find\");\n\n lblWhat.setText(\"Find What: \");\n\n txtSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtSearchActionPerformed(evt);\n }\n });\n\n btSearch.setText(\" Search \");\n btSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btSearchActionPerformed(evt);\n }\n });\n\n btCancel.setText(\" Cancel \");\n btCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btCancelActionPerformed(evt);\n }\n });\n\n chkMatchCase.setText(\"Match Case\");\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 .addGroup(layout.createSequentialGroup()\n .addComponent(lblWhat)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 323, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(chkMatchCase)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btCancel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btSearch)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE)\n .addComponent(lblWhat))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btSearch)\n .addComponent(btCancel)\n .addComponent(chkMatchCase))\n .addContainerGap())\n );\n\n pack();\n }", "private FindDialog getFindDialog() {\r\n if (findDialog == null) {\r\n findDialog = new FindDialog(textViewer);\r\n findDialog.centerRelativeTo(this);\r\n getViewProperties().addProperties(\"find\",findDialog.getPreferences(),true);\r\n\r\n // Hide the find dialog when this pane becomes invisible\r\n addHierarchyListener(new HierarchyListener() {\r\n public void hierarchyChanged(HierarchyEvent e) {\r\n if (findDialog.isVisible() && !isShowing()) {\r\n findDialog.setVisible(false);\r\n }\r\n }\r\n });\r\n }\r\n return findDialog;\r\n }", "private void handleSearchButtonSelected() {\n\t\tShell shell = getShell();\n\t\tIProject project = getProject(editorLocal.getProjectName());\n\t\tIJavaProject javaProject = JavaCore.create(project);\n\t\tIType[] types = new IType[0];\n\t\tboolean[] radioSetting = new boolean[2];\n\t\ttry {\n\t\t\t// fix for Eclipse bug 66922 Wrong radio behaviour when switching\n\t\t\t// remember the selected radio button\n\t\t\tradioSetting[0] = mTestRadioButton.getSelection();\n\t\t\tradioSetting[1] = mTestContainerRadioButton.getSelection();\n\t\t\ttypes = TestSearchEngine.findTests(getLaunchConfigurationDialog(), javaProject, getTestKind());\n\t\t} catch (InterruptedException e) {\n\t\t\tsetErrorMessage(e.getMessage());\n\t\t\treturn;\n\t\t} catch (InvocationTargetException e) {\n\t\t\tLOG.error(\"Error finding test types\", e);\n\t\t\treturn;\n\t\t} finally {\n\t\t\tmTestRadioButton.setSelection(radioSetting[0]);\n\t\t\tmTestContainerRadioButton.setSelection(radioSetting[1]);\n\t\t}\n\t\tSelectionDialog dialog = new TestSelectionDialog(shell, types);\n\t\tdialog.setTitle(JUnitMessages.JUnitLaunchConfigurationTab_testdialog_title);\n\t\tdialog.setMessage(JUnitMessages.JUnitLaunchConfigurationTab_testdialog_message);\n\t\tif (dialog.open() == Window.CANCEL) {\n\t\t\treturn;\n\t\t}\n\t\tObject[] results = dialog.getResult();\n\t\tif ((results == null) || (results.length < 1)) {\n\t\t\treturn;\n\t\t}\n\t\tIType type = (IType) results[0];\n\t\tif (type != null) {\n\t\t\tmTestText.setText(type.getFullyQualifiedName('.'));\n\t\t}\n\t}", "abstract void findArea();", "abstract void findArea();", "private void changeActionPerformed(final java.awt.event.ActionEvent evt) {\n\t\t\tpainting = paintChecked;\n\t\t\tif (!paintChecked) {\n\t\t\t\tBot.getEventManager().removeListener(PaintListener.class, s);\n\t\t\t}\n\t\t\tif (timeChecked) {\n\t\t\t\tint h = 0, m = 0;\n\t\t\t\tstopping = false;\n\t\t\t\ttry {\n\t\t\t\t\th = Integer.parseInt(hours.getText());\n\t\t\t\t\tm = Integer.parseInt(minutes.getText());\n\t\t\t\t} finally {\n\t\t\t\t\ttimeToStop = System.currentTimeMillis() + m * 60000 + h\n\t\t\t\t\t\t\t* 60000 * 60;\n\t\t\t\t\tstopping = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstopping = false;\n\t\t\t}\n\t\t\tfinal String areaName = (String) location.getItemAt(location\n\t\t\t\t\t.getSelectedIndex());\n\t\t\tlog(\"Changing to area: \" + areaName);\n\t\t\tfoodName = ((String) food.getItemAt(food.getSelectedIndex()))\n\t\t\t\t\t.toLowerCase();\n\t\t\tlog(\"Now cooking: \" + foodName);\n\t\t\tif (areaName.equals(\"Varrock West Bank - North Side\")) {\n\t\t\t\tchosenArea = varrockwestnorth;\n\t\t\t} else if (areaName.equals(\"Varrock West Bank - South Side\")) {\n\t\t\t\tchosenArea = varrockwestsouth;\n\t\t\t} else if (areaName.equals(\"Varrock East Bank\")) {\n\t\t\t\tchosenArea = varrockeast;\n\t\t\t} else if (areaName.equals(\"Al Kharid Bank\")) {\n\t\t\t\tchosenArea = alkharid;\n\t\t\t} else if (areaName.equals(\"Draynor Village Bank\")) {\n\t\t\t\tchosenArea = draynor;\n\t\t\t} else if (areaName.equals(\"Falador East Bank\")) {\n\t\t\t\tchosenArea = faladoreast;\n\t\t\t} else if (areaName.equals(\"Falador West Bank\")) {\n\t\t\t\tchosenArea = faladorwest;\n\t\t\t} else if (areaName.equals(\"Grand Exchange - East Side\")) {\n\t\t\t\tchosenArea = geeast;\n\t\t\t} else if (areaName.equals(\"Grand Exchange - West Side\")) {\n\t\t\t\tchosenArea = gewest;\n\t\t\t} else if (areaName.equals(\"Edgeville Bank - West Side\")) {\n\t\t\t\tchosenArea = edgevillewest;\n\t\t\t} else if (areaName.equals(\"Edgeville Bank - East Side\")) {\n\t\t\t\tchosenArea = edgevilleeast;\n\t\t\t} else if (areaName.equals(\"Edgeville Bank - North Side\")) {\n\t\t\t\tchosenArea = edgevillenorth;\n\t\t\t} else if (areaName.equals(\"*Fishing Guild\")) {\n\t\t\t\tchosenArea = fishingguild;\n\t\t\t} else if (areaName.equals(\"Duel Arena\")) {\n\t\t\t\tchosenArea = duelarena;\n\t\t\t} else if (areaName.equals(\"Bounty Hunter\")) {\n\t\t\t\tchosenArea = bountyhunter;\n\t\t\t} else if (areaName.equals(\"*Ardougne South Bank\")) {\n\t\t\t\tchosenArea = ardougnesouth;\n\t\t\t} else if (areaName.equals(\"*Ardougne North Bank\")) {\n\t\t\t\tchosenArea = ardougnenorth;\n\t\t\t} else if (areaName.equals(\"*Lletya Bank\")) {\n\t\t\t\tchosenArea = lletya;\n\t\t\t} else if (areaName.equals(\"*Yanille Bank\")) {\n\t\t\t\tchosenArea = yanille;\n\t\t\t} else if (areaName.equals(\"*Seer's Village Bank\")) {\n\t\t\t\tchosenArea = seersvillage;\n\t\t\t} else if (areaName.equals(\"Fist of Guthix\")) {\n\t\t\t\tchosenArea = fistofguthix;\n\t\t\t} else if (areaName.equals(\"*Catherby\")) {\n\t\t\t\tchosenArea = catherby;\n\t\t\t} else if (areaName.equals(\"*Shilo Village\")) {\n\t\t\t\tchosenArea = shilovillage;\n\t\t\t} else if (areaName.equals(\"*TzHaar\")) {\n\t\t\t\tchosenArea = tzhaar;\n\t\t\t} else if (areaName.equals(\"*Jatizso\")) {\n\t\t\t\tchosenArea = jatizso;\n\t\t\t} else if (areaName.equals(\"*Neitiznot\")) {\n\t\t\t\tchosenArea = neitiznot;\n\t\t\t} else if (areaName.equals(\"*Miscellania\")) {\n\t\t\t\tchosenArea = miscellania;\n\t\t\t} else if (areaName.equals(\"*Lunar Isle\")) {\n\t\t\t\tchosenArea = lunarisle;\n\t\t\t} else if (areaName.equals(\"*Lumbridge Basement\")) {\n\t\t\t\tchosenArea = lumbridgebasement;\n\t\t\t} else if (areaName.equals(\"*Canifis\")) {\n\t\t\t\tchosenArea = canifis;\n\t\t\t} else if (areaName.equals(\"*Port Phasmatys (Reqs Ammy!)\")) {\n\t\t\t\tchosenArea = portphasmatys;\n\t\t\t} else if (areaName.equals(\"*Castle Wars\")) {\n\t\t\t\tchosenArea = castlewars;\n\t\t\t} else if (areaName.equals(\"*Pest Control\")) {\n\t\t\t\tchosenArea = pestcontrol;\n\t\t\t} else if (areaName.equals(\"*Oo'glog\")) {\n\t\t\t\tchosenArea = ooglog;\n\t\t\t} else if (areaName.equals(\"Mos Le'Harmless\")) {\n\t\t\t\tchosenArea = mosleharmless;\n\t\t\t} else if (areaName.equals(\"*Nardah\")) {\n\t\t\t\tchosenArea = nardah;\n\t\t\t} else if (areaName.equals(\"*Zanaris\")) {\n\t\t\t\tchosenArea = zanaris;\n\t\t\t} else if (areaName.equals(\"*Dorgesh-Kaan (Goblin City)\")) {\n\t\t\t\tchosenArea = dorgeshkaan;\n\t\t\t} else if (areaName.equals(\"*Keldagrim\")) {\n\t\t\t\tchosenArea = keldagrim;\n\t\t\t} else if (areaName.equals(\"*Rogues Den\")) {\n\t\t\t\tchosenArea = roguesden;\n\t\t\t}\n\n\t\t\t// Foods\n\t\t\tif (foodName.equals(\"anchovies\")) {\n\t\t\t\tfoodID = 321;\n\t\t\t} else if (foodName.equals(\"bass\")) {\n\t\t\t\tfoodID = 363;\n\t\t\t} else if (foodName.equals(\"bear meat\")) {\n\t\t\t\tfoodID = 2136;\n\t\t\t} else if (foodName.equals(\"beef\")) {\n\t\t\t\tfoodID = 2132;\n\t\t\t} else if (foodName.equals(\"cave eel\")) {\n\t\t\t\tfoodID = 5001;\n\t\t\t} else if (foodName.equals(\"chicken\")) {\n\t\t\t\tfoodID = 2138;\n\t\t\t} else if (foodName.equals(\"cod\")) {\n\t\t\t\tfoodID = 341;\n\t\t\t} else if (foodName.equals(\"crayfish\")) {\n\t\t\t\tfoodID = 13435;\n\t\t\t} else if (foodName.equals(\"herring\")) {\n\t\t\t\tfoodID = 345;\n\t\t\t} else if (foodName.equals(\"lobster\")) {\n\t\t\t\tfoodID = 377;\n\t\t\t} else if (foodName.equals(\"mackerel\")) {\n\t\t\t\tfoodID = 353;\n\t\t\t} else if (foodName.equals(\"manta ray\")) {\n\t\t\t\tfoodID = 389;\n\t\t\t} else if (foodName.equals(\"monkfish\")) {\n\t\t\t\tfoodID = 7944;\n\t\t\t} else if (foodName.equals(\"pawya meat\")) {\n\t\t\t\tfoodID = 12535;\n\t\t\t} else if (foodName.equals(\"pike\")) {\n\t\t\t\tfoodID = 349;\n\t\t\t} else if (foodName.equals(\"rabbit\")) {\n\t\t\t\tfoodID = 3226;\n\t\t\t} else if (foodName.equals(\"rainbow fish\")) {\n\t\t\t\tfoodID = 10138;\n\t\t\t} else if (foodName.equals(\"rat meat\")) {\n\t\t\t\tfoodID = 2134;\n\t\t\t} else if (foodName.equals(\"salmon\")) {\n\t\t\t\tfoodID = 331;\n\t\t\t} else if (foodName.equals(\"sardine\")) {\n\t\t\t\tfoodID = 327;\n\t\t\t} else if (foodName.equals(\"sea turtle\")) {\n\t\t\t\tfoodID = 395;\n\t\t\t} else if (foodName.equals(\"shark\")) {\n\t\t\t\tfoodID = 383;\n\t\t\t} else if (foodName.equals(\"shrimps\")) {\n\t\t\t\tfoodID = 317;\n\t\t\t} else if (foodName.equals(\"swordfish\")) {\n\t\t\t\tfoodID = 371;\n\t\t\t} else if (foodName.equals(\"trout\")) {\n\t\t\t\tfoodID = 335;\n\t\t\t} else if (foodName.equals(\"tuna\")) {\n\t\t\t\tfoodID = 359;\n\t\t\t} else if (foodName.equals(\"ugthanki meat\")) {\n\t\t\t\tfoodID = 1859;\n\t\t\t} else if (foodName.equals(\"yak meat\")) {\n\t\t\t\tfoodID = 10816;\n\t\t\t}\n\t\t\tsavedItems[savedItems.length - 1] = foodID;\n\t\t\tPrintWriter out = null;\n\t\t\ttry {\n\t\t\t\tout = new PrintWriter(new FileWriter(\"MHTYChefConfig.txt\"));\n\t\t\t\tfinal String[] settings = { \"\" + (paintChecked ? 1 : 0),\n\t\t\t\t\t\t\"\" + (timeChecked ? 1 : 0), hours.getText(),\n\t\t\t\t\t\tminutes.getText(), food.getSelectedIndex() + \"\",\n\t\t\t\t\t\tlocation.getSelectedIndex() + \"\" };\n\t\t\t\tfor (final String line : settings) {\n\t\t\t\t\tout.println(line);\n\t\t\t\t}\n\t\t\t\tout.close();\n\t\t\t\tlog(\"Configuration saved to MHTYChefConfig.txt!\");\n\t\t\t} catch (final IOException e) {\n\t\t\t\tlog(\"Saving configuration failed!\");\n\t\t\t}\n\t\t}", "@Override\n public String[] displayMenu() {\n\n PersonalMatchDAO personalMatchDAO = new PersonalMatchDAO();\n personalMatchDAO.listAllPersonalMatches();\n\n String[] str = {selection};\n return str;\n\n }", "@Override\n protected void search() {\n \n obtainProblem();\n if (prioritizedHeroes.length > maxCreatures){\n frame.recieveProgressString(\"Too many prioritized creatures\");\n return;\n }\n bestComboPermu();\n if (searching){\n frame.recieveDone();\n searching = false;\n }\n }" ]
[ "0.6101292", "0.60915285", "0.60742426", "0.60719377", "0.57964796", "0.57472837", "0.57472837", "0.5742709", "0.57340485", "0.5687895", "0.5672183", "0.55940527", "0.5576325", "0.5574394", "0.5568967", "0.55610955", "0.55109626", "0.544128", "0.5409564", "0.5406306", "0.5332941", "0.5331147", "0.53266287", "0.5313637", "0.5294986", "0.5288515", "0.5283526", "0.5273038", "0.5262191", "0.5254234", "0.52333635", "0.5227003", "0.5219791", "0.5191879", "0.51888126", "0.51615673", "0.5149823", "0.5145463", "0.512939", "0.5124069", "0.5123543", "0.5108359", "0.5101103", "0.50740016", "0.5065498", "0.50643975", "0.5056385", "0.50563127", "0.5045148", "0.5040915", "0.50396204", "0.50382316", "0.503045", "0.5029485", "0.50229686", "0.502159", "0.5014482", "0.501284", "0.5010283", "0.49930918", "0.49914396", "0.49878722", "0.49851054", "0.49721712", "0.49651626", "0.4959207", "0.49570048", "0.49545753", "0.49495232", "0.49361116", "0.4921356", "0.4919436", "0.4913197", "0.4910139", "0.49066326", "0.4902677", "0.49021804", "0.48940086", "0.48924133", "0.48854584", "0.48849878", "0.48790285", "0.48723295", "0.4871664", "0.4871537", "0.48694128", "0.48686644", "0.48625112", "0.4860876", "0.48595282", "0.48481965", "0.4845329", "0.4844642", "0.48444217", "0.4842419", "0.4840209", "0.4840209", "0.48358494", "0.483404", "0.48334646" ]
0.680598
0
INITIALIZE FUNCTIONS : Initialize choiceBox
private void choiceBoxInitializer() { searchChoiceBox.getItems().addAll("Learning Applications", "Learning Categories", "Learning Units"); searchChoiceBox.setValue("Learning Applications"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void populateChoiceBoxes() {\n subjects.setItems(FXCollections.observableArrayList(\"Select\", \"computers\", \"not-computers\", \"subjects\"));\n className.setItems(FXCollections.observableArrayList(\"Select\", \"101\", \"202\", \"303\", \"505\"));\n subjects.getSelectionModel().select(0);\n className.getSelectionModel().select(0);\n this.points.setPromptText(Integer.toString(100));\n\n }", "public void initChoice() {\n\t\t\t\t\n\t\tChoiceDialog<String> dialog = new ChoiceDialog<>(DB_MYSQL);\n\t\tdialog.setTitle(\"Base de datos\");\n\t\tdialog.setContentText(\"Seleccione una base de datos con la que trabajar\");\n\t\tdialog.getItems().addAll(DB_MYSQL, DB_SQL, DB_ACCESS);\n\t\n\t\tOptional<String> dbType = dialog.showAndWait();\n\t\t\n\t\tif( dbType.isPresent() ) {\t\n\t\t\t// Ajustamos nuestro modelo\n\t\t\tsetBd(dbType.get());\n\t\t\t\n\t\t} else {\n\t\t\tPlatform.exit(); // Entonces hemos acabado\n\t\t}\n\t}", "private void initComboBoxes()\n\t{\n\t\tsampling_combobox.getItems().clear();\n\t\tsampling_combobox.getItems().add(\"Random\");\n\t\tsampling_combobox.getItems().add(\"Cartesian\");\n\t\tsampling_combobox.getItems().add(\"Latin Hypercube\");\n\n\t\t// Set default value.\n\t\tsampling_combobox.setValue(\"Random\");\n\t}", "@Override\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\n\t\tchoiceBox.getItems().add(C_to_F_Text);\n\t\tchoiceBox.getItems().add(F_to_C_Text); //Adding items to choiceBox\n\n\t\t//setting default value to choiceBox\n\t\t//choiceBox.setValue(\"Celsius to Fahrenheit\"); using same string as above so we declare public static final String type and use them\n\t\tchoiceBox.setValue(C_to_F_Text);\n\n\t\t//now to setchoiceBox on action, here we have something new, use Change listener\n\t\t//we have get Selection mode then selected Item Property then add listener to it\n\t\t/*\n\t\tchoiceBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {\n\t\t\t@Override\n\t\t\tpublic void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n\t\t\t\tSystem.out.println(newValue); //printing to give example\n\t\t\t}\n\t\t});\n\t\t*/\n\t\t//we can convert about as lambda like this: note here are three parameters given in (o,oV,nV)\n\t\tchoiceBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {\n\t\t\tif(newValue.equals(C_to_F_Text)) {\n\t\t\t\tisC_to_F_selected = true; //we have specify all values explicitly else doest work here\n\t\t\t}\n\t\t\tif(newValue.equals(F_to_C_Text)) //we have specify all values explicitly else doest work here\n\t\t\t{\n\t\t\t\tisC_to_F_selected = false;\n\t\t\t}\n\t\t});\n\t\t//observable get the existing choice property,\n\t\t//oldValue get old value selected\n\t\t//newValue get new value selected\n\n\n\t\tconvertButton.setOnAction(event -> convert());\n\t}", "private void initialize() {\n\t\tChoiceScreen = new JFrame();\n\t\tChoiceScreen.setFont(new Font(\"Silom\", Font.PLAIN, 12));\n\t\tChoiceScreen.setType(Type.POPUP);\n\t\tChoiceScreen.setTitle(\"Bank of Programmers - Services\");\n\t\tChoiceScreen.getContentPane().setBackground(new Color(30, 144, 255));\n\t\tChoiceScreen.getContentPane().setLayout(null);\n\t\t\n\t\t\n\t\tJLabel lblBankNameLabel = new JLabel(\"BANK OF PROGRAMMERS\");\n\t\tlblBankNameLabel.setBounds(0, 0, 517, 52);\n\t\tlblBankNameLabel.setForeground(new Color(255, 255, 255));\n\t\tlblBankNameLabel.setFont(new Font(\"Silom\", Font.PLAIN, 40));\n\t\tlblBankNameLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tChoiceScreen.getContentPane().add(lblBankNameLabel);\n\t\t\n\t\tJButton btnAtm = new JButton(\"ATM\");\n\t\tbtnAtm.setForeground(new Color(30, 144, 255));\n\t\tbtnAtm.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tChoiceScreen.dispose();\n\t\t\t\tATM atm = new ATM();\n\t\t\t\tatm.ATMLogIn.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnAtm.setFont(new Font(\"Silom\", Font.PLAIN, 22));\n\t\tbtnAtm.setBounds(89, 129, 337, 92);\n\t\tChoiceScreen.getContentPane().add(btnAtm);\n\t\t\n\t\tJButton btnBank = new JButton(\"BANK (Create an Account!)\");\n\t\tbtnBank.setForeground(new Color(30, 144, 255));\n\t\tbtnBank.setFont(new Font(\"Silom\", Font.PLAIN, 22));\n\t\tbtnBank.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tChoiceScreen.dispose();\n\t\t\t\tAccountTypes acty = new AccountTypes();\n\t\t\t\tacty.AccountType.setVisible(true);\n\t\t\t}\n\t\t});\n\t\tbtnBank.setBounds(89, 270, 337, 92);\n\t\tChoiceScreen.getContentPane().add(btnBank);\n\t\tChoiceScreen.getContentPane().setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{lblBankNameLabel, btnAtm, btnBank}));\n\t\tChoiceScreen.setBounds(100, 100, 517, 475);\n\t\tChoiceScreen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tChoiceScreen.setLocation(dim.width/2-ChoiceScreen.getSize().width/2, dim.height/2-ChoiceScreen.getSize().height/2);\n\t\t\n\t}", "private void setupChoiceBoxes() {\n nodeSelectChoiceBox.setDisable(true);\n // Set the room categories in the choicebox\n if(roomsOnly) {\n List<String> allCategories = new LinkedList<String>(roomCategories.keySet());\n List<String> categories = allCategories.stream().filter(string -> string.contains(\"Rooms\")).collect(Collectors.toList());\n nodeCategoryChoiceBox.setItems(FXCollections.observableList(categories));\n } else {\n nodeCategoryChoiceBox.setItems(FXCollections.observableList(new LinkedList<String>(roomCategories.keySet())));\n }\n\n nodeCategoryChoiceBox.setOnAction(param -> {\n String category = nodeCategoryChoiceBox.getValue();\n\n // Gets the appropriate list of nodes\n Connection conn = DBController.dbConnect();\n List<Node> nodes = DBControllerNE.generateListOfNodes(conn, roomCategories.get(category));\n DBController.closeConnection(conn);\n\n // Add nodes to the node select choicebox\n nodeIDs = new HashMap<String, String>();\n for(Node node : nodes) {\n nodeIDs.put(node.getLongName(), node.getNodeID());\n }\n nodeSelectChoiceBox.setItems(FXCollections.observableList(new LinkedList<String>(nodeIDs.keySet())));\n nodeSelectChoiceBox.setDisable(false);\n });\n\n // Set the nodeID and run the given event handler\n nodeSelectChoiceBox.setOnAction(param -> {\n longName = nodeSelectChoiceBox.getValue();\n nodeID = nodeIDs.get(longName);\n if(eventHandler != null) {\n eventHandler.handle(param);\n }\n });\n }", "public void initialize() {\n fillCombobox();\n }", "private void init(){\n //Selected value in Spinner\n String selectedSubj= getActivity().getIntent().getStringExtra(\"subj\");\n String selectedPoten= getActivity().getIntent().getStringExtra(\"prob\");\n String selectedInst= getActivity().getIntent().getStringExtra(\"inst\");\n String selectedY= getActivity().getIntent().getStringExtra(\"peri\");\n\n if(selectedY.equals(\"2015~2017\")){\n String yList[]= {\"2015\", \"2016\", \"2017\"};\n selectedY= yList[new Random().nextInt(yList.length)];\n }\n\n String e_inst= QuestionUtil.create_eInst(selectedY, selectedInst);\n String k_inst= QuestionUtil.create_kInst(e_inst);\n String m= QuestionUtil.createPeriodM(selectedY, e_inst);\n\n QuestionNameBuilder.inst= new QuestionNameBuilder(selectedY, m, k_inst, selectedSubj, QuestionNameBuilder.UNDEFINED\n , QuestionNameBuilder.UNDEFINED, QuestionNameBuilder.TYPE_KOR);\n qnBuilder= QuestionNameBuilder.inst;\n\n //Potential Load\n loadPotentials(selectedPoten);\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 703, 720);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tc1 = new JComboBox();\r\n\t\tc1.setModel(new DefaultComboBoxModel(Month.values()));\r\n\t\tc1.setBounds(330, 211, 215, 32);\r\n\t\tframe.getContentPane().add(c1);\r\n\t\tc1.addItemListener(this);\r\n\t\t\r\n\t\tl1 = new JLabel(\"ans\");\r\n\t\tl1.setBounds(353, 289, 162, 46);\r\n\t\tframe.getContentPane().add(l1);\r\n\t}", "public void init() {\n addStringOption(\"extractionId\", \"Extraction ID\", \"\");\n addStringOption(WORKFLOW_ID, \"Workflow ID\", \"\");\n addEditableComboBoxOption(LIMSConnection.WORKFLOW_LOCUS_FIELD.getCode(), \"Locus\", \"None\", SAMPLE_LOCI);\n addDateOption(\"date\", \"Date\", new Date());\n\n\n addComboBoxOption(RUN_STATUS, \"Reaction state\", STATUS_VALUES, STATUS_VALUES[0]);\n\n addLabel(\"\");\n addPrimerSelectionOption(PRIMER_OPTION_ID, \"Forward Primer\", DocumentSelectionOption.FolderOrDocuments.EMPTY, false, Collections.<AnnotatedPluginDocument>emptyList());\n addPrimerSelectionOption(PRIMER_REVERSE_OPTION_ID, \"Reverse Primer\", DocumentSelectionOption.FolderOrDocuments.EMPTY, false, Collections.<AnnotatedPluginDocument>emptyList());\n addPrimersButton = addButtonOption(ADD_PRIMER_TO_LOCAL_ID, \"\", \"Add primers to my local database\");\n\n\n List<OptionValue> cocktails = getCocktails();\n\n cocktailOption = addComboBoxOption(COCKTAIL_OPTION_ID, \"Reaction Cocktail\", cocktails, cocktails.get(0));\n\n updateCocktailOption(cocktailOption);\n\n cocktailButton = new ButtonOption(COCKTAIL_BUTTON_ID, \"\", \"Edit Cocktails\");\n cocktailButton.setSpanningComponent(true);\n addCustomOption(cocktailButton);\n Options.OptionValue[] cleanupValues = new OptionValue[] {new OptionValue(\"true\", \"Yes\"), new OptionValue(\"false\", \"No\")};\n ComboBoxOption cleanupOption = addComboBoxOption(\"cleanupPerformed\", \"Cleanup performed\", cleanupValues, cleanupValues[1]);\n StringOption cleanupMethodOption = addStringOption(\"cleanupMethod\", \"Cleanup method\", \"\");\n cleanupMethodOption.setDisabledValue(\"\");\n addStringOption(\"technician\", \"Technician\", \"\", \"May be blank\");\n cleanupOption.addDependent(cleanupMethodOption, cleanupValues[0]);\n TextAreaOption notes = new TextAreaOption(\"notes\", \"Notes\", \"\");\n addCustomOption(notes);\n\n labelOption = new LabelOption(LABEL_OPTION_ID, \"Total Volume of Reaction: 0uL\");\n addCustomOption(labelOption);\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n this.valuesLabels = new Label[]{strengthValue1, toughnessValue1, movementValue1, martialValue1, rangedValue1, defenseValue1, disciplineValue1, willpowerValue1, commandValue1, woundsValue1, attacksValue1, sizeValue1, mTValue1, rTValue1, moraleValue1};\r\n\r\n if (!DatabaseHolder.isModyfyinfg) {\r\n DatabaseHolder.holdSpecies.setAge(1);\r\n DatabaseHolder.holdCulture.setAge(1);\r\n }\r\n createSpecies();\r\n switch (DatabaseHolder.holdSpecies.getLifedomain()) {\r\n case Humanoid:\r\n primaryChooser.setVisible(false);\r\n secondaryChooser.setVisible(false);\r\n primaryChooserText.setVisible(false);\r\n secondaryChooserText.setVisible(false);\r\n outcastsCheckbox.setVisible(false);\r\n break;\r\n case Fey:\r\n primaryChooser.setVisible(true);\r\n primaryChooser.setItems(FXCollections.observableArrayList(PrimaryChooserValue.Light.getText(), PrimaryChooserValue.Darkness.getText(), PrimaryChooserValue.Twilight.getText()));\r\n primaryChooser.getSelectionModel().select(0);\r\n secondaryChooser.setVisible(false);\r\n secondaryChooser.setItems(FXCollections.observableArrayList(SecondaryChooserValue.Light.getText(), SecondaryChooserValue.Darkness.getText()));\r\n secondaryChooser.getSelectionModel().select(0);\r\n primaryChooserText.setVisible(true);\r\n primaryChooserText.setText(\"Path\");\r\n secondaryChooserText.setVisible(false);\r\n secondaryChooserText.setText(\"Sphere\");\r\n outcastsCheckbox.setVisible(true);\r\n DatabaseHolder.outcasts = false;\r\n break;\r\n case Reptilia:\r\n primaryChooser.setVisible(false);\r\n secondaryChooser.setVisible(false);\r\n primaryChooserText.setVisible(false);\r\n secondaryChooserText.setVisible(false);\r\n outcastsCheckbox.setVisible(false);\r\n break;\r\n case Biest:\r\n primaryChooser.setVisible(true);\r\n primaryChooser.setItems(FXCollections.observableArrayList(PrimaryChooserValue.NONE.getText(), PrimaryChooserValue.Ursidae.getText(), PrimaryChooserValue.CanusLupis.getText(), PrimaryChooserValue.AvianAves.getText(), PrimaryChooserValue.Bor.getText(), PrimaryChooserValue.Ovis.getText(), PrimaryChooserValue.Taurus.getText(), PrimaryChooserValue.Feline.getText(), PrimaryChooserValue.Vermin.getText(), PrimaryChooserValue.Caballis.getText(), PrimaryChooserValue.Ichthyes.getText()));\r\n primaryChooser.getSelectionModel().select(0);\r\n secondaryChooser.setVisible(true);\r\n secondaryChooser.setItems(FXCollections.observableArrayList(SecondaryChooserValue.Caverns.getText(), SecondaryChooserValue.Desert.getText(), SecondaryChooserValue.Forests.getText(), SecondaryChooserValue.Marsh.getText(), SecondaryChooserValue.Mountains.getText(), SecondaryChooserValue.Moon.getText(), SecondaryChooserValue.Oceans.getText(), SecondaryChooserValue.Plains.getText(), SecondaryChooserValue.Sky.getText(), SecondaryChooserValue.Tundra.getText()));\r\n secondaryChooser.getSelectionModel().select(0);\r\n primaryChooserText.setVisible(true);\r\n primaryChooserText.setText(\"Kingdom\");\r\n secondaryChooserText.setVisible(true);\r\n secondaryChooserText.setText(\"Region\");\r\n outcastsCheckbox.setVisible(false);\r\n break;\r\n case Insecta:\r\n primaryChooser.setVisible(true);\r\n primaryChooser.setItems(FXCollections.observableArrayList(PrimaryChooserValue.NONE.getText(), PrimaryChooserValue.Arachnea.getText(), PrimaryChooserValue.Crustacea.getText(), PrimaryChooserValue.Insecta.getText(), PrimaryChooserValue.Myriapoda.getText()));\r\n primaryChooser.getSelectionModel().select(0);\r\n secondaryChooser.setVisible(false);\r\n secondaryChooser.setItems(FXCollections.observableArrayList(SecondaryChooserValue.NONE.getText(), SecondaryChooserValue.Arachnid.getText(), SecondaryChooserValue.Scorpionoid.getText(), SecondaryChooserValue.Decapod.getText(), SecondaryChooserValue.Isopod.getText(), SecondaryChooserValue.Coleoptera.getText(), SecondaryChooserValue.Dipteran.getText(), SecondaryChooserValue.Formicadae.getText(), SecondaryChooserValue.Mantid.getText(), SecondaryChooserValue.Vespidae.getText(), SecondaryChooserValue.Centipedea.getText(), SecondaryChooserValue.Millipedea.getText()));\r\n secondaryChooser.getSelectionModel().select(0);\r\n primaryChooserText.setVisible(true);\r\n primaryChooserText.setText(\"Classification\");\r\n secondaryChooserText.setVisible(false);\r\n secondaryChooserText.setText(\"Order\");\r\n outcastsCheckbox.setVisible(false);\r\n break;\r\n }\r\n simplifyToCoreSkills = false;\r\n }", "public ChoiceQuestion() {\n m_choices = new ArrayList<>();\n }", "public void initialize() \n\t{\n\t\tObservableList<TipoProyeccion> observableTipoProyeccion = \n\t\t\t\tFXCollections.observableArrayList(TipoProyeccion.values());\n\t\t//Amarro el observable list con el ChoiceBox\n\t\tchbTipoProyeccion.setItems(observableTipoProyeccion);\n\t\t\n\t\tList<Cine.Sala> listaSalasNoObservables = Context.getInstance().getCine().getListaSalas();\n\t\tObservableList<Cine.Sala> listaObservableSalas = FXCollections.observableArrayList(listaSalasNoObservables);\n\t\t\n\t\tchbSala.setItems(listaObservableSalas);\n\t\t\n\t\t/*SpinnerValueFactory<Integer> spnValueFactoryInteger = \n\t\t\t\tnew IntegerSpinnerValueFactory(1,10,1);\n\t\tspnSala.setValueFactory(spnValueFactoryInteger);\n\t\t*/\n\t\t\n\t\t//Creo un metodo falso para cargar peliculas (hasta mientras).\n\t\t//cargarPeliculas();\n\t\t\n\t\t//Ahora si cargo las peliculas de verdad ingresadas \n\t\t//por medio de la vista viewPelicula\n\t\tObservableList<Pelicula> listaObservablePeliculas = \n\t\t\t\tFXCollections.observableArrayList(Context.getInstance().getListaPeliculas());\n\t\tchbPelicula.setItems(listaObservablePeliculas);\n\t\t\n\t\t//Metodo para inicializar hora con valores max y min. \n\t\t//Luego amarro propiedad de texto de label a propiedad valor del Slider.\n\t\tinicializarHora();\n\t\t\n\t\tinicializarMinutos();\n\t\t\n\t\tdateProyeccion.setValue(LocalDate.now());\n\t}", "private void init(Bundle savedInstanceState) {\n selectedOption = SelectedOption.getInstance();\r\n }", "public void initialize(URL url, ResourceBundle rb) {\r\n \r\n choiceBoxLabel.setText(\"\");\r\n //choiceBox.getItems().add(\"salut\");\r\n try {\r\n PreparedStatement pt = c.prepareStatement(\"select * from service\");\r\n ResultSet rs = pt.executeQuery();\r\n while (rs.next()) {\r\n comboBox_service.getItems().add(rs.getString(2));\r\n } } catch (SQLException ex) {\r\n Logger.getLogger(service.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n // choiceBox_service.setValue(choiceBox_service.getValue());\r\n \r\n //comboBox_listRdv();\r\n listRdvReserved();\r\n \r\n \r\n }", "public static void chsrInit(){\n for(int i = 0; i < chsrDesc.length; i++){\n chsr.addOption(chsrDesc[i], chsrNum[i]);\n }\n chsr.setDefaultOption(chsrDesc[2] + \" (Default)\", chsrNum[2]); //Default MUST have a different name\n SmartDashboard.putData(\"JS/Choice\", chsr);\n SmartDashboard.putString(\"JS/Choosen\", chsrDesc[chsr.getSelected()]); //Put selected on sdb\n }", "@Override\r\n public void initialize(URL url, ResourceBundle resourceBundle) {\n trig_combo.getItems().addAll(\"SIN\",\"COS\",\"TAN\");\r\n \r\n //Selecting SIN as Initial Value\r\n trig_combo.setValue(\"SIN\");\r\n \r\n //adding number list up to 20 (20!)\r\n power_combo.getItems().addAll(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);\r\n \r\n //Disabling Power field at Starting\r\n power_combo.setDisable(true);\r\n power_combo.setOpacity(.5);\r\n \r\n //Initial message as Instruction\r\n type.setTextFill(Color.DARKCYAN);\r\n type.setText(\"Angle Multiple and Power are only applicable to the First Angle\");\r\n }", "private void initialize(){\n options[0] = R.id.radio1;\n options[1] = R.id.radio2;\n options[2] = R.id.radio3;\n options[3] = R.id.radio4;\n }", "private void initiateChoiceButtons() {\n\t\trock = new JButton(\"Rock\");\n\t\trock.setPreferredSize(selectionButtonSize);\n\t\tpaper = new JButton(\"Paper\");\n\t\tpaper.setPreferredSize(selectionButtonSize);\n\t\tscissors = new JButton(\"Scissors\");\n\t\tscissors.setPreferredSize(selectionButtonSize);\n\n\t\taddButtonListener();\n\t}", "private void initChildren() {\n vbox = new Vbox();\n chkUseRawName = new Checkbox(\"Use the scientific names supplied with the records\");\n chkUseRawName.setChecked(false);\n\n chkUseRawName.addEventListener(\"onCheck\", new EventListener() {\n\n @Override\n public void onEvent(Event event) throws Exception {\n onCheck$chkUseRawName(event);\n }\n });\n autoComplete = new SpeciesAutoComplete();\n autoComplete.setAutodrop(true);\n autoComplete.setWidth(\"330px\");\n autoComplete.addEventListener(\"onChange\", new EventListener() {\n\n @Override\n public void onEvent(Event event) throws Exception {\n autoCompleteSelectionChanged(event);\n }\n\n });\n\n vbox.appendChild(chkUseRawName);\n vbox.appendChild(autoComplete);\n\n }", "@Override\n public void initialize (URL fxmlFileLocation, ResourceBundle resources) {\n conditionsList = new ArrayList<>();\n try {\n conditionsList = Arrays.asList(ClassGrabber.getClasses(\"gamedata.events.conditions\"));\n }\n catch (ClassNotFoundException e) {\n ErrorPopUp myError = new ErrorPopUp(e.toString());\n myError.show();\n }\n catch (IOException e) {\n ErrorPopUp myError = new ErrorPopUp(e.toString());\n myError.show();\n }\n\n List<String> displayList = new ArrayList<>();\n for (Class<?> c : conditionsList) {\n displayList.add(c.toString());\n }\n displayList = trimClassList(displayList);\n\n conditionChoiceBox.getItems().addAll(displayList);\n\n conditionChoiceBox.getSelectionModel().selectedItemProperty()\n .addListener(\n (observable, oldValue, selectedType) -> showConditionEditorPane());\n }", "public GenericOptionChoice() {\n // your code here\n\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n localConf = JCineFX.leerConf();\n fillUserData();\n userMenuItem.setText(localConf.getUsuarioActual());\n if( JCineFX.getCurrentUser().getUsername().equals(\"guest\") )\n disableInput();\n } catch (Exception ex) {\n System.out.println(ex);\n }\n SalaBuilder.fillSalaChoices(salasChoice, new ArrayList<String>());\n salasChoice.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {\n\n @Override\n public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {\n loadHorarios();\n System.out.println(\"Salachoice changed \" + t1);\n }\n });\n }", "private void initializeComboboxes() {\n ObservableList<Integer> options = FXCollections.observableArrayList(vertexesCurrentlyOnScreen);\n startingVertex = new ComboBox<>(options);\n finalVertex = new ComboBox<>(options);\n startingVertex.setBorder((new Border(new BorderStroke(Color.LIGHTGRAY, BorderStrokeStyle.SOLID, new CornerRadii(2), new BorderWidths(1.5)))));\n finalVertex.setBorder(new Border(new BorderStroke(Color.LIGHTGRAY, BorderStrokeStyle.SOLID, new CornerRadii(2), new BorderWidths(1.5))));\n }", "public void init(){\r\n \r\n\t\tcheckBox1 = new Checkbox(\"Akhash\", true);\r\n \r\n\t\t/*\r\n\t\t * Set Checkbox caption or label using\r\n\t\t * void setLabel(String text)\r\n\t\t * method of AWT Checkbox class.\r\n\t\t */\r\n \r\n\t\tcheckBox1.setLabel(\"My Checkbox 1\");\r\n \r\n\t\t/*\r\n\t\t * To create checkbox with the caption use\r\n\t\t * CheckBox(String text) constructor of\r\n\t\t * AWT Checkbox class.\r\n\t\t */\r\n \r\n\t\tcheckBox2 = new Checkbox(\"Suresh\", true);\r\n \r\n\t\t//add checkboxes using add method\r\n\t\tadd(checkBox1);\r\n\t\tadd(checkBox2);\r\n\t}", "public Choose1() {\n initComponents();\n }", "public void init() {\n\t\tframe = new JFrame(\"Find the Capital City\");\n\t\tcountryLabel = new JLabel(\"Country:\");\n\t\tcapitalLabel = new JLabel(\"Capital City:\");\n\t\tcountryBox = new JComboBox<>(CountryUtil.COUNTRY_LIST);\n\t\tcapitalBox = new JTextField();\n\t\t\n\t\tcountryBox.addActionListener(new MyActionListener());\n\t\tcapitalBox.setEditable(false);\n\t\tcountryLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\tcapitalLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t\n\t\tframe.setLayout(new GridLayout(2, 2));\n\t\tframe.add(countryLabel);\n\t\tframe.add(countryBox);\n\t\tframe.add(capitalLabel);\n\t\tframe.add(capitalBox);\n\t\t\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(350, 100);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}", "@PostConstruct\r\n private void init() {\n this.ccTypes = new ArrayList<SelectItem>();\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_A, getCCTypeLabel(CreditCardType.CARD_A)));\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_B, getCCTypeLabel(CreditCardType.CARD_B)));\r\n\r\n // Initialize categories select items\r\n this.categories = new ArrayList<SelectItem>();\r\n this.categories.add(new SelectItem(\"cat_it\", getCategoryLabel(\"cat_it\")));\r\n this.categories.add(new SelectItem(\"cat_gr\", getCategoryLabel(\"cat_gr\")));\r\n this.categories.add(new SelectItem(\"cat_at\", getCategoryLabel(\"cat_at\")));\r\n this.categories.add(new SelectItem(\"cat_mx\", getCategoryLabel(\"cat_mx\")));\r\n }", "@Override\r\n\tpublic void initialize(java.net.URL arg0, ResourceBundle arg1) {\n\t\ttequ_profile_menu_btn.setText(main.login.getName());\r\n\t\tdc = new DbConnection();\r\n\t\ttry {\r\n\t\t\tConnection conn = dc.Connect();\r\n\t\t\t// Execute query and store result in a resultset\r\n\t\t\tResultSet rs = conn.createStatement().executeQuery(\"SELECT * FROM quiz_questions where subject ='\"+main.quizName+\"' and question_id='\"+main.quizId+\"'\");\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tteacher_createquiz_createbtn.setDisable(true);\r\n\t\t\t\ttxtbx_teacher_createquiz_quiztitle.setText(main.quizName);\r\n\t\t\t\ttxtbx_teacher_createquiz_quiztitle.setDisable(true);\r\n\t\t\t\tString type = rs.getString(5);\r\n\t\t\t\tif(type.equals(\"0\")){\r\n\t\t\t\t\tvbox_teacher_qnwrap_mcq.setVisible(true);\r\n\t\t\t\t\ttxtfield_createquiz_mcq.setText(rs.getString(4));\r\n\t\t\t\t\ttxtfield_createquiz_mcq1.setText(rs.getString(6));;\r\n\t\t\t\t\ttxtfield_createquiz_mcq2.setText(rs.getString(7));;\r\n\t\t\t\t\ttxtfield_createquiz_mcq3.setText(rs.getString(8));;\r\n\t\t\t\t\ttxtfield_createquiz_mcq4.setText(rs.getString(9));;\r\n\t\t\t\t\ttxtbx_createquiz_mcq_marks.setText(rs.getString(11));;\r\n\t\t\t\t\tString ans = rs.getString(10);\r\n\t\t\t\t\tif(ans.contains(\"1\"))\r\n\t\t\t\t\t\tcb1_createquiz.setSelected(true);\r\n\t\t\t\t\tif(ans.contains(\"2\"))\r\n\t\t\t\t\t\tcb2_createquiz.setSelected(true);\r\n\t\t\t\t\tif(ans.contains(\"3\"))\r\n\t\t\t\t\t\tcb3_createquiz.setSelected(true);\r\n\t\t\t\t\tif(ans.contains(\"4\"))\r\n\t\t\t\t\t\tcb4_createquiz.setSelected(true);\r\n\t\t\t\t}\r\n\t\t\t\tif(type.equals(\"1\")){\r\n\t\t\t\t\tvbox_teacher_qnwrap_tf.setVisible(true);\r\n\t\t\t\t\ttxtfield_createquiz_tf.setText(rs.getString(4));\r\n\t\t\t\t\ttxtbx_createquiz_tf_marks.setText(rs.getString(11));;\r\n\t\t\t\t\tString ans = rs.getString(10);\r\n\t\t\t\t\tif(ans.contains(\"1\"))\r\n\t\t\t\t\t\ttxtfield_createquiz_tf_1.setSelected(true);\r\n\t\t\t\t\tif(ans.contains(\"2\"))\r\n\t\t\t\t\t\ttxtfield_createquiz_tf_2.setSelected(true);\r\n\t\t\t\t}\r\n\t\t\t\tif(type.equals(\"2\")){\r\n\t\t\t\t\tvbox_teacher_qnwrap_sa.setVisible(true);\r\n\t\t\t\t\ttxtfield_createquiz_sa.setText(rs.getString(4));\r\n\t\t\t\t\ttxtfield_createquiz_saAns.setText(rs.getString(10));\r\n\t\t\t\t\ttxtbx_createquiz_sa_marks.setText(rs.getString(11));;\r\n\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tSystem.err.println(\"Error\"+ex);\r\n\t\t}\r\n\r\n\t\ttequ_logout.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tParent parent = FXMLLoader.load(getClass().getResource(\"/View/login.fxml\"));\r\n\t\t\t\t\tparent.getStylesheets().add(\"View/application.css\");\r\n\r\n\t\t\t\t\tScene scence = new Scene(parent);\r\n\t\t\t\t\t//Stage stage = (Stage) createQ.getScene().getWindow();\r\n\t\t\t\t\tmain.pStage.setScene(scence);\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t \t/* System.out.println(\"?!?!?!\");*/\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\ttequ_homeBtn.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tParent parent = FXMLLoader.load(getClass().getResource(\"/View/teacherViewQuiz.fxml\"));\r\n\t\t\t\t\tparent.getStylesheets().add(\"View/application.css\");\r\n\r\n\t\t\t\t\tScene scence = new Scene(parent);\r\n\t\t\t\t\t//Stage stage = (Stage) createQ.getScene().getWindow();\r\n\t\t\t\t\tmain.pStage.setScene(scence);\r\n\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t \t/* System.out.println(\"?!?!?!\");*/\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle resourceBundle) {\n //add the possible postures\n postureSelect.getItems().addAll(\"Stand\", \"StandInit\", \"StandZero\", \"Crouch\", \"Sit\", \"SitRelax\", \"LyingBelly\", \"LyingBack\");\n\n //because the prompt text from a ComboBox is deleted after selected something,\n // and if you clear the selection the text also won't come back,\n // I copied a Listener from StackOverFlow\n postureSelect.setPromptText(\"Select a posture\");\n postureSelect.setButtonCell(new PromptButtonCell<>(\"Select a posture\"));\n }", "private void initialize() {\n\t\tjLabel3 = new JLabel();\n\t\tjLabel = new JLabel();\n\t\tthis.setLayout(null);\n\t\tthis.setBounds(new java.awt.Rectangle(0, 0, 486, 377));\n\t\tjLabel.setText(PluginServices.getText(this,\n\t\t\t\t\"Areas_de_influencia._Introduccion_de_datos\") + \":\");\n\t\tjLabel.setBounds(5, 20, 343, 21);\n\t\tjLabel3.setText(PluginServices.getText(this, \"Cobertura_de_entrada\")\n\t\t\t\t+ \":\");\n\t\tjLabel3.setBounds(6, 63, 190, 21);\n\t\tthis.add(jLabel, null);\n\t\tthis.add(jLabel3, null);\n\t\tthis.add(getLayersComboBox(), null);\n\t\tthis.add(getSelectedOnlyCheckBox(), null);\n\t\tthis.add(getMethodSelectionPanel(), null);\n\t\tthis.add(getResultSelectionPanel(), null);\n\t\tthis.add(getExtendedOptionsPanel(), null);\n\t\tconfButtonGroup();\n\t\tlayersComboBox.setSelectedIndex(0);\n\t\tinitSelectedItemsJCheckBox();\n\t\tdistanceBufferRadioButton.setSelected(true);\n\t\tlayerFieldsComboBox.setEnabled(false);\n\t\tverifyTypeBufferComboEnabled();\n\t}", "@FXML\n\tprivate void initialize() {\n\t\tlistNomType = FXCollections.observableArrayList();\n\t\tlistIdType=new ArrayList<Integer>();\n\t\ttry {\n\t\t\tfor (Type type : typeDAO.recupererAllType()) {\n listNomType.add(type.getNomTypeString());\n listIdType.add(type.getIdType());\n }\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tcomboboxtype.setItems(listNomType);\n\n\t}", "private ComboBox<String> languageChoices(EventHandler<ActionEvent> splashScreenComboBoxEvent) {\n\t\tComboBox<String> comboBox = new ComboBox<String>();\n\t\tList<String> languages = loadLanguages();\n\t\tcomboBox.setPrefWidth(200);\n\t\tcomboBox.getItems().addAll(languages);\n\t\tcomboBox.setOnAction(splashScreenComboBoxEvent);\n\t\tcomboBox.setId(\"languageBox\");\n\t\t\n\t\tcomboBox.valueProperty().addListener(e -> {\n\t\t\tif(comboBox.getValue() == \"\") {\n\t\t\t\tcontinueButton.setDisable(true);\n\t\t\t} else {\n\t\t\t\tcontinueButton.setDisable(false);\n\t\t\t}\n\t\t});\n\t\treturn comboBox;\n\t}", "private void initialize() {\n\t\tfrmRandomEvaluation = new JFrame();\n\t\tfrmRandomEvaluation.setTitle(\"Random Evaluation\");\n\t\tfrmRandomEvaluation.setBounds(100, 100, 450, 413);\n\t\tfrmRandomEvaluation.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmRandomEvaluation.getContentPane().setLayout(null);\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBounds(6, 6, 438, 139);\n\t\tfrmRandomEvaluation.getContentPane().add(panel);\n\t\tpanel.setLayout(new GridLayout(0, 2, 0, 0));\n\n\t\tJLabel lblMethod = new JLabel(\"Method\");\n\t\tpanel.add(lblMethod);\n\n\t\tcomboMethod = new JComboBox<Methods>();\n\t\tcomboMethod.setName(\"comboMethod\");\n\t\tcomboMethod.setModel(new DefaultComboBoxModel<Methods>(random.Methods.values()));\n\t\tpanel.add(comboMethod);\n\n\t\tJLabel lblQuantity = new JLabel(\"Quantity\");\n\t\tpanel.add(lblQuantity);\n\n\t\tspnQuantity = new JSpinner();\n\t\tpanel.add(spnQuantity);\n\t\tspnQuantity.setValue(100);\n\n\t\tJLabel lblFrom = new JLabel(\"From\");\n\t\tpanel.add(lblFrom);\n\n\t\tspnFrom = new JSpinner();\n\t\tpanel.add(spnFrom);\n\n\t\tJLabel lblTo = new JLabel(\"To\");\n\t\tpanel.add(lblTo);\n\n\t\tspnTo = new JSpinner();\n\t\tspnTo.setValue(1000);\n\t\tpanel.add(spnTo);\n\n\t\tJLabel lblDuplicatesAreAllowed = new JLabel(\"Duplicates are allowed\");\n\t\tpanel.add(lblDuplicatesAreAllowed);\n\n\t\tcomboDuplicate = new JComboBox<Duplicate>();\n\t\tcomboDuplicate.setName(\"comboDuplicate\");\n\t\tcomboDuplicate.setModel(new DefaultComboBoxModel<Duplicate>(random.Duplicate.values()));\n\t\tpanel.add(comboDuplicate);\n\n\t\tJLabel lblGeneratedNumbers = new JLabel(\"Generated numbers\");\n\t\tlblGeneratedNumbers.setBounds(6, 157, 138, 16);\n\t\tfrmRandomEvaluation.getContentPane().add(lblGeneratedNumbers);\n\n\t\tlist = new JList<String>();\n\t\tlist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tJScrollPane scrollPane = new JScrollPane(list);\n\t\tscrollPane.setBounds(6, 185, 172, 196);\n\t\tfrmRandomEvaluation.add(scrollPane);\n\n\t\tJLabel lblStatistics = new JLabel(\"Statistics\");\n\t\tlblStatistics.setBounds(190, 157, 61, 16);\n\t\tfrmRandomEvaluation.getContentPane().add(lblStatistics);\n\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setBounds(190, 186, 254, 33);\n\t\tfrmRandomEvaluation.getContentPane().add(panel_1);\n\t\tpanel_1.setLayout(new GridLayout(0, 3, 0, 0));\n\n\t\tJLabel lblDup = new JLabel(\"Duplicates\");\n\t\tpanel_1.add(lblDup);\n\n\t\tlblDuplicates = new JLabel(\"duplicates\");\n\t\tlblDuplicates.setText(\"-\");\n\t\tpanel_1.add(lblDuplicates);\n\n\t\tlblPercduplicates = new JLabel(\"percDuplicates\");\n\t\tlblPercduplicates.setText(\"-%\");\n\t\tpanel_1.add(lblPercduplicates);\n\n\t\ttableReincidence = new JTable();\n\t\tJScrollPane scrollTable = new JScrollPane(tableReincidence);\n\t\tscrollTable.setBounds(190, 231, 254, 150);\n\t\tfrmRandomEvaluation.getContentPane().add(scrollTable);\n\n\t\tJButton btnRun = new JButton(\"Run\");\n\t\tbtnRun.setAction(runButton);\n\t\tbtnRun.setBounds(327, 152, 117, 29);\n\t\tfrmRandomEvaluation.getContentPane().add(btnRun);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(500, 100, 720, 480);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane ().setLayout(null);\n\t\tFont newFont = new Font(\"Tohama\", Font.PLAIN, 20);\n\t\tFont newFont2 = new Font(\"Tohama\", Font.BOLD, 14);\n\n\t\t//***************\n\t\tJRadioButton rdbtnNewRadioButton_1 = new JRadioButton(\"Dog\");\n\t\trdbtnNewRadioButton_1.setBounds(112, 236, 155, 29);\n\t\tframe.getContentPane().add(rdbtnNewRadioButton_1);\n\t\trdbtnNewRadioButton_1.setFont(newFont2);\n \tJComboBox<String> comboBox3 = new JComboBox<String>();\n \tcomboBox3.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n \tcomboBox3.setRenderer(new MyComboBoxRenderer(\" Is Domesticated \"));\n comboBox3.setForeground(Color.BLACK);\n comboBox3.setBounds(112, 320, 155, 29);\n\t\tcomboBox3.addItem(\" Yes \");\n\t\tcomboBox3.addItem(\" No \");\n\t\tcomboBox3.setSelectedItem(null);\n\t\tframe.getContentPane().add(comboBox3);\n\t\tcomboBox3.setFont(newFont2);\n \tJComboBox<String> comboBox2 = new JComboBox<String>();\n \tcomboBox2.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n comboBox2.setRenderer(new MyComboBoxRenderer(\" guide Dog \"));\n\t\tcomboBox2.setForeground(Color.BLACK);\n\t\tcomboBox2.setBounds(112, 320, 155, 29);\n\t\tcomboBox2.addItem(\" Yes dog \");\n\t\tcomboBox2.addItem(\" No dog\");\n\t\tcomboBox2.setSelectedItem(null);\n\t\tframe.getContentPane().add(comboBox2);\n\t\tcomboBox2.setFont(newFont2);\n\t\tcomboBox2.setVisible(false);\n \tcomboBox3.setVisible(false);\n//***************\n\t\trdbtnNewRadioButton_1.addActionListener(new ActionListener() {\n\t @Override\n\t public void actionPerformed(ActionEvent e) {\n\t \tcomboBox3.setVisible(false);\n\t \tcomboBox2.setVisible(true);\n\t \t\tcomboBox2.setSelectedItem(null);\n\n\t }\n\t });\n\t\t\n\t\tJRadioButton rdbtnNewRadioButton_1_1 = new JRadioButton(\"Cat\");\n\t\trdbtnNewRadioButton_1_1.setBounds(112, 273, 155, 29);\n\t\tframe.getContentPane().add(rdbtnNewRadioButton_1_1);\n\t\trdbtnNewRadioButton_1_1.setFont(newFont2);\n\t\trdbtnNewRadioButton_1_1.addActionListener(new ActionListener() {\n\t @Override\n\t public void actionPerformed(ActionEvent e) {\n\t \tcomboBox2.setVisible(false);\n\t \tcomboBox3.setVisible(true);\n\t \t\tcomboBox3.setSelectedItem(null);\n\n\t }\n\t });\n\t\t\n\t\tButtonGroup bgroup = new ButtonGroup();\n bgroup.add(rdbtnNewRadioButton_1);\n bgroup.add(rdbtnNewRadioButton_1_1);\n\t\t\n\t\tJCheckBox chckbxNewCheckBox = new JCheckBox(\"0-2\");\n\t\tchckbxNewCheckBox.setBounds(484, 236, 66, 29);\n\t\tframe.getContentPane().add(chckbxNewCheckBox);\n\t\tchckbxNewCheckBox.setFont(newFont2);\t\n\n\t\t\n\t\tJCheckBox chckbxNewCheckBox_1 = new JCheckBox(\"3-6\");\n\t\tchckbxNewCheckBox_1.setBounds(484, 273, 66, 29);\n\t\tframe.getContentPane().add(chckbxNewCheckBox_1);\n\t\tchckbxNewCheckBox_1.setFont(newFont2);\t\n\n\t\t\n\t\tJCheckBox chckbxNewCheckBox_2 = new JCheckBox(\"7+\");\n\t\tchckbxNewCheckBox_2.setBounds(484, 310, 66, 29);\n\t\tframe.getContentPane().add(chckbxNewCheckBox_2);\n\t\tchckbxNewCheckBox_2.setFont(newFont2);\t\n\n\t\t\n\t\ttxtAges = new JTextField();\n\t\ttxtAges.setText(\" Age\");\n\t\ttxtAges.setBounds(466, 198, 84, 26);\n\t\tframe.getContentPane().add(txtAges);\n\t\ttxtAges.setColumns(10);\n\t\ttxtAges.setFont(newFont);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBounds(144, 42, 286, 113);\n\t\tpanel.setLayout(null);\n\n\t\tframe.getContentPane().add(panel);\n\t\t\n\t\tJComboBox<String> comboBox = new JComboBox<String>();\n\t\tpanel.add(comboBox);\n\t\tcomboBox.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n\t\tcomboBox.setRenderer(new MyComboBoxRenderer(\" GENDER \"));\n\t\tcomboBox.setForeground(Color.BLACK);\n\t\tcomboBox.addItem(\" Male \");\n\t\tcomboBox.addItem(\" Female \");\n\t\t\n\t\tcomboBox.setSelectedItem(null);\n\t\tcomboBox.setFont(newFont);\t\n\t\t\n\t\ttxtType = new JTextField();\n\t\ttxtType.setBounds(46, 66, 84, 26);\n\t\tpanel.add(txtType);\n\t\ttxtType.setText(\" Type\");\n\t\ttxtType.setColumns(10);\n\t\ttxtType.setFont(newFont);\n\t\t\n\t\t\n\t}", "private void initialize()\n {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(549,426));\n this.add(getComboBox(), com.ulcjava.base.application.ULCBorderLayoutPane.NORTH);\n }", "@FXML\r\n private void initialize() {\n this.departureBox.setItems(TRAIN.cityNamesLIST()); //setting the arraylist: departureList as a parameter for the departureBox\r\n departureBox.setValue(\"la\");\r\n arrivalsBox.setItems(TRAIN.cityNamesLIST()); //setting the arraylist: arrivalsList as a parameter for the departureBox\r\n arrivalsBox.setValue(\"ar\");\r\n }", "@FXML\n public void initialize()\n {\n randomlyChooseWord();\n setHangmanWord();\n\n hangmanShapes[0] = hangman1;\n hangmanShapes[1] = hangman2;\n hangmanShapes[2] = hangman3;\n hangmanShapes[3] = hangman4;\n hangmanShapes[4] = hangman5;\n hangmanShapes[5] = hangman6;\n hangmanShapes[6] = hangman7;\n hangmanShapes[7] = hangman8;\n hangmanShapes[8] = hangman9;\n hangmanShapes[9] = hangman10;\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n \n /* for(int i=0;i<60;i++)\n {\n ComboBox CB = (ComboBox) C.lookup\n }*/\n \n QuestionService QS = new QuestionService();\n List<Question> K = new ArrayList<Question>();\n K = QS.SelectQuestion();\n for (Question x : K) {\n if (i < 60) {\n if ((x.getType().getTypeID() == 1) & (type1 <= 3)) {\n Label L = new Label(x.getQuestion());\n ComboBox C = new ComboBox();\n C.getItems().add(x.getReponse1());\n C.getItems().add(x.getReponse2());\n C.getItems().add(x.getReponse3());\n C.setPromptText(\"Pick one below..\");\n C.setId(\"c\" + i);\n System.out.println(C.getId());\n vbox1.getChildren().add(L);\n vbox1.getChildren().add(C);\n \n type1++;\n C.valueProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n if (newValue == x.getReponse1()) {\n ScoreT1 += x.getScoreRep1();\n\n if (oldValue == x.getReponse1()) {\n ScoreT1 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT1 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT1 -= x.getScoreRep2();\n }\n System.out.println(\"S1:\"+ScoreT1);\n } else if (newValue == x.getReponse2()) {\n ScoreT1 += x.getScoreRep2();\n\n if (oldValue == x.getReponse1()) {\n ScoreT1 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT1 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT1 -= x.getScoreRep2();\n }\n System.out.println(\"S1:\"+ScoreT1);\n } else if (newValue == x.getReponse3()) {\n ScoreT1 += x.getScoreRep3();\n\n if (oldValue == x.getReponse1()) {\n ScoreT1 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT1 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT1 -= x.getScoreRep2();\n }\n System.out.println(\"S1:\"+ScoreT1);\n \n }\n \n }\n });\n\n } else if ((x.getType().getTypeID() == 2) & (type2 <= 3)) {\n Label L = new Label(x.getQuestion());\n ComboBox C = new ComboBox();\n \n C.getItems().add(x.getReponse1());\n C.getItems().add(x.getReponse2());\n C.getItems().add(x.getReponse3());\n C.setPromptText(\"Pick one below..\");\n C.setId(\"c\" + i);\n System.out.println(C.getId());\n vbox2.getChildren().add(L);\n vbox2.getChildren().add(C);\n \n type2++;\n C.valueProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n \n if (newValue == x.getReponse1()) {\n ScoreT2 += x.getScoreRep1();\n\n if (oldValue == x.getReponse1()) {\n ScoreT2 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT2 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT2 -= x.getScoreRep2();\n }\n System.out.println(\"S2:\"+ScoreT2);\n } else if (newValue == x.getReponse2()) {\n ScoreT2 += x.getScoreRep2();\n\n if (oldValue == x.getReponse1()) {\n ScoreT2 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT2 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT2 -= x.getScoreRep2();\n }\n System.out.println(\"S2:\"+ScoreT2);\n } else if (newValue == x.getReponse3()) {\n ScoreT2 += x.getScoreRep3();\n\n if (oldValue == x.getReponse1()) {\n ScoreT2 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT2 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT2 -= x.getScoreRep2();\n }\n System.out.println(\"S2:\"+ScoreT2);\n \n }\n }\n });\n } else if ((x.getType().getTypeID() == 3) & (type3 <= 3)) {\n Label L = new Label(x.getQuestion());\n ComboBox C = new ComboBox();\n \n C.getItems().add(x.getReponse1());\n C.getItems().add(x.getReponse2());\n C.getItems().add(x.getReponse3());\n C.setPromptText(\"Pick one below..\");\n C.setId(\"c\" + i);\n System.out.println(C.getId());\n vbox3.getChildren().add(L);\n vbox3.getChildren().add(C);\n \n type3++;\n C.valueProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n \n if (newValue == x.getReponse1()) {\n ScoreT3 += x.getScoreRep1();\n\n if (oldValue == x.getReponse1()) {\n ScoreT3 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT3 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT3 -= x.getScoreRep2();\n }\n System.out.println(\"S3:\"+ScoreT3);\n } else if (newValue == x.getReponse2()) {\n ScoreT3 += x.getScoreRep2();\n\n if (oldValue == x.getReponse1()) {\n ScoreT3 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT3 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT3 -= x.getScoreRep2();\n }\n System.out.println(\"S3:\"+ScoreT3);\n } else if (newValue == x.getReponse3()) {\n ScoreT3 += x.getScoreRep3();\n\n if (oldValue == x.getReponse1()) {\n ScoreT3 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT3 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT3 -= x.getScoreRep2();\n }\n System.out.println(\"S3:\"+ScoreT3);\n \n }\n \n \n }\n });\n\n } else if ((x.getType().getTypeID() == 4) & (type4 <= 3)) {\n Label L = new Label(x.getQuestion());\n ComboBox C = new ComboBox();\n \n C.getItems().add(x.getReponse1());\n C.getItems().add(x.getReponse2());\n C.getItems().add(x.getReponse3());\n C.setPromptText(\"Pick one below..\");\n C.setId(\"c\" + i);\n System.out.println(C.getId());\n vbox4.getChildren().add(L);\n vbox4.getChildren().add(C);\n \n type4++;\n C.valueProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n \n if (newValue == x.getReponse1()) {\n ScoreT4 += x.getScoreRep1();\n\n if (oldValue == x.getReponse1()) {\n ScoreT4 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT4 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT4 -= x.getScoreRep2();\n }\n System.out.println(\"S4:\"+ScoreT4);\n } else if (newValue == x.getReponse2()) {\n ScoreT4 += x.getScoreRep2();\n\n if (oldValue == x.getReponse1()) {\n ScoreT4 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT4 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT4 -= x.getScoreRep2();\n }\n System.out.println(\"S4:\"+ScoreT4);\n } else if (newValue == x.getReponse3()) {\n ScoreT4 += x.getScoreRep3();\n\n if (oldValue == x.getReponse1()) {\n ScoreT4 -= x.getScoreRep1();\n }\n if (oldValue == x.getReponse3()) {\n ScoreT4 -= x.getScoreRep3();\n }\n if (oldValue == x.getReponse2()) {\n ScoreT4 -= x.getScoreRep2();\n }\n System.out.println(\"S4:\"+ScoreT4);\n \n }\n \n \n }\n\n });\n\n }\n }\n i++;\n \n\n }\n }", "public final void initUI() {\n\t\tsetLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\t\n\t\tJPanel nameChoicePanel = new JPanel();\n\t\tnameChoicePanel.setLayout(new BoxLayout(nameChoicePanel, BoxLayout.Y_AXIS));\n\t\tnameChoicePanel.setName(\"Panel\");\n\t\t\n\t\t// Add instructions for what to do:\n\t\tinstructionLabel = new JLabel(\"Enter your name here:\", JLabel.CENTER);\n\t\tinstructionLabel.setMinimumSize(new Dimension(0, 40));\n\t\tinstructionLabel.setPreferredSize(new Dimension(instructionLabel.getPreferredSize().width, 40));\n\t\tinstructionLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tnameChoicePanel.add(instructionLabel);\n\t\t\n\t\t// Add textfield for user's name\n\t\tnameField = new JTextField(10);\n\t\tnameField.setName(\"textField\");\n\t\tnameField.getDocument().addDocumentListener(this);\n\t\tnameField.setMinimumSize(new Dimension(nameField.getWidth(), 41));\n\t\tnameField.setMaximumSize(new Dimension(250, 41));\n\t\t\n\t\tnameChoicePanel.add(nameField);\n\t\t\n\t\t// Add button\n\t\ttimeToPick = new JButton(\"Pick your team\");\n\t\ttimeToPick.setName(\"Test\");\n\t\ttimeToPick.addActionListener(nameChoiceListener);\n\t\ttimeToPick.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\t\n\t\ttimeToPick.setEnabled(false);\n\t\tnameChoicePanel.add(timeToPick);\n\t\t\n\t\t// Add name choice panel dimensions\n\t\tadd(nameChoicePanel);\n\t\tadd(new Box.Filler(minSize, prefSize, null));\n\t\tnameChoicePanel.setMinimumSize(new Dimension(400,240));\n\t\tnameChoicePanel.setPreferredSize(new Dimension(400,240));\n\t}", "@Override\r\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\t\tpKindChoiceBox.setValue(\"전체\");\r\n\t\tpKindChoiceBox.setItems(productKindList);\r\n\t\tsearchKindComboBox.setItems(searchKindList);\r\n\t\t\r\n\t\tTableColumn<ProductDataModel, Integer> tcP_id = (TableColumn<ProductDataModel, Integer>) rsvListTable.getColumns().get(0);\r\n\t\tTableColumn<ProductDataModel, String> tcKind = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(1);\r\n\t\tTableColumn<ProductDataModel, String> tcTitle = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(2);\r\n\t\tTableColumn<ProductDataModel, String> tcGenre = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(3);\n\t\tTableColumn<ProductDataModel, Integer> tcAgeG = (TableColumn<ProductDataModel, Integer>) rsvListTable.getColumns().get(4);\r\n\t\tTableColumn<ProductDataModel, String> tcRdate = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(5);\r\n\t\tTableColumn<ProductDataModel, String> tcIsrental = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(6);\r\n\t\tTableColumn<ProductDataModel, Integer> tcRentalCnt = (TableColumn<ProductDataModel, Integer>) rsvListTable.getColumns().get(7);\r\n\t\ttcP_id.setCellValueFactory(new PropertyValueFactory<ProductDataModel, Integer>(\"p_id\"));\r\n\t\ttcKind.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"kind\"));\r\n\t\ttcTitle.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"title\"));\r\n\t\ttcGenre.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"genre\"));\n\t\ttcAgeG.setCellValueFactory(new PropertyValueFactory<ProductDataModel, Integer>(\"age_grade\"));\r\n\t\ttcRdate.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"release\"));\r\n\t\ttcIsrental.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"isRental\"));\r\n\t\ttcRentalCnt.setCellValueFactory(new PropertyValueFactory<ProductDataModel, Integer>(\"rentalCnt\"));\r\n\t\t\r\n\t\tpds = db.selectProductDatas();\r\n\t\tfor(ProductDatas pd : pds){\r\n\t\t\tproductList.add(new ProductDataModel(pd));\r\n\t\t}\r\n\t\trsvListTable.setItems(productList);\r\n\t\t\r\n\t}", "private void initDialog() {\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\n Inventory.amountOfParts();\r\n partToggleGroup = new ToggleGroup();\r\n this.inHouseRadioButton.setToggleGroup(partToggleGroup);\r\n this.outsourceRadioButton.setToggleGroup(partToggleGroup);\r\n \r\n // Setting textFields\r\n partName.setPromptText(\"Enter Part Name\");\r\n partInv.setPromptText(\"Enter Inventory Number\");\r\n partPrice.setPromptText(\"Enter Price\");\r\n partMax.setPromptText(\"Max\");\r\n partMin.setPromptText(\"Min\");\r\n companyNameField.setPromptText(\"Company Name\");\r\n \r\n // Displaying the next ID Number\r\n partId = Inventory.partIDCount +1;\r\n addPartID.setText(\"Auto-Generated: \" + partId);\r\n }", "@Override\n public final void init() {\n super.init();\n UIUtils.clearAllFields(upperPane);\n changeStatus(Status.NONE);\n intCombo();\n }", "public void initSinglePlayerChoice() {\n\t\tWorld.clear();\n\t\tWorld.add(new TextStatic(difficultyString, Screen.getCenterX()\n\t\t\t\t- difficultyString.length() * Sprite.CHAR_WIDTH / 2, Screen\n\t\t\t\t.getHeight() * 6 / 8 - Sprite.CHAR_HEIGHT / 2, Color.white));\n\t\tWorld.add(new EasyButton(Screen.getCenterX() - EasyButton.WIDTH / 2,\n\t\t\t\tScreen.getHeight() * 5 / 8 - EasyButton.HEIGHT / 2, this));\n\t\tWorld.add(new MediumButton(Screen.getCenterX() - EasyButton.WIDTH / 2,\n\t\t\t\tScreen.getHeight() * 4 / 8 - EasyButton.HEIGHT / 2, this));\n\t\tWorld.add(new HardButton(Screen.getCenterX() - EasyButton.WIDTH / 2,\n\t\t\t\tScreen.getHeight() * 3 / 8 - EasyButton.HEIGHT / 2, this));\n\t\tWorld.add(new TextStatic(footerText, Screen.getCenterX()\n\t\t\t\t- footerText.length() * Sprite.CHAR_WIDTH / 2,\n\t\t\t\tSprite.CHAR_HEIGHT, Color.yellow));\n\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb)\n {\n txtDuration.setDisable(true);\n txtFile.setDisable(true);\n comboCategoryBox.setItems(FXCollections.observableArrayList(\"Blues\", \"Hip Hop\", \"Pop\", \"Rap\",\n \"Rock\", \"Techno\", \"Other\"));\n comboCategoryBox.setVisibleRowCount(6);\n txtOtherCategory.setVisible(false);\n }", "public void initialize(URL location, ResourceBundle resources)\n {\n initChoiceBoxes();\n gm.setWalls(true);\n for (int i = 0; i < GameModel.SIDE; i++)\n {\n for (int j = 0; j < GameModel.SIDE; j++)\n {\n Rectangle r = new Rectangle(40, 40);\n r.setFill(Color.WHITE);\n r.setStroke(Color.LIGHTGREY);\n gridPaneBoard.add(r, i, j);\n }\n }\n loadStart();\n }", "private void init(){\n\t\t\n\t\tpurchasePrice = (EditText)findViewById(R.id.purchasePrice);\n\t\tpurchasePrice.setFilters(new InputFilter[] { new CurrencyFormatInputFilter()});\n\t\t\n\t\tdownPaymentSpinner = (Spinner)findViewById(R.id.inputTypeSpinner);\n\t\tArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n\t\t\t\tR.array.inputTypes, android.R.layout.simple_spinner_item);\n\t\tadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\tdownPaymentSpinner.setAdapter(adapter);\n\t\t\n\t\tsellerSpinner = (Spinner)findViewById(R.id.inputTypeSpinnerSeller);\n\t\tArrayAdapter<CharSequence> adapter2 = ArrayAdapter.createFromResource(this,\n\t\t\t\tR.array.inputTypes, android.R.layout.simple_spinner_item);\n\t\tadapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\tsellerSpinner.setAdapter(adapter2);\t\n\t}", "public void initialize(){\n addButton.setDisable(true);\n radio2.setDisable(true);\n radio1.setSelected(true);\n radio3.setDisable(true);\n radioGreen.setSelected(true);\n\n addButton.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n Stage stage = (Stage) addButton.getScene().getWindow();\n processResults();\n stage.close();\n }\n });\n\n\n cancelButton.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n Stage stage = (Stage) addButton.getScene().getWindow();\n stage.close();\n }\n });\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 1172, 608);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Medicine Distribution System\");\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 40));\r\n\t\tlblNewLabel.setBounds(267, 25, 639, 82);\r\n\t\tframe.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\tJSeparator separator = new JSeparator();\r\n\t\tseparator.setForeground(Color.BLACK);\r\n\t\tseparator.setBounds(56, 102, 995, 2);\r\n\t\tframe.getContentPane().add(separator);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Types Of Meds\");\r\n\t\tlblNewLabel_1.setFont(new Font(\"Tahoma\", Font.BOLD, 24));\r\n\t\tlblNewLabel_1.setBounds(56, 104, 258, 54);\r\n\t\tframe.getContentPane().add(lblNewLabel_1);\r\n\t\t\r\n\t\tJRadioButton syrup = new JRadioButton(\"Syrup\");\r\n\t\tsyrup.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tsyrup.setBounds(56, 164, 88, 21);\r\n\t\tframe.getContentPane().add(syrup);\r\n\t\t\r\n\t\tJRadioButton capsule = new JRadioButton(\"Capsule\");\r\n\t\tcapsule.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tcapsule.setBounds(166, 164, 103, 21);\r\n\t\tframe.getContentPane().add(capsule);\r\n\t\t\r\n\t\tJRadioButton powder = new JRadioButton(\"Powder\");\r\n\t\tpowder.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tpowder.setBounds(56, 219, 88, 21);\r\n\t\tframe.getContentPane().add(powder);\r\n\t\t\r\n\t\tJComboBox combobox = new JComboBox();\r\n\t\tcombobox.setMaximumRowCount(18);\r\n\t\tcombobox.setFont(new Font(\"Tahoma\", Font.BOLD, 16));\r\n\t\tcombobox.setModel(new DefaultComboBoxModel(new String[] {\"ELECTROL POWER\", \"PANTOCID 40\", \"LIV 52 TAB\", \"LIB 52 SYRUP\", \"SOBILIN SYRUP\", \"DEXORANGE SYRUP\", \"GLYCOMET 500 MG TAB\", \"TELMA 20 TAB\", \"TELMA 40 TAB\", \"PAN 40 TAB\", \"PAN D TAB\", \"OMEZ TAB\", \"NIZE TAB\", \"STAMLO 5 TAB\", \"SINAREST TAB\", \"SINAREST SYP\", \"MMOOV OINT\", \"VOLINI GEL\", \"SORIDON TAB\", \"DISPRIN TAB\", \"NEOSPORIN POWDER\", \"NEOSPORIN OINT\"}));\r\n\t\tcombobox.setBounds(361, 137, 201, 21);\r\n\t\tframe.getContentPane().add(combobox);\r\n\t\t\r\n\t\tJSeparator separator_1 = new JSeparator();\r\n\t\tseparator_1.setForeground(Color.BLACK);\r\n\t\tseparator_1.setBounds(56, 284, 292, 2);\r\n\t\tframe.getContentPane().add(separator_1);\r\n\t\t\r\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Tax\");\r\n\t\tlblNewLabel_2.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\r\n\t\tlblNewLabel_2.setBounds(71, 316, 100, 37);\r\n\t\tframe.getContentPane().add(lblNewLabel_2);\r\n\t\t\r\n\t\ttaxbox = new JTextField();\r\n\t\ttaxbox.setBounds(214, 324, 134, 28);\r\n\t\tframe.getContentPane().add(taxbox);\r\n\t\ttaxbox.setColumns(10);\r\n\t\t\r\n\t\t\r\n//\t\tcreate every column to show in the jpanel\r\n\t\tDefaultTableModel dm = new DefaultTableModel();\r\n\t\ttable = new JTable(dm);\r\n\t\tdm.addColumn(\"syrup\");\r\n\t\tdm.addColumn(\"capsule\");\r\n\t\tdm.addColumn(\"power\");\r\n\t\tdm.addColumn(\"med_name\");\r\n\t\tdm.addColumn(\"tax\");\r\n\t\tdm.addColumn(\"total\");\r\n\t\tdm.addRow(new Object[] {\"syrup\",\"capsule\",\"power\",\"med_name\",\"tax\",\"total\"});\r\n\t\tdm.addRow(new Object[] {\"\",\"\",\"\",\"\",\"\",\"\",\"\"}); \r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"Total\");\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n//\t\t\t\tadd data to the retail table\r\n\t\t\t\ttry {\r\n\t\t\t\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/medic_crud\",\"root\",\"\");\r\n\t\t\t\t\tPreparedStatement ps = conn.prepareStatement(\"insert into retail(syrup,capsule,power,med_name,tax,total) values(?,?,?,?,?,?);\");\t\r\n\t\t\t\t\tif(syrup.isSelected())\r\n\t\t\t\t\t{\t\t\t\t\t\r\n\t\t\t\t\t\tps.setString(1, syrup.getText());\r\n\t\t\t\t\t\tps.setString(2, \"\");\r\n\t\t\t\t\t\tps.setString(3, \"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(capsule.isSelected())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tps.setString(1, \"\");\r\n\t\t\t\t\t\tps.setString(2, capsule.getText());\r\n\t\t\t\t\t\tps.setString(3, \"\");\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(powder.isSelected())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tps.setString(1, \"\");\r\n\t\t\t\t\t\tps.setString(2, \"\");\r\n\t\t\t\t\t\tps.setString(3, powder.getText());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tps.setString(4, combobox.getSelectedItem().toString());\r\n\t\t\t\t\tps.setString(5, taxbox.getText());\r\n\t\t\t\t\tps.setString(6, totalbox.getText());\r\n\r\n\t\t\t\t\tsyrup.requestFocus();\r\n\t\t\t\t\tint x = ps.executeUpdate();\r\n\t\t\t\t\tif(x > 0)\r\n\t\t\t\t\t{\r\n//\t\t\t\t\t\tSystem.out.println(\"data added seccessfully\");\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Record added !!!\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n//\t\t\t\t\t\tthis is display\r\n\t\t\t\t\t\ttry {\r\n//\t\t\t\t\t\t\tClass.forName(\"com.mysql.cj.jdbs.Driver\");\r\n\t\t\t\t\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/medic_crud\",\"root\",\"\");\r\n\t\t\t\t\t\t\tString sql =\"select * from retail\";\r\n\t\t\t\t\t\t\tps = conn.prepareStatement(sql);\t\r\n\t\t\t\t\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t\t\t\t\t//bikas\r\n\t\t\t\t\t\t\tdm.setRowCount(0);\r\n\t\t\t\t\t\t\twhile (rs.next()) {\t\t\t\r\n\t\t\t\t\t\t\t\tdm.addRow(new Object[] {rs.getString(\"syrup\"),rs.getString(\"capsule\"),rs.getString(\"power\"),rs.getString(\"med_name\"),rs.getInt(\"tax\"),rs.getInt(\"total\")});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//end bikas\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e2)\r\n\t\t\t\t\t\t{\r\n//\t\t\t\t\t\t\tSystem.out.println(e1);\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e2);\r\n\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{\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tsyrup.setText(\"\");\r\n//\t\t\t\t\tcapsule.setText(\"\");\r\n//\t\t\t\t\tpowder.setText(\"\");\r\n//\t\t\t\t\tcombobox.setText(\"\");\r\n\t\t\t\t\ttaxbox.setText(\"\");\r\n\t\t\t\t\ttotalbox.setText(\"\");\r\n\t\t\t\t}\r\n\t\t\t\tcatch(Exception e1)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(e1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tbtnNewButton.setBounds(68, 500, 103, 42);\r\n\t\tframe.getContentPane().add(btnNewButton);\r\n\t\t\r\n\t\tJButton btnReset = new JButton(\"Reset\");\r\n\t\tbtnReset.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tbtnReset.setBounds(212, 500, 103, 42);\r\n\t\tframe.getContentPane().add(btnReset);\r\n\t\t\r\n\t\tJButton btnNewButton_1_1 = new JButton(\"Exit\");\r\n\t\tbtnNewButton_1_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tframe = new JFrame(\"Exit\");\r\n\t\t\t\tif(JOptionPane.showConfirmDialog(frame, \"Confirm if you want to exit\", \"Login System\",\r\n\t\t\t\t\tJOptionPane.YES_NO_OPTION)==JOptionPane.YES_NO_OPTION)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t\t{\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\tbtnNewButton_1_1.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tbtnNewButton_1_1.setBounds(1045, 519, 103, 42);\r\n\t\tframe.getContentPane().add(btnNewButton_1_1);\r\n\t\t\r\n//\t\ttable = new JTable();\r\n\t\ttable.setBounds(575, 130, 573, 382);\r\n\t\tframe.getContentPane().add(table);\r\n\t\t\r\n\t\ttotalbox = new JTextField();\r\n\t\ttotalbox.setColumns(10);\r\n\t\ttotalbox.setBounds(214, 407, 134, 28);\r\n\t\tframe.getContentPane().add(totalbox);\r\n\t\t\r\n\t\tJLabel lblNewLabel_2_1 = new JLabel(\"Total\");\r\n\t\tlblNewLabel_2_1.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\r\n\t\tlblNewLabel_2_1.setBounds(68, 399, 103, 37);\r\n\t\tframe.getContentPane().add(lblNewLabel_2_1);\r\n\t\t\r\n\t\tJLabel lblNewLabel_3 = new JLabel(\"\");\r\n\t\tlblNewLabel_3.setIcon(new ImageIcon(\"C:\\\\Users\\\\Asus\\\\Downloads\\\\med bag.png\"));\r\n\t\tlblNewLabel_3.setBounds(41, 0, 125, 105);\r\n\t\tframe.getContentPane().add(lblNewLabel_3);\r\n\t\t\r\n\t\t\r\n//\t\tthis is to refesh the panel\r\n\t\ttry {\r\n//\t\t\tClass.forName(\"com.mysql.cj.jdbs.Driver\");\r\n\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/medic_crud\",\"root\",\"\");\r\n\t\t\tString sql =\"select * from retail\";\r\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\t\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t//bikas\r\n\t\t\tdm.setRowCount(0);\r\n\t\t\twhile (rs.next()) {\t\t\t\r\n\t\t\t\tdm.addRow(new Object[] {rs.getString(\"syrup\"),rs.getString(\"capsule\"),rs.getString(\"power\"),rs.getString(\"med_name\"),rs.getInt(\"tax\"),rs.getInt(\"total\")});\r\n\t\t\t}\r\n\t\t\t//end bikas\r\n\t\t}\r\n\t\tcatch(Exception e2)\r\n\t\t{\r\n//\t\t\tSystem.out.println(e1);\r\n\t\t\tJOptionPane.showMessageDialog(null, e2);\r\n\t\t}\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n model=DomainController.getInstance();\n addDataToChoiceBox();\n \n }", "public void createControl() {\n Button button1 = new Button(getShell(), SWT.PUSH);\n button1.setText(\"PolicyValueSelectionDialog with valid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog1 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy1\", selectionElement1);\n button1.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog1.open();\n String[] results = (String[]) dialog1.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n dialog1.setInitialSelections(new String[]{\"choice7\", \"choice3\"});\n\n Button button2 = new Button(getShell(), SWT.PUSH);\n button2.setText(\"PolicyValueSelectionDialog with invalid\\n\" +\n \"selection element at construction\");\n\n final PolicyValueSelectionDialog dialog2 =\n new PolicyValueSelectionDialog(button1.getShell(),\n \"myPolicy2\", selectionElement2);\n button2.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n dialog2.open();\n String[] results = (String[]) dialog2.getResult();\n if (results != null) {\n System.out.println(\"You chose:\");\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n } else {\n System.out.println(\"You chose nothing\");\n }\n }\n });\n\n\n }", "public void initializers() {\n\t\taccidentSpinner = (Spinner) findViewById(R.id.accidentSpinner);\n\t\tdesc = (EditText) findViewById(R.id.descriptionEt);\n\t\timView = (ImageView) findViewById(R.id.image1);\n\t\timView2 = (ImageView) findViewById(R.id.image2);\n\t\timView.setOnClickListener(this);\n\t\timView2.setOnClickListener(this);\n\t\tsubmit = (Button) findViewById(R.id.reportBtn);\n\t\tsubmit.setOnClickListener(this);\n\n\t\ttry {\n\t\t\tArrayAdapter<String> adapter_state = new ArrayAdapter<String>(this,\n\t\t\t\t\tandroid.R.layout.simple_spinner_item, accidentType);\n\t\t\tadapter_state\n\t\t\t\t\t.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\t\taccidentSpinner.setAdapter(adapter_state);\n\t\t} catch (Exception ex) {\n\t\t\tToast.makeText(this, \"Something happen\", Toast.LENGTH_SHORT).show();\n\t\t}\n\n\t}", "public EqGUI() {\n initComponents();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tlblPressNewGame.setBounds(10, 236, 194, 14);\n\t\tframe.getContentPane().add(lblPressNewGame);\n\t\t\n\t\tlblEnt.setBounds(10, 11, 102, 14);\n\t\tframe.getContentPane().add(lblEnt);\n\t\t\n\t\ttextPane.setBounds(122, 5, 21, 20);\n\t\tframe.getContentPane().add(textPane);\n\t\t\n\t\tJLabel lblGuardPersonalty = new JLabel(\"Guard personality\");\n\t\tlblGuardPersonalty.setBounds(10, 36, 102, 14);\n\t\tframe.getContentPane().add(lblGuardPersonalty);\n\t\t\n\t\tJComboBox comboBox = new JComboBox();\n\t\tcomboBox.addItem(\"Suspicious\");\n\t\tcomboBox.addItem(\"Rookie\");\n\t\tcomboBox.addItem(\"Drunken\");\n\t\tcomboBox.setSelectedItem(null);\n\t\tcomboBox.setBounds(132, 36, 94, 20);\n\t\t\n\t\tframe.getContentPane().add(comboBox);\n\t\t\n\t\tbtnExit.setBounds(323, 227, 89, 23);\n\t\tbtnExit.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){System.exit(0);}\n\t\t});\n\t\tframe.getContentPane().add(btnExit);\n\t\t\n\t\ttextArea.setFont(new Font(\"Courier New\", Font.PLAIN, 13));\n\t\ttextArea.setBounds(20, 76, 246, 161);\n\t\tframe.getContentPane().add(textArea);\n\t\t\n\t\tbtnLeft.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {checkState('a');}\n\t\t});\n\t\tbtnLeft.setEnabled(false);\n\t\tbtnLeft.setBounds(287, 118, 60, 23);\n\t\tframe.getContentPane().add(btnLeft);\n\t\t\n\t\tbtnRight.setEnabled(false);\n\t\tbtnRight.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {checkState('d');}\n\t\t});\n\t\tbtnRight.setBounds(357, 118, 67, 23);\n\t\tframe.getContentPane().add(btnRight);\n\t\t\n\t\tbtnDown.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {checkState('s');}\n\t\t});\n\t\tbtnDown.setEnabled(false);\n\t\tbtnDown.setBounds(322, 152, 72, 23);\n\t\tframe.getContentPane().add(btnDown);\n\t\t\n\t\tbtnUp.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {checkState('w');}\n\t\t});\n\t\tbtnUp.setEnabled(false);\n\t\tbtnUp.setBounds(323, 84, 60, 23);\n\t\tframe.getContentPane().add(btnUp);\n\t\t\n\t\tbtnNewGame.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tlblPressNewGame.setText(\"You can now play\");\n\t\t\t\tbtnRight.setEnabled(true);\n\t\t\t\tbtnUp.setEnabled(true);\n\t\t\t\tbtnLeft.setEnabled(true);\n\t\t\t\tbtnDown.setEnabled(true);\n\t\t\t\tleveling = new Levels();\n\t\t\t\tMapa1 map1= new Mapa1(leveling);\n\t\t\t\tString name = comboBox.getSelectedItem().toString();\n\t\t\t\tswitch(name){\n\t\t\t\tcase \"Suspicious\":\n\t\t\t\t\tEnemy guard = new Suspicious();\n\t\t\t\t\tmap1.setGuard(guard);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Drunken\":\n\t\t\t\t\tEnemy guard1 = new Drunken();\n\t\t\t\t\tmap1.setGuard(guard1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Rookie\":\n\t\t\t\t\tEnemy guard2 = new Rookie();\n\t\t\t\t\tmap1.setGuard(guard2);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMapa2 map2 = new Mapa2(leveling);\n\t\t\t\tint number = Integer.parseInt(textPane.getText());\n\t\t\t\tif(number == 0 || number > 5){\n\t\t\t\t\tlblPressNewGame.setText(\"Insert a valid number for ogres\");\n\t\t\t\t}else{\n\t\t\t\tOrde orde = new Orde(number);\n\t\t\t\tmap2.setOrde(orde);\n\t\t\t\tmap1.setRunning(true);\n\t\t\t\ttextArea.setText(map1.printBoard(map1.getHero(), map1.getGuard()));\n\t\t\t\t}\n\t\t\t\t}\n\t\t});\n\t\tbtnNewGame.setBounds(305, 32, 119, 23);\n\t\tframe.getContentPane().add(btnNewGame);\n\t}", "private void setUpDialoguebox() {\n\t\tinput = new CTS_GUI_Dialoguebox();\n\t\tinput.setTitle(\"Settings\");\n\t\tBorderPane pane = new BorderPane();\n\t\tLocalTime t = LocalTime.now();\n\t\tLocalDate d = LocalDate.now();\n\t\tuicontrols = new VBox(10);\n\t\tHBox box0 = new HBox(5);\n\t\tbox0.getChildren().addAll(new Label(\"Latitude: \"),new TextField(\"0\"));\n\t\tHBox box1 = new HBox(5);\n\t\tbox1.getChildren().addAll(new Label(\"Longitude: \"),new TextField(\"0\"));\n\t\tHBox box2 = new HBox(5);\n\t\tbox2.getChildren().addAll(new Label(\"Date: \"),new TextField(d.toString()));\n\t\tTextField time = new TextField(t.getHour() + \":\" + t.getMinute() + \":\" + (int) floor(t.getSecond()));\n\t\tHBox box3 = new HBox(5);\n\t\tbox3.getChildren().addAll(new Label(\"Time: \"),time);\n\t\t// Check boxes\n\t\tHBox box5 = new HBox(5);\n\t\tCheckBox c1 = new CheckBox(\"Plot Stars\");\n\t\tc1.setSelected(true);\n\t\tCheckBox c2 = new CheckBox(\"Plot DSOs\");\n\t\tc2.setSelected(true);\n\t\tCheckBox c3 = new CheckBox(\"Plot Constellations\");\n\t\tc3.setSelected(true);\n\t\tCheckBox c4 = new CheckBox(\"Plot Planets\");\n\t\tc4.setSelected(true);\n\t\tbox5.getChildren().addAll(c1,c2,c3,c4);\n\t\t// Color Picker\n\t\t// 0 = Star color, 1 = Low mag star, 2 = Very low mag star.\n\t\t// 3 = DSO, 4 = Sky background, 5 = Circle around sky background\n\t\t// 6 = Overall background, 7 = Lat/long txt color, 8 = Constellation line color.\n\t\tHBox box6 = new HBox(5);\n\t\tTextField colorSet = new TextField(\"255,255,255,1\");\n\t\tButton setcolorbutton = new Button(\"Submit Color\");\n\t\tbox6.getChildren().addAll(new Label(\"Color to Set: \"),colorSet,setcolorbutton,new Label(\"[PREVIEW COLOR]\"));\n\t\tsetcolorbutton.setOnAction((event) -> { colorPickerHander(); });\n MenuBar mainmenu = new MenuBar();\n Menu colorpickermenu = new Menu(\"Set Custom Colors\");\n String[] colorstrs = {\"Star Color\",\"Low Magnituide Star Color\",\"Very Low Magnituide Star Color\", \"Deep Space Object Color\",\"Sky Background Color\",\n \t\t\"Circle Around Sky Background Color\",\"Overall Background Color\", \"Latitude/Longitude Text Color\",\"Constellation Line Color\"};\n for(int x = 0; x < colorstrs.length; x++) {\n \tMenuItem opt = new MenuItem(colorstrs[x]);\n \tint id = x;\n \topt.setOnAction((event) -> { colorSetterId = id; });\n \tcolorpickermenu.getItems().add(opt);\n }\n \n ComboBox<String> consts = new ComboBox<>();\n HashMap<String, String> cdbs = controller.getModelConstellationDBs();\n\n for (String name : cdbs.keySet()) {\n consts.getItems().add(name);\n }\n HBox box7 = new HBox(5);\n box7.getChildren().addAll(new Label(\"Select Constellation Set\"), consts);\n \n consts.getSelectionModel().select(\"Western\");\n mainmenu.getMenus().addAll(colorpickermenu);\n\t\tHBox box4 = new HBox(5);\n\t\tButton but = new Button(\"Cancel\");\n\t\tbut.setPadding(new Insets(5));\n\t\tButton but2 = new Button(\"Submit\");\n\t\tbut2.setPadding(new Insets(5));\n\t\tbox4.getChildren().addAll(but,but2);\n\t\tuicontrols.getChildren().addAll(box0,box1,box2,box3,box5,box6,box7,box4);\n\t\tbut.setOnAction((event) -> { input.close(); });\n\t\tbut2.setOnAction((event) -> {\n\t\t\tuserSelectedConstellationFileName = cdbs.get(consts.getValue());\n\t\t\tlong i = validateInput();\n\t\t\tif (i == 0) {\n\t\t\t\tchartTheStars();\n\t\t\t\tinput.close();\n\t\t\t} else {\n\t\t\t\tGUIerrorout = new Alert(AlertType.ERROR, getGUIErrorMsg(i));\n\t\t\t\tGUIerrorout.showAndWait();\n\t\t\t}\n });\n\t\tpane.setTop(mainmenu);\n\t\tpane.setCenter(uicontrols);\n\t\tpane.setPadding(new Insets(10));\n\t\tScene scene = new Scene(pane, 520, 310);\n\t\tinput.setScene(scene);\n\t}", "private void initQuestionDialog() {\n\t\tquestion = true;\n\t\tchangeDirBehaviour(Values.DETECT_INIT);\n\t}", "@FXML\n\tprivate void initialize() {\n\n\t\t\n\n\t\tchooseLangCombo.getItems().setAll(\"English\", \"Vietnamese\");\n\t\tchooseLangCombo.setValue(\"English\");\n\t\t;\n\n\t\tspeechCalculator.setInfoArea(infoArea);\n\n\t\t// start\n\t\tstart.setOnAction(a -> {\n\t\t\tSystem.out.println(\"choose:\" + chooseLangCombo.getSelectionModel().getSelectedItem());\n\t\t\tspeechCalculator.setChooseLang(chooseLangCombo.getSelectionModel().getSelectedItem());\n\t\t\tstatusLabel.setText(\"Status : [Running]\");\n\t\t\tinfoArea.appendText(\"Starting Speech Recognizer\\n\");\n\t\t\tspeechCalculator.startSpeechThread();\n\t\t});\n\n\t\t// stop\n\t\tstop.setOnAction(a -> {\n\t\t\tstatusLabel.setText(\"Status : [Stopped]\");\n\t\t\tinfoArea.appendText(\"Stopping Speech Recognizer\\n\");\n\t\t\tspeechCalculator.stopSpeechThread();\n\t\t\tchooseLangCombo.setValue(\"English\");\n\t\t\t;\n\t\t});\n\n\t\t// restart\n\t\trestart.setDisable(true);\n\n\t\treportBtn.setOnAction((ActionEvent event) -> {\n System.out.println(\"report button\");\n infoArea.appendText(\"You've just export report to excel. Please check file path:\" + ReportResult.REPORT_FILE_PATH + \"\\n\");\n ReportResult.createExcelFile();\n });\n\t\tcreateRadioGroup();\n\t}", "private void initControlUI() {\n typeAdapter = new SpinnerSimpleAdapter(self, android.R.layout.simple_spinner_item, self.getResources().getStringArray(R.array.arr_feedback_type));\n spnType.setAdapter(typeAdapter);\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n ratingcombobox.getItems().addAll(\"1\",\"2\",\"3\",\"4\",\"5\");\r\n }", "private void initialize() throws Exception {\n\t\tfinal JFrame frmHangmanCategory = new JFrame();\r\n\t\tfrmHangmanCategory.setVisible(true);\r\n\t\tfrmHangmanCategory.setTitle(\"Hangman's Category Selection\");\r\n\t\tfrmHangmanCategory.setBounds(100, 100, 450, 350);\r\n\t\tfrmHangmanCategory.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmHangmanCategory.getContentPane().setLayout(null);\r\n\r\n\t\t// creates a new JPanel\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBackground(new Color(102, 204, 0));\r\n\t\tpanel.setForeground(new Color(0, 0, 0));\r\n\t\tpanel.setBounds(0, 0, 442, 316);\r\n\t\tfrmHangmanCategory.getContentPane().add(panel);\r\n\t\tpanel.setLayout(null);\r\n\r\n\t\t// creates label\r\n\t\tJLabel ImageLabel = new JLabel();\r\n\t\tImageLabel.setLabelFor(ImageLabel);\r\n\t\tImageLabel.setBounds(0, 0, 442, 150);\r\n\t\tImageLabel.setIcon(new ImageIcon(LoginGUI.class\r\n\t\t\t\t.getResource(\"/com/hangman/data/hangman2.JPG\")));\r\n\t\tpanel.add(ImageLabel);\r\n\r\n\t\t// Creates the combobox with database's categories\r\n\t\tList<Category> categoryList = new CategoryService()\r\n\t\t\t\t.findAll(new CategoryCriteria());\r\n\t\tfinal JComboBox CategoriesCombo = new JComboBox(\r\n\t\t\t\t(Category[]) categoryList.toArray(new Category[categoryList\r\n\t\t\t\t\t\t.size()]));\r\n\t\tCategoriesCombo.setVisible(true);\r\n\t\tCategoriesCombo.setBounds(140, 155, 200, 40);\r\n\t\tCategoriesCombo.setSelectedIndex(0);\r\n\t\t//CategoriesCombo.addActionListener(this);\r\n\t\tCategoriesCombo.setBackground(getForeground());\r\n\t\tpanel.add(CategoriesCombo);\r\n\r\n\t\tbtnDone = new JButton(\"Done!\");\r\n\t\tbtnDone.setBounds(180, 230, 89, 23);\r\n\t\tbtnDone.setToolTipText(\"Please Select a Category from the list, and then Click me!\");\r\n\t\tpanel.add(btnDone);\r\n\t\tbtnDone.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tCategoryCriteria fselection = new CategoryCriteria();\r\n\t\t\t\tPhrasesCriteria inportphrases = new PhrasesCriteria();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint idtoint = getCategorySelection(CategoriesCombo);\r\n\r\n\t\t\t\t\tPhrasesService phrasesService = new PhrasesService();\r\n\t\t\t\t\tList<Phrases> list = phrasesService.thisPhrases(idtoint);\r\n\r\n\t\t\t\t\tRandom random = new Random(); // Create random class object\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Generate a random number (index) with the size of the\r\n\t\t\t\t\t * list being the maximum\r\n\t\t\t\t\t */\r\n\t\t\t\t\tint randomSelection = random.nextInt(list.size());\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Object with the random selection\r\n\t\t\t\t\t */\r\n\t\t\t\t\tObject randomSelectionrow = list.get(randomSelection)\r\n\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\tString[] partsOfrandom = ((String) randomSelectionrow)\r\n\t\t\t\t\t\t\t.replaceAll(\"\\\\[\", \"\").replaceAll(\"\\\\]\", \"\")\r\n\t\t\t\t\t\t\t.split(\"\\\\.\");\r\n\t\t\t\t\tString PhraseId = partsOfrandom[0];\r\n\t\t\t\t\tString PhraseCategoryId = partsOfrandom[1];\r\n\t\t\t\t\tString PhraseName = partsOfrandom[2];\r\n\t\t\t\t\tString PhraseHelp = partsOfrandom[3];\r\n\t\t\t\t\tnew HangmanMainFrame(PhraseName, PhraseHelp);\r\n\t\t\t\t\tfrmHangmanCategory.setVisible(false);\r\n\t\r\n\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tDialogHelper.showException(frmHangmanCategory, ex,\r\n\t\t\t\t\t\t\t\"Something went wrong, Please try again!\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * @param CategoriesCombo\r\n\t\t\t * @return\r\n\t\t\t * @author Maria - Despoina Gkaintatzi\r\n\t\t\t */\r\n\t\t\tprivate int getCategorySelection(final JComboBox CategoriesCombo) {\r\n\t\t\t\t/**\r\n\t\t\t\t * Reads the selected category, and split the string in two\r\n\t\t\t\t * different.\r\n\t\t\t\t */\r\n\t\t\t\tObject contents = CategoriesCombo.getSelectedItem()\r\n\t\t\t\t\t\t.toString();\r\n\r\n\t\t\t\tString[] parts = ((String) contents).replaceAll(\"\\\\[\", \"\")\r\n\t\t\t\t\t\t.replaceAll(\"\\\\]\", \"\").split(\" \");\r\n\t\t\t\tString id = parts[0];\r\n\t\t\t\tint idtoint = Integer.parseInt(id);\r\n\t\t\t\tString Name = parts[1];\r\n\t\t\t\tString selectionDone = new CategoryService()\r\n\t\t\t\t\t\t.CategorySelection(Name);\r\n\t\t\t\tInteger SelcategoryID = new CategoryService()\r\n\t\t\t\t\t\t.CategoryId(idtoint);\r\n\t\t\t\treturn idtoint;\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * @param CategoriesCombo\r\n\t\t\t * @return\r\n\t\t\t * @author Tzanidou Alexandra\r\n\t\t\t */\r\n\t\t\tprivate String selectionDone(final JComboBox CategoriesCombo) {\r\n\t\t\t\tObject contents = CategoriesCombo.getSelectedItem().toString();\r\n\t\t\t\t/**\r\n\t\t\t\t * Reads the selected category, and split the string in two\r\n\t\t\t\t * different.\r\n\t\t\t\t */\r\n\t\t\t\tString[] parts = ((String) contents).replaceAll(\"\\\\[\", \"\")\r\n\t\t\t\t\t\t.replaceAll(\"\\\\]\", \"\").split(\" \");\r\n\t\t\t\tString id = parts[0];\r\n\t\t\t\tint idtoint = Integer.parseInt(id);\r\n\t\t\t\tString Name = parts[1];\r\n\t\t\t\tnew CategoryService().CategorySelection(Name);\r\n\t\t\t\tnew CategoryService().CategoryId(idtoint);\r\n\r\n\t\t\t\treturn randomPhraseSelection(idtoint);\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * @param idtoint\r\n\t\t\t * @return a random phrase from the selected category\r\n\t\t\t * @author Tzanidou Alexandra\r\n\t\t\t */\r\n\t\t\tpublic String randomPhraseSelection(int idtoint) {\r\n\t\t\t\tPhrasesService phrasesService = new PhrasesService();\r\n\t\t\t\tList<Phrases> list = phrasesService.thisPhrases(idtoint);\r\n\t\t\t\tfor (Phrases currentPhrases : list)\r\n\t\t\t\t\t;\r\n\t\t\t\tRandom random = new Random(); // Create random class object\r\n\t\t\t\t/*\r\n\t\t\t\t * Generate a random number (index) with the size of the list\r\n\t\t\t\t * being the maximum\r\n\t\t\t\t */\r\n\t\t\t\tint randomSelection = random.nextInt(list.size());\r\n\t\t\t\t/*\r\n\t\t\t\t * Object with the random selection\r\n\t\t\t\t */\r\n\t\t\t\tObject randomSelectionrow = list.get(randomSelection)\r\n\t\t\t\t\t\t.toString();\r\n\t\t\t\tString[] partsOfrandom = ((String) randomSelectionrow)\r\n\t\t\t\t\t\t.replaceAll(\"\\\\[\", \"\").replaceAll(\"\\\\]\", \"\")\r\n\t\t\t\t\t\t.split(\"\\\\.\");\r\n\t\t\t\tString PhraseName = partsOfrandom[2];\r\n\t\t\t\tString PhraseHelp = partsOfrandom[3];\r\n\t\t\t\tSystem.out.println(PhraseName);\r\n\t\t\t\tSystem.out.println(PhraseHelp);\r\n\t\t\t\treturn PhraseName;\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}", "public void initMode()\r\n\t{\r\n\t\t_box = null;\r\n\t}", "private void initView() {\n\t\tuiBinder.createAndBindUi(this);\n\t\tRootPanel.get(\"rolePanelContainer\").add(cpanel);\n\t\t\n\t\tlb.setVisibleItemCount(VISIBLE_ITEM);\n\t\t\n\t\t// Fill the combo\n\t\tList<RoleEnum> comboList = RoleEnum.comboList();\n\t\tfor (int i = 0; i < comboList.size(); i++) {\n\t\t\tlbRoleCombo.addItem(comboList.get(i).value);\t\n\t\t}\n\t}", "public void initGameModeChoice() {\n\t\tWorld.clear();\n\t\tstate = STATE.MENU;\n\t\tinitBackground();\n\t\tWorld.add(new Logo(Screen.getCenterX() - Logo.WIDTH / 2, Screen\n\t\t\t\t.getHeight() * 3 / 4 - Logo.HEIGHT / 2));\n\t\tWorld.add(new SinglePlayerButton(Screen.getCenterX()\n\t\t\t\t- StartButton.WIDTH / 2, Screen.getHeight() * 3 / 8\n\t\t\t\t- StartButton.HEIGHT / 2, this));\n\t\tWorld.add(new MultiPlayerButton(Screen.getCenterX() - StartButton.WIDTH\n\t\t\t\t/ 2, Screen.getHeight() * 2 / 8 - StartButton.HEIGHT / 2, this));\n\t\tWorld.add(new TextStatic(footerText, Screen.getCenterX()\n\t\t\t\t- footerText.length() * Sprite.CHAR_WIDTH / 2,\n\t\t\t\tSprite.CHAR_HEIGHT, Color.yellow));\n\n\t}", "public void initialize(URL arg0, ResourceBundle arg1) {\n\t\trbOpt0.setText(\"Wand zur Abtrennung der Küche von dem Essbereich:\");\n\t\trbOpt1.setText(\"Tür in der Wand zwischen Küche und Essbereich:\");\n\t\trbOpt2.setText(\"Großes Zimmer im OG statt zwei kleinen Zimmern:\");\n\t\tcbDachgeschoss.setText(\"Dachgeschoss vorhanden:\");\n\t\trbOpt3.setText(\"Abgetrennter Treppenraum im DG:\");\n\t\trbOpt4.setText(\"Vorrichtung eines Bades im DG:\");\n\t\trbOpt5.setText(\"Ausführung eines Bades im DG:\");\n\n\t\tdOpt0 = 300;\n\t\tdOpt1 = 300;\n\t\tdOpt2 = 0;\n\t\tdOpt3 = 890;\n\t\tdOpt4 = 990;\n\t\tdOpt5 = 8990;\n\n\t\tlblOpt0.setText(dOpt0 + \" €\");\n\t\tlblOpt1.setText(dOpt1 + \" €\");\n\t\tlblOpt2.setText(dOpt2 + \" €\");\n\t\tlblOpt3.setText(dOpt3 + \" €\");\n\t\tlblOpt4.setText(dOpt4 + \" €\");\n\t\tlblOpt5.setText(((int) dOpt5 / 1000) + \",\" + dOpt5 % 1000 + \" €\");\n\n\t\tCheckedPrüfung();// Prüft ob aktuelle Auswahl akzeptiert wird\n\t\tinitListener();// Initialisiert die Listener\n\t\tberechnePreis();// Berechnet den Preis\n\t}", "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "public void initialize() {\r\n\t\t\r\n\t\tJLabel lblLevel = new JLabel(\"Level\");\r\n\t\tlblLevel.setBounds(120, 124, 100, 45);\r\n\t\tlblLevel.setForeground(new Color(184, 134, 11));\r\n\t\tlblLevel.setFont(new Font(\"Britannic Bold\", Font.PLAIN, 35));\r\n\t\tadd(lblLevel);\r\n\t\t\r\n\t\tlevelList = new JComboBox<String>();\r\n\t\tlevelList.setUI(new MyComboBoxUI());\r\n\t\t((JLabel)levelList.getRenderer()).setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlevelList.setBounds(280, 124, 400, 45);\r\n\t\tlevelList.setBorder(BorderFactory.createLineBorder(Color.BLUE));\r\n\t\tlevelList.setForeground(new Color(184, 134, 11));\r\n\t\tlevelList.setFont(new Font(\"Britannic Bold\", Font.PLAIN, 35));\r\n\t\tlevelList.setBackground(Color.WHITE);\r\n\t\tadd(levelList);\r\n\t\t\r\n\t\t// Load all unlocked levels to the combobox\r\n\t\tint highest = lvlm.getHighestLevel().getLevelNum();\r\n\t\tfor (int i = 0; i < lvlList.size(); i++) {\r\n\t\t\tLevel l = lvlList.get(i);\r\n\t\t\tif (l.getLevelNum() <= highest) {\r\n\t\t\t\tString name = lvlList.get(i).toString();\r\n\t\t\t\tlevelList.addItem(name);\r\n\t\t\t}\r\n\t\t}\t\t\r\n//\t\tlevelList.setRenderer(new DisabledItemsRenderer<String>());\r\n\r\n\t\tImageIcon buttonBack = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_back.png\"));\r\n\t\tImageIcon newBtnBack = new ImageIcon(buttonBack.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnBackRollover = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_back_Rollover.png\"));\r\n\t\tImageIcon newBtnBackRollover = new ImageIcon(btnBackRollover.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnBackPressed = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_back_Pressed.png\"));\r\n\t\tImageIcon newBtnBackPressed = new ImageIcon(btnBackPressed.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tJButton btnBack = new JButton(newBtnBack);\r\n\t\tbtnBack.setBounds(20, 500, 227, 69);\r\n\t\tbtnBack.setBorderPainted(false);\r\n\t\tbtnBack.setBackground(Color.WHITE);\r\n\t\tbtnBack.setBorder(null);\r\n\t\tbtnBack.setContentAreaFilled(false);\r\n\t\tbtnBack.addActionListener(new MainMenuController());\r\n\t\tbtnBack.setRolloverEnabled(true);\r\n\t\tbtnBack.setRolloverIcon(newBtnBackRollover);\r\n\t\tbtnBack.setPressedIcon(newBtnBackPressed);\r\n\t\tadd(btnBack);\r\n\t\t\r\n\t\tImageIcon buttonStart = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_startGame.png\"));\r\n\t\tImageIcon newBtnStart = new ImageIcon(buttonStart.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnStartRollover = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_startGame_Rollover.png\"));\r\n\t\tImageIcon newBtnStartRollover = new ImageIcon(btnStartRollover.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tImageIcon btnStartPressed = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/button_startGame_Pressed.png\"));\r\n\t\tImageIcon newBtnStartPressed = new ImageIcon(btnStartPressed.getImage().getScaledInstance(227, 69, java.awt.Image.SCALE_SMOOTH));\r\n\t\tJButton btnStartGame = new JButton(newBtnStart);\r\n\t\tbtnStartGame.setBounds(550, 500, 227, 69);\r\n\t\tbtnStartGame.setBorderPainted(false);\r\n\t\tbtnStartGame.setBackground(Color.WHITE);\r\n\t\tbtnStartGame.setBorder(null);\r\n\t\tbtnStartGame.setContentAreaFilled(false);\r\n\t\tbtnStartGame.addActionListener(new StartGameController());\r\n\t\tbtnStartGame.setRolloverEnabled(true);\r\n\t\tbtnStartGame.setRolloverIcon(newBtnStartRollover);\r\n\t\tbtnStartGame.setPressedIcon(newBtnStartPressed);\r\n\t\tadd(btnStartGame);\r\n\r\n\t\tImageIcon backgroundImg = new ImageIcon(PlayGameScreenView.class.getResource(\"/sw/resource/image/secondBackground.png\"));\r\n\t\tImageIcon newBackground = new ImageIcon(backgroundImg.getImage().getScaledInstance(800, 573, java.awt.Image.SCALE_SMOOTH));\r\n\t\tJLabel background = new JLabel(newBackground);\r\n\t\tbackground.setVerticalAlignment(SwingConstants.TOP);\r\n\t\tbackground.setBackground(Color.WHITE);\r\n\t\tbackground.setBounds(0, 0, 800, 600);\r\n\t\tadd(background);\r\n\t\tsetLayout(null);\r\n\t}", "public void setupMealSelectionCombobox(ComboBox<Recipe> mealSelection){\n setupPlannerMealComboboxs(mealSelection);\n }", "private void _init(){\n \n context = this;\n \t\n this.countryCodeXml = HelperFunctions.getInstance().parseCountryCodeXml(this);\n \n \t//Initialisieren der EditTexte und Spinner\n this.countrySpinner = (Spinner) findViewById(R.id.countrySpinner);\n addItemsToSpinner();\n countrySpinnerListener();\n this.countryCode = (TextView) findViewById(R.id.countryCode);\n this.numberErrorMessage = (TextView) findViewById(R.id.activity_setup_number_error_message);\n \tthis.telNumber = (EditText) findViewById(R.id.telnummberEditText);\n \tthis.passwordErrorMessage = (TextView) findViewById(R.id.activity_setup_password_error_message);\n this.password = (EditText) findViewById(R.id.passwordEditText);\n passwordInputFilter();\n this.agbCheck = (CheckBox) findViewById(R.id.agbCheck);\n // Hier muss noch eine Default Vlaue gesetzt werden\n //countrySpinner.setSelected(selected)\n this.acceptButton = (Button) findViewById(R.id.AgbConfirmButton);\n acceptButtonListener();\n \n }", "public void init(){\n\t\tsetBackground(Color.green);\n\t\tmsg = \"Let's Play\";\n//\t\tmsg1 = \"Your Frinds Choice\";\n\t\tSystem.out.println(cpu);\n\t\tb1 = new Button(\"Stone\");\n\t\tb2 = new Button(\"Paper\");\n\t\tb3 = new Button(\"Seaser\");\n\t\tb1.addActionListener(this);\n\t\tb2.addActionListener(this);\n\t\tb3.addActionListener(this);\n\t\tadd(b1);\n\t\tadd(b2);\n\t\tadd(b3);\n\t}", "public NderroPass() {\n initComponents();\n loadComboBox();\n }", "private void initialize() {\r\n\t\tsetCreateTestFrame(new JFrame());\r\n\t\tgetCreateTestFrame().setTitle(\"Take a test\");\r\n\t\tgetCreateTestFrame().setBounds(100, 100, 808, 769);\r\n\t\tgetCreateTestFrame().setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tgetCreateTestFrame().getContentPane().setLayout(null);\r\n\r\n\t\t// Take a Test Label\r\n\t\tJLabel lblNewLabel = new JLabel(\"Take a Test\");\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 20));\r\n\t\tlblNewLabel.setBounds(305, 34, 236, 16);\r\n\t\tcreateTestFrame.getContentPane().add(lblNewLabel);\r\n\r\n\t\t// ******************************************\r\n\t\t// QUESTION/ANSWER #1: Label and combo-box\r\n\t\t// ******************************************\r\n\r\n\t\tJLabel questionLBL = new JLabel(\"Question 1:\");\r\n\t\tquestionLBL.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tquestionLBL.setBounds(326, 102, 122, 16);\r\n\t\tcreateTestFrame.getContentPane().add(questionLBL);\r\n\r\n\t\tJLabel answerLBL = new JLabel(\"Your Answer\");\r\n\t\tanswerLBL.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tanswerLBL.setBounds(326, 218, 96, 16);\r\n\t\tcreateTestFrame.getContentPane().add(answerLBL);\r\n\r\n\t\tcomboBoxQ1 = new JComboBox();\r\n\t\tcomboBoxQ1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// Do something\r\n\t\t\t}\r\n\t\t});\r\n\t\tcomboBoxQ1.setBounds(31, 147, 693, 28);\r\n\t\tcreateTestFrame.getContentPane().add(comboBoxQ1);\r\n\r\n\t\tcomboBoxA1 = new JComboBox();\r\n\t\tcomboBoxA1.setBounds(31, 247, 693, 28);\r\n\t\tcreateTestFrame.getContentPane().add(comboBoxA1);\r\n\r\n\t\t// ******************************************\r\n\t\t// QUESTION/ANSWER #2: Label and combo-box\r\n\t\t// ******************************************\r\n\r\n\t\tJLabel questionLBL2 = new JLabel(\"Question 2:\");\r\n\t\tquestionLBL2.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tquestionLBL2.setBounds(326, 317, 122, 16);\r\n\t\tcreateTestFrame.getContentPane().add(questionLBL2);\r\n\r\n\t\tJLabel answerLBL2 = new JLabel(\"Your Answer\");\r\n\t\tanswerLBL2.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tanswerLBL2.setBounds(326, 433, 96, 16);\r\n\t\tcreateTestFrame.getContentPane().add(answerLBL2);\r\n\r\n\t\tcomboBoxQ2 = new JComboBox();\r\n\t\tcomboBoxQ2.setBounds(31, 362, 693, 28);\r\n\t\tcreateTestFrame.getContentPane().add(comboBoxQ2);\r\n\r\n\t\tcomboBoxA2 = new JComboBox();\r\n\t\tcomboBoxA2.setBounds(31, 462, 693, 28);\r\n\t\tcreateTestFrame.getContentPane().add(comboBoxA2);\r\n\r\n\t\t// ******************************************\r\n\t\t// QUESTION/ANSWER #3: Label and combo-box\r\n\t\t// ******************************************\r\n\r\n\t\tJLabel questionLBL3 = new JLabel(\"Question 3:\");\r\n\t\tquestionLBL3.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tquestionLBL3.setBounds(326, 535, 122, 16);\r\n\t\tcreateTestFrame.getContentPane().add(questionLBL3);\r\n\r\n\t\tcomboBoxQ3 = new JComboBox();\r\n\t\tcomboBoxQ3.setBounds(31, 580, 693, 28);\r\n\t\tcreateTestFrame.getContentPane().add(comboBoxQ3);\r\n\r\n\t\tJLabel answerLBL3 = new JLabel(\"Your Answer\");\r\n\t\tanswerLBL3.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tanswerLBL3.setBounds(326, 651, 96, 16);\r\n\t\tcreateTestFrame.getContentPane().add(answerLBL3);\r\n\r\n\t\tcomboBoxA3 = new JComboBox();\r\n\t\tcomboBoxA3.setBounds(31, 680, 693, 28);\r\n\t\tcreateTestFrame.getContentPane().add(comboBoxA3);\r\n\r\n\t\t// When this button is pressed, the user will\r\n\t\t// go back to the l\t\t\r\n\t\tJButton createTestButton = new JButton(\"Create Test!\");\r\n\t\tcreateTestButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Sorry :( We didn't get it.\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tcreateTestButton.setBounds(335, 679, 85, 21);\r\n\t\tcreateTestFrame.getContentPane().add(createTestButton);\r\n\t\tJButton backtoLoginButton = new JButton(\"Go Back to Teacher View \");\r\n\t\tbacktoLoginButton.setBackground(SystemColor.controlShadow);\r\n\t\tbacktoLoginButton.setFont(new Font(\"Times New Roman\", Font.BOLD, 13));\r\n\r\n\t\tbacktoLoginButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tTeacherView window = new TeacherView();\r\n\t\t\t\twindow.getTeacherViewFrame().setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tJButton exitButton = new JButton(\" Exit \");\r\n\t\texitButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t});\r\n\t\texitButton.setFont(new Font(\"Dialog\", Font.BOLD, 13));\r\n\t\texitButton.setBackground(SystemColor.controlShadow);\r\n\r\n\t\t// Toolbar with the 'exit' button and the 'login' button\r\n\t\tJToolBar toolBar = new JToolBar();\r\n\t\ttoolBar.setBackground(UIManager.getColor(\"InternalFrame.borderLight\"));\r\n\t\ttoolBar.setBounds(0, 0, 994, 31);\r\n\t\tcreateTestFrame.getContentPane().add(toolBar);\r\n\t\ttoolBar.add(exitButton);\r\n\t\ttoolBar.addSeparator(new Dimension(10, 10));\r\n\t\ttoolBar.add(backtoLoginButton);\r\n\r\n\t}", "private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 150, 200);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tframe.getContentPane().add(panel, BorderLayout.CENTER);\n\t\t\n\t\tJRadioButton small = new JRadioButton(\"Small\");\n\t\tpanel.add(small);\n\t\tsmall.setSelected(true);\n\t\t\n\t\tJRadioButton medium = new JRadioButton(\"Medium\");\n\t\tpanel.add(medium);\n\t\t\n\t\tJRadioButton large = new JRadioButton(\"Large\");\n\t\tpanel.add(large);\n\t\t\n\t\tButtonGroup btnGroup = new ButtonGroup();\n\t\tbtnGroup.add(large);\n\t\tbtnGroup.add(medium);\n\t\tbtnGroup.add(small);\n\t}", "private void initialise() {\n\t\tok=(Button)findViewById(R.id.button1);\n clear=(Button)findViewById(R.id.bExit);\n symptoms=(EditText)findViewById(R.id.edAppointTime);\n other=(EditText)findViewById(R.id.edSecondName);\n headache = (CheckBox) findViewById(R.id.cbHeadache);\n stomach = (CheckBox) findViewById(R.id.cbStomach);\n fever = (CheckBox) findViewById(R.id.cbFever);\n diarrhoea = (CheckBox) findViewById(R.id.cbDiarrhoea);\n hiv = (CheckBox) findViewById(R.id.cbHiv);\n disability = (CheckBox) findViewById(R.id.cbDisability);\n\t}", "private void initForm() {\n\t\tfor (int i = 0; i < userRoles.size(); i++) {\n\t\t\tlb.addItem(userRoles.get(i).value);\n\t\t}\n\t}", "public OptionPanel() {\n initComponents();\n }", "public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n buttonGroupChoice = new javax.swing.ButtonGroup();\n jGTILabelCaption = new de.unisiegen.gtitool.ui.swing.JGTILabel();\n jGTIPanelChoice = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIRadioButtonRegularGrammar = new de.unisiegen.gtitool.ui.swing.JGTIRadioButton();\n jGTIRadioButtonContextFreeGrammar = new de.unisiegen.gtitool.ui.swing.JGTIRadioButton();\n jGTIPanelColumn0 = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIPanelButtons = new de.unisiegen.gtitool.ui.swing.JGTIPanel();\n jGTIButtonPrevious = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n jGTIButtonNext = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n jGTIButtonCancel = new de.unisiegen.gtitool.ui.swing.JGTIButton();\n\n setLayout(new java.awt.GridBagLayout());\n\n java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\"); // NOI18N\n jGTILabelCaption.setText(bundle.getString(\"NewDialog.ChooseGrammar\")); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 16, 5, 16);\n add(jGTILabelCaption, gridBagConstraints);\n\n buttonGroupChoice.add(jGTIRadioButtonRegularGrammar);\n jGTIRadioButtonRegularGrammar.setSelected(true);\n jGTIRadioButtonRegularGrammar.setText(bundle.getString(\"NewDialog.RG\")); // NOI18N\n jGTIRadioButtonRegularGrammar.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jGTIRadioButtonRegularGrammarItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0);\n jGTIPanelChoice.add(jGTIRadioButtonRegularGrammar, gridBagConstraints);\n\n buttonGroupChoice.add(jGTIRadioButtonContextFreeGrammar);\n jGTIRadioButtonContextFreeGrammar.setText(bundle.getString(\"NewDialog.CFG\")); // NOI18N\n jGTIRadioButtonContextFreeGrammar.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n jGTIRadioButtonContextFreeGrammarItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0);\n jGTIPanelChoice.add(jGTIRadioButtonContextFreeGrammar, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 5, 16);\n add(jGTIPanelChoice, gridBagConstraints);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 5, 16);\n add(jGTIPanelColumn0, gridBagConstraints);\n\n jGTIButtonPrevious.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.PreviousMnemonic\").charAt(0));\n jGTIButtonPrevious.setText(bundle.getString(\"NewDialog.Previous\")); // NOI18N\n jGTIButtonPrevious.setToolTipText(bundle.getString(\"NewDialog.PreviousToolTip\")); // NOI18N\n jGTIButtonPrevious.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonPreviousActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);\n jGTIPanelButtons.add(jGTIButtonPrevious, gridBagConstraints);\n\n jGTIButtonNext.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.NextMnemonic\").charAt(0));\n jGTIButtonNext.setText(bundle.getString(\"NewDialog.Next\")); // NOI18N\n jGTIButtonNext.setToolTipText(bundle.getString(\"NewDialog.NextToolTip\")); // NOI18N\n jGTIButtonNext.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonNextActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);\n jGTIPanelButtons.add(jGTIButtonNext, gridBagConstraints);\n\n jGTIButtonCancel.setMnemonic(java.util.ResourceBundle.getBundle(\"de/unisiegen/gtitool/ui/i18n/messages\").getString(\"NewDialog.CancelMnemonic\").charAt(0));\n jGTIButtonCancel.setText(bundle.getString(\"NewDialog.Cancel\")); // NOI18N\n jGTIButtonCancel.setToolTipText(bundle.getString(\"NewDialog.CancelToolTip\")); // NOI18N\n jGTIButtonCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jGTIButtonCancelActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;\n gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);\n jGTIPanelButtons.add(jGTIButtonCancel, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 16, 16, 16);\n add(jGTIPanelButtons, gridBagConstraints);\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n\n try {\n cmbBookPublisherIdAdd.getItems().setAll(ChoiceBoxes.PublisherIdChoice());\n cmbBookAuthorIdAdd.getItems().setAll(ChoiceBoxes.AuthorIdChoice());\n cmdBookGenreIdAdd.getItems().setAll(ChoiceBoxes.GenreIdChoice());\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public seViewAnswerUI() {\n initComponents();\n }", "@Override\n public void initialize(URL url, ResourceBundle resourceBundle) {\n ObservableList<String> containers = comboBox.getItems();\n for(String C : GUI.items) {\n containers.add(C);\n }\n cancel.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n Stage stage = (Stage) cancel.getScene().getWindow();\n stage.close();\n }\n });\n confirm.setOnAction(e -> {\n /*Attempt*/\n try {\n /*Get the result*/\n GUI.sResult = comboBox.getValue().toString();\n /*Close the window*/\n Stage stage = (Stage) cancel.getScene().getWindow();\n stage.close();\n }\n catch (NullPointerException e1) {\n }\n });\n }", "public ComboBoxChooser(int maxNumber, int minNumber, String type, String keyword, PetAdoptionApp parent) {\n this.keyword = keyword;\n this.maxNumber = maxNumber;\n this.minNumber = minNumber;\n this.type = type;\n this.frameTitle = \"Enter Birthday\";\n safeBox.add(parent);\n int[] intRange = java.util.stream.IntStream.rangeClosed(minNumber, maxNumber).toArray();\n range = new String[intRange.length];\n for (int i = 0; i < intRange.length; i++) {\n range[i] = String.valueOf(intRange[i]);\n }\n confirm = new JButton(\"Confirm\");\n confirm.addActionListener(this);\n }", "private void initialize(ReadYaml quiz) {\r\n\t\tString title = \"Score: \" + TestGui.SCORE + \"/\" + TestGui.ATTEMPTS + \" - \" + quiz.getTitle();\r\n\t\tfrmMultipleChoiceQuestion = new JDialog(null, title, Dialog.ModalityType.APPLICATION_MODAL);\r\n\t\tfrmMultipleChoiceQuestion.setLocationRelativeTo(null);\r\n\t\tfrmMultipleChoiceQuestion.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\r\n\t\tGridBagLayout gridBagLayout = new GridBagLayout();\r\n\t\tfrmMultipleChoiceQuestion.getContentPane().setLayout(gridBagLayout);\r\n\r\n\t\t// This is the question\r\n\t\tString question = \"<html>\"+quiz.getQuestion().replaceAll(\"(\\r\\n|\\n)\", \"<br />\")+\"</html>\";\r\n\t\tJLabel label = new JLabel(question);\r\n\t\tGridBagConstraints gbc_label = new GridBagConstraints();\r\n\t\tgbc_label.gridx = 0;\r\n\t\tgbc_label.gridy = 0;\r\n\t\tfrmMultipleChoiceQuestion.getContentPane().add(label, gbc_label);\r\n\r\n\t\t// These are the answers\r\n\t\tint i=0;\r\n\t\tfor (String s : quiz.getAnswers()) {\r\n\t\t\trdbtnAnswers.add(new JRadioButton(s));\r\n\t\t\trdbtnAnswers.get(i).setActionCommand(String.valueOf(i));\r\n\t\t\tbuttonGroup.add(rdbtnAnswers.get(i));\r\n\t\t\tgbc_rdbtnAnswers.add(new GridBagConstraints());\r\n\t\t\tgbc_rdbtnAnswers.get(i).anchor = GridBagConstraints.WEST;\r\n\t\t\tgbc_rdbtnAnswers.get(i).gridx = 0;\r\n\t\t\tgbc_rdbtnAnswers.get(i).gridy = i+1;\r\n\t\t\tfrmMultipleChoiceQuestion.getContentPane().add(rdbtnAnswers.get(i), gbc_rdbtnAnswers.get(i));\r\n\t\t\ti++;\r\n\t\t}\r\n\t\ti++;\r\n\t\t// Confirm button\r\n\t\tJButton btnConfirm = new JButton(\"Confirm\");\r\n\t\tbtnConfirm.addActionListener(new Confirm());\r\n\t\tGridBagConstraints gbc_btnConfirm = new GridBagConstraints();\r\n\t\tgbc_btnConfirm.gridx = 0;\r\n\t\tgbc_btnConfirm.gridy = i;\r\n\t\tfrmMultipleChoiceQuestion.getContentPane().add(btnConfirm, gbc_btnConfirm);\r\n\r\n\t\t// Hint button, will only be displayed if there is a hint\r\n\t\tif (quiz.getHintText() != null || quiz.getHintImage() != null) {\r\n\t\t\tJButton btnHint = new JButton(\"Hint\");\r\n\t\t\tbtnHint.addActionListener(new Hint(quiz));\r\n\t\t\tGridBagConstraints gbc_btnHint = new GridBagConstraints();\r\n\t\t\tgbc_btnHint.gridx = 1;\r\n\t\t\tgbc_btnHint.gridy = i;\r\n\t\t\tfrmMultipleChoiceQuestion.getContentPane().add(btnHint, gbc_btnHint);\r\n\t\t}\r\n\t\t// Citation button\r\n\t\tif (quiz.getAuthor() != null && quiz.getUrl() != null) {\r\n\t\t\tbtnCitation = new JButton(\"Citation\");\r\n\t\t\tbtnCitation.addActionListener(new Citation(quiz));\r\n\t\t\tGridBagConstraints gbc_btnCitation = new GridBagConstraints();\r\n\t\t\tgbc_btnCitation.gridx = 2;\r\n\t\t\tgbc_btnCitation.gridy = i;\r\n\t\t\tfrmMultipleChoiceQuestion.getContentPane().add(btnCitation, gbc_btnCitation);\r\n\t\t}\r\n\t}", "public void initializeEditingBox() {\r\n //editing mode elements\r\n editBox.setWidth(200);\r\n editBox.setHeight(380);\r\n editBox.setArcHeight(10);\r\n editBox.setArcWidth(10);\r\n editBox.setFill(Color.WHITESMOKE);\r\n editBox.setStroke(Color.BLACK);\r\n editBox.setOpacity(0.98);\r\n\r\n DiverseUtils.initializeTextField(nameField, editBox, 10, 30, nameText, 0, -5, state.getName());\r\n nameField.textProperty().addListener(nameChangeListener);\r\n nameField.setOnAction(nameChangeEventHandler);\r\n nameField.focusedProperty().addListener(nameFocusChangeListener);\r\n\r\n DiverseUtils.initializeTextField(commentField, editBox, 10, 90, commentText, 0, -5, state.getComment(), state.commentProperty());\r\n\r\n DiverseUtils.initializeTextField(enterField, editBox, 10, 150, enterText, 0, -5, state.getEnter(), state.enterProperty());\r\n\r\n DiverseUtils.initializeTextField(leaveField, editBox, 10, 210, leaveText, 0, -5, state.getLeave(), state.leaveProperty());\r\n\r\n //TODO use the mousewheel for changing elements in comboboxes\r\n typeComboBox.getItems().addAll(\"Normal\", \"Final\", \"Initial\");\r\n typeComboBox.setValue(\"Normal\");\r\n DiverseUtils.initializeComboBox(typeComboBox, editBox, 50, 330, typeText, 0, -5);\r\n typeComboBox.valueProperty().addListener(typeChangeListener);\r\n\r\n colorComboBox.getItems().addAll(\"Blue\", \"Green\", \"Red\", \"Yellow\", \"Orange\", \"Brown\");\r\n colorComboBox.setValue(\"Blue\");\r\n DiverseUtils.initializeComboBox(colorComboBox, editBox, 10, 270, colorText, 0, -5);\r\n colorComboBox.valueProperty().addListener(colorChangeListener);\r\n\r\n sizeComboBox.getItems().addAll(40, 50, 60, 75, 90, 120);\r\n sizeComboBox.setValue((int) state.getSize());\r\n DiverseUtils.initializeComboBox(sizeComboBox, editBox, 120, 270, sizeText, 0, -5);\r\n sizeComboBox.valueProperty().addListener(sizeChangeListener);\r\n\r\n editingPane.getChildren().add(editBox);\r\n editingPane.getChildren().add(nameField);\r\n editingPane.getChildren().add(nameText);\r\n editingPane.getChildren().add(commentField);\r\n editingPane.getChildren().add(commentText);\r\n editingPane.getChildren().add(enterField);\r\n editingPane.getChildren().add(enterText);\r\n editingPane.getChildren().add(leaveField);\r\n editingPane.getChildren().add(leaveText);\r\n editingPane.getChildren().add(colorComboBox);\r\n editingPane.getChildren().add(colorText);\r\n editingPane.getChildren().add(sizeComboBox);\r\n editingPane.getChildren().add(sizeText);\r\n editingPane.getChildren().add(typeComboBox);\r\n editingPane.getChildren().add(typeText);\r\n }", "public String init() {\n\t\ttry{\n\t\t for (int i = 0; i < table_names.size(); i++)\n\t\t combo_box.addItem(table_names.get(count++));\n\t }\n\t\t//if the ArrayList of table_names is empty, then it will throw a NullPointerException\n\t\tcatch (NullPointerException nullpointer){\n\t\t\tnullpointer.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t text_box.setEditable(false);\n\t//\t select_table.addActionListener(new ActionListener() {\n\t//\t public void actionPerformed(ActionEvent e) {\n\t//\t if (count < table_names.size())\n\t//\t combo_box.addItem(table_names.get(count++));\n\t//\t }\n\t//\t });\n\t\t combo_box.addActionListener(new ActionListener() {\n\t\t public void actionPerformed(ActionEvent e) {\n\t\t text_box.setText(\"\"+ ((JComboBox) e.getSource()).getSelectedItem());\n\t\t table_name=(String) ((JComboBox) e.getSource()).getSelectedItem();\n\t\t }\n\t\t });\n\t\t if (table_name!=\"\"){\n\t\t \tset_table_name(table_name);\n\t\t \treturn table_name;\n\t\t }\n\t\t else\n\t\t \treturn \"\";\n\t\t}\n\t \n\t }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n \r\n partType = new ToggleGroup();\r\n modPartInHouse.setToggleGroup(partType);\r\n modPartOutsourced.setToggleGroup(partType); \r\n \r\n Part selectedPart = getSelectedPart();\r\n int ID = getSelectedPart().getId();\r\n \r\n modPartID.setText(\"Auto Gen - \" + ID);\r\n modPartName.setText(selectedPart.getName()); \r\n modPartInv.setText(Integer.toString(selectedPart.getStock()));\r\n modPartPrice.setText(Double.toString(selectedPart.getPrice()));\r\n modPartMax.setText(Integer.toString(selectedPart.getMax()));\r\n modPartMin.setText(Integer.toString(selectedPart.getMin()));\r\n \r\n if (selectedPart instanceof InHouse) {\r\n modPartInHouse.setSelected(true);\r\n machineIdText.setText(\"Machine ID\");\r\n modPartMachineID.setText(Integer.toString(((InHouse)selectedPart).getMachineID()));\r\n }\r\n else {\r\n modPartOutsourced.setSelected(true);\r\n machineIdText.setText(\"Company\");\r\n modPartMachineID.setText(((OutSourced)selectedPart).getCompanyName());\r\n }\r\n }", "private void initialize() {\r\n this.setSize(new Dimension(800,600));\r\n this.setContentPane(getJPanel());\r\n\r\n List<String> title = new ArrayList<String>();\r\n title.add(\"Select\");\r\n title.add(\"Field Id\");\r\n title.add(\"Field Name\");\r\n title.add(\"Field Type\");\r\n title.add(\"Image\");\r\n\r\n List<JComponent> componentList = new ArrayList<JComponent>();\r\n componentList.add(checkInit);\r\n componentList.add(fieldIdInit);\r\n componentList.add(filedNameInit);\r\n componentList.add(fieldTypeInit);\r\n componentList.add(imageButton);\r\n\r\n String []arrColumn = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n String []arrTitle = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n // init grid\r\n grid = new GridUtils(pageSheet, title, componentList, arrColumn, preButton, afterButton, 5, arrTitle);\r\n // set title\r\n grid.setPageInfo(pageInfoLbl);\r\n \r\n searchDetailList();\r\n \r\n initComboBox();\r\n \r\n setTitle(\"Page Select page\");\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n gender.getItems().setAll(\"laki-laki\",\"perempuan\");\n status.getItems().setAll(\"admin\",\"user\");\n // bind the selected fruit label to the selected fruit in the combo box.\n //selectedFruit.textProperty().bind(fruitCombo.getSelectionModel().selectedItemProperty());\n\n\n }", "private void fillChoicebox(String item, ChoiceBox cBox) {\n List<Component> test = cRegister.searchRegisterByName(item);\n ObservableList<String> temp = FXCollections.observableArrayList();\n temp.add(\"Ikke valgt\");\n for (Component i : test) {\n temp.add(i.getNavn());\n }\n\n cBox.setItems(temp);\n cBox.setValue(\"Ikke valgt\");\n }", "private void init() {\n setText(\"Case Name\");\n createFieldsComp();\n GuiUtil.addSeparator(shell, SWT.HORIZONTAL);\n createBottomActionButtons();\n }", "public PSKeywordChoice()\n {\n }", "private void buttonInit(){\n for(int i=0; i < 3; i++){\n choice[i] = new JButton();\n\n }\n choice[0].setText(\"10x10 / 8 bombs\");\n choice[0].setBackground(new Color(86, 160, 189));\n\n\n choice[0].addActionListener(l-> makeGamePanel(10, 8));\n\n choice[1].setText(\"15x15 / 30 bombs\");\n choice[1].setBackground(new Color(238, 160, 160));\n\n\n choice[1].addActionListener(l-> makeGamePanel(15,30));\n\n choice[2].setText(\"24x24 / 70 bombs\");\n choice[2].setBackground(new Color(253, 230, 122));\n choice[2].setFont(new Font(Font.MONOSPACED, Font.BOLD, 30));\n choice[2].setForeground(new Color(45, 68, 73));\n\n choice[2].addActionListener(l-> makeGamePanel(24,70));\n\n this.add(choice[0], BorderLayout.LINE_START); this.add(choice[1], BorderLayout.LINE_END); this.add(choice[2], BorderLayout.CENTER);\n }", "@FXML\n public void initialize() {\n incorrect.setVisible(false);\n numQuestions = IntroScene.getTotalNumber();\n currentQuestion = 1;\n System.out.println(numQuestions);\n gen = new QuestionGen();\n setQuestion();\n }", "private void preLoadTheApplicationWithData() throws IOException, ParseException {\n constructorMutator.getAllTheConstructorInformation(GlobalF1.FORMULA_ONE_RESOURCES_DIR, GlobalF1.SAVED_JSON_DIR);\n\n fillConstructorFields();\n\n // Fetch the ArrayList + Fill the Choicebox with data\n ArrayList<Constructor> listOfAllConstructors = constructorMutator.getConstructorsList();\n ArrayList<String> cNames = new ArrayList<>();\n // Java 8 Streaming\n listOfAllConstructors.stream().forEach(list -> {\n String name = list.getConstructorName();\n cNames.add(name);\n });\n constructorsChoicebox.setItems(FXCollections.observableArrayList(cNames));\n constructorsChoicebox.getSelectionModel().selectFirst();\n }", "void setupSpinner() {\n\n Spinner spinner = (Spinner) findViewById(R.id.language_spinner);\n\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.language_array, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(adapter);\n\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // Radio button\n radioButton();\n }", "public void initComponents() {\n//metoda gatherBrandSet z klasy CarManager przyjmuje polaczenie do bazy\n carManager.gatherBrandSet(connectionManager.getStatement());\n//petla iterujaca po elementach zbioru marek i dodajaca elementy do listy\n carBrandList.removeAll(carBrandList);\n for(String o: carManager.getBrandSet()){\n\n carBrandList.add(o);\n }\n\n//ustawianie listy jako ChoiceBox w GUI\n brandCBox.setItems(carBrandList);\n\n//Marka Box wrazliwa na zmiany\n brandCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n//przesylanie wyboru Marki do CarManager\n carManager.setBrandChoice((String) brandCBox.getValue());\n carManager.gatherModelSet(connectionManager.getStatement());\n//Czyszczenie listy i dodawanie nowych obiektow z ModelSet do ModelList\n carModelList.removeAll(carModelList);\n for (String p : carManager.getModelSet())\n carModelList.add(p);\n\n modelCBox.setItems(carModelList);\n// Listener do zmiany Modelu\n modelCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n//Ustawianie wartosci wybranej z przycisku\n carManager.setMarkaChoice((String) modelCBox.getValue());\n// Mechaniz wyboru silnika\n carManager.gatherEngineSet(connectionManager.getStatement());\n\n\n carEngineList.removeAll(carEngineList);\n for(String p: carManager.getEngineSet())\n carEngineList.add(p);\n\n engineCBox.setItems(carEngineList);\n engineCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n carManager.setEngineChoice(String.valueOf(engineCBox.getValue()));\n }\n });\n\n\n }\n });\n\n }\n });\n//Pobieranie Elementow z bazy\n elementManager.gatherElementSet(connectionManager.getStatement());\n\n servActivities.setItems(carActivityList);\n servActivities.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n\n\n }\n });\n\n carElementList.removeAll(carModelList);\n for(String p: elementManager.getElementSet())\n carElementList.add(p);\n\n elementActivities.setItems(carElementList);\n elementActivities.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n elementManager.setElementChoice(String.valueOf(elementActivities.getValue()));\n\n }\n });\n//Ustawianie lat\n yearList.removeAll(yearList);\n for(int i = 2017; i> 1970; i--){\n yearList.add(i);\n }\n yearCBox.setItems(yearList);\n //Przypisywanie do zmiennej\n yearCBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {\n @Override\n public void changed(ObservableValue observable, Object oldValue, Object newValue) {\n carManager.setYearChoice(0);\n carManager.setYearChoice(Integer.valueOf(String.valueOf(yearCBox.getValue())));\n }\n });\n\n}", "private void initialize() {\r\n\t\t\r\n\t\tfinal List<Caixa> listaCaixa = new CaixaService(JPAUtil.createEntityManager()).getList();\r\n\t\t\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 321, 190);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tfinal JComboBox cmbCaixa = new JComboBox();\r\n\t\tcmbCaixa.setBounds(10, 11, 285, 20);\r\n\t\tframe.getContentPane().add(cmbCaixa);\r\n\t\t\r\n\t\tString[] itensCombo = new String[listaCaixa.size()];\r\n\t\tfor(int i=0;i<listaCaixa.size();i++) {\r\n\t\t\titensCombo[i]=listaCaixa.get(i).getNome();\r\n\t\t}\r\n\t\t\r\n\t\tDefaultComboBoxModel<String> comboBoxModel = new DefaultComboBoxModel<String>(itensCombo);\r\n\t\tcmbCaixa.setModel(comboBoxModel);\r\n\t\t\r\n\t\t\r\n\t\tJButton btnVerTodos = new JButton(\"Ver todos os caixas\");\r\n\t\tbtnVerTodos.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tTelaCaixaVendaRelatorio tela = new TelaCaixaVendaRelatorio();\r\n\t\t\t\ttela.getFrame().setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVerTodos.setBounds(10, 117, 285, 23);\r\n\t\tframe.getContentPane().add(btnVerTodos);\r\n\t\t\r\n\t\tJButton btnVerCaixaSelecionado = new JButton(\"Ver caixa selecionado\");\r\n\t\tbtnVerCaixaSelecionado.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTelaCaixaVendaRelatorio telaCaixaVendaRelatorio = new TelaCaixaVendaRelatorio(listaCaixa.get(cmbCaixa.getSelectedIndex()));\r\n\t\t\t\t\ttelaCaixaVendaRelatorio.getFrame().setVisible(true);\r\n\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVerCaixaSelecionado.setBounds(10, 83, 285, 23);\r\n\t\tframe.getContentPane().add(btnVerCaixaSelecionado);\r\n\t}", "private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n manageCompoundJButton = new javax.swing.JButton();\r\n enterpriseLabel = new javax.swing.JLabel();\r\n valueLabel = new javax.swing.JLabel();\r\n drugComboBox = new javax.swing.JComboBox();\r\n\r\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\r\n\r\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\r\n jLabel1.setText(\"My Work Area -Supplier Role\");\r\n add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 40, -1, -1));\r\n\r\n manageCompoundJButton.setText(\"Manage Compound\");\r\n manageCompoundJButton.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n manageCompoundJButtonActionPerformed(evt);\r\n }\r\n });\r\n add(manageCompoundJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 290, -1, -1));\r\n\r\n enterpriseLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\r\n enterpriseLabel.setText(\"EnterPrise :\");\r\n add(enterpriseLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 90, 120, 30));\r\n\r\n valueLabel.setText(\"<value>\");\r\n add(valueLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 100, 130, -1));\r\n\r\n drugComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n add(drugComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 210, 210, -1));\r\n }" ]
[ "0.7240923", "0.69382423", "0.68639135", "0.68554926", "0.6732543", "0.6713188", "0.6572513", "0.65270585", "0.65246475", "0.65041816", "0.64961976", "0.647117", "0.6467898", "0.64526385", "0.6448986", "0.6425878", "0.6416316", "0.64101076", "0.6393951", "0.637291", "0.63586783", "0.6350338", "0.6350155", "0.6335343", "0.63075036", "0.6291184", "0.62791735", "0.6277546", "0.6257424", "0.62573737", "0.62546045", "0.62350315", "0.6208927", "0.6196942", "0.6196773", "0.61888266", "0.61882496", "0.61791134", "0.6178849", "0.61746186", "0.6174108", "0.61705214", "0.6148794", "0.61357623", "0.61223423", "0.61124897", "0.60988855", "0.6098366", "0.6078636", "0.6068696", "0.6063849", "0.60393625", "0.60332733", "0.6011368", "0.6010629", "0.6010365", "0.59997964", "0.59897393", "0.5985167", "0.5982616", "0.5965374", "0.59642726", "0.5961237", "0.5959912", "0.5955606", "0.5954672", "0.59509164", "0.59494066", "0.59410256", "0.59296715", "0.5928987", "0.59286344", "0.5926943", "0.59244615", "0.5921457", "0.59208107", "0.5920568", "0.59137845", "0.59091276", "0.59019417", "0.58985424", "0.5893849", "0.5881385", "0.5876011", "0.5875265", "0.5875078", "0.5870307", "0.5866567", "0.58651346", "0.5862471", "0.5856942", "0.5855877", "0.5846046", "0.5831512", "0.58261687", "0.58251435", "0.5822193", "0.58203685", "0.581686", "0.58126694" ]
0.7935089
0
convert an array of bytes to an hexadecimal string
public static String toHexString(byte b[]) { int pos = 0; char[] c = new char[b.length * 2]; for (int i = 0; i < b.length; i++) { c[pos++] = toHex[(b[i] >> 4) & 0x0F]; c[pos++] = toHex[b[i] & 0x0f]; } return new String(c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String bytesToHex(byte[] array) {\n StringBuffer hexString = new StringBuffer();\n for (int i = 0; i < array.length; i++) {\n String hex = Integer.toHexString(0xff & array[i]);\n if(hex.length() == 1) hexString.append('0');\n hexString.append(hex);\n }\n return hexString.toString();\n }", "public static String toHexString(byte[] array) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"0x\").append(DatatypeConverter.printHexBinary(array));\n return sb.toString();\n }", "public static String bytetohex(byte[] bytearray) {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tfor (byte b : bytearray) {\n\t\t\tString x = Integer.toHexString((int) (b & 0xFF));\n\t\t\tif (x.length() == 1) {\n\t\t\t\tsb.append(String.valueOf(0));\n\t\t\t}\n\t\t\tsb.append(x);\n\t\t}\n\t\tif (sb.length() % 2 != 0) {\n\t\t\tsb.insert(0, 0);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static String toHexString(byte[] array) {\n return DatatypeConverter.printHexBinary(array).toUpperCase();\n }", "public static String toHex(byte[] array) {\n BigInteger bi = new BigInteger(1, array);\n String hex = bi.toString(16);\n int paddingLength = (array.length * 2) - hex.length();\n if (paddingLength > 0)\n return String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\n else\n return hex;\n }", "private String ByteArrayToHexString(byte [] inarray) {\n int i, j, in;\n String [] hex = {\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\"};\n String out= \"\";\n\n for(j = 0 ; j < inarray.length ; ++j)\n {\n in = (int) inarray[j] & 0xff;\n i = (in >> 4) & 0x0f;\n out += hex[i];\n i = in & 0x0f;\n out += hex[i];\n }\n return out;\n }", "public static String toHex(byte[] array) {\n\t\tBigInteger bi = new BigInteger(1, array);\n\t\tString hex = bi.toString(16);\n\t\tint paddingLength = (array.length * 2) - hex.length();\n\t\tif (paddingLength > 0) {\n\t\t\tString format = \"%0\" + paddingLength + \"d\";\n\t\t\treturn String.format(format, 0) + hex;\n\t\t} else {\n\t\t\treturn hex;\n\t\t}\n\t}", "private static String toHex(byte[] array)\n\t {\n\t BigInteger bi = new BigInteger(1, array);\n\t String hex = bi.toString(16);\n\t int paddingLength = (array.length * 2) - hex.length();\n\t if(paddingLength > 0)\n\t return String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\n\t else\n\t return hex;\n\t }", "public static String bytetohex(byte[] bytearray) {\n\t\tStringBuilder build = new StringBuilder();\n\t\tfor (var bte : bytearray) {\n\t\t\tbuild.append(nibbleToChar((byte) ((bte & 240) >>> 4)));\n\t\t\tbuild.append(nibbleToChar((byte) (bte & 15)));\n\t\t}\n\t\treturn build.toString();\n\t}", "private static String toHex(byte[] array) {\r\n\t\tBigInteger bi = new BigInteger(1, array);\r\n\t\tString hex = bi.toString(16);\r\n\t\tint paddingLength = (array.length * 2) - hex.length();\r\n\t\tif (paddingLength > 0)\r\n\t\t\treturn String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\r\n\t\telse\r\n\t\t\treturn hex;\r\n\t}", "private String toHex(byte[] bytes) {\n StringBuilder s = new StringBuilder(bytes.length * 2);\n for (byte b : bytes) {\n s.append(String.format(\"%02x\", b));\n }\n return s.toString();\n }", "private static String toHex(final byte[] array) {\n final BigInteger bi = new BigInteger(1, array);\n final String hex = bi.toString(16);\n final int paddingLength = (array.length * 2) - hex.length();\n if (paddingLength > 0) {\n return String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\n } else {\n return hex;\n }\n }", "private static String toHex(byte[] array) {\r\n BigInteger bi = new BigInteger(1, array);\r\n String hex = bi.toString(16);\r\n int paddingLength = (array.length * 2) - hex.length();\r\n if (paddingLength > 0) {\r\n return String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\r\n } else {\r\n return hex;\r\n }\r\n }", "public static String byteArrayToHexString(byte[] a) \r\n{\r\n\tStringBuilder sb = new StringBuilder(a.length * 2);\r\n\tfor(byte b: a)\r\n\tsb.append(String.format(\"%02x\", b));\r\n\treturn sb.toString();\r\n}", "private String toHex(byte[] array)\n {\n BigInteger bi = new BigInteger(1, array);\n String hex = bi.toString(16);\n int paddingLength = (array.length * 2) - hex.length();\n if(paddingLength > 0) \n return String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\n else\n return hex;\n }", "private static String toHex(byte[] array) throws NoSuchAlgorithmException {\n\n BigInteger bi = new BigInteger(1, array);\n String hex = bi.toString(16);\n int paddingLength = (array.length * 2) - hex.length();\n if (paddingLength > 0) {\n return String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\n } else {\n return hex;\n }\n }", "private static String bytesToHex(byte[] bytes) {\n StringBuilder result = new StringBuilder();\n\n for (byte byt : bytes) {\n result.append(Integer.toString((byt & 0xff) + 0x100, 16).substring(1));\n }\n\n return result.toString();\n }", "private static String hexify(byte bytes[]) {\n\n char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n\n StringBuilder buf = new StringBuilder(bytes.length * 2);\n for (byte aByte : bytes) {\n buf.append(hexDigits[(aByte & 0xf0) >> 4]);\n buf.append(hexDigits[aByte & 0x0f]);\n }\n return buf.toString();\n }", "private String hexify(byte bytes[]) {\n\n char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n\n StringBuilder buf = new StringBuilder(bytes.length * 2);\n\n for (byte aByte : bytes) {\n buf.append(hexDigits[(aByte & 0xf0) >> 4]);\n buf.append(hexDigits[aByte & 0x0f]);\n }\n\n return buf.toString();\n }", "static public String byteArrayToHexString(byte[] bytes) {\n\t\tStringBuilder sb = new StringBuilder(bytes.length * 2);\n\t\tfor (byte element : bytes) {\n\t\t\tint v = element & 0xff;\n\t\t\tif (v < 16) {\n\t\t\t\tsb.append('0');\n\t\t\t}\n\t\t\tsb.append(Integer.toHexString(v));\n\t\t}\n\t\treturn sb.toString().toUpperCase(Locale.US);\n\t}", "public static String toHex(byte[] b) {\r\n\tStringBuffer buf;\r\n\tint i;\r\n\r\n\tbuf = new StringBuffer(b.length * 2);\r\n\r\n\tfor (i = 0; i < b.length; i++) {\r\n\t buf.append(HEX.charAt((b[i] >> 4) & 15));\r\n\t buf.append(HEX.charAt(b[i] & 15));\r\n\t}\r\n\treturn buf.toString();\r\n }", "public static String bytesToHex(byte[] bytes) {\n Formatter f = new Formatter();\n for (byte b : bytes) {\n f.format(\"%02x\", b);\n }\n return f.toString();\n }", "public static String bytesToHex(byte[] bytes) {\n StringBuffer result = new StringBuffer();\n for (byte byt : bytes) {\n result.append(Integer.toString((byt & 0xff) + 0x100, 16).substring(1));\n }\n return result.toString();\n }", "private static String bytesToHex(byte[] bytes) {\n char[] hexChars = new char[bytes.length * 2];\n for (int j = 0; j < bytes.length; j++) {\n int v = bytes[j] & 0xFF;\n hexChars[j * 2] = hexArray[v >>> 4];\n hexChars[j * 2 + 1] = hexArray[v & 0x0F];\n }\n return new String(hexChars);\n }", "public static String ByteArrayToHexString(byte[] bytes) {\n final char[] hexArray = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};\n char[] hexChars = new char[bytes.length * 2];\n int v;\n for ( int j = 0; j < bytes.length; j++ ) {\n v = bytes[j] & 0xFF;\n hexChars[j * 2] = hexArray[v >>> 4];\n hexChars[j * 2 + 1] = hexArray[v & 0x0F];\n }\n return new String(hexChars);\n }", "public static String toHex(byte[] bytes){\r\n\t\treturn hexEncode(bytes);\r\n\t}", "private String toHex(byte[] data) {\r\n char[] chars = new char[data.length * 2];\r\n for (int i = 0; i < data.length; i++) {\r\n chars[i * 2] = HEX_DIGITS[(data[i] >> 4) & 0xf];\r\n chars[i * 2 + 1] = HEX_DIGITS[data[i] & 0xf];\r\n }\r\n return new String(chars);\r\n}", "public static String byteArrayToHex(byte[] a) {\n StringBuilder sb = new StringBuilder(a.length * 2);\n for(byte b: a)\n sb.append(String.format(\"%02x\", b & 0xff));\n return sb.toString();\n }", "public static final String bytesToHexString(byte[] bArray, int begin, int end) {\n StringBuffer sb = new StringBuffer(bArray.length);\n String sTemp;\n for (int i = begin; i < end; i++) {\n sTemp = Integer.toHexString(0xFF & bArray[i]);\n if (sTemp.length() < 2)\n sb.append(0);\n sb.append(sTemp.toUpperCase());\n sb.append(\" \");\n }\n return sb.toString();\n }", "public static String toHexString(byte[] bytes) {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tfor (byte b : bytes) {\n\t\t\tstringBuilder.append(HEX_ALPHABET[b>>4]);\n\t\t\tstringBuilder.append(HEX_ALPHABET[b]);\n\t\t}\n\t\treturn stringBuilder.toString();\n\t}", "public static String byteArrayToHexString(byte[] value) {\r\n String ret = \"\";\r\n\r\n for (int i = value.length - 1; i >= 0; i--) {\r\n ret = ret.concat(Integer.toHexString((value[i] & 0xFF) | 0x100).substring(1, 3));\r\n }\r\n\r\n return ret;\r\n }", "private static String bytesToHex(byte[] bytes) {\n final char[] hexArray = {'0', '1', '2', '3', '4', '5', '6', '7', '8',\n '9', 'A', 'B', 'C', 'D', 'E', 'F'};\n char[] hexChars = new char[bytes.length * 2];\n int v;\n for (int j = 0; j < bytes.length; j++) {\n v = bytes[j] & 0xFF;\n hexChars[j * 2] = hexArray[v >>> 4];\n hexChars[j * 2 + 1] = hexArray[v & 0x0F];\n }\n return new String(hexChars);\n }", "public static String toHex(byte[] data) {\n\t\tStringBuilder builder = new StringBuilder(data.length * 3);\n\t\tfor (byte b : data) {\n\t\t\tint v = b & 0xFF;\n\t\t\t// Get the first then second character\n\t\t\tbuilder.append(HEX_ARRAY[v >>> 4]);\n\t\t\tbuilder.append(HEX_ARRAY[v & 0x0F]);\n\t\t\tbuilder.append(' ');\n\t\t}\n\t\treturn builder.toString().trim();\n\t}", "public static String bytesToHex(byte[] bytes){\n if(bytes == null)\n throw new NullPointerException();\n String result = \"\";\n for(byte b: bytes){\n String tmp = Integer.toHexString(b & 0xFF);\n if(tmp.length() == 1)\n result += \"0\";\n result += tmp;\n }\n return result;\n }", "private String toHexString(byte[] bytes) {\n StringBuilder hexString = new StringBuilder();\n for (int i = 0; i < bytes.length; i++) {\n String hex = Integer.toHexString(0xFF & bytes[i]);\n if (hex.length() == 1) {\n hexString.append('0');\n }\n hexString.append(hex);\n }\n\n return hexString.toString().toUpperCase();\n }", "public static String byteArrayToHex(byte[] bytes) {\n if (bytes == null) {\n throw new IllegalArgumentException((\"'bytes' must not be null\"));\n }\n\n StringBuilder sb = new StringBuilder(bytes.length * 2);\n for (byte b : bytes) {\n sb.append(format(\"%02x\", b));\n }\n return sb.toString();\n }", "@NotNull\n public static String convertBytesToHex(@NotNull byte[] value) {\n checkNotNull(value);\n int len = value.length;\n char[] buff = new char[len + len];\n char[] hex = HEX;\n for (int i = 0; i < len; i++) {\n int c = value[i] & 0xff;\n buff[i + i] = hex[c >> 4];\n buff[i + i + 1] = hex[c & 0xf];\n }\n return new String(buff);\n }", "public static String byteArrayToHexString(byte[] in) {\n\t\tint ch = 0x00;\n\t\tString pseudo[] = {\"0\", \"1\", \"2\",\n\t\t\t\t\"3\", \"4\", \"5\", \"6\", \"7\", \"8\",\n\t\t\t\t\"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"};\n\n\t\tStringBuffer out = new StringBuffer(in.length*2);\n\t\tfor (int i = 0; i < in.length; i++) {\n\t\t\tch = ((in[i] & 0xF0) >> 4);\n\t\t\tch = (ch & 0x0F);\n\t\t\tout.append(pseudo[ch]);\n\t\t\tch = (in[i] & 0x0F);\n\t\t\tout.append(pseudo[ch]);\n\t\t}\n\t\treturn new String(out);\n\t}", "public static String bytetohex(byte[] byteArray) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < byteArray.length; i++) {\n\t\t\tsb.append(String.format(\"%02x\", 0xFF & (int) byteArray[i]));\n\t\t}\n\t\treturn sb.toString().toLowerCase();\n\t}", "public String byte2hex(byte[] b) {\n String hs = \"\";\n String stmp = \"\";\n for (int n = 0; n < b.length; n++) {\n stmp = (java.lang.Integer.toHexString(b[n] & 0XFF));\n if (stmp.length() == 1) {\n hs = hs + \"0\" + stmp;\n } else {\n hs = hs + stmp;\n }\n\n if (n < b.length - 1) {\n hs = hs + \"\";\n }\n }\n\n return hs;\n }", "public static String byteArrayToHexString(byte[] bytes) {\n // Solution copied from https://stackoverflow.com/questions/9655181\n char[] hexChars = new char[bytes.length * 2];\n for (int j = 0; j < bytes.length; j++) {\n int v = bytes[j] & 0xFF;\n hexChars[j * 2] = Normal.DIGITS_16_UPPER[v >>> 4];\n hexChars[j * 2 + 1] = Normal.DIGITS_16_UPPER[v & 0x0F];\n }\n return new String(hexChars);\n }", "private String convertToHex(byte[] raw) {\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < raw.length; i++) {\n sb.append(Integer.toString((raw[i] & 0xff) + 0x100, 16).substring(1));\n }\n return sb.toString();\n }", "public static String byteArrayToHexStr(byte[] data)\r\n {\r\n\tString output = new String();\r\n\tString tempStr = new String();\r\n\tint tempInt = 0;\r\n\r\n\tfor(int a = 0; a < data.length; a++)\r\n\t {\r\n\t\ttempInt = data[a]&0xFF;\r\n\t\ttempStr = Integer.toHexString(tempInt);\r\n\r\n\t\tif(tempStr.length() == 1)\r\n\t\t tempStr = \"0\" + tempStr;\r\n\r\n\t\toutput += tempStr;\r\n\t }\r\n\treturn output;\r\n }", "private static String byteArrayToHexString(byte[] b) {\n StringBuffer sb = new StringBuffer(b.length * 2);\n for (byte element : b) {\n int v = element & 0xff;\n if(v < 16) {\n sb.append('0');\n }\n sb.append(Integer.toHexString(v));\n }\n return sb.toString().toUpperCase();\n }", "public static String toHexadecimal(final byte[] bytes) {\n\t\treturn new String(toHexadecimalChars(bytes));\n\t}", "public static String byte2hex(byte[] b) {\n String hs = \"\";\n String stmp = \"\";\n\n for (int n = 0; n < b.length; n++) {\n stmp = Integer.toHexString(b[n] & 0xFF);\n if (stmp.length() == 1)\n hs += (\"0\" + stmp);\n else\n hs += stmp;\n }\n return hs.toUpperCase();\n }", "public static String bytesToHex(byte[] in) {\n final StringBuilder builder = new StringBuilder();\n for (byte b : in) {\n builder.append(String.format(\"%02x\", b));\n }\n return builder.toString();\n }", "public static String toHex(byte[] bytes)\n {\n\n if (bytes == null)\n {\n return null;\n }\n\n StringBuilder builder = new StringBuilder();\n for (int i = 0; i < bytes.length; i++)\n {\n int value = (int) bytes[i];\n\n builder.append(HEX_CHARS.charAt((value >> 4) & 0x0F));\n builder.append(HEX_CHARS.charAt(value & 0x0F));\n }\n\n return builder.toString();\n }", "public static String\n bytesToHexString(byte[] bytes) {\n if (bytes == null) return null;\n\n StringBuilder ret = new StringBuilder(2*bytes.length);\n\n for (int i = 0 ; i < bytes.length ; i++) {\n int b;\n\n b = 0x0f & (bytes[i] >> 4);\n\n ret.append(HEX_CHARS[b]);\n\n b = 0x0f & bytes[i];\n\n ret.append(HEX_CHARS[b]);\n }\n\n return ret.toString();\n }", "public static String byteArrayToHex(final byte[] arr) {\n final StringBuilder sb = new StringBuilder();\n if (arr != null) {\n for (final byte b : arr) {\n sb.append(byteToHex(b));\n sb.append(\" \");\n }\n }\n return sb.toString().replaceAll(\" $\", \"\");\n }", "public static String bytesToHexString(byte[] bytes) {\n char[] hexChars = new char[bytes.length * 2];\n int v;\n for (int j = 0; j < bytes.length; j++) {\n v = bytes[j] & 0xFF;\n hexChars[j * 2] = hexArray[v >>> 4];\n hexChars[j * 2 + 1] = hexArray[v & 0x0F];\n }\n return new String(hexChars).toUpperCase(Locale.US);\n }", "public static String bytesToHex(byte[] raw) {\n if (raw == null) {\n return null;\n }\n final StringBuilder hex = new StringBuilder(2 * raw.length);\n for (final byte b : raw) {\n hex.append(Character.forDigit((b & 0xF0) >> 4, 16))\n .append(Character.forDigit((b & 0x0F), 16));\n }\n return hex.toString();\n }", "public static String hexToString(byte[] bytes) {\n StringBuffer buff = new StringBuffer();\n for (int i=0; i<bytes.length; i++) {\n int val = bytes[i];\n val = val & 0xff; // remove higher bits, sign\n if (val<16) buff.append('0'); // leading 0\n buff.append(Integer.toString(val, 16));\n }\n return buff.toString();\n }", "public static String convertToHex(byte[] otp) {\n return ByteIterator.ofBytes(otp).hexEncode().drainToString();\n }", "public static String bytesToHexString(byte[] b) {\n\t\treturn bytesToHexString(b,b.length);\n\t}", "public static final String toHexString(byte[] b) {\n return toHexString(b, 0, b.length);\n }", "public static String byteArrayToString(byte[] array) {\n\t\tStringBuilder str = new StringBuilder();\n\t\t\n\t\t//iterate through whole array, convert each element from the array to hexadecimal string form, put a space between elements\n\t\tfor(byte b : array) {\n\t\t\tstr.append(String.format(\"%02X\", b));\n\t\t\tstr.append(\" \");\n\t\t}\n\t\treturn str.toString();\n\t}", "public static String bytes2HexString(byte[] b)\n\t{\n\t byte[] buff = new byte[2 * b.length];\n\t for (int i = 0; i < b.length; i++)\n\t {\n\t\tbuff[2 * i] = hex[(b[i] >> 4) & 0x0f];\n\t\tbuff[2 * i + 1] = hex[b[i] & 0x0f];\n\t }\n\t return new String(buff);\n\t}", "public static String hex(final byte[] data) {\n return hex(data, 0, data.length);\n }", "public static String getHexString (byte[] bytes) {\r\n\t \r\n\t\tStringBuffer sb = new StringBuffer();\r\n\r\n\t for (int i = 0; i < bytes.length; i++) {\r\n\t sb.append(String.format(\"%02x\", bytes[i]).toUpperCase());\r\n\t if (i < (bytes.length - 1))\r\n\t \tsb.append(\"-\");\r\n\t }\r\n\r\n\t return sb.toString();\r\n\t}", "public String bytesToHex(byte[] bytes) {\n\t StringBuilder sbuf = new StringBuilder();\n\t for(int idx=0; idx < bytes.length; idx++) {\n\t int intVal = bytes[idx] & 0xff;\n\t if (intVal < 0x10) sbuf.append(\"0\");\n\t sbuf.append(Integer.toHexString(intVal).toUpperCase());\n\t }\n\t return sbuf.toString();\n\t }", "public static String toHexString(byte[] b) {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor (int i = 0; i < b.length; i++) {\r\n\t\t\tsb.append(hexCharsLowerCase[ (int)(((int)b[i] >> 4) & 0x0f)]);\r\n\t\t\tsb.append(hexCharsLowerCase[ (int)(((int)b[i]) & 0x0f)]);\r\n\t\t}\r\n\t return sb.toString(); \r\n\t}", "public static String byteToHex(byte[] bytes) {\n\t\tchar[] hexChars = new char[bytes.length * 2];\n\t\tfor (int i = 0; i < bytes.length; i++) {\n\t\t\tint j = bytes[i] & 0xFF;\n\t\t\thexChars[i * 2] = hexLookup[j >>> 4];\n\t\t\thexChars[i * 2 + 1] = hexLookup[j & 0x0F];\n\t\t}\n\t\treturn new String(hexChars);\n\t}", "private static String byteArrayToHexString(byte[] byteArray) {\n\t\t\n\t\t//Initialize the string buffer\n\t\tStringBuffer stringBuffer = new StringBuffer(byteArray.length * 2);\n\t\t\n\t\t//Start constructing the byte array\n\t\tstringBuffer.append(\"[ \");\n\t\t\n\t\t//For all the bytes in the array\n\t\tfor (int i = 0; i < byteArray.length; i++) {\n\t\t\t\n\t\t\t//Convert the byte to an integer\n\t\t\tint v = byteArray[i] & 0xff;\n\t\t\t\n\t\t\t//Left shift\n\t\t\tif (v < 16) {\n\t\t\t\tstringBuffer.append('0');\n\t\t\t}\n\t\t\t\n\t\t\t//Add the hex string representation of the byte \n\t\t\tstringBuffer.append(\"0x\" + Integer.toHexString(v).toUpperCase() + \" \");\n\t\t}\n\t\t\n\t\t//Close the byte array string\n\t\tstringBuffer.append(\"]\");\n\t\t\n\t\t//Convert the string buffer to a string a return it\n\t\treturn stringBuffer.toString();\n\t}", "public static String byteArrayToHexString(byte[] b) {\n StringBuffer buf = new StringBuffer();\n for (int i = 0; i < b.length; i++) {\n buf.append(byteToHexString(b[i]));\n }\n return buf.toString();\n }", "public static final String toHex(byte hash[]) {\r\n StringBuffer buf = new StringBuffer(hash.length * 2);\r\n int i;\r\n\r\n for (i = 0; i < hash.length; i++) {\r\n if (((int) hash[i] & 0xff) < 0x10) {\r\n buf.append(\"0\");\r\n }\r\n buf.append(Long.toString((int) hash[i] & 0xff, 16));\r\n }\r\n return buf.toString();\r\n }", "private static String convertToHex(byte[] data) {\r\n StringBuffer buf = new StringBuffer();\r\n for (int i = 0; i < data.length; i++) {\r\n int halfbyte = (data[i] >>> 4) & 0x0F;\r\n int two_halfs = 0;\r\n do {\r\n if ((0 <= halfbyte) && (halfbyte <= 9)) {\r\n buf.append((char) ('0' + halfbyte));\r\n }\r\n else {\r\n buf.append((char) ('a' + (halfbyte - 10)));\r\n }\r\n halfbyte = data[i] & 0x0F;\r\n } while(two_halfs++ < 1);\r\n }\r\n return buf.toString();\r\n }", "private static String toHex(byte buffer[]) {\n\t\tStringBuffer sb = new StringBuffer(buffer.length * 2);\n\t\tfor (int i = 0; i < buffer.length; i++) {\n\t\t\tsb.append(Character.forDigit((buffer[i] & 0xf0) >> 4, 16));\n\t\t\tsb.append(Character.forDigit(buffer[i] & 0x0f, 16));\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static String formatHexBytes(byte[] raw) {\n StringBuffer buffer;\n final char[] hexDigits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };\n int i;\n int value;\n buffer = new StringBuffer(raw.length * 2);\n for (i = 0; i < raw.length; i++) {\n value = raw[i];\n buffer.append(hexDigits[(value >> 4) & 0x0F]);\n buffer.append(hexDigits[value & 0x0F]);\n }\n return (buffer.toString());\n }", "private static String toHex(byte[] hash) {\n StringBuilder hashedInput = new StringBuilder(\"\");\n for (int i = 0; i < hash.length; i++) {\n String hex = Integer.toHexString(0xff & hash[i]);\n if (hex.length() == 1) {\n hashedInput.append('0');\n }\n hashedInput.append(hex);\n }\n return hashedInput.toString();\n }", "public static String encodeHexString(byte[] byteArray) {\n StringBuffer hexStringBuffer = new StringBuffer();\n for (byte b : byteArray) {\n hexStringBuffer.append(byteToHex(b));\n }\n return hexStringBuffer.toString();\n }", "private static String convertToHex(byte[] data) throws IOException {\n //create new instance of string buffer\n StringBuffer stringBuffer = new StringBuffer();\n String hex = \"\";\n\n //encode byte data with base64\n hex = Base64.getEncoder().encodeToString(data);\n stringBuffer.append(hex);\n\n //return string\n return stringBuffer.toString();\n }", "public static String hex(final byte[] data, final int offset, final int length) {\n Validate.notInBounds(data, offset, length);\n if (length == 0) {\n return \"\";\n }\n int endIndex = offset + length;\n char[] buf = new char[length << 1];\n\n int srcIdx = offset;\n int dstIdx = 0;\n for (; srcIdx < endIndex; srcIdx++, dstIdx += 2) {\n System.arraycopy(Hexs.HEXDUMP_TABLE, (data[srcIdx] & 0xFF) << 1, buf, dstIdx, 2);\n }\n return new String(buf);\n }", "public static String bytesToHexFun2(byte[] bytes) {\r\n\t\tchar[] buf = new char[bytes.length * 2];\r\n\t\tint index = 0;\r\n\t\tfor (byte b : bytes) { // 利用位运算进行转换\r\n\t\t\tbuf[index++] = HEX_CHAR[b >>> 4 & 0xf];\r\n\t\t\tbuf[index++] = HEX_CHAR[b & 0xf];\r\n\t\t}\r\n\r\n\t\treturn new String(buf);\r\n\t}", "static private String hexEncode(byte[] bytes) {\n StringBuffer result = new StringBuffer();\n for (int i = 0; i < bytes.length; i++) {\n byte b = bytes[i];\n result.append(DIGITS[(b & 0xf0) >> 4]);\n result.append(DIGITS[b & 0x0f]);\n }\n return result.toString();\n }", "public static char[] toHexadecimalChars(final byte[] bytes) {\n\t\tfinal char[] chars = new char[bytes.length * 2];\n\t\tfor (int i = 0, j = 0; i < bytes.length; i++, j += 2) {\n\t\t\tfinal int v = bytes[i] & 0xFF;\n\t\t\tchars[j] = toHexChar(v >>> 4);\n\t\t\tchars[j + 1] = toHexChar(v & 0x0F);\n\t\t}\n\t\treturn chars;\n\t}", "public static String toHexStringWithSpace(byte[] bytes) {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tfor (byte b : bytes) {\n\t\t\tstringBuilder.append(HEX_ALPHABET[0xF & (b>>4)]);\n\t\t\tstringBuilder.append(HEX_ALPHABET[0xF & b]);\n\t\t\tstringBuilder.append(' ');\n\t\t}\n\t\treturn stringBuilder.toString();\n\t}", "private static String toHex(byte[] digest) {\n\t\tchar[] result = new char[digest.length * 2];\n\t\tint pos = 0;\n\t\tfor (int i = 0; i < digest.length; i++) {\n\t\t\tresult[pos++] = hexChar((digest[i] & 0xf0) >> 4);\n\t\t\tresult[pos++] = hexChar(digest[i] & 0x0f);\n\t\t}\n\t\treturn new String(result);\n\t}", "public static String byteArrayToHexString(byte[] b) {\n if (b == null)\n return null;\n\n StringBuffer sb = new StringBuffer(b.length * 2);\n for (int i = 0; i < b.length; i++) {\n int v = b[i] & 0xff;\n if (v < 16) {\n sb.append('0');\n }\n sb.append(Integer.toHexString(v));\n }\n return sb.toString().toUpperCase();\n }", "public static String convert(byte[] bytes) {\n/* 34 */ StringBuffer sb = new StringBuffer(bytes.length * 2);\n/* 35 */ for (int i = 0; i < bytes.length; i++) {\n/* 36 */ sb.append(hexs[bytes[i] >> 4 & 0xF]);\n/* 37 */ sb.append(hexs[bytes[i] & 0xF]);\n/* */ } \n/* 39 */ return sb.toString();\n/* */ }", "public static String toHexString(byte[] byteArray) {\n final StringBuilder hexString = new StringBuilder(\"\");\n if (byteArray == null || byteArray.length <= 0)\n return null;\n for (int i = 0; i < byteArray.length; i++) {\n int v = byteArray[i] & 0xFF;\n String hv = Integer.toHexString(v);\n if (hv.length() < 2) {\n hexString.append(0);\n }\n hexString.append(hv);\n }\n return hexString.toString().toLowerCase();\n }", "public static String asHex(byte[] buf) {\n \t char[] HEX_CHARS = \"0123456789abcdef\".toCharArray();\n \t char[] chars = new char[2 * buf.length];\n \t for (int i = 0; i < buf.length; ++i) {\n \t chars[2 * i] = HEX_CHARS[(buf[i] & 0xF0) >>> 4];\n \t chars[2 * i + 1] = HEX_CHARS[buf[i] & 0x0F];\n \t }\n \t return new String(chars);\n \t}", "private static String getHex(byte[] raw) {\n if (raw == null) {\n return null;\n }\n final StringBuilder hex = new StringBuilder(2 * raw.length);\n for (final byte b : raw) {\n hex.append(HEXES.charAt((b & 0xF0) >> 4)).append(\n HEXES.charAt((b & 0x0F)));\n }\n return hex.toString();\n }", "public static String byteArrayToHexString(final byte[] hash) {\n\t\tString rval = \"\";\n\t\tfor (byte aHash : hash) {\n\t\t\trval += FileHashingUtils.byteToHexString(aHash);\n\t\t}\n\n\t\treturn rval;\n\t}", "public static String bytesToHex(byte[] txtInByte) {\n\t\t StringBuilder sb = new StringBuilder(txtInByte.length * 2);\n\t\t for(byte b: txtInByte)\n\t\t sb.append(String.format(\"%02x\", b & 0xff));\n\t\t return sb.toString();\n\t\t}", "public static String bytesToHexString(byte[] b, int len) {\n\t\tString s=new String();\n\t\tfor (int i=0; i<len; i++) {\n\t\t\ts+=Integer.toHexString((((b[i]+256)%256)/16)%16);\n\t\t\ts+=Integer.toHexString(((b[i]+256)%256)%16);\n\t\t}\n\t\treturn s;\n\t}", "public static String binToHexString(byte[] data) {\r\n return binToHexString(data, data.length);\r\n }", "static String createString(byte b[]) {\n\treturn StringConverter.byteToHex(b);\n }", "private static String m5291a(byte[] bArr) {\n StringBuffer stringBuffer = new StringBuffer();\n for (byte b : bArr) {\n String hexString = Integer.toHexString(b & 255);\n if (hexString.length() == 1) {\n stringBuffer.append('0');\n }\n stringBuffer.append(hexString);\n }\n return stringBuffer.toString();\n }", "public static String toHexString(byte... vals) {\n StringBuilder sb = new StringBuilder();\n for (byte v : vals)\n sb.append(toHexString(v));\n return sb.toString();\n }", "public static String rawHexDump(byte[] b)\r\n\t{\r\n\t\tif (b == null)\r\n\t\t\treturn \"\";\r\n\t\t\r\n\t\tint size = b.length;\r\n\t\tif (size == 0)\r\n\t\t\treturn \"\";\r\n\t\t\r\n\t\tStringBuffer buf = new StringBuffer();\r\n\t\tfor (int i=0; i < size; i++)\r\n\t\t{\r\n\t\t\t\tbuf.append(zeropad(Integer.toHexString(byteToUInt(b[i])).toUpperCase(),2));\r\n\t\t\t\tbuf.append(\" \");\r\n\t\t}\r\n\t\tbuf.delete(buf.length()-1,buf.length());\r\n\t\treturn buf.toString();\r\n\t}", "public static String byteToHex(final byte[] hash) {\n if (Objects.isNull(hash)) {\n return null;\n }\n\n Formatter formatter = new Formatter();\n for (byte b : hash) {\n formatter.format(\"%02x\", b);\n }\n String result = formatter.toString();\n formatter.close();\n return result;\n }", "public static String intArrayToHexString(int[] intArray) {\n\n\t\tStringBuffer string = new StringBuffer();\n\t\tfor (int i : intArray) {\n\t\t\tstring.append(Integer.toHexString(i));\n\t\t}\n\t\treturn string.toString();\n\t}", "public static String toHexString(byte[] b)\r\n {\r\n if (b == null)\r\n return null;\r\n \r\n StringBuffer buf = new StringBuffer(b.length * 2);\r\n for (int n = 0; n < b.length; n++)\r\n {\r\n buf.append(m_hex[(b[n] & 0xf0) >>> 4]);\r\n buf.append(m_hex[b[n] & 0x0f]);\r\n }\r\n return buf.toString();\r\n }", "public static String prettyHex(final byte[] data) {\n return prettyHex(data, 0, data.length);\n }", "public static String asString(byte[] in) {\n final StringBuilder builder = new StringBuilder();\n for(byte b : in) {\n builder.append(String.format(\"%02x\", b));\n }\n return builder.toString();\n }", "private String makeHex(byte[] buffer) {\n byte current;\n int length = buffer.length;\n String blank = \"\"; // it's easier to change\n StringBuffer ret = new StringBuffer(2*length);\n\n // do for each half byte\n for(int i=0;i<(2*length);i++)\n {\n\t// mask half byte and move it to the right\n\tcurrent = i%2==1 ? (byte) (buffer[(i/2)] & 0x0F)\n\t : (byte) ((buffer[(i/2)] >> 4) & 0x0F);\n\t\n\t// convert half byte to ASCII char\t\t \n\tret.append((char) (current < 0x0A ? current+0x30 : current+0x37) + (i%2==1 ? blank : \"\"));\n }\n return ret.toString();\n }", "public static String getHexString(byte[] raw, int len) {\r\n\t\tbyte[] hex = new byte[2 * len];\r\n\t\tint index = 0;\r\n\t\tint pos = 0;\r\n\r\n\t\tfor (byte b : raw) {\r\n\t\t\tif (pos >= len)\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tpos++;\r\n\t\t\tint v = b & 0xFF;\r\n\t\t\thex[index++] = HEX_CHAR_TABLE[v >>> 4];\r\n\t\t\thex[index++] = HEX_CHAR_TABLE[v & 0xF];\r\n\t\t}\r\n\r\n\t\treturn new String(hex);\r\n\t}", "public static String toHexString(byte[] b, int offset, int len)\r\n {\r\n if (b == null || b.length <= offset || offset < 0 || len <= 0)\r\n return null;\r\n\r\n StringBuffer buf = new StringBuffer(len * 2);\r\n int limit = Math.min(b.length, len + offset);\r\n for (int n = offset; n < limit; n++)\r\n {\r\n buf.append(m_hex[(b[n] & 0xf0) >>> 4]);\r\n buf.append(m_hex[b[n] & 0x0f]);\r\n }\r\n return buf.toString();\r\n \r\n }", "public String toHexString()\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\tint intCurrent = bytes[i] & 0xFF;\n\t\t\t\n\t\t\t// check to see if a leading 0 is needed\n\t\t\tif (intCurrent < 0x10)\n\t\t\t{\n\t\t\t\t// append a 0\n\t\t\t\tsb.append(0);\n\t\t\t}\n\t\t\t\n\t\t\tString s = Integer.toHexString(intCurrent).toUpperCase();\n\t\t\t\n\t\t\t// append the character\n\t\t\tsb.append(s);\n\t\t}\n\t\t\n\t\t// return the string\n\t\treturn sb.toString();\n\t}" ]
[ "0.8200108", "0.81243706", "0.80722374", "0.79899573", "0.7926233", "0.7890752", "0.78834647", "0.7878727", "0.7844702", "0.78423774", "0.7830724", "0.7818769", "0.7801084", "0.7780483", "0.77411366", "0.77136785", "0.7669858", "0.7649512", "0.7637138", "0.762156", "0.7592566", "0.756596", "0.7564139", "0.7557838", "0.75525326", "0.7543886", "0.75315255", "0.7527459", "0.7501003", "0.74954885", "0.74902236", "0.74771607", "0.7474648", "0.7473194", "0.74620867", "0.7455476", "0.7447906", "0.7441531", "0.74366385", "0.7427705", "0.74234635", "0.7420091", "0.7355576", "0.734206", "0.7338896", "0.73137116", "0.7300555", "0.7285791", "0.7257869", "0.7241236", "0.7231838", "0.7217696", "0.7212523", "0.7206299", "0.7203351", "0.7200057", "0.71996844", "0.71988666", "0.7197967", "0.7181825", "0.71745616", "0.71478784", "0.71406424", "0.7137466", "0.71370703", "0.712585", "0.70935977", "0.7082577", "0.70616007", "0.70569247", "0.70436543", "0.70311296", "0.7018309", "0.6995721", "0.6993191", "0.69149417", "0.6906885", "0.6893332", "0.68900436", "0.6884746", "0.68837005", "0.68805593", "0.6875248", "0.68638974", "0.68569416", "0.68342423", "0.6831042", "0.6830784", "0.68290573", "0.6798499", "0.67785805", "0.6775056", "0.6768825", "0.6751297", "0.6691179", "0.6686034", "0.6680005", "0.66750115", "0.66392595", "0.6624007" ]
0.68838054
80
Put quotes around a string and return it. Any " characters appearing in str are escaped
public static String getQuotedString(String str) { return '"' + str.replace("\"", "\\\"") + '"'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String str(String str) {\n\t\tStringBuffer result = new StringBuffer(\"\\\"\");\n\t\tfor (int i=0; i<str.length(); i++) {\n\t\t\tchar c = str.charAt(i);\n\t\t\tswitch (c) {\n\t\t\t case '\\n':\n\t\t\t\tresult.append(\"\\\\n\");\n\t\t\t\tbreak;\n\t\t\t case '\\t':\n\t\t\t\tresult.append(\"\\\\t\");\n\t\t\t\tbreak;\n\t\t\t case '\\r':\n\t\t\t\tresult.append(\"\\\\r\");\n\t\t\t\tbreak;\n\t\t\t case '\"':\n\t\t\t\tresult.append(\"\\\\\\\"\");\n\t\t\t\tbreak;\n\t\t\t case '\\\\':\n\t\t\t\tresult.append(\"\\\\\\\\\");\n\t\t\t\tbreak;\n\t\t\t default:\n\t\t\t\tresult.append(c);\n\t\t\t}\n\t\t}\n\t\tresult.append('\"');\n\t\treturn result.toString();\n\t}", "public static String quote(String str) {\n return \"\\\"\" + str.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"\\\"\", \"\\\\\\\\\\\"\") + \"\\\"\";\n }", "public static String escapeString(String str, int length) {\n if (str == null)\n \treturn \"\";\n if (str.length() > length)\n \tstr = str.substring(0, length);\n StringTokenizer st = new StringTokenizer(str, \"'\");\n StringBuffer buffer = null;\n for (; st.hasMoreTokens(); buffer.append(st.nextToken()))\n \tif (buffer == null)\n \t\tbuffer = new StringBuffer(str.length() + 20);\n \telse\n \t\tbuffer.append(\"\\'\");\n\n if (buffer == null)\n \treturn str;\n else\n \treturn buffer.toString();\n\t}", "private static String escapeDoubleQuotes(String s) {\n\n if (s == null || s.length() == 0 || s.indexOf('\"') == -1) {\n return s;\n }\n\n StringBuffer b = new StringBuffer();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (c == '\"')\n b.append('\\\\').append('\"');\n else\n b.append(c);\n }\n\n return b.toString();\n }", "protected static String quote(String string) {\n final StringBuilder sb = new StringBuilder(string.length() + 2);\n for (int i = 0; i < string.length(); ++i) {\n final char c = string.charAt(i);\n switch (c) {\n case '\\n':\n sb.append(\"\\\\n\");\n break;\n case '\\\\':\n sb.append(\"\\\\\\\\\");\n break;\n case '\"':\n sb.append(\"\\\\\\\"\");\n break;\n default:\n sb.append(c);\n break;\n }\n }\n return sb.toString();\n }", "static String escape(String str,char quote) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(quote);\n\t\tsb.append(str.replaceAll(Character.toString(quote), \"\\\\\"+quote));\n\t\tsb.append(quote);\n\t\treturn sb.toString();\n\t}", "private String doubleQuote( String raw ) { return '\"' + raw + '\"'; }", "static String getStringJsonEscaped(String str) {\n JsonStringEncoder e = JsonStringEncoder.getInstance();\n StringBuilder sb = new StringBuilder();\n e.quoteAsString(str, sb);\n return sb.toString();\n }", "public static String javaStringEscape(String str)\n {\n test:\n {\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\n':\n case '\\r':\n case '\\\"':\n case '\\\\':\n break test;\n }\n }\n return str;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n switch (ch) {\n default:\n sb.append(ch);\n break;\n case '\\n':\n sb.append(\"\\\\n\");\n break;\n case '\\r':\n sb.append(\"\\\\r\");\n break;\n case '\\\"':\n sb.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n sb.append(\"\\\\\\\\\");\n break;\n }\n }\n return sb.toString();\n }", "public static String convertToQuotedString(String string) {\n\t\tif (TextUtils.isEmpty(string)) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tfinal int lastPos = string.length() - 1;\n\t\tif (lastPos > 0\n\t\t\t\t&& (string.charAt(0) == '\"' && string.charAt(lastPos) == '\"')) {\n\t\t\treturn string;\n\t\t}\n\n\t\treturn \"\\\"\" + string + \"\\\"\";\n\t}", "private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }", "private void writeQuotedAndEscaped(CharSequence string) {\n if (string != null && string.length() != 0) {\n int len = string.length();\n writer.write('\\\"');\n\n for (int i = 0; i < len; ++i) {\n char cp = string.charAt(i);\n if ((cp < 0x7f &&\n cp >= 0x20 &&\n cp != '\\\"' &&\n cp != '\\\\') ||\n (cp > 0x7f &&\n isConsolePrintable(cp) &&\n !isSurrogate(cp))) {\n // quick bypass for direct printable chars.\n writer.write(cp);\n } else {\n switch (cp) {\n case '\\b':\n writer.write(\"\\\\b\");\n break;\n case '\\t':\n writer.write(\"\\\\t\");\n break;\n case '\\n':\n writer.write(\"\\\\n\");\n break;\n case '\\f':\n writer.write(\"\\\\f\");\n break;\n case '\\r':\n writer.write(\"\\\\r\");\n break;\n case '\\\"':\n case '\\\\':\n writer.write('\\\\');\n writer.write(cp);\n break;\n default:\n if (isSurrogate(cp) && (i + 1) < len) {\n char c2 = string.charAt(i + 1);\n writer.format(\"\\\\u%04x\", (int) cp);\n writer.format(\"\\\\u%04x\", (int) c2);\n ++i;\n } else {\n writer.format(\"\\\\u%04x\", (int) cp);\n }\n break;\n }\n }\n }\n\n writer.write('\\\"');\n } else {\n writer.write(\"\\\"\\\"\");\n }\n }", "private String dequote(String str)\n {\n if (str.length() >= 2 && str.charAt(0) == '\"' && str.charAt(str.length()-1) == '\"')\n return str.substring(1, str.length() - 1);\n\n return str;\n }", "public String addQuotes(String s) {\n return String.format(\"'%s'\", s.replaceAll(\"'\", \"''\"));\n }", "public static String unDoubleQuote(String str){\n if(isDoubleQuoted(str)) return trimBothEnds(str,1);\n else return str;\n }", "public static String maskQuoteAndBackslash(String s)\t{\n\t\tStringBuffer sb = new StringBuffer(s.length());\n\t\tfor (int i = 0; i < s.length(); i++)\t{\n\t\t\tchar c = s.charAt(i);\n\t\t\tswitch (c)\t{\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\\\':\n\t\t\t\t\tsb.append('\\\\');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.append(c);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static String quote(String str) {\n return (str != null ? \"'\" + str + \"'\" : null);\n }", "default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }", "private static String quote(final String input) {\n\t return CharUtil.addDoubleQuotes(CharUtil.quoteControl(input));\n\t}", "@Override\r\n\tprotected void convertStringConst(String str) {\r\n\t\tappend(\"\\'\\\"\", str.replace(\"\\'\",\"\\'\\'\"), \"\\\"\\'\");\r\n\t}", "default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }", "private static String quote(String text) {\r\n String result;\r\n if (null == text) {\r\n result = text;\r\n } else {\r\n result = \"\\\"\" + text + \"\\\"\";\r\n }\r\n return result;\r\n }", "public static String replaceQuotes(String orig) {\n return orig.replaceAll(\"'\", \"\\\"\");\n }", "public static String quote(String text) {\n\t\treturn \"\\\"\" + text + \"\\\"\";\n\t}", "public static CharSequence escapeQuotes(final CharSequence input)\n\t{\n\t\tCharSequence s = input;\n\t\tif (s != null)\n\t\t{\n\t\t\ts = Strings.replaceAll(s, \"'\", \"\\\\'\");\n\t\t\ts = Strings.replaceAll(s, \"\\\"\", \"\\\\\\\"\");\n\t\t}\n\t\treturn s;\n\t}", "private static String unquote(String s) {\n int length = s.length();\n if (length >= 2 && s.charAt(0) =='\"' && s.charAt(length - 1) == '\"') {\n return s.substring(1, length - 1);\n }\n return s;\n }", "private final static String stripQuote( String s ) {\n\n char[] ca = s.toCharArray();\n char[] ca2 = new char [ca.length];\n char letter;\n int i2 = 0;\n\n for ( int i=0; i<ca.length; i++ ) {\n letter = ca[i];\n if ( letter != '\"' ) {\n ca2[i2] = letter; // save good letter\n i2++;\n }\n }\n\n char[] ca3 = new char [i2];\n\n for ( int i=0; i<i2; i++ ) {\n letter = ca2[i]; // get from first array\n ca3[i] = letter; // move to correct size array\n }\n\n return new String (ca3);\n\n }", "public static String escapeString(String str) {\n return escapeString(str, 0xf423f);\n\t}", "public static String escape(String input) {\n\t\tboolean insidequote = false;\n\t\tString output = \"\";\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\tchar current = input.charAt(i);\n\t\t\tif (current == '\\'') {\n\t\t\t\tinsidequote = !insidequote;\n\t\t\t\toutput += current;\n\t\t\t} else if (insidequote) {\n\t\t\t\tif (current == ' ') {\n\t\t\t\t\toutput += \"\\\\s\";\n\t\t\t\t} else if (current == '\\t') {\n\t\t\t\t\toutput += \"\\\\t\";\n\t\t\t\t} else if (current == ',') {\n\t\t\t\t\toutput += \"\\\\c\";\n\t\t\t\t} else if (current == '\\\\') {\n\t\t\t\t\toutput += \"\\\\b\";\n\t\t\t\t} else if (current == ';') {\n\t\t\t\t\toutput += \"\\\\p\";\n\t\t\t\t} else if (current == ':') {\n\t\t\t\t\toutput += \"\\\\d\";\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t} // no uppercase inside quoted strings!\n\t\t\t} else {\n\t\t\t\tif (current == ',') {\n\t\t\t\t\toutput += \" , \"; // add spaces around every comma\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}", "public String quote(String s) {\r\n\t\treturn this.getQuotes().concat(s).concat(this.getQuotes());\r\n\t}", "private static String format(String value) {\n String result = value;\n if (result.contains(\"\\\"\")) {\n result = result.replace(\"\\\"\", \"\\\"\\\"\");\n }\n return result;\n\n }", "private static String escape(String arg) {\n int max;\n StringBuilder result;\n char c;\n\n max = arg.length();\n result = new StringBuilder(max);\n for (int i = 0; i < max; i++) {\n c = arg.charAt(i);\n switch (c) {\n case '\\'':\n case '\"':\n case ' ':\n case '\\t':\n case '&':\n case '|':\n case '(':\n case ')':\n case '\\n':\n result.append('\\\\');\n result.append(c);\n break;\n default:\n result.append(c);\n break;\n }\n }\n return result.toString();\n }", "protected String add_escapes(String str) {\n StringBuffer retval = new StringBuffer();\n char ch;\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case 0:\n continue;\n case '\\b':\n retval.append(\"\\\\b\");\n continue;\n case '\\t':\n retval.append(\"\\\\t\");\n continue;\n case '\\n':\n retval.append(\"\\\\n\");\n continue;\n case '\\f':\n retval.append(\"\\\\f\");\n continue;\n case '\\r':\n retval.append(\"\\\\r\");\n continue;\n case '\\\"':\n retval.append(\"\\\\\\\"\");\n continue;\n case '\\'':\n retval.append(\"\\\\\\'\");\n continue;\n case '\\\\':\n retval.append(\"\\\\\\\\\");\n continue;\n default:\n if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {\n String s = \"0000\" + Integer.toString(ch, 16);\n retval.append(\"\\\\u\" + s.substring(s.length() - 4, s.length()));\n } else {\n retval.append(ch);\n }\n continue;\n }\n }\n return retval.toString();\n }", "private String stripQuotes(String word) {\n\t\tString workWord = new String (word);\n\t\tif (workWord != null && workWord.length() > 1) {\n\t\t\tif (workWord.endsWith(new String(\"\\'\")) || workWord.endsWith(new String(\"\\\"\"))) {\n\t\t\t\tworkWord = workWord.substring(0, workWord.length()-1);\n\t\t\t}\n\t\t\telse if (workWord.endsWith(new String(\"\\'s\")) || workWord.endsWith(new String(\"\\'d\")) ) {\n\t\t\t\tworkWord = workWord.substring(0, workWord.length()-2);\n\t\t\t}\n\t\t\tif (workWord.startsWith(new String(\"\\'\")) || workWord.startsWith(new String(\"\\\"\")) && workWord.length() > 1) {\n\t\t\t workWord = workWord.substring(1);\n\t\t\t}\n\t\t}\n\t return workWord;\n\t}", "private String q(String s) {\r\n\t\treturn '\"' + s + '\"';\r\n\t}", "private static String dequote(String s)\r\n {\r\n String t = s.trim();\r\n if (t.startsWith(\"\\\"\") && t.endsWith(\"\\\"\"))\r\n {\r\n return t.substring(1, t.length()-1);\r\n }\r\n return t;\r\n }", "public static String jsonQuote(String value) {\n\tif (value == null)\n\t return null;\n\telse\n\t return String.format(\"\\\"%s\\\"\", value);\n }", "private String replaceSingleQuotes(String toReplace) {\n if (!StringUtils.isBlank(toReplace)) {\n return toReplace.replaceAll(\"'\", \"\");\n } else {\n return toReplace;\n }\n\n }", "private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"'\";\n }", "public static String escapeHTML(String str){\r\n\t\treturn FuzzyXMLUtil.escape(str, true);\r\n\t}", "private static String escapeString(final String input) {\n switch (input) {\n case \"\\\\n\":\n return \"\\n\";\n case \"\\\\r\":\n return \"\\r\";\n case \"\\\\t\":\n return \"\\t\";\n case \"\\\\_\":\n return \" \";\n default:\n return input;\n }\n }", "public String cleanStr(String s) {\n\t\t\n\t\tString fixed = s;\n\t\tif(s.contains(\"\\\"\")) {\n\t\t\tfixed = s.strip().split(\"\\\"\")[1];\n\t\t}\n\t\treturn fixed;\n\t}", "default String escapeString(final String input) {\n return noQuestion(GedRenderer.escapeString(input)).trim();\n }", "private String quoteUnixCredentials(String str) {\n return str.replace(\"'\", \"'\\\\''\");\n }", "private static Appendable writeString(Appendable buffer, String s, char quote) {\n append(buffer, quote);\n int len = s.length();\n for (int i = 0; i < len; i++) {\n char c = s.charAt(i);\n escapeCharacter(buffer, c, quote);\n }\n return append(buffer, quote);\n }", "public static String escape(String string) {\n\t\t\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tStringBuilder output = new StringBuilder(string.length());\n\t\t\n\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\tchar ch = string.charAt(i);\n\t\t\tString hex = Integer.toHexString(ch).toUpperCase();\n\t\t\t\n\t\t\t// handle unicode\n\t\t\tif (ch > 0xfff) {\n\t\t\t\toutput.append(\"\\\\u\").append(hex);\n\t\t\t} else if (ch > 0xff) {\n\t\t\t\toutput.append(\"\\\\u0\").append(hex);\n\t\t\t} else if (ch > 0x7f) {\n\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t} else if (ch < 32) {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\\b':\n\t\t\t\t\toutput.append(\"\\\\b\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\n':\n\t\t\t\t\toutput.append(\"\\\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\t':\n\t\t\t\t\toutput.append(\"\\\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\f':\n\t\t\t\t\toutput.append(\"\\\\f\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r':\n\t\t\t\t\toutput.append(\"\\\\r\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (ch > 0xf) {\n\t\t\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput.append(\"\\\\u000\").append(hex);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\"':\n\t\t\t\t\toutput.append(\"\\\\\\\"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\\\':\n\t\t\t\t\toutput.append(\"\\\\\\\\\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\toutput.append(ch);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output.toString();\n\t}", "String escStr(String pSource) throws Exception;", "public String quotate(String content){\n\n return \"'\"+content+\"'\";\n }", "private static String repairString(String s) {\n return s != null ? s.replaceAll(\"\\'\", \"\\'\\'\") : null;\n }", "String remEscapes(String str){\n StringBuilder retval = new StringBuilder();\n\n // remove leading/trailing \" or '\r\n int start = 1, end = str.length() - 1;\n\n if ((str.startsWith(SQ3) && str.endsWith(SQ3)) ||\n (str.startsWith(SSQ3) && str.endsWith(SSQ3))){\n // remove leading/trailing \"\"\" or '''\r\n start = 3;\n end = str.length() - 3;\n }\n\n for (int i = start; i < end; i++) {\n\n if (str.charAt(i) == '\\\\' && i+1 < str.length()){\n i += 1;\n switch (str.charAt(i)){\n\n case 'b':\n retval.append('\\b');\n continue;\n case 't':\n retval.append('\\t');\n continue;\n case 'n':\n retval.append('\\n');\n continue;\n case 'f':\n retval.append('\\f');\n continue;\n case 'r':\n retval.append('\\r');\n continue;\n case '\"':\n retval.append('\\\"');\n continue;\n case '\\'':\n retval.append('\\'');\n continue;\n case '\\\\':\n retval.append('\\\\');\n continue;\n }\n\n }\n else {\n retval.append(str.charAt(i));\n }\n }\n\n return retval.toString();\n }", "private String removeQuotedSubstring(String str) throws Exception {\n\t\treturn str.replaceFirst(\n\t\t\t\tstr.substring(str.indexOf(\"\\\"\") + 1, str.lastIndexOf(\"\\\"\")), \"\");\n\t}", "private String stripQuotes(String inStr) {\n \t\n \tif(inStr.startsWith(\"\\\"\") || inStr.startsWith(\"'\")) {\n \tinStr = inStr.substring(1);\n \t}\n \tif(inStr.endsWith(\"\\\"\") || inStr.endsWith(\"'\")) {\n \tinStr = inStr.substring(0, inStr.length() - 1);\n \t}\n \treturn inStr;\n\t}", "String applyQuote(String name);", "public final void mRULE_STRING() throws RecognitionException {\n try {\n int _type = RULE_STRING;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:665:13: ( ( '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"' | '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\'' ) )\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:665:15: ( '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"' | '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\'' )\n {\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:665:15: ( '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"' | '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\'' )\n int alt10=2;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0=='\\\"') ) {\n alt10=1;\n }\n else if ( (LA10_0=='\\'') ) {\n alt10=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 10, 0, input);\n\n throw nvae;\n }\n switch (alt10) {\n case 1 :\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:665:16: '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"'\n {\n match('\\\"'); \n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:665:20: ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )*\n loop8:\n do {\n int alt8=3;\n int LA8_0 = input.LA(1);\n\n if ( (LA8_0=='\\\\') ) {\n alt8=1;\n }\n else if ( ((LA8_0>='\\u0000' && LA8_0<='!')||(LA8_0>='#' && LA8_0<='[')||(LA8_0>=']' && LA8_0<='\\uFFFF')) ) {\n alt8=2;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:665:21: '\\\\\\\\' .\n \t {\n \t match('\\\\'); \n \t matchAny(); \n\n \t }\n \t break;\n \tcase 2 :\n \t // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:665:28: ~ ( ( '\\\\\\\\' | '\\\"' ) )\n \t {\n \t if ( (input.LA(1)>='\\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n match('\\\"'); \n\n }\n break;\n case 2 :\n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:665:48: '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\''\n {\n match('\\''); \n // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:665:53: ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )*\n loop9:\n do {\n int alt9=3;\n int LA9_0 = input.LA(1);\n\n if ( (LA9_0=='\\\\') ) {\n alt9=1;\n }\n else if ( ((LA9_0>='\\u0000' && LA9_0<='&')||(LA9_0>='(' && LA9_0<='[')||(LA9_0>=']' && LA9_0<='\\uFFFF')) ) {\n alt9=2;\n }\n\n\n switch (alt9) {\n \tcase 1 :\n \t // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:665:54: '\\\\\\\\' .\n \t {\n \t match('\\\\'); \n \t matchAny(); \n\n \t }\n \t break;\n \tcase 2 :\n \t // ../com.pellcorp.mydsl/src-gen/com/pellcorp/mydsl/parser/antlr/internal/InternalMyDsl.g:665:61: ~ ( ( '\\\\\\\\' | '\\\\'' ) )\n \t {\n \t if ( (input.LA(1)>='\\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop9;\n }\n } while (true);\n\n match('\\''); \n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "private static final String quote(String s) {\n return s == null ? \"(null)\" : \"\\\"\" + s + '\"';\n }", "public void testImapQuote() {\n \n // Simple strings should come through with simple quotes\n assertEquals(\"\\\"abcd\\\"\", Utility.imapQuoted(\"abcd\"));\n \n // Quoting internal double quotes with \\\n assertEquals(\"\\\"ab\\\\\\\"cd\\\"\", Utility.imapQuoted(\"ab\\\"cd\"));\n \n // Quoting internal \\ with \\\\\n assertEquals(\"\\\"ab\\\\\\\\cd\\\"\", Utility.imapQuoted(\"ab\\\\cd\"));\n }", "public static String deSingleQuote(String text) {\n return dequote(text, '\\'');\n }", "private static String escapeSequences(String currentString) {\n return currentString.replace(\"\\\\\\\"\", \"\\\"\").replace(\"\\\\\\\\\", \"\\\\\");\n }", "static public String escapeCommand(String command) {\n String res = command.replaceAll(\"'\", \"'\\\\\\\\''\");\n return \"'\" + res + \"'\";\n }", "public static void maybeQuote (int version, StringBuffer buf,\n String value)\n {\n // special case - a \\n or \\r shouldn't happen in any case\n if (isToken(value)) {\n buf.append(value);\n } else {\n buf.append('\"');\n buf.append(escapeDoubleQuotes(value));\n buf.append('\"');\n }\n }", "public final void mRULE_STRING() throws RecognitionException {\n try {\n int _type = RULE_STRING;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40363:13: ( ( '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"' | '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\'' ) )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40363:15: ( '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"' | '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\'' )\n {\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40363:15: ( '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"' | '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\'' )\n int alt6=2;\n int LA6_0 = input.LA(1);\n\n if ( (LA6_0=='\\\"') ) {\n alt6=1;\n }\n else if ( (LA6_0=='\\'') ) {\n alt6=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 6, 0, input);\n\n throw nvae;\n }\n switch (alt6) {\n case 1 :\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40363:16: '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"'\n {\n match('\\\"'); \n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40363:20: ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )*\n loop4:\n do {\n int alt4=3;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0=='\\\\') ) {\n alt4=1;\n }\n else if ( ((LA4_0>='\\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='[')||(LA4_0>=']' && LA4_0<='\\uFFFF')) ) {\n alt4=2;\n }\n\n\n switch (alt4) {\n \tcase 1 :\n \t // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40363:21: '\\\\\\\\' .\n \t {\n \t match('\\\\'); \n \t matchAny(); \n\n \t }\n \t break;\n \tcase 2 :\n \t // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40363:28: ~ ( ( '\\\\\\\\' | '\\\"' ) )\n \t {\n \t if ( (input.LA(1)>='\\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop4;\n }\n } while (true);\n\n match('\\\"'); \n\n }\n break;\n case 2 :\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40363:48: '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\''\n {\n match('\\''); \n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40363:53: ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )*\n loop5:\n do {\n int alt5=3;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0=='\\\\') ) {\n alt5=1;\n }\n else if ( ((LA5_0>='\\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=']' && LA5_0<='\\uFFFF')) ) {\n alt5=2;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40363:54: '\\\\\\\\' .\n \t {\n \t match('\\\\'); \n \t matchAny(); \n\n \t }\n \t break;\n \tcase 2 :\n \t // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40363:61: ~ ( ( '\\\\\\\\' | '\\\\'' ) )\n \t {\n \t if ( (input.LA(1)>='\\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n match('\\''); \n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public static String dequote(String str, char quote)\n {\n // Is there anything to dequote?\n if (str == null)\n {\n return null;\n }\n\n return dequote(str, 0, str.length(), quote);\n }", "public final void mRULE_STRING() throws RecognitionException {\n try {\n int _type = RULE_STRING;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:2138:13: ( ( '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"' | '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\'' ) )\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:2138:15: ( '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"' | '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\'' )\n {\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:2138:15: ( '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"' | '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\'' )\n int alt6=2;\n int LA6_0 = input.LA(1);\n\n if ( (LA6_0=='\\\"') ) {\n alt6=1;\n }\n else if ( (LA6_0=='\\'') ) {\n alt6=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 6, 0, input);\n\n throw nvae;\n }\n switch (alt6) {\n case 1 :\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:2138:16: '\\\"' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )* '\\\"'\n {\n match('\\\"'); \n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:2138:20: ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\"' ) ) )*\n loop4:\n do {\n int alt4=3;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0=='\\\\') ) {\n alt4=1;\n }\n else if ( ((LA4_0>='\\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='[')||(LA4_0>=']' && LA4_0<='\\uFFFF')) ) {\n alt4=2;\n }\n\n\n switch (alt4) {\n \tcase 1 :\n \t // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:2138:21: '\\\\\\\\' .\n \t {\n \t match('\\\\'); \n \t matchAny(); \n\n \t }\n \t break;\n \tcase 2 :\n \t // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:2138:28: ~ ( ( '\\\\\\\\' | '\\\"' ) )\n \t {\n \t if ( (input.LA(1)>='\\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop4;\n }\n } while (true);\n\n match('\\\"'); \n\n }\n break;\n case 2 :\n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:2138:48: '\\\\'' ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )* '\\\\''\n {\n match('\\''); \n // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:2138:53: ( '\\\\\\\\' . | ~ ( ( '\\\\\\\\' | '\\\\'' ) ) )*\n loop5:\n do {\n int alt5=3;\n int LA5_0 = input.LA(1);\n\n if ( (LA5_0=='\\\\') ) {\n alt5=1;\n }\n else if ( ((LA5_0>='\\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=']' && LA5_0<='\\uFFFF')) ) {\n alt5=2;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:2138:54: '\\\\\\\\' .\n \t {\n \t match('\\\\'); \n \t matchAny(); \n\n \t }\n \t break;\n \tcase 2 :\n \t // ../org.xtext.example.mydslsample/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslSample.g:2138:61: ~ ( ( '\\\\\\\\' | '\\\\'' ) )\n \t {\n \t if ( (input.LA(1)>='\\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n match('\\''); \n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "private String escape(String str) {\n String result = null; // replace(str, \"&\", \"&amp;\");\n\n while (str.indexOf(\"&\") != -1) {\n str = replace(str, \"&\", \"&amp;\");\n }\n result = str;\n while (result.indexOf(\"-\") != -1) {\n result = replace(result, \"-\", \"\");\n }\n return result;\n }", "static String unescape(String str, char quote) {\n\t\tStringBuilder sb = new StringBuilder(\n\t\t\t\tstr.replaceAll(\"\\\\\"+quote, Character.toString(quote)));\n\t\t\n\t\t// remove quotes\n\t\tsb.deleteCharAt(0);\n\t\tsb.deleteCharAt(sb.length()-1);\n\t\treturn sb.toString();\n\t}", "public static String dequote(String text) {\n return dequote(text, '\"');\n }", "private String changeQuotes(final String line) {\n String fixedLine = line.replaceAll(\"`\", \"'\");\n fixedLine = fixedLine.replaceAll(\"’\", \"'\");\n fixedLine = fixedLine.replaceAll(\"“\", \"\\\"\");\n fixedLine = fixedLine.replaceAll(\"”\", \"\\\"\");\n return fixedLine;\n }", "public static String getSingleQuoteStringValue(String line) {\n return getStringBetween(line, Symbol.C_SINGLE_QUOTE);\n }", "private void createString() {\n\n\t\tString value = String.valueOf(data[currentIndex++]);\n\t\twhile (currentIndex < data.length && data[currentIndex] != '\"') {\n\t\t\tif (data[currentIndex] == '\\\\') {\n\t\t\t\tcurrentIndex++;\n\t\t\t\tif (currentIndex >= data.length) {\n\t\t\t\t\tthrow new LexerException(\n\t\t\t\t\t\t\t\"Invalid escaping in STRING token.\");\n\t\t\t\t}\n\n\t\t\t\tswitch (data[currentIndex]) {\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\\\':\n\t\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'n':\n\t\t\t\t\tvalue += '\\n';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'r':\n\t\t\t\t\tvalue += '\\r';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 't':\n\t\t\t\t\tvalue += '\\t';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new LexerException(\n\t\t\t\t\t\t\t\"Invalid escaping in STRING token.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t}\n\t\t}\n\n\t\tif (currentIndex < data.length) {\n\t\t\tvalue += data[currentIndex++];\n\t\t} else {\n\t\t\tthrow new LexerException(\"Missing end: \\\".\");\n\t\t}\n\n\t\ttoken = new Token(TokenType.STRING, value);\n\t}", "public static String escape(String s) {\n return s.replaceAll(\"\\\\n\", Matcher.quoteReplacement(\"\\\\n\"))\n .replaceAll(\"\\\\r\", Matcher.quoteReplacement(\"\\\\r\"))\n .replaceAll(\"\\\\033\", Matcher.quoteReplacement(\"\\\\033\"));\n }", "public static String escape(String string) throws UnsupportedEncodingException {\n\t\t\n fill();\n \n StringBuilder bufOutput = new StringBuilder(string);\n for (int i = 0; i < bufOutput.length(); i++) {\n //String replacement = (String) SPARQL_ESCAPE_SEARCH_REPLACEMENTS.get(\"\" + bufOutput.charAt(i));\n // if(replacement!=null) {\n if( SPARQL_ESCAPE_SEARCH_REPLACEMENTS.contains(bufOutput.charAt(i))) {\n String replacement = URLEncoder.encode( Character.toString(bufOutput.charAt(i)), \"UTF-8\");\n bufOutput.deleteCharAt(i);\n bufOutput.insert(i, replacement);\n // advance past the replacement\n i += (replacement.length() - 1);\n }\n }\n return bufOutput.toString();\n\t}", "private String readString() throws ParseException {\n int stringStart = pos;\n while (pos < length) {\n char c = src.charAt(pos++);\n if (c <= '\\u001F') {\n throw new ParseException(\"String contains control character\");\n } else if (c == '\\\\') {\n break;\n } else if (c == '\"') {\n return src.substring(stringStart, pos - 1);\n }\n }\n\n /*\n * Slow case: string contains escaped characters. Copy a maximal sequence\n * of unescaped characters into a temporary buffer, then an escaped\n * character, and repeat until the entire string is consumed.\n */\n StringBuilder b = new StringBuilder();\n while (pos < length) {\n assert src.charAt(pos - 1) == '\\\\';\n b.append(src, stringStart, pos - 1);\n if (pos >= length) {\n throw new ParseException(\"Unterminated string\");\n }\n char c = src.charAt(pos++);\n switch (c) {\n case '\"':\n b.append('\"');\n break;\n case '\\\\':\n b.append('\\\\');\n break;\n case '/':\n b.append('/');\n break;\n case 'b':\n b.append('\\b');\n break;\n case 'f':\n b.append('\\f');\n break;\n case 'n':\n b.append('\\n');\n break;\n case 'r':\n b.append('\\r');\n break;\n case 't':\n b.append('\\t');\n break;\n case 'u':\n if (length - pos < 5) {\n throw new ParseException(\"Invalid character code: \\\\u\" + src.substring(pos));\n }\n int code = fromHex(src.charAt(pos + 0)) << 12\n | fromHex(src.charAt(pos + 1)) << 8\n | fromHex(src.charAt(pos + 2)) << 4\n | fromHex(src.charAt(pos + 3));\n if (code < 0) {\n throw new ParseException(\"Invalid character code: \" + src.substring(pos, pos + 4));\n }\n pos += 4;\n b.append((char) code);\n break;\n default:\n throw new ParseException(\"Unexpected character in string: '\\\\\" + c + \"'\");\n }\n stringStart = pos;\n while (pos < length) {\n c = src.charAt(pos++);\n if (c <= '\\u001F') {\n throw new ParseException(\"String contains control character\");\n } else if (c == '\\\\') {\n break;\n } else if (c == '\"') {\n b.append(src, stringStart, pos - 1);\n return b.toString();\n }\n }\n }\n throw new ParseException(\"Unterminated string literal\");\n }", "public static String escape(String s) {\r\n if (s == null)\r\n return null;\r\n StringBuffer sb = new StringBuffer();\r\n escape(s, sb);\r\n return sb.toString();\r\n }", "public final void mQUOTE() throws RecognitionException {\r\n try {\r\n int _type = QUOTE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:7: ( '\\\"' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:9: '\\\"'\r\n {\r\n match('\\\"'); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "public String csvEscapeString(String value){\n\t\tif(value==null)\n\t\t\tvalue=\"\";\n\t\treturn value.replaceAll(\"\\\"\", \"'\");\n\t}", "public static String unquote(String s) {\n s = s.trim();\n if (s.length() > 1) {\n char start = s.charAt(0);\n if (start == '\"' || start == '\\'') {\n char end = s.charAt(s.length() - 1);\n if (end == start) {\n return s.substring(1, s.length() - 1);\n }\n }\n }\n return s;\n }", "protected String escape( String text )\n {\n return text.replaceAll( \"([`\\\\|*_])\", \"\\\\\\\\$1\" );\n }", "private String escapeName(String name) {\n return (name != null && name.indexOf('\"') > 0) ?\n name.replaceAll(\"\\\"\", \"\\\\\\\\\\\"\") : name;\n }", "public String escape(final String input) {\n\t\tStringBuilder builder = new StringBuilder(input);\n\t\tescape(builder);\n\t\treturn builder.toString();\n\t}", "Rule DoubleQuotedLiteral() {\n return Sequence(\n \"\\\"\",\n ZeroOrMore(NoneOf(\"\\\"\")),\n \"\\\"\");\n }", "public static String getNoApostropheString(String s) {\r\n\t\tif (s == null) {\r\n\t\t\ts = \"\";\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tif ((i == 0) && (s.toCharArray()[i] == '\\'')) {\r\n\t\t\t\ts = '\\'' + s;\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (s.toCharArray()[i] == '\\'') {\r\n\t\t\t\t\ts = s.substring(0, i) + '\\'' + s.substring(i);\r\n\t\t\t\t\ti++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn s;\r\n\r\n\t}", "public static String javaScriptStringEnc(String s) {\n int ln = s.length();\n for (int i = 0; i < ln; i++) {\n char c = s.charAt(i);\n if (c == '\"' || c == '\\'' || c == '\\\\' || c == '>' || c < 0x20) {\n StringBuffer b = new StringBuffer(ln + 4);\n b.append(s.substring(0, i));\n while (true) {\n if (c == '\"') {\n b.append(\"\\\\\\\"\");\n } else if (c == '\\'') {\n b.append(\"\\\\'\");\n } else if (c == '\\\\') {\n b.append(\"\\\\\\\\\");\n } else if (c == '>') {\n b.append(\"\\\\>\");\n } else if (c < 0x20) {\n if (c == '\\n') {\n b.append(\"\\\\n\");\n } else if (c == '\\r') {\n b.append(\"\\\\r\");\n } else if (c == '\\f') {\n b.append(\"\\\\f\");\n } else if (c == '\\b') {\n b.append(\"\\\\b\");\n } else if (c == '\\t') {\n b.append(\"\\\\t\");\n } else {\n b.append(\"\\\\x\");\n int x = c / 0x10;\n b.append((char)\n (x < 0xA ? x + '0' : x - 0xA + 'A'));\n x = c & 0xF;\n b.append((char)\n (x < 0xA ? x + '0' : x - 0xA + 'A'));\n }\n } else {\n b.append(c);\n }\n i++;\n if (i >= ln) {\n return b.toString();\n }\n c = s.charAt(i);\n }\n } // if has to be escaped\n } // for each characters\n return s;\n }", "static String wrap(Object value)\n/* */ {\n/* 156 */ if ((value == null) || (\"-\".equals(value))) {\n/* 157 */ return \"-\";\n/* */ }\n/* */ try\n/* */ {\n/* 161 */ svalue = value.toString();\n/* */ } catch (Throwable e) { String svalue;\n/* 163 */ ExceptionUtils.handleThrowable(e);\n/* */ \n/* 165 */ return \"-\";\n/* */ }\n/* */ \n/* */ String svalue;\n/* 169 */ StringBuilder buffer = new StringBuilder(svalue.length() + 2);\n/* 170 */ buffer.append('\"');\n/* 171 */ int i = 0;\n/* 172 */ while (i < svalue.length()) {\n/* 173 */ int j = svalue.indexOf('\"', i);\n/* 174 */ if (j == -1) {\n/* 175 */ buffer.append(svalue.substring(i));\n/* 176 */ i = svalue.length();\n/* */ } else {\n/* 178 */ buffer.append(svalue.substring(i, j + 1));\n/* 179 */ buffer.append('\"');\n/* 180 */ i = j + 1;\n/* */ }\n/* */ }\n/* */ \n/* 184 */ buffer.append('\"');\n/* 185 */ return buffer.toString();\n/* */ }", "public static final CharSequence stripDoubleQuotes(CharSequence cs) {\n if (cs.length() >= 2) {\n if (cs.charAt(0) == '\"') {\n cs = cs.subSequence(1, cs.length());\n }\n if (cs.charAt(cs.length() - 1) == '\"') {\n cs = cs.subSequence(0, cs.length() - 1);\n }\n }\n return cs;\n }", "public static String cleanString(String aText) {\n if ( !Utils.stringDefined(aText)) {\n return \"\";\n }\n final StringBuilder result = new StringBuilder();\n StringCharacterIterator iterator = new StringCharacterIterator(aText);\n char character = iterator.current();\n char char_slash = '\\\\';\n char char_dquote = '\"';\n\n while (character != StringCharacterIterator.DONE) {\n if (character == char_dquote) {\n //For now don't escape double quotes\n result.append(character);\n // result.append(char_slash);\n // result.append(char_dquote);\n } else if (character == char_slash) {\n result.append(char_slash);\n result.append(char_slash);\n } else if (character == '\\b') {\n result.append(\"\\\\b\");\n } else if (character == '\\f') {\n result.append(\"\\\\f\");\n } else if (character == '\\n') {\n result.append(\"\\\\n\");\n } else if (character == '\\r') {\n result.append(\"\\\\r\");\n } else if (character == '\\t') {\n result.append(\"\\\\t\");\n } else {\n //the char is not a special one\n //add it to the result as is\n result.append(character);\n }\n character = iterator.next();\n }\n\n String s = result.toString();\n\n //Make into all ascii ??\n s = s.replaceAll(\"[^\\n\\\\x20-\\\\x7E]+\", \" \");\n\n return s;\n }", "String unescStr(String pSource) throws Exception;", "@Nonnull\n public static String getXPathString(@Nonnull String str) {\n // if the value contains only single or double quotes, construct\n // an XPath literal\n if (!str.contains(\"'\")) {\n return \"'\" + str + \"'\";\n }\n if (!str.contains(\"\\\"\")) {\n return \"\\\"\" + str + \"\\\"\";\n }\n\n // if the value contains both single and double quotes, construct an\n // expression that concatenates all non-double-quote substrings with\n // the quotes, e.g.:\n //\n // concat(\"foo\", '\"', \"bar\")\n\n int singleCount = StringUtils.countMatches(str, \"'\");\n int doubleCount = StringUtils.countMatches(str, \"\\\"\");\n\n // the quote that gets split on\n String quote;\n // an inverse-quoted quote to represent the quote that was a split point\n String quotedQuote;\n // a pattern that splits on the designated split quote\n Pattern splitPattern;\n\n // use either single or double quote depending on which one is used less\n if (singleCount > doubleCount) {\n quote = \"\\\"\";\n quotedQuote = \"'\\\"'\";\n splitPattern = XPATH_DOUBLE_QUOTE_SPLIT_PATTERN;\n } else {\n quote = \"'\";\n quotedQuote = \"\\\"'\\\"\";\n splitPattern = XPATH_SINGLE_QUOTE_SPLIT_PATTERN;\n }\n\n List<String> xpathConcatList = new ArrayList<String>();\n\n // regex perhaps isn't the most efficient but its split behavior (with -1) is correct\n String[] substrings = splitPattern.split(str, -1);\n\n for (int i = 0; i < substrings.length; i++) {\n String chunk = substrings[i];\n\n // if this isn't just the space between subsequent quotes, include the chunk\n if (!chunk.equals(\"\")) {\n xpathConcatList.add(quote + chunk + quote);\n }\n\n // if this isn't the last item, include a literal to represent the quote that was split on\n if (i < substrings.length - 1) {\n xpathConcatList.add(quotedQuote);\n }\n }\n\n return \"concat(\" + StringUtils.join(xpathConcatList, \", \") + \")\";\n }", "public static CharSequence unquoteCharSequence(CharSequence s) {\n int len = s.length();\n if (len > 1) {\n char start = s.charAt(0);\n if (start == '\"' || start == '\\'') {\n char end = s.charAt(len - 1);\n if (end == start) {\n return s.subSequence(1, s.length() - 1);\n }\n }\n }\n return s;\n }", "public static String encodeJsString(String s) throws Exception {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(\"\\\"\");\r\n for (Character c : s.toCharArray())\r\n {\r\n switch(c)\r\n {\r\n case '\\\"': \r\n sb.append(\"\\\\\\\"\");\r\n break;\r\n case '\\\\': \r\n sb.append(\"\\\\\\\\\");\r\n break;\r\n case '\\b': \r\n sb.append(\"\\\\b\");\r\n break;\r\n case '\\f': \r\n sb.append(\"\\\\f\");\r\n break;\r\n case '\\n': \r\n sb.append(\"\\\\n\");\r\n break;\r\n case '\\r': \r\n sb.append(\"\\\\r\");\r\n break;\r\n case '\\t': \r\n sb.append(\"\\\\t\");\r\n break;\r\n default: \r\n Int32 i = (int)c;\r\n if (i < 32 || i > 127)\r\n {\r\n sb.append(String.format(StringSupport.CSFmtStrToJFmtStr(\"\\\\u{0:X04}\"),i));\r\n }\r\n else\r\n {\r\n sb.append(c);\r\n } \r\n break;\r\n \r\n }\r\n }\r\n sb.append(\"\\\"\");\r\n return sb.toString();\r\n }", "public static String encodeEscapes(@Nullable String inString)\n {\n if(inString == null)\n return \"\";\n\n // replace all special characters with some equivalent\n StringBuilder result = new StringBuilder();\n for(int i = 0; i < inString.length(); i++)\n {\n char c = inString.charAt(i);\n int pos = s_escapes.indexOf(c);\n\n if(pos >= 0)\n result.append(s_marker + pos + s_marker);\n else\n result.append(c);\n }\n\n return result.toString();\n }", "protected static void writeQuotedStringValue(ByteArrayOutputStream out, byte[] buf) {\n int len = buf.length;\n byte ch;\n for (int i = 0; i < len; i++) {\n ch = buf[i];\n if (needEscape((char) ch)) {\n out.write('\\\\');\n }\n out.write(ch);\n }\n }", "private static String removeFirstLastQuotations(String string)\n\t{\n\t\tint firstIndex = string.indexOf('\\\"');\n\t\tint lastIndex = string.lastIndexOf('\\\"');\n\t\tif (firstIndex == 0 && lastIndex == string.length() - 1)\n\t\t\treturn string.substring(1, lastIndex);\n\t\t\n\t\treturn string;\n\t}", "@Override\n public String doQuote(String identifier) {\n return \"\\\"\" + identifier + \"\\\"\";\n }", "private String escapeString(String value, String queryLanguage) {\n String escaped = null;\n if (value != null) {\n if (queryLanguage.equals(Query.XPATH) || queryLanguage.equals(Query.SQL)) {\n // See JSR-170 spec v1.0, Sec. 6.6.4.9 and 6.6.5.2\n escaped = value.replaceAll(\"\\\\\\\\(?![-\\\"])\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"'\", \"\\\\\\\\'\")\n .replaceAll(\"'\", \"''\");\n }\n }\n return escaped;\n }", "private String escape(String s) {\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < s.length(); ) {\r\n int ch = s.codePointAt(i);\r\n i += Character.charCount(ch);\r\n if (' ' <= ch && ch <= '~') sb.append((char)ch);\r\n else {\r\n sb.append(\"\\\\\");\r\n sb.append(ch);\r\n if (i < s.length()) {\r\n ch = s.charAt(i);\r\n if (ch == ';' || ('0' <= ch && ch <= '9')) sb.append(';');\r\n }\r\n }\r\n }\r\n return sb.toString();\r\n }", "private String escapeValue(String value) {\n Matcher match = escapePattern.matcher(value);\n String ret = match.replaceAll(\"\\\\\\\\\\\\\\\\\");\n return ret.replace(\"\\\"\", \"\\\\\\\"\").replace(\"\\n\", \" \").replace(\"\\t\", \" \");\n }", "public static String escapeString(String string, char escape, String charsToEscape) {\n\t int len = string.length();\n\t StringBuilder res = new StringBuilder(len + 5);\n\t escapeStringToBuf(string, escape, charsToEscape, res);\n\t return res.length()==len ? string : res.toString();\n }", "@Override\r\n\t\tpublic String encode(String str) {\r\n\t\t\t// str to char[]\r\n\t\t\tchar content[] = str.toCharArray();\r\n\t\t\t\r\n\t\t\t// per char\r\n\t\t\tStringBuilder result = new StringBuilder(content.length);\r\n\t\t\tfor (int i = 0; i < content.length; i++) {\r\n\t\t\t\tswitch (content[i]) {\r\n\t\t\t\tcase '<':\r\n\t\t\t\t\tresult.append(\"&lt;\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '>':\r\n\t\t\t\t\tresult.append(\"&gt;\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '&':\r\n\t\t\t\t\tresult.append(\"&amp;\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '\"':\r\n\t\t\t\t\tresult.append(\"&quot;\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase '\\'':\r\n\t\t\t\t\tresult.append(\"&apos;\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult.append(content[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn (result.toString());\r\n\t\t}", "@Override\r\n\t\tpublic String encode(String str) {\r\n\t\t\t// str to char[]\r\n\t\t\tchar content[] = str.toCharArray();\r\n\r\n\t\t\t// per char\r\n\t\t\tStringBuilder result = new StringBuilder(content.length);\r\n\t\t\tfor (int i = 0; i < content.length; i++) {\r\n\t\t\t\tswitch (content[i]) {\r\n\t\t\t\t\tcase '<':\r\n\t\t\t\t\t\tresult.append(\"&#60;\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase '>':\r\n\t\t\t\t\t\tresult.append(\"&#62;\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase '&':\r\n\t\t\t\t\t\tresult.append(\"&#38;\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase '\"':\r\n\t\t\t\t\t\tresult.append(\"&#34;\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase '\\'':\r\n\t\t\t\t\t\tresult.append(\"&#39;\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tresult.append(content[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn (result.toString());\r\n\t\t}", "public String htmlSpecialChar(String string){\n String res = string.replaceAll(\"&\",\"&amp;\");\n res = res.replace(\"'\",\"&#039;\");\n res = res.replace(\"\\\"\",\"&qout;\");\n res = res.replace(\"$\",\"&#036;\");\n res = res.replace(\"%\",\"&#037;\");\n res = res.replace(\"<\",\"&lt;\");\n res = res.replace(\">\",\"&gt;\");\n res = res.replace(\"\\n\",\"\\\\n\");\n return res;\n }" ]
[ "0.7867064", "0.771058", "0.72705007", "0.7137976", "0.710426", "0.70967674", "0.7051929", "0.69500804", "0.69279927", "0.689118", "0.68704635", "0.6860525", "0.67633873", "0.6732606", "0.67253596", "0.67191726", "0.668299", "0.6659534", "0.6616277", "0.65799814", "0.6571218", "0.65368557", "0.64250326", "0.64204454", "0.6392488", "0.63394475", "0.6325587", "0.63067806", "0.6297072", "0.62824905", "0.62739956", "0.62429506", "0.6233313", "0.6216671", "0.6175591", "0.6148064", "0.6111218", "0.6103619", "0.6069464", "0.6037026", "0.6012891", "0.60085374", "0.59894264", "0.59689", "0.5962422", "0.5960652", "0.593726", "0.5935605", "0.59323", "0.591937", "0.59157103", "0.58760875", "0.5865031", "0.5826653", "0.5820489", "0.580562", "0.58027446", "0.5800868", "0.57653177", "0.5760378", "0.5738445", "0.5734835", "0.5728153", "0.5721346", "0.57135284", "0.5707067", "0.57054293", "0.5702034", "0.56958336", "0.568568", "0.5674432", "0.5668191", "0.5662174", "0.5653923", "0.56531596", "0.5642943", "0.5639299", "0.56391704", "0.5637115", "0.5623138", "0.5609273", "0.5599743", "0.5595996", "0.5592863", "0.558491", "0.5582514", "0.55805886", "0.5578154", "0.5576472", "0.55705905", "0.5559204", "0.5554942", "0.55511206", "0.5550124", "0.5549959", "0.554854", "0.55451125", "0.5543276", "0.5542698", "0.5530318" ]
0.78774655
0
Squeeze out all white space from a string and return the reduced string.
protected static String reduceString(String input) { String newString = input.toLowerCase(); int len = newString.length(); String retval = ""; for (int i = 0; i < len; i++) { if (newString.charAt(i) == ' ' || newString.charAt(i) == '\t') continue; else retval += newString.charAt(i); } return retval; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String squeezeWhitespace (String input){\r\n return Whitespace.matcher(input).replaceAll(\" \").trim();\r\n }", "protected static String trimWhitespace(String s) {\n int len = s.length();\n StringBuffer buf = new StringBuffer(len);\n for (int ii = 0; ii < len; ii++) {\n char c = s.charAt(ii);\n if (!Character.isWhitespace(c)) {\n buf.append(c);\n }\n }\n return buf.toString();\n }", "private static String trim(String s) {\n return s.replace(\" \", \"\");\n }", "public static String removeSpaces(String s) {\r\n StringTokenizer stt = new StringTokenizer(s);\r\n String res = \"\";\r\n\r\n while (stt.hasMoreTokens()) {\r\n String tok = stt.nextToken().trim();\r\n res += tok;\r\n }\r\n return res;\r\n }", "public static String cleanString(String s) {\n\t\ts = s.trim();\n\t\tString newStr = \"\";\n\t\tboolean lastWasSpace = false;\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tchar c = s.charAt(i);\n\t\t\tif(c == ' ' && lastWasSpace) {\n\t\t\t\t//Ignore\n\t\t\t} else if (c == ' ' && !lastWasSpace) {\n\t\t\t\tnewStr+=c;\n\t\t\t\tlastWasSpace = true;\n\t\t\t} else {\n\t\t\t\tnewStr+=c;\n\t\t\t\tlastWasSpace = false;\n\t\t\t}\n\t\t}\n\t\ts = newStr;\n\t\treturn s;\n\t}", "public static String trim(String s) {\r\n\t\treturn Escape.collapseWhitespace(Escape.forDoubleQuotedString(s, true).trim());\r\n\t}", "private static String removeWhitespace(String str)\n {\n // A string buffer to build the result in.\n StringBuffer res;\n\n // Create the result string buffer.\n res = new StringBuffer(str.length());\n\n // Iterate through the input string, appending chars to the\n // result if they are not white space.\n for (int iChar = 0; iChar < str.length(); iChar++) {\n if (!Character.isWhitespace(str.charAt(iChar))) {\n res.append(str.charAt(iChar));\n }\n }\n\n return res.toString();\n }", "public String trim(String str) {\n\n return str.replaceFirst(\" \", \"\");\n\n }", "public static String removeWhiteSpace(String input) {\r\n if (input == null || input.isEmpty()) {\r\n return \"\";\r\n }\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < input.length(); i++) {\r\n char c = input.charAt(i);\r\n if (!Character.isWhitespace(c)) {\r\n sb.append(c);\r\n }\r\n }\r\n return sb.toString();\r\n }", "public static String clearLongWhitespaces(String str) {\r\n\r\n if (str == null) {\r\n str = \"\";\r\n }\r\n String result = \"\";\r\n StringTokenizer st = new StringTokenizer(str);\r\n while (st.hasMoreTokens()) {\r\n String s = st.nextToken();\r\n if (s != null) {\r\n result += s.trim();\r\n }\r\n }\r\n return result.trim();\r\n }", "public static String cutSpaces(String s){\n\t\tString res = s;\n\t\t\n\t\twhile ((res.startsWith(\" \")||(res.startsWith(\"\\n\")))&& res.length()>0) {\n\t\t\tres=res.substring(1);\n\t\t}\n\t\treturn res;\n\t}", "public String trim(String string)\n\t{\n\t\tString result = string;\n\t\t\n\t\tif (string.length() > 0)\n\t\t{\n\t\t\t// Find first non-white space character\n\t\t\tchar[] charArray = string.toCharArray();\n\t\t\t\n\t\t\tint charIndex = 0;\n\t\t\tchar currentChar = charArray[charIndex];\n\t\t\t\n\t\t\twhile ((charIndex < charArray.length) && (charArray[charIndex] > STYLE_RED) && (charArray[charIndex] <= ' '))\n\t\t\t{\n\t\t\t\tcharIndex++;\n\t\t\t}\n\t\t\t\n\t\t\tint startIndex = charIndex;\n\t\t\t\n\t\t\tif (startIndex < charArray.length)\n\t\t\t{\n\t\t\t\t// Find the last non-white space character\n\t\t\t\tcharIndex = charArray.length - 1;\n\t\t\t\t\n\t\t\t\twhile ((charIndex >= 0) && (charArray[charIndex] > STYLE_RED) && (charArray[charIndex] <= ' '))\n\t\t\t\t{\n\t\t\t\t\tcharIndex--;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult = string.substring(startIndex, charIndex + 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresult = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "@Override\n\tpublic String spaceRemover(String input) {\n\t\treturn input.replaceAll(\"\\\\s+\",\"\");\n\n\t}", "public static String trimSpace(String oldString)\r\n\t{\r\n\t\tif (null == oldString)\r\n\t\t\treturn null;\r\n\t\tif (0 == oldString.length())\r\n\t\t\treturn \"\";\r\n\t\tStringBuffer sbuf = new StringBuffer();\r\n\t\tint oldLen = oldString.length();\r\n\t\tfor (int i = 0; i < oldLen; i++)\r\n\t\t{\r\n\t\t\tif (' ' != oldString.charAt(i))\r\n\t\t\t\tsbuf.append(oldString.charAt(i));\r\n\t\t}\r\n\t\tString returnString = sbuf.toString();\r\n\t\tsbuf = null;\r\n\t\treturn returnString;\r\n\t}", "private String trimRight(String string) {\n String newString = \"\";\n for (int i = 0; i < string.length(); i++) {\n if (string.charAt(i) != ' ') {\n newString = string.substring(0, i) + string.trim();\n break;\n }\n }\n return newString;\n }", "public static String condense(String str){\n Matcher matcher = condensePattern.matcher(str);\n return matcher.replaceAll(\" \");\n }", "public static String removeWhitespace(String s) {\n s = s.replace(\" \",\"\");\n s = s.replace(\"\\n\",\"\");\n s = s.replace(\"\\t\",\"\");\n return s;\n }", "public static String trim(CharSequence s) {\n if (s == null) {\n return null;\n }\n\n // Just strip any sequence of whitespace or java space characters from the beginning and end\n Matcher m = sTrimPattern.matcher(s);\n return m.replaceAll(\"$1\");\n }", "private static String _stripWhitespace(String str)\n {\n if (str == null)\n return null;\n\n int length = str.length();\n int startIndex = 0;\n\n while (startIndex < length)\n {\n if (Character.isWhitespace(str.charAt(startIndex)))\n startIndex++;\n else\n break;\n }\n\n int endIndex = length;\n while (endIndex > 0)\n {\n if (Character.isWhitespace(str.charAt(endIndex - 1)))\n endIndex--;\n else\n break;\n }\n\n if ((startIndex == 0) && (endIndex == length))\n return str;\n\n return str.substring(startIndex, endIndex);\n }", "public static String replaceAllWhiteWithOne(String sInput) {\n\t\tString strTmp = sInput.trim();\n\t\tString strResult = \"\";\n\t\tfor (int i = 0; i < strTmp.length(); i++) {\n\t\t\tchar ch = strTmp.charAt(i);\n\t\t\tif (ch == ' ') {\n\t\t\t\tfor (int j = i; j < strTmp.length(); j++) {\n\t\t\t\t\tchar ch2 = strTmp.charAt(j);\n\t\t\t\t\tif (ch2 != ' ') {\n\t\t\t\t\t\ti = j;\n\t\t\t\t\t\tstrResult = strResult + ' ' + ch2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstrResult = strResult + ch;\n\t\t\t}\n\t\t}\n\t\treturn strResult;\n\t}", "public static String replaceAllWhiteWithOne(String sInput) {\n\t\tString strTmp = sInput.trim();\n\t\tString strResult = \"\";\n\t\tfor (int i = 0; i < strTmp.length(); i++) {\n\t\t\tchar ch = strTmp.charAt(i);\n\t\t\tif (ch == ' ') {\n\t\t\t\tfor (int j = i; j < strTmp.length(); j++) {\n\t\t\t\t\tchar ch2 = strTmp.charAt(j);\n\t\t\t\t\tif (ch2 != ' ') {\n\t\t\t\t\t\ti = j;\n\t\t\t\t\t\tstrResult = strResult + ' ' + ch2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstrResult = strResult + ch;\n\t\t\t}\n\t\t}\n\t\treturn strResult;\n\t}", "public static String removeWhiteSpace(String value) {\n return value.replaceAll(\"\\\\s\", \"\");\n }", "public String removespaces(String inputString) {\r\n char[] charArray = inputString.toCharArray();\r\n \r\n String stringWithoutSpaces = \"\";\r\n \r\n for (int i = 0; i < charArray.length; i++) \r\n {\r\n if ( (charArray[i] != ' ') && (charArray[i] != '\\t') )\r\n {\r\n stringWithoutSpaces = stringWithoutSpaces + charArray[i];\r\n }\r\n }\r\n return stringWithoutSpaces;\r\n\t}", "public static String trimer (String text){\n\t\treturn text.replaceAll(\"\\\\s+\", \" \");\n\t}", "static String trim(String s) {\n return s.substring(0, s.length() - 1);\n }", "private String removeLeadingWhitespace(String input) {\n for (int index = 0; index < input.length(); index++) {\n if (!Character.isWhitespace(input.charAt(index))) {\n return input.substring(index);\n }\n }\n return input;\n }", "public String removeSpace(String oldString)\n\t{\n\t\tString str = new String();\n\t\tString[] newString = oldString.split(\" \");\n\t\tfor(int i = 0; i < newString.length; i++)\n\t\t{\n\t\t\tstr += newString[i];\n\t\t}\n\t\treturn str;\n\t}", "private static String trimWhiteSpace(String sentence) {\n\t\tsentence = sentence.replaceAll(\"[^a-zA-Z]\", \" \");\n//\t\tsentence = sentence.replaceAll(\"\\n\", \" \");\n//\t\tsentence = sentence.replaceAll(\"\\t\", \" \");\n// sentence = sentence.replaceAll(\"\\\\.\", \" \");\n// sentence = sentence.replaceAll(\",\", \" \");\n \n//\t\tint length;\n//\t\tdo {\n//\t\t\tlength = sentence.length();\n//\t\t\tsentence = sentence.replaceAll(\" \", \" \");\n//\n//\t\t} while (sentence.length() < length);\n\t\treturn sentence;\n\t}", "public static String trim(String s)\r\n {\r\n return (s == null ? null : s.trim());\r\n }", "public static String rtrim(String s)\r\n {\r\n if (s == null)\r\n return null;\r\n \r\n for (int k = s.length()-1; k >= 0; k--)\r\n {\r\n if (!Character.isWhitespace(s.charAt(k)))\r\n return (k == s.length() - 1 ? s : s.substring(0, k + 1));\r\n }\r\n return \"\";\r\n }", "public static String stringTrim(String stringToTrim) \n\t{\n\t\t// remove any leading whitespace\n\t\tfor (int i = 0; i < stringToTrim.length(); i++) \n\t\t{\n\t\t\tif (stringToTrim.charAt(i) == ' ') continue;\n\t\t\telse \n\t\t\t{\n\t\t\t\tstringToTrim = stringToTrim.substring(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// ...remove any trailing whitespace\n\t\tfor (int i = stringToTrim.length()-1; i > 0; i--) \n\t\t{\n\t\t\tif (stringToTrim.charAt(i) == ' ') continue;\n\t\t\telse \n\t\t\t{\n\t\t\t\tstringToTrim = stringToTrim.substring(0, i+1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn stringToTrim;\n\t}", "public static CharSequence trimTrailingWhitespace(CharSequence source) {\n\n if(source == null)\n return \"\";\n\n int i = source.length();\n\n // loop back to the first non-whitespace character\n while(--i >= 0 && Character.isWhitespace(source.charAt(i))) {\n }\n\n return source.subSequence(0, i+1);\n }", "private String trimString(String input) {\n final int maxWidth = 16; // Scoreboard string length is 16.\n\n // Check to see if the input length is greater than the maxWidth of characters.\n if (input.length() > maxWidth) {\n int amountOver = input.length() - maxWidth;\n return input.substring(0, input.length() - amountOver);\n } else {\n // The input is less than 15 characters so it does not need to be trimmed.\n return input;\n }\n }", "public static String saveWhitespaces(String s) {\n\t\treturn StringUtil.replace(s, \" \", \"\\u00A0\");\n\t}", "public static String trim(String s)\r\n\t{\r\n\t\tif((s.length()<3)||(s.charAt(s.length()-3)!='*'))\r\n\t\t\treturn s;\r\n\t\treturn s.substring(0,s.length()-3);\r\n\t}", "public void shingleStrippedString(String s) {\n\t\t\n\t\tString s_stripped = s.replaceAll(\"\\\\s\",\"\");\n//\t\tSystem.out.println(s_stripped);\n\t\tthis.shingleString(s_stripped);\n\t}", "public static String stripWhiteSpace(String str) {\n if (str != null) {\n StringBuffer stringBuffer = new StringBuffer(str.length());\n for (int i = 0, strLen = str.length(); i < strLen; i++) {\n final char ch = str.charAt(i);\n if (ch != ' ' && ch != '\\r' && ch != '\\n' && ch != '\\t') {\n stringBuffer.append(ch);\n }\n }\n return stringBuffer.toString();\n }\n return str;\n }", "public static String restoreSpaces(String input) {\n\t\tchar[] chars = input.toCharArray();\n\t\tint current = 0;\n\t\tString result = \"\";\n\n\t\twhile (current < chars.length) {\n\t\t\tRetrievalTreeNode root = retrievalTree;\n\t\t\twhile (root.leaves.contains(chars[current])) {\n\t\t\t\troot = root.leaves.get(chars[current]);\n\t\t\t}\n\t\t\twhile (!root.isWord) {\n\t\t\t\troot = root.parent;\n\t\t\t}\n\t\t\tresult += input.substring(current, root.depth) + \" \";\n\t\t\tcurrent = root.depth;\n\t\t}\n\t\treturn result;\n\t}", "public String getSingleSpaceString(String sInputString) {\n String sOutputString = \"\";\n try {\n\n //loop replace all TAB by single space\n while (sInputString.contains(\"\t\")) {\n sInputString = sInputString.replaceAll(\"\t\", \" \").trim();\n }\n\n //loop to replace all double space by single space\n while (sInputString.contains(\" \")) {\n sInputString = sInputString.replaceAll(\" \", \" \").trim();\n }\n\n } catch (Exception e) {\n\n } finally {\n sOutputString = sInputString;\n sInputString = null;\n return sOutputString;\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 }", "public static String ltrim(String s)\r\n {\r\n if (s == null)\r\n return null;\r\n \r\n for (int k = 0; k < s.length(); k++)\r\n {\r\n if (!Character.isWhitespace(s.charAt(k)))\r\n return (k == 0 ? s : s.substring(k));\r\n }\r\n return \"\";\r\n }", "public static String compact(String content)\r\n {\r\n return compact(content, 15, 5);\r\n }", "public String trim(String value) {\r\n return (value == null) ? value : nullable(value.trim());\r\n }", "static String super_reduced_string(String s) {\n if (s.equals(\"\")) return \"Empty String\";\n\n StringBuffer buffer = new StringBuffer(s);\n for (int i = 1; i < buffer.length(); i++) {\n if (buffer.charAt(i) == buffer.charAt(i - 1)) {\n // Delete both if they are the same\n buffer.delete(i - 1, i + 1);\n i = 0;\n }\n\n if (buffer.length() == 0) {\n return \"Empty String\";\n }\n }\n\n return buffer.toString();\n }", "private static String clearSpaces(final String old) {\n return old.replace(\" \", \"\").replace(\"\\n\", \"\");\n }", "String trimLeft( String txt ){\r\n // trim\r\n int start = 0;\r\n WHITESPACE: for( int i=0; i < txt.length(); i++ ){\r\n char ch = txt.charAt(i);\r\n if( Character.isWhitespace(ch)){\r\n continue;\r\n }\r\n else {\r\n start = i;\r\n break WHITESPACE;\r\n }\r\n }\r\n return txt.substring(start); \r\n }", "public String trimOne(String str) {\n return trim(str, 1);\n }", "public static String removeSpaces(String str) {\n return removeRegex(str, \"[\\\\ ]\");\n }", "@Override\n public String trim(final String toTrim) {\n return replaceAll(toTrim, \"\\u00A0\", \" \").trim();\n }", "static String superReducedString(String s) {\n StringBuffer buff = new StringBuffer(s);\n for(int i = buff.length() - 1; i >= 0; i--){\n int j = i + 1;\n if(j >= buff.length()) continue;\n\n if(buff.charAt(i) == buff.charAt(j)) {\n buff.delete(i, j + 1);\n }\n }\n\n if(buff.length() == 0) return \"Empty String\";\n return String.valueOf(buff);\n }", "public static CharSequence normalize(CharSequence s) {\n if (Whitespace.containsWhitespace(s)) {\n StringTokenizer st = new StringTokenizer(s.toString()); // TODO: treats FF (formfeed) as whitespace\n if (st.hasMoreTokens()) {\n FastStringBuffer sb = new FastStringBuffer(s.length());\n while (true) {\n sb.append(st.nextToken());\n if (st.hasMoreTokens()) {\n sb.append(' ');\n } else {\n break;\n }\n }\n return sb.condense();\n } else {\n return \"\";\n }\n } else {\n return s;\n }\n }", "private String trim(StringBuilder formattedString) {\n int maxWidth;\n int cols = consoleMetaData.getCols();\n if (cols > 0) {\n maxWidth = cols - 1;\n } else {\n // Assume 80 wide. This is to minimize wrapping on console where we don't know the width (eg mintty)\n // It's not intended to be a correct solution, simply a work around\n maxWidth = 79;\n }\n if (maxWidth < formattedString.length()) {\n return formattedString.substring(0, maxWidth);\n }\n return formattedString.toString();\n }", "@Test\n\tpublic void removeWhiteSpace() {\n\t\tString input = \"two tousand sixteen\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\t\tactualCastedString = stringUtility.removeWhiteSpace(actualCastedString);\n\n\t\tString correctlyCastedString = \"2tousandsixteen\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}", "private String getTrimmedValue(String value) {\n\t\treturn value == null ? \"\" : value.trim();\n\t}", "public String removeSpaces(String str) {\n str = str.replace(\" \", \"-\");\n return str;\n }", "public String removeComplexWhiteSpaces(@NotNull String rawText) {\n return rawText.replaceAll(\"(\\\\s)?\\n\\n(\\\\s)?\", \"\\n\").trim();\n }", "public static String trimHorizontalSpace(String str) {\n String horizontalSpace = \"\\\\h\";\n str = str.replaceAll(\"(^\" + horizontalSpace + \"*)|(\" + horizontalSpace + \"*$)\", \"\");\n return str;\n }", "public static void main(String[] args) {\n\t\t\n\t\tFunction<String, String> function=string->string.replaceAll(\" \", \"\");\n\t\tString string_without_spaces=function.apply(\"hello how are you\");\n\t\tSystem.out.println(\"String with out spaces:\"+string_without_spaces);\n\t\tSystem.out.println(\"String with out spaces:\"+function.apply(\"hello how are you\"));\n\t\t\n\t}", "public static String stripTags(String string) {\n\t\tif (string == null || string.isEmpty()) {\n\t\t\treturn string;\n\t\t}\n\n\t\tString withoutTags = PATTERN_XML_TAGS.matcher(string).replaceAll(\"\");\n\t\treturn PATTERN_MULTIPLE_SPACES.matcher(withoutTags).replaceAll(\" \").trim();\n\t}", "public static String trim(String str) {\n\t\treturn str == null ? null : str.trim();\n\t}", "public String reorderSpaces(String text) {\n\t\tchar[] newStr = new char[text.length()];\n\t\tString[] splitStr = text.split(\" \");\n\t\tint wordCount = 0;\n\t\tint spaceCount = 0;\n\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tif (text.charAt(i) == ' ') {\n\t\t\t\tspaceCount++;\n\t\t\t}\n\t\t}\n\n\t\tfor (String word : splitStr) {\n\t\t\tif (!word.trim().isEmpty()) {\n\t\t\t\twordCount++;\n\t\t\t}\n\t\t}\n\n\t\tint space = wordCount <= 1 ? spaceCount : spaceCount / (wordCount - 1);\n\t\tint extraSpace = wordCount <= 1 ? 0 : spaceCount % (wordCount - 1);\n\t\tint k = 0;\n\n\t\tfor (String word : splitStr) {\n\t\t\tif (!word.trim().isEmpty()) {\n\t\t\t\tfor (int i = 0; i < word.trim().length(); i++) {\n\t\t\t\t\tnewStr[k++] = word.trim().charAt(i);\n\t\t\t\t}\n\n\t\t\t\tfor (int i = 0; k < text.length() && i < space; i++) {\n\t\t\t\t\tnewStr[k++] = ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; k < text.length() && i < extraSpace; i++) {\n\t\t\tnewStr[k++] = ' ';\n\t\t}\n\n\t\treturn new String(newStr);\n\t}", "private String normalize(String text) {\n final String nbsp = new String(new char[] {(char) 160});\n return text.replaceAll(\"\\\\s+(\" + nbsp + \")+\\\\s+\", \"$1\")\n .replace((char) 160, ' ')\n .replaceAll(\n \"\\n+\", \"\\n\")\n .replaceAll(\"\\r|\\t\", \"\")\n .trim();\n }", "private String normalizeSpace(final String arg) {\n return arg.replaceAll(Constants.SPACE_PATTERN, Constants.SPACE);\n }", "public static String chop( String input )\r\n {\r\n \tif ( isEmpty( input ) )\r\n \t\treturn input;\r\n \t\r\n \tString result = input.substring( 0, input.length() - 1 );\r\n \t\r\n \treturn result;\r\n }", "public static String noSpaces(String strIn){\n String result = \"\";\n\n if (strIn.length() != 0){\n\n String[] segs = strIn.split(\" \");\n\n for (String s: segs){\n result += s;\n }\n }\n\n return result;\n }", "public static String combineTextWithSpace(String... text) {\r\n return Arrays.asList(text).stream()\r\n .map(content -> content.strip())\r\n .collect(Collectors.joining(SPACE));\r\n }", "protected static String trimmed(String value) {\n return (value != null) ? value.trim() : null;\n }", "public static String normalize(CharSequence value) {\n if (value == null) {\n return null;\n }\n return WHITESPACE_PATTERN.matcher(value).replaceAll(\" \");\n }", "private String sanitizeString(String string) {\n if (string == null) {\n return \"\";\n }\n return string.toLowerCase().trim();\n }", "static String trimStart(String s, int max) {\n StringBuilder sb = new StringBuilder(s);\n int trimmed = 0;\n while(sb.length() > 0 && Character.isWhitespace(sb.charAt(0)) && trimmed < max) {\n sb.deleteCharAt(0);\n ++trimmed;\n }\n return sb.toString();\n }", "public static String trim(String str) {\n if (str == null) {\n return null;\n } else {\n return str.trim();\n }\n }", "public static void sayStripped(String s){\n int i, count, bC, aC;\n boolean f = false;\n count = 0;\n // After Word Space Count\n aC = 0;\n // Before Word Space Count\n bC = 0;\n // Remove spaces before word\n for(i = 0; i < s.length(); i++){\n if(s.charAt(i) == ' '){\n bC++;\n } else {\n break;\n }\n }\n s = s.substring(0 + bC, s.length());\n \n // Remove spaces after word\n for(i = s.length() - 1; i > 0; i--){\n if(s.charAt(i) == ' '){\n aC++;\n } else {\n break;\n }\n }\n s = s.substring(0, s.length() - aC);\n say(s);\n return;\n }", "public static void main(String[] args) {\n\t\tString str=\"Sneha is a good girl\";\n\t\tString finalStr=\"\";\n\t\tString str1=str;\n\t\tString str2=str.replace(\" \", \"\");\n\t\t\n\t\tSystem.out.println(\"Final string is \"+str2);\n\n\t}", "@Override\n\tpublic String clean(String input) {\n\t\tinput = input.replaceAll(removeCommonWords.toString(), \" \");\n\t\t//input = input.replaceAll(removeSingleCharacterOrOnlyDigits.toString(), \" \");\n\t\t//input = input.replaceAll(removeTime.toString(), \" \");\n\t\t//input = input.replaceAll(\"(\\\\s+>+\\\\s+)+\", \" \");\n\t\treturn input;\n\t}", "private String _removeSpaces(String matrixElement) {\n char[] es = matrixElement.toCharArray();\n char[] _temp = new char[es.length];\n int count = 0;\n for (int i = 0; i < es.length; i++) {\n if (Character.isDigit(es[i]) || es[i] == '.' || es[i] == '-') {\n _temp[count++] = es[i];\n }\n }\n return new String(_temp, 0, count);\n }", "static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }", "static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }", "static String cleanString(String s) {\n return s.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase();\n }", "public static void main(String[] args) {\n\t\tString str = \"Harmohan Is Mad Person\";\n\t\tString newString = str.replaceAll(\" \", \"\");\n\t\tSystem.out.println(newString);\n\t\t\n\n\t}", "public static String trim(String str) {\n\n\n str = str.replace(\"_IN_\", \"\");\n str = str.replace(\"_In_\", \"\");\n str = str.replace(\"__in\", \"\");\n str = str.replace(\"_Out_\", \"\");\n str = str.replace(\"__out\", \"\");\n str = str.replace(\"_Inout_\", \"\");\n str = str.replace(\"opt_\", \"\"); // this method is to remove _In_opt_\n str = str.replace(\"<span style=\\\"color:Blue;\\\">\", \"\");\n str = str.replace(\"</span>\", \"\");\n str = str.replace(\"WINAPI\", \"\");\n str = str.replace(\"_Inout_\", \"\");\n str = str.replaceAll(\"&nbsp;\", \"\");\n str = str.replaceAll(String.valueOf((char)160), \"\");\n str = str.replaceAll(\" \", \" \");\n str = str.replaceAll(\"CALLBACK \", \"\");\n str = str.replaceAll(\"const\", \"\");\n str = str.replaceAll(\"\\\\( \", \"\\\\(\");\n str = str.trim();\n str = str.substring(0, str.length() - 1);\n\n\n // System.out.println(\"AFTER TRIM \" + this.syntax);\n\n return str;\n\n\n }", "public static String trimToEmpty(String str) {\n\t\treturn str == null ? EMPTY : str.trim();\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 }", "public XMLString trim() {\n/* 780 */ return new XMLStringDefault(this.m_str.trim());\n/* */ }", "private final static String stripA( String s ) {\n\n char[] ca = s.toCharArray();\n char[] ca2 = new char [ca.length - 1];\n\n\n for ( int i=0; i<ca2.length; i++ ) {\n ca2[i] = ca[i];\n } // end for\n\n return new String (ca2);\n\n }", "public static void main(String[] args) {\n String sentence=\"I am the best\";\n System.out.println(sentence.replace(\" \", \"\"));\n }", "public static String truncateString( String input, int len ) {\n\t\tint spaceAt = 0;\n\t\tif ( input.length() <= len ) {\n\t\t\treturn input;\n\t\t} else {\n\t\t\tspaceAt = input.lastIndexOf( \" \", len+1 );\n\t\t\tif ( spaceAt > 0 ) {\n\t\t\t\treturn input.substring( 0, spaceAt );\n\t\t\t} else {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t}", "private final static String truncate( String s, int slength ) {\n\n char[] ca = s.toCharArray();\n char[] ca2 = new char [slength];\n\n\n if (slength < ca.length) { // if string is longer than allowed\n\n for ( int i=0; i<slength; i++ ) {\n ca2[i] = ca[i];\n } // end for\n\n } else {\n\n return (s);\n }\n\n return new String (ca2);\n\n }", "public String getSpaceFreeString(String sInputString) {\n String sOutputString = \"\";\n try {\n\n //loop to remove all 'tab's\n while (sInputString.contains(\"\t\")) {\n sInputString = sInputString.replaceAll(\"\t\", \"\").trim();\n }\n\n //loop to remove all space space\n while (sInputString.contains(\" \")) {\n sInputString = sInputString.replaceAll(\" \", \"\").trim();\n }\n\n } catch (Exception e) {\n\n } finally {\n sOutputString = sInputString;\n sInputString = null;\n return sOutputString;\n }\n }", "private static String escapeWhitespace( final String input )\n {\n return input.replaceAll( \"\\\\ \", \"\\\\\\\\ \" );\n }", "public String getTrimmedText(String stringToTrim, int lengthOfTrimmedString)\n/* */ {\n/* 640 */ return FormatUtil.getTrimmedText(stringToTrim, lengthOfTrimmedString);\n/* */ }", "public String getTrimmedText(String stringToTrim, int lengthOfTrimmedString)\n/* */ {\n/* 634 */ return FormatUtil.getTrimmedText(stringToTrim, lengthOfTrimmedString);\n/* */ }", "public String getTrimmedText(String stringToTrim, int lengthOfTrimmedString)\n/* */ {\n/* 631 */ return FormatUtil.getTrimmedText(stringToTrim, lengthOfTrimmedString);\n/* */ }", "public static String sanitize(String inputString) {\n\t\tif(inputString == null) {\n\t\t\treturn new String();\n\t\t}\n\t\treturn inputString.toLowerCase()\n\t\t\t\t.replaceAll(\"[#%&*'\\\"/\\\\+\\\\-\\\\.]\",\" \")\n\t\t\t\t.replaceAll(\"[^a-z0-9 ]\", \"\")\n\t\t\t\t.replaceAll(\"\\\\s+\",\" \").trim();\n\t}", "private void trimWhitespaces() {\n \n while(currentIndex < dataLength && Character.isWhitespace( data[currentIndex] )) {\n ++currentIndex;\n }\n }", "public XMLString fixWhiteSpace(boolean trimHead, boolean trimTail, boolean doublePunctuationSpaces) {\n/* 92 */ return new XMLStringDefault(this.m_str.trim());\n/* */ }", "private void removeWhitespace() {\n /*\n * Get rid of comments.\n * Regex breakdown:\n * //.* : Some string that starts with \"//\"\n */\n instruction = instruction.replaceAll(\"//.*\", \"\");\n\n /*\n * Now replace all whitespace with a single space\n * Regex breakdown:\n * \\s+ : Find all whitespace that appear in a chunk\n */\n instruction = instruction.replaceAll(\"\\\\s+\", \" \");\n\n // Get rid of leading/trailing whitespace (if there is any whitespace at\n // the start/end of a line, it will be converted into one space character\n // as a result of the previous line)\n /*\n * Regex breakdown:\n * ^ : At the start of the line...\n * \\s+ : Match whitespace that occurs in a glob\n */\n instruction = instruction.replaceAll(\"^\\\\s+\", \"\");\n /*\n * Regex breakdown:\n * \\s+ : Match whitespace that occurs in a glob\n * $ : At the end of the line\n */\n instruction = instruction.replaceAll(\"\\\\s+$\", \"\");\n }", "public static String fromNullToSpace(String a) {\r\n\t\tif (a == null || \"\".equals(a)) {\r\n\t\t\treturn \" \";\r\n\t\t} else {\r\n\t\t\treturn a;\r\n\t\t}\r\n\t}", "public static String chompTrim(String str) {\n String rtn = str;\n if (null != rtn) {\n int i = 0;\n int j = str.length() - 1;\n while (i < j) {\n char head = rtn.charAt(i);\n char tail = rtn.charAt(j);\n if (CharacterConstants.SPACE == head || CharacterConstants.LF == head\n || CharacterConstants.CR == head || CharacterConstants.TAB == head) {\n i++;\n } else {\n if (CharacterConstants.SPACE == tail || CharacterConstants.LF == tail\n || CharacterConstants.CR == tail || CharacterConstants.TAB == tail) {\n j--;\n } else {\n break;\n }\n }\n }\n rtn = rtn.substring(i, j + 1);\n }\n return rtn;\n }", "public String quitaespacios (String str) {\n\n str = repNull(str);\n str = str.trim();\n str = rep(str, \"[ ]{2,}\", \" \");\n\n return str;\n }", "private static String formattingWhitespace(String string) {\n // Splitting the String.\n String[] stringSplits = string.split(\" \");\n\n StringBuilder formattedString = new StringBuilder();\n for (int word = 0; word < stringSplits.length; word++) {\n // If the element is not an empty String.\n if (!stringSplits[word].isEmpty()) {\n // Checking if the word is not the last word of the sentence.\n if (word < stringSplits.length - 1) {\n // Adding a space after the word.\n formattedString.append(stringSplits[word]).append(\" \");\n }\n // If last word of the sentence.\n else {\n // Last word does not have a space after it.\n formattedString.append(stringSplits[word]);\n }\n }\n }\n // Returning a formatted String.\n return formattedString.toString();\n }" ]
[ "0.80196947", "0.7419061", "0.7361601", "0.69824326", "0.6960885", "0.6953307", "0.6940444", "0.6844212", "0.68134654", "0.6813231", "0.680281", "0.67948604", "0.67175895", "0.6696258", "0.6647704", "0.6638677", "0.66368", "0.66213423", "0.6606618", "0.6605178", "0.6605178", "0.6582387", "0.650962", "0.6501728", "0.6474721", "0.6461257", "0.64026374", "0.6333013", "0.6326509", "0.6285229", "0.62807596", "0.6269686", "0.62414116", "0.62230414", "0.62204355", "0.62029105", "0.6177593", "0.6141925", "0.6126761", "0.6108452", "0.60576886", "0.6046883", "0.6031935", "0.6021278", "0.6011825", "0.6000856", "0.59963495", "0.59897316", "0.59882754", "0.5972167", "0.5892827", "0.5887289", "0.58691835", "0.586544", "0.584888", "0.5814852", "0.58065486", "0.5786831", "0.57774836", "0.572972", "0.5725122", "0.5713371", "0.57080054", "0.56956846", "0.5671672", "0.56641954", "0.5657896", "0.564868", "0.56329685", "0.5626742", "0.5620991", "0.5617708", "0.5602107", "0.559785", "0.55949956", "0.5594161", "0.5594161", "0.5594161", "0.5592805", "0.5582083", "0.5549061", "0.5547217", "0.5545336", "0.55260974", "0.5525471", "0.5522471", "0.55034727", "0.54988426", "0.5489932", "0.5489224", "0.54787004", "0.546888", "0.5465683", "0.5445525", "0.5407566", "0.5391159", "0.5382615", "0.53624016", "0.5346398", "0.53371304" ]
0.6679091
14
Generate a call identifier. This is useful when we want to generate a call identifier in advance of generating a message.
public synchronized String generateCallIdentifier(String address) { String date = new Long(System.currentTimeMillis() + callIDCounter++ + rand.nextLong()).toString(); byte cid[] = digester.digest(date.getBytes()); String cidString = Utils.toHexString(cid); return cidString + "@" + address; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String generateNewCallId()\n {\n\n\t\t// Generate the variant number\n\t\tint variable = NumberUtils.getIntRandom();\n\n\t\t// Convert to hex value\n\t\tString hex = NumberUtils.toHexValue(variable);\n\n\t\t// Compose the final call id\n\t\treturn \"{2B073406-65D8-A7B2-5B13-B287\" + hex + \"}\";\n\t}", "public String getCallId();", "public String getCallIdentifier() {\n return callIdHeader.getCallId();\n }", "public String generatePhoneId() {\n String device = Build.DEVICE.equals(\"generic\") ? \"emulator\" : Build.DEVICE;\n String network = getNetwork();\n String carrier = (network == NETWORK_WIFI) ?\n getWifiCarrierName() : getTelephonyCarrierName();\n\n StringBuilder stringBuilder = new StringBuilder(ANDROID_STRING);\n stringBuilder.append('-').append(device).append('_')\n .append(Build.VERSION.RELEASE).append('_').append(network)\n .append('_').append(carrier).append('_').append(getTelephonyPhoneType())\n .append('_').append(isLandscape() ? \"Landscape\" : \"Portrait\");\n\n return stringBuilder.toString();\n }", "String generateUID();", "public String generateID() {\n return IDPREFIX + nextidint++;\n }", "public static String generateCustomerID() {\n\tcustomerID++;\n\treturn String.valueOf(customerID);\n }", "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}", "public int generateId() {\n if (allMessage.size() ==0) {\n return 1000;\n }\n return allMessage.get(allMessage.size() - 1).getId() + 1;\n }", "private String generatePurchaseId() {\n\t\tint purchaseId = purchaseIdCounter.incrementAndGet();\n\t\treturn Integer.toString(purchaseId);\n\t}", "static String generateId() {\r\n\t\treturn UUID.randomUUID().toString().replaceAll(\"-\", \"\");\r\n\t}", "private static int generateId() {\n\t\treturn ++sId;\n\t}", "public UUID getCallId() {\n return callId;\n }", "public String generateReferenceId(){\n String lastSequenceNumber = databaseAccessResource.getLastRequestSequenceNumber();\n //ToDo : write the logic to generate the next sequence number.\n return null;\n }", "protected String generateCommandID()\n {\n String res = new String (_initialID);\n // \"increase\" the ID for the next call\n boolean wasIncr = false;\n for (int i = _initialID.length-1; i>=0; i--)\n {\n if (_initialID[i] >= 'Z')\n {\n _initialID[i] = 'A';\n if ( i > 0 )\n {\n _initialID[i-1]++;\n wasIncr = true;\n }\n }\n else\n {\n if (! wasIncr) _initialID[i]++;\n break;\n }\n }\n return res;\n }", "public String generatePurchaseId() {\n\t\tint purchaseId = purchaseIdCounter.incrementAndGet();\n\t\treturn Integer.toString(purchaseId);\n\t}", "private long generateID() {\n\t\treturn ++lastID;\n\t}", "public String GenerateID()\n\t{\n\t\tRandom randomGenerator = new Random();\n\t\treturn Integer.toString(randomGenerator.nextInt(Integer.MAX_VALUE));\n\t}", "public static String generateID(int num){\n StringBuilder str=new StringBuilder();//定义变长字符串\n Random random=new Random();\n for (int i = 0; i < num; i++) {\n str.append(random.nextInt(10));\n }\n return str.toString();\n }", "private String createId() {\n int idLength = 5;\n String possibleChars = \"1234567890\";\n Random random = new Random();\n StringBuilder newString = new StringBuilder();\n\n for (int i = 0; i < idLength; i++) {\n int randomInt = random.nextInt(10);\n newString.append(possibleChars.charAt(randomInt));\n }\n\n return newString.toString();\n }", "public String generateCustomer_Id() {\n\t\tString customer_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\twhile (registerDao.checkCustomerIdIfExist(customer_Id)) {\n\t\t\tcustomer_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\t}\n\t\treturn customer_Id;\n\t}", "public String generateLink_Id() {\n\t\tString Link_Id = \"L\" + String.valueOf(rand.genRandomDigits(7));\n\t\twhile (registerDao.checkLinkIdIfExist(Link_Id)) {\n\t\t\tLink_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\t}\n\t\treturn Link_Id;\n\t}", "public static String generateNewUserId() {\r\n\t\tDate date = new Date();\r\n\t\treturn String.format(\"%s-%s\", UUID.randomUUID().toString(),\r\n\t\t\t\tString.valueOf(date.getTime()));\r\n\t}", "public static String generateSaleID() {\n\tsaleID++;\n\treturn String.valueOf(saleID);\n }", "private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }", "private String genSenderID(String phoneNumber) {\r\n String sid = phoneNumber.replaceAll(senderIDRegex, \"\");\r\n return sid.length() > 11 ? sid.substring(sid.length() - 11, sid.length()) : sid;\r\n }", "String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }", "public String generateTeamID() {\n List<Team> teams = getAllOrdered();\n int idNum;\n \n if (teams == null || teams.isEmpty()) \n idNum = 0;\n else {\n String idStr = teams.get(teams.size() - 1).getTeamID();\n idNum = Integer.parseInt(idStr.substring(2, idStr.length()));\n }\n \n String teamID;\n int newIdNum = idNum + 1;\n if (newIdNum <= 9)\n teamID = \"T_000\" + newIdNum;\n else if (newIdNum <= 99) \n teamID = \"T_00\" + newIdNum;\n else if (newIdNum <= 999)\n teamID = \"T_0\" + newIdNum;\n else \n teamID = \"T_\" + newIdNum;\n \n return teamID;\n }", "private String generateUniqueIdString() {\r\n return TimeBasedUUID.getUUIDAsString();\r\n }", "public static String generate() {\n return StringUtil.join(\n '.',\n PROCESS_ID,\n String.valueOf(Thread.currentThread().getId()),\n String.valueOf(THREAD_ID_SEQUENCE.get().nextSeq())\n );\n }", "@Override\r\n\tpublic String createID() {\r\n\t\t \r\n\t\t\t\treturn transCode.toString();\r\n\t\t\t\t}", "@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }", "@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }", "public static int generateUniqueId(){\r\n String returnme = GregorianCalendar.getInstance().getTimeInMillis() + \"\";\r\n return Integer.parseInt(returnme.substring(returnme.length() - 9, returnme.length()));\r\n }", "public String generateActivationId() {\n return UUID.randomUUID().toString();\n }", "public String generateId() {\n return Utils.generateKey();\n }", "public void generateID()\n {\n ID = this.hashCode();\n }", "public String generateId() {\n return RandomStringUtils.randomAlphabetic(32);\n }", "public String generateCode(String username, String idPost) {\n String generatedID = UUID.randomUUID().toString();\n String[] parts = generatedID.split(\"-\");\n String uniqueID = \"Subscription-\" + username + \"-\" + idPost;\n return uniqueID;\n }", "protected String generateStateId() {\n\t\treturn ServiceBus.crypto.getRandomString();\n\t}", "public static String generateEmpID() {\n\tempID++;\n\treturn String.valueOf(empID);\n }", "@Override\n public long generateNewContractId() {\n return idCounter++;\n }", "public int genID() {\n int uid = this.hashCode();\n if (uid < 0) {\n uid = Math.abs(uid);\n uid = uid * 15551;\n }\n return uid;\n }", "public static String generateProductID() {\n\tproductID++;\n\treturn String.valueOf(productID);\n }", "private String getNewConversationId( )\r\n {\r\n return UUID.randomUUID( ).toString( );\r\n }", "protected int generateUniqueId() {\n\t\tint id = super.getUniqueId();\n\t\tsuper.setUniqueId(getUniqueId() + 1);\n\t\treturn id;\n\t}", "String getUniqueId();", "public static String generateInstanceId() {\n\t\t// TODO Use a complex hashing algorithm and generate 16-character\n\t\t// string;\n\n\t\treturn Calendar.getInstance().getTime().toString().replaceAll(\" \", \"\");\n\t}", "private synchronized int generateJobID() {\n\t\t/* generate JobID */\n\t\tint jobID = lastJobID;\n\t\tlastJobID += 1;\n\t\treturn jobID;\n\t}", "String getIdNumber();", "public synchronized int registerCall(RegisteredCall call) {\n\t\tint id = idGen.generateAndReserve();\n\t\tcurrentCalls.put(Integer.valueOf(id), call);\n\t\treturn id;\n\t}", "public static int genID(){\n Random rand = new Random();\n\n int theID = rand.nextInt(999)+1;\n\n return theID;\n\n }", "public interface CallId {\r\n}", "public static String makeRandomID() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }", "public static String createPID()\r\n\t{\r\n\t\tunique_count++;\r\n\t\tif(unique_count >= 100) unique_count = 0;\r\n\t\tString str_num = String.format(\"%02d\", unique_count);\r\n\t\t\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyMMddHHmmss\");\r\n\t\tString pid = dateFormat.format(new Date()) + str_num;\r\n\t\treturn pid;\r\n\t}", "int toIdentifier() {\n return 1000 * y + x;\n }", "public String generatePlayerID() {\n List<Player> players = getAllOrdered();\n int idNum;\n \n if (players == null || players.isEmpty())\n idNum = 0;\n else {\n String idStr = players.get(players.size() - 1).getPlayerID();\n idNum = Integer.parseInt(idStr.substring(2, idStr.length()));\n }\n \n String playerID;\n int newIdNum = idNum + 1;\n if (newIdNum <= 9)\n playerID = \"P_000\" + newIdNum;\n else if (newIdNum <= 99) \n playerID = \"P_00\" + newIdNum;\n else if (newIdNum <= 999)\n playerID = \"P_0\" + newIdNum;\n else \n playerID = \"P_\" + newIdNum;\n \n return playerID;\n }", "@NonNull\n public String getIdentifier() {\n return mProto.id;\n }", "private String generateUID()\n {\n String uid;\n int nbAccounts = this.getNumberOfAccounts();\n String host = this.registration.getHost();\n int nbAccountsForHost = this.getNbAccountForHost(host);\n \n if (nbAccounts == 0 || (this.isModification() && nbAccounts == 1) ||\n nbAccountsForHost == 0 || (this.isModification() && nbAccountsForHost == 1))\n {\n // We create the first account or we edit the onlyone\n // Or we create the first account for this server or edit the onlyone\n uid = host;\n }\n else\n {\n uid = host + \":\" + this.registration.getPort();\n }\n \n return uid;\n }", "public static String generateId(int digitAmount) {\n\t\t\n\t\tfinal String upperAlpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\t\t\n\t\tString brokerOrderID = \"\";\n\t\tfor (int i = 0; i < digitAmount; i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tint randomAlphaIndex = ThreadLocalRandom.current().nextInt(0, 25 + 1);\n\t\t\t\tbrokerOrderID += upperAlpha.charAt(randomAlphaIndex);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint randomInteger = ThreadLocalRandom.current().nextInt(1, 9 + 1);\n\t\t\t\tbrokerOrderID += Integer.toString(randomInteger);\n\t\t\t}\n\t\t}\n\t\treturn brokerOrderID;\n\t}", "@Override\n public String getToID()\n {\n \tStringBuilder sb = new StringBuilder();\n\n\t\tint prefix = getPrefix();\n \tint ident = getIdent1();\n\n \tswitch( IdentType.fromIdent( ident ) )\n \t{\n \t\tcase IPFIXI:\n \t\t\tsb.append( \"INTER-PREFIX\" );\n \t\t\tbreak;\n \t\tcase ALLI:\n \t\t\tsb.append( \"ALL RADIOS\" );\n \t\t\tbreak;\n \t\tcase PABXI:\n \t\t\tsb.append( \"PABX EXT\" );\n \t\t\tbreak;\n \t\tcase PSTNSI1:\n \t\tcase PSTNSI2:\n \t\tcase PSTNSI3:\n \t\tcase PSTNSI4:\n \t\tcase PSTNSI5:\n \t\tcase PSTNSI6:\n \t\tcase PSTNSI7:\n \t\tcase PSTNSI8:\n \t\tcase PSTNSI9:\n \t\tcase PSTNSI10:\n \t\tcase PSTNSI11:\n \t\tcase PSTNSI12:\n \t\tcase PSTNSI13:\n \t\tcase PSTNSI14:\n \t\tcase PSTNSI15:\n \t\t\tsb.append( \"PRE-DEFINED PSTN\" );\n \t\t\tbreak;\n \t\tcase PSTNGI:\n \t\t\tsb.append( \"PSTN GATEWAY\" );\n \t\t\tbreak;\n \t\tcase TSCI:\n \t\t\tsb.append( \"SYSTEM CONTROLLER\" );\n \t\t\tbreak;\n \t\tcase DIVERTI:\n \t\t\tsb.append( \"CALL DIVERT\" );\n \t\t\tbreak;\n \t\tcase USER:\n\t\t\tdefault:\n\t\t\t\tif( prefix != 0 || ident != 0 )\n\t\t\t\t{\n\t \tsb.append( format( prefix, 3 ) );\n\t \tsb.append( \"-\" );\n\t \tsb.append( format( ident, 4) );\n\t\t\t\t}\n \tbreak;\n \t}\n\n \treturn sb.toString();\n }", "private String generateOrderNumber() {\n return OBJ_PREFIX + ID_GENERATOR.getAndIncrement();\n }", "public UUID createMsgId() {\r\n return UUIDFactory.newSeqUUID();\r\n }", "public String generateClientId() {\n return clientIdGenerator.generate().toString();\n }", "public int getCallId() {\n return this.mCallId;\n }", "public\t javax.sip.header.CallIdHeader getCallId()\n { return callIdHeader ; }", "private static int generateCircleId(){\n return snextCircleId.incrementAndGet();\n\n }", "public static String getUniqueIdentifier() {\r\n UUID uuid = UUID.randomUUID();\r\n return uuid.toString();\r\n }", "public static String generateId(String s){\n\t\tString date = LocalDate.now().format(DateTimeFormatter.ofPattern(\"yyMMdd\"));\n\t\tString key = s +\"_\" + date;\n\t\t//com.incr(key);\n\t\tredisTemplate.opsForValue().increment(key);\n\t\tInteger num = redisTemplate.opsForValue().get(key);\n\t\treturn date + \"-\" + String.format(\"%08d\",num);\n\t}", "private String generateId(String input) {\n\t\treturn StringUtil.hashSHA256(input);\n\t}", "private String getID()\n {\n String chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+{}|:<>?/.,';][=-`~\";\n String id = \"\";\n int max = new Random().nextInt((16 - 12) + 1)+12;\n for(int i=0;i<16;i++)\n {\n int r = new Random().nextInt((chars.length()-1 - 0) + 1)+0;\n id+=chars.charAt(r);\n }\n return id;\n }", "public static String randomIdentifier() {\r\n\t\tfinal String lexicon = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n\t\tfinal java.util.Random rand = new java.util.Random();\r\n\t\t// consider using a Map<String,Boolean> to say whether the identifier is\r\n\t\t// being used or not\r\n\t\tfinal Set<String> identifiers = new HashSet<String>();\r\n\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\twhile (builder.toString().length() == 0) {\r\n\t\t\tint length = rand.nextInt(5) + 5;\r\n\t\t\tfor (int i = 0; i < length; i++)\r\n\t\t\t\tbuilder.append(lexicon.charAt(rand.nextInt(lexicon.length())));\r\n\t\t\tif (identifiers.contains(builder.toString()))\r\n\t\t\t\tbuilder = new StringBuilder();\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}", "public String gerarUID() {\n //String id1 = UUID.randomUUID().toString().replace(\"-\", \"\");\n String id1 = UUID.randomUUID().toString();\n return id1;\n }", "public static final String generateOrderId() {\n return generateOrderId(RANDOM.nextInt(1000));\n }", "private String createConvID(int port, String ipAddress) {\n\n\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(port+ipAddress);\n\n\t\treturn sb.toString();\n\t}", "private int generateNewId() {\n int size = userListCtrl.getUsers().size();\n \n if (size == 0) {\n return 1;\n } else {\n return userListCtrl.getUsers().get(size-1).getUserID()+1;\n }\n }", "private Long createId() {\n return System.currentTimeMillis() % 1000;\n }", "public static String makeAnonID() {\n String id = \"__anon\" + nextAnonID;\n nextAnonID++;\n return id;\n }", "private static long newId() {\n return REQUEST_ID.getAndIncrement();\n }", "private static String buildID(String userID, Long propID) {\r\n\t\tString format = \"%020d\";\r\n\t\treturn userID + String.format(format, propID);\r\n\t}", "public String GiveEventID(){\n \tRandom x = new Random();\n \tString pool = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n \tString newid = \"\";\n \tfor(int i = 0;i<26;i++){\n \t\tnewid+=pool.charAt(x.nextInt(36));\n \t}\n \tJSONArray ja = fetchAllNotes(TimeT.getName(),new String[] {TimeT.getFields()[0]},new String[] {newid});\n \tif(ja.length()!=0)\n \t\tnewid = GiveEventID();\n \treturn newid;\n \t\n }", "public static String aUniqueIdentifier() {\n return \"MONEXT\" + new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n }", "public static int generateViewId() {\n\t\tdo {\n\t\t\tfinal int result = sNextGeneratedId.get();\n\t\t\t// aapt-generated IDs have the high byte nonzero; clamp to the range under that.\n\t\t\tint newValue = result + 1;\n\t\t\tif (newValue > 0x00FFFFFF){\n\t\t\t\tnewValue = 1; // Roll over to 1, not 0.\n\t\t\t}\n\t\t\tif (sNextGeneratedId.compareAndSet(result, newValue)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}while(true);\n\t}", "private\tString\tgenerateUUID(){\n\t\treturn\tUUID.randomUUID().toString().substring(0, 8).toUpperCase();\n\t}", "String getUniqueID();", "public synchronized String generateBranchId() {\n long num = rand.nextLong() + Utils.counter++ + System.currentTimeMillis();\n byte bid[] = digester.digest(Long.toString(num).getBytes());\n return SIPConstants.BRANCH_MAGIC_COOKIE + Utils.toHexString(bid);\n }", "public static byte[] generateUpstreamId() {\n byte[] upstreamId = new byte[ID_BYTE_LENGTH];\n String uuidStr = UUID.randomUUID().toString();\n for (int i = 0; i < ID_BYTE_LENGTH; i++) {\n upstreamId[i] = (byte) uuidStr.charAt(i);\n }\n return upstreamId;\n }", "public String createID(Connection conn, SimpleFeature feature, Statement statement)\r\n throws IOException {\r\n \t//JD: replacing no word characters with underscore\r\n \t//JD: forcing to start with a latter\r\n // According to GML and XML schema standards, FID is a XML ID\r\n // (http://www.w3.org/TR/xmlschema-2/#ID), whose acceptable values are those that match an\r\n // NCNAME production (http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName):\r\n // NCName ::= (Letter | '_') (NCNameChar)* /* An XML Name, minus the \":\" */\r\n // NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender\r\n // We have to fix the generated UID replacing all non word chars with an _ (it seems\r\n // they area all \":\")\r\n// return \"fid-\" + new UID().toString().replaceAll( \"\\\\W\",\"_\" );\r\n// optimization, since the UID toString uses only \":\" and converts long and integers\r\n // to strings for the rest, so the only non word character is really \":\"\r\n return \"fid-\" + new UID().toString().replace(':', '_');\r\n }", "private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }", "public String getUniqueID(Context ctx)\n {\n String m_szDevIDShort = \"\";\n String m_szAndroidID = \"\";\n String m_szWLANMAC = \"\";\n\n try {\n m_szDevIDShort = \"35\" + // we make this look like a valid IMEI\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n m_szAndroidID = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n WifiManager wm = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE);\n m_szWLANMAC = wm.getConnectionInfo().getMacAddress();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n String m_szLongID = m_szWLANMAC + m_szDevIDShort + m_szAndroidID;\n\n MessageDigest m = null;\n try {\n m = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n m.update(m_szLongID.getBytes(), 0, m_szLongID.length());\n byte p_md5Data[] = m.digest();\n\n //noinspection RedundantStringConstructorCall\n String m_szUniqueID = new String();\n for (int i = 0; i < p_md5Data.length; i++) {\n int b = (0xFF & p_md5Data[i]);\n // if it is a single digit, make sure it have 0 in front (proper\n // padding)\n if (b <= 0xF)\n m_szUniqueID += \"0\";\n // add number to string\n m_szUniqueID += Integer.toHexString(b);\n }\n\n return m_szUniqueID;\n }", "private String genrateOrderTrakingnumber() {\n return UUID.randomUUID().toString();\n }", "private static int generateViewId() {\n for (;;) {\n final int result = sNextGeneratedId.get();\n // aapt-generated IDs have the high byte nonzero; clamp to the range under that.\n int newValue = result + 1;\n if (newValue > 0x00FFFFFF) newValue = 1; // Roll over to 1, not 0.\n if (sNextGeneratedId.compareAndSet(result, newValue)) {\n return result;\n }\n }\n }", "public String getCallingNumber() throws FrameException {\n try {\n byte data[] = (byte[])infoElements.get(new Integer(InfoElement.CALLING_NUMBER));\n return new String(data);\n } catch (Exception e) {\n throw new FrameException(e);\n }\n }", "public String getNextID() {\n String id = \"am\" + Integer.toString(nextID);\n nextID++;\n return id;\n }", "long getUID() throws UidGenerateException;", "public int generateUniqueID(){\n\n int uniqueID = 100; \n int maxID =getMaxId() ;\n \n uniqueID = uniqueID + maxID;\n\n return uniqueID;\n }", "public String nextAvalibleID()\r\n\t{\r\n\t\t//creates a blank string as all Id's have to be 3 digits and if it was an itger it would remove the leading 0's\r\n\t\tString id = \"\";\r\n\t\t//If the pointer is 0 then the id needs to be 001\r\n\t\tif(nextPatientLocation == 0)\r\n\t\t{\r\n\t\t\tid = \"001\";\r\n\t\t}\r\n\t\t//otherwise it is the existing length + howver many 0's needed to make it 3 digits + the pointer data + 1 to make the first one not overlap any leaing id's\r\n\t\telse if(nextPatientLocation < 10)\r\n\t\t{\r\n\t\t\tid = \"00\"+(nextPatientLocation+1);\r\n\t\t}\r\n\t\telse if(nextPatientLocation < 100)\r\n\t\t{\r\n\t\t\tid = \"0\"+(nextPatientLocation+1);\r\n\t\t}\r\n\t\telse if(nextPatientLocation < 999)\r\n\t\t{\r\n\t\t\tid = \"\"+(nextPatientLocation+1);\r\n\t\t}\r\n\t\treturn id;//Id is returned\r\n\t}", "private static String getUniqueId()\n\t{\n\t\tfinal int limit = 100000000;\n\t\tint current;\n\t\tsynchronized (DiskFileItem.class)\n\t\t{\n\t\t\tcurrent = counter.nextInt();\n\t\t}\n\t\tString id = Integer.toString(current);\n\n\t\t// If you manage to get more than 100 million of ids, you'll\n\t\t// start getting ids longer than 8 characters.\n\t\tif (current < limit)\n\t\t{\n\t\t\tid = (\"00000000\" + id).substring(id.length());\n\t\t}\n\t\treturn id;\n\t}", "public static String uniqueId() {\r\n return UUID.randomUUID().toString();\r\n }", "public String getNewId() {\n\t\treturn \"sccp-\" + idCounter++;\n\t}" ]
[ "0.8379495", "0.7001227", "0.69783133", "0.6609439", "0.66006774", "0.656842", "0.6564051", "0.64523077", "0.6450595", "0.64445823", "0.6432438", "0.64305025", "0.6312512", "0.6291719", "0.6276618", "0.6268482", "0.62060195", "0.61962795", "0.6152315", "0.6135717", "0.61023957", "0.6093647", "0.6075726", "0.6063871", "0.6058857", "0.6044033", "0.6028544", "0.6001785", "0.5997666", "0.5991878", "0.59836763", "0.5970864", "0.5970864", "0.5969457", "0.5966353", "0.59501195", "0.5949899", "0.5949762", "0.59447867", "0.59075385", "0.5902293", "0.58979857", "0.5891921", "0.5886235", "0.58838505", "0.5882403", "0.5869414", "0.58677924", "0.5867522", "0.58553785", "0.58406705", "0.58362967", "0.5822503", "0.58215", "0.58190435", "0.5818598", "0.5806901", "0.57522684", "0.5729157", "0.5724096", "0.5718218", "0.5710643", "0.5704808", "0.5704672", "0.5687569", "0.56840986", "0.56824374", "0.5682187", "0.56668377", "0.5663187", "0.56541914", "0.56502366", "0.5636762", "0.5632686", "0.56319034", "0.5629411", "0.56059295", "0.55872893", "0.5567175", "0.55626106", "0.5556969", "0.5536194", "0.5530043", "0.5527095", "0.5523313", "0.55204946", "0.5509527", "0.5506474", "0.5501153", "0.5482566", "0.5481024", "0.54778713", "0.5468344", "0.546712", "0.546281", "0.54580563", "0.54563755", "0.54504085", "0.5444103", "0.54413927" ]
0.7780618
1
Generate a tag for a FROM header or TO header. Just return a random 4 digit integer (should be enough to avoid any clashes!) Tags only need to be unique within a call.
public synchronized String generateTag() { return Integer.toHexString(rand.nextInt()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getNewRandomTag() {\n\t\tbyte t[] = new byte[tagLength];\n\t\tfor (int i = 0; i < tagLength; i++) {\n\t\t\tt[i] = (byte) rand('a', 'z');\n\t\t}\n\t\treturn new String(t);\n\t}", "String generateUID();", "public String getFromTag() {\n return fromHeader == null? null: fromHeader.getTag();\n }", "UUID generateRandomUuid();", "private\tString\tgenerateUUID(){\n\t\treturn\tUUID.randomUUID().toString().substring(0, 8).toUpperCase();\n\t}", "private String genSenderID(String phoneNumber) {\r\n String sid = phoneNumber.replaceAll(senderIDRegex, \"\");\r\n return sid.length() > 11 ? sid.substring(sid.length() - 11, sid.length()) : sid;\r\n }", "private String generate_uuid() {\n\n int random_length = 12;\n int time_length = 4;\n\n byte[] output_byte = new byte[random_length+time_length];\n\n //12 byte long secure random\n SecureRandom random = new SecureRandom();\n byte[] random_part = new byte[random_length];\n random.nextBytes(random_part);\n System.arraycopy(random_part, 0, output_byte, 0, random_length);\n\n //merged with 4 less significant bytes of time\n long currentTime = System.currentTimeMillis();\n for (int i=random_length; i<output_byte.length; i++){\n output_byte[i] = (byte)(currentTime & 0xFF);\n currentTime >>= 8;\n }\n\n //Converted to base64 byte\n String output = Base64.encodeBase64String(output_byte);\n Log.debug_value(\"UUID\", output);\n return output;\n\n }", "private String createId() {\n int idLength = 5;\n String possibleChars = \"1234567890\";\n Random random = new Random();\n StringBuilder newString = new StringBuilder();\n\n for (int i = 0; i < idLength; i++) {\n int randomInt = random.nextInt(10);\n newString.append(possibleChars.charAt(randomInt));\n }\n\n return newString.toString();\n }", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "private int random(int from, int to) {\n return from + (int) (Math.random() * (to - from + 1));\n }", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "public static String generateDeviceToken() throws EndlosException {\n\t\treturn hash(Utility.generateUuid() + DateUtility.getCurrentEpoch());\n\t}", "private String getToken() {\n\t\tString numbers = \"0123456789\";\n\t\tRandom rndm_method = new Random();\n String OTP = \"\";\n for (int i = 0; i < 4; i++)\n {\n \tOTP = OTP+numbers.charAt(rndm_method.nextInt(numbers.length()));\n \n }\n return OTP;\n\t}", "public String generateTrackingNumber() {\n String randChars = \"ABCDEFGHIJ0123456789\";\n StringBuilder trackingNumber = new StringBuilder();\n Random rand = new Random();\n \n while(trackingNumber.length() < 12) {\n int i = (int) (rand.nextFloat() * randChars.length());\n trackingNumber.append(randChars.charAt(i));\n }\n String trackingNum = trackingNumber.toString();\n return trackingNum;\n }", "private static String getRandString() {\r\n return DigestUtils.md5Hex(UUID.randomUUID().toString());\r\n }", "private String generateNewCallId()\n {\n\n\t\t// Generate the variant number\n\t\tint variable = NumberUtils.getIntRandom();\n\n\t\t// Convert to hex value\n\t\tString hex = NumberUtils.toHexValue(variable);\n\n\t\t// Compose the final call id\n\t\treturn \"{2B073406-65D8-A7B2-5B13-B287\" + hex + \"}\";\n\t}", "private static byte[] createHeader() {\n Random r = new Random();\n\n byte[] output = new byte[12];\n\n // Create random message id\n short messageID = (short) r.nextInt(Short.MAX_VALUE + 1);\n\n // Create a buffer we can construct the header in.\n ByteBuffer buf = ByteBuffer.wrap(output);\n\n // Place the message into the buffer.\n buf.putShort(messageID);\n\n // Sets QR, OPCODE, AA, TC, RD, RA, and RCODE\n buf.put((byte)0x01);\n buf.put((byte)0x20);\n\n // QDCOUNT, we're making one request.\n buf.putShort((short) 1);\n\n // Rest are 0\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n\n return output;\n }", "public String getToTag() {\n return toHeader == null? null: toHeader.getTag();\n }", "public static byte[] generateUpstreamId() {\n byte[] upstreamId = new byte[ID_BYTE_LENGTH];\n String uuidStr = UUID.randomUUID().toString();\n for (int i = 0; i < ID_BYTE_LENGTH; i++) {\n upstreamId[i] = (byte) uuidStr.charAt(i);\n }\n return upstreamId;\n }", "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}", "@Override\n public java.lang.String generateRackID() {\n String randomString = \"\";\n String rackId = \"\";\n for (int i = 0; i < 2; i++) {\n char[] arr = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\n int select = new Random().nextInt(arr.length);\n randomString += arr[select];\n }\n\n rackId = randomString.toUpperCase() + \".\" + rackCounter + \".\" + copyrightYear;\n rackCounter++;\n return rackId;\n }", "public NUID() {\n // Generate a cryto random int, 0 <= val < max to seed pseudorandom\n seq = nextLong(PRAND, maxSeq);\n inc = minInc + nextLong(PRAND, maxInc - minInc);\n pre = new char[preLen];\n for (int i = 0; i < preLen; i++) {\n pre[i] = '0';\n }\n randomizePrefix();\n }", "java.lang.String getUUID();", "String getUuid();", "public String generateLink_Id() {\n\t\tString Link_Id = \"L\" + String.valueOf(rand.genRandomDigits(7));\n\t\twhile (registerDao.checkLinkIdIfExist(Link_Id)) {\n\t\t\tLink_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\t}\n\t\treturn Link_Id;\n\t}", "public static String getTagID(String str){\n\t\tString tag = str.substring(0, 8);\n\t\tString regEx = \"(\\\\d{1}|[A-F])+(\\\\d{1}|[A-F])+(\\\\d{1}|[A-F])+(\\\\d{1}|[A-F])+(\\\\d{1}|[A-F])+(\\\\d{1}|[A-F])+(\\\\d{1}|[A-F])+(\\\\d{1}|[A-F])\";\n\t\tPattern pattern = Pattern.compile(regEx);\n\t\tMatcher matcher = pattern.matcher(tag);\n\t\t\n\n\t\tif(!matcher.find()){\n\t\t\t\n\t\t\treturn \"\";\n\t\t}\n\t\n\t\treturn tag;\n\t}", "private String genrateOrderTrakingnumber() {\n return UUID.randomUUID().toString();\n }", "public String genUserToken()\n\t{\n\t\tString token = \"\";\n\t\tfor (int i = 0; i < 16; i++)\n\t\t{\n\t\t\ttoken = token + tokenGenerator.nextInt(10);\n\t\t}\n\t\treturn token;\n\t}", "private String getID()\n {\n String chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+{}|:<>?/.,';][=-`~\";\n String id = \"\";\n int max = new Random().nextInt((16 - 12) + 1)+12;\n for(int i=0;i<16;i++)\n {\n int r = new Random().nextInt((chars.length()-1 - 0) + 1)+0;\n id+=chars.charAt(r);\n }\n return id;\n }", "private String getRandomUniqueId() {\r\n return \"WEBSOCKET.\" + new Random().nextInt(100);\r\n }", "public String generateGUID() {\n Random randomGenerator = new Random();\n String hash = DigestUtils.shaHex(HASH_FORMAT.format(new Date())\n + randomGenerator.nextInt());\n return hash.substring(0, GUID_LEN);\n }", "public static String getUUID() {\n\t\treturn UUID.randomUUID().toString().toUpperCase().replace(\"-\", \"\").substring(0, 5);\n\t}", "public static String createRandomNum() {\n\t\tlogger.debug(\"Navigating to URL\");\n\t\tString num = \"\";\n\t\ttry {\n\t\t\tnum = RandomStringUtils.random(4, true, true);\n\t\t\tlogger.debug(\"Generated Random Number is : \" + num);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn num;\n\t}", "public synchronized String generateCallIdentifier(String address) {\n String date = new Long(System.currentTimeMillis() + callIDCounter++ + rand.nextLong()).toString();\n byte cid[] = digester.digest(date.getBytes());\n String cidString = Utils.toHexString(cid);\n return cidString + \"@\" + address;\n }", "String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }", "Tag createTag();", "public UUID createMsgId() {\r\n return UUIDFactory.newSeqUUID();\r\n }", "private int genKey()\n {\n return (nameValue.getData() + scopeDefined.getTag()).hashCode();\n }", "public JdwpId (byte tag)\r\n {\r\n _tag = tag;\r\n }", "protected String createRequestId(HttpServletRequest ignored) {\n return idGenerator.next();\n }", "private String generateUniqueIdString() {\r\n return TimeBasedUUID.getUUIDAsString();\r\n }", "UUID getUUID();", "public static String createUniqueKey() {\r\n\r\n\t\tint iRnd;\r\n\t\tlong lSeed = System.currentTimeMillis();\r\n\t\tRandom oRnd = new Random(lSeed);\r\n\t\tString sHex;\r\n\t\tStringBuffer sUUID = new StringBuffer(32);\r\n\t\tbyte[] localIPAddr = new byte[4];\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 8 characters Code IP address of this machine\r\n\t\t\tlocalIPAddr = InetAddress.getLocalHost().getAddress();\r\n\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[0]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[1]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[2]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[3]) & 255]);\r\n\t\t}\r\n\t\tcatch (UnknownHostException e) {\r\n\t\t\t// Use localhost by default\r\n\t\t\tsUUID.append(\"7F000000\");\r\n\t\t}\r\n\r\n\t\t// Append a seed value based on current system date\r\n\t\tsUUID.append(Long.toHexString(lSeed));\r\n\r\n\t\t// 6 characters - an incremental sequence\r\n\t\tsUUID.append(Integer.toHexString(iSequence.incrementAndGet()));\r\n\r\n\t\tiSequence.compareAndSet(16777000, 1048576);\r\n\r\n\t\tdo {\r\n\t\t\tiRnd = oRnd.nextInt();\r\n\t\t\tif (iRnd>0) iRnd = -iRnd;\r\n\t\t\tsHex = Integer.toHexString(iRnd);\r\n\t\t} while (0==iRnd);\r\n\r\n\t\t// Finally append a random number\r\n\t\tsUUID.append(sHex);\r\n\r\n\t\treturn sUUID.substring(0, 32);\r\n\t}", "public void setFromTag(String tag){\n try{\n fromHeader.setTag(tag);\n }\n catch(ParseException e) {}\n }", "public static String randomIdentifier() {\r\n\t\tfinal String lexicon = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n\t\tfinal java.util.Random rand = new java.util.Random();\r\n\t\t// consider using a Map<String,Boolean> to say whether the identifier is\r\n\t\t// being used or not\r\n\t\tfinal Set<String> identifiers = new HashSet<String>();\r\n\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\twhile (builder.toString().length() == 0) {\r\n\t\t\tint length = rand.nextInt(5) + 5;\r\n\t\t\tfor (int i = 0; i < length; i++)\r\n\t\t\t\tbuilder.append(lexicon.charAt(rand.nextInt(lexicon.length())));\r\n\t\t\tif (identifiers.contains(builder.toString()))\r\n\t\t\t\tbuilder = new StringBuilder();\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}", "private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }", "@Override\n public String generateRackID() {\n String newRackID = generateRandomCharacter() +\"\"+\n generateRandomCharacter() +\".\"+\n rackCounter +\".\"+ getCopyrightYear();\n this.rackCounter++;\n return newRackID;\n }", "private String generateNonce() {\n // Get the time of day and run MD5 over it.\n Date date = new Date();\n long time = date.getTime();\n Random rand = new Random();\n long pad = rand.nextLong();\n // String nonceString = (new Long(time)).toString()\n // + (new Long(pad)).toString();\n String nonceString = Long.valueOf(time).toString()\n + Long.valueOf(pad).toString();\n byte mdbytes[] = messageDigest.digest(nonceString.getBytes());\n // Convert the mdbytes array into a hex string.\n return toHexString(mdbytes);\n }", "public String gerarUID() {\n //String id1 = UUID.randomUUID().toString().replace(\"-\", \"\");\n String id1 = UUID.randomUUID().toString();\n return id1;\n }", "private byte generatePatternId() {\n byte[] patternId = new byte[1];\n new Random().nextBytes(patternId);\n if (patternId[0] == (byte) ServerStateEvent.PATTERN_ERROR_OR_IDLE) {\n return 1;\n }\n if (patternId[0] == ServerStateEvent.PATTERN_SERVER) {\n return 2;\n }\n return patternId[0];\n }", "protected byte[] createHeader(AC35StreamMessage type, int sourceId) {\n byte[] header = super.createHeader(type);\n addFieldToByteArray(header, HEADER_SOURCE_ID, sourceId);\n return header;\n }", "public static String generate4DigitPin() {\n\t\tString longTime = String.valueOf(Calendar.getInstance().getTimeInMillis());\n\t\tint len = longTime.length();\n\n\t\treturn longTime.substring(len - 4);\n\t}", "public static ByteBuf newHeader(int localConnId, int remoteConnId, long userFlag) throws UnsupportedEncodingException {\n ByteBuf header = Unpooled.buffer(4 + 4 + 8);\n\n header.writeInt(localConnId);\n header.writeInt(remoteConnId);\n header.writeLong(userFlag);\n header.writerIndex(header.capacity());\n return header;\n }", "public interface UUIDFactory {\n /**\n * Generates a new version 4 UUID.\n *\n * @return the newly generated UUID\n */\n UUID generateRandomUuid();\n}", "static String generateId() {\r\n\t\treturn UUID.randomUUID().toString().replaceAll(\"-\", \"\");\r\n\t}", "public String generateUniqueSignature(){\n final String uuid = UniqueIdentifierGenerator.generateUniqueIdentifier();\n setSignature(uuid);\n return uuid;\n }", "public char[] generateOtp(int len);", "public String getNewick() //Perhaps make a version of this where the header DTD can be manually specified\n { //Also allow changing of generated tags to user specified values\n \n String newick = new String();\n newick = newick + generateNewick();\n newick = newick + \";\";\n return newick;\n }", "public static String generateAuthToken() throws EndlosException {\n\t\treturn hash(Utility.generateToken(6) + DateUtility.getCurrentEpoch() + Utility.generateToken(8));\n\t}", "public static String nextUuId() {\n UUID uuid = UUID.randomUUID();\n\n StringBuilder buff = new StringBuilder(32);\n long2string(uuid.getMostSignificantBits(), buff);\n long2string(uuid.getLeastSignificantBits(), buff);\n\n return buff.toString();\n }", "public static synchronized String generateUniqueToken(int length) {\n\n byte random[] = new byte[length];\n Random randomGenerator = new Random();\n StringBuffer buffer = new StringBuffer();\n\n randomGenerator.nextBytes(random);\n\n for (int j = 0; j < random.length; j++)\n {\n byte b1 = (byte) ((random[j] & 0xf0) >> 4);\n byte b2 = (byte) (random[j] & 0x0f);\n if (b1 < 10)\n buffer.append((char) ('0' + b1));\n else\n buffer.append((char) ('A' + (b1 - 10)));\n if (b2 < 10)\n buffer.append((char) ('0' + b2));\n else\n buffer.append((char) ('A' + (b2 - 10)));\n }\n\n return (buffer.toString());\n }", "private String generateUID()\n {\n String uid;\n int nbAccounts = this.getNumberOfAccounts();\n String host = this.registration.getHost();\n int nbAccountsForHost = this.getNbAccountForHost(host);\n \n if (nbAccounts == 0 || (this.isModification() && nbAccounts == 1) ||\n nbAccountsForHost == 0 || (this.isModification() && nbAccountsForHost == 1))\n {\n // We create the first account or we edit the onlyone\n // Or we create the first account for this server or edit the onlyone\n uid = host;\n }\n else\n {\n uid = host + \":\" + this.registration.getPort();\n }\n \n return uid;\n }", "@Override\n public String getFromID()\n {\n \tStringBuilder sb = new StringBuilder();\n\n \tint ident2 = getIdent2();\n \t\n \tIdentType type = IdentType.fromIdent( ident2 );\n\n \t/* Inter-Prefix - the from and to idents are different prefixes */\n \tif( type == IdentType.IPFIXI )\n \t{\n \tsb.append( format( getBlock2Prefix(), 3 ) );\n \tsb.append( \"-\" );\n \tsb.append( format( getBlock2Ident2(), 4) );\n \t}\n \telse\n \t{\n \tsb.append( format( getPrefix(), 3 ) );\n \tsb.append( \"-\" );\n \tsb.append( format( ident2, 4) );\n \t}\n \t\n \treturn sb.toString();\n }", "@Override\n\tpublic long getHeaderId(int position) {\n\t\treturn mModelRssItems.get(position).getPubdate().subSequence(0, 13)\n\t\t\t\t.charAt(12);\n\t}", "public static String generateGroupChatInvitationContact(String sessionId) {\n Logger.d(TAG, \"generateGroupChatInvitationContact entry\");\n UUID uuid = UUID.randomUUID();\n ParcelUuid parcelUuid = new ParcelUuid(uuid);\n String tag = parcelUuid.toString();\n String items[] = tag.split(GROUP_CONTACT_TAG_DELIMITER);\n // Modify the first item to mark group chat invitation\n int firstIndex = 0;\n int lastIndex = items.length - 1;\n items[firstIndex] = GROUP_CHAT_INVITATION_TAG_BEGINNER;\n items[lastIndex] = sessionId;\n // Rebuild the new tag\n StringBuilder sb = new StringBuilder();\n for (String item : items) {\n sb.append(item);\n sb.append(GROUP_CONTACT_TAG_DELIMITER);\n }\n // Remove the last \"-\"\n sb.deleteCharAt(sb.length() - 1);\n String groupChatInvitationTag = sb.toString();\n String contact = GROUP_CONTACT_STRING_BEGINNER + groupChatInvitationTag;\n Logger.d(TAG, \"generateGroupChatInvitationContact exit contact is \"\n + contact);\n return contact;\n }", "public static String generateRandomNonce() {\n Random r = new Random();\n StringBuffer n = new StringBuffer();\n for (int i = 0; i < r.nextInt(8) + 2; i++) {\n n.append(r.nextInt(26) + 'a');\n }\n return n.toString();\n }", "private static String smsCode() {\n\t\t\tString random=new Random().nextInt(1000000)+\"\";\r\n\t\t\treturn random;\r\n\t\t}", "public String generateToken(String username) {\n\t\tString token = username;\n\t\tLong l = Math.round(Math.random()*9);\n\t\ttoken = token + l.toString();\n\t\treturn token;\n\t}", "protected String generateStateId() {\n\t\treturn ServiceBus.crypto.getRandomString();\n\t}", "private static String createRandomInteger(int aStart, long aEnd,Random aRandom){\n \tif ( aStart > aEnd ) {\n\t throw new IllegalArgumentException(\"Start cannot exceed End.\");\n\t }\n\t long range = aEnd - (long)aStart + 1;\n\t long fraction = (long)(range * aRandom.nextDouble());\n\t long randomNumber = fraction + (long)aStart;\n\t return Long.toString(randomNumber);\n\t }", "private String generateBase32Token() throws CryptoProviderException {\n byte[] randomBytes = keyGenerator.generateRandomBytes(BASE32_KEY_LENGTH);\n return BaseEncoding.base32().omitPadding().encode(randomBytes).substring(0, BASE32_KEY_LENGTH);\n }", "public static String generateReverseTimestampId() {\r\n\t\tString sTs = Str.leftPad(String.valueOf(Long.MAX_VALUE-System.currentTimeMillis()),'0',20);\r\n\t\tString sRd = Str.leftPad(String.valueOf(new Random().nextInt(Integer.MAX_VALUE)),'0',10);\r\n\t\treturn Str.leftPad(sTs+sRd,'0',32);\r\n\t }", "public static final String generateOrderId() {\n return generateOrderId(RANDOM.nextInt(1000));\n }", "long getUID() throws UidGenerateException;", "public static String generateMobNum() {\n\t\tString number = RandomStringUtils.randomNumeric(10);\t\n\t\treturn (number);\n\t}", "protected String generateRandomId(String prefix) {\n int nextInt = RANDOM.nextInt();\n nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt);\n return prefix + \"_\" + String.valueOf(nextInt);\n }", "private String generatePhone() {\n\t\tString ret = \"\";\n\t\tString[] areaCode = { \"051\", \"055\", \"045\", \"043\", \"053\" };\n\n\t\t// Gets an area code\n\t\tret = areaCode[(new Random()).nextInt(5)];\n\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tint n = (new Random()).nextInt(9);\n\n\t\t\t// Checks if the first number is 0\n\t\t\tif (i == 0 && n == 0) {\n\t\t\t\ti -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tret += n;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t}", "org.multibit.hd.core.protobuf.MBHDContactsProtos.Tag getTag(int index);", "UUID getTransmissionId();", "public String getUniqueID(Context ctx)\n {\n String m_szDevIDShort = \"\";\n String m_szAndroidID = \"\";\n String m_szWLANMAC = \"\";\n\n try {\n m_szDevIDShort = \"35\" + // we make this look like a valid IMEI\n Build.BOARD.length() % 10 + Build.BRAND.length() % 10 +\n Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 +\n Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 +\n Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 +\n Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 +\n Build.TAGS.length() % 10 + Build.TYPE.length() % 10 +\n Build.USER.length() % 10;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n m_szAndroidID = Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.ANDROID_ID);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n WifiManager wm = (WifiManager) ctx.getSystemService(Context.WIFI_SERVICE);\n m_szWLANMAC = wm.getConnectionInfo().getMacAddress();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n String m_szLongID = m_szWLANMAC + m_szDevIDShort + m_szAndroidID;\n\n MessageDigest m = null;\n try {\n m = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n m.update(m_szLongID.getBytes(), 0, m_szLongID.length());\n byte p_md5Data[] = m.digest();\n\n //noinspection RedundantStringConstructorCall\n String m_szUniqueID = new String();\n for (int i = 0; i < p_md5Data.length; i++) {\n int b = (0xFF & p_md5Data[i]);\n // if it is a single digit, make sure it have 0 in front (proper\n // padding)\n if (b <= 0xF)\n m_szUniqueID += \"0\";\n // add number to string\n m_szUniqueID += Integer.toHexString(b);\n }\n\n return m_szUniqueID;\n }", "public String generateNodeId(Node node, String remoteHost, String remoteAddress);", "private static String pseudoUniqueId() {\n\t\t// decimal\n\t\tfinal Integer DECIMAL = 10;\n\n\t\t// return the android device some common info(board, brand, CPU type +\n\t\t// ABI convention, device, display, host, id, manufacturer, model,\n\t\t// product, tags, type and user) combined string\n\t\treturn new StringBuilder().append(Build.BOARD.length() % DECIMAL)\n\t\t\t\t.append(Build.BRAND.length() % DECIMAL)\n\t\t\t\t.append(Build.CPU_ABI.length() % DECIMAL)\n\t\t\t\t.append(Build.DEVICE.length() % DECIMAL)\n\t\t\t\t.append(Build.DISPLAY.length() % DECIMAL)\n\t\t\t\t.append(Build.HOST.length() % DECIMAL)\n\t\t\t\t.append(Build.ID.length() % DECIMAL)\n\t\t\t\t.append(Build.MANUFACTURER.length() % DECIMAL)\n\t\t\t\t.append(Build.MODEL.length() % DECIMAL)\n\t\t\t\t.append(Build.PRODUCT.length() % DECIMAL)\n\t\t\t\t.append(Build.TAGS.length() % DECIMAL)\n\t\t\t\t.append(Build.TYPE.length() % DECIMAL)\n\t\t\t\t.append(Build.USER.length() % DECIMAL).toString();\n\t}", "static public String hobNameGen(){\n int i = rand.nextInt(8);\n String hName = name[i];\n return hName;\n }", "public static String generateTokenNumber(String serviceName, int tokenNumber) {\n if (serviceName != null && !serviceName.isEmpty()) {\n return serviceName.toUpperCase().charAt(0) + String.valueOf(tokenNumber);\n } else\n return String.valueOf(tokenNumber);\n }", "private static synchronized String getNextRequestId()\n {\n if (++nextRequestId < 0)\n {\n nextRequestId = 0;\n }\n String id = Integer.toString(nextRequestId);\n return id;\n }", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(SHORT_DEF_COUNT);\n }", "private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }", "public static byte[] createBytes()\n\t{\n\t\tfinal byte[] uuid = getTLS().compute();\n\t\tfinal byte[] rtrn = new byte[16];\n\n\t\t// In other to ensure backward compatibility with code\n\t\t// that might expect our logic to return only 16 bytes\n\t\t// we must strip off two bytes from 'uuid' (since it\n\t\t// contains 18 bytes). We'll take the first 16 bytes\n\t\t// since we know that the bytes that changes the most\n\t\t// are put first (see computeBase).\n\n\t\tSystem.arraycopy(uuid, 0, rtrn, 0, 16);\n\n\t\treturn rtrn;\n\t}", "@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }", "@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }", "public static String makeRandomID() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }", "public String generateString() {\n\t\tint maxLength = 9;\n\t\tRandom random = new Random();\n\t\tStringBuilder builder = new StringBuilder(maxLength);\n\n\t\t// Looping 9 times, one for each char\n\t\tfor (int i = 0; i < maxLength; i++) {\n\t\t\tbuilder.append(ALPHABET.charAt(random.nextInt(ALPHABET.length())));\n\t\t}\n\t\t// Generates a random ID that has may have a quintillion different combinations\n\t\t// (1/64^9)\n\t\treturn builder.toString();\n\t}", "public byte[] tag();", "public static String generateNewUserId() {\r\n\t\tDate date = new Date();\r\n\t\treturn String.format(\"%s-%s\", UUID.randomUUID().toString(),\r\n\t\t\t\tString.valueOf(date.getTime()));\r\n\t}", "private static String accountNumberGenerator() {\n char[] chars = new char[10];\n for (int i = 0; i < 10; i++) {\n chars[i] = Character.forDigit(rnd.nextInt(10), 10);\n }\n return new String(chars);\n }", "@Override\n public long generateNewTimeToNextContract() {\n return new Random().nextInt(5);\n }", "public void setToTag(String tag) {\n try{\n toHeader.setTag(tag);\n }\n catch(ParseException e) {}\n }", "public static String generateRandomId(int iLength, String sCharset, byte byCategory )\r\n\t \tthrows StringIndexOutOfBoundsException {\r\n\t \r\n\t if (iLength<=0) \r\n\t throw new StringIndexOutOfBoundsException(\"Uid.generateRandomId() identifier length must be greater than zero\");\r\n\r\n\t if (iLength>4096) \r\n\t throw new StringIndexOutOfBoundsException(\"Uid.generateRandomId() identifier length must be less than or equal to 4096\");\r\n\r\n\t if (sCharset!=null) {\r\n\t if (sCharset.length()==0) throw new StringIndexOutOfBoundsException(\"Uid.generateRandomId() character set length must be greater than zero\");\r\n\t } else {\r\n\t sCharset = \"abcdefghjkmnpqrstuvwxyz23456789\";\r\n\t }\r\n\t \r\n\t\tif (byCategory!=Character.UNASSIGNED && byCategory!=Character.UPPERCASE_LETTER && byCategory!=Character.LOWERCASE_LETTER)\r\n\t\t throw new IllegalArgumentException(\"Uid.generateRandomId() Character category must be one of {UNASSIGNED, UPPERCASE_LETTER, LOWERCASE_LETTER}\");\r\n\r\n\t\tint iCsLen = sCharset.length();\r\n\t StringBuilder oId = new StringBuilder(iLength);\r\n\t Random oRnd = new Random();\r\n\t for (int i=0; i<iLength; i++){\r\n\t\t char c = sCharset.charAt(oRnd.nextInt(iCsLen));\r\n\t\t if (byCategory==Character.UPPERCASE_LETTER)\r\n\t\t \tc = Character.toUpperCase(c);\r\n\t\t else if (byCategory==Character.LOWERCASE_LETTER)\r\n\t\t \tc = Character.toLowerCase(c);\r\n\t\t oId.append(c);\r\n\t\t} // next\r\n\t\treturn oId.toString();\r\n\t }", "private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }", "public static String generate6CharacterTagCode() {\n\t\tString longTime = String.valueOf(Calendar.getInstance().getTimeInMillis());\n\t\tint len = longTime.length();\n\n\t\treturn longTime.substring(len - 6);\n\t}" ]
[ "0.59313065", "0.5640508", "0.5522686", "0.5431885", "0.54279536", "0.540811", "0.5383585", "0.5363921", "0.53371793", "0.5237834", "0.522756", "0.52249235", "0.52141154", "0.52118367", "0.51824397", "0.51754606", "0.51753026", "0.51629484", "0.5150503", "0.51474476", "0.51402783", "0.511041", "0.5076085", "0.5063956", "0.50494564", "0.50333804", "0.50318", "0.50298655", "0.5012481", "0.49871427", "0.49657437", "0.49617764", "0.49378935", "0.49358", "0.49284247", "0.49189618", "0.49184924", "0.48824555", "0.48759222", "0.48735365", "0.48724523", "0.48627925", "0.4856404", "0.48514834", "0.48480085", "0.48434308", "0.48431665", "0.48387575", "0.48349237", "0.48268455", "0.48070765", "0.48028505", "0.48015228", "0.48013943", "0.4793731", "0.47926944", "0.47905245", "0.47818628", "0.4780576", "0.47749016", "0.47691593", "0.47670898", "0.4766859", "0.47622123", "0.475802", "0.47481996", "0.4747426", "0.4746118", "0.47339365", "0.4726982", "0.47197035", "0.47167194", "0.47094625", "0.47003704", "0.46943966", "0.46938092", "0.4690429", "0.46888965", "0.4688354", "0.46863887", "0.46805924", "0.4670514", "0.46687138", "0.46640155", "0.46630287", "0.46595517", "0.46545574", "0.46511596", "0.46492925", "0.46492925", "0.4649092", "0.46489945", "0.46416977", "0.4641493", "0.46348312", "0.46326226", "0.46316797", "0.4631012", "0.46279642", "0.46272317" ]
0.6346877
0
Generate a cryptographically random identifier that can be used to generate a branch identifier.
public synchronized String generateBranchId() { long num = rand.nextLong() + Utils.counter++ + System.currentTimeMillis(); byte bid[] = digester.digest(Long.toString(num).getBytes()); return SIPConstants.BRANCH_MAGIC_COOKIE + Utils.toHexString(bid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String makeRandomID() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }", "public String generateGUID() {\n Random randomGenerator = new Random();\n String hash = DigestUtils.shaHex(HASH_FORMAT.format(new Date())\n + randomGenerator.nextInt());\n return hash.substring(0, GUID_LEN);\n }", "public String generateId() {\n return RandomStringUtils.randomAlphabetic(32);\n }", "String generateUID();", "static String generateId() {\r\n\t\treturn UUID.randomUUID().toString().replaceAll(\"-\", \"\");\r\n\t}", "public static final String getRandomId() {\r\n return (\"\" + Math.random()).substring(2);\r\n }", "UUID generateRandomUuid();", "protected String generateStateId() {\n\t\treturn ServiceBus.crypto.getRandomString();\n\t}", "public String GenerateID()\n\t{\n\t\tRandom randomGenerator = new Random();\n\t\treturn Integer.toString(randomGenerator.nextInt(Integer.MAX_VALUE));\n\t}", "public String generateId() {\n return Utils.generateKey();\n }", "private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }", "public static String secureRandomId() {\n\t\tSecureRandom random = new SecureRandom();\n\t\treturn new BigInteger(130, random).toString(32);\n\t}", "public static String randomIdentifier() {\r\n\t\tfinal String lexicon = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n\t\tfinal java.util.Random rand = new java.util.Random();\r\n\t\t// consider using a Map<String,Boolean> to say whether the identifier is\r\n\t\t// being used or not\r\n\t\tfinal Set<String> identifiers = new HashSet<String>();\r\n\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\twhile (builder.toString().length() == 0) {\r\n\t\t\tint length = rand.nextInt(5) + 5;\r\n\t\t\tfor (int i = 0; i < length; i++)\r\n\t\t\t\tbuilder.append(lexicon.charAt(rand.nextInt(lexicon.length())));\r\n\t\t\tif (identifiers.contains(builder.toString()))\r\n\t\t\t\tbuilder = new StringBuilder();\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "public String generateLink_Id() {\n\t\tString Link_Id = \"L\" + String.valueOf(rand.genRandomDigits(7));\n\t\twhile (registerDao.checkLinkIdIfExist(Link_Id)) {\n\t\t\tLink_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\t}\n\t\treturn Link_Id;\n\t}", "private\tString\tgenerateUUID(){\n\t\treturn\tUUID.randomUUID().toString().substring(0, 8).toUpperCase();\n\t}", "public static String createUniqueKey() {\r\n\r\n\t\tint iRnd;\r\n\t\tlong lSeed = System.currentTimeMillis();\r\n\t\tRandom oRnd = new Random(lSeed);\r\n\t\tString sHex;\r\n\t\tStringBuffer sUUID = new StringBuffer(32);\r\n\t\tbyte[] localIPAddr = new byte[4];\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 8 characters Code IP address of this machine\r\n\t\t\tlocalIPAddr = InetAddress.getLocalHost().getAddress();\r\n\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[0]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[1]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[2]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[3]) & 255]);\r\n\t\t}\r\n\t\tcatch (UnknownHostException e) {\r\n\t\t\t// Use localhost by default\r\n\t\t\tsUUID.append(\"7F000000\");\r\n\t\t}\r\n\r\n\t\t// Append a seed value based on current system date\r\n\t\tsUUID.append(Long.toHexString(lSeed));\r\n\r\n\t\t// 6 characters - an incremental sequence\r\n\t\tsUUID.append(Integer.toHexString(iSequence.incrementAndGet()));\r\n\r\n\t\tiSequence.compareAndSet(16777000, 1048576);\r\n\r\n\t\tdo {\r\n\t\t\tiRnd = oRnd.nextInt();\r\n\t\t\tif (iRnd>0) iRnd = -iRnd;\r\n\t\t\tsHex = Integer.toHexString(iRnd);\r\n\t\t} while (0==iRnd);\r\n\r\n\t\t// Finally append a random number\r\n\t\tsUUID.append(sHex);\r\n\r\n\t\treturn sUUID.substring(0, 32);\r\n\t}", "private static String getRandString() {\r\n return DigestUtils.md5Hex(UUID.randomUUID().toString());\r\n }", "private String createId() {\n int idLength = 5;\n String possibleChars = \"1234567890\";\n Random random = new Random();\n StringBuilder newString = new StringBuilder();\n\n for (int i = 0; i < idLength; i++) {\n int randomInt = random.nextInt(10);\n newString.append(possibleChars.charAt(randomInt));\n }\n\n return newString.toString();\n }", "private String getID()\n {\n String chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+{}|:<>?/.,';][=-`~\";\n String id = \"\";\n int max = new Random().nextInt((16 - 12) + 1)+12;\n for(int i=0;i<16;i++)\n {\n int r = new Random().nextInt((chars.length()-1 - 0) + 1)+0;\n id+=chars.charAt(r);\n }\n return id;\n }", "public static String generateRandomNonce() {\n Random r = new Random();\n StringBuffer n = new StringBuffer();\n for (int i = 0; i < r.nextInt(8) + 2; i++) {\n n.append(r.nextInt(26) + 'a');\n }\n return n.toString();\n }", "private String generateUniqueIdString() {\r\n return TimeBasedUUID.getUUIDAsString();\r\n }", "public synchronized String generateTag() {\n return Integer.toHexString(rand.nextInt());\n }", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "public static String getUniqueIdentifier() {\r\n UUID uuid = UUID.randomUUID();\r\n return uuid.toString();\r\n }", "public static int genID(){\n Random rand = new Random();\n\n int theID = rand.nextInt(999)+1;\n\n return theID;\n\n }", "public String generateActivationId() {\n return UUID.randomUUID().toString();\n }", "private static long getRandAccount() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranch(bid);\n }", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(SHORT_DEF_COUNT);\n }", "@Override\n public java.lang.String generateRackID() {\n String randomString = \"\";\n String rackId = \"\";\n for (int i = 0; i < 2; i++) {\n char[] arr = \"abcdefghijklmnopqrstuvwxyz\".toCharArray();\n int select = new Random().nextInt(arr.length);\n randomString += arr[select];\n }\n\n rackId = randomString.toUpperCase() + \".\" + rackCounter + \".\" + copyrightYear;\n rackCounter++;\n return rackId;\n }", "public static long randomId() {\n UUID uuid = UUID.randomUUID();\n long mostSignificantBits = uuid.getMostSignificantBits();\n long leastSignificantBits = uuid.getLeastSignificantBits();\n return (mostSignificantBits ^ leastSignificantBits) & Long.MAX_VALUE;\n }", "protected String generateRandomId(String prefix) {\n int nextInt = RANDOM.nextInt();\n nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt);\n return prefix + \"_\" + String.valueOf(nextInt);\n }", "private String generateNewCallId()\n {\n\n\t\t// Generate the variant number\n\t\tint variable = NumberUtils.getIntRandom();\n\n\t\t// Convert to hex value\n\t\tString hex = NumberUtils.toHexValue(variable);\n\n\t\t// Compose the final call id\n\t\treturn \"{2B073406-65D8-A7B2-5B13-B287\" + hex + \"}\";\n\t}", "String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }", "public static String generateId(int digitAmount) {\n\t\t\n\t\tfinal String upperAlpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\t\t\n\t\tString brokerOrderID = \"\";\n\t\tfor (int i = 0; i < digitAmount; i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tint randomAlphaIndex = ThreadLocalRandom.current().nextInt(0, 25 + 1);\n\t\t\t\tbrokerOrderID += upperAlpha.charAt(randomAlphaIndex);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint randomInteger = ThreadLocalRandom.current().nextInt(1, 9 + 1);\n\t\t\t\tbrokerOrderID += Integer.toString(randomInteger);\n\t\t\t}\n\t\t}\n\t\treturn brokerOrderID;\n\t}", "private int IdRandom() {\n\t\tRandom random = new Random();\n\t\tint id = random.nextInt(899999) + 100000;\n\t\treturn id;\n\t}", "public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "private String generateRandomHexString(){\n return Long.toHexString(Double.doubleToLongBits(Math.random()));\n }", "private String generate_uuid() {\n\n int random_length = 12;\n int time_length = 4;\n\n byte[] output_byte = new byte[random_length+time_length];\n\n //12 byte long secure random\n SecureRandom random = new SecureRandom();\n byte[] random_part = new byte[random_length];\n random.nextBytes(random_part);\n System.arraycopy(random_part, 0, output_byte, 0, random_length);\n\n //merged with 4 less significant bytes of time\n long currentTime = System.currentTimeMillis();\n for (int i=random_length; i<output_byte.length; i++){\n output_byte[i] = (byte)(currentTime & 0xFF);\n currentTime >>= 8;\n }\n\n //Converted to base64 byte\n String output = Base64.encodeBase64String(output_byte);\n Log.debug_value(\"UUID\", output);\n return output;\n\n }", "public String generateCustomer_Id() {\n\t\tString customer_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\twhile (registerDao.checkCustomerIdIfExist(customer_Id)) {\n\t\t\tcustomer_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\t}\n\t\treturn customer_Id;\n\t}", "public static String uniqueId() {\r\n return UUID.randomUUID().toString();\r\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }", "private void GenerateTxId() {\n Random random = new Random();\n final String txId = String.valueOf(10000000 + random.nextInt(90000000));\n transactionModel.txId = txId;\n }", "public static final String generateOrderId() {\n return generateOrderId(RANDOM.nextInt(1000));\n }", "public static String generateNewUserId() {\r\n\t\tDate date = new Date();\r\n\t\treturn String.format(\"%s-%s\", UUID.randomUUID().toString(),\r\n\t\t\t\tString.valueOf(date.getTime()));\r\n\t}", "protected String generateLockId() {\n return AkkaUtils.nextId();\n }", "public static String uniqueId() {\n return UUID.randomUUID().toString();\n }", "public static long getRandomAccountNo(int branchID) {\n return getAccountNo(branchID, rand.nextInt((int)div));\n }", "public static long getID() {\n int localizador = 0;\n Long min = 1000000000L;\n Long max = 9999999999L;\n\n do {\n localizador = (int) Math.floor(Math.random() * (max - min + 1) + min);\n } while (Integer.toString(localizador).length() != 10);\n return localizador;\n }", "private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }", "public static int generateUniqueId(){\r\n String returnme = GregorianCalendar.getInstance().getTimeInMillis() + \"\";\r\n return Integer.parseInt(returnme.substring(returnme.length() - 9, returnme.length()));\r\n }", "String uniqueId();", "public void generateID()\n {\n ID = this.hashCode();\n }", "UUID id();", "@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }", "@Override\n public String generateUniqueID() {\n return LIBRARY_CODE + \"_B_\" + counter;\n }", "public String generateString() {\n\t\tint maxLength = 9;\n\t\tRandom random = new Random();\n\t\tStringBuilder builder = new StringBuilder(maxLength);\n\n\t\t// Looping 9 times, one for each char\n\t\tfor (int i = 0; i < maxLength; i++) {\n\t\t\tbuilder.append(ALPHABET.charAt(random.nextInt(ALPHABET.length())));\n\t\t}\n\t\t// Generates a random ID that has may have a quintillion different combinations\n\t\t// (1/64^9)\n\t\treturn builder.toString();\n\t}", "public static String generateRandomID(int length) {\n return generateRandomID(length, null);\n }", "public static long generateUniqueId() {\n // A UUID represents a 128-bit value, that is 16 bytes long value.\n final UUID uuid = UUID.randomUUID();\n return Math.abs(uuid.getMostSignificantBits());\n }", "public static String generateID(int num){\n StringBuilder str=new StringBuilder();//定义变长字符串\n Random random=new Random();\n for (int i = 0; i < num; i++) {\n str.append(random.nextInt(10));\n }\n return str.toString();\n }", "public UUID generate() {\n return UUID.randomUUID();\n }", "private static String accountNumberGenerator() {\n char[] chars = new char[10];\n for (int i = 0; i < 10; i++) {\n chars[i] = Character.forDigit(rnd.nextInt(10), 10);\n }\n return new String(chars);\n }", "public String generateID() {\n return IDPREFIX + nextidint++;\n }", "@NonNull\n public BasketItemBuilder generateRandomId() {\n this.id = UUID.randomUUID().toString();\n return this;\n }", "public static String generateActivationKey() {\n return RandomStringUtils.randomNumeric(RESET_CODE_DIGIT_COUNT);\n }", "private String genrateOrderTrakingnumber() {\n return UUID.randomUUID().toString();\n }", "private String getRandomUniqueId() {\r\n return \"WEBSOCKET.\" + new Random().nextInt(100);\r\n }", "public static String getRandomString() {\n \tif (random == null)\n \t\trandom = new Random();\n \treturn new BigInteger(1000, random).toString(32);\n }", "public int genID() {\n int uid = this.hashCode();\n if (uid < 0) {\n uid = Math.abs(uid);\n uid = uid * 15551;\n }\n return uid;\n }", "private static long getRandAccountD() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranchD(bid);\n }", "protected String generateUserID() {\n Random r = new Random();\n String userID;\n do {\n int randomIDnum = r.nextInt(999999999) + 1;\n userID = String.valueOf(randomIDnum);\n } while (this.userMap.containsKey(userID));\n return userID;\n }", "protected String generateRestaurantID() {\n Random r = new Random();\n String restID;\n do {\n int randomIDnum = r.nextInt(999999999) + 1;\n restID = String.valueOf(randomIDnum);\n } while (this.restaurantMap.containsKey(restID));\n return restID;\n }", "public static String generateRandomInteger() {\n SecureRandom random = new SecureRandom();\n int aStart = 1;\n long aEnd = 999999999;\n long range = aEnd - (long) aStart + 1;\n long fraction = (long) (range * random.nextDouble());\n long randomNumber = fraction + (long) aStart;\n return String.valueOf(randomNumber);\n }", "public String RtoosGetID() \n\t{\n\t\treturn UUIDs.random().toString();\n\t}", "private String generatePurchaseId() {\n\t\tint purchaseId = purchaseIdCounter.incrementAndGet();\n\t\treturn Integer.toString(purchaseId);\n\t}", "public int generateSessionID(){\r\n SecureRandom randsession = new SecureRandom();\r\n return randsession.nextInt(1234567890);\r\n }", "public int generateKey() {\n SecureRandom secureRandom = new SecureRandom();\n try {\n secureRandom = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return secureRandom.nextInt(26);\n }", "public static String generateID(int length) {\n\t\tString id = \"\";\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tid += (int) (Math.random() * 10);\n\t\t}\n\t\t\n\t\treturn id;\n\t}", "public static synchronized String generateUniqueToken(int length) {\n\n byte random[] = new byte[length];\n Random randomGenerator = new Random();\n StringBuffer buffer = new StringBuffer();\n\n randomGenerator.nextBytes(random);\n\n for (int j = 0; j < random.length; j++)\n {\n byte b1 = (byte) ((random[j] & 0xf0) >> 4);\n byte b2 = (byte) (random[j] & 0x0f);\n if (b1 < 10)\n buffer.append((char) ('0' + b1));\n else\n buffer.append((char) ('A' + (b1 - 10)));\n if (b2 < 10)\n buffer.append((char) ('0' + b2));\n else\n buffer.append((char) ('A' + (b2 - 10)));\n }\n\n return (buffer.toString());\n }", "private String generateId(String input) {\n\t\treturn StringUtil.hashSHA256(input);\n\t}", "private long generateID() {\n\t\treturn ++lastID;\n\t}", "public static String generateDeviceToken() throws EndlosException {\n\t\treturn hash(Utility.generateUuid() + DateUtility.getCurrentEpoch());\n\t}", "public static String generateCustomerID() {\n\tcustomerID++;\n\treturn String.valueOf(customerID);\n }", "public static String getUUID() {\n\t\treturn UUID.randomUUID().toString().toUpperCase().replace(\"-\", \"\").substring(0, 5);\n\t}", "private String genNewAccountNumber(int clientId) {\r\n\t\t// keep 4 digits\r\n\t\tint acNumber = clientId * 1000 + (int) (Math.random() * 900);\r\n\t\treturn String.valueOf(acNumber);\r\n\t}", "public int generateUniqueID(){\n\n int uniqueID = 100; \n int maxID =getMaxId() ;\n \n uniqueID = uniqueID + maxID;\n\n return uniqueID;\n }", "UUID getUniqueId();", "private String nextGUID() {\r\n\t\tString guidIdSQL = \"SELECT SYS_GUID() FROM DUAL\";\r\n\t\treturn namedJdbcTemplate.queryForObject(guidIdSQL, (HashMap<String, ?>) null, String.class);\r\n\t}", "public String randomString() {\n return new BigInteger(130, random).toString(32);\n }", "protected String generateKey(){\n Random bi= new Random();\n String returnable= \"\";\n for(int i =0;i<20;i++)\n returnable += bi.nextInt(10);\n return returnable;\n }", "public static String generateInstanceId() {\n\t\t// TODO Use a complex hashing algorithm and generate 16-character\n\t\t// string;\n\n\t\treturn Calendar.getInstance().getTime().toString().replaceAll(\" \", \"\");\n\t}", "public static long generateCode() {\n long code = (long) (100000 + Math.random() * 899999l);\n return code;\n }", "@Override\r\n\tpublic int generateAccountId() {\n\t\tint AccountId = (int) (Math.random()*10000);\r\n\t\treturn 0;\r\n\t}", "@Override\n public String generateRackID() {\n String newRackID = generateRandomCharacter() +\"\"+\n generateRandomCharacter() +\".\"+\n rackCounter +\".\"+ getCopyrightYear();\n this.rackCounter++;\n return newRackID;\n }", "String getUniqueId();", "public static String generateId(String prefix) {\n\t\tlong now = System.currentTimeMillis();\n\t\tlong randomLong = Math.round(Math.random() * 89999) + 10000;\n\t\treturn (prefix + now + \"-\" + randomLong);\n\t}", "public void generateCode() {\n code = java.util.UUID.randomUUID().toString();\n }", "protected String generateReviewID() {\n Random r = new Random();\n String restID;\n do {\n int randomIDnum = r.nextInt(999999999) + 1;\n restID = String.valueOf(randomIDnum);\n } while (this.reviewMap.containsKey(restID));\n return restID;\n }", "private static int generateId() {\n\t\treturn ++sId;\n\t}" ]
[ "0.7656533", "0.7401253", "0.7375264", "0.72758365", "0.726692", "0.7143249", "0.7077482", "0.70674914", "0.7048759", "0.7037193", "0.70288503", "0.70265394", "0.69909096", "0.6953004", "0.690671", "0.6887509", "0.68671453", "0.6848221", "0.68426335", "0.67855847", "0.67635053", "0.6761332", "0.6726292", "0.67043597", "0.66706455", "0.66579187", "0.6655022", "0.66504955", "0.66442305", "0.66228235", "0.66166747", "0.66148317", "0.65996414", "0.659956", "0.6589898", "0.6585225", "0.65745294", "0.6561751", "0.6546362", "0.6543266", "0.6540969", "0.6525079", "0.6525079", "0.6521926", "0.65191346", "0.65103054", "0.65073884", "0.6505556", "0.6492838", "0.6481103", "0.64532346", "0.64493215", "0.6440211", "0.6397831", "0.636156", "0.6349198", "0.6349198", "0.6345232", "0.6331798", "0.63269114", "0.6325969", "0.63198453", "0.6317572", "0.6313644", "0.6312883", "0.6303634", "0.6297762", "0.6297244", "0.6285269", "0.62834597", "0.62825054", "0.6272759", "0.62647504", "0.6261315", "0.62610435", "0.62501085", "0.62413853", "0.6233367", "0.6223836", "0.6223212", "0.62220746", "0.6221304", "0.6217439", "0.6217296", "0.621154", "0.6193589", "0.6193432", "0.619178", "0.6191098", "0.6189042", "0.6187211", "0.61657", "0.61643803", "0.61565804", "0.6141034", "0.6133268", "0.6129674", "0.6129237", "0.6126377", "0.61210155" ]
0.8233352
0
Created by vtarantik on 10.1.2017. Application component responsible for the dependency injection of the application singletons, such as network client, etc.
@Singleton @Component(modules = {AppModule.class}) public interface AppComponent { void inject(MovieListPresenter movieListPresenter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Singleton\n@Component(modules = {AppModule.class, AppClientModule.class})\npublic interface AppComponent {\n Application getApplication();\n MainViewInteraction getWeatherInteractor();\n}", "@Singleton\n@Component(modules = {ContextModule.class, BusModule.class, GithubModule.class, GankModule.class, ZhiHuModule.class, RssModule.class})\npublic interface AppComponent {\n Context getContext();\n GankService getGankService();\n ZhiHuService getZhiHuService();\n RssService getRssService();\n EventBus getBus();\n}", "@Singleton\n@Component(modules = ApplicationModule.class)\npublic interface ApplicationComponent {\n// @ApplicationContext\n// Context context();\n\n Application application();\n\n SharedPrefencesHelper sharedPrefencesHelper();\n\n DataManager dataManager();\n\n G3anService g3anService();\n}", "@Singleton\n@Component(modules = {ApplicationModule.class, NetModule.class})\npublic interface ApplicationComponent {\n Realm realm();\n\n SharedPreferencesStore sharedPreferencesStore();\n\n Retrofit retrofit();\n\n void inject(MyApplication application);\n\n}", "@Singleton\n@Component(modules = ApplicationModule.class)\npublic interface ApplicationComponent {\n\n @ApplicationContext\n Context context();\n\n void inject(ZoloApplication zoloApplication);\n\n DataManagerLogic datamangerLogic();\n\n Application application();\n\n}", "@Singleton // Constraints this component to one-per-application or unscoped bindings.\n@Component(modules = ApplicationModule.class)\npublic interface ApplicationComponent {\n\n // Field injections of any dependencies of the DemoApplication\n void inject(FeelingApp application);\n\n //Exposed to sub-graphs.\n Application application();\n Context context();\n SessionManager<TwitterSession> sessionManager();\n Retrofit networkManager();\n ThreadExecutor threadExecutor();\n PostExecutionThread postExecutionThread();\n TweetCache tweetCache();\n TweetRepository tweetRepository();\n\n}", "@Singleton\n@Component(modules = {ApplicationModule.class, NetWorkModule.class})\npublic interface ApplicationComponent {\n\n Application getApplication();\n\n NetworkApi getNetworkApi();\n\n}", "@Singleton\n@Component(modules = {AppModule.class, ConfigModule.class})\npublic interface AppComponent {\n\n Application application();\n\n RepositoryManager repositoryManager();\n\n RxLifecycleManager rxLifecycleManager();\n\n HttpClientHandler httpErrorHandler();\n\n AppManager appManager();\n\n OkHttpClient provideClient();\n\n void inject(AppDelegate delegate);\n\n @Component.Builder\n interface Builder {\n\n @BindsInstance\n Builder application(Application application);\n\n @BindsInstance\n Builder appDelegate(AppDelegate appDelegate);\n\n Builder configModule(ConfigModule configModule);\n\n AppComponent build();\n }\n}", "@Singleton\n@Component(modules = AppModule.class)\npublic interface AppComponent {\n\n GeekZoneApplication getApplication();\n\n LocalDataSourceManager getLocalDataSourceManager();\n\n RemoteDataSourceManager getRemoteDataSourceManager();\n}", "public RestApplication() {\n\t\tsingletons.add(new UtilResource());\n\t\tsingletons.add(new StudentResource());\n\t}", "@Singleton\n@Component(modules = {AppModule.class, ProviderModule.class})\npublic interface AppComponent {\n Retrofit provideRetrofit();\n BaseApplication providesApplication();\n\n}", "@Singleton\n@Component(modules = ApplicationModule.class)\npublic interface ApplicationComponent {\n\n void inject(MvpApp app);\n Application application();\n\n DataManager getDataManager();\n\n}", "@Singleton\n@Component(modules = {AppModule.class, RetrofitModule.class})\npublic interface AppComponent {\n Context getContext();\n KyApiService getKyApiService();\n WyApiService getWyApiService();\n OpApiService getOpApiService();\n ToutiaoVideoApiService getToutiaoVideoApiService();\n LiveApiService getLiveApiService();\n CloudMusicApiService getCloudMusicApiService();\n}", "@ForApplication\n@Component(modules = {AppModule.class, NetworkModule.class})\npublic interface AppComponent {\n Context appContext();\n Resources resources();\n PreferencesHelper preferencesHelper();\n void inject(NewsPresenter newsPresenter);\n void inject(FeedStorage feedStorage);\n}", "@Singleton @Component(modules = {ApplicationModule.class, ApiModule.class})\npublic interface ApplicationComponent {\n Context getContext();\n Bus getBus();\n TRApi getTRApi();\n\n void inject(ZhihuApplication zhihuApplication);\n\n void inject(BaseNewActivity baseNewActivity);\n}", "@Singleton\n@Component(modules = {AppModule.class})\npublic interface AppComponent {\n\n // Exposing to sub-graphs:\n @ApplicationContext\n Context context();\n\n ServiceClient serviceClient();\n\n void inject(BaseActivity baseActivity);\n}", "public App() {\n\t\tLog.d(\"App\", \"App created\");\n\t\tinstance = this;\n\t}", "@ApplicationScope\n@Component(modules = {AppModule.class})\npublic interface AppComponent {\n\n void inject(MyApplication application);\n\n Application application();\n\n Gson gson();\n\n OkHttpClient okHttpClient();\n\n}", "@ApplicationScope\n@Component(modules = {ContextModule.class,ServiceModule.class}) // tell which modules to use in order to generate this instance\npublic interface ApplicationComponent {\n\n\n\n SharedPreferencesClass getSharedPrefs();\n\n RequestManager getGlide();\n\n void injectRepo(ProjectRepository repository);\n\n}", "public static Application getInstance(){\n\t\treturn getInstance (null);\n\t}", "@SuppressWarnings(\"unused\")\n@Singleton\n@Component(modules = {ApplicationModule.class})\npublic interface ApplicationComponent {\n void inject(DIApplication application);\n\n void inject(BaseActivity activity);\n void inject(BaseFragment fragment);\n\n void inject(DogSyncService service);\n}", "@Component(modules = {ApplicationModule.class,HttpModule.class})\npublic interface ApplicationComponent {\n\n MyApp getApplication();\n\n NewsApi getNetEaseApi();\n\n JanDanApi getJanDanApi();\n\n Context getContext();\n\n}", "@Singleton\n@Component(modules = {NetworkModule.class, EventBusModule.class})\npublic interface AppComponent {\n\n void inject(RootViewModel rootViewModel);\n\n}", "@Component(modules = {ApplicationModule.class, HttpModule.class})\npublic interface ApplicationComponent {\n MyApp getApplication();\n\n ApiService getApiService();\n\n Context getContext();\n\n}", "@Singleton\n@Component(modules = {AndroidInjectionModule.class, ApplicationModule.class, ActivitiesModule.class, NetworkModule.class, DatabaseModule.class})\npublic interface ApplicationComponent {\n\n void inject(SchoolsApplication schoolsApplication);\n}", "@Singleton\n@Component(modules = AppModule.class)\npublic interface AppComponent {\n\n @ContextLife(\"Application\")\n App getContext(); // 提供App的Context\n\n RetrofitHelper retrofitHelper(); //提供http的帮助类\n\n}", "private SingletonApp( Context context ) {\n mMB = MessageBroker.getInstance( context );\n }", "@Provides\n @Singleton\n Application providesApplication() {\n return mApplication;\n }", "@Singleton\n@Component( modules = ApplicationModule.class)\npublic interface ApplicationComponent {\n\n //Exposed to sub-graphs\n Context context();\n\n ThreadExecutor threadExecutor();\n\n PostExecutionThread postExecutionThread();\n\n ObserverController observerController();\n\n Bundle parametersFactory();\n\n void inject(DevxitActivityDelegateImpl<DevxitView, DevxitPresenter<DevxitView>> devxitActivityDelegate);\n}", "@Singleton\n@Component(modules = {AppModule.class})\npublic interface AppComponent {\n Context getContext();\n CommonUtil getComminUtil();\n}", "@Singleton\n@Component(modules = AppModule.class)\npublic interface AppComponent {\n void inject(App app);\n}", "@Singleton\n@Component(modules = {ApplicationModule.class})\npublic interface ApplicationComponent {\n\n void inject(GoToDream goToDream);\n\n @Named(\"application\")\n Context getContext();\n}", "public static App getInstance() {\n return applicationInstance;\n }", "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 static AppClient getInstance() {\n return instance;\n }", "@Singleton\n@Component(modules = ApplicationModule.class)\npublic interface ApplicationComponent {\n\n// void inject(BaseActivity baseActivity);\n\n // provide\n Context getContext();\n RxBus getRxBus();\n DaoSession getDaoSession();\n}", "@Singleton\n@Component(modules = AppModule.class)\npublic interface AppComponent {\n void inject(MainActivity activity);\n\n Context provideApplication();\n\n IBluetooth provideBluetoothService();\n}", "@Component(modules = ApplicationModule.class)\npublic interface ApplicationComponent {\n\n Context getApplication();\n}", "public static ApplicationContext getInstance()\n\t{\n\t\treturn SingletonHolder.INSTANCE;\n\t}", "@Singleton\n@Component(\n modules = {\n AppModule.class,\n DataModule.class,\n InfoModule.class,\n FlavorModule.class\n }\n)\npublic interface AppComponent {\n\n void inject(HardwiredApp app);\n void inject(AddComputerDialog dialog);\n void inject(ComputerRecyclerAdapter adapter);\n\n DirectoryComponent plus(DirectoryModule module);\n DetailComponent plus(DetailModule module);\n}", "public interface IApplicationInjector {\r\n\t\r\n\tpublic Runnable getServerListener(int port, int poolSize) throws ApplicationException;\r\n\t\r\n\tpublic Runnable getWorker(Socket socket) throws ApplicationException;\r\n\t\r\n\tpublic IFileUtil getFileUtil() throws ApplicationException;\r\n\r\n}", "@Singleton\n@Component(modules = {\n ApplicationModule.class,\n PreferenceModule.class,\n NetworkModule.class,\n ServiceModule.class\n})\npublic interface DiComponent {\n void inject(MainActivity activity);\n}", "@Component(modules = { ApplicationModule.class, SettingsDataModule.class, UserDataModule.class, RecipeDataModule.class })\n@ApplicationScope\npublic interface ApplicationComponent {\n\n void inject(HoppyApplication application);\n\n @ApplicationContext\n Context applicationContext();\n Navigator navigator();\n\n UserRepository userRepository();\n RecipeRepository recipeRepository();\n SettingsRepository settingsRepository();\n GetCurrentUserInteractor getCurrentUserInteractor();\n}", "@Singleton\n@Component(modules = {\n CommonsApplicationModule.class,\n NetworkingModule.class,\n AndroidInjectionModule.class,\n AndroidSupportInjectionModule.class,\n ActivityBuilderModule.class,\n FragmentBuilderModule.class,\n ServiceBuilderModule.class,\n ContentProviderBuilderModule.class,\n UploadModule.class,\n ContributionsModule.class,\n SearchModule.class,\n DepictionModule.class,\n CategoriesModule.class\n})\npublic interface CommonsApplicationComponent extends AndroidInjector<ApplicationlessInjection> {\n void inject(CommonsApplication application);\n\n void inject(UploadWorker worker);\n\n void inject(LoginActivity activity);\n\n void inject(SettingsFragment fragment);\n\n void inject(MoreBottomSheetFragment fragment);\n\n void inject(MoreBottomSheetLoggedOutFragment fragment);\n\n void inject(ReviewController reviewController);\n\n //void inject(NavTabLayout view);\n\n @Override\n void inject(ApplicationlessInjection instance);\n\n void inject(FileProcessor fileProcessor);\n\n void inject(PicOfDayAppWidget picOfDayAppWidget);\n\n Gson gson();\n\n @Component.Builder\n @SuppressWarnings({\"WeakerAccess\", \"unused\"})\n interface Builder {\n\n Builder appModule(CommonsApplicationModule applicationModule);\n\n CommonsApplicationComponent build();\n }\n}", "public interface ApplicationService {\n ResourceList build(CloudBlueprint cloudBlueprint);\n List<Server> getServers(String environment);\n Map<String, JsonBall> getServerDetail(String serverName);\n}", "@Singleton\n@Component(modules = {MainModule.class})\npublic interface MainComponent {\n Context context();\n\n NYTimesService nYTimesService();\n void inject(NYTimesActivity nyTimesActivity);\n}", "@Singleton\n@Component(modules={\n AccountServiceModule.class,\n UserServiceModule.class,\n ConnectionModule.class,\n RemoteAccountModule.class,\n DaoModule.class,\n AuthenticationModule.class,\n CSVGeneratorModule.class,\n EmailServiceModule.class\n})\npublic interface ApplicationComponent {\n\n /**\n * The view needs classes defined in the services. The inject method\n * lets us do this.\n * Create an inject method for every different classes (controllers) in the views that would need them\n * @param myMoneyApplication\n */\n void inject(MyMoneyApplication myMoneyApplication);\n\n void inject(LoginController loginController);\n\n void inject(AccountListController accountListController);\n\n void inject(SignUpController signUpController);\n\n void inject(TransactionTableController tableController);\n\n void inject(UpdateUserAccountController updateUserAccountController);\n\n void inject(AllTransactionsController allTransactionsController);\n\n void inject(AccountDetailsController accountDetailsController);\n}", "public interface MainApplication {\n\n Activity getCurrentActivity();\n\n Application getCurrentApplication();\n\n RxBus getEventBus();\n\n void teardownModule(Modules module);\n}", "@Singleton\n@Component(modules={AppModule.class, NetModule.class})\npublic interface NetComponent {\n void inject(App application);\n void inject(MainActivity activity);\n\n SharedPreferenceUtil provideSharedPreferences();\n\n}", "@Singleton\n@Component(modules = AppModule.class)\npublic interface ApplicationComponent {\n\n void inject(ContainerActivity containerActivity);\n}", "Application getApplication();", "@Provides\n @Singleton\n @ApplicationScope\n public Context provideApplicationContext() {\n return mApp.getApplicationContext();\n }", "@Singleton\n@Component(modules = AppModule.class)\npublic interface AppComponent {\n void inject (@NonNull App app);\n}", "public DefaultApplication() {\n\t}", "@Singleton // Constraints this component to one-per-application or unscoped bindings.\n@Component(modules = {\n ApplicationModule.class,\n HomeModule.class\n})\npublic interface ApplicationComponent {\n\n /**\n * Field injections of any dependencies of the app\n *\n * @param mainActivity activity for which dependencies must be satisfied.\n */\n void inject(MainActivity mainActivity);\n\n /**\n * Field injections of any dependencies of the app\n *\n * @param homeView dashboardView for which dependencies must be satisfied.\n */\n void inject(HomeView homeView);\n}", "@Singleton\n@Component(modules = ImeiMainModule.class)\npublic interface ImeiMainComponent {\n void inject(ImeiAplication app);\n\n //Exposed to sub-graphs.\n ImeiAplication app();\n}", "@Singleton\n@Component(\n modules = {\n ApplicationModule.class,\n PresentationModule.class\n }\n)\npublic interface ApplicationComponent {\n void inject(MainActivity baseActivity);\n}", "@Component(modules = LoginApplicationModule.class)\n@Singleton\npublic interface LoginApplicationComponent {\n Context exposeContext();\n}", "@Singleton\n@Component(modules = {ModelModule.class, PresenterModule.class})\npublic interface AppComponent {\n void inject(ModelImpl dataRepository);\n\n void inject(BasePresenter basePresenter);\n\n void inject(PresenterSearch presenterSearch);\n\n void inject(FavouriteActivity favouriteActivity);\n}", "@Singleton\n@Component(modules = {MyAppModule.class,TwitterModule.class, ApiModule.class, RxModule.class})\npublic interface MyAppComponent {\n void inject(MainActivity target);\n}", "private static Injector instance() {\n if (instance == null) {\n instance = new Injector();\n }\n \n return instance;\n }", "public static FoodApplication getInstance() {\n return instance;\n }", "@Singleton\n@Component(\n modules = {\n AppModule.class,\n ObjectBoxModule.class\n })\npublic interface AppComponent {\n void inject(ToDoListActivity activity);\n void inject(TaskEditorActivity activity);\n //void inject(ICommonRepository repository);\n //ICommonRepository repo();\n}", "public static LoganoApp getApplication() {\n return Application.getInstance(LoganoApp.class);\n }", "@Component(modules = {\n AndroidSupportInjectionModule.class,\n AppModule.class,\n ActivityBuilder.class\n})\n@Singleton\npublic interface AppComponent{\n\n /*\n * This builder interface is called from our Application class.\n * This will set our application object to the AppComponent\n * So inside the AppComponent the application instance is available.\n * So this application instance can be accessed by our modules\n * such as ApiModule when needed\n * */\n @Component.Builder\n interface Builder{\n @BindsInstance\n Builder application(Application application);\n\n AppComponent build();\n }\n\n /*\n * This is our Application class\n * */\n void inject(BaseApplication application);\n\n}", "void inject(BaseApplication application);", "private void initAppComponent() {\n mAppComponent = DaggerAppComponent.builder()\n .appModule(new AppModule(this))\n .build();\n }", "@Singleton\n@Component(modules = {ApplicationModule.class})\npublic interface ApplicationComponent {\n void inject(PlayerFragmentPresenter playerFragmentPresenter);\n void inject(PlayerService playerService);\n}", "@Singleton\n@Component(modules = {PracticeModule.class})\npublic interface ApplicationComponent {\n\n /**\n * Inject method for the SplashActivity instance.\n *\n * @param activity is the type SplashActivity\n */\n void inject(SplashActivity activity);\n\n /**\n * Inject method for the HomeActivity instance.\n *\n * @param activity is the type HomeActivity\n */\n void inject(HomeActivity activity);\n\n /**\n * Inject method for the SubscriberListFragment\n *\n * @param fragment is the type SubscriberListFragment\n */\n void inject(SubscriberListFragment fragment);\n\n /**\n * Inject method for the SubscriberDetailsFragment\n *\n * @param fragment is the type SubscriberDetailsFragment\n */\n void inject(SubscriberDetailsFragment fragment);\n\n /**\n * Inject method for the WebClientFragment\n *\n * @param fragment is the type WebClientFragment\n */\n void inject(WebClientFragment fragment);\n}", "public BazaarApplicationImpl() {\r\n\t\tsuper();\r\n\r\n\t}", "@Singleton\n@Component(modules = {\n ApplicationModule.class,\n AndroidInjectionModule.class,\n ActivityBuilderModule.class\n})\npublic interface AppComponent {\n @Component.Builder\n interface Builder{\n @BindsInstance\n Builder application(Application application);\n AppComponent build();\n\n }\n void inject (NYTimesApp inject);\n}", "public static synchronized AppController getInstance() {\n return mInstance;\n }", "@Singleton\n@Component(modules = {NetModule.class})\npublic interface ApplicationComponent {\n void inject(MoviesActivity moviesActivity);\n}", "@ApplicationScope\n@Component(\n dependencies = DataServiceComponent.class,\n modules = {\n DataManagerModule.class\n }\n)\npublic interface DataManagerComponent {\n DataManager dataManager();\n void inject(MainActivity activity);\n}", "public static synchronized DemoApplication getInstance() {\n return mInstance;\n }", "private void createSharedSingletons(Context applicationContext) {\n\t\t// Create Active User\n\t\tActiveUserModel.createInstance(applicationContext);\n\n\t\t// Create Favorites List\n\t\tFavoriteTopicModelList.createInstance(applicationContext);\n\t\tFavoriteCommentModelList.createInstance(applicationContext);\n\n\t\t// Create Read Later list\n\t\tReadLaterTopicModelList.createInstance(applicationContext);\n\t\tReadLaterCommentModelList.createInstance(applicationContext);\n\n\t\t// Create Location Provider\n\t\tLocationProvider.getInstance(applicationContext);\n\t}", "private void initSingletons() {\n\t\tModel.getInstance();\n\t\tSocialManager.getInstance();\n\t\tMensaDataSource.getInstance();\n\t}", "@Singleton\n@Component(modules = {NetworkModule.class, SubcomponentsModule.class})\npublic interface ApplicationComponent {\n /**\n * This function exposes the HomeComponent Factory out of the graph so consumers\n * can use it to obtain new instances of HomeComponent.\n *\n * @return {@link HomeComponent.Factory}\n */\n HomeComponent.Factory homeComponent();\n}", "@Singleton\n@Component(modules = {\n AndroidInjectionModule.class,\n AppModule.class,\n ActivityBuilder.class,\n NetModule.class, GlideAppModules.class\n})\npublic interface AppComponent {\n\n @Component.Builder\n interface Builder {\n\n @BindsInstance Builder application(Application application);\n AppComponent build();\n Builder net(NetModule netModule);\n Builder glide(GlideAppModules glideAppModules);\n }\n\n void inject(MyApplication application);\n\n}", "@Singleton\n@Component(modules = { AppModule.class, NetModule.class })\npublic interface NetComponent {\n void inject(MainHandler handler);\n}", "public interface AppConfigService {\n /**\n * 获取中台AppKey\n * @return\n */\n String getAppKey();\n /**\n * 获取中台channel\n * @return\n */\n String getChannel();\n /**\n * 获取中台domain\n * @return\n */\n String getMiddleDomain();\n /**\n * 获取自己服务器domain\n * @return\n */\n String getOwnDomain();\n /**\n * 获取网页domain\n * @return\n */\n String getH5Domain();\n\n /**\n * 获取weex远端地址目录\n * @return\n */\n String getWeexDomain();\n /**\n * 获取全局ApplicationContext\n * @return\n */\n Application getApplication();\n}", "@Singleton\n@Component(modules = DriverModule.class)\npublic interface AppComponent {\n Driver getDriver();\n}", "@ApplicationScope\n@Component(modules = {\n ApplicationModule.class,\n NetworkModule.class,\n ApiModule.class,\n PersistenceModule.class\n})\npublic interface ApplicationComponent {\n\n ArchitectureUrl url();\n\n void inject(CatApplication application);\n HomeComponent plus(HomeModule module);\n}", "public static TwitterApplication getInstance() {\n return application;\n }", "@Component(modules = {AppModule.class, UtilsModule.class})\n@Singleton\npublic interface AppComponent {\n\n void doInjection(HomeActivity homeActivity);\n\n}", "@Singleton\n@Component(modules = {\n\t\tAndroidSupportInjectionModule.class,\n\t\tAppModule.class,\n\t\tNetworkModule.class,\n\t\tModuleBuilder.class\n})\npublic interface AppComponent{\n\n\[email protected]\n\tinterface Builder {\n\n\t\t@BindsInstance\n\t\tBuilder application(App application);\n\t\tAppComponent build();\n\t}\n\n\tvoid inject(App app);\n}", "@Singleton\r\n@Component(modules = {UIModule.class, InteractorModule.class, MockModelModule.class, MockNetworkModule.class})\r\npublic interface MockAnimalFindApplicationComponent extends AnimalFindApplicationComponent {\r\n}", "public interface App {\n AppComponent getAppComponent();\n}", "@Singleton\n@Component(modules = {AndroidInjectionModule.class,\n AppModule.class,\n MainActivityModule.class})\npublic interface AppComponent {\n\n @Component.Builder\n interface Builder {\n @BindsInstance\n Builder application(Application application);\n AppComponent build();\n }\n\n void inject(GitHubApp gitHubApp);\n}", "public AppModuleImpl() {\n }", "public AppModuleImpl() {\n }", "public static ServiceLocator instance() {\n\t\tif(instance == null){\n\t\t\tinstance = new ServiceLocator();\n\t\t\tinstance.initializeCache();\n\n\t\t\tinstance.initializeCache();\n\t\t\tinstance.loadFileApplication(RESOURCE_BUNDLE_DEVELOPMENT);\n\t\t\t//instance.loadFileApplication(RESOURCE_BUNDLE_CHEMIN);\t\t\t\n\t\t}\n\n\t\treturn instance;\t\n\t}", "public SingletonApplicationEnvironment(String applicationName) throws SIMPLTranslationException\n \t{\n \t\tthis(null, applicationName, null);\n \t}", "@Singleton\n@Component(modules = {PopularMoviesInjectionModule.class})\npublic interface PopularMoviesApplicationComponent {\n\n Context context();\n\n void inject(MovieDetailsActivity activity);\n\n void inject(MovieGridFragment fragment);\n\n void inject(FavoriteMoviesContentProvider contentProvider);\n}", "private ApplicationContext()\n\t{\n\t}", "public interface ApplicationService {\n\tOptional<App> getAppByName(String name);\n\n\tOptional<App> getAppByType(String type);\n\n\tApp create(AppCreateForm form);\n}", "protected Application getApplication() {\r\n\t\treturn application;\r\n\t}", "@Override\n protected void configure() {\n bind(ApplicationContext.class).toInstance(ctxt);\n }", "@Singleton\n@Component(modules = {AppModule.class, NetworkModule.class,PresenterModule.class})\npublic interface AppComponent {\n\n // void inject(DisplayMovieActivity displayMovieActivity );\n\n //register main activity it will need objects for injection\n void inject(MoviesListFragment moviesListFragment);\n\n //register MainPresenter it will need objects for injection\n void inject(MoviesListPresenter moviesListPresenter);\n\n void inject(MoviesDetailsFragment moviesDetailsFragment);\n void inject(MoviesDetailsPresenter moviesDetailsPresenter);\n\n\n}", "@Component(modules = {AppModule.class, UtilsModule.class})\n@Singleton\npublic interface AppComponent {\n\n void inject(BaseActivity baseActivity);\n\n}", "@Singleton\n@Component(modules = AppModule.class)\npublic interface AppComponent {\n\n void inject(BaseActivity activity);\n void inject(UserListFrag frag);\n void inject(LoginFrag frag);\n void inject(SplashActivity act);\n\n}" ]
[ "0.7712496", "0.74920243", "0.74638724", "0.7453202", "0.74021834", "0.7392715", "0.7207616", "0.7161734", "0.7158684", "0.71481377", "0.7064321", "0.7041459", "0.7026089", "0.70151544", "0.70148623", "0.6963718", "0.6929122", "0.691811", "0.6890072", "0.6879232", "0.6871016", "0.68706733", "0.6865054", "0.6859364", "0.68492633", "0.68454844", "0.683482", "0.68325335", "0.682579", "0.6824491", "0.68101245", "0.6807097", "0.6789821", "0.6724905", "0.6714262", "0.67079645", "0.66798943", "0.6652796", "0.66196424", "0.6594294", "0.65883356", "0.65830475", "0.65743726", "0.65462554", "0.65416604", "0.6536631", "0.65294003", "0.6521631", "0.6510744", "0.6496301", "0.6495529", "0.6489528", "0.6477699", "0.6459881", "0.6450734", "0.6414082", "0.63748926", "0.63632506", "0.635727", "0.63482547", "0.6341029", "0.6329682", "0.63275397", "0.6324738", "0.630863", "0.6306719", "0.63038313", "0.6301083", "0.629913", "0.6294295", "0.6278291", "0.627822", "0.6278212", "0.62699616", "0.6267795", "0.6267667", "0.6267106", "0.62413275", "0.622439", "0.62239075", "0.6223323", "0.6216127", "0.62157595", "0.6201117", "0.61919385", "0.6188173", "0.6157422", "0.6149767", "0.6149567", "0.6147762", "0.6147762", "0.6122292", "0.6120428", "0.6117508", "0.6112502", "0.60707945", "0.60639954", "0.605802", "0.6054552", "0.6044958", "0.60420686" ]
0.0
-1
WorldSettings$GameType getGameType(); WorldSettings$GameType getGameTypeById(int var0);
boolean getHardcoreEnabled();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int getGameType()\n\t{\n\t\treturn -1;\n\t}", "public static GameType getGameType() {\n\t\treturn type;\n\t}", "public String getGameType() {\n return gameType;\n }", "public PlayerTypes getPlayerType();", "public int getGameObject (GameObject gameObject){\n\t\tint typeObject =0;\r\n\t\tif (gameObject instanceof ShipSection){\r\n\t\t\ttypeObject= 1;\r\n\t\t}\r\n\t\telse if (gameObject instanceof Shots || gameObject instanceof Explosion){\r\n\t\t\ttypeObject= 2;\r\n\t\t}\r\n\t\telse if (gameObject instanceof Blank){\r\n\t\t\ttypeObject= 3;\r\n\t\t}\r\n\t\treturn typeObject;\r\n\t}", "SpawnType getGameSpawnType();", "public abstract String getWorldType();", "public GameTypeWrapper playGame();", "int getGunType();", "public String getLoadGameType(){\n return m_LoadGameType;\n }", "Game getGameById(long id);", "public String GetGameName(int game_number)\n\t{\n\t\treturn gametype[game_number].GetName();\n\t}", "String getGameId();", "GameCode getGameCode(String gameCode);", "public static void saveGameType() {\r\n\t\tclearGameType();\r\n\t\t\r\n\t\tif (GameSetup.threeHanded.getState()) {\r\n\t\t\tMain.isThreeHanded = true;\r\n\t\t}\r\n\t\tif (GameSetup.fourHandedSingle.getState()) {\r\n\t\t\tMain.isFourHandedSingle = true;\r\n\t\t}\r\n\t\tif (GameSetup.fourHandedTeams.getState()) {\r\n\t\t\tMain.isFourHandedTeams = true;\r\n\t\t}\r\n\t}", "Game getGameByShortcode(String shortCode);", "GameCode getGameCode(Long gameId);", "public BowlingGame getGame();", "@External(readonly = true)\n\tpublic List<String> get_game_type(){\n\t\t\n\t\treturn this.GAME_TYPE;\n\t}", "int getTypeIdValue();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "public IGame getGame(String uniqGameID){\r\n\t\treturn null;\r\n\t}", "SpawnType getLobbySpawnType();", "CharacterType createCharacterType(CharacterType t, long gameId);", "public abstract Class<BE> getBukkitEntityType();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "public GameType(String name)\n\t\t{\n\t\t\tgame_name = name;\n\t\t}", "im.turms.common.constant.ChatType getChatType();", "GameConfiguration getGameConfiguration();", "private String getOpeningType(Game game) {\n for (int i = 0; i < 6; i++) {\n game.forward();\n }\n\n if (isType1(game)) {\n return TYPE1;\n } else if (isType2(game)) {\n return TYPE2;\n } else if (isType3(game)) {\n return TYPE3;\n } else if (isTypeRelaxed(game)) {\n return TYPE_RELAXED;\n } else {\n return UNKNOWN;\n }\n }", "public static void newGame(GameType t) {\n\t\ttype = t;\n\t}", "public interface GameSettings {\n\n\tint getThirdPersonSetting();\n\n\tboolean getBobbing();\n\n\tvoid setBobbing(boolean bobbing);\n\n\tboolean isKeyDown(GameKeybind keybind);\n\n\tboolean isKeyPressed(GameKeybind keybind);\n\n\tvoid setKeyState(GameKeybind keybind, boolean state);\n\n\tint getKeyCode(String name);\n\n\tfloat getGamma();\n\n\tvoid setGamma(float gamma);\n}", "public AgentType findAgentTypeById(long id);", "public GamePad getGamePad(String id) {\n if (id.equals(\"1\")) return gamepad1;\n if (id.equals(\"2\")) return gamepad2;\n return null;\n }", "interface Game {\n\n // Bank\n String TRANSACTION = \"transaction\";\n\n // Lobby\n String POKE = \"poke\";\n String MEMBER_READY = \"member_ready\";\n }", "private Game getGameById(long idGame) {\n Game game;\n synchronized (this.games) {\n if (!this.games.containsKey(idGame)) {\n return null;\n }\n game = this.games.get(idGame);\n }\n return game;\n }", "public TextMinigame getGame(String which) {\n\t\tif (minigameMap.containsKey(which)) {\n\t\t\treturn minigameMap.get(which).newGame();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "@SuppressWarnings(\"rawtypes\")\n \tpublic static Class getWorldTypeClass() {\n \t\treturn getMinecraftClass(\"WorldType\");\n \t}", "@Override\n public PlayerType getPlayerType(int player) {\n if (player == 0) {\n return PlayerType.HUMAN;\n }\n return PlayerType.CPU;\n }", "StrategyType type();", "java.lang.String getGameName();", "java.lang.String getGameName();", "private gameLocation getGameLocation(int ID) {\n\t\tgameLocation game = null;\n\t\tif (ID == 0) {\n\t\t\tgame = new gameLocation(AppleID, AppleDescription, false);\n\t\t} else if (ID == 1) {\n\t\t\tgame = new gameLocation(DiscoveryID, DiscoveryDescription, false);\n\t\t} else if (ID == 2) {\n\t\t\tgame = new gameLocation(PlantesFerryID, PlantesFerryDescription, false);\n\t\t}else if (ID == 3) {\n\t\t\tgame = new gameLocation(GreenacresID, GreenacresDescription, false);\n\t\t}\n\t\treturn game;\n\t}", "GlAccountType getGlAccountType();", "public int getGameID() {\n return GameID;\n }", "@Override\n\tpublic Game getGameById(Long gameId) {\n\t\treturn iGameRepository.findById(gameId).get();\n\t}", "public abstract Game getGame(int game_id) throws SQLException;", "public int getTypeId();", "public int getTypeId();", "public World getWorld(String worldName);", "String getTileType();", "public Game getGame(String type, Iterator<String> tags, Object view, String question) throws GameDoesNotExistException, InvalidViewTypeException, MissingTagException;", "private static String getRandomType(){\r\n int index = r.nextInt(typeOfRooms.length);\r\n return typeOfRooms[index];\r\n }", "private static HorseRace getSaveGameRace() {\n\t\tSaveGame game = SaveGameManager.getLoadedGame();\n\t\tif (game == null) {\n\t\t\treturn HorseRace.HAFLINGER;\n\t\t} else {\n\t\t\treturn game.getHorseRace();\n\t\t}\n\t}", "public int getType()\n {\n return pref.getInt(KEY_TYPE, 0);\n }", "public static PlayerType playerType(int playerID) {\n return TUIMenu.displayValueMenu(\n String.format(\"Choisissez le type de joueur pour le joueur %d :\", playerID),\n List.of(\n new SupplierAction<>() {\n public String name() {\n return \"Joueur réel\";\n }\n\n public PlayerType get() {\n return PlayerType.REAL_PLAYER;\n }\n },\n new SupplierAction<>() {\n public String name() {\n return \"IA basique\";\n }\n\n public PlayerType get() {\n return PlayerType.BASIC_AI;\n }\n }\n )\n );\n }", "int getChatTypeValue();", "public String getPlayerType() {\r\n return playerType;\r\n\t}", "GameMode mode();", "@Override\n public Game readGame(Long game_id) {\n return gameDataAccess.findById(game_id).get();\n }", "public Game getGame(int index) {\n\t\tGame aGame = games.get(index);\n\t\treturn aGame;\n\t}", "long getWorldid();", "long getWorldid();", "public int getGameID() {\n return gameID;\n }", "public static InterfaceModeType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase MASTER: return MASTER_LITERAL;\n\t\t\tcase SLAVE: return SLAVE_LITERAL;\n\t\t\tcase SYSTEM: return SYSTEM_LITERAL;\n\t\t\tcase MIRRORED_MASTER: return MIRRORED_MASTER_LITERAL;\n\t\t\tcase MIRRORED_SLAVE: return MIRRORED_SLAVE_LITERAL;\n\t\t\tcase MIRRORED_SYSTEM: return MIRRORED_SYSTEM_LITERAL;\n\t\t}\n\t\treturn null;\n\t}", "public FreeColGameObjectType getType() {\n return this;\n }", "SettingType createSettingType();", "public ArrayList<GameType> getGameTypes()\r\n {\r\n\treturn new ArrayList<GameType>(gameTypes);\r\n }", "protected int getVillagerType(int par1)\n {\n return FantasticIds.fishermanID;\n }", "public Integer getGameId() {\n return gameId;\n }", "int getType(){\n return type;\n }", "public Game getGame(String gameID) {\n return games.get(gameID);\n }", "public int findGameTypeBySerialNo(String serialNo) throws ApplicationException;", "public String getGameId() {\n return gameId;\n }", "public String getGameId() {\n return gameId;\n }", "public abstract int getType();", "public abstract int getType();" ]
[ "0.7365358", "0.70685434", "0.6933171", "0.65222627", "0.646938", "0.6457055", "0.6428952", "0.6262903", "0.6256093", "0.6192023", "0.6114626", "0.60880345", "0.6055377", "0.5956182", "0.59315914", "0.58679146", "0.5854683", "0.5852834", "0.5808353", "0.5788", "0.57791823", "0.57791823", "0.57791823", "0.57791823", "0.57791823", "0.57791823", "0.57791823", "0.57791823", "0.5771585", "0.57698554", "0.57330877", "0.56738627", "0.5659719", "0.5659719", "0.5659719", "0.5659719", "0.5659719", "0.5659719", "0.5659719", "0.5659719", "0.5659719", "0.5659719", "0.5659719", "0.5659719", "0.5659719", "0.56543785", "0.5650583", "0.56313705", "0.5606819", "0.56053424", "0.5594482", "0.55722874", "0.55714315", "0.5570882", "0.556201", "0.55497545", "0.55407304", "0.55407304", "0.55407304", "0.55407304", "0.55407304", "0.55335903", "0.55097055", "0.5489598", "0.5480459", "0.5480459", "0.54755133", "0.5448313", "0.54440415", "0.5443695", "0.54382545", "0.543392", "0.543392", "0.5432477", "0.54223883", "0.5419955", "0.5418912", "0.5414878", "0.54089934", "0.5408444", "0.5407918", "0.54027903", "0.5398951", "0.53950065", "0.539466", "0.5376233", "0.5376233", "0.5375032", "0.5372127", "0.5353933", "0.53418237", "0.53411156", "0.53394663", "0.5337222", "0.5334552", "0.5330442", "0.53285354", "0.53199947", "0.53199947", "0.53150845", "0.53150845" ]
0.0
-1
Creates and caches a JPEG screenshot of a given URL.
@Cacheable("screenshot-service") public byte[] getScreenshot(String url) { try { final Runpagespeed request = client.pagespeedapi().runpagespeed(url); request.setScreenshot(true); request.setRule(Collections.singletonList("MinifyHTML")); return request.execute().getScreenshot().decodeData(); } catch (IOException ex) { LOG.error("Couldn't get screenshot", ex); return new byte[]{}; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bitmap download(String url){\n \tSystem.out.println(url);\n \t//url = \"http://140.115.113.164:8080/wardrobe/wardrobedata/pic/15b0cfe6f85d45b9b09d6cc4f8d139b749f1c58c4c8e4ec6982d843116b70aca-R.PNG\";\n \tBitmap bitmap = null;\n \tbitmap = downloadBitmap(url);\n \tif(bitmap == null)\n \tSystem.out.print(\"bitmap is null!!\");\n \taddBitmapToCache(url, bitmap);\n \treturn bitmap;\n }", "public static Bitmap getImage(String url){\n\t\tBitmap image = BitmapFactory.decodeStream(\n\t\t\t\topenStream(url));\n\t\tLog.i(\"IMAGE\",\"Cache hit on \"+hashURL(url));\n\t\treturn image;\n\t}", "private void saveBitmapToCacheFile(String url, Bitmap bitmap){\n \t\n \tif(bitmap != null){\n \t\tFile bufferFolder = new File(MainActivity.image_cache_dir);\n \t\tif(!bufferFolder.exists()) bufferFolder.mkdirs();\n \t\t\t\t\t\n \t\tFile imageFile = new File(MainActivity.image_cache_dir + getFileName(url));\n \t\t//System.out.println(\"saveBitmapToCacheFile \" + imageFile.getAbsolutePath());\n \t\tif(imageFile.exists()) {\n \t\t\t//If the file already exist, don't save it again.\n \t\t\treturn;\n \t\t\t//imageFile.delete();\n \t\t}\n \t\tFileOutputStream fout = null;\n \t\ttry {\n\t\t\t\tfout = new FileOutputStream(imageFile);\t\t\t\t\n\t\t\t\tbitmap.compress(Bitmap.CompressFormat.JPEG, 100, fout);\t\n\t\t\t\t//System.out.println(\"bitmap.compress \" + imageFile.getAbsolutePath());\n \t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}finally{\n\t\t\t\tif(fout != null){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfout.flush();\n\t\t\t\t\t\tfout.close();\n\t\t\t\t\t} catch (IOException e) {\t\t\t\t\t\t\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\t \n\t\t\t} \t\t \t\t\n \t}\n }", "private Bitmap loadAndCacheBitmap(File cacheFile, String url) {\n File tempFile = new File(cacheFile.getPath() + \"temp_file\");\n Bitmap bitmap = null;\n HttpURLConnection connection = null;\n OutputStream tempOs = null;\n OutputStream cacheOs = null;\n\n try {\n URL imageUrl = new URL(url);\n\n // Create connection\n connection = (HttpURLConnection) imageUrl.openConnection();\n connection.setConnectTimeout(CONNECTION_TIMEOUT);\n connection.setReadTimeout(CONNECTION_TIMEOUT);\n connection.setInstanceFollowRedirects(true);\n\n // Save image to temp file\n InputStream is = connection.getInputStream();\n tempOs = new FileOutputStream(tempFile);\n StreamUtils.copy(is, tempOs);\n\n Log.d(\"HIHO\", \"bitmap from web\");\n\n // Decode and scale image to reduce memory consumption\n bitmap = decodeAndScale(tempFile);\n\n // Save scaled bitmap to cache file\n cacheOs = new FileOutputStream(cacheFile);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, cacheOs);\n\n } catch (IOException e) {\n Log.e(TAG, \"Error while image was loaded and stored\", e);\n // Remove cached file if something go wrong\n cacheFile.delete();\n } finally {\n StreamUtils.closeQuietly(tempOs);\n StreamUtils.closeQuietly(cacheOs);\n // Remove temp file\n tempFile.delete();\n if (connection != null) connection.disconnect();\n }\n\n return bitmap;\n }", "private static Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n InputStream stream = null;\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inSampleSize = 1;\n\n try {\n stream = getHttpConnection(url);\n bitmap = BitmapFactory.\n decodeStream(stream, null, bmOptions);\n stream.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return bitmap;\n }", "public void saveImageFromURL() {\n Executors.newFixedThreadPool(1).execute(new Runnable() {\n @Override\n public void run() {\n if (context != null) {\n OutputStream os = null;\n InputStream is = null;\n final File file = new File(context.getExternalFilesDir(null), pictureName);\n\n try {\n URL url = new URL(loadUrl);\n httpConnection = (HttpURLConnection) url.openConnection();\n httpConnection.setDoInput(true);\n httpConnection.connect();\n is = httpConnection.getInputStream();\n Bitmap bit = BitmapFactory.decodeStream(is);\n os = new FileOutputStream(file);\n bit.compress(compressFormat, compressPercent, os);\n is.close();\n os.close();\n httpConnection.disconnect();\n } catch (IOException e) {\n Log.w(\"ExternalStorage\", \"Error writing \" + file, e);\n } finally {\n if (httpConnection != null) {\n httpConnection.disconnect();\n try {\n os.flush();\n os.close();\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n });\n }", "@Override\n public Bitmap getImage(String url) {\n try {\n if (!taskForUrlAlreadyRunning(url)) {\n imageDownloadTaskMap.put(url, startDownload(url));\n }\n } catch (MalformedURLException e) {\n Log.i(\"ImageDownloadManager\", \"Malformed url\" + url);\n }\n return null;\n }", "private Bitmap downloadImage(String url)\n \t {\n \n \t Bitmap bitmap = null;\n \t InputStream stream = null;\n \t BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n \t bmOptions.inSampleSize = 1;\n \n \t try\n \t {\n \t stream = getHttpConnection(url);\n \t bitmap = BitmapFactory.decodeStream(stream, null, bmOptions);\n \t stream.close();\n \n \t return bitmap;\n \t }\n \t catch (IOException e1)\n \t {\n \t e1.printStackTrace();\n \t }\n \t return bitmap;\n \t }", "protected Bitmap getImage(URL url) {\n\n HttpURLConnection iconConn = null;\n try {\n iconConn = (HttpURLConnection) url.openConnection();\n iconConn.connect();\n int response = iconConn.getResponseCode();\n //if the reponse 200 the successfull\n if (response == 200) {\n return BitmapFactory.decodeStream(iconConn.getInputStream());\n } else {\n return null;\n }\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n } finally {\n if (iconConn != null) {\n iconConn.disconnect();\n }\n }\n }", "private Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n InputStream stream = null;\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inSampleSize = 1;\n\n try {\n stream = getHttpConnection(url);\n bitmap = BitmapFactory.decodeStream(stream, null, bmOptions);\n stream.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return bitmap;\n }", "@Override\n\t\t\tpublic Bitmap getBitmap(String url) {\n\t\t\t\treturn cache.get(url);\n\t\t\t}", "private Bitmap downloadBitmap(String url) {\n \tFile bufferFolder = new File(MainActivity.image_cache_dir);\n\t\tif(!bufferFolder.exists()) bufferFolder.mkdirs();\n \t//If it is in the local file, get it from there.\n \tFile imageFile = new File(MainActivity.image_cache_dir + getFileName(url));\n\t\tif(imageFile.exists()) {\n\t\t\tSystem.out.println(\"get image from \" + imageFile.getAbsolutePath());\n\t\t\treturn BitmapFactory.decodeFile(imageFile.getAbsolutePath());\t\t\t\t\t\t\n\t\t}else{\n\t\t\tSystem.out.println(\"image \" + imageFile.getAbsolutePath() + \" doesn't exist!\");\n\t\t}\n \n \tfinal int IO_BUFFER_SIZE = 4 * 1024;\n\n // AndroidHttpClient is not allowed to be used from the main thread\n// final HttpClient client = (mode == Mode.NO_ASYNC_TASK) ? new DefaultHttpClient() :\n// AndroidHttpClient.newInstance(\"Android\");\n// final HttpGet getRequest = new HttpGet(url);\n HttpClient client = new DefaultHttpClient();\n HttpGet getRequest = new HttpGet(url);\n try {\n HttpResponse response = client.execute(getRequest);\n final int statusCode = response.getStatusLine().getStatusCode();\n if (statusCode != HttpStatus.SC_OK) {\n Log.w(\"ImageDownloader\", \"Error \" + statusCode +\n \" while retrieving bitmap from \" + url);\n return null;\n }else{\n \tLog.w(\"ImageDownloader\", \"HttpStatus.SC_OK \" + statusCode +\n \" while retrieving bitmap from \" + url);\n }\n\n final HttpEntity entity = response.getEntity();\n if (entity != null) {\n InputStream inputStream = null;\n try {\n inputStream = entity.getContent();\n // return BitmapFactory.decodeStream(inputStream);\n // Bug on slow connections, fixed in future release.\n \n FlushedInputStream flushedInputStream = new FlushedInputStream(inputStream);\n // Need to be fixed: Save the loaded picture directly and transfer into bitmap then.\n FileOutputStream fout = null;\n \t\ttry {\n \t\t\t\tfout = new FileOutputStream(imageFile);\t\t\t\t\n \t\t\t\t /*\n * Read bytes to the Buffer until there is nothing more to read(-1).\n */\n \t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(512);\n int current = 0;\n while ((current = flushedInputStream.read()) != -1) {\n baf.append((byte) current);\n }\n fout.write(baf.toByteArray()); \n \t\t\t\t//System.out.println(\"bitmap.compress \" + imageFile.getAbsolutePath());\n \t\t} catch (FileNotFoundException e) {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\te.printStackTrace();\n \t\t\t}finally{\n \t\t\t\tif(fout != null){\n \t\t\t\t\ttry {\n \t\t\t\t\t\tfout.flush();\n \t\t\t\t\t\tfout.close();\n \t\t\t\t\t} catch (IOException e) {\t\t\t\t\t\t\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\t\t\t\t\t\n \t\t\t\t}\t \n \t\t\t} \t\t \n //return BitmapFactory.decodeStream(flushedInputStream);\n \t\t\treturn BitmapFactory.decodeFile(imageFile.getAbsolutePath());\n } finally {\n if (inputStream != null) {\n inputStream.close();\n }\n entity.consumeContent();\n }\n }\n } catch (IOException e) {\n getRequest.abort();\n Log.w(LOG_TAG, \"I/O error while retrieving bitmap from \" + url, e);\n } catch (IllegalStateException e) {\n getRequest.abort();\n Log.w(LOG_TAG, \"Incorrect URL: \" + url);\n } catch (Exception e) {\n getRequest.abort();\n Log.w(LOG_TAG, \"Error while retrieving bitmap from \" + url, e);\n } finally {\n if ((client instanceof AndroidHttpClient)) {\n ((AndroidHttpClient) client).close();\n }\n }\n return null;\n }", "public static Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n\n InputStream stream = getHttpConnection(url);\n if(stream!=null) {\n bitmap = BitmapFactory.decodeStream(stream);\n try {\n stream.close();\n }catch (IOException e1) {\n Log.d(\"MyDebugMsg\", \"IOException in downloadImage()\");\n e1.printStackTrace();\n }\n }\n\n return bitmap;\n }", "public static void saveImageCache( Context context, Bitmap bitmap, String url ) {\n\t\ttry {\n\t\t\tString fileName = createPath(url, context);\n\t\t\t\n\t\t\tLog.i( TAG, \"saveImageCache: \" + fileName );\n\t\t\t\n\t\t\tList<String> fileList = Arrays.asList(fileName.split((\"/\")));\n\t\t\tString dirName = TextUtils.join(\"/\", fileList.subList(0, (fileList.size() - 1)));\n\t\t\t\n\t\t\tFile dirHnd = new File(dirName);\n\t\t\tdirHnd.mkdirs();\n\t\t\t\n\t\t\tFile file = new File ( fileName );\n\t\t\t\n\t\t\tFileOutputStream fileOutputStream = new FileOutputStream(file);\n\t\t\tBufferedOutputStream bos = new BufferedOutputStream(fileOutputStream);\n\t\t\t\n\t\t\tif ( fileName.toLowerCase().indexOf(\"png\") > 0 ) {\n\t\t\t\tbitmap.compress( CompressFormat.PNG , 100, bos);\n\t\t\t} else {\n\t\t\t\tbitmap.compress( CompressFormat.JPEG , 100, bos);\n\t\t\t}\n\t\t\t\n\t\t\tbos.flush();\n\t bos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tLog.i( TAG, \"ERROR: saveImageCache: \" + e);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tLog.i( TAG, \"ERROR: saveImageCache: \" + e);\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\tLog.i( TAG, \"ERROR: saveImageCache: \" + e);\n\t\t\te.printStackTrace();\n\t\t} \t\t\n\t}", "@Override\n public void onComplete(String url) {\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n saveImageToFile(image,localFileName);\n //3. return the image using the listener\n listener.onComplete(image.toString());\n }", "public static void cacheImage(final File file, ImageRequest imageCallback) {\n\n HttpURLConnection urlConnection = null;\n FileOutputStream fileOutputStream = null;\n InputStream inputStream = null;\n boolean isGif = false;\n\n try{\n // Setup the connection\n urlConnection = (HttpURLConnection) new URL(imageCallback.mUrl).openConnection();\n urlConnection.setConnectTimeout(ImageManager.LONG_CONNECTION_TIMEOUT);\n urlConnection.setReadTimeout(ImageManager.LONG_REQUEST_TIMEOUT);\n urlConnection.setUseCaches(true);\n urlConnection.setInstanceFollowRedirects(true);\n\n // Set the progress to 0\n imageCallback.sendProgressUpdate(imageCallback.mUrl, 0);\n\n // Connect\n inputStream = urlConnection.getInputStream();\n\n // Do not proceed if the file wasn't downloaded\n if(urlConnection.getResponseCode()==404){\n urlConnection.disconnect();\n return;\n }\n\n // Check if the image is a GIF\n String contentType = urlConnection.getHeaderField(\"Content-Type\");\n if(contentType!=null){\n isGif = contentType.equals(GIF_MIME);\n }\n\n // Grab the length of the image\n int length = 0;\n try{\n String fileLength = urlConnection.getHeaderField(\"Content-Length\");\n if(fileLength!=null){\n length = Integer.parseInt(fileLength);\n }\n }catch(NumberFormatException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n\n // Write the input stream to disk\n fileOutputStream = new FileOutputStream(file, true);\n int byteRead = 0;\n int totalRead = 0;\n final byte[] buffer = new byte[8192];\n int frameCount = 0;\n\n // Download the image\n while ((byteRead = inputStream.read(buffer)) != -1) {\n\n // If the image is a gif, count the start of frames\n if(isGif){\n for(int i=0;i<byteRead-3;i++){\n if( buffer[i] == 33 && buffer[i+1] == -7 && buffer[i+2] == 4 ){\n frameCount++;\n\n // Once we have at least one frame, stop the download\n if(frameCount>1){\n fileOutputStream.write(buffer, 0, i);\n fileOutputStream.close();\n\n imageCallback.sendProgressUpdate(imageCallback.mUrl, 100);\n imageCallback.sendCachedCallback(imageCallback.mUrl, true);\n\n urlConnection.disconnect();\n return;\n }\n }\n }\n }\n\n // Write the buffer to the file and update the total number of bytes\n // read so far (used for the callback)\n fileOutputStream.write(buffer, 0, byteRead);\n totalRead+=byteRead;\n\n // Update the callback with the current progress\n if(length>0){\n imageCallback.sendProgressUpdate(imageCallback.mUrl, \n (int) (((float)totalRead/(float)length)*100) );\n }\n }\n\n // Tidy up after the download\n if (fileOutputStream != null){\n fileOutputStream.close();\n }\n\n // Sent the callback that the image has been downloaded\n imageCallback.sendCachedCallback(imageCallback.mUrl, true);\n\n if (inputStream != null){\n inputStream.close();\n }\n\n // Disconnect the connection\n urlConnection.disconnect();\n } catch (final MalformedURLException e) {\n if (ImageManager.DEBUG){\n e.printStackTrace();\n }\n\n // If the file exists and an error occurred, delete the file\n if (file != null){\n file.delete();\n }\n\n } catch (final IOException e) {\n if (ImageManager.DEBUG){\n e.printStackTrace();\n }\n\n // If the file exists and an error occurred, delete the file\n if (file != null){\n file.delete();\n }\n\n }\n\n }", "public BufferedImage create(URL source, Dimension maxSize) {\n\t\treturn create(new URLImageSource(source), maxSize);\n\t}", "@Override\n\t\t\tpublic void putBitmap(String url, Bitmap bitmap) {\n\t\t\t\tcache.put(url, bitmap);\n\t\t\t}", "public static Bitmap getRemoteImage(String url, String cacheDir)\r\n \t\t\tthrows Exception {\r\n \t\tBufferedInputStream reader = null;\r\n \t\tBitmap bitMap = null;\r\n \t\tString fileName = url;\r\n \t\t// extract just the filename portion of the url\r\n \t\tif (fileName.contains(\"/\")\r\n \t\t\t\t&& fileName.lastIndexOf(\"/\") < fileName.length() + 1) {\r\n \t\t\tfileName = fileName.substring(fileName.lastIndexOf(\"/\") + 1);\r\n \t\t}\r\n \t\t// now check the cache\r\n \t\tif (cacheDir != null && cacheDir.trim().length()>0) {\r\n \t\t\tFile f = new File(cacheDir + \"/\" + fileName);\r\n \t\t\tif (f.exists()) {\r\n \t\t\t\t// if the file exists, return the local version\r\n \t\t\t\tbitMap = BitmapFactory.decodeFile(f.getAbsolutePath());\r\n \t\t\t\treturn bitMap;\r\n \t\t\t}\r\n \t\t}\r\n \t\t// if we get here, then we had a cache miss (or aren't using the cache)\r\n \t\ttry {\r\n \t\t\tif (cacheDir == null || cacheDir.trim().length()==0) {\r\n \t\t\t\t// if we aren't using the cache, download directly into the\r\n \t\t\t\t// bitmap\r\n \t\t\t\tDefaultHttpClient client = new DefaultHttpClient();\r\n \t\t\t\tHttpResponse response = client.execute(new HttpGet(url));\r\n \t\t\t\treader = new BufferedInputStream(response.getEntity()\r\n \t\t\t\t\t\t.getContent());\r\n \t\t\t\tbitMap = BitmapFactory.decodeStream(reader);\r\n \t\t\t} else {\r\n \t\t\t\t// if we are using the cache, download the file manually.\r\n \t\t\t\t// we need to do this instead of loading the bitmap and calling\r\n \t\t\t\t// compress since\r\n \t\t\t\t// that may not preserve the original file type so subsequent\r\n \t\t\t\t// call will encounter cache misses.\r\n \t\t\t\thttpDownload(url, cacheDir + \"/\" + fileName);\r\n \t\t\t\tbitMap = BitmapFactory.decodeFile(cacheDir + \"/\" + fileName);\r\n \t\t\t}\r\n \r\n \t\t} finally {\r\n \t\t\tif (reader != null) {\r\n \t\t\t\treader.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn bitMap;\r\n \r\n \t}", "public static Image imageFromURL(final URL url)\tthrows IOException,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNotImageException\r\n\t{\r\n\t\turl.openStream().close(); // throws IOException if url bad\r\n\t\tfinal Image image = TOOLKIT.getImage(url);\r\n\t\tensureImage(image);\r\n\t\treturn image;\r\n\t}", "private void addBitmapToCache(String url, Bitmap bitmap) {\n if (bitmap != null) {\n synchronized (sHardBitmapCache) {\n sHardBitmapCache.put(url, bitmap);\n }\n }\n }", "public static Drawable LoadImageFromWebOperations(String url, File cacheDir) {\n\t\ttry {\n\t\t\tDrawable d = null;\n\t\t\tString[] urlDir = url.split(\"/\");\n\t\t\tint sizeMax=600;\n\t\t\ttry {\n\t\t\t\t// File cacheDir = new File(ruta+File.separator+ urlDir[8]);\n\t\t\t\tif (!cacheDir.exists()) {\n\t\t\t\t\tcacheDir.mkdirs();\n\n\t\t\t\t}\n\t\t\t\tFile cacheDirName = new File(cacheDir + File.separator\n\t\t\t\t\t\t+ urlDir[urlDir.length - 1]);\n\n\t\t\t\tif (!cacheDirName.exists() || cacheDirName.length() == 0) {\n\t\t\t\t\tcacheDirName.createNewFile();\n\t\t\t\t\tInputStream is = (InputStream) new URL(url).getContent();\n\t\t\t\t\tBitmap bit = BitmapFactory.decodeStream(is);\n\t\t\t\t\t//Alto\n\t\t\t\t\tBitmap bit2=null;\n\t\t\t\t\tFileOutputStream fo = new FileOutputStream(cacheDirName);\n\t\t\t\t\t// Drawable d = Drawable.createFromStream(is, \"src name\");\n\t\t\t\t\tif(bit.getHeight()>sizeMax){\n\t\t\t\t\t\tbit2=Bitmap.createScaledBitmap(bit,(sizeMax*bit.getWidth()/bit.getHeight()), sizeMax, false);\n\t\t\t\t\t\tbit2.compress(CompressFormat.JPEG, 95, fo);\n\t\t\t\t\t}else if(bit.getWidth()>sizeMax){\n\t\t\t\t\t\tbit2=Bitmap.createScaledBitmap(bit,sizeMax, (sizeMax* bit.getHeight()/bit.getWidth()), false);\n\t\t\t\t\t\tbit2.compress(CompressFormat.JPEG, 95, fo);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbit.compress(CompressFormat.JPEG, 95, fo);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Url: \"+cacheDir + File.separator\n\t\t\t\t\t\t\t+ urlDir[urlDir.length - 1]);\n\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Ancho y alto: \"+(bit.getWidth()+\" \"+bit.getHeight()));\n\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Size1: \"+(bit.getRowBytes()*bit.getHeight()));\n\t\t\t\t\tbit.recycle();\n\t\t\t\t\tif(bit2!=null){\n\t\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Size2: \"+(bit2.getRowBytes()*bit2.getHeight()));\n\t\t\t\t\t\tbit2.recycle();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.gc();\n\t\t\t\tRuntime.getRuntime().gc();\n\t\t\t\td = Drawable.createFromPath(cacheDirName.getPath());\n\t\t\t} catch (OutOfMemoryError e) {\n\t\t\t\tSystem.gc();\n\t\t\t\tRuntime.getRuntime().gc();\n\t\t\t}\n\t\t\t//\n\n\t\t\treturn d;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public void getImageBitMap(final String url, final GetImageBitMapListener listener) {\n String localFileName = getLocalImageFileName(url);\n final Bitmap image = loadImageFromFile(localFileName);\n if (image == null) { //if image not found - try downloading it from parse\n firebaseModel.getImageBitMap(url, new GetImageBitMapListener() {\n @Override\n public void onComplete(Bitmap bitMap) {\n //2. save the image localy\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n\n saveImageToFile(bitMap,localFileName);\n //3. return the image using the listener\n listener.onComplete(bitMap);\n }\n\n @Override\n public void fail() {\n listener.fail();\n }\n });\n } else {\n //Log.d(\"TAG\",\"OK reading cache image: \" + localFileName);\n listener.onComplete(image);\n }}", "public void saveImageFromURL(final CacheLoaderCallBack callBack) {\n Executors.newFixedThreadPool(1).execute(new Runnable() {\n @Override\n public void run() {\n if (context != null) {\n OutputStream os = null;\n InputStream is = null;\n final File file = new File(context.getExternalFilesDir(null), pictureName);\n\n try {\n URL url = new URL(loadUrl);\n httpConnection = (HttpURLConnection) url.openConnection();\n httpConnection.setDoInput(true);\n httpConnection.connect();\n is = httpConnection.getInputStream();\n Bitmap bit = BitmapFactory.decodeStream(is);\n os = new FileOutputStream(file);\n bit.compress(Bitmap.CompressFormat.JPEG, 85, os);\n is.close();\n os.close();\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n callBack.onSuccess();\n }\n };\n new Handler(Looper.getMainLooper()).post(runnable);\n httpConnection.disconnect();\n } catch (final IOException e) {\n Log.w(\"ExternalStorage\", \"Error writing \" + file, e);\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n callBack.onError(e.getMessage());\n }\n };\n new Handler(Looper.getMainLooper()).post(runnable);\n } finally {\n if (httpConnection != null) {\n httpConnection.disconnect();\n try {\n os.flush();\n os.close();\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n });\n }", "synchronized static void saveFile(String url){\n\t\tint count=1,size=0;\n\t\tbyte buffer[] = new byte[0x100];\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(new File(context.getCacheDir(), hashURL(url)));\n\t\t\tInputStream input = new BufferedInputStream(new URL(url).openStream());\n\t\t\tLog.i(\"FILEBANK\",\"Saveing \"+hashURL(url));\n\t\t\twhile(true){\n\t\t\t\tcount=input.read(buffer);\n\t\t\t\tif(count<0)break;\n\t\t\t\tfos.write(buffer,0,count);\n\t\t\t\tsize+=count;\n\t\t\t}\n\t\t\tinput.close();\n\t\t\tfos.close();\n\t\t\tLog.i(\"FILEBANK\",\"Saved \"+hashURL(url)+\" \"+size+\" bytes.\");\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tLog.e(\"FILEBANK\", \"Error saving file to cache\", ex);\n\t\t} catch (MalformedURLException ex) {\n\t\t\tLog.e(\"FILEBANK\",\"Invalid url: \"+url, ex);\n\t\t} catch (IOException ex) {\n\t\t\tLog.e(\"FILEBANK\",\"Error reading image\", ex);\n\t\t} catch (IndexOutOfBoundsException ex) {\n\t\t\tLog.e(\"FILEBANK\", \"(count, size) = \"+count+\",\"+size, ex);\n\t\t}\n\t}", "public Bitmap downloadImage(String theUrl){ \n\t \t//Log.i(\"ZZ\", \"AppDelegate downloadImage: \" + theUrl); \n\t \tdownloadInProgress = 1;\n\t InputStream in = null; \n\t \tBitmap bitmap = null;\n\t try{\n\t \tin = Obj_Downloader.OpenHttpConnection(theUrl);\n\t\t bitmap = BitmapFactory.decodeStream(in);\n\t }catch (Exception e) {\n \tLog.i(\"ZZ\", \"AppDelegate:downloadImage: ERROR: \" + e.getMessage()); \n\t //return null;\n\t }\n\t downloadInProgress = 0;\n\t return bitmap; \n\t }", "public static Bitmap downloadImageBitmap(String imageUrl) {\n Bitmap bitmap = null;\n try {\n InputStream in = new java.net.URL(imageUrl).openStream();\n bitmap = BitmapFactory.decodeStream(in);\n } catch (OutOfMemoryError e) {\n Log.e(TAG, \"Out of Memory Error in image bitmap download\");\n e.printStackTrace();\n } catch (Exception e) {\n Log.e(TAG, \"General exception in image bitmap download\");\n e.printStackTrace();\n }\n return bitmap;\n }", "public void getImage(final String url, final GetImageListener listener) {\n String localFileName = getLocalImageFileName(url);\n final Bitmap image = loadImageFromFile(localFileName);\n if (image == null) { //if image not found - try downloading it from parse\n firebaseModel.getImage(url, new GetImageListener() {\n @Override\n public void onComplete(String url) {\n //2. save the image localy\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n saveImageToFile(image,localFileName);\n //3. return the image using the listener\n listener.onComplete(image.toString());\n }\n\n @Override\n public void fail() {\n listener.fail();\n }\n });\n }else {\n //Log.d(\"TAG\",\"OK reading cache image: \" + localFileName);\n listener.onComplete(image.toString());\n }}", "private Bitmap getCechaFromUrl(String url) {\n\t\treturn mLruCache.get(url);\r\n\t}", "public Bitmap getBitmapFromURL(String src) {\n try {\n\n java.net.URL url = new java.net.URL(src);\n HttpURLConnection connection = (HttpURLConnection) url\n .openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n\n return myBitmap;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "@POST\n @Path(\"updateURL\")\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n @Produces(MediaType.APPLICATION_JSON)\n public Response updateScreenshotPng(\n @FormParam(\"username\") String groupName,\n @FormParam(\"assignmentName\") String projectName,\n @FormParam(\"url\") List<String> urls) {\n JSONObject ob = new JSONObject();\n int pgid = pgdb.getId(groupName, projectName);\n CommitRecord commitResult = pdb.getCommitResult(pgid);\n int lastCommitNum = commitResult.getNumber();\n int pcrid = commitResult.getId();\n try {\n for (String url : urls) {\n String screenShotUrl =\n \"/job/\"\n + groupName\n + \"_\"\n + projectName\n + \"/\"\n + lastCommitNum\n + \"/artifact/target/screenshot/\"\n + url\n + \".png\";\n db.addProjectScreenshotRecord(pcrid, screenShotUrl);\n }\n ob.put(\"groupName\", groupName);\n ob.put(\"projectName\", projectName);\n ob.put(\"commitNumber\", lastCommitNum);\n ob.put(\"url\", urls);\n return Response.ok().entity(ob.toString()).build();\n } catch (Exception e) {\n System.out.print(\"update URL to DB error: \");\n LOGGER.debug(ExceptionUtil.getErrorInfoFromException(e));\n LOGGER.error(e.getMessage());\n }\n return Response.serverError().status(Status.INTERNAL_SERVER_ERROR).build();\n }", "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 }", "private void loadImage(URL url) {\n //do resource intensive operation to load image\n }", "private Bitmap getBitmap(String url) {\n File file = diskCache.getData(url);\n Bitmap bitmap = decode(file);\n if (bitmap == null) {\n // If no then load it\n bitmap = loadAndCacheBitmap(file, url);\n } else {\n Log.d(\"HIHO\", \"bitmap from memory\");\n }\n\n return bitmap;\n }", "public Bitmap loadImageCache( String url ){\n\t\tString path = createPath(url, context);\n\t\tLog.i( TAG, \"loadImageCache: \" + path );\n\n\t\tBitmap bitmap = null;\n\t\tFile file = new File( path );\n\n \tif( file.exists() ) {\n \t\tLog.i( TAG, \"loadImageCache - Arquivo existe\" );\n\n\t\t\ttry {\n\t\t\t\tFileInputStream infile = new FileInputStream(file);\n\t\t\t\tbitmap = BitmapFactory.decodeStream(infile);\n\t\t\t\tinfile.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tLog.i( TAG, \"ERROR: loadImageCache: \" + e);\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.i( TAG, \"ERROR: loadImageCache: \" + e);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n \treturn bitmap;\n\t}", "public Bitmap getBitmapFromURL(String src){\n try{\n URL url = new URL(src);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap bitmap = BitmapFactory.decodeStream(input);\n return bitmap;\n }catch(IOException e){\n e.printStackTrace();\n return null;\n }\n }", "public void requestImage(final ImageRequest request) {\n\n // If the request has no URL, abandon it\n if(request.mUrl==null){\n return;\n }\n\n // Create the image download runnable\n final ImageDownloadThread imageDownloadThread = new ImageDownloadThread(){\n\n public void run() {\n\n // Sleep the request for the specified time\n if(request!=null && request.mLoadDelay>0){\n try {\n Thread.sleep(request.mLoadDelay);\n } catch (InterruptedException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n File file = null;\n\n // If the URL is not a local reseource, grab the file\n if(!getUrl().startsWith(\"content://\")){\n\n // Grab a link to the file\n file = new File(getFullCacheFileName(mContext, getUrl()));\n\n // If the file doesn't exist, grab it from the network\n if (!file.exists()){\n cacheImage( file, request);\n } \n\n // Otherwise let the callback know the image is cached\n else if(request!=null){\n request.sendCachedCallback(getUrl(), true);\n }\n\n // Check if the file is a gif\n boolean isGif = isGif(getUrl());\n\n // If the file downloaded was a gif, tell all the callbacks\n if( isGif && request!=null ){\n request.sendGifCallback(getUrl());\n }\n }\n\n // Check if we should cache the image and the dimens\n boolean shouldCache = false;\n int maxWidth = MAX_WIDTH;\n int maxHeight = MAX_HEIGHT;\n if(request!=null){\n maxWidth = request.mMaxWidth;\n maxHeight = request.mMaxHeight;\n shouldCache = request.mCacheImage;\n }\n\n // If any of the callbacks request the image should be cached, cache it\n if(shouldCache && \n (request!=null&&request.mContext!=null)||request==null){\n\n // First check the image isn't actually in the cache\n Bitmap bitmap = get(getUrl());\n\n // If the bitmap isn't in the cache, try to grab it\n // Or the bitmap was in the cache, but is of no use\n if(bitmap == null){\n\n if(!getUrl().startsWith(\"content://\")){\n bitmap = decodeBitmap(file, maxWidth, maxHeight);\n }else{\n Uri uri = Uri.parse(getUrl());\n try{\n InputStream input = mContext.getContentResolver().openInputStream(uri);\n bitmap = BitmapFactory.decodeStream(input);\n input.close();\n }catch(FileNotFoundException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }catch(IOException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n // If we grabbed the image ok, add to the cache\n if(bitmap!=null){\n addEntry(getUrl(), bitmap);\n }\n }\n\n // Send the cached callback\n if(request!=null){\n request.sendCallback(getUrl(), bitmap);\n }\n }\n }\n };\n\n // Set the url of the request\n imageDownloadThread.setUrl(request.mUrl);\n\n // Set the creation time of the request\n imageDownloadThread.setCreated(request.mCreated);\n\n // Assign a priority to the request\n if(request.mImageListener==null){\n // If there is no image listener, assign it background priority\n imageDownloadThread.setPriority(BACKGROUND_PRIORITY);\n }else{\n // If there is an image listener, assign it UI priority\n imageDownloadThread.setPriority(UI_PRIORITY);\n }\n\n // If the new request is not a duplicate of an entry of the active and \n // task queues, add the request to the task queue\n if(!mTaskQueue.contains(imageDownloadThread) && \n !mActiveTasks.contains(imageDownloadThread)){\n mThreadPool.execute(imageDownloadThread);\n }\n\n // If the request is a duplicate, add it to the blocked tasks queue\n else{\n mBlockedTasks.add(imageDownloadThread);\n }\n }", "@Override\n protected Bitmap doInBackground(String... params) {\n imageUrl = params[0];\n ImageView thumbnail = imageViewReference.get();\n try {\n InputStream is = (InputStream) new URL(imageUrl).getContent();\n Bitmap bitmap = ImageCommons.decodeSampledBitmapFromInputStream(is, thumbnail.getWidth(), thumbnail.getHeight());\n addBitmapToMemoryCache(imageUrl, bitmap);\n return bitmap;\n } catch (IOException e) {\n e.printStackTrace();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n Log.d(\"myLog\", getClass().getSimpleName() + \" Erro ao fazer download de imagem\");\n return ImageCommons.decodeSampledBitmapFromResource(context.getResources(), R.drawable.ic_launcher, 70, 70);\n }", "public Bitmap getBitmapFromURL(String strURL) {\n try {\n URL url = new URL(strURL);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n return myBitmap;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "Bitmap ObtenerImagen(URL imageUrl){\n HttpURLConnection conn = null;\n Bitmap imagen=null;\n try {\n conn = (HttpURLConnection) imageUrl.openConnection();\n conn.connect();\n imagen = BitmapFactory.decodeStream(conn.getInputStream());\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n return imagen;\n }", "@Override\n protected Bitmap doInBackground(String... urls) {\n Bitmap bitmap = null;\n Bitmap thumbnail = null;\n try {\n URL url = new URL(urls[0]);\n // Read bitmap from url\n bitmap = BitmapFactory.decodeStream(url.openConnection().getInputStream());\n // Resize bitmap to thumbnail\n thumbnail = Bitmap.createScaledBitmap(bitmap, 149, 101, true);\n } catch(IOException e) {\n System.out.println(e);\n } finally {\n if (thumbnail != null) {\n // Save bitmap and thumbnail into cache\n ImageCache.addBitmapToMemoryCache(urls[0], bitmap);\n ImageCache.addthumbnailToMemoryCache(urls[0], thumbnail);\n }\n if (this.isThumbnail) {\n return thumbnail;\n } else {\n return bitmap;\n }\n }\n }", "private Bitmap getBitmap(String url){\n Bitmap result = null;\n try {\n InputStream in = new java.net.URL(url).openStream();\n final BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n // Calculate inSampleSize\n options.inSampleSize = 4;\n options.inJustDecodeBounds = false;\n result = BitmapFactory.decodeStream(in, null, options);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }", "protected Bitmap doInBackground(String... params) {\n\t\turl = params[0];\n\n\t\t// check for cached copy\n\t\tif (cache.containsKey(url)) {\n\t\t\treturn cache.get(url);\n\t\t}\n\n\t\t// params comes from the execute() call: params[0] is the url.\n\t\treturn WebInterface.downloadBitmap(url);\n\t}", "public static Bitmap getBitmapFromUrl(String imageUrl) {\n\n try {\n\n URL url = new URL(imageUrl);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n return BitmapFactory.decodeStream(input);\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onComplete(Bitmap bitMap) {\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n\n saveImageToFile(bitMap,localFileName);\n //3. return the image using the listener\n listener.onComplete(bitMap);\n }", "public static BufferedImage loadBufferedImage( URL theUrl )\n\t\tthrows IOException\n\t{\n\t\tBufferedImage im = null;\n\t\ttry\n\t\t{\n\t\t\tim = ImageIO.read( theUrl );\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new IOException( \"Couldn't Load \" + theUrl, e );\n\t\t}\n\t\tcatch (Error e)\n\t\t{\n\t\t\tthrow new IOException( e );\n\t\t}\n\n\t\treturn im;\n\n\t}", "public interface ImageCache {\r\n\tpublic Bitmap getBitmap(String url);\r\n\r\n\tpublic void putBitmap(String url, Bitmap bitmap);\r\n\r\n\tpublic void clear();\r\n}", "public static Bitmap getBitmapFromUrl(String urlString, Context context, boolean shouldSave) {\n try {\n //Set up http connection\n URL url = new URL(urlString);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n\n //Retrieve and decode the input stream\n InputStream input = connection.getInputStream();\n Bitmap mBitmap = BitmapFactory.decodeStream(input);\n\n FileOutputStream fos;\n\n if(shouldSave) {\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n mBitmap.compress(Bitmap.CompressFormat.PNG, 100, bytes);\n urlString = urlString.replace(File.separator, \"\");\n\n try {\n fos = context.openFileOutput(urlString, Context.MODE_PRIVATE);\n\n fos.write(bytes.toByteArray());\n fos.close();\n\n } catch (FileNotFoundException e) {\n Log.d(TAG, \"Unable to find required output file\");\n e.printStackTrace();\n\n } catch (IOException e) {\n Log.d(TAG, \"Failed to write to output stream\");\n e.printStackTrace();\n }\n }\n return mBitmap;\n\n } catch (MalformedURLException e) {\n Log.d(TAG, \"Malformed URL Exception thrown, provided URL for image download is invalid:\" +\n urlString);\n e.printStackTrace();\n } catch (IOException i) {\n Log.d(TAG, \"Unable to open URL connection when downloading image\");\n i.printStackTrace();\n }\n\n return null;\n }", "public interface ImageCache {\n public Bitmap get(String url);\n public void put(String url,Bitmap bitmap);\n}", "Image getScaledWebImage(Path imageFilePath, double percent);", "public static Bitmap GetURLBitmap(URL url)\n\t{\n\t\tInputStream isCover = null;\n\t\ttry{\n\t\t\t//改成呼叫一個判斷方法\n\t\t\treleaseMemGc();\n\n\t\t\tURLConnection conn = url.openConnection();\n\t\t\tconn.connect();\n\t\t\tisCover = conn.getInputStream();\n\t\t\t//mantis.0010232: 專輯封面未能正常顯示,這邊看起來會發生問題是因為 streamClosed ,但是還有地方再存取或是 open 這塊 Stream,\n\t\t\t//所以在 decodeStream 那塊 stream 的時候就出現問題,因此想說在這邊先檢查該 stream 是不是已經被處理掉了如果是的話就不要 decodeStream\n\t\t\tif(isCover!=null){\n\t\t\t\treturn BitmapFactory.decodeStream(isCover);\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}catch(IOException ex){\n\t\t\treturn null;\n\t\t}catch(Exception e){\n\t\t\treturn null;\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\tif(isCover!=null){\n\t\t\t\t\tisCover.close();\n\t\t\t\t\tisCover =null;\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\t}", "private static Bitmap downloadImageTask(String src) {\n try {\n URL url = new URL(src);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n Log.i(LOG_TAG, \"won: \" + myBitmap);\n return myBitmap;\n } catch (IOException e) {\n Log.e(LOG_TAG, \"error while making book cover\", e);\n e.printStackTrace();\n return null;\n }\n }", "public Bitmap getBitmapFromURL(String src) {\n try {\n Log.i(TAG,\"GetbitmapfromURL src \" + src);\n URL url = new URL(src);\n URLConnection connection = (URLConnection) url.openConnection();\n connection.connect();\n Log.i(TAG,\"bitmap returned\");\n return BitmapFactory.decodeStream(new BufferedInputStream(connection.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(TAG,\"exception thrown getting bitmap url\");\n return null;\n }\n }", "public void saveScreenshot() {\n if (ensureSDCardAccess()) {\n Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n doDraw(1, canvas);\n File file = new File(mScreenshotPath + \"/\" + System.currentTimeMillis() + \".jpg\");\n FileOutputStream fos;\n try {\n fos = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);\n fos.close();\n } catch (FileNotFoundException e) {\n Log.e(\"Panel\", \"FileNotFoundException\", e);\n } catch (IOException e) {\n Log.e(\"Panel\", \"IOEception\", e);\n }\n }\n }", "public Bitmap getBitmapfromUrl(String imageUrl) {\r\n try {\r\n URL url = new URL(imageUrl);\r\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\r\n connection.setDoInput(true);\r\n connection.connect();\r\n InputStream input = connection.getInputStream();\r\n Bitmap bitmap = BitmapFactory.decodeStream(input);\r\n return bitmap;\r\n } catch (Exception e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }", "public void saveImage(){\n new Thread() {\n public void run() {\n String image_url = stuffRoomInfo.getStuffLink();\n Log.i(\"OGT\", \"image_url:in showImage \" + image_url);\n getOGTag(image_url);\n // Display a png image from the specified file\n ImageUrlSendServer();\n }\n }.start();\n }", "private Bitmap loadImageFromUrl(final String url) {\n try {\n // Addresses bug in SDK :\n // http://groups.google.com/group/android-developers/browse_thread/thread/4ed17d7e48899b26/\n BufferedInputStream bis = new BufferedInputStream(new URL(url).openStream(), BUFFER_IO_SIZE);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n BufferedOutputStream bos = new BufferedOutputStream(baos, BUFFER_IO_SIZE);\n copy(bis, bos);\n bos.flush();\n return BitmapFactory.decodeByteArray(baos.toByteArray(), 0, baos.size());\n } \n catch (IOException e) {\n // handle it properly\n \treturn null;\n }\n }", "void setImageFromURL(String imageURL);", "@Override\n \t\tprotected Bitmap doInBackground(String... urls) {\n \t\t\tString urldisplay = urls[0];\n \t\t\tBitmap mIcon11 = null;\n \t\t\ttry {\n \t\t\t\tInputStream in = new java.net.URL(urldisplay).openStream();\n \t\t\t\tmIcon11 = BitmapFactory.decodeStream(in);\n \t\t\t} catch (Exception e) {\n \t\t\t\tLog.e(\"Error\", e.getMessage());\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t\tif (mIcon11 != null) addBitmapToMemoryCache(urls[0], mIcon11);\n \t\t\treturn mIcon11;\n \t\t}", "private void downloadingImage(Intent intent) {\n Bitmap bitmap = null;\n InputStream in = null;\n int responseCode = -1;\n\n String urlPath = intent.getStringExtra(URL);\n\n String fileName = intent.getStringExtra(FILENAME);\n\n /*7.2 mb on web and 15.85 mb on mobile image file*/\n String s = \"https://upload.wikimedia.org/wikipedia/commons/0/05/Sambro_Island_Lighthouse_%282%29.jpg\";\n\n try {\n\n URL url = new URL(urlPath);//params[0]\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.connect();\n responseCode = httpURLConnection.getResponseCode();\n if (responseCode == HttpURLConnection.HTTP_OK) {\n in = httpURLConnection.getInputStream();\n bitmap = BitmapFactory.decodeStream(in);\n in.close();\n\n if (bitmap != null) {\n // successfully finished\n result = Activity.RESULT_OK;\n saveImage(bitmap, fileName);\n } else {\n publishResults(fileName, result);\n }\n }\n\n } catch (MalformedURLException e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n e.printStackTrace();\n } catch (IOException e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n e.printStackTrace();\n } catch (Exception e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n Log.v(TAG, \"Exception : \" + e.getMessage());\n }\n }", "private Bitmap downloadBitmap(final String id, final String url) {\n\n\t\t\ttry {\n\n\t\t\t\t\n\t\t\t\t//Log.e(\"123\", \"inside download -------\"+url+\"------id------\"+id);\n\t\t\t\tURL aURL = new URL(url);\n\t\t\t\tURLConnection conn = aURL.openConnection();\n\t\t\t\tconn.connect();\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(\n\t\t\t\t\t\tconn.getInputStream(), 8 * 1024);\n\t\t\t\tBitmap bm = BitmapFactory.decodeStream(bis);\n\n\t\t\t\tif (bm == null) {\n\n\t\t\t\t\tDefaultHttpClient httpclient = new DefaultHttpClient();\n\t\t\t\t\tHttpGet httppost = new HttpGet(url);\n\t\t\t\t\tHttpResponse response;\n\t\t\t\t\tresponse = httpclient.execute(httppost);\n\t\t\t\t\tHttpEntity ht = response.getEntity();\n\t\t\t\t\tBufferedHttpEntity buf = new BufferedHttpEntity(ht);\n\t\t\t\t\tbm = BitmapFactory.decodeStream(buf.getContent());\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresponse = null;\n\t\t\t\t\t\tht = null;\n\t\t\t\t\t\tbuf.consumeContent();\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t//Logs.show(e);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tif (imgView != null\n\t\t\t\t\t\t\t&& imgView.getTag() != null\n\t\t\t\t\t\t\t&& imgView.getTag().toString()\n\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\"fullImage\")) {\n\t\t\t\t\t\tif (bm != null) {\n\t\t\t\t\t\t\tint imgViewWidth = imgView.getWidth();\n\t\t\t\t\t\t\tint bitmapHeight = bm.getHeight();\n\t\t\t\t\t\t\tint bitmapWidth = bm.getWidth();\n\n\t\t\t\t\t\t\tif (imgViewWidth > 0 && bitmapWidth > 0\n\t\t\t\t\t\t\t\t\t&& bitmapWidth < imgViewWidth\n\t\t\t\t\t\t\t\t\t&& bitmapHeight > 0) {\n\t\t\t\t\t\t\t\tbitmapHeight = (int) (((float) imgViewWidth / bitmapWidth) * bitmapHeight);\n\t\t\t\t\t\t\t\tbm = Bitmap.createScaledBitmap(bm,\n\t\t\t\t\t\t\t\t\t\timgViewWidth, bitmapHeight, false);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t//Logs.show(e);\n\t\t\t\t}\n\n\t\t\t\tif (isRoundCornerReq) {\n\t\t\t\t\tImageHelper mImageHelper = new ImageHelper();\n\t\t\t\t\tbm = mImageHelper.getRoundedCornerImage(bm);\n\t\t\t\t}\n\t\t\t\tif (bm != null) {\n\t\t\t\t\taddBitmapToSoftCache(id, bm);\n\t\t\t\t}\n\t\t\t\t//Log.e(\"123\", \"aURL----\"+aURL+\"----bm------\"+bm);\n\t\t\t\tbis.close();\n\t\t\t\tbis = null;\n\t\t\t\tconn = null;\n\t\t\t\taURL = null;\n\t\t\t\treturn bm;\n\t\t\t} catch (IOException e) {\n\n\t\t\t\t\n\n\t\t\t\t//Logs.show(e);\n\n\t\t\t} catch (Exception e) {\n\n\t\t\t\t\n\n\t\t\t\t//Logs.show(e);\n\n\t\t\t} catch (OutOfMemoryError e) {\n\t\t\t\t//Logs.show(e);\n\t\t\t}\n\n\t\t\treturn null;\n\n\t\t}", "private Image establishConnection(String url) throws IOException {\n\n String imgUrl = url;\n URLConnection connection = new URL(imgUrl).openConnection();\n connection.addRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0\");\n Image image = new Image(connection.getInputStream());\n return image;\n }", "private void takeScreenshot(Activity activity) {\n uiDevice.waitForIdle(2000);\n\n // Create a file and save it\n Date start = new Date();\n final File screenFile = new File(Environment.getExternalStorageDirectory(), \"screen_\" + start.toString() + \"_\" + rand.nextInt());\n uiDevice.takeScreenshot(screenFile, 0.5f, 50);\n\n // Finally, attempt to send that file over websockets\n socket.sendScreenshot(screenFile, activity, start);\n\n }", "public ImageIcon takeSnapShot(Component panel){\r\n // BufferedImage bufImage = new BufferedImage(panel.getSize().width, panel.getSize().height,BufferedImage.TYPE_INT_RGB);\r\n BufferedImage bufImage = new BufferedImage(2250, 2250,BufferedImage.TYPE_INT_RGB);\r\n panel.paint(bufImage.createGraphics());\r\n ImageIcon imageIcon = new ImageIcon(bufImage);\r\n String snapshotLocation = FileSystemView.getFileSystemView().getDefaultDirectory().toString() + \"\\\\spaceGUI\\\\yourImage.jpeg\";\r\n File fc = new File(snapshotLocation.substring(0,snapshotLocation.indexOf(\"yourImage.jpeg\")));\r\n if(!fc.exists()) {\r\n fc.mkdir();\r\n }\r\n File imageFile = new File(snapshotLocation);\r\n try{\r\n imageFile.createNewFile();\r\n ImageIO.write(bufImage, \"jpeg\", imageFile);\r\n System.out.println(\"Created picture\");\r\n \r\n }catch(Exception ex){\r\n System.out.println(\"Did not create picture\");\r\n } \r\n return imageIcon;\r\n }", "public static Asset createAsset(URL url) throws IOException {\n \t\t// Create a temporary file from the downloaded URL\n \t\tFile newFile = File.createTempFile(\"remote\", null, null);\n \t\ttry {\n \t\t\tFileUtils.copyURLToFile(url, newFile);\n\t\t\tif (newFile.exists() && newFile.length() < 20)\n \t\t\t\treturn null;\n \t\t\tAsset temp = new Asset(FileUtil.getNameWithoutExtension(url), FileUtils.readFileToByteArray(newFile));\n \t\t\treturn temp;\n \t\t} finally {\n \t\t\tnewFile.delete();\n \t\t}\n \t}", "public Image getImage(URL paramURL) {\n/* 276 */ return getAppletContext().getImage(paramURL);\n/* */ }", "private Bitmap loadImageFromNetwork(String url) {\n try {\n InputStream is = new DefaultHttpClient().execute(new HttpGet(url))\n .getEntity().getContent();\n return BitmapFactory.decodeStream(is);\n } catch (Exception e) {\n return null;\n }\n }", "@GET\n @Path(\"getScreenshotURL\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getScreenshotPng(\n @QueryParam(\"groupName\") String groupName,\n @QueryParam(\"projectName\") String projectName,\n @QueryParam(\"commitNumber\") int number) {\n JSONObject ob = new JSONObject();\n int pgid = pgdb.getId(groupName, projectName);\n int pcrid = pdb.getCommitRecordId(pgid, number);\n try {\n List<String> urls = db.getScreenshotUrl(pcrid);\n for (String url : urls) {\n urls.set(urls.indexOf(url), jenkinsData.getJenkinsHostUrl() + url);\n }\n ob.put(\"urls\", urls);\n return Response.ok().entity(ob.toString()).build();\n } catch (Exception e) {\n LOGGER.debug(ExceptionUtil.getErrorInfoFromException(e));\n LOGGER.error(e.getMessage());\n }\n return Response.serverError().status(Status.INTERNAL_SERVER_ERROR).build();\n }", "static public ImageDownloadTask startDownload(String url) throws MalformedURLException {\n\n // Gets a task from the pool or if none available create a new task\n ImageDownloadTask downloadTask = sInstance.imageDownloadTaskWorkQueue.poll();\n if (null == downloadTask) {\n downloadTask = new ImageDownloadTask();\n }\n\n downloadTask.setStringUrl(url);\n\n // Set the task to run in the next available thread queue.\n sInstance.mDownloadThreadPool.execute(downloadTask.getDownloadRunnable());\n\n return downloadTask;\n }", "private Bitmap takeShareableScreenshot() {\n // https://stackoverflow.com/questions/2661536/how-to-programmatically-take-a-screenshot-in-android\n// cameraActionLayout.setVisibility(View.GONE);\n// resultLayout.setVisibility(View.GONE);\n try {\n // create bitmap screen capture\n View v1 = getWindow().getDecorView().getRootView();\n v1.setDrawingCacheEnabled(true);\n return Bitmap.createBitmap(v1.getDrawingCache());\n } catch (Throwable e) {\n // Several error may come out with file handling or OOM\n e.printStackTrace();\n makeToast(e.toString());\n Timber.e(\"Error capturing screenshot: \" + e.toString());\n return null;\n }\n// finally {\n// cameraActionLayout.setVisibility(View.VISIBLE);\n// resultLayout.setVisibility(View.VISIBLE);\n// }\n }", "private Image getImage(String url) {\r\n\t\ttry {\r\n\t\t\treturn ImageIO.read(new URL(url));\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "static Image forUrl(String imageType, String url) {\n\t\treturn () -> {\n\t\t\ttry {\n\t\t\t\tURLConnection urlConnection = new URL(url).openConnection();\n\t\t\t\turlConnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36\");\n\t\t\t\tInputStream stream = urlConnection.getInputStream();\n\t\t\t\treturn forStream(imageType, stream).getData();\n\t\t\t} catch (IOException e) {\n\t\t\t\tDiscord4J.LOGGER.error(LogMarkers.UTIL, \"Discord4J Internal Exception\", e);\n\t\t\t}\n\t\t\treturn defaultAvatar().getData();\n\t\t};\n\t}", "private Bitmap takeScreenshot2() {\n Bitmap bitmap = null;\n try {\n // image naming and path to include sd card appending name you choose for file\n String mPath = Environment.getExternalStorageDirectory().toString() + \"/Activity\" + \".jpg\";\n\n // create bitmap screen capture\n View v1 = activity.getWindow().getDecorView().getRootView();\n v1.setDrawingCacheEnabled(true);\n bitmap = Bitmap.createBitmap(v1.getDrawingCache());\n v1.setDrawingCacheEnabled(false);\n\n File imageFile = new File(mPath);\n\n FileOutputStream outputStream = new FileOutputStream(imageFile);\n int quality = 100;\n bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outputStream);\n outputStream.flush();\n outputStream.close();\n return bitmap;\n\n } catch (Throwable e) {\n // Several error may come out with file handling or OOM\n e.printStackTrace();\n }\n return bitmap;\n }", "@Override\n public void onComplete(String url) {\n String localName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"cach image: \" + localName);\n saveImageToFile(imageBitmap,localName); // synchronously save image locally\n //listener.oncomplete(url);\n listener.onComplete(url);\n }", "private void addImg(File url) {\n if (url != null) {\n //On charge l'image en memoire dans la variable img\n panImg.chargerIMG(url);\n lstImg.addImg(panImg.getImg(), url);\n }\n }", "private static Bitmap readImageUrl(String urlString) {\n\n // Create an empty bitmap image\n Bitmap image = null;\n\n try {\n // Create and open an inputStream on the urlString\n InputStream in = new java.net.URL(urlString).openStream();\n\n // Decode the inputStream and set that to the bitmap image\n image = BitmapFactory.decodeStream(in);\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error reading image url: \" + e);\n }\n\n // Return the image\n return image;\n }", "@Async\n public void startRecording(String imageUrl) {\n recording = true;\n URL url = null;\n try {\n url = new URL(imageUrl);\n String fileName = url.getFile();\n String destName = \"./\" + fileName.substring(fileName.lastIndexOf(\"/\"));\n System.out.println(destName);\n\n InputStream is = url.openStream();\n OutputStream os = new FileOutputStream(String\n .format(\"%s/%s-capture.mjpg\", videoOutputDirectory, getTimestamp()));\n\n byte[] b = new byte[2048];\n int length;\n\n while (recording && (length = is.read(b)) != -1) {\n os.write(b, 0, length);\n }\n\n is.close();\n os.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "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 Bitmap downloadFile(String fileUrl) {\n\t\tif (null == fileUrl)\n\t\t\treturn null;\n\n\t\tURL myFileUrl = null;\n\n\t\ttry {\n\t\t\tmyFileUrl = new URL(fileUrl);\n\n\t\t\tHttpURLConnection conn = (HttpURLConnection) myFileUrl\n\t\t\t\t\t.openConnection();\n\t\t\tconn.setDoInput(true);\n\t\t\tconn.connect();\n\n\t\t\treturn BitmapFactory.decodeStream(conn.getInputStream());\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "private Image getImage(String url) {\n\t\ttry {\n\t\t\treturn ImageIO.read(new URL(url));\n\t\t} catch(IOException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "private Bitmap loadImageFromNetwork(String url) {\n Bitmap bm = null;\n try {\n URL urln = new URL(url);\n Log.i(\"load\", url);\n Log.i(\"load\", \"loading Image...\");\n bm = BitmapFactory.decodeStream(urln.openConnection().getInputStream());\n Log.i(\"load\", \"done\");\n } catch (IOException e) {\n Log.e(\"HUE\",\"Error downloading the image from server : \" + e.getMessage().toString());\n } \n return bm;\n }", "public Image getImage(URL paramURL, String paramString) {\n/* */ try {\n/* 298 */ return getImage(new URL(paramURL, paramString));\n/* 299 */ } catch (MalformedURLException malformedURLException) {\n/* 300 */ return null;\n/* */ } \n/* */ }", "private Bitmap downloadBitmap(String path) {\n\t\tURL url = null;\n\t\tHttpURLConnection connection = null;\n\t\tInputStream is = null;\n\t\tFileOutputStream outputStream = null;\n\t\tBitmap bitmap = null;\n\t\ttry {\n\t\t\turl = new URL(path);\n\t\t\tconnection = (HttpURLConnection) url.openConnection();\n\t\t\tconnection.setConnectTimeout(5000);\n\t\t\tconnection.setRequestMethod(\"GET\");\n\t\t\tif (connection.getResponseCode() == 200) {\n\t\t\t\tis = connection.getInputStream();\n\t\t\t\tmax_length = connection.getContentLength();\n\t\t\t\tprogressBar.setMax(max_length);\n\t\t\t\tFile file = new File(IMAGE_PATH);\n\t\t\t\toutputStream = new FileOutputStream(file);\n\t\t\t\tbyte[] buffer = new byte[64];\n\t\t\t\tint len = 0;\n\t\t\t\twhile ((len = is.read(buffer)) != -1) {\n\t\t\t\t\toutputStream.write(buffer, 0, len);\n\t\t\t\t\tpublishProgress(len);\n\t\t\t\t}\n\t\t\t\tbitmap = BitmapFactory.decodeFile(IMAGE_PATH);\n\t\t\t}\n\t\t} catch (MalformedURLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (connection != null) {\n\t\t\t\tconnection.disconnect();\n\t\t\t}\n\t\t\tif (outputStream != null) {\n\t\t\t\ttry {\n\t\t\t\t\toutputStream.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (is != null) {\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn bitmap;\n\t}", "public Texture fetchTexture(URL url)\n throws IOException\n {\n String file_path = url.toExternalForm();\n \n Texture texture = (Texture)textureMap.get(file_path);\n \n if(texture == null)\n {\n ImageComponent img = (ImageComponent)componentMap.get(file_path);\n \n if(img == null)\n {\n img = load2DImage(file_path);\n componentMap.put(file_path, img);\n }\n \n int format = getTextureFormat(img);\n \n if(img instanceof ImageComponent2D)\n {\n texture = new Texture2D(Texture.BASE_LEVEL,\n format,\n img.getWidth(),\n img.getHeight());\n }\n else\n {\n texture = new Texture3D(Texture.BASE_LEVEL,\n format,\n img.getWidth(),\n img.getHeight(),\n ((ImageComponent3D)img).getDepth());\n }\n \n texture.setImage(0, img);\n \n textureMap.put(file_path, texture);\n }\n \n return texture;\n }", "private void loadImage(final String url) {\n\t\tnew AsyncTask<Void, Void, Drawable>() {\n\t\t\t@Override\n\t\t\tprotected Drawable doInBackground(Void... none) {\n\t\t\t\treturn NetHelper.getDrawableFromUrl(url);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onPostExecute(Drawable drawable) {\n\t\t\t\tImageView thumbnail = (ImageView) findViewById(R.id.details_image_view_thumbnail);\n\t\t\t\tthumbnail.setImageDrawable(drawable);\n\t\t\t}\n\t\t}.execute();\n\t}", "public void loadImage(String url, ImageView imageView) {\n Bitmap bitmap = null;\n if (mImageCache != null) {\n bitmap = mImageCache.get(url);\n }\n if (bitmap != null) {\n imageView.setImageBitmap(bitmap);\n return;\n } else {\n if (LoadImageUrlTask.cancelPotentialDownload(url, imageView)) {\n LoadImageUrlTask task = new LoadImageUrlTask(imageView, mImageCache);\n final DownLoadedDrawable downLoadedDrawable = new DownLoadedDrawable(mContext.getResources(),\n ImageUtils.decodeSampledBitmapFromResource(mContext.getResources(), loadingBgResId), task);\n imageView.setImageDrawable(downLoadedDrawable);\n task.execute(url);\n }\n }\n }", "private void updateMasterPic(String url) {\n pDialog.show();\n\n JSONObject reqOtpObject = new JSONObject();\n try {\n reqOtpObject.put(\"ent_profile\", url);\n myProfilePresenter.setProfilePic(token, reqOtpObject);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private static Bitmap getBitmap(String imageURL){\n\t\tBitmap bmp = null;\n\n\t\ttry {\n\t\t\tbmp = BitmapFactory.decodeStream((InputStream) new URL(imageURL).getContent());\n\t\t} catch (MalformedURLException e) {\n\t\t} catch (IOException e) {\n\t\t}\n\n\t\treturn bmp;\n\t}", "private static Bitmap readBitmapFromNetwork(URL url)\n {\n InputStream is = null;\n BufferedInputStream bis = null;\n Bitmap bmp = null;\n try\n {\n URLConnection conn = url.openConnection();\n conn.connect();\n is = conn.getInputStream();\n bis = new BufferedInputStream(is);\n bmp = BitmapFactory.decodeStream(bis);\n }\n catch (MalformedURLException e)\n {\n Log.e(TAG, \"Bad ad URL\", e);\n }\n catch (IOException e)\n {\n Log.e(TAG, \"Could not get remote image\", e);\n }\n finally\n {\n try\n {\n if (is != null) is.close();\n if (bis != null) bis.close();\n }\n catch (IOException e)\n {\n Log.w(TAG, \"Error closing stream.\");\n }\n }\n return bmp;\n }", "public void Draw() {\n\t\timgIcon = new ImageIcon(imgUrl);\n\t}", "private void getPic(final CacheHolder cacheHolder, final CacheImage imageInfo) {\n String fileName = cacheHolder.getCode() + \"_\" + imageInfo.getURL().substring(imageInfo.getURL().lastIndexOf('/') + 1);\n fileName = Common.ClearForFileName(fileName).toLowerCase();\n final String target = MainForm.profile.dataDir + fileName;\n imageInfo.setFilename(fileName);\n try {\n File ftest = new File(target);\n if (ftest.exists()) {\n if (ftest.length() == 0) {\n ftest.delete();\n }\n else {\n cacheHolder.getDetails().getImages().add(imageInfo);\n }\n }\n else {\n if (downloadPics) {\n UrlFetcher.fetchDataFile(imageInfo.getURL(), target);\n ftest = new File(target);\n if (ftest.exists()) {\n if (ftest.length() > 0) {\n cacheHolder.getDetails().getImages().add(imageInfo);\n }\n else {\n ftest.delete();\n }\n }\n }\n }\n }\n catch (final IOException e) {\n String ErrMessage;\n String wp, n;\n if (cacheHolder != null && cacheHolder.getCode() != null)\n wp = cacheHolder.getCode();\n else\n wp = \"WP???\";\n if (cacheHolder != null && cacheHolder.getName() != null)\n n = cacheHolder.getName();\n else\n n = \"name???\";\n\n String m;\n try {\n m = e.getMessage();\n if (m == null)\n m = \"\";\n }\n catch (Exception e2) {\n m = \"\";\n }\n\n if (m.length() == 0)\n ErrMessage = \"Ignoring error: OCXMLImporter.getPic: IOExeption == null, while downloading picture: \" + fileName + \" from URL:\" + imageInfo.getURL();\n else {\n if (m.equalsIgnoreCase(\"could not connect\") || m.equalsIgnoreCase(\"unkown host\")) {\n // is there a better way to find out what happened?\n ErrMessage = MyLocale.getMsg(1618, \"Ignoring error in cache: \") + n + \" (\" + wp + \")\" + MyLocale.getMsg(1619, \": could not download image from URL: \") + imageInfo.getURL();\n }\n else {\n ErrMessage = MyLocale.getMsg(1618, \"Ignoring error in cache: \") + n + \" (\" + wp + \"): ignoring IOException: \" + m + \" while downloading picture:\" + fileName + \" from URL:\" + imageInfo.getURL();\n }\n }\n inf.addWarning(ErrMessage);\n Preferences.itself().log(ErrMessage, e, true);\n }\n }", "private Bitmap LoadImage(String URL, BitmapFactory.Options options) {\r\n Bitmap bitmap = null;\r\n InputStream in = null;\r\n try {\r\n in = OpenHttpConnection(URL);\r\n bitmap = BitmapFactory.decodeStream(in, null, options);\r\n in.close();\r\n } catch (IOException e1) {\r\n }\r\n return bitmap;\r\n }", "public Bitmap makeScreenshot() {\n renderer.setScreenshot();\n requestRender();\n return renderer.getLastScreenshot();\n }", "public void takescreenshot() throws IOException {\n\t\tString pwd = System.getProperty(\"user.dir\");\n\t\tFile sFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);\n\t\tFileUtils.copyFile(sFile, new File(pwd + \"\\\\Output_screen.jpg\"));\n\t}", "public synchronized void setPictureFromCache() {\n Runnable run = new Runnable() {\n @Override\n public void run() {\n File file = new File(context.getExternalFilesDir(null), pictureName);\n if (file != null) {\n Bitmap myBitmap = BitmapFactory.decodeFile(file.getAbsolutePath());\n if (imageView != null) {\n //imageView.setImageDrawable(new BitmapDrawable(null, myBitmap));\n new ResizeImage(imageView, file.getAbsolutePath()).setImageView();\n }\n }\n }\n };\n new Handler(context.getMainLooper()).post(run);\n }", "@Override\n protected void onPostExecute(Bitmap bitmap) {\n if (isCancelled()) {\n bitmap = null;\n }\n\n addBitmapToCache(url, bitmap);\n \n // write to cache file at the same time\n // Defect: Because transfer into bitmap, we can't save as GIF with transparent background\n // saveBitmapToCacheFile(url, bitmap);\n \n if (imageViewReference != null) {\n ImageView imageView = imageViewReference.get();\n BitmapDownloaderTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);\n // Change bitmap only if this process is still associated with it\n // Or if we don't use any bitmap to task association (NO_DOWNLOADED_DRAWABLE mode)\n if ((this == bitmapDownloaderTask) || (mode != Mode.CORRECT)) {\n imageView.setImageBitmap(bitmap);\n }\n }\n }", "public static Bitmap readBitmapFromNetwork(String url) {\n InputStream inputStream = null;\n BufferedInputStream bufferedInputStream = null;\n Bitmap bitmap = null;\n \n try {\n URLConnection conn = new URL(url).openConnection();\n conn.connect();\n inputStream = conn.getInputStream();\n bufferedInputStream = new BufferedInputStream(inputStream, 8192);\n bitmap = BitmapFactory.decodeStream(bufferedInputStream);\n } catch (OutOfMemoryError e) {\n Log.d(TAG, \"Ran out of memory.\", e);\n } catch (Throwable e) {\n if (!e.getClass().equals(UnknownHostException.class)) {\n Log.d(TAG, \"Could not get remote image : \" + e.getClass().getSimpleName(), e);\n }\n } finally {\n try {\n if (inputStream != null) {\n inputStream.close();\n }\n if (bufferedInputStream != null) {\n bufferedInputStream.close();\n }\n } catch (IOException e) {\n Log.d(TAG, \"Error closing stream.\", e);\n }\n }\n return bitmap;\n }", "public static synchronized void generate(URL shpURL) throws IOException {\r\n generate(new ShpFiles(shpURL));\r\n }", "public static boolean saveToCache(String urlString) {\n\n try {\n int fileExtIndex = urlString.lastIndexOf(\".\");\n String fileExtTmp = urlString.substring(fileExtIndex);\n String fileName = urlString.substring(0, fileExtIndex);\n fileName = fileName.substring(fileName.indexOf('.') + 1);\n fileName = fileName.replace(\"/\", \"__\");\n fileName = fileName.replace('.', '_');\n\n if (fileExtTmp.contains(\"/\")) {\n fileExtTmp = fileExtTmp.replace(\"/\", \"__\");\n fileExtTmp = fileExtTmp.replace('.', '_');\n fileExtTmp += \".html\";\n }\n\n fileName = fileName + fileExtTmp;\n boolean cacheActive = true;\n File cacheFile = null;\n BufferedWriter cacheWriter = null;\n\n try {\n cacheFile = new File(\"cached/\" + fileName);\n cacheWriter = new BufferedWriter(new FileWriter(cacheFile));\n } catch (IOException e) {\n System.out.println(\"Couldn't cache: \" + fileName);\n cacheActive = false;\n } catch (NullPointerException e) { }\n\n URL remoteURL = new URL(urlString);\n\n HttpURLConnection proxyServerConnection = (HttpURLConnection) remoteURL.openConnection();\n proxyServerConnection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\n proxyServerConnection.setRequestProperty(\"Content-Language\", \"en-US\");\n proxyServerConnection.setUseCaches(false);\n proxyServerConnection.setDoOutput(true);\n\n BufferedReader proxyReader = new BufferedReader(new InputStreamReader(proxyServerConnection.getInputStream()));\n\n String line = \"HTTP/1.0 200 Ok\\n\" + \"Proxy-agent: ProxyServer/1.0\\n\" + \"\\r\\n\";\n Request.clientWriter.write(line);\n\n while ((line = proxyReader.readLine()) != null) {\n Request.clientWriter.write(line);\n if (cacheActive) {\n assert cacheWriter != null;\n cacheWriter.write(line);\n }\n }\n Request.clientWriter.flush();\n proxyReader.close();\n\n if (cacheActive) {\n assert cacheWriter != null;\n cacheWriter.flush();\n Proxy.addCachedPage(urlString, cacheFile);\n }\n\n if (cacheWriter != null) { cacheWriter.close(); }\n\n if (Request.clientWriter != null) { Request.clientWriter.close(); }\n\n } catch (Exception e) {\n return false;\n }\n return true;\n }", "private void takeScreenshot()\n\t\t{\n\t\t\tint width = getWidth();\n\t\t\tint height = getHeight();\n\t\t\tint capacity = width * height;\n\t\t\tint[] dataArray = new int[capacity];\n\t\t\tIntBuffer dataBuffer = IntBuffer.allocate(capacity);\n\t\t\tGLES20.glReadPixels(0, 0, width, height, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, dataBuffer);\n\t\t\tint[] dataArrayTemp = dataBuffer.array();\n\n\t\t\t// Flip the mirrored image.\n\t\t\tfor (int y = 0; y < height; y++)\n\t\t\t{\n\t\t\t\tSystem.arraycopy(dataArrayTemp, y * width, dataArray, (height - y - 1) * width, width);\n\t\t\t}\n\n\t\t\tBitmap screenshot = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n\t\t\tscreenshot.copyPixelsFromBuffer(IntBuffer.wrap(dataArray));\n\t\t\tBitmap thumbnail = Bitmap.createScaledBitmap(screenshot, width / THUMBNAIL_SHRINKING_FACTOR, height / THUMBNAIL_SHRINKING_FACTOR, true);\n\t\t\tproject.getSheetAt(screenshotSheetIndex).saveThumbnail(thumbnail);\n\t\t\tBitmapDrawable thumbnailDrawable = new BitmapDrawable(getResources(), thumbnail);\n\t\t\tproject.getSheetAt(screenshotSheetIndex).setThumbnail(thumbnailDrawable);\n\n\t\t\t// Refresh the sheet panel if the user is not requesting an exit.\n\t\t\tif (activity.taskRequested != NotepadActivity.TASK_EXIT)\n\t\t\t{\n\t\t\t\tactivity.refreshSheetDrawerAfterGeneratingThumbnail();\n\t\t\t}\n\n\t\t\t// The project thumbnail should be twice the width and height of a sheet thumbnail.\n\t\t\tBitmap projectThumbnail = Bitmap.createScaledBitmap(\n\t\t\t\t\tscreenshot, (width * 2) / THUMBNAIL_SHRINKING_FACTOR, (height * 2) / THUMBNAIL_SHRINKING_FACTOR, true);\n\t\t\tproject.saveThumbnail(projectThumbnail);\n\n\t\t\tif (activity.taskRequested > 0)\n\t\t\t{\n\t\t\t\tpost(new Runnable()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tactivity.performTask();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}" ]
[ "0.6604563", "0.62885", "0.6153701", "0.6136073", "0.60917664", "0.60836077", "0.6063054", "0.60385096", "0.5978457", "0.59455156", "0.59246755", "0.58894837", "0.57465434", "0.5743744", "0.57412505", "0.57198095", "0.57046884", "0.56818527", "0.56270295", "0.56221664", "0.5604491", "0.5596465", "0.5595978", "0.55788064", "0.5572322", "0.55389756", "0.55289984", "0.55072725", "0.5486856", "0.5467971", "0.54672056", "0.5465491", "0.54634863", "0.5456542", "0.5445137", "0.5442922", "0.5442086", "0.54387677", "0.541436", "0.5411976", "0.5411672", "0.5406895", "0.5405474", "0.5390278", "0.5388868", "0.53736466", "0.5370689", "0.5368191", "0.5366119", "0.5356092", "0.53271794", "0.5327166", "0.53038204", "0.5297812", "0.52890366", "0.52589285", "0.5245638", "0.5210663", "0.5198633", "0.51938456", "0.5188485", "0.51828885", "0.5161984", "0.51581925", "0.5129484", "0.51114285", "0.51080894", "0.50988597", "0.50893307", "0.5088065", "0.5085641", "0.50843555", "0.5069417", "0.50684905", "0.50636375", "0.506016", "0.5034127", "0.50218046", "0.50023484", "0.50006914", "0.4986796", "0.49845183", "0.49802864", "0.49792418", "0.49781257", "0.4977679", "0.4976575", "0.49702942", "0.49642423", "0.49556908", "0.495469", "0.49521238", "0.49462625", "0.49408916", "0.4939434", "0.49246097", "0.4902747", "0.4901759", "0.48969898", "0.48911807" ]
0.6144937
3
Method: "action.LookupTableFromCache", v1 (2 tasks) Task 1: Undetermined Input: String action.LookupTableFromCache.TableName (tableName) Input: Map action.LookupTableFromCache.SearchParameters (searchParameters) Task 2: Custom code Output: Map action.LookupTableFromCache.Table (results)
public List<ErrorReport> lookupTableFromCache(ActionRequest request, ActionResponse response) throws CSWrapperException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void createLookupCache() {\n }", "TableCache(String paramterName, String tableName) {\n\n cache = new HashMap<>(1);\n cache.put(paramterName, tableName);\n\n }", "protected TableMetadata resolveTable(TableId tableId)\n {\n TableEntry entry = cache.computeIfAbsent(\n tableId.name(),\n key -> new TableEntry(base.table(tableId))\n );\n return entry.table;\n }", "public List<ErrorReport> lookupTableColumnFromCache(ActionRequest request, ActionResponse response)\n\t\tthrows CSWrapperException;", "protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }", "private void readTableToDescriptor() {\n for (BeanDescriptor<?> desc : descMap.values()) {\n String baseTable = desc.baseTable();\n if (baseTable != null) {\n baseTable = baseTable.toLowerCase();\n List<BeanDescriptor<?>> list = tableToDescMap.computeIfAbsent(baseTable, k -> new ArrayList<>(1));\n list.add(desc);\n }\n if (desc.entityType() == EntityType.VIEW && desc.isQueryCaching()) {\n // build map of tables to view entities dependent on those tables\n // for the purpose of invalidating appropriate query caches\n String[] dependentTables = desc.dependentTables();\n if (dependentTables != null && dependentTables.length > 0) {\n for (String depTable : dependentTables) {\n depTable = depTable.toLowerCase();\n List<BeanDescriptor<?>> list = tableToViewDescMap.computeIfAbsent(depTable, k -> new ArrayList<>(1));\n list.add(desc);\n }\n }\n }\n }\n }", "@Test\n \tpublic void mapTable() {\n \t\t\n \t\tString[][] data = { { \"11\", \"12\" }, { \"21\", \"22\" } };\n \n \t\tTable table = tableWith(data,\"c1\",\"c2\");\n \n \t\tTableMapDirectives directives = new TableMapDirectives(table.columns().get(0));\n \t\t\n \t\tdirectives.add(column(\"TAXOCODE\"))\n \t\t .add(column(\"ISSCAAP\"))\n \t\t .add(column(\"Scientific_name\"))\n \t\t .add(column(\"English_name\").language(\"en\"))\n \t\t .add(column(\"French_name\").language(\"fr\"))\n \t\t .add(column(\"Spanish_name\").language(\"es\"))\n \t\t .add(column(\"Author\"))\n \t\t .add(column(\"Family\"))\n \t\t .add(column(\"Order\"));\n \n \t\tOutcome outcome = service.map(table, directives);\n \t\t\n \t\tassertNotNull(outcome.result());\n \t}", "@RequestMapping(value = \"/data/{srcEnv}/{srcDB}/{pid}\", method = {RequestMethod.GET})\n @ResponseBody\n public RestWrapper getTableData(@PathVariable(\"srcEnv\") String srcEnv, @PathVariable(\"srcDB\") String srcDB, @PathVariable(\"pid\") String pid) {\n RestWrapper restWrapper = null;\n LOGGER.info(srcEnv + \"srcEnvi\");\n LOGGER.info(srcDB + \"srcDB\");\n try {\n Class.forName(driverName);\n connection = DriverManager.getConnection(\"jdbc:hive2://\" + srcEnv + \"/\" + srcDB.toLowerCase(), \"\", \"\");\n String tableName=\"ML_\"+pid;\n ResultSet rs = connection.createStatement().executeQuery(\"select * from \" + srcDB + \".\" + tableName);\n\n ResultSetMetaData metaData = rs.getMetaData();\n List<Map<String, Object>> tables = new ArrayList<Map<String, Object>>();\n while (rs.next()) {\n Map<String,Object> m=new LinkedHashMap<>();\n for(int j=1;j<=metaData.getColumnCount();j++){\n\n String colName = metaData.getColumnLabel(j).replaceFirst(tableName.toLowerCase()+\".\", \"\");\n if(!colName.equals(\"features\") && !colName.equals(\"rawprediction\") && !colName.equals(\"probability\")){\n Object colValue=rs.getObject(j);\n m.put(colName,colValue);}\n }\n tables.add(m);\n }\n restWrapper = new RestWrapper(tables, RestWrapperOptions.OK);\n\n } catch (Exception e) {\n LOGGER.error(\"error occured \" + e);\n restWrapper = new RestWrapper(e.getMessage(), RestWrapper.ERROR);\n }\n return restWrapper;\n }", "abstract protected Map<String, T> lookup(List<String> values);", "private List<Table> getTableFromStringTableName(String tableName) throws HyracksDataException {\n\n // Get all the tables\n if (generateAllTables) {\n // Remove the DBGEN_VERSION table and all children tables, parent tables will generate them\n return Table.getBaseTables().stream()\n .filter(table -> !table.equals(Table.DBGEN_VERSION) && !table.isChild())\n .collect(Collectors.toList());\n }\n\n // Search for the table\n List<Table> matchedTables = Table.getBaseTables().stream()\n .filter(table -> tableName.equalsIgnoreCase(table.getName())).collect(Collectors.toList());\n\n // Ensure the table was found\n if (matchedTables.isEmpty()) {\n throw new RuntimeDataException(ErrorCode.TPCDS_INVALID_TABLE_NAME, getFunctionIdentifier().getName(),\n tableName);\n }\n\n return matchedTables;\n }", "@Override\n public Collection performLookup(LookupForm lookupForm, Collection resultTable, boolean bounded) {\n Collection<BusinessObject> displayList;\n\n // Call search method to get results - always use unbounded to get the entire set of results.\n\n displayList = (Collection<BusinessObject>) getSearchResultsUnbounded(lookupForm.getFieldsForLookup());\n\n List pkNames = getBusinessObjectMetaDataService().listPrimaryKeyFieldNames(getBusinessObjectClass());\n List returnKeys = getReturnKeys();\n Person user = GlobalVariables.getUserSession().getPerson();\n\n // Iterate through result list and wrap rows with return url and action urls\n for (BusinessObject element : displayList) {\n LOG.debug(\"Doing lookup for \" + element.getClass());\n\n ReferralToCollectionsLookupResult result = ((ReferralToCollectionsLookupResult) element);\n List<String> invoiceAttributesForDisplay = result.getInvoiceAttributesForDisplay();\n\n BusinessObjectRestrictions businessObjectRestrictions = getBusinessObjectAuthorizationService().getLookupResultRestrictions(result, user);\n // add list of awards to sub Result rows\n List<ResultRow> subResultRows = new ArrayList<ResultRow>();\n for (ContractsGrantsInvoiceDocument invoice : result.getInvoices()) {\n\n List<Column> subResultColumns = new ArrayList<Column>();\n InvoiceAccountDetail firstInvoiceAccountDetail = new InvoiceAccountDetail();\n\n // Set first invoice account detail\n if (CollectionUtils.isNotEmpty(invoice.getAccountDetails())){\n firstInvoiceAccountDetail = invoice.getAccountDetails().get(0);\n }\n\n for (String propertyName : invoiceAttributesForDisplay) {\n if (propertyName.equalsIgnoreCase(KFSPropertyConstants.ACCOUNT_NUMBER)) {\n Account account = getAccountService().getByPrimaryId(firstInvoiceAccountDetail.getChartOfAccountsCode(), firstInvoiceAccountDetail.getAccountNumber());\n subResultColumns.add(setupResultsColumn(account, propertyName, businessObjectRestrictions));\n }\n else {\n subResultColumns.add(setupResultsColumn(invoice, propertyName, businessObjectRestrictions));\n }\n }\n\n ResultRow subResultRow = new ResultRow(subResultColumns, \"\", \"\");\n subResultRow.setObjectId(((PersistableBusinessObjectBase) invoice).getObjectId());\n subResultRows.add(subResultRow);\n }\n\n // Create main customer header row\n Collection<Column> columns = getColumns(element, businessObjectRestrictions);\n HtmlData returnUrl = getReturnUrl(element, lookupForm, returnKeys, businessObjectRestrictions);\n ContractsGrantsLookupResultRow row = new ContractsGrantsLookupResultRow((List<Column>) columns, subResultRows, returnUrl.constructCompleteHtmlTag(), getActionUrls(element, pkNames, businessObjectRestrictions));\n resultTable.add(row);\n }\n\n return displayList;\n }", "public void cacheResult(DataEntry dataEntry);", "private String[] convertLookupTables(LookupOp lookupOp) {\n\t\tLookupTable lookupTable = lookupOp.getTable();\n\t\tint nComponents = lookupTable.getNumComponents();\n\n\t\tif ((nComponents != 1) && (nComponents != 3) && (nComponents != 4))\n\t\t\tthrow new SVGGraphics2DRuntimeException(ERR_ILLEGAL_BUFFERED_IMAGE_LOOKUP_OP);\n\n\t\tStringBuilder[] lookupTableBuf = new StringBuilder[nComponents];\n\t\tfor (int i = 0; i < nComponents; i++)\n\t\t\tlookupTableBuf[i] = new StringBuilder();\n\n\t\tif (!(lookupTable instanceof ByteLookupTable)) {\n\t\t\tint[] src = new int[nComponents];\n\t\t\tint[] dest = new int[nComponents];\n\t\t\tint offset = lookupTable.getOffset();\n\n\t\t\t// Offsets are used for constrained sources. Therefore,\n\t\t\t// the lookup values should never be used under offset.\n\t\t\t// There is no SVG equivalent for this behavior.\n\t\t\t// These values are mapped to identity.\n\t\t\tfor (int i = 0; i < offset; i++) {\n\t\t\t\t// Fill in string buffers\n\t\t\t\tfor (int j = 0; j < nComponents; j++) {\n\t\t\t\t\t// lookupTableBuf[j].append(Integer.toString(i));\n\t\t\t\t\tlookupTableBuf[j].append(doubleString(i / 255.0)).append(SPACE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = offset; i <= 255; i++) {\n\t\t\t\t// Fill in source array\n\t\t\t\tArrays.fill(src, i);\n\n\t\t\t\t// Get destination values\n\t\t\t\tlookupTable.lookupPixel(src, dest);\n\n\t\t\t\t// Fill in string buffers\n\t\t\t\tfor (int j = 0; j < nComponents; j++) {\n\t\t\t\t\tlookupTableBuf[j].append(doubleString(dest[j] / 255.0)).append(SPACE);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tbyte[] src = new byte[nComponents];\n\t\t\tbyte[] dest = new byte[nComponents];\n\n\t\t\tint offset = lookupTable.getOffset();\n\n\t\t\t// Offsets are used for constrained sources. Therefore,\n\t\t\t// the lookup values should never be used under offset.\n\t\t\t// There is no SVG equivalent for this behavior.\n\t\t\t// These values are mapped to identity.\n\t\t\tfor (int i = 0; i < offset; i++) {\n\t\t\t\t// Fill in string buffers\n\t\t\t\tfor (int j = 0; j < nComponents; j++) {\n\t\t\t\t\t// lookupTableBuf[j].append(Integer.toString(i));\n\t\t\t\t\tlookupTableBuf[j].append(doubleString(i / 255.0)).append(SPACE);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0; i <= 255; i++) {\n\t\t\t\t// Fill in source array\n\t\t\t\tArrays.fill(src, (byte) (0xff & i));\n\n\t\t\t\t// Get destination values\n\t\t\t\t((ByteLookupTable) lookupTable).lookupPixel(src, dest);\n\n\t\t\t\t// Fill in string buffers\n\t\t\t\tfor (int j = 0; j < nComponents; j++) {\n\t\t\t\t\tlookupTableBuf[j].append(doubleString((0xff & dest[j]) / 255.0)).append(SPACE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tString[] lookupTables = new String[nComponents];\n\t\tfor (int i = 0; i < nComponents; i++)\n\t\t\tlookupTables[i] = lookupTableBuf[i].toString().trim();\n\n\t\t/*\n\t\t * for(int i=0; i<lookupTables.length; i++){\n\t\t * System.out.println(lookupTables[i]); }\n\t\t */\n\n\t\treturn lookupTables;\n\t}", "private HashMap<String, ArrayList<String>> getAllTableContents(String table) {\r\n return getAllTableContentsWhere(table, null, null);\r\n }", "@Cacheable(value = \"getShardsAndDaysHint\",\n key = \"{#root.target.dateIndexTableName,#root.target.auths,#root.target.collapseDatePercentThreshold,#field,#begin,#end,#rangeBegin,#rangeEnd,#datatypeFilter}\",\n cacheManager = \"dateIndexHelperCacheManager\")\n public String getShardsAndDaysHint(String field, Date begin, Date end, Date rangeBegin, Date rangeEnd, Set<String> datatypeFilter)\n throws TableNotFoundException {\n log.debug(\"cache fault for getShardsAndDaysHint(\" + dateIndexTableName + \", \" + auths + \", \" + collapseDatePercentThreshold + \", \" + field + \", \"\n + begin + \", \" + end + \", \" + rangeBegin + \", \" + rangeEnd + \", \" + datatypeFilter + \")\");\n if (log.isTraceEnabled()) {\n this.showMeDaCache(\"before getShardsAndDaysHint\");\n }\n long startTime = System.currentTimeMillis();\n if (log.isDebugEnabled()) {\n log.debug(\"timeTravel is \" + this.timeTravel);\n }\n SimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd\");\n String minShard = format.format(rangeBegin);\n String maxShard = format.format(rangeEnd);\n\n TreeMap<String,BitSet> bitsets = new TreeMap<>();\n\n BatchScanner bs = ScannerHelper.createBatchScanner(client, dateIndexTableName, auths, numQueryThreads);\n\n try {\n bs.setRanges(Arrays.asList(new Range(DateIndexUtil.format(begin), DateIndexUtil.format(end) + '~')));\n\n Iterator<Entry<Key,Value>> iterator = bs.iterator();\n\n while (iterator.hasNext()) {\n Entry<Key,Value> entry = iterator.next();\n Key k = entry.getKey();\n String[] parts = StringUtils.split(k.getColumnQualifier().toString(), '\\0');\n String date = parts[0];\n\n // If the event date is more than one day before the event actually happened,\n // then skip it, unless time-travel has been enabled.\n String[] columnFamilyParts = StringUtils.split(k.getColumnFamily().toString(), '\\0');\n if (timeTravel == false && columnFamilyParts.length > 0 && columnFamilyParts[0].equals(\"ACTIVITY\")) {\n try {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyyMMdd\");\n String rowDateString = k.getRow().toString();\n // the row may be sharded, i need to get the date part\n if (rowDateString.contains(\"_\")) {\n // strip off the shard number part of the rowDate string\n rowDateString = rowDateString.substring(0, rowDateString.indexOf(\"_\"));\n }\n LocalDate rowDate = LocalDate.parse(rowDateString, formatter);\n LocalDate shardDate = LocalDate.parse(date, formatter);\n if (shardDate.isBefore(rowDate.minusDays(1))) {\n continue;\n }\n } catch (Exception ex) {\n // likely a problem parsing the dates, Move on....\n log.info(\"problem during delorean check\", ex);\n }\n }\n\n // If the date is outside of the min and max shard, then continue to the next entry\n if (date.compareTo(minShard) < 0) {\n continue;\n }\n if (date.compareTo(maxShard) > 0) {\n continue;\n }\n\n if (parts[2].equals(field)) {\n if (datatypeFilter == null || datatypeFilter.isEmpty() || datatypeFilter.contains(parts[1])) {\n BitSet bits = BitSet.valueOf(entry.getValue().get());\n BitSet mappedBits = bitsets.get(date);\n if (mappedBits == null) {\n bitsets.put(date, bits);\n } else {\n mappedBits.or(bits);\n }\n }\n }\n }\n\n } finally {\n bs.close();\n }\n\n StringBuilder builder = new StringBuilder();\n for (Map.Entry<String,BitSet> entry : bitsets.entrySet()) {\n appendToShardsAndDays(builder, entry.getValue(), entry.getKey());\n }\n\n String shardsAndDays = builder.toString();\n\n if (log.isDebugEnabled()) {\n long endTime = System.currentTimeMillis();\n log.debug(\"getShardsAndDaysHint from table: \" + dateIndexTableName + \", \" + auths + \", \" + collapseDatePercentThreshold + \", \" + field + \", \"\n + begin + \", \" + end + \", \" + rangeBegin + \", \" + rangeEnd + \", \" + datatypeFilter + \" returned \" + shardsAndDays + \" in \"\n + (endTime - startTime) + \"ms\");\n }\n\n return shardsAndDays;\n }", "public void cacheResult(java.util.List<DataEntry> dataEntries);", "public ArrayList getSourceTableList(String tableName) {\r\n\t\tArrayList sourceTableList = new ArrayList();\r\n\t\tHashSet tableSet = new HashSet();\r\n\t\t// whether the table is a volatile table\r\n\t\tint index = -1;\r\n\t\tindex = volatileIndex(tableName);\r\n\t\t// is a volatile table\r\n\t\tif (index >= 0) {\r\n\t\t\tfor (int i = 0; i < volatileTableSourceList.size(); i++) {\r\n\t\t\t\tHashMap volatileTable = (HashMap) volatileTableSourceList.get(i);\r\n\t\t\t\tInteger volatileIndex = (Integer) volatileTable.get(\"sqlIndex\");\r\n\t\t\t\tif (index == volatileIndex.intValue()) {\r\n\t\t\t\t\ttableSet = (HashSet) volatileTable.get(\"sourceTableList\");\r\n\t\t\t\t\tArrayList tableList = new ArrayList(tableSet);\r\n\r\n\t\t\t\t\tfor (int j = 0; j < tableList.size(); j++) {\r\n\t\t\t\t\t\tHashMap table = (HashMap) tableList.get(j);\r\n\t\t\t\t\t\tString sTable_name = (String) table.get(\"sourceTable\");\r\n\t\t\t\t\t\t// String expressionExp = (String) table.get(\"expression\");\r\n\t\t\t\t\t\tHashMap sTable = new HashMap();\r\n\t\t\t\t\t\tsTable.put(\"sourceTable\", sTable_name);\r\n\t\t\t\t\t\tsTable.put(\"targetTable\", tableName);\r\n\t\t\t\t\t\t// sTable.put(\"expression\",expressionExp);\r\n\t\t\t\t\t\tsourceTableList.add(sTable);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tindex = commonIndex(tableName);\r\n\t\t\tif (index >= 0) {\r\n\t\t\t\tfor (int i = 0; i < commonTableSourceList.size(); i++) {\r\n\t\t\t\t\tHashMap commonTable = (HashMap) commonTableSourceList.get(i);\r\n\t\t\t\t\tInteger commonIndex = (Integer) commonTable.get(\"sqlIndex\");\r\n\t\t\t\t\tif (index == commonIndex.intValue()) {\r\n\t\t\t\t\t\ttableSet = (HashSet) commonTable.get(\"sourceTableList\");\r\n\t\t\t\t\t\tArrayList tableList = new ArrayList(tableSet);\r\n\r\n\t\t\t\t\t\tfor (int j = 0; j < tableList.size(); j++) {\r\n\t\t\t\t\t\t\tHashMap table = (HashMap) tableList.get(j);\r\n\t\t\t\t\t\t\tString sTable_name = (String) table.get(\"sourceTable\");\r\n\t\t\t\t\t\t\t// String expressionExp = (String) table.get(\"expression\");\r\n\t\t\t\t\t\t\tHashMap sTable = new HashMap();\r\n\t\t\t\t\t\t\tsTable.put(\"sourceTable\", sTable_name);\r\n\t\t\t\t\t\t\tsTable.put(\"targetTable\", tableName);\r\n\t\t\t\t\t\t\t// sTable.put(\"expression\",expressionExp);\r\n\t\t\t\t\t\t\tsourceTableList.add(sTable);\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} else {\r\n\t\t\t\tHashMap sourceTable = new HashMap();\r\n\t\t\t\tsourceTable.put(\"sourceTable\", \"\");\r\n\t\t\t\tsourceTable.put(\"targetTable\", tableName);\r\n\t\t\t\t// sourceTable.put(\"expression\",expString);\r\n\t\t\t\tsourceTableList.add(sourceTable);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new ArrayList(new HashSet(sourceTableList));\r\n\t}", "public T1 caseStringToTableMappingEntryMap(Map.Entry<String, MappingEntry<Table>> object) {\n\t\treturn null;\n\t}", "List<Map.Entry<Long, String>> getStopTimeTable(String stopId) throws Exception;", "public void reduce(IntWritable key, Iterable<Text> values, Context context) throws IOException, InterruptedException {\n HashMap<String, ArrayList<String>> hm = new HashMap<String, ArrayList<String>>();\n\n //ArrayList<String> tableS = new ArrayList<String>(); Trying to reduce memory\n ArrayList<String> tableT = new ArrayList<String>();\n\n //group the records in the iterator into table S and table T\n for(Text val : values){\n String record = val.toString();\n int i = record.indexOf(\" \");\n String tag = record.substring(0,i);\n String value = record.substring(i+1);\n\n if (tag.contentEquals(\"S\")) {\n //get the key-value information\n int j = value.indexOf(\" \");\n String tagKey = value.substring(0,j);\n String mapValue = value.substring(j+1);\n\n //if the key doesn't exist\n if (!hm.containsKey(tagKey)) {\n ArrayList<String> list = new ArrayList<String>();\n list.add(mapValue);\n hm.put(tagKey, list);\n } else {\n //same key exists, then add it to the array list\n hm.get(tagKey).add(mapValue);\n }\n } else if(tag.contentEquals(\"T\")) {\n tableT.add(value);\n }\n }\n\n// for (String s : tableS){\n// int i = s.indexOf(\" \");\n// String keyValue = s.substring(0, i);\n// //if the key doesn't exist\n// if (!hm.containsKey(keyValue)) {\n// ArrayList<String> list = new ArrayList<String>();\n// list.add(s.substring(i+1));\n// hm.put(keyValue, list);\n// } else {\n// //same key exists, then add it to the array list\n// hm.get(keyValue).add(s.substring(i+1));\n// }\n// }\n\n //then iterate through the other table to produce the result\n for (String t : tableT) {\n //check to see if there's a match\n int i = t.indexOf(\" \");\n String hashKey = t.substring(0, i);\n if (!hm.containsKey(hashKey)) {\n //no match and don't do anything\n } else {\n //match\n for (String s : hm.get(hashKey)) {\n String result = s + \" \" + hashKey + \":\" + t;\n context.write(key, new Text(result));\n }\n }\n }\n }", "private LookupUtil(){}", "private void prefetchRegionCache(final byte[] tableName,\n final byte[] row) {\n // Implement a new visitor for MetaScanner, and use it to walk through\n // the .META.\n MetaScannerVisitor visitor = new MetaScannerVisitorBase() {\n public boolean processRow(Result result) throws IOException {\n try {\n byte[] value = result.getValue(HConstants.CATALOG_FAMILY,\n HConstants.REGIONINFO_QUALIFIER);\n HRegionInfo regionInfo = null;\n\n if (value != null) {\n // convert the row result into the HRegionLocation we need!\n regionInfo = Writables.getHRegionInfo(value);\n\n // possible we got a region of a different table...\n if (!Bytes.equals(regionInfo.getTableName(),\n tableName)) {\n return false; // stop scanning\n }\n if (regionInfo.isOffline()) {\n // don't cache offline regions\n return true;\n }\n value = result.getValue(HConstants.CATALOG_FAMILY,\n HConstants.SERVER_QUALIFIER);\n if (value == null) {\n return true; // don't cache it\n }\n final String hostAndPort = Bytes.toString(value);\n String hostname = Addressing.parseHostname(hostAndPort);\n int port = Addressing.parsePort(hostAndPort);\n value = result.getValue(HConstants.CATALOG_FAMILY,\n HConstants.STARTCODE_QUALIFIER);\n // instantiate the location\n HRegionLocation loc =\n new HRegionLocation(regionInfo, hostname, port);\n // cache this meta entry\n cacheLocation(tableName, loc);\n }\n return true;\n } catch (RuntimeException e) {\n throw new IOException(e);\n }\n }\n };\n try {\n // pre-fetch certain number of regions info at region cache.\n MetaScanner.metaScan(conf, this, visitor, tableName, row,\n this.prefetchRegionLimit, HConstants.META_TABLE_NAME);\n } catch (IOException e) {\n LOG.warn(\"Encountered problems when prefetch META table: \", e);\n }\n }", "void initCaches(Map<EObject, String> eObjectToIdMap, Map<String, EObject> idToEObjectMap);", "public interface DicMapper {\n \n @InvalidateSingleCache(namespace = \"DicValues\")\n int deleteByPrimaryKey(@ParameterValueKeyProvider DicValues key) throws DataAccessException;\n\n @CachePut(value = \"DicValues\")\n int insertSelective(DicValues record) throws DataAccessException;\n\n @ReadThroughSingleCache(namespace =\"DicValues\", expiration = 30)\n DicValues selectByPrimaryKey(DicValues key) throws DataAccessException;\n\n @UpdateSingleCache(namespace = \"DicValues\", expiration = 30)\n int updateByPrimaryKeySelective(DicValues record) throws DataAccessException;\n\n\n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicValues> selectAll(DicValues record) throws DataAccessException;\n\n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicValues> selectAllByPage(Map<String, Object> map) throws DataAccessException;\n /**\n * \n * @param 张宇超\n * @return\n * @throws DataAccessException\n */\n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicValues> selectAllByPageAndType(Map<String, Object> map) throws DataAccessException;\n \n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicValues> searchAll(DicValues record) throws DataAccessException;\n\n \n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicValues> searchAllByPage(Map<String, Object> map) throws DataAccessException;\n\n @ReadThroughMultiCache(namespace =\"DicValues\", expiration = 30)\n List<DicTypes> selectAllDicTypes(Map<String, Object> map) throws DataAccessException;\n \n int selectCount(DicValues record) throws DataAccessException;\n \n DicTypes selectDicTypesByKey(String dicType);\n //批量插入\n int insertBatch(List<DicValues> list);\n\n}", "public static void main(String[] args) {\n\t\tString queryHql = \"select Map(a.id,a.name,b.brandId,b.productId) from ShopBrand as a,SysProductType b where a.id=b.aid \";\n\n\t\tString tableStatement = StringUtils.substringBetween(queryHql, \"from\",\n\t\t\t\t\"where\");\n\t\tString mappingStatement = StringUtils.substringBetween(queryHql, \"Map\",\n\t\t\t\t\"from\");\n\t\tmappingStatement = StringUtils.replaceOnce(mappingStatement, \"(\", \"\");\n\n\t\tSet<String> estimateTransformFields = Sets.newHashSet();\n\t\tfor (String t : Splitter.on(\",\").split(mappingStatement)) {\n\t\t\tt = t.trim();\n\t\t\testimateTransformFields.add(Splitter.on(\"as\").trimResults()\n\t\t\t\t\t.omitEmptyStrings().limit(2).splitToList(t).get(0));\n\t\t}\n\n\t\tboolean hasAlias = true;\n\t\tString singleEntityName = \"\";\n\t\tSet<String> estimateTableNames = Sets.newHashSet();\n\t\tBiMap<String, String> entityName2aliasBimap = HashBiMap.create();\n\t\tString separator;\n\t\tList<String> tList;\n\t\tfor (String t : Splitter.on(\",\").split(tableStatement)) {\n\t\t\tt = t.trim();\n\t\t\tif (t.contains(\"as\")) {\n\t\t\t\tseparator = \"as\";\n\t\t\t} else {\n\t\t\t\tseparator = \" \";\n\t\t\t}\n\t\t\ttList = Splitter.on(separator).trimResults().omitEmptyStrings()\n\t\t\t\t\t.limit(2).splitToList(t);\n\n\t\t\tif (tList.size() == 1) {\n\t\t\t\tsingleEntityName = tList.get(0);\n\t\t\t\thasAlias = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tentityName2aliasBimap.put(tList.get(0), tList.get(1));\n\t\t\testimateTableNames.add(Splitter.on(separator).trimResults()\n\t\t\t\t\t.omitEmptyStrings().limit(2).splitToList(t).get(0));\n\t\t}\n\t\tBiMap<String, String> alias2EntityNameBimap = entityName2aliasBimap\n\t\t\t\t.inverse();\n\n\t\tlogger.info(\"estimateTransformFields is:{}\", estimateTransformFields);\n\t\tlogger.info(\"estimateTableNames is:{}\", estimateTableNames);\n\t\tlogger.info(\"entityName2aliasBimap is:{}\", entityName2aliasBimap);\n\n\t\tMap<String, Set<String>> estimateResultMap = Maps.newHashMap();\n\t\tString tmpAlias;\n\t\tString tmpFiledNameWithoutAlias;\n\t\tString tmpEntityName;\n\t\tif (hasAlias) {\n\t\t\tfor (String field : estimateTransformFields) {\n\t\t\t\ttmpAlias = field.substring(0, 1);\n\t\t\t\ttmpFiledNameWithoutAlias = field.substring(2);\n\t\t\t\ttmpEntityName = alias2EntityNameBimap.get(tmpAlias);\n\t\t\t\tif (estimateResultMap.get(tmpEntityName) != null) {\n\t\t\t\t\testimateResultMap.get(tmpEntityName)\n\t\t\t\t\t\t\t.add(tmpFiledNameWithoutAlias);\n\t\t\t\t} else {\n\t\t\t\t\testimateResultMap.put(tmpEntityName,\n\t\t\t\t\t\t\tSets.newHashSet(tmpFiledNameWithoutAlias));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\testimateResultMap.put(singleEntityName, estimateTransformFields);\n\t\t}\n\t\tlogger.info(\"estimateResultMap is:{}\", estimateResultMap);\n\t}", "public void populateHiveTable(GenericService genericService, String nonce) {\n // Get the current method name\n String methodName = new Throwable().getStackTrace()[0].getMethodName();\n\n // To time how long function takes to run\n Stopwatch stopwatch = Stopwatch.createStarted();\n\n String numberColName = \"number\";\n if (!genericService.getTableName().equals(\"blocks\")\n && !genericService.getTableName().equals(\"block_timestamp_mapping\")) {\n numberColName = \"block_number\";\n }\n\n String liveTableCols = genericService.getFieldDescriptors().stream()\n .map(s -> String.format(\"`%s`\", s.getName()))\n .collect(Collectors.joining(\",\"));\n\n // Generate all columns of table\n String columns = genericService.getFieldDescriptors().stream()\n .map(s -> String.format(\"a.`%s`\", s.getName()))\n .collect(Collectors.joining(\",\"));\n\n // Strict mode insertion (for multi-user environment)\n // Use this mode when multiple imports are happening at once\n// String sql =\n// \"INSERT INTO %s.%s (%s) \"\n// + \"SELECT %s FROM %s a \"\n// + \"LEFT OUTER JOIN %s.%s b ON a.%s = b.%s \"\n// + \"WHERE b.%s IS NULL\";\n// String query = String.format(\n// sql,\n// schema,\n// genericService.getTableName(),\n// liveTableCols,\n// columns,\n// genericService.getTmpTableName() + \"_\" + nonce,\n// schema,\n// genericService.getTableName(),\n// numberColName,\n// numberColName,\n// numberColName\n// );\n\n // Non-strict mode insertion\n String sql =\n \"INSERT INTO %s.%s (%s) \"\n + \"SELECT %s FROM %s a\";\n String query = String.format(\n sql,\n schema,\n genericService.getTableName(),\n liveTableCols,\n columns,\n genericService.getTmpTableName() + \"_\" + nonce\n );\n \n jdbcTemplate.execute(query);\n\n stopwatch.stop(); // Optional\n log.info(\"[{} - {}] -> Time elapsed: [{}] ms\",\n genericService.getTableName(),\n methodName,\n stopwatch.elapsed(TimeUnit.MILLISECONDS)\n );\n }", "@SuppressWarnings(\"unchecked\")\n \t@Override\n \tpublic void executeAsynch(final Map<String, T2Reference> inputs,\n \t\t\tfinal AsynchronousActivityCallback callback) {\n \t\tcallback.requestRun(new Runnable() {\n \t\t\t\n \t\t\tpublic void run() {\n \t\t\t\t\n \t\t\t\tInvocationContext context = callback.getContext();\n \t\t\t\tReferenceService referenceService = context.getReferenceService();\n \t\t\t\t// Resolve inputs \t\t\t\t\n \t\t\t\tString inputTable = (String) referenceService.renderIdentifier(inputs.get(IN_FIRST_INPUT_TABLE), String.class, context);\n \t\t\t\tString formatInputTable = (String) referenceService.renderIdentifier(inputs.get(IN_FORMAT_INPUT_TABLE), String.class, context);\n \t\t\t\tString formatOutputTable= (String) referenceService.renderIdentifier(inputs.get(IN_FORMAT_OUTPUT_TABLE), String.class, context);\n \t\t\t\tString filter = (String) referenceService.renderIdentifier(inputs.get(IN_FILTER), String.class, context);\n \t\t\t\t\n \t\t\t\t//String lastInput = (String) referenceService.renderIdentifier(inputs.get(IN_OUTPUT_TABLE_NAME), \n \t\t\t\t//\t\tString.class, context);\n \n \t\t\t\tboolean optionalPorts = configBean.getTypeOfInput().compareTo(\"File\")==0;\n \t\t\t\t\n \t\t\t\tString outputTableName = null;\n \t\t\t\tif(optionalPorts && inputs.containsKey(IN_OUTPUT_TABLE_NAME)){ //configBean.getNumberOfTables()==3\n \t\t\t\t\toutputTableName = (String) referenceService.renderIdentifier(inputs.get(IN_OUTPUT_TABLE_NAME), \n \t\t\t\t\t\t\tString.class, context);\n \t\t\t\t}\n \n \t\t\t\t//include default values if empty inputs\n \t\t\t\t//default format => votable\n \t\t\t\tif(formatInputTable == null || formatInputTable.trim().isEmpty()){\n \t\t\t\t\tformatInputTable = \"votable\";\n \t\t\t\t}\n \t\t\t\tif(formatOutputTable == null || formatOutputTable.trim().isEmpty()){\n \t\t\t\t\tformatOutputTable = \"votable\";\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t//check correct input values\n \t\t\t\tif(!MyUtils.isValidInputFormat(formatInputTable)){\n\t\t\t\t\tcallback.fail(\"Invalid input table format: \"+ formatInputTable,new Exception());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif(!MyUtils.isValidOutputFormat(formatOutputTable)){\n\t\t\t\t\tcallback.fail(\"Invalid output table format: \"+ formatOutputTable,new Exception());\n \t\t\t\t}\n \t\t\t\t//check if input files exist??\n \t\t\t\t\n \t\t\t\t\n \t\t\t\t\n \t\t\t\t// Support our configuration-dependendent input\n \t\t\t\t//boolean optionalPorts = configBean.getExampleString().equals(\"specialCase\"); \n \t\t\t\t\n \t\t\t\t//List<byte[]> special = null;\n \t\t\t\t// We'll also allow IN_EXTRA_DATA to be optionally not provided\n \t\t\t\t//if (optionalPorts && inputs.containsKey(IN_EXTRA_DATA)) {\n \t\t\t\t//\t// Resolve as a list of byte[]\n \t\t\t\t//\tspecial = (List<byte[]>) referenceService.renderIdentifier(\n \t\t\t\t//\t\t\tinputs.get(IN_EXTRA_DATA), byte[].class, context);\n \t\t\t\t//}\n \t\t\t\t\n \n \t\t\t\t// TODO: Do the actual service invocation\n //\t\t\t\ttry {\n //\t\t\t\t\tresults = this.service.invoke(firstInput, special)\n //\t\t\t\t} catch (ServiceException ex) {\n //\t\t\t\t\tcallback.fail(\"Could not invoke Stilts service \" + configBean.getExampleUri(),\n //\t\t\t\t\t\t\tex);\n //\t\t\t\t\t// Make sure we don't call callback.receiveResult later \n //\t\t\t\t\treturn;\n //\t\t\t\t}\n \t\t\t\t\n \t\t\t\t//Performing the work: Stilts functinalities\n \t\t\t\tString [] parameters;\n \t\t\t\t\n \t\t\t\t//handling redirection of standard input and output\n \t\t\t\tPrintStream out = System.out;\n \t\t\t\tPrintStream stdout = System.out;\n \t\t\t\tInputStream in = System.in;\n \t\t\t\tInputStream stdin = System.in;\n \t\t\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n \t\t\t\tout = new PrintStream(baos);\n \t\t\t\t\n \t\t\t\tif(optionalPorts){ //case File\n \t\t\t\t\tparameters = new String[6];\n \t\t\t\t\tparameters[0] = \"tpipe\";\n \t\t\t\t\tparameters[1] = \"ifmt=\"+formatInputTable;\n \t\t\t\t\tparameters[2] = \"in=\"+inputTable;\n \t\t\t\t\tparameters[3] = \"ofmt=\"+formatOutputTable;\n \t\t\t\t\tif(configBean.getTypeOfFilter().compareTo(\"Column names\")==0){\n \t\t\t\t\t\tparameters[4] = \"cmd=keepcols '\"+ filter +\"'\";\n \t\t\t\t\t}else{\n \t\t\t\t\t\tfilter = MyUtils.checkAndRepairUCDlist(filter);\n \t\t\t\t\t\tparameters[4] = \"cmd=keepcols '\"+ filter +\"'\";\n \t\t\t\t\t}\n \t\t\t\t\tparameters[5] = \"out=\"+outputTableName;\n \t\t\t\t}else if(configBean.getTypeOfInput().compareTo(\"Query\")==0 \n \t\t\t\t\t\t\t||configBean.getTypeOfInput().compareTo(\"URL\")==0){\n \t\t\t\t\t\t\n \t\t\t\t\tparameters = new String[5];\n \t\t\t\t\tparameters[0] = \"tpipe\";\n \t\t\t\t\tparameters[1] = \"ifmt=\"+formatInputTable;\n \t\t\t\t\tparameters[2] = \"in=\"+inputTable;\n \t\t\t\t\tparameters[3] = \"ofmt=\"+formatOutputTable;\n \t\t\t\t\tif(configBean.getTypeOfFilter().compareTo(\"Column names\")==0){\n \t\t\t\t\t\tparameters[4] = \"cmd=keepcols '\"+ filter +\"'\";\n \t\t\t\t\t}else{\n \t\t\t\t\t\tfilter = MyUtils.checkAndRepairUCDlist(filter);\n \t\t\t\t\t\tparameters[4] = \"cmd=keepcols '\"+ filter +\"'\";\n \t\t\t\t\t}\n \t\t\t\t\t//Redirecting output\n \t\t\t\t\tSystem.setOut(out);\n \t\t\t\t}else if(configBean.getTypeOfInput().compareTo(\"String\")==0){\n \t\t\t\t\tparameters = new String[5];\n \t\t\t\t\tparameters[0] = \"tpipe\";\n \t\t\t\t\tparameters[1] = \"ifmt=\"+formatInputTable;\n \t\t\t\t\tparameters[2] = \"in=-\";\n \t\t\t\t\tparameters[3] = \"ofmt=\"+formatOutputTable;\n \t\t\t\t\tif(configBean.getTypeOfFilter().compareTo(\"Column names\")==0){\n \t\t\t\t\t\tparameters[4] = \"cmd=keepcols '\"+ filter +\"'\";\n \t\t\t\t\t}else{\n \t\t\t\t\t\tfilter = MyUtils.checkAndRepairUCDlist(filter);\n \t\t\t\t\t\tparameters[4] = \"cmd=keepcols '\"+ filter +\"'\";\n \t\t\t\t\t}\n \t\t\t\t\t//Redirecting output and input\n \t\t\t\t\tin = IOUtils.toInputStream(inputTable);\n \t\t\t\t\t//Optionally, do this: \n \t\t\t\t\t//InputStream is = new ByteArrayInputStream(resultTable.getBytes( charset ) );\n \t\t\t\t\tSystem.setIn(in);\n \t\t\t\t\tSystem.setOut(out);\n \t\t\t\t}else{\n \t\t\t\t\tparameters = new String[5];\n \t\t\t\t\tparameters[0] = \"tpipe\";\n \t\t\t\t\tparameters[1] = \"ifmt=\"+formatInputTable;\n \t\t\t\t\tparameters[2] = \"in=-\";\n \t\t\t\t\tparameters[3] = \"ofmt=\"+formatOutputTable;\n \n \t\t\t\t\t//Redirecting output and input\n \t\t\t\t\tin = IOUtils.toInputStream(inputTable);\n \t\t\t\t\t//Optionally, do this: \n \t\t\t\t\t//InputStream is = new ByteArrayInputStream(resultTable.getBytes( charset ) );\n \t\t\t\t\tSystem.setIn(in);\n \t\t\t\t\tSystem.setOut(out);\n \t\t\t\t}\n \t\t\t\t\t\n \t\t\t\tStilts.main(parameters);\n \t\t\t\t\t\n \t\t\t\t\n \t\t\t\t\n \t\t\t\t// Register outputs\n \t\t\t\tMap<String, T2Reference> outputs = new HashMap<String, T2Reference>();\n \t\t\t\tString simpleValue = \"/home/julian/Documents/wf4ever/tables/resultTable.ascii\";// //Name of the output file or result\n \t\t\t\tString simpleoutput = \"simple-report\";\n \t\t\t\t\n \t\t\t\tif(optionalPorts){ //case File\n \t\t\t\t\tsimpleValue = outputTableName;\n \t\t\t\t}else if(configBean.getTypeOfInput().compareTo(\"Query\")==0 \n \t\t\t\t\t\t\t||configBean.getTypeOfInput().compareTo(\"URL\")==0){\n \t\t\t\n \t\t\t\t\tout.close();\n \t\t\t\t\tif(out.checkError()){\n \t\t\t\t\t\tsimpleoutput += \"Output redirection failed.\\n\";\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tsimpleValue = baos.toString();\n \t\t\t\t\tSystem.setOut(stdout);\t\n \t\t\t\t\t\n \t\t\t\t}else if(configBean.getTypeOfInput().compareTo(\"String\")==0){\n \t\t\t\t\tout.close();\n \t\t\t\t\tif(out.checkError()){\n \t\t\t\t\t\tsimpleoutput += \"Output redirection failed.\\n\";\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tsimpleValue = baos.toString();\n \t\t\t\t\tSystem.setOut(stdout);\t\n \t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\tin.close();\n \t\t\t\t\t} catch (IOException e) {\n \t\t\t\t\t\tsimpleoutput += \"Input redirection failed.\\n\" + e.toString();\n \t\t\t\t\t}\n \t\t\t\t\tSystem.setIn(stdin);\n \t\t\t\t}else{\n \t\t\t\t\tout.close();\n \t\t\t\t\tif(out.checkError()){\n \t\t\t\t\t\tsimpleoutput += \"Output redirection failed.\\n\";\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tsimpleValue = baos.toString();\n \t\t\t\t\tSystem.setOut(stdout);\t\n \t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\tin.close();\n \t\t\t\t\t} catch (IOException e) {\n \t\t\t\t\t\tsimpleoutput += \"Input redirection failed.\\n\" + e.toString();\n \t\t\t\t\t}\n \t\t\t\t\tSystem.setIn(stdin);\n \t\t\t\t}\n \n \t\t\t\tT2Reference simpleRef = referenceService.register(simpleValue, 0, true, context);\n \t\t\t\toutputs.put(OUT_SIMPLE_OUTPUT, simpleRef);\n \t\t\t\tT2Reference simpleRef2 = referenceService.register(simpleoutput,0, true, context); \n \t\t\t\toutputs.put(OUT_REPORT, simpleRef2);\n \n \t\t\t\t// For list outputs, only need to register the top level list\n \t\t\t\t//List<String> moreValues = new ArrayList<String>();\n \t\t\t\t//moreValues.add(\"Value 1\");\n \t\t\t\t//moreValues.add(\"Value 2\");\n \t\t\t\t//T2Reference moreRef = referenceService.register(moreValues, 1, true, context);\n \t\t\t\t//outputs.put(OUT_MORE_OUTPUTS, moreRef);\n \n \t\t\t\t//if (optionalPorts) {\n \t\t\t\t//\t// Populate our optional output port\t\t\t\t\t\n \t\t\t\t//\t// NOTE: Need to return output values for all defined output ports\n \t\t\t\t//\tString report = \"Everything OK\";\n \t\t\t\t//\toutputs.put(OUT_REPORT, referenceService.register(report,\n \t\t\t\t//\t\t\t0, true, context));\n \t\t\t\t//}\n \t\t\t\t\n \t\t\t\t// return map of output data, with empty index array as this is\n \t\t\t\t// the only and final result (this index parameter is used if\n \t\t\t\t// pipelining output)\n \t\t\t\tcallback.receiveResult(outputs, new int[0]);\n \t\t\t}\n \t\t});\n \t}", "public List<Map<String, String>> getTable(String tableName) {\n return getTable(tableName, 1, 9999);\n\n }", "public abstract Result mergeTaskResults(Map<TaskKey,TaskResult> taskResults) throws JobException;", "public TapTable findOneTable(String tableName);", "private Map<String, String> populate(Map<String, String> argsMap) throws IOException, TaskExecutionException {\n\n SimpleHttpClient httpClient = SimpleHttpClient.builder(argsMap).build();\n try {\n String url = UrlBuilder.builder(argsMap).path(argsMap.get(\"location\")).build();\n Response response = httpClient.target(url).get();\n String responseBody = response.string();\n String header = response.getHeader(\"Content-Type\");\n\n Map<String, String> resultMap = null;\n if (header != null && header.contains(\"application/json\")) {\n resultMap = parsePlusStatsResult(responseBody);\n } else if (header != null && header.contains(\"text/plain\")) {\n resultMap = parseStubStatsResults(responseBody);\n } else {\n logger.error(\"Invalid content type [ \" + header + \" ] for URL \" + url);\n throw new TaskExecutionException(\"Invalid content type [ \" + header + \" ] for URL \" + url);\n }\n return resultMap;\n } finally {\n httpClient.close();\n }\n }", "public ArrayList<String> initSearchTable(String searchName, String displayName, long rawContactId,\n String phoneNumber, long version, String key, Context context) {\n if (TextUtils.isEmpty(searchName)) {\n return null;\n }\n\n /* pinyin4Char saves the Pinyin strings for each Chinese character in name.\n * Because we might have multiple pinyin strings for one Chinese char,\n * so use list here. */\n ArrayList<String> pinyin4Char = new ArrayList<String>();\n /* cachePyList saves the full Pinyin strings for Chinese name or original letters for English name. */\n ArrayList<String> cachePyList = new ArrayList<String>();\n\n int iLength = searchName.length();\n\n int multiPinyinCount = 0;\n for (int namePosition = 0; namePosition < iLength; namePosition++) {\n char ch = searchName.charAt(namePosition);\n int chCode = ch;\n pinyin4Char.clear();\n if (HanziUtil.isHanziCharCode(chCode)) {\n for (int count = 0; count < PINYIN_CANDIDATE_PER_CHAR; count++) {\n String pinyin = getHanziPinyinDataForCharCode(chCode, count);\n if (pinyin == null) {\n break;\n }\n pinyin4Char.add(pinyin);\n }\n int polyCount = pinyin4Char.size();\n if (polyCount == 0) {\n // can not find pinyin for this char, skip it.\n continue;\n }\n if (cachePyList.size() == 0) {\n cachePyList.addAll(pinyin4Char);\n } else {\n int prevCount = cachePyList.size();\n boolean handleMultiPinyin = true;\n\n if(polyCount > 1) {\n multiPinyinCount ++;\n }\n if (multiPinyinCount > MULTI_PINYIN_LIMIT) {\n handleMultiPinyin = false;\n polyCount = 1;\n }\n\n ArrayList<String> tempArray = new ArrayList<String>(prevCount * polyCount);\n for (String pinyinItem : cachePyList) {\n if (handleMultiPinyin) {\n for (String pinyin : pinyin4Char) {\n tempArray.add(pinyinItem + pinyin);\n }\n } else {\n tempArray.add(pinyinItem + pinyin4Char.get(0));\n }\n }\n cachePyList.clear();\n cachePyList.addAll(tempArray);\n }\n } else {\n String letter = Character.toString(ch);\n if (letter.length() == 0) {\n if (Build.TYPE.equals(Build.USER)) {\n Log.w(TAG, \"initSearchTable: got 0 length char code: \"+chCode+\" in name **** at \"+namePosition);\n } else {\n Log.w(TAG, \"initSearchTable: got 0 length char code: \"+chCode+\" in name \"+searchName+\" at \"+namePosition);\n }\n continue;\n } else if ((ch >= '2') && (ch <= '9')) {\n letter = Character.toString((char) (ch - 32));\n } else if ((ch >= 'a') && (ch <= 'z')) {\n letter = letter.toUpperCase(Locale.US);\n } else if (((ch >= 'A') && (ch <= 'Z')) || (ch == '0') || (ch == '1')) {\n // keep letter unchanged, but go through the code after the if-statement.\n } else {\n // not digits and letters, this can be symbols,\n // like '#', '%', etc.\n // ignore the characters that cannot map to pinyin or digits\n continue;\n }\n if (cachePyList.isEmpty()) {\n cachePyList.add(letter);\n } else {\n int prevCount = cachePyList.size();\n ArrayList<String> tempArray = new ArrayList<String>(prevCount);\n for (String pinyinItem : cachePyList) {\n tempArray.add(pinyinItem + letter);\n }\n cachePyList.clear();\n cachePyList.addAll(tempArray);\n }\n }\n\n }\n ArrayList<String> retArray = new ArrayList<String>();\n StringBuilder firstChar = new StringBuilder();\n StringBuilder t9Str = new StringBuilder();\n for (String cachePy : cachePyList) {\n t9Str.setLength(0);\n\n int strLettersLength = cachePy.length();\n boolean addedFirstChar = false;\n for (int i = 0; i < strLettersLength; i++) {\n char c = cachePy.charAt(i);\n if ((c >= 'a') && (c <= 'z')) {\n c = HanziUtil.Data_Letters_To_T9[c - 'a'];\n } else if ((c >= 'A') && (c <= 'Z')) {\n char temp = HanziUtil.Data_Letters_To_T9[c - 'A'];\n c = (char) (temp - 32);\n firstChar.append(c).append(i);\n addedFirstChar = true;\n /*} else if ((c >= '2') && (c <= '9')) {\n c -= 32;\n firstChar.append(c).append(i);\n addedFirstChar = true;\n useless code, no '2' to '9' will be left here. */\n } else {\n firstChar.append('\\u0001').append(i);\n addedFirstChar = true;\n }\n t9Str.append(c);\n }\n if (addedFirstChar) {\n firstChar.append(',');\n }\n\n retArray.add(t9Str.toString());\n }\n // If firstChar has contents, then it must end with ',',\n // we need to remove the ',' at tail.\n if (firstChar.length() > 0) {\n firstChar.deleteCharAt(firstChar.length() - 1);\n }\n ContactInMemory myContactInfo = getSearchTableShadow().get(key);\n if (myContactInfo == null) {\n myContactInfo = new ContactInMemory();\n getSearchTableShadow().put(key, myContactInfo);\n }\n\n Iterator<String> it = retArray.iterator();\n StringBuilder sb = new StringBuilder();\n while (it.hasNext()) {\n String element = it.next();\n sb.append(element);\n sb.append(',');\n }\n if (sb.length() != 0) {\n sb.setLength(sb.length() -1);\n }\n\n myContactInfo.pinyinData = sb.toString();\n myContactInfo.length = searchName.length();\n myContactInfo.version = version;\n myContactInfo.contactName = displayName;\n myContactInfo.phoneNumber = phoneNumber;\n myContactInfo.area = getArea(phoneNumber, context);\n\n if (myContactInfo.allFistCharacter == null) {\n myContactInfo.allFistCharacter = firstChar.toString();\n } else if (myContactInfo.allFistCharacter.length() > 0) {\n myContactInfo.allFistCharacter += \",\";\n myContactInfo.allFistCharacter += firstChar.toString();\n }\n myContactInfo.retArray = retArray;\n addToSearchMap(getSearchMapShadow(),retArray,key);\n return retArray;\n }", "private void createLookup() {\r\n\t\tcreateLooupMap(lookupMap, objectdef, objectdef.getName());\r\n\t\tcreateChildIndex(childIndex, objectdef, objectdef.getName());\r\n\r\n\t}", "private List<HashMap<String,String>> performQuery(Model model, String queryName) throws Exception {\n String sparqlQueryString = this.getQueryFromFile(queryName);\n\n //Parameterized Queries with Jena\n //see: https://jena.apache.org/documentation/query/parameterized-sparql-strings.html\n ParameterizedSparqlString pss = new ParameterizedSparqlString();\n pss.setCommandText(sparqlQueryString);\n\n //build the prefix for source and target before run the query\n\n String inputURIMetadata = Dictionary.AVAILABLE_ONTOLOGIES_HASH.get(myJob.getInputFormat());\n String outputURIMetadata = Dictionary.AVAILABLE_ONTOLOGIES_HASH.get(myJob.getOutputFormat());\n\n //Node file = NodeFactory.createURI(inputURIMetadata+ myJob.getSourceFile());\n //Node object = NodeFactory.createURI(inputURIMetadata+ myJob.getSourceOjbect());\n\n //set parameters for the query\n //pss.setParam(\"fileName\",file);\n //pss.setParam(\"object\",object);\n pss.setNsPrefix(\"metadataSource\", inputURIMetadata);\n pss.setNsPrefix(\"metadataTarget\", outputURIMetadata);\n\n //Prints query after parameter set up\n System.out.println(\"\\n\"+pss.toString());\n\n Query query = pss.asQuery();\n\n QueryExecution qexec = QueryExecutionFactory.create(query, model);\n ResultSetRewindable results = ResultSetFactory.makeRewindable(qexec.execSelect());\n\n if(results.hasNext()){\n List<HashMap<String,String>> resultsObject = new ArrayList<>();\n while (results.hasNext()){\n QuerySolution q = results.next();\n HashMap<String,String> rowMap = new HashMap<>();\n for(String attribute : results.getResultVars()){\n RDFNode obj = q.get(attribute);\n String value = obj.toString();\n rowMap.put(attribute,value);\n }\n System.out.println(rowMap);\n resultsObject.add(rowMap);\n }\n qexec.close() ;\n return resultsObject;\n }else{\n throw new Exception(\"No results\");\n }\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 }", "@RequestMapping(value = \"columns/{srcEnv}/{srcDB}/{table}\", method = {RequestMethod.GET})\n @ResponseBody\n public RestWrapper getColumsnList(@PathVariable(\"srcEnv\") String srcEnv, @PathVariable(\"srcDB\") String srcDB, @PathVariable(\"table\") String tableName) {\n RestWrapper restWrapper = null;\n LOGGER.info(srcEnv + \"srcEnvi\");\n LOGGER.info(srcDB + \"srcDB\");\n LOGGER.info(tableName + \"tableName\");\n try {\n Class.forName(driverName);\n connection = DriverManager.getConnection(\"jdbc:hive2://\" + srcEnv + \"/\" + srcDB.toLowerCase(), \"\", \"\");\n ResultSet rs = connection.createStatement().executeQuery(\"select * from \" + srcDB + \".\" + tableName +\" limit 1\");\n ResultSetMetaData metaData = rs.getMetaData();\n Map<String, String> databases = new HashMap<String, String>();\n List<Map<String,String>> columnList=new ArrayList<>();\n\n TableColumns[] tableColumns=new TableColumns[1000];\n for(int i=1; i<=metaData.getColumnCount();i++){\n String colName = metaData.getColumnLabel(i).replaceFirst(tableName.toLowerCase()+\".\", \"\");\n String datatype = metaData.getColumnTypeName(i);\n TableColumns t=new TableColumns();\n Map<String,String> m1=new HashMap<>();\n\n t.setColumnName(colName);\n t.setDataType(datatype);\n m1.put(\"columnName\", colName);\n m1.put(\"dataType\", datatype);\n columnList.add(m1);\n\n databases.put(colName,datatype);\n tableColumns[i-1]=t;\n }\n //System.out.println(\"databases = \" + databases);\n restWrapper = new RestWrapper(columnList, RestWrapperOptions.OK);\n } catch (Exception e) {\n LOGGER.error(\"error occured \" + e);\n restWrapper = new RestWrapper(e.getMessage(), RestWrapper.ERROR);\n }\n return restWrapper;\n }", "<V1> KTable<K, V1> mapValues(ValueMapper<V, V1> mapper);", "@Override\n protected void initResultTable() {\n }", "@Override\n protected Map<TableUniqueName, String> tableSubstitution() {\n return ImmutableMap.of();\n }", "protected abstract Collection<Cache> loadCaches();", "public static Map<String, Path> getTableStoreFilePathMap(Map<String, Path> resultMap,\n final FileSystem fs, final Path hbaseRootDir, TableName tableName, final PathFilter sfFilter,\n ExecutorService executor, final ProgressReporter progressReporter)\n throws IOException, InterruptedException {\n\n final Map<String, Path> finalResultMap =\n resultMap == null ? new ConcurrentHashMap<>(128, 0.75f, 32) : resultMap;\n\n // only include the directory paths to tables\n Path tableDir = CommonFSUtils.getTableDir(hbaseRootDir, tableName);\n // Inside a table, there are compaction.dir directories to skip. Otherwise, all else\n // should be regions.\n final FamilyDirFilter familyFilter = new FamilyDirFilter(fs);\n final Vector<Exception> exceptions = new Vector<>();\n\n try {\n List<FileStatus> regionDirs =\n FSUtils.listStatusWithStatusFilter(fs, tableDir, new RegionDirFilter(fs));\n if (regionDirs == null) {\n return finalResultMap;\n }\n\n final List<Future<?>> futures = new ArrayList<>(regionDirs.size());\n\n for (FileStatus regionDir : regionDirs) {\n if (null != progressReporter) {\n progressReporter.progress(regionDir);\n }\n final Path dd = regionDir.getPath();\n\n if (!exceptions.isEmpty()) {\n break;\n }\n\n Runnable getRegionStoreFileMapCall = new Runnable() {\n @Override\n public void run() {\n try {\n HashMap<String, Path> regionStoreFileMap = new HashMap<>();\n List<FileStatus> familyDirs =\n FSUtils.listStatusWithStatusFilter(fs, dd, familyFilter);\n if (familyDirs == null) {\n if (!fs.exists(dd)) {\n LOG.warn(\"Skipping region because it no longer exists: \" + dd);\n } else {\n LOG.warn(\"Skipping region because it has no family dirs: \" + dd);\n }\n return;\n }\n for (FileStatus familyDir : familyDirs) {\n if (null != progressReporter) {\n progressReporter.progress(familyDir);\n }\n Path family = familyDir.getPath();\n if (family.getName().equals(HConstants.RECOVERED_EDITS_DIR)) {\n continue;\n }\n // now in family, iterate over the StoreFiles and\n // put in map\n FileStatus[] familyStatus = fs.listStatus(family);\n for (FileStatus sfStatus : familyStatus) {\n if (null != progressReporter) {\n progressReporter.progress(sfStatus);\n }\n Path sf = sfStatus.getPath();\n if (sfFilter == null || sfFilter.accept(sf)) {\n regionStoreFileMap.put(sf.getName(), sf);\n }\n }\n }\n finalResultMap.putAll(regionStoreFileMap);\n } catch (Exception e) {\n LOG.error(\"Could not get region store file map for region: \" + dd, e);\n exceptions.add(e);\n }\n }\n };\n\n // If executor is available, submit async tasks to exec concurrently, otherwise\n // just do serial sync execution\n if (executor != null) {\n Future<?> future = executor.submit(getRegionStoreFileMapCall);\n futures.add(future);\n } else {\n FutureTask<?> future = new FutureTask<>(getRegionStoreFileMapCall, null);\n future.run();\n futures.add(future);\n }\n }\n\n // Ensure all pending tasks are complete (or that we run into an exception)\n for (Future<?> f : futures) {\n if (!exceptions.isEmpty()) {\n break;\n }\n try {\n f.get();\n } catch (ExecutionException e) {\n LOG.error(\"Unexpected exec exception! Should've been caught already. (Bug?)\", e);\n // Shouldn't happen, we already logged/caught any exceptions in the Runnable\n }\n }\n } catch (IOException e) {\n LOG.error(\"Cannot execute getTableStoreFilePathMap for \" + tableName, e);\n exceptions.add(e);\n } finally {\n if (!exceptions.isEmpty()) {\n // Just throw the first exception as an indication something bad happened\n // Don't need to propagate all the exceptions, we already logged them all anyway\n Throwables.propagateIfPossible(exceptions.firstElement(), IOException.class);\n throw new IOException(exceptions.firstElement());\n }\n }\n\n return finalResultMap;\n }", "public UPOSMapper(String mappingFile){\n map = new ConcurrentHashMap<>();\n try {\n for(String line: Files.readAllLines(Paths.get(mappingFile))){\n line = line.trim();\n if(line.isEmpty()) continue;\n String[] tags = line.split(\"\\t\");\n map.put(tags[0], tags[1]);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic <T> Map<String, T> get(Collection<String> arg0, Transcoder<T> arg1)\n\t\t\tthrows TimeoutException, InterruptedException, MemcachedException {\n\t\treturn null;\n\t}", "@SuppressWarnings({\"unchecked\", \"fallthrough\"})\n public static Class<? extends DataObject> modelFromTables(Connection connection, String classname, Action action, String... tablenames) throws Exception {\n\n /*\n SQL generation\n\n INSERT INTO T ( cols ) VALUES ( vals );\n UPDATE T SET cols WHERE vals;\n DELETE FROM T WHERE vals;\n SELECT * FROM cols WHERE vals;\n */\n\n ClassPool pool = ClassPool.getDefault();\n // this line is necessary for web applications (web container class loader in play)\n pool.appendClassPath(new LoaderClassPath(org.xillium.data.DataObject.class.getClassLoader()));\n\n CtClass cc = pool.makeClass(classname);\n cc.addInterface(pool.getCtClass(\"org.xillium.data.DataObject\"));\n ConstPool cp = cc.getClassFile().getConstPool();\n\n List<String> fragments = new ArrayList<String>();\n Set<String> unique = new HashSet<String>();\n\n/*SQL*/ StringBuilder\n cols = new StringBuilder(), // CREATE: COLUMNS, RETRIEVE: TABLES, UPDATE: SET CLAUSES, DELETE: (not used), SEARCH: TABLES\n vals = new StringBuilder(), // CREATE: VALUES, RETRIEVE: COND'S, UPDATE: COND'S, DELETE: COND'S, SEARCH: COND'S\n flds = new StringBuilder();\n\n // for SEARCH only\n Map<String, List<Pair<Integer, Integer>>> voptional = new HashMap<String, List<Pair<Integer, Integer>>>();\n Map<String, List<Pair<Integer, Integer>>> foptional = new HashMap<String, List<Pair<Integer, Integer>>>();\n Map<String, String> nametrans = new HashMap<String, String>();\n\n DatabaseMetaData meta = connection.getMetaData();\n String schema = meta.getUserName();\n List<String> dominant = new ArrayList<String>();\n\n for (int i = 0; i < tablenames.length; ++i) {\n // Dominant tables are recognized and maintained in 'dominant' list\n if (tablenames[i].charAt(0) == DOMINANT_INDICATOR) {\n tablenames[i] = tablenames[i].substring(1);\n dominant.add(tablenames[i]);\n }\n\n PreparedStatement stmt = connection.prepareStatement(\"SELECT * FROM \" + tablenames[i]);\n ResultSetMetaData rsmeta = stmt.getMetaData();\n Map<String, Integer> colref = new HashMap<String, Integer>();\n for (int j = 1, jj = rsmeta.getColumnCount(); j <= jj; ++j) {\n colref.put(rsmeta.getColumnLabel(j), new Integer(j));\n }\n\n Set<String> primaryKeys = new HashSet<String>();\n ResultSet keys = meta.getPrimaryKeys(connection.getCatalog(), schema, tablenames[i]);\n while (keys.next()) {\n primaryKeys.add(keys.getString(PKEY_COLUMN));\n }\n keys.close();\n\n // RETRIEVE is not compatible with tables without a primary key\n if (primaryKeys.isEmpty() && action.op == Operation.RETRIEVE) {\n throw new RuntimeException(\"Primary key expected for RETRIEVE command, but missing on table \" + tablenames[i]);\n }\n\n // ISA keys and table join conditions\n Set<String> isaKeys = new HashSet<String>();\n if (i > 0) {\n keys = meta.getImportedKeys(connection.getCatalog(), schema, tablenames[i]);\n while (keys.next()) {\n String jointable = null;\n for (int j = 0; j < i; ++j) {\n if (keys.getString(FKEY_REFERENCED_TABLE).equals(tablenames[j])) {\n jointable = tablenames[j];\n break;\n }\n }\n if (jointable != null) {\n String column = keys.getString(FKEY_REFERENCING_COLUMN);\n isaKeys.add(column);\n if (action.op == Operation.RETRIEVE || action.op == Operation.SEARCH) {\n /*SQL*/ vals.append(tablenames[i]).append('.').append(column).append('=').append(jointable).append('.').append(column).append(\" AND \");\n }\n }\n }\n keys.close();\n }\n\n String alias = ((action.op == Operation.RETRIEVE || action.op == Operation.SEARCH) && tablenames.length > 1) ? tablenames[i]+'.' : \"\";\n\n if (action.op != Operation.RETRIEVE && action.op != Operation.SEARCH) {\n cols.setLength(0);\n vals.setLength(0);\n flds.setLength(0);\n } else {\n /*SQL*/ if (cols.length() > 0) cols.append(',');\n /*SQL*/ cols.append(tablenames[i]);\n }\n\n // Go through all columns in action.args for UPDATE and SEARCH operations\n Set<String> requested = new HashSet<String>();\n Set<String> required = new HashSet<String>();\n if (action.op == Operation.UPDATE) {\n // UPDATE: the elements in the SET clause => cols\n for (String column: calcUpdateColumns(action.args, colref, primaryKeys)) {\n // skip all key columns, which might be legally included through the restriction list\n if (primaryKeys.contains(column)) continue;\n // ... and SET others\n Integer idx = colref.get(column);\n if (idx != null) {\n /*SQL*/ if (cols.length() > 0) cols.append(',');\n /*SQL*/ String restriction = action.restriction == null ? null : action.restriction.get(column);\n if (restriction == null) {\n boolean reqd = action.isRequired(column);\n if (reqd) {\n /*SQL*/ cols.append(column).append(\"=?\");\n } else {\n /*SQL*/ cols.append(column).append(\"=COALESCE(?,\").append(column).append(')');\n }\n /*SQL*/ if (flds.length() > 0) flds.append(',');\n flds.append(fieldName(tablenames[i], column)).append(':').append(rsmeta.getColumnType(idx.intValue()));\n requested.add(column);\n if (reqd) required.add(column);\n } else {\n /*SQL*/ cols.append(column).append('=').append(restriction);\n }\n }\n }\n } else if (action.op == Operation.SEARCH && action.args != null) {\n // SEARCH: the elements in the WHERE clause => vals\n for (int c = 0; c < action.args.length; ++c) {\n // skip all ISA columns, which might be legally included through the restriction list\n if (isaKeys.contains(action.args[c])) continue;\n // else ...\n Integer idx = colref.get(action.args[c]);\n if (idx != null) {\n /*SQL*/ String restriction = action.restriction == null ? null : action.restriction.get(action.args[c]);\n /*SQL*/ if (restriction == null || restriction.charAt(0) == NEGATIVE_INDICATOR) {\n if (restriction != null) {\n /*SQL*/ vals.append(tablenames[i]).append('.').append(action.args[c]).append(\"<>\").append(restriction.substring(1)).append(\" AND \");\n }\n int vstart = vals.length(), fstart = flds.length();\n /*SQL*/ vals.append(tablenames[i]).append('.').append(action.args[c]).append(action.cmps[c]).append(\"? AND \");\n flds.append(fieldName(tablenames[i], action.args[c])).append(':').append(rsmeta.getColumnType(idx.intValue())).append(',');\n if (!action.reqd[c]) {\n traceOptional(voptional, action.args[c], vstart, vals.length());\n traceOptional(foptional, action.args[c], fstart, flds.length());\n }\n requested.add(action.args[c]);\n if (action.reqd[c]) required.add(action.args[c]);\n } else {\n /*SQL*/ vals.append(tablenames[i]).append('.').append(action.args[c]).append('=').append(restriction).append(\" AND \");\n }\n }\n }\n }\n\n ResultSet columns = meta.getColumns(connection.getCatalog(), schema, tablenames[i], \"%\");\n columns:while (columns.next()) {\n String name = columns.getString(COLUMN_NAME), fname = fieldName(tablenames[i], name);\n int idx = colref.get(name).intValue();\n\n if ((action.op == Operation.RETRIEVE || action.op == Operation.DELETE) && !primaryKeys.contains(name)) {\n continue;\n } else if (action.op == Operation.UPDATE && !requested.contains(name) && !primaryKeys.contains(name)) {\n continue;\n } else if (action.op == Operation.SEARCH && !requested.contains(name)) {\n continue;\n }\n\n /*SQL*/ String restriction = action.restriction == null ? null : action.restriction.get(name);\n switch (action.op) {\n case CREATE:\n if (action.args != null) for (int j = 0; j < action.args.length; ++j) {\n if (action.args[j].equals(name)) continue columns;\n }\n /*SQL*/ if (cols.length() > 0) {\n /*SQL*/ cols.append(',');\n /*SQL*/ vals.append(',');\n /*SQL*/ }\n /*SQL*/ cols.append(name);\n /*SQL*/ if (restriction == null || restriction.charAt(0) == NEGATIVE_INDICATOR) {\n /*SQL*/ vals.append('?');\n /*SQL*/ if (flds.length() > 0) flds.append(',');\n flds.append(fname).append(':').append(rsmeta.getColumnType(idx));\n } else {\n /*SQL*/ vals.append(restriction);\n }\n break;\n case RETRIEVE:\n if (i > 0) {\n // NOTE: ISA relation dictates that sub-tables' primary key == super-table's primary key\n // therefore the join condition generated above is sufficient already\n break;\n }\n // fall through for the super-table\n case DELETE:\n // only primary key columns\n generateCondition(restriction, vals, flds, alias + name, fname, rsmeta.getColumnType(idx));\n break;\n case UPDATE:\n // only primary key & updating columns\n if (primaryKeys.contains(name)) {\n generateCondition(restriction, vals, flds, name, fname, rsmeta.getColumnType(idx));\n }\n break;\n case SEARCH:\n // file optionals lists under field names\n nametrans.put(name, fname);\n voptional.put(fname, voptional.get(name));\n foptional.put(fname, foptional.get(name));\n break;\n }\n\n if ((restriction != null && restriction.charAt(0) != NEGATIVE_INDICATOR) || isaKeys.contains(name)) {\n continue;\n } else if (unique.contains(name)) {\n continue;\n //throw new RuntimeException(\"Duplicate column in ISA relationship detected \" + tablenames[i] + ':' + name);\n } else {\n unique.add(name);\n }\n\n CtField field = new CtField(pool.getCtClass(MetaDataHelper.getClassName(rsmeta, idx)), fname, cc);\n field.setModifiers(java.lang.reflect.Modifier.PUBLIC);\n AnnotationsAttribute attr = new AnnotationsAttribute(cp, AnnotationsAttribute.visibleTag);\n\n if (required.contains(name)) {\n addAnnotation(attr, cp, \"org.xillium.data.validation.required\");\n } else if (columns.getInt(IS_NULLABLE) == DatabaseMetaData.attributeNoNulls) {\n if ((action.op != Operation.UPDATE || primaryKeys.contains(name)) && action.op != Operation.SEARCH) {\n addAnnotation(attr, cp, \"org.xillium.data.validation.required\");\n }\n }\n\n if (rsmeta.getPrecision(idx) != 0) {\n addAnnotation(attr, cp, \"org.xillium.data.validation.size\", \"value\", new IntegerMemberValue(cp, rsmeta.getPrecision(idx)));\n }\n\n addAnnotation(attr, cp, \"org.xillium.data.persistence.crud.tablename\", \"value\", new StringMemberValue(tablenames[i], cp));\n\n field.getFieldInfo().addAttribute(attr);\n cc.addField(field);\n }\n columns.close();\n stmt.close();\n\n switch (action.op) {\n case CREATE:\n fragments.add(\"org.xillium.data.persistence.ParametricStatement\");\n fragments.add(flds.toString());\n fragments.add(\"INSERT INTO \" + tablenames[i] + '(' + cols.toString() + \") VALUES(\" + vals.toString() + ')');\n fragments.add(Strings.toCamelCase(tablenames[i], '_'));\n break;\n case UPDATE:\n if (cols.length() > 0) {\n fragments.add(\"org.xillium.data.persistence.ParametricStatement\");\n fragments.add(flds.toString());\n fragments.add(\"UPDATE \" + tablenames[i] + \" SET \" + cols.toString() + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n fragments.add(Strings.toCamelCase(tablenames[i], '_'));\n }\n break;\n case DELETE:\n fragments.add(\"org.xillium.data.persistence.ParametricStatement\");\n fragments.add(flds.toString());\n fragments.add(\"DELETE FROM \" + tablenames[i] + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n fragments.add(Strings.toCamelCase(tablenames[i], '_'));\n break;\n case RETRIEVE:\n case SEARCH:\n break;\n }\n }\n\n if (action.op == Operation.RETRIEVE) {\n fragments.add(\"org.xillium.data.persistence.ParametricQuery\");\n fragments.add(flds.toString());\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n fragments.add(\"\");\n } else if (action.op == Operation.SEARCH) {\n if (action.opts != null) {\n for (int i = 0; i < action.opts.length; ++i) {\n action.opts[i] = nametrans.get(action.opts[i]);\n }\n int count = 1 << action.opts.length;\n\n String vtext = vals.toString(), ftext = flds.toString();\n for (int i = 0; i < count; ++i) {\n char[] vchars = vtext.toCharArray(), fchars = ftext.toCharArray();\n for (int j = 0; j < action.opts.length; ++j) {\n List<Pair<Integer, Integer>> vlist = voptional.get(action.opts[j]);\n List<Pair<Integer, Integer>> flist = foptional.get(action.opts[j]);\n if (vlist == null || flist == null) {\n throw new RuntimeException(\"Column{\"+action.opts[j]+\"}NotInRelevantTables\");\n }\n if ((i & (1 << j)) == 0) {\n for (Pair<Integer, Integer> part: vlist) Arrays.fill(vchars, part.first, part.second, ' ');\n for (Pair<Integer, Integer> part: flist) Arrays.fill(fchars, part.first, part.second, ' ');\n }\n }\n\n fragments.add(\"org.xillium.data.persistence.ParametricQuery\");\n fragments.add(new String(fchars).replaceAll(\"\\\\s+\", \" \"));\n String vals0 = new String(vchars).replaceAll(\"\\\\s+\", \" \").replaceAll(\" AND *$\", \"\").trim();\n if (vals0.length() > 0) {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols + \" WHERE \" + vals0);\n } else {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols);\n }\n fragments.add(\"\");\n }\n } else {\n fragments.add(\"org.xillium.data.persistence.ParametricQuery\");\n fragments.add(flds.toString());\n if (vals.length() > 0) {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n } else {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols);\n }\n fragments.add(\"\");\n }\n }\n\n CtField field = new CtField(pool.getCtClass(\"org.xillium.data.persistence.ParametricStatement[]\"), STATEMENT_FIELD_NAME, cc);\n field.setModifiers(java.lang.reflect.Modifier.PUBLIC | java.lang.reflect.Modifier.STATIC | java.lang.reflect.Modifier.FINAL);\n cc.addField(field, CtField.Initializer.byCallWithParams(\n pool.getCtClass(CrudCommand.class.getName()), \"buildStatements\", fragments.toArray(new String[fragments.size()])\n ));\n\n return (Class<? extends DataObject>)cc.toClass(CrudCommand.class.getClassLoader(), CrudCommand.class.getProtectionDomain());\n }", "Map<GroupKey, List<Result>> get(String userName,\n List<AbstractFilter> filters,\n DiscoveryAttributes.AttributeType groupAttributeType,\n Group.GroupSortingAlgorithm groupSortingType,\n ResultsSorter.SortingMethod domainSortingMethod,\n SleuthkitCase caseDb, CentralRepository centralRepoDb) throws DiscoveryException {\n try {\n final SearchKey searchKey = new SearchKey(userName, filters, groupAttributeType,\n groupSortingType, domainSortingMethod, caseDb, centralRepoDb);\n return cache.get(searchKey);\n } catch (ExecutionException ex) {\n throw new DiscoveryException(\"Error fetching results from cache\", ex.getCause());\n }\n }", "private static void loadCache(IgniteCache<Long, Person> cache) {\n long start = System.currentTimeMillis();\n\n // Start loading cache from persistent store on all caching nodes.\n cache.loadCache(null, ENTRY_COUNT);\n\n long end = System.currentTimeMillis();\n\n System.out.println(\">>> Loaded \" + cache.size() + \" keys with backups in \" + (end - start) + \"ms.\");\n }", "@Test\n public void doGetTable()\n throws Exception\n {\n logger.info(\"doGetTable - enter\");\n\n // Mock mapping.\n Schema mockMapping = SchemaBuilder.newBuilder()\n .addField(\"mytext\", Types.MinorType.VARCHAR.getType())\n .addField(\"mykeyword\", Types.MinorType.VARCHAR.getType())\n .addField(new Field(\"mylong\", FieldType.nullable(Types.MinorType.LIST.getType()),\n Collections.singletonList(new Field(\"mylong\",\n FieldType.nullable(Types.MinorType.BIGINT.getType()), null))))\n .addField(\"myinteger\", Types.MinorType.INT.getType())\n .addField(\"myshort\", Types.MinorType.SMALLINT.getType())\n .addField(\"mybyte\", Types.MinorType.TINYINT.getType())\n .addField(\"mydouble\", Types.MinorType.FLOAT8.getType())\n .addField(new Field(\"myscaled\",\n new FieldType(true, Types.MinorType.BIGINT.getType(), null,\n ImmutableMap.of(\"scaling_factor\", \"10.0\")), null))\n .addField(\"myfloat\", Types.MinorType.FLOAT4.getType())\n .addField(\"myhalf\", Types.MinorType.FLOAT4.getType())\n .addField(\"mydatemilli\", Types.MinorType.DATEMILLI.getType())\n .addField(\"mydatenano\", Types.MinorType.DATEMILLI.getType())\n .addField(\"myboolean\", Types.MinorType.BIT.getType())\n .addField(\"mybinary\", Types.MinorType.VARCHAR.getType())\n .addField(\"mynested\", Types.MinorType.STRUCT.getType(), ImmutableList.of(\n new Field(\"l1long\", FieldType.nullable(Types.MinorType.BIGINT.getType()), null),\n new Field(\"l1date\", FieldType.nullable(Types.MinorType.DATEMILLI.getType()), null),\n new Field(\"l1nested\", FieldType.nullable(Types.MinorType.STRUCT.getType()), ImmutableList.of(\n new Field(\"l2short\", FieldType.nullable(Types.MinorType.LIST.getType()),\n Collections.singletonList(new Field(\"l2short\",\n FieldType.nullable(Types.MinorType.SMALLINT.getType()), null))),\n new Field(\"l2binary\", FieldType.nullable(Types.MinorType.VARCHAR.getType()),\n null))))).build();\n\n // Real mapping.\n LinkedHashMap<String, Object> mapping = new ObjectMapper().readValue(\n \"{\\n\" +\n \" \\\"mishmash\\\" : {\\n\" + // Index: mishmash\n \" \\\"mappings\\\" : {\\n\" +\n \" \\\"_meta\\\" : {\\n\" + // _meta:\n \" \\\"mynested.l1nested.l2short\\\" : \\\"list\\\",\\n\" + // mynested.l1nested.l2short: LIST<SMALLINT>\n \" \\\"mylong\\\" : \\\"list\\\"\\n\" + // mylong: LIST<BIGINT>\n \" },\\n\" +\n \" \\\"properties\\\" : {\\n\" +\n \" \\\"mybinary\\\" : {\\n\" + // mybinary:\n \" \\\"type\\\" : \\\"binary\\\"\\n\" + // type: binary (VARCHAR)\n \" },\\n\" +\n \" \\\"myboolean\\\" : {\\n\" + // myboolean:\n \" \\\"type\\\" : \\\"boolean\\\"\\n\" + // type: boolean (BIT)\n \" },\\n\" +\n \" \\\"mybyte\\\" : {\\n\" + // mybyte:\n \" \\\"type\\\" : \\\"byte\\\"\\n\" + // type: byte (TINYINT)\n \" },\\n\" +\n \" \\\"mydatemilli\\\" : {\\n\" + // mydatemilli:\n \" \\\"type\\\" : \\\"date\\\"\\n\" + // type: date (DATEMILLI)\n \" },\\n\" +\n \" \\\"mydatenano\\\" : {\\n\" + // mydatenano:\n \" \\\"type\\\" : \\\"date_nanos\\\"\\n\" + // type: date_nanos (DATEMILLI)\n \" },\\n\" +\n \" \\\"mydouble\\\" : {\\n\" + // mydouble:\n \" \\\"type\\\" : \\\"double\\\"\\n\" + // type: double (FLOAT8)\n \" },\\n\" +\n \" \\\"myfloat\\\" : {\\n\" + // myfloat:\n \" \\\"type\\\" : \\\"float\\\"\\n\" + // type: float (FLOAT4)\n \" },\\n\" +\n \" \\\"myhalf\\\" : {\\n\" + // myhalf:\n \" \\\"type\\\" : \\\"half_float\\\"\\n\" + // type: half_float (FLOAT4)\n \" },\\n\" +\n \" \\\"myinteger\\\" : {\\n\" + // myinteger:\n \" \\\"type\\\" : \\\"integer\\\"\\n\" + // type: integer (INT)\n \" },\\n\" +\n \" \\\"mykeyword\\\" : {\\n\" + // mykeyword:\n \" \\\"type\\\" : \\\"keyword\\\"\\n\" + // type: keyword (VARCHAR)\n \" },\\n\" +\n \" \\\"mylong\\\" : {\\n\" + // mylong: LIST\n \" \\\"type\\\" : \\\"long\\\"\\n\" + // type: long (BIGINT)\n \" },\\n\" +\n \" \\\"mynested\\\" : {\\n\" + // mynested: STRUCT\n \" \\\"properties\\\" : {\\n\" +\n \" \\\"l1date\\\" : {\\n\" + // mynested.l1date:\n \" \\\"type\\\" : \\\"date_nanos\\\"\\n\" + // type: date_nanos (DATEMILLI)\n \" },\\n\" +\n \" \\\"l1long\\\" : {\\n\" + // mynested.l1long:\n \" \\\"type\\\" : \\\"long\\\"\\n\" + // type: long (BIGINT)\n \" },\\n\" +\n \" \\\"l1nested\\\" : {\\n\" + // mynested.l1nested: STRUCT\n \" \\\"properties\\\" : {\\n\" +\n \" \\\"l2binary\\\" : {\\n\" + // mynested.l1nested.l2binary:\n \" \\\"type\\\" : \\\"binary\\\"\\n\" + // type: binary (VARCHAR)\n \" },\\n\" +\n \" \\\"l2short\\\" : {\\n\" + // mynested.l1nested.l2short: LIST\n \" \\\"type\\\" : \\\"short\\\"\\n\" + // type: short (SMALLINT)\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" },\\n\" +\n \" \\\"myscaled\\\" : {\\n\" + // myscaled:\n \" \\\"type\\\" : \\\"scaled_float\\\",\\n\" + // type: scaled_float (BIGINT)\n \" \\\"scaling_factor\\\" : 10.0\\n\" + // factor: 10\n \" },\\n\" +\n \" \\\"myshort\\\" : {\\n\" + // myshort:\n \" \\\"type\\\" : \\\"short\\\"\\n\" + // type: short (SMALLINT)\n \" },\\n\" +\n \" \\\"mytext\\\" : {\\n\" + // mytext:\n \" \\\"type\\\" : \\\"text\\\"\\n\" + // type: text (VARCHAR)\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \"}\\n\", LinkedHashMap.class);\n LinkedHashMap<String, Object> index = (LinkedHashMap<String, Object>) mapping.get(\"mishmash\");\n LinkedHashMap<String, Object> mappings = (LinkedHashMap<String, Object>) index.get(\"mappings\");\n\n when(mockClient.getMapping(nullable(String.class))).thenReturn(mappings);\n\n // Get real mapping.\n when(domainMapProvider.getDomainMap(null)).thenReturn(ImmutableMap.of(\"movies\",\n \"https://search-movies-ne3fcqzfipy6jcrew2wca6kyqu.us-east-1.es.amazonaws.com\"));\n handler = new ElasticsearchMetadataHandler(awsGlue, new LocalKeyFactory(), awsSecretsManager, amazonAthena,\n \"spill-bucket\", \"spill-prefix\", domainMapProvider, clientFactory, 10, com.google.common.collect.ImmutableMap.of());\n GetTableRequest req = new GetTableRequest(fakeIdentity(), \"queryId\", \"elasticsearch\",\n new TableName(\"movies\", \"mishmash\"));\n GetTableResponse res = handler.doGetTable(allocator, req);\n Schema realMapping = res.getSchema();\n\n logger.info(\"doGetTable - {}\", res);\n\n // Test1 - Real mapping must NOT be empty.\n assertTrue(\"Real mapping is empty!\", realMapping.getFields().size() > 0);\n // Test2 - Real and mocked mappings must have the same fields.\n assertTrue(\"Real and mocked mappings are different!\",\n ElasticsearchSchemaUtils.mappingsEqual(realMapping, mockMapping));\n\n logger.info(\"doGetTable - exit\");\n }", "@Override\n\tpublic <T> Map<String, GetsResponse<T>> gets(Collection<String> arg0,\n\t\t\tTranscoder<T> arg1) throws TimeoutException, InterruptedException,\n\t\t\tMemcachedException {\n\t\treturn null;\n\t}", "protected void populateResourceTypeAndParameterNameTableEntries(Integer tenantId) {\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try (Connection c = connectionPool.getConnection();) {\n String logTenantId = tenantId != null ? Integer.toString(tenantId) : \"default\";\n logger.info(\"tenantId [\" + logTenantId + \"] is being pre-populated with lookup table data.\");\n PopulateResourceTypes populateResourceTypes =\n new PopulateResourceTypes(adminSchemaName, schemaName, tenantId);\n populateResourceTypes.run(translator, c);\n\n PopulateParameterNames populateParameterNames =\n new PopulateParameterNames(adminSchemaName, schemaName, tenantId);\n populateParameterNames.run(translator, c);\n logger.info(\"Finished prepopulating the resource type and search parameter code/name tables tables\");\n } catch (SQLException ex) {\n tx.setRollbackOnly();\n throw new DataAccessException(ex);\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n }", "public static String[] getNameMapTable(RConnection RC) {\n try {\n String rCommand = \"CreateMappingResultTable(NA)\";\n String[] resTable = RC.eval(rCommand).asStrings();\n RCenter.recordRCommand(RC, rCommand);\n return resTable;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "public static void main(String[] args)\n {\n\tScanner sc = new Scanner(System.in);\n\tSystem.out.println(\"enter cache size in KB among (1, 2, 4, 8, 16, 32)\");\n\tint cacheSize = sc.nextInt();\n\tSystem.out.println(\"enter way associative value among(1,2,4,8)\");\n\tint wayAssociative = sc.nextInt();\n\tSystem.out.println(\"enter cache line size in bytes among(2,4,8,16,32,64)\");\n\tint cacheLineSize = sc.nextInt();\n\tsc.close();\n\n\tlong count_hit = 0, count_miss = 0;\n\tlong count_hit_2 = 0, count_miss_2 = 0, clockCycle_2 = 0;\n\tlong count_hit_4 = 0, count_miss_4 = 0, clockCycle_4 = 0;\n\tlong count_hit_8 = 0, count_miss_8 = 0, clockCycle_8 = 0;\n\n\tint numberOfCacheLines = (int) ((cacheSize * 1024) / cacheLineSize);\n\n\tArrayList<String> cacheKeys = new ArrayList<String>(numberOfCacheLines);\n\tArrayList<String> cacheValues = new ArrayList<String>(numberOfCacheLines);\n\tArrayList<String> cacheKeys_0 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_0 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_1 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_1 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_2 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_2 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_3 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_3 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_4 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_4 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_5 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_5 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_6 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_6 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheKeys_7 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\tArrayList<String> cacheValues_7 = new ArrayList<String>(numberOfCacheLines / wayAssociative);\n\n\tlong clockCycle = 0;\n\n\tStringBuilder y = new StringBuilder(\"\");\n\n\t// creating main memory array to store all addresses in a 2d\n\t// array..mapping one\n\t// letter into one width length only..1 to 1 mapping.\n\t// so 2 width is one byte..to get value do block offset*2\n\tString[][] mainMemory = new String[1743][32];\n\tfor (int i = 0; i < 1743; i++)\n\t{\n\t for (int j = 0; j < 32; j++)\n\t {\n\t\tmainMemory[i][j] = \"\";\n\t }\n\t}\n\ttry\n\t{\n\t // read all input files\n\t\tString instructionAddresses = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_addr_trace_hex_project_1.txt\")));\n\t\tString dataSizes = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_data_size_project_1.txt\")));\n\t\tString memoryAddresses = new String(\n\t\t\t\tFiles.readAllBytes(Paths\n\t\t\t\t\t\t.get(\"/Users/akashmalla/Documents/COEN210_Computer_Architecture/project1/inst_mem_hex_16byte_wide.txt\")));\n\t\t// copy all memory addresses into the 2d mainMemory array\n\t\t// split into each line of address\n\n\t String[] memoryAddress = memoryAddresses.split(\"\\\\s+\");\n\t for (int i = 0; i < 1743; i++)\n\t {\n\t\t// split address into each letter\n\t\tString[] oneBit = memoryAddress[i].split(\"\");\n\n\t\tint z = -1;\n\n\t\tfor (int q = oneBit.length - 1; q >= 0; q--)\n\t\t{\n\t\t z++;\n\t\t // store each letter into the array as hex\n\t\t mainMemory[i][q] = oneBit[z];\n\t\t}\n\t }\n\n\t // splitting the instruction addresses into lines\n\t String[] instructionAddress = instructionAddresses.split(\"\\\\s+\");\n\n\t // splitting dataSizes to get length of each data\n\t String[] dataSize = dataSizes.split(\"\\\\s+\");\n\t for (int i = 0; i < instructionAddress.length; i++)\n\t {\n\t\ttry\n\t\t{\n\t\t String binaryIs = \"\";\n\t\t String binaryOffset = \"\";\n\t\t String blockNumber = \"\";\n\t\t if (Integer.parseInt(instructionAddress[i], 16) > 15)\n\t\t {\n\t\t\tbinaryIs = Integer.toBinaryString(Integer.parseInt(instructionAddress[i], 16));\n\t\t\tbinaryOffset = binaryIs.substring(binaryIs.length() - 4);\n\t\t\tblockNumber = binaryIs.substring(0, binaryIs.length() - 4);\n\t\t } else\n\t\t {\n\n\t\t\tblockNumber = \"0\";\n\t\t\tbinaryOffset = Integer.toBinaryString(Integer.parseInt(instructionAddress[i], 16));\n\t\t }\n\n\t\t // check if hit or miss for 1 way\n\t\t if (wayAssociative == 1)\n\t\t {\n\n\t\t\tif (cacheKeys.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t{\n\t\t\t // cache hit situation\n\t\t\t count_hit++;\n\t\t\t clockCycle++;\n\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t // cache miss\n\t\t\t count_miss++;\n\t\t\t clockCycle += 15;\n\n\t\t\t // replacement for direct mapping.\n\n\t\t\t int newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t int newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t int length = Integer.parseInt(dataSize[i]);\n\n\t\t\t y.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t int p = -1, beta = 0;\n\t\t\t for (int alpha = 1; alpha < length; alpha++)\n\t\t\t {\n\n\t\t\t\tif ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t{\n\n\t\t\t\t newBlockNumber_Value++;\n\t\t\t\t newOffset_StartingPosition = 0;\n\t\t\t\t beta = length - alpha;\n\n\t\t\t\t if (p < beta)\n\t\t\t\t {\n\t\t\t\t\tp++;\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t }\n\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t y.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t}\n\t\t\t }\n\n\t\t\t y = y.reverse();\n\n\t\t\t // if y is more than one byte then put it in next cache line\n\t\t\t if (y.length() > 4)\n\t\t\t {\n\n\t\t\t\tfor (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t{\n\t\t\t\t String yy = y.substring(o, o + 4);\n\n\t\t\t\t cacheKeys.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t cacheValues.add(yy);\n\n\t\t\t\t}\n\t\t\t } else\n\t\t\t {\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\t\t\t\t cacheKeys.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t cacheValues.add(y.toString());\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t}\n\n\t\t\ty.delete(0, y.length());\n\n\t\t }\n\n\t\t else if (wayAssociative > 1)\n\t\t {\n\n\t\t\tif (wayAssociative == 2)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_1.contains(blockNumber + \",\" + binaryOffset)))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_2++;\n\t\t\t\tclockCycle_2++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_2++;\n\t\t\t\tclockCycle_2 += 15;\n\n\t\t\t\t// replacement\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (i % wayAssociative == 0)\n\t\t\t\t{\n\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tif (cacheKeys.size() <= numberOfCacheLines)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\t cacheValues_0.add(yy);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t\telse if (i % wayAssociative == 1)\n\t\t\t\t{\n\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t\t// way =4\n\t\t\tif (wayAssociative == 4)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_1.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_2.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_4++;\n\t\t\t\tclockCycle_4++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_4++;\n\t\t\t\tclockCycle_4 += 15;\n\n\t\t\t\t// replacement\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\n\t\t\t\t if (i % wayAssociative == 0)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_0.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 1\n\t\t\t\t else if (i % wayAssociative == 1)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 2\n\t\t\t\t else if (i % wayAssociative == 2)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(y.toString());\n\t\t\t\t\t } else\n\t\t\t\t\t {\n\t\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // mmod 3\n\t\t\t\t else if (i % wayAssociative == 3)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t\telse if (wayAssociative == 8)\n\t\t\t{\n\n\t\t\t if (cacheKeys_0.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_1.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_3.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || cacheKeys_4.contains(blockNumber + \",\" + binaryOffset)\n\t\t\t\t || (cacheKeys_5.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_7.contains(blockNumber + \",\" + binaryOffset))\n\t\t\t\t || (cacheKeys_6.contains(blockNumber + \",\" + binaryOffset)))\n\t\t\t {\n\t\t\t\t// cache hit situation\n\t\t\t\tcount_hit_8++;\n\t\t\t\tclockCycle_8++;\n\n\t\t\t }\n\n\t\t\t else\n\t\t\t {\n\t\t\t\t// cache miss\n\t\t\t\tcount_miss_8++;\n\t\t\t\tclockCycle_8 += 15;\n\n\t\t\t\t// replacement\n\n\t\t\t\tint newBlockNumber_Value = Integer.parseInt(blockNumber, 2);\n\t\t\t\tint newOffset_StartingPosition = (Integer.parseInt(binaryOffset, 2) * 2);\n\t\t\t\tint length = Integer.parseInt(dataSize[i]);\n\n\t\t\t\ty.append(mainMemory[newBlockNumber_Value][newOffset_StartingPosition]);\n\n\t\t\t\tint p = -1, beta = 0;\n\t\t\t\tfor (int alpha = 1; alpha < length; alpha++)\n\t\t\t\t{\n\n\t\t\t\t if ((alpha + newOffset_StartingPosition) % 31 == 0)\n\t\t\t\t {\n\n\t\t\t\t\tnewBlockNumber_Value++;\n\t\t\t\t\tnewOffset_StartingPosition = 0;\n\t\t\t\t\tbeta = length - alpha;\n\n\t\t\t\t\tif (p < beta)\n\t\t\t\t\t{\n\t\t\t\t\t p++;\n\t\t\t\t\t y.append(mainMemory[newBlockNumber_Value][p + newOffset_StartingPosition]);\n\t\t\t\t\t}\n\n\t\t\t\t } else\n\t\t\t\t {\n\t\t\t\t\ty.append(mainMemory[newBlockNumber_Value][alpha + newOffset_StartingPosition]);\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ty = y.reverse();\n\n\t\t\t\tif (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t{\n\n\t\t\t\t if (i % wayAssociative == 0)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_0.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_0.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_0.add(y.toString());\n\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 1\n\t\t\t\t else if (i % wayAssociative == 1)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_1.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t cacheKeys_1.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t cacheValues_1.add(y.toString());\n\t\t\t\t\t}\n\t\t\t\t }\n\n\t\t\t\t // mod 2\n\t\t\t\t else if (i % wayAssociative == 2)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_2.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_2.add(y.toString());\n\t\t\t\t\t } else\n\t\t\t\t\t {\n\t\t\t\t\t\t// System.out.println(\"cache is full...\");\n\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // mmod 3\n\t\t\t\t else if (i % wayAssociative == 3)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_3.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_3.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 4\n\t\t\t\t else if (i % wayAssociative == 4)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_4.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_4.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_4.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_4.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 5\n\t\t\t\t else if (i % wayAssociative == 5)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_5.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_5.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_5.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_5.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 6\n\t\t\t\t else if (i % wayAssociative == 6)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_6.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_6.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_6.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_6.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t // 7\n\n\t\t\t\t else if (i % wayAssociative == 7)\n\t\t\t\t {\n\t\t\t\t\tif (y.length() > 4)\n\t\t\t\t\t{\n\n\t\t\t\t\t for (int o = 0; o < y.length(); o = o + 4)\n\t\t\t\t\t {\n\t\t\t\t\t\tString yy = y.substring(o, o + 4);\n\n\t\t\t\t\t\tcacheKeys_7.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_7.add(yy);\n\n\t\t\t\t\t }\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\n\t\t\t\t\t if (cacheKeys.size() <= (numberOfCacheLines))\n\t\t\t\t\t {\n\t\t\t\t\t\tcacheKeys_7.add(blockNumber + \",\" + binaryOffset);\n\t\t\t\t\t\tcacheValues_7.add(y.toString());\n\t\t\t\t\t }\n\n\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t //\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t // System.out.println(\"cache is full...\");\n\n\t\t\t\t}\n\n\t\t\t }\n\n\t\t\t y.delete(0, y.length());\n\n\t\t\t}\n\n\t\t }\n\n\t\t // 3\n\n\t\t} catch (Exception e)\n\t\t{\n\t\t e.printStackTrace();\n\t\t}\n\n\t }\n\n\t // to print outputs\n\n\t if (wayAssociative == 1)\n\t {\n\t\tlong cache_access = count_hit + count_miss;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit);\n\n\t\tdouble hit_ratio = ((double) count_hit) / (count_hit + count_miss) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t else if (wayAssociative == 2)\n\t {\n\t\tlong cache_access = count_hit_2 + count_miss_2;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_2);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_2);\n\n\t\tdouble hit_ratio = ((double) count_hit_2) / (count_hit_2 + count_miss_2) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_2;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t else if (wayAssociative == 4)\n\t {\n\t\tlong cache_access = count_hit_4 + count_miss_4;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_4);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_4);\n\n\t\tdouble hit_ratio = ((double) count_hit_4) / (count_hit_4 + count_miss_4) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_4;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\n\t } else if (wayAssociative == 8)\n\t {\n\t\tlong cache_access = count_hit_8 + count_miss_8;\n\n\t\tSystem.out.println(\"Total number of cache accesses is \" + cache_access);\n\t\tSystem.out.println(\"Total number of clock cycles is \" + clockCycle_8);\n\t\tSystem.out.println(\"Total number of hits \" + count_hit_8);\n\n\t\tdouble hit_ratio = ((double) count_hit_8) / (count_hit_8 + count_miss_8) * 100;\n\n\t\tSystem.out.println(\"cache hit ratio is \" + hit_ratio + \"%\");\n\n\t\tdouble ipc = ((double) instructionAddress.length) / clockCycle_8;\n\t\tSystem.out.println(\"IPC is \" + ipc);\n\t }\n\n\t} catch (Exception e)\n\t{\n\t e.printStackTrace();\n\t}\n\n }", "public void printTable(String hint) {\r\n // creating iterator for HashMap \r\n synchronized (this) {\r\n LocalTime myDate = this.myObjDate;\r\n String string;\r\n System.out.println(\"in print table \");\r\n\r\n Iterator< HashMap.Entry< RoutingTableKey, RoutingTableInfo>> routingEntriesIterator = routingEntries.entrySet().iterator();\r\n\r\n String destAddress, nextipHost;\r\n // VirtualRouter.buffer.appendText(System.getProperty(\"line.separator\"));\r\n string = \"\\n|-------------------------------------------------------------------------------------------------------------------------|\\n\"\r\n + \" \" + hint + \" -- Last updated \" + myDate + \"\\n\"\r\n + \"|-------------------------------------------------------------------------------------------------------------------------|\\n\"\r\n + \"Dest Network\\t\\tnext ip-Host\\t\\tCost\\t\\tnextport\\t\\tmyPort\\t\\tActivated\\t\\tEstablished\\n\"\r\n + \"|-------------------------------------------------------------------------------------------------------------------------|\\n\";\r\n\r\n Platform.runLater(() -> {\r\n VirtualRouter.buffer.appendText(string);\r\n\r\n });\r\n\r\n while (routingEntriesIterator.hasNext()) {\r\n String string2;\r\n HashMap.Entry<RoutingTableKey, RoutingTableInfo> pair = (HashMap.Entry<RoutingTableKey, RoutingTableInfo>) routingEntriesIterator.next();\r\n\r\n destAddress = pair.getKey().getIp().getHostAddress() + \"-\" + pair.getKey().getHostname();\r\n nextipHost = pair.getValue().getNextipHost().getIp().getHostAddress() + \"-\" + pair.getValue().getNextipHost().getHostname();\r\n\r\n RoutingTableInfo destForwardingInfo = (RoutingTableInfo) pair.getValue();\r\n//bs ntb3 linet address btbi3to 3m berj3 forword slash bas destAddress.getHostName() 3m trj3 aw2et msln one.one.one.\r\n\r\n string2 = \"\" + destAddress + \"\\t\"\r\n + \"\" + nextipHost + \"\\t\\t\"\r\n + destForwardingInfo.cost + \"\\t\\t\"\r\n + \" \" + destForwardingInfo.nextHop + \"\\t\\t\"\r\n + \" \" + destForwardingInfo.port + \"\\t\\t\\t\"\r\n + \" \" + destForwardingInfo.activated + \"\\t\\t\"\r\n + \" \" + destForwardingInfo.established + \"\\t\\n\";\r\n // routerInterface.append(System.getProperty(\"line.separator\"));\r\n Platform.runLater(() -> {\r\n VirtualRouter.buffer.appendText(string2);\r\n\r\n });\r\n }\r\n Platform.runLater(() -> {\r\n VirtualRouter.buffer.appendText(\"|-------------------------------------------------------------------------------------------------------------------------|\\n\\n\");\r\n });\r\n }\r\n }", "public Cache.Entry get(String param1) {\n }", "public void cacheableQuery() throws HibException;", "public Object lookup(Object key, Map cache)\n throws DBException, CacheException\n {\n if (!super.hasBeenInitialized)\n {\n init(cache);\n }\n Object target = null;\n if (key instanceof String)\n // make lookup case insensitive\n target = ((String)key).toLowerCase();\n else\n target = key;\n\n Object o = cache.get(target);\n if (super.debug)\n {\n if (o != null)\n {\n super.logger.logDebug(\"key found in cache: \" + key);\n }\n else\n {\n super.logger.logDebug(\"key not found in cache: \" + key);\n }\n }\n return o;\n }", "protected abstract void initCache(List<RECIPE> recipes);", "public static HashMap<String, ArrayList<String>> parseCreateString(String createTableString, boolean metadata) throws FileNotFoundException {\n\n /*\n CREATE TABLE CUSTOMERS( ID INT PRIMARY KEY,NAME TEXT NOT NULL,AGE INT);\n */\n\n System.out.println(\"STUB: Calling your method to create a table\");\n System.out.println(\"Parsing the string:\\\"\" + createTableString + \"\\\"\");\n createTableString = createTableString.toLowerCase();\n String tablename = createTableString.substring(0, createTableString.indexOf(\"(\")).split(\" \")[2].trim();\n String tablenamefile = tablename + \".tbl\";\n Table newTable = new Table(tablenamefile, Constant.leafNodeType);\n HashMap<String, ArrayList<String>> columndata = new HashMap<>();\n TreeMap<Integer, String> columnOrdinalPosition = new TreeMap<>();\n int record_length = 0;\n Matcher m = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(createTableString);\n while (m.find()) {\n String cols = m.group(1);\n String singlecol[] = cols.split(\",\");\n ArrayList<String> colname;\n int ordinalPosition = 1;\n for (int i = singlecol.length - 1; i >= 0; i--) {\n\n\n colname = new ArrayList<>();\n singlecol[i] = singlecol[i].trim();\n String colNameType[] = singlecol[i].split(\" \");\n colNameType = removeWhiteSpacesInArray(colNameType);\n //columntype\n colname.add(0, colNameType[1]);\n\n columnTypeHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), colNameType[1]);\n record_length = record_length + RecordFormat.getRecordFormat(colNameType[1]);\n colname.add(1, \"yes\");\n //ordinaltype\n colname.add(2, String.valueOf(++ordinalPosition));\n columnOrdinalPosition.put(ordinalPosition, tablename.concat(\".\").concat(colNameType[0]));\n if (colNameType.length == 4) {\n if (colNameType[2].equals(\"primary\")) {\n colname.set(1, \"pri\");\n colname.set(2, String.valueOf(1));\n columnOrdinalPosition.remove(ordinalPosition);\n columnOrdinalPosition.put(1, tablename.concat(\".\").concat(colNameType[0]));\n --ordinalPosition;\n } else\n colname.set(1, \"no\");\n columnNotNullHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), \"NOT NULL\");\n }\n columndata.put(colNameType[0], colname);\n }\n\n }\n\n Iterator it = columnOrdinalPosition.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry) it.next();\n columnOrdinalHelper.setProperties(String.valueOf(pair.getValue()), String.valueOf(pair.getKey()));\n }\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.recordLength), String.valueOf(record_length));\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.numberOfColumns), String.valueOf(columnOrdinalPosition.size()));\n if (!metadata) {\n updateTablesTable(tablename, record_length);\n updateColumnsTable(tablename, columndata);\n }\n return columndata;\n\n }", "public T lookup( String name )\r\n {\r\n T result = null;\r\n \r\n for( HashMap<String,T> table : tables )\r\n {\r\n result = table.get( name );\r\n if( result!=null ) break;\r\n }\r\n \r\n return result;\r\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 Status read(String table, String key, Set<String> fields,\n Map<String, ByteIterator> result) {\n ReadM request = ReadM.newBuilder().setTable(table).setKey(key).build();\n ReadResult response;\n try {\n response = blockingStub.read(request);\n Map<String, ByteIterator> output = deserialize(response.getOutput());\n if(fields == null) {\n return Status.OK;\n }\n for(String s : fields) {\n ByteIterator v = output.get(s);\n result.put(s, v);\n }\n } catch (StatusRuntimeException e) {\n return Status.ERROR;\n }\n if (result.isEmpty()) {\n return Status.NOT_FOUND;\n }\n return Status.OK;\n }", "public abstract String doTableConvert(String sql);", "List<Map<String, Object>> getAllItems(String tableName);", "@GET\n @Path(\"/getTable\")\n public Response getTableInfo(\n @QueryParam(\"tableName\") String tableName\n ) throws UnsupportedEncodingException {\n\n //System.out.println(\"Hit End Point\");\n // check whether no parameters were passed\n if (tableName == null) {\n String msg = \"missing parameter tableName\";\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(msg)\n .build();\n }\n start();\n //System.out.print(\"Table name entered\");\n if (!tables.contains(tableName)) {\n String msg = \"table not found\";\n System.out.println(msg);\n Logging.getLOG().debug(\"user requested to get table, table name not found. \");\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(msg)\n .build();\n }\n\n //System.out.println(\"Valid name entered\");\n if (tableName.equals(ALGORITHMS_TABLE)) {\n algorithmsTable = AlgorithmsTable.openTable(ALGORITHMS_TABLE, dbConnector);\n Logging.getLOG().debug(\"user requested to get table, table: \" + ALGORITHMS_TABLE);\n return Response.ok(URLEncoder.encode(algorithmsTable.toJSON(), \"UTF-8\")).build();\n\n } else if (tableName.equals(DATA_STRUCTURES_TABLE)) {\n dataStructuresTable = DataStructuresTable.openTable(DATA_STRUCTURES_TABLE, dbConnector);\n Logging.getLOG().debug(\"user requested to get table, table: \" + DATA_STRUCTURES_TABLE);\n return Response.ok(URLEncoder.encode(dataStructuresTable.toJSON(), \"UTF-8\")).build();\n\n } else if (tableName.equals(SOFTWARE_DESIGN_TABLE)) {\n softwareDesignTable = SoftwareDesignTable.openTable(SOFTWARE_DESIGN_TABLE, dbConnector);\n Logging.getLOG().debug(\"user requested to get table, table: \" + SOFTWARE_DESIGN_TABLE);\n return Response.ok(URLEncoder.encode(softwareDesignTable.toJSON(), \"UTF-8\")).build();\n\n } else {\n // if it doesn't return that, then return an error\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(\"Something went wrong\")\n .build();\n }\n }", "private Map<UUID, String> getStreamIdToTableNameMap() {\n Map<UUID, String> streamIdToTableNameMap = new HashMap<>();\n runtime.getTableRegistry().listTables().forEach(tableName -> {\n String name = TableRegistry.getFullyQualifiedTableName(tableName);\n streamIdToTableNameMap.put(CorfuRuntime.getStreamID(name), name);\n });\n return streamIdToTableNameMap;\n }", "@Before\n\tpublic void setup(){\n\t\tMapperTask1 mapper = new MapperTask1();\n\t\tString file = getClass().getClassLoader().getResource(\"hdp-task1/datasets/sfo_weather.csv\").getFile();\n\t\tmapDriver = MapDriver.newMapDriver((Mapper<LongWritable, Text, Task1Key, Task1Value>) mapper).withCacheFile(file);\n\t}", "@Override\n public void onClick(View v) {\n StringRequest stringRequest = searchNameStringRequest(input.getText().toString(),langCodeIn,langCodeOut);\n StringRequest tableRequest = tableRequest();\n\n\n\n // executing the request (adding to queue)\n queue.add(stringRequest);\n queue.add(tableRequest);\n }", "public void cacheResult(java.util.List<Todo> todos);", "@Test\n void testAddTablesByName() {\n when(bigQueryResourceProviderMock.getTables(anyString(), anyList()))\n .thenReturn(List.of(exampleTableInDefaultProject));\n\n // Add the tables by name\n bigQueryCatalog.addTables(List.of(exampleTableInDefaultProject.getFullName()));\n\n // Verify the BigQueryCatalog got the tables from the BigQueryResourceProvider\n verify(bigQueryResourceProviderMock, times(1)).getTables(anyString(), anyList());\n\n // Verify the test table was added to the catalog\n List<List<String>> pathsWhereTableShouldBe =\n this.buildPathsWhereResourceShouldBe(exampleTableInDefaultProject.getFullName());\n assertTableExistsAtPaths(bigQueryCatalog, pathsWhereTableShouldBe);\n }", "public abstract String fetchSnpData(HashMap<String,String> paramMap) throws RetrievalException;", "public static void fillCache(DataTable table) throws Exception {\n SheetDefC.setListt(Crud.SheetDefCrud.TableToList(table));\n }", "@io.vertigo.datamodel.task.proxy.TaskAnnotation(\r\n\t\t\tname = \"TkGetAllTopicsIhmFromBot\",\r\n\t\t\trequest = \"SELECT \ttop.top_id,\\n\" + \n \" \t\t\t\t\ttop.title,\\n\" + \n \" \t\t\t\t\ttop.code,\\n\" + \n \" \t\t\t\t\tsmt.smt_id,\\n\" + \n \" \t\t\t\t\tsin.sin_id,\\n\" + \n \" \t\t\t\t\ttop.is_enabled,\\n\" + \n \" \t\t\t\t\tCASE #locale#\\n\" + \n \" \t\t\t\t\t\tWHEN 'fr_FR' THEN tto.label_fr\\n\" + \n \" \t\t\t\t\t\tELSE tto.label\\n\" + \n \" \t\t\t\t\tEND as type,\\n\" + \n \" \t\t\t\t\ttop.tto_cd,\\n\" + \n \" \t\t\t\t\ttpc.label as cat_label,\\n\" + \n \" \t\t\t\t\tstring_agg(tpl.label, ',') as labels\\n\" + \n \" \t\t\tfrom topic top \\n\" + \n \" \t\t\tleft join small_talk smt on smt.top_id = top.top_id\\n\" + \n \" \t\t\tleft join script_intention sin on sin.top_id = top.top_id\\n\" + \n \" \t\t\tjoin type_topic tto on top.tto_cd = tto.tto_cd\\n\" + \n \" \t\t\tjoin topic_category tpc on (tpc.top_cat_id = top.top_cat_id)\\n\" + \n \" \t\t\tleft join topic_topic_label ttl on (ttl.top_id = top.top_id)\\n\" + \n \" \t\t\tleft join topic_label tpl on (tpl.label_id = ttl.label_id)\\n\" + \n \" \t\t\twhere top.bot_id = #botId#\\n\" + \n \" \t\t\t<% if (ktoCds != null){ %>\\n\" + \n \" \t\t\t\tand top.kto_cd in (#ktoCds.rownum#)\\n\" + \n \" \t\t\t<% } %>\\n\" + \n \" \t\t\tgroup by top.top_id,\\n\" + \n \" \t\t\t\t\ttop.title,\\n\" + \n \" \t\t\t\t\ttop.code,\\n\" + \n \" \t\t\t\t\tsmt.smt_id,\\n\" + \n \" \t\t\t\t\tsin.sin_id,\\n\" + \n \" \t\t\t\t\ttop.is_enabled,\\n\" + \n \" \t\t\t\t\ttto.label,\\n\" + \n \" \t\t\t\t\ttto.label_fr,\\n\" + \n \" \t\t\t\t\ttop.tto_cd,\\n\" + \n \" \t\t\t\t\ttpc.label\",\r\n\t\t\ttaskEngineClass = io.vertigo.basics.task.TaskEngineSelect.class)\r\n\[email protected](smartType = \"STyDtTopicIhm\")\r\n\tpublic io.vertigo.datamodel.structure.model.DtList<io.vertigo.chatbot.commons.domain.topic.TopicIhm> getAllTopicsIhmFromBot(@io.vertigo.datamodel.task.proxy.TaskInput(name = \"botId\", smartType = \"STyId\") final Long botId, @io.vertigo.datamodel.task.proxy.TaskInput(name = \"ktoCds\", smartType = \"STyCode\") final java.util.List<String> ktoCds, @io.vertigo.datamodel.task.proxy.TaskInput(name = \"locale\", smartType = \"STyCode\") final String locale) {\r\n\t\tfinal Task task = createTaskBuilder(\"TkGetAllTopicsIhmFromBot\")\r\n\t\t\t\t.addValue(\"botId\", botId)\r\n\t\t\t\t.addValue(\"ktoCds\", ktoCds)\r\n\t\t\t\t.addValue(\"locale\", locale)\r\n\t\t\t\t.build();\r\n\t\treturn getTaskManager()\r\n\t\t\t\t.execute(task)\r\n\t\t\t\t.getResult();\r\n\t}", "protected abstract void beforeLookup(Lookup.Template t);", "public synchronized static void loadResultCatch(RedisTemplate<String, String> redisTemplate) {\n\tCache c= new Cache();\r\n\tc.setValue(redisTemplate.opsForValue().get(\"Result\"));\r\n\tc.setTimeOut(System.currentTimeMillis()+3600000);\r\n\tCacheManager.clearOnly(\"result\");\r\n\tCacheManager.putCache(\"result\", c);\r\n\t//c=null;\r\n}", "public Collection getTables(String serviceProviderCode, String callerID) throws AAException, RemoteException;", "public static void main(String[] args) {\n\t\tHashTable<String, Double> table = new HashTable<String, Double>();\n\t\tLoader.load(table,\n\t\t\t\t\"https://www.ncdc.noaa.gov/cdo-web/api/v2/stations?limit=1000&offset=10000\");\n\t\tSystem.out.println(\"1000 loaded.\");\n\t\tLoader.load(table,\"https://www.ncdc.noaa.gov/cdo-web/api/v2/stations?limit=1000&offset=11000\");\n\t\tSystem.out.println(\"2000 loaded.\"); \n\t\tLoader.load(table,\"https://www.ncdc.noaa.gov/cdo-web/api/v2/stations?limit=1000&offset=12000\");\n\t\tSystem.out.println(\"3000 loaded.\"); \n\t\tLoader.load(table,\"https://www.ncdc.noaa.gov/cdo-web/api/v2/stations?limit=1000&offset=13000\");\n\t\tSystem.out.println(\"4000 loaded.\"); \n\t\tLoader.load(table,\"https://www.ncdc.noaa.gov/cdo-web/api/v2/stations?limit=1000&offset=14000\");\n\t\tSystem.out.println(\"5000 loaded.\"); \n\t\tLoader.load(table,\"https://www.ncdc.noaa.gov/cdo-web/api/v2/stations?limit=1000&offset=15000\");\n\t\tSystem.out.println(\"6000 loaded.\"); \n\t\tLoader.load(table,\"https://www.ncdc.noaa.gov/cdo-web/api/v2/stations?limit=1000&offset=16000\");\n\t\tSystem.out.println(\"7000 loaded.\");\n\t\tLoader.load(table,\"https://www.ncdc.noaa.gov/cdo-web/api/v2/stations?limit=1000&offset=17000\");\n\t\tSystem.out.println(\"8000 loaded.\");\n\t\tLoader.load(table,\"https://www.ncdc.noaa.gov/cdo-web/api/v2/stations?limit=1000&offset=18000\");\n\t\tSystem.out.println(\"9000 loaded.\");\n\t\tLoader.load(table,\"https://www.ncdc.noaa.gov/cdo-web/api/v2/stations?limit=1000&offset=19000\");\n\t\tSystem.out.println(\"10000 loaded.\");\n\t}", "List<EmpTaskInfo> queryEmpTasksByCond(Map paramMap);", "public interface HiveMetaDao {\n String getLocationByDbAndTable(Map<String, String> map);\n List<String> getDbsByUser(String userName);\n List<Map<String, Object>> getTablesByDbNameAndUser(Map<String, String> map);\n Long getPartitionSize(Map<String, String> map);\n List<String> getPartitions(Map<String, String> map);\n List<Map<String, Object>> getColumns(Map<String, String> map);\n List<Map<String, Object>> getPartitionKeys(Map<String, String> map);\n String getTableComment(@Param(\"DbName\") String DbName, @Param(\"tableName\") String tableName);\n}", "Flowable<T> query(IDynamoDBMapper mapper);", "public T1 caseTableMapping(TableMapping object) {\n\t\treturn null;\n\t}", "static void createResultHashMap(Set<String> fields, FetchValue.Response response,\n HashMap<String, ByteIterator>resultHashMap) {\n // If everything went fine, then a result must be given. Such an object is a hash table containing the (field,\n // value) pairs based on the requested fields. Note that in a read operation, ONLY ONE OBJECT IS RETRIEVED!\n // The following line retrieves the previously serialized table which was store with an insert transaction.\n byte[] responseFieldsAndValues = response.getValues().get(0).getValue().getValue();\n\n // Deserialize the stored response table.\n HashMap<String, ByteIterator> deserializedTable = new HashMap<>();\n deserializeTable(responseFieldsAndValues, deserializedTable);\n\n // If only specific fields are requested, then only these should be put in the result object!\n if (fields != null) {\n // Populate the HashMap to provide as result.\n for (Object field : fields.toArray()) {\n // Comparison between a requested field and the ones retrieved. If they're equal (i.e. the get() operation\n // DOES NOT return a null value), then proceed to store the pair in the resultHashMap.\n ByteIterator value = deserializedTable.get(field);\n\n if (value != null) {\n resultHashMap.put((String) field, value);\n }\n }\n } else {\n // If, instead, no field is specified, then all those retrieved must be provided as result.\n for (String field : deserializedTable.keySet()) {\n resultHashMap.put(field, deserializedTable.get(field));\n }\n }\n }", "int cacheRowsWhenScan();", "@Override\n\tpublic void processInstruction(ExecutionContext ec) {\n\t\tlong t1 = System.currentTimeMillis();\n\n\t\tSparkExecutionContext sec = (SparkExecutionContext) ec;\n\n\t\tCacheType type = _type;\n\t\tString rddVar = type.isRight() ? input1.getName() : input2.getName();\n\t\tString bcastVar = type.isRight() ? input2.getName() : input1.getName();\n\t\tString betterRddVar = rddVar + \"_filtered\";\n\t\tString betterBcastVar = bcastVar + \"_filtered\";\n\t\tMatrixCharacteristics mcRdd = sec.getMatrixCharacteristics(rddVar);\n\t\tMatrixCharacteristics mcBc = sec.getMatrixCharacteristics(bcastVar);\n\t\tboolean needRepartitionNow = needRepartitionNow(sec);\n\t\tboolean needFilterNow = needFilterNow(sec);\n\t\tString dVarName = null; // TODO added by czh 检查是否是dVar\n\t\tif (_needCache && DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\tdVarName = DWhileStatement.getDVarNameFromTmpVar(bcastVar);\n\t\t\tSystem.out.println(\"in delta mapmm: \" + dVarName);\n\t\t} else if (_needCache) {\n\t\t\tdVarName = bcastVar;\n\t\t}\n\n\t\t// TODO added by czh\n\t\tif (rddVar.equals(\"G\")) {\n\t\t\tDWhileProgramBlock.midT2 = System.currentTimeMillis();\n\t\t}\n\n\t\t// TODO added by czh 删\n\t\t_outputEmpty = false;\n\n\t\t//get input rdd with preferred number of partitions to avoid unnecessary repartitionNonZeros\n\t\tJavaPairRDD<MatrixIndexes, MatrixBlock> in1;\n\t\tif (_needCache && (hasRepartitioned.contains(rddVar) || hasFiltered.contains(rddVar)) && !needRepartitionNow\n\t\t\t\t&& DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\t// 在dwhile中, 做过repartition或filter且当前不需要repartition时取 betterRddVar\n\t\t\tin1 = sec.getBinaryBlockRDDHandleForVariable(betterRddVar,\n\t\t\t\t\t(requiresFlatMapFunction(type, mcBc) && requiresRepartitioning(\n\t\t\t\t\t\t\ttype, mcRdd, mcBc, sec.getSparkContext().defaultParallelism())) ?\n\t\t\t\t\t\t\tgetNumRepartitioning(type, mcRdd, mcBc) : -1, _outputEmpty);\n\t\t} else {\n\t\t\tin1 = sec.getBinaryBlockRDDHandleForVariable(rddVar,\n\t\t\t\t\t(requiresFlatMapFunction(type, mcBc) && requiresRepartitioning(\n\t\t\t\t\t\t\ttype, mcRdd, mcBc, sec.getSparkContext().defaultParallelism())) ?\n\t\t\t\t\t\t\tgetNumRepartitioning(type, mcRdd, mcBc) : -1, _outputEmpty);\n\t\t}\n\n\t\t//investigate if a repartitioning - including a potential flip of broadcast and rdd\n\t\t//inputs - is required to ensure moderately sized output partitions (2GB limitation)\n\t\tif (requiresFlatMapFunction(type, mcBc) && requiresRepartitioning(type, mcRdd, mcBc, in1.getNumPartitions())) {\n\t\t\tint numParts = getNumRepartitioning(type, mcRdd, mcBc);\n\t\t\tint numParts2 = getNumRepartitioning(type.getFlipped(), mcBc, mcRdd);\n\t\t\tif (numParts2 > numParts) { //flip required\n\t\t\t\ttype = type.getFlipped();\n\t\t\t\trddVar = type.isRight() ? input1.getName() : input2.getName();\n\t\t\t\tbcastVar = type.isRight() ? input2.getName() : input1.getName();\n\t\t\t\tmcRdd = sec.getMatrixCharacteristics(rddVar);\n\t\t\t\tmcBc = sec.getMatrixCharacteristics(bcastVar);\n\t\t\t\tin1 = sec.getBinaryBlockRDDHandleForVariable(rddVar);\n\t\t\t\tLOG.warn(\"Mapmm: Switching rdd ('\" + bcastVar + \"') and broadcast ('\" + rddVar + \"') inputs \"\n\t\t\t\t\t\t+ \"for repartitioning because this allows better control of output partition \"\n\t\t\t\t\t\t+ \"sizes (\" + numParts + \" < \" + numParts2 + \").\");\n\t\t\t}\n\t\t}\n\n\t\tif (_needCache && needRepartitionNow) {\n\t\t\tSystem.out.println(\"repartitioning... \" + bcastVar);\n\t\t\thasRepartitioned.add(rddVar);\n\n\t\t\t// repartitionNonZeros in2\n\t\t\tMatrixBlock in2Block = sec.getMatrixObject(bcastVar).acquireReadAndRelease();\n\n\t\t\tMatrixBlock newIn2Block = LibMatrixReorg.repartitionNonZerosWithEmpty(\n\t\t\t\t\tsec, in2Block, true, dVarName, in1.getNumPartitions(), mcRdd);\n\t\t\tif (!sec.containsVariable(betterBcastVar)) {\n\t\t\t\tsec.setVariable(betterBcastVar, new MatrixObject(sec.getMatrixObject(bcastVar)));\n\t\t\t}\n\t\t\tsec.cleanupBroadcastByDWhile(sec.getMatrixObject(betterBcastVar));\n\t\t\tsec.setMatrixOutput(betterBcastVar, newIn2Block);\n\n\t\t\t// repartitionNonZeros in1\n\t\t\tString orderName = DWhileStatement.getRepartitionOrderName(dVarName);\n\t\t\tPartitionedBroadcast<MatrixBlock> order = sec.getBroadcastForVariable(orderName);\n\t\t\tin1 = in1.mapPartitionsToPair(new RepartitionMapFunction(order));\n\t\t\tif (!sec.containsVariable(betterRddVar)) {\n\t\t\t\tsec.setVariable(betterRddVar, new MatrixObject(sec.getMatrixObject(rddVar)));\n\t\t\t}\n\t\t\tsec.getMatrixCharacteristics(betterRddVar).setCols(newIn2Block.getNumRows());\n\t\t\tin1 = sec.persistRdd(rddVar, in1, MEMORY_AND_DISK);\n\t\t\tsec.setRDDHandleForVariable(betterRddVar, in1);\n\t\t\tsec.addLineageBroadcast(betterRddVar, orderName);\n\n\t\t\tSystem.out.println(\" done\");\n\n\t\t} else if (_needCache && hasRepartitioned.contains(rddVar) && DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\t// 若在之前的迭代已repartition in1, 则调整 in2 顺序\n\t\t\tMatrixBlock in2Block = sec.getMatrixObject(bcastVar).acquireReadAndRelease();\n\t\t\tMatrixBlock newIn2Block =\n\t\t\t\t\tLibMatrixReorg.repartitionByOrderWithEmpty(sec, in2Block, new MatrixBlock(), true, dVarName);\n\n\t\t\tint selectSum = Arrays.stream(newIn2Block.getSelectBlock().getData()).sum();\n\t\t\tif (selectSum == 0) {\n\t\t\t\tupdateBinaryMMOutputMatrixCharacteristics(sec, true);\n\t\t\t\tMatrixCharacteristics outputMc = sec.getMatrixCharacteristics(output.getName());\n\t\t\t\tsec.setMatrixOutput(output.getName(),\n\t\t\t\t\t\tnew MatrixBlock((int) outputMc.getRows(), (int) outputMc.getCols(), true), getExtendedOpcode());\n\n\t\t\t\t// TODO added by czh debug\n\t\t\t\tlong t2 = System.currentTimeMillis();\n\t\t\t\tSystem.out.println(\"skip mapmm \" + bcastVar + \" time: \" + (t2 - t1) / 1000.0);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\tif (!ec.containsVariable(betterBcastVar)) {\n\t\t\t\tMatrixObject mb = new MatrixObject(sec.getMatrixObject(bcastVar));\n\t\t\t\tec.setVariable(betterBcastVar, mb);\n\t\t\t}\n\t\t\tsec.unpersistBroadcastByDWhile(sec.getMatrixObject(betterBcastVar));\n\t\t\tsec.setMatrixOutput(betterBcastVar, newIn2Block);\n\n\t\t} else if (_needCache && DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\t// 设置 in2.selectBlock\n\t\t\tMatrixBlock in2Block = sec.getMatrixObject(bcastVar).acquireReadAndRelease();\n\t\t\tString selectName = DWhileStatement.getSelectName(dVarName);\n\t\t\tMatrixBlock select = sec.getMatrixObject(selectName).acquireReadAndRelease();\n\t\t\tfloat blockSize = OptimizerUtils.DEFAULT_BLOCKSIZE;\n\t\t\tint brlen = (int) Math.ceil(in2Block.getNumRows() / blockSize);\n//\t\t\tFilterBlock selectBlock = sec.getMatrixObject(selectName).acquireReadAndRelease().getFilterBlock();\n\n\t\t\tFilterBlock selectBlock = new FilterBlock(brlen, 1);\n\t\t\tselectBlock.initData();\n\t\t\tfor (int bi = 0; bi < brlen; bi++) {\n\t\t\t\tboolean flag = false;\n\t\t\t\tfor (int i = (int) (bi * blockSize); i < (bi + 1) * blockSize && i < in2Block.getNumRows(); i++) {\n\t\t\t\t\tif (select.getValue(i, 0) != 0) {\n\t\t\t\t\t\tflag = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tselectBlock.setData(bi, 0, 1);\n\t\t\t\t} else {\n\t\t\t\t\tselectBlock.setData(bi, 0, 0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint selectSum = Arrays.stream(selectBlock.getData()).sum();\n\t\t\tif (selectSum == 0) {\n\t\t\t\tupdateBinaryMMOutputMatrixCharacteristics(sec, true);\n\t\t\t\tMatrixCharacteristics outputMc = sec.getMatrixCharacteristics(output.getName());\n\t\t\t\tsec.setMatrixOutput(output.getName(),\n\t\t\t\t\t\tnew MatrixBlock((int) outputMc.getRows(), (int) outputMc.getCols(), true), getExtendedOpcode());\n\n\t\t\t\t// TODO added by czh debug\n\t\t\t\tlong t2 = System.currentTimeMillis();\n\t\t\t\tSystem.out.println(\"skip mapmm \" + bcastVar + \" time: \" + (t2 - t1) / 1000.0);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tin2Block.setSelectBlock(selectBlock);\n\t\t\tsec.setMatrixOutput(bcastVar, in2Block);\n\t\t}\n\n\t\t//get inputs\n\t\tif (_needCache && hasRepartitioned.contains(rddVar) && DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\tbcastVar = betterBcastVar;\n\t\t}\n\t\tPartitionedBroadcast<MatrixBlock> in2 = sec.getBroadcastForVariable(bcastVar);\n\n\t\t//empty input block filter\n\t\tif (!_outputEmpty)\n\t\t\tin1 = in1.filter(new FilterNonEmptyBlocksFunction());\n\n\t\tif (needFilterNow) {\n\t\t\tSystem.out.print(\"filtering... \" + bcastVar);\n\t\t\thasFiltered.add(rddVar);\n\n\t\t\tin1 = in1.filter(new FilterNonEmptyBlocksFunction());\n\t\t\tsec.persistRdd(rddVar, in1, StorageLevels.MEMORY_AND_DISK);\n\t\t\tif (!sec.containsVariable(betterRddVar)) {\n\t\t\t\tsec.setVariable(betterRddVar, new MatrixObject(sec.getMatrixObject(rddVar)));\n\t\t\t}\n\t\t\tsec.setRDDHandleForVariable(betterRddVar, in1);\n\t\t\tsec.addLineageBroadcast(betterRddVar, bcastVar);\n\t\t\tif (hasRepartitioned.contains(rddVar) && DWhileStatement.isDWhileTmpVar(bcastVar)) {\n\t\t\t\tsec.addLineageBroadcast(betterRddVar, DWhileStatement.getRepartitionOrderName(dVarName));\n\t\t\t}\n\n\t\t\tSystem.out.println(\" done\");\n\t\t}\n\n\t\t//execute mapmm and aggregation if necessary and put output into symbol table\n\t\tif (_aggtype == SparkAggType.SINGLE_BLOCK) {\n\t\t\tJavaRDD<MatrixBlock> out = in1.map(new RDDMapMMFunction2(type, in2));\n\t\t\tMatrixBlock out2 = RDDAggregateUtils.sumStable(out);\n\n\t\t\t//put output block into symbol table (no lineage because single block)\n\t\t\t//this also includes implicit maintenance of matrix characteristics\n\t\t\tsec.setMatrixOutput(output.getName(), out2, getExtendedOpcode());\n\n\t\t} else { //MULTI_BLOCK or NONE\n\t\t\tJavaPairRDD<MatrixIndexes, MatrixBlock> out;\n\t\t\tif (requiresFlatMapFunction(type, mcBc)) {\n\t\t\t\tif (requiresRepartitioning(type, mcRdd, mcBc, in1.getNumPartitions())) {\n\t\t\t\t\tint numParts = getNumRepartitioning(type, mcRdd, mcBc);\n\t\t\t\t\tLOG.warn(\"Mapmm: Repartition input rdd '\" + rddVar + \"' from \" + in1.getNumPartitions() + \" to \"\n\t\t\t\t\t\t\t+ numParts + \" partitions to satisfy size restrictions of output partitions.\");\n\t\t\t\t\tin1 = in1.repartition(numParts);\n\t\t\t\t}\n\t\t\t\tout = in1.flatMapToPair(new RDDFlatMapMMFunction(type, in2));\n\t\t\t} else if (preservesPartitioning(mcRdd, type))\n\t\t\t\tout = in1.mapPartitionsToPair(new RDDMapMMPartitionFunction(type, in2), true);\n\t\t\telse\n\t\t\t\tout = in1.mapToPair(new RDDMapMMFunction(type, in2));\n\n\t\t\t//empty output block filter\n\t\t\tif (!_outputEmpty)\n\t\t\t\tout = out.filter(new FilterNonEmptyBlocksFunction());\n\n\t\t\tif (_aggtype == SparkAggType.MULTI_BLOCK)\n\t\t\t\tout = RDDAggregateUtils.sumByKeyStable(out, false);\n\n\t\t\t//put output RDD handle into symbol table\n\t\t\tsec.setRDDHandleForVariable(output.getName(), out);\n\t\t\tsec.addLineageRDD(output.getName(), rddVar);\n\t\t\tsec.addLineageBroadcast(output.getName(), bcastVar);\n\n\t\t\tif (needRepartitionNow || needFilterNow) {\n\t\t\t\tsec.unpersistRdd(rddVar);\n\t\t\t}\n\n\t\t\t//update output statistics if not inferred\n\t\t\tupdateBinaryMMOutputMatrixCharacteristics(sec, true);\n\t\t}\n\n\t\t// TODO added by czh debug\n\t\tsec.getMatrixInput(output.getName());\n\t\tsec.releaseMatrixInput(output.getName());\n\t\tlong t2 = System.currentTimeMillis();\n\t\tSystem.out.println(\"mapmm \" + bcastVar + \" time: \" + (t2 - t1) / 1000.0);\n\n\t\t// TODO added by czh\n\t\tif (rddVar.equals(\"TG\")) {\n\t\t\tDWhileProgramBlock.midT1 = System.currentTimeMillis();\n\t\t}\n\t}", "public void cacheResult(Todo todo);", "@Override\n\tpublic <T> Map<String, GetsResponse<T>> gets(Collection<String> arg0,\n\t\t\tlong arg1, Transcoder<T> arg2) throws TimeoutException,\n\t\t\tInterruptedException, MemcachedException {\n\t\treturn null;\n\t}", "private void createMaps(String pathToCsv) throws Exception {\n BufferedReader br = new BufferedReader(new FileReader(pathToCsv));\n String line = null;\n\n while ((line = br.readLine()) != null) {\n String[] mapping = line.split(\",\");\n fileUrlMap.put(mapping[0], mapping[1]);\n urlFileMap.put(mapping[1], mapping[0]);\n }\n\n br.close();\n }", "public synchronized Result<? extends Record> solve(final String tableName)\n throws ModelException {\n return solve(Set.of(tableName)).get(tableName);\n }", "private void doLookup(int key)\n {\n String value = getLocalValue(key);\n if (value != null)\n {\n display(key, value);\n }\n else\n {\n getValueFromDB(key);\n } \n }", "public Map lookup(Map constraints) {\n //sanity check\n if (this.isClosed()) {\n //probably an exception should be thrown here!!\n throw new RuntimeException(RLI_NOT_CONNECTED_MSG + this.mRLIURL);\n }\n Map result = new HashMap();\n String url = null,message = null;\n //we need to get hold of all the LRC\n //that report to the RLI and call the\n //list() method on each of them\n for(Iterator it = this.getReportingLRC().iterator();it.hasNext();){\n url = (String)it.next();\n message = \"Querying LRC \" + url;\n mLogger.log(message,LogManager.DEBUG_MESSAGE_LEVEL);\n\n //push the lrcURL to the properties object\n mConnectProps.setProperty(this.URL_KEY,url);\n LRC lrc = new LRC();\n if(!lrc.connect(mConnectProps)){\n //log an error/warning message\n mLogger.log(\"Unable to connect to LRC \" + url,\n LogManager.ERROR_MESSAGE_LEVEL);\n continue;\n }\n try{\n Map m = lrc.lookup(constraints);\n for(Iterator mit = m.entrySet().iterator();mit.hasNext();){\n Map.Entry entry = (Map.Entry)mit.next();\n //merge the entries into the main result\n String key = (String)entry.getKey(); //the lfn\n if(result.containsKey(key)){\n //right now no merging of RCE being done on basis\n //on them having same pfns. duplicate might occur.\n ((List)result.get(key)).addAll((List)entry.getValue());\n }\n else{\n result.put(key,entry.getValue());\n }\n }\n\n }\n catch(Exception e){\n mLogger.log(\"list(String)\",e,LogManager.ERROR_MESSAGE_LEVEL);\n }\n finally{\n lrc.close();\n }\n }\n\n return result;\n\n }", "@io.vertigo.datamodel.task.proxy.TaskAnnotation(\r\n\t\t\tname = \"TkGetTopicIhmById\",\r\n\t\t\trequest = \"SELECT \ttop.top_id,\\n\" + \n \" \t\t\t\t\ttop.title,\\n\" + \n \" \t\t\t\t\ttop.code,\\n\" + \n \" \t\t\t\t\tsmt.smt_id,\\n\" + \n \" \t\t\t\t\tsin.sin_id,\\n\" + \n \" \t\t\t\t\ttop.is_enabled,\\n\" + \n \" \t\t\t\t\ttto.label as type,\\n\" + \n \" \t\t\t\t\ttop.tto_cd,\\n\" + \n \" \t\t\t\t\ttpc.label as cat_label,\\n\" + \n \" \t\t\t\t\tstring_agg(tpl.label, ',') as labels\\n\" + \n \" \t\t\tfrom topic top \\n\" + \n \" \t\t\tleft join small_talk smt on smt.top_id = top.top_id\\n\" + \n \" \t\t\tleft join script_intention sin on sin.top_id = top.top_id\\n\" + \n \" \t\t\tjoin type_topic tto on top.tto_cd = tto.tto_cd\\n\" + \n \" \t\t\tjoin topic_category tpc on (tpc.top_cat_id = top.top_cat_id)\\n\" + \n \" \t\t\tleft join topic_topic_label ttl on (ttl.top_id = top.top_id)\\n\" + \n \" \t\t\tleft join topic_label tpl on (tpl.label_id = ttl.label_id)\\n\" + \n \" \t\t\twhere top.top_id = #topId#\\n\" + \n \" \t\t\tgroup by top.top_id,\\n\" + \n \" \t\t\t\t\ttop.title,\\n\" + \n \" \t\t\t\t\ttop.code,\\n\" + \n \" \t\t\t\t\tsmt.smt_id,\\n\" + \n \" \t\t\t\t\tsin.sin_id,\\n\" + \n \" \t\t\t\t\ttop.is_enabled,\\n\" + \n \" \t\t\t\t\ttto.label ,\\n\" + \n \" \t\t\t\t\ttop.tto_cd,\\n\" + \n \" \t\t\t\t\ttpc.label\\n\" + \n \" \t\t\t\\n\" + \n \" \t\t\tLIMIT 1\",\r\n\t\t\ttaskEngineClass = io.vertigo.basics.task.TaskEngineSelect.class)\r\n\[email protected](smartType = \"STyDtTopicIhm\")\r\n\tpublic io.vertigo.chatbot.commons.domain.topic.TopicIhm getTopicIhmById(@io.vertigo.datamodel.task.proxy.TaskInput(name = \"topId\", smartType = \"STyId\") final Long topId) {\r\n\t\tfinal Task task = createTaskBuilder(\"TkGetTopicIhmById\")\r\n\t\t\t\t.addValue(\"topId\", topId)\r\n\t\t\t\t.build();\r\n\t\treturn getTaskManager()\r\n\t\t\t\t.execute(task)\r\n\t\t\t\t.getResult();\r\n\t}", "@Test\n public void noFilteringAllowsRepeatedResults() {\n final Dataset dataset = new Dataset(\"TEST1\", \"sql\");\n\n List<String> entry1 = new ArrayList<>();\n entry1.add(\"abcd\");\n entry1.add(\"123\");\n\n List<String> entry2 = new ArrayList<>();\n entry2.add(\"wxyz\");\n entry2.add(\"789\");\n\n List<String> entry3 = new ArrayList<>();\n entry3.add(\"wxyz\"); // same key as entry2\n entry3.add(\"456\");\n\n List<String> entry4 = new ArrayList<>();\n entry4.add(\"efgh\");\n entry4.add(\"001\");\n\n List<List<String>> queryResults = new ArrayList<>();\n queryResults.add(entry1);\n queryResults.add(entry2);\n queryResults.add(entry3);\n queryResults.add(entry4);\n\n // given\n dataset.populateCache(queryResults, 100L);\n\n // when\n final List<String> result1 = dataset.getCachedResult();\n final List<String> result2 = dataset.getCachedResult();\n final List<String> result3 = dataset.getCachedResult();\n final List<String> result4 = dataset.getCachedResult();\n\n // then\n assertEquals(\"Wrong result 1\", entry1, result1);\n assertEquals(\"Wrong result 2\", entry2, result2);\n assertEquals(\"Wrong result 3\", entry3, result3);\n assertEquals(\"Wrong result 4\", entry4, result4);\n\n // and\n try {\n dataset.getCachedResult();\n fail(\"Expected to run out of data\");\n\n } catch (IllegalStateException ex) {\n assertEquals(\"Wrong error\", \"No more data available for dataset: TEST1\", ex.getMessage());\n }\n\n // and\n assertEquals(\"Wrong cache size\", Optional.of(4), dataset.getMetrics().getCacheSize());\n assertEquals(\"Wrong timing\", Optional.of(100L), dataset.getMetrics().getTimingMilliseconds());\n assertEquals(\"Wrong cache requested\", Optional.of(5), dataset.getMetrics().getCacheRequested());\n assertEquals(\"Wrong filtered out\", Optional.empty(), dataset.getMetrics().getFilteredOut());\n }", "@Test\n public void singleFilterEnsuresUniqueResults() {\n final Dataset dataset = new Dataset(\"TEST1\", \"sql\", new Filter(\"test-filter\"));\n\n List<String> entry1 = new ArrayList<>();\n entry1.add(\"abcd\");\n entry1.add(\"123\");\n\n List<String> entry2 = new ArrayList<>();\n entry2.add(\"wxyz\");\n entry2.add(\"789\");\n\n List<String> entry3 = new ArrayList<>();\n entry3.add(\"wxyz\"); // same key as entry2\n entry3.add(\"456\");\n\n List<String> entry4 = new ArrayList<>();\n entry4.add(\"efgh\");\n entry4.add(\"001\");\n\n List<List<String>> queryResults = new ArrayList<>();\n queryResults.add(entry1);\n queryResults.add(entry2);\n queryResults.add(entry3);\n queryResults.add(entry4);\n\n // given\n dataset.populateCache(queryResults, 100L);\n\n // when\n List<String> result1 = dataset.getCachedResult();\n List<String> result2 = dataset.getCachedResult();\n List<String> result3 = dataset.getCachedResult();\n\n // then\n assertEquals(\"Wrong result 1\", entry1, result1);\n assertEquals(\"Wrong result 2\", entry2, result2);\n assertEquals(\"Wrong result 3\", entry4, result3); // ignores entry 3, returns entry 4\n\n // and\n try {\n dataset.getCachedResult();\n fail(\"Expected to run out of data\");\n\n } catch (IllegalStateException ex) {\n assertEquals(\"Wrong error\", \"No more data available for dataset: TEST1\", ex.getMessage());\n }\n\n // and\n assertEquals(\"Wrong cache size\", Optional.of(4), dataset.getMetrics().getCacheSize());\n assertEquals(\"Wrong timing\", Optional.of(100L), dataset.getMetrics().getTimingMilliseconds());\n assertEquals(\"Wrong cache requested\", Optional.of(4), dataset.getMetrics().getCacheRequested());\n assertEquals(\"Wrong filtered out\", Optional.of(1), dataset.getMetrics().getFilteredOut());\n }", "public void cacheResult(PlanoSaude planoSaude);", "private ArrayList<HashMap<String, String>> processRetrieve() {\n //Transform and Return Rows to a List of HashMaps\n try {\n if (rs == null) {\n System.out.println(\"rs is null\");\n } else {\n return rsToMaps();\n }\n } catch (SQLException ex) {\n throw new RuntimeException(ex);\n }\n return null;\n }", "void buildDataTable(SearchResults<ManageUsersSearchModel.Result> results);", "public java.util.Map<java.lang.String, java.util.ArrayList> m17238b() {\n /*\n r18 = this;\n r3 = new java.util.HashMap;\n r3.<init>();\n r4 = new java.util.ArrayList;\n r4.<init>();\n r5 = new java.util.ArrayList;\n r5.<init>();\n r0 = r18;\n r2 = r0.f20995e;\n r2.lock();\n r6 = r18.m17234d();\n r2 = \"select * from result limit 0,500\";\n r7 = 0;\n r7 = r6.rawQuery(r2, r7);\n L_0x0022:\n r2 = r7.moveToNext();\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n if (r2 == 0) goto L_0x0106;\n L_0x0028:\n r2 = new org.json.JSONObject;\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n r2.<init>();\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n r8 = \"_id\";\n r8 = r7.getColumnIndex(r8);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r8 = r7.getInt(r8);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r9 = \"time\";\n r9 = r7.getColumnIndex(r9);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r9 = r7.getString(r9);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r10 = \"code\";\n r10 = r7.getColumnIndex(r10);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r10 = r7.getInt(r10);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r11 = \"cmd_type\";\n r11 = r7.getColumnIndex(r11);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r11 = r7.getInt(r11);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r12 = \"cmd_id\";\n r12 = r7.getColumnIndex(r12);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r12 = r7.getInt(r12);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r13 = \"result\";\n r13 = r7.getColumnIndex(r13);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r13 = r7.getString(r13);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r14 = \"time\";\n r16 = java.lang.Long.parseLong(r9);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r0 = r16;\n r2.put(r14, r0);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r9 = \"error_code\";\n r2.put(r9, r10);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n if (r10 != 0) goto L_0x0095;\n L_0x0083:\n r9 = \"cmd_type\";\n r2.put(r9, r11);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r9 = \"cmd_id\";\n r2.put(r9, r12);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r9 = \"voice_to_text_result\";\n r2.put(r9, r13);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n L_0x0095:\n r8 = java.lang.Integer.valueOf(r8);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r5.add(r8);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n r4.add(r2);\t Catch:{ JSONException -> 0x00a0, Exception -> 0x00d3, SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9 }\n goto L_0x0022;\n L_0x00a0:\n r2 = move-exception;\n r2.printStackTrace();\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n goto L_0x0022;\n L_0x00a6:\n r2 = move-exception;\n r4 = \"SynthesizeResultDb\";\n r5 = new java.lang.StringBuilder;\t Catch:{ all -> 0x014d }\n r5.<init>();\t Catch:{ all -> 0x014d }\n r8 = \"exception:\";\n r5 = r5.append(r8);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n r2 = r5.append(r2);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n com.baidu.tts.chainofresponsibility.logger.LoggerProxy.m17001d(r4, r2);\t Catch:{ all -> 0x014d }\n r7.close();\n r6.close();\n r0 = r18;\n r2 = r0.f20995e;\n r2.unlock();\n L_0x00d2:\n return r3;\n L_0x00d3:\n r2 = move-exception;\n r2.printStackTrace();\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n goto L_0x0022;\n L_0x00d9:\n r2 = move-exception;\n r4 = \"SynthesizeResultDb\";\n r5 = new java.lang.StringBuilder;\t Catch:{ all -> 0x014d }\n r5.<init>();\t Catch:{ all -> 0x014d }\n r8 = \"exception:\";\n r5 = r5.append(r8);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n r2 = r5.append(r2);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n com.baidu.tts.chainofresponsibility.logger.LoggerProxy.m17001d(r4, r2);\t Catch:{ all -> 0x014d }\n r7.close();\n r6.close();\n r0 = r18;\n r2 = r0.f20995e;\n r2.unlock();\n goto L_0x00d2;\n L_0x0106:\n r2 = \"listId\";\n r3.put(r2, r5);\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n r2 = \"list\";\n r3.put(r2, r4);\t Catch:{ SQLiteException -> 0x00a6, IllegalStateException -> 0x00d9, Exception -> 0x0120 }\n r7.close();\n r6.close();\n r0 = r18;\n r2 = r0.f20995e;\n r2.unlock();\n goto L_0x00d2;\n L_0x0120:\n r2 = move-exception;\n r4 = \"SynthesizeResultDb\";\n r5 = new java.lang.StringBuilder;\t Catch:{ all -> 0x014d }\n r5.<init>();\t Catch:{ all -> 0x014d }\n r8 = \"exception:\";\n r5 = r5.append(r8);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n r2 = r5.append(r2);\t Catch:{ all -> 0x014d }\n r2 = r2.toString();\t Catch:{ all -> 0x014d }\n com.baidu.tts.chainofresponsibility.logger.LoggerProxy.m17001d(r4, r2);\t Catch:{ all -> 0x014d }\n r7.close();\n r6.close();\n r0 = r18;\n r2 = r0.f20995e;\n r2.unlock();\n goto L_0x00d2;\n L_0x014d:\n r2 = move-exception;\n r7.close();\n r6.close();\n r0 = r18;\n r3 = r0.f20995e;\n r3.unlock();\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.baidu.tts.e.c.b():java.util.Map<java.lang.String, java.util.ArrayList>\");\n }", "public static void loadTargetTerm2IdMapping(File input) throws IOException {\n\t\t\tm_namesMap = new SimpleBidirectionalMap<String, Integer>();\n\t\t\tString encoding = FileUtils.getFileEncoding(input);\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(input), encoding));\n\t\t\tString line = reader.readLine();\n\t\t\tint lineNum = 1;\n\t\t\tboolean testFormat = false;\n\t\t\tif(StringUtils.checkIfNumber(line.split(\"\\t\")[0]))\n\t\t\t\ttestFormat = true;\n\t\t\twhile(line!= null) {\n\t\t\t\tif(line.equals(\"@@@\"))\n\t\t\t\t\tbreak;\n\t\t\t\tif(testFormat) {\n\t\t\t\t\tString num = line.split(\"\\t\")[0];\n\t\t\t\t\tSystem.out.println(\"key: \"+line.trim().substring(num.length()+1) + \" value: \" + Integer.parseInt(num));\n\t\t\t\t\tm_namesMap.put(line.trim().substring(num.length()+1), Integer.parseInt(num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"key????\" + lineNum + \"instead of \" + line.split(\"\\t\")[0]);\n\t\t\t\t\tm_namesMap.put(line.trim(), lineNum);\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t\tlineNum ++;\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic void process(ResultItems resultItems, Task task) {\n\t\tfinal String url = resultItems.getRequest().getUrl();\r\n\t\tSystem.out.println(\"****************--Entry Pipeline Process--*****************\");\r\n\t\tSystem.out.println(\"Get page: \" + url);\r\n\r\n\t\t/*\r\n\t\t * if(url.matches(\r\n\t\t * \"http://blog\\\\.sina\\\\.com\\\\.cn/s/articlelist_.*\\\\.html\")){//文章列表\r\n\t\t * System.out.println(\"No Op in Article List\"); // }else\r\n\t\t * if(url.matches(\"http://www\\\\.asianews\\\\.it/news-en/.*\")){\r\n\t\t */\r\n\t\t// 具体文章内容\r\n\t\tString time = null, title = null, content = null, abstracts = null, convertUrl = null,query=\"\";\r\n\r\n\t\tfor (Map.Entry<String, Object> entry : resultItems.getAll().entrySet()) {\r\n\t\t\t// System.out.println(entry.getKey()+\":\\n\"+entry.getValue());\r\n\r\n\t\t\tif (AsianViewDetailItem.TIME.equals(entry.getKey())) {\r\n\t\t\t\ttime = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.TITLE.equals(entry.getKey())) {\r\n\t\t\t\ttitle = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.ABSTRACT.equals(entry.getKey())) {\r\n\t\t\t\tabstracts = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.CONTENT.equals(entry.getKey())) {\r\n\t\t\t\tcontent = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.URL.equals(entry.getKey())) {\r\n\t\t\t\tassert url.equals(entry.getValue());\r\n\t\t\t} else if (AsianViewDetailItem.CONVERT_URL.equals(entry.getKey())) {\r\n\t\t\t\tconvertUrl = (String) entry.getValue();\r\n\t\t\t}else if(AsianViewDetailItem.QUERY.equals(entry.getKey())){\r\n//\t\t\t\tquery=\"//query_\"+(String) entry.getValue();\r\n\t\t\t\tquery=(entry.getValue()!=null)?\"//query_\"+entry.getValue():\"\";\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// System.out.println(\"Time:\\n\"+CorpusFormatter.timeFormat(time));\r\n\t\t//\r\n\t\t// System.out.println(\"Title:\\n\"+title);\r\n\t\t//\r\n\t\t// System.out.println(\"Abstract:\\n\"+abstracts);\r\n\t\t//\r\n\t\t// System.out.println(\"Content:\\n\"+content);\r\n\t\t//\r\n\t\t// System.out.println(\"Url:\\n\"+url);\r\n\r\n\t\tString id = String.format(\"%s-%s\", time, ++counter);\r\n\r\n\t\tfinal String fileName = String.format(\".//\" + FileUtils.docName + \"%s//%s.txt\",query, id);\r\n\t\tSystem.out.println(\"File name :\" + fileName);\r\n\t\t// FileUtils.writeContent(fileName, time, title, content);\r\n\t\tFileUtils.writeCorpus(fileName,\r\n\t\t\t\tconvertUrl != null\r\n\t\t\t\t\t\t? CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\", convertUrl)\r\n\t\t\t\t\t\t: CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\"));\r\n\r\n\t\t// }else{\r\n\t\t// System.out.println(\"Can't match Url\");\r\n\t\t// }\r\n\t\tSystem.out.println(\"****************--Exit Pipeline Process--*****************\");\r\n\r\n\t}", "void setInputTableName(@Nonnull String inputTableName) {\r\n this.inputTableName = inputTableName;\r\n }", "@Override\n // Entry point\n public void act(DirectoryCache cache) {\n this.addTables();\n Map<ResourceLocation, LootTable> tables = new HashMap<>();\n for (Map.Entry<Block, LootTable.Builder> entry : this.blockLootTable.entrySet()) {\n tables.put(entry.getKey().getLootTable(),\n entry.getValue().setParameterSet(LootParameterSets.BLOCK).build());\n }\n for (Map.Entry<EntityType<?>, LootTable.Builder> entry : this.entityLootTable.entrySet()) {\n tables.put(entry.getKey().getLootTable(),\n entry.getValue().setParameterSet(LootParameterSets.ENTITY).build());\n }\n this.writeTables(cache, tables);\n }", "@Override\n public List<Object[]> getCodeLookupData(String codeName) {\n Session session = getSession();\n\n Criteria criteria = session.createCriteria(CodeLookup.class);\n criteria.add(Restrictions.eq(\"id.codeName\", codeName));\n criteria.addOrder(Order.asc(\"displayOrder\"));\n\n ProjectionList proList = Projections.projectionList();\n proList.add(Projections.property(\"id.codeValue\"), \"key\");\n\n // There is no translation codes at the moment so just default to\n // code value at the moment\n proList.add(Projections.property(\"id.codeValue\"), \"value\"); //if no translation = key\n proList.add(Projections.property(\"displayOrder\"));\n\n criteria.setProjection(proList);\n\n List<Object[]> results = criteria.list();\n\n return results;\n }" ]
[ "0.60607404", "0.5720578", "0.54800296", "0.5351144", "0.5333864", "0.52048844", "0.51677626", "0.50681055", "0.49953452", "0.4957014", "0.4943733", "0.4903865", "0.48656687", "0.48448282", "0.48334882", "0.48186663", "0.48149088", "0.48140904", "0.48060846", "0.48035842", "0.47924796", "0.4789156", "0.47870505", "0.47852188", "0.47543547", "0.4735967", "0.4713086", "0.47059947", "0.46914378", "0.4673571", "0.46635187", "0.46619725", "0.4660728", "0.4633193", "0.46312097", "0.4629133", "0.4619778", "0.4619074", "0.46147078", "0.46136534", "0.45929205", "0.45886686", "0.4587429", "0.45808977", "0.4571858", "0.4571831", "0.45664278", "0.456218", "0.45542887", "0.4553536", "0.45484424", "0.45479208", "0.4535109", "0.45320758", "0.45299965", "0.45267576", "0.45190087", "0.45106786", "0.44887623", "0.44866467", "0.4485741", "0.44842008", "0.44827706", "0.44810507", "0.4462603", "0.4460442", "0.44516924", "0.4447157", "0.44386205", "0.44365782", "0.44322795", "0.44305536", "0.44281062", "0.44266596", "0.4421558", "0.44197902", "0.44182795", "0.44063106", "0.44017282", "0.44010925", "0.44009098", "0.43914962", "0.43897936", "0.43886554", "0.4388014", "0.43876594", "0.43840024", "0.43837538", "0.43803304", "0.4371587", "0.4369596", "0.43638664", "0.43578038", "0.43536565", "0.43536052", "0.435216", "0.4351134", "0.4350895", "0.43500784", "0.43472254" ]
0.569915
2
Method: "action.LookupTableColumnFromCache", v1 (2 tasks) Task 1: Undetermined Input: String action.LookupTableColumnFromCache.TableName (tableName) Input: String action.LookupTableColumnFromCache.ColumnName (columnName) Input: Map action.LookupTableColumnFromCache.SearchParameters (searchParameters) Task 2: Custom code Output: Array action.LookupTableColumnFromCache.Column (results)
public List<ErrorReport> lookupTableColumnFromCache(ActionRequest request, ActionResponse response) throws CSWrapperException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"columns/{srcEnv}/{srcDB}/{table}\", method = {RequestMethod.GET})\n @ResponseBody\n public RestWrapper getColumsnList(@PathVariable(\"srcEnv\") String srcEnv, @PathVariable(\"srcDB\") String srcDB, @PathVariable(\"table\") String tableName) {\n RestWrapper restWrapper = null;\n LOGGER.info(srcEnv + \"srcEnvi\");\n LOGGER.info(srcDB + \"srcDB\");\n LOGGER.info(tableName + \"tableName\");\n try {\n Class.forName(driverName);\n connection = DriverManager.getConnection(\"jdbc:hive2://\" + srcEnv + \"/\" + srcDB.toLowerCase(), \"\", \"\");\n ResultSet rs = connection.createStatement().executeQuery(\"select * from \" + srcDB + \".\" + tableName +\" limit 1\");\n ResultSetMetaData metaData = rs.getMetaData();\n Map<String, String> databases = new HashMap<String, String>();\n List<Map<String,String>> columnList=new ArrayList<>();\n\n TableColumns[] tableColumns=new TableColumns[1000];\n for(int i=1; i<=metaData.getColumnCount();i++){\n String colName = metaData.getColumnLabel(i).replaceFirst(tableName.toLowerCase()+\".\", \"\");\n String datatype = metaData.getColumnTypeName(i);\n TableColumns t=new TableColumns();\n Map<String,String> m1=new HashMap<>();\n\n t.setColumnName(colName);\n t.setDataType(datatype);\n m1.put(\"columnName\", colName);\n m1.put(\"dataType\", datatype);\n columnList.add(m1);\n\n databases.put(colName,datatype);\n tableColumns[i-1]=t;\n }\n //System.out.println(\"databases = \" + databases);\n restWrapper = new RestWrapper(columnList, RestWrapperOptions.OK);\n } catch (Exception e) {\n LOGGER.error(\"error occured \" + e);\n restWrapper = new RestWrapper(e.getMessage(), RestWrapper.ERROR);\n }\n return restWrapper;\n }", "public List<ErrorReport> lookupTableFromCache(ActionRequest request, ActionResponse response)\n\t\tthrows CSWrapperException;", "protected TableMetadata resolveTable(TableId tableId)\n {\n TableEntry entry = cache.computeIfAbsent(\n tableId.name(),\n key -> new TableEntry(base.table(tableId))\n );\n return entry.table;\n }", "public void fetColumnList() {\n try {\n table.getColumns().clear();\n if (rsAllEntries != null) {\n //SQL FOR SELECTING ALL OF CUSTOMER\n for (int i = 0; i < rsAllEntries.getMetaData().getColumnCount(); i++) {\n //We are using non property style for making dynamic table\n final int j = i;\n TableColumn col = new TableColumn();\n switch (rsAllEntries.getMetaData().getColumnName(i + 1)) {\n case \"order_number\":\n col.setText(\"Order Number\");\n break;\n case \"product_type\":\n col.setText(\"Produt Type\");\n break;\n case \"worker\":\n col.setText(\"Worker\");\n break;\n case \"planned_time\":\n col.setText(\"Planned Time\");\n break;\n case \"actual_time\":\n col.setText(\"Actual Time\");\n break;\n case \"order_status\":\n col.setText(\"Order Status\");\n break;\n default:\n col.setText(rsAllEntries.getMetaData().getColumnName(i + 1)); //if column name in SQL Database is not found, then TableView column receive SQL Database current column name (not readable)\n break;\n }\n\n col.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<ObservableList, String>, ObservableValue<String>>() {\n public ObservableValue<String> call(TableColumn.CellDataFeatures<ObservableList, String> param) {\n return new SimpleStringProperty(param.getValue().get(j).toString());\n }\n });\n\n table.getColumns().removeAll(col);\n table.getColumns().addAll(col);\n }\n } else {\n warning.setText(\"No columns to display\");\n }\n } catch (SQLException e) {\n System.out.println(\"Failure getting column data from SQL \");\n }\n }", "TableCache(String paramterName, String tableName) {\n\n cache = new HashMap<>(1);\n cache.put(paramterName, tableName);\n\n }", "@RequestMapping(value = \"/data/{srcEnv}/{srcDB}/{pid}\", method = {RequestMethod.GET})\n @ResponseBody\n public RestWrapper getTableData(@PathVariable(\"srcEnv\") String srcEnv, @PathVariable(\"srcDB\") String srcDB, @PathVariable(\"pid\") String pid) {\n RestWrapper restWrapper = null;\n LOGGER.info(srcEnv + \"srcEnvi\");\n LOGGER.info(srcDB + \"srcDB\");\n try {\n Class.forName(driverName);\n connection = DriverManager.getConnection(\"jdbc:hive2://\" + srcEnv + \"/\" + srcDB.toLowerCase(), \"\", \"\");\n String tableName=\"ML_\"+pid;\n ResultSet rs = connection.createStatement().executeQuery(\"select * from \" + srcDB + \".\" + tableName);\n\n ResultSetMetaData metaData = rs.getMetaData();\n List<Map<String, Object>> tables = new ArrayList<Map<String, Object>>();\n while (rs.next()) {\n Map<String,Object> m=new LinkedHashMap<>();\n for(int j=1;j<=metaData.getColumnCount();j++){\n\n String colName = metaData.getColumnLabel(j).replaceFirst(tableName.toLowerCase()+\".\", \"\");\n if(!colName.equals(\"features\") && !colName.equals(\"rawprediction\") && !colName.equals(\"probability\")){\n Object colValue=rs.getObject(j);\n m.put(colName,colValue);}\n }\n tables.add(m);\n }\n restWrapper = new RestWrapper(tables, RestWrapperOptions.OK);\n\n } catch (Exception e) {\n LOGGER.error(\"error occured \" + e);\n restWrapper = new RestWrapper(e.getMessage(), RestWrapper.ERROR);\n }\n return restWrapper;\n }", "List<ObjectTableColumn<E>> getObjectColumnMap();", "@Override\n\tpublic Map<String, String[]> loadColumnMetas(String databaseName) throws SQLException {\n\t\tString sql=\"select utc.*,UCC.comments from user_tab_columns utc\\n\" + \n\t\t\t\t\"left join user_col_comments ucc on UCC.table_name=UTC.table_name and UCC.column_name=UTC.column_name\";\n\t\tMap<String, String[]> ret=new HashMap<>();\n\t\t try(PreparedStatement preparedStatement= connection.prepareStatement(sql);\n\t \t\tResultSet resultSet=preparedStatement.executeQuery();){\n\t\t\twhile(resultSet.next()) {\n\t\t\t\tString tableName=resultSet.getString(\"TABLE_NAME\")\n\t\t\t\t\t\t,columnName=resultSet.getString(\"COLUMN_NAME\")\n\t\t\t\t\t\t,dataLength=resultSet.getString(\"DATA_LENGTH\")\n\t\t ,nullable=resultSet.getString(\"NULLABLE\")\n\t\t ,comments=resultSet.getString(\"COMMENTS\")\n\t\t\t\t\t\t;\n\t\t\t\tString key=tableName+\":\"+columnName;\n\t\t\t\tret.put(key, new String[] {dataLength,nullable,comments});\n\t\t\t\t\n\t\t\t}\n\t }\n\t\t\n\t\treturn ret;\n\t}", "<K, C> TableMetadata<K, C> getTableMetadata(TableName tableName);", "protected void createLookupCache() {\n }", "private void readTableToDescriptor() {\n for (BeanDescriptor<?> desc : descMap.values()) {\n String baseTable = desc.baseTable();\n if (baseTable != null) {\n baseTable = baseTable.toLowerCase();\n List<BeanDescriptor<?>> list = tableToDescMap.computeIfAbsent(baseTable, k -> new ArrayList<>(1));\n list.add(desc);\n }\n if (desc.entityType() == EntityType.VIEW && desc.isQueryCaching()) {\n // build map of tables to view entities dependent on those tables\n // for the purpose of invalidating appropriate query caches\n String[] dependentTables = desc.dependentTables();\n if (dependentTables != null && dependentTables.length > 0) {\n for (String depTable : dependentTables) {\n depTable = depTable.toLowerCase();\n List<BeanDescriptor<?>> list = tableToViewDescMap.computeIfAbsent(depTable, k -> new ArrayList<>(1));\n list.add(desc);\n }\n }\n }\n }\n }", "public TapColumn findOneColumn(TapColumnPK tapColumnPK);", "private Map getColumns(TableConfiguration tc) throws SQLException {\n String localCatalog;\n String localSchema;\n String localTableName;\n \n boolean delimitIdentifiers = tc.isDelimitIdentifiers()\n || StringUtility.stringContainsSpace(tc.getCatalog())\n || StringUtility.stringContainsSpace(tc.getSchema())\n || StringUtility.stringContainsSpace(tc.getTableName());\n\n if (delimitIdentifiers) {\n localCatalog = tc.getCatalog();\n localSchema = tc.getSchema();\n localTableName = tc.getTableName();\n } else if (databaseMetaData.storesLowerCaseIdentifiers()) {\n localCatalog = tc.getCatalog() == null ? null : tc.getCatalog()\n .toLowerCase();\n localSchema = tc.getSchema() == null ? null : tc.getSchema()\n .toLowerCase();\n localTableName = tc.getTableName() == null ? null : tc\n .getTableName().toLowerCase();\n } else if (databaseMetaData.storesUpperCaseIdentifiers()) {\n localCatalog = tc.getCatalog() == null ? null : tc.getCatalog()\n .toUpperCase();\n localSchema = tc.getSchema() == null ? null : tc.getSchema()\n .toUpperCase();\n localTableName = tc.getTableName() == null ? null : tc\n .getTableName().toUpperCase();\n } else {\n localCatalog = tc.getCatalog();\n localSchema = tc.getSchema();\n localTableName = tc.getTableName();\n }\n\n if (tc.isWildcardEscapingEnabled()) {\n String escapeString = databaseMetaData.getSearchStringEscape();\n \n StringBuffer sb = new StringBuffer();\n StringTokenizer st;\n if (localSchema != null) {\n st = new StringTokenizer(localSchema, \"_%\", true); //$NON-NLS-1$\n while (st.hasMoreTokens()) {\n String token = st.nextToken();\n if (token.equals(\"_\") //$NON-NLS-1$\n || token.equals(\"%\")) { //$NON-NLS-1$\n sb.append(escapeString);\n }\n sb.append(token);\n }\n localSchema = sb.toString();\n }\n \n sb.setLength(0);\n st = new StringTokenizer(localTableName, \"_%\", true); //$NON-NLS-1$\n while (st.hasMoreTokens()) {\n String token = st.nextToken();\n if (token.equals(\"_\") //$NON-NLS-1$\n || token.equals(\"%\")) { //$NON-NLS-1$\n sb.append(escapeString);\n }\n sb.append(token);\n }\n localTableName = sb.toString();\n }\n\n Map answer = new HashMap();\n \n ResultSet rs = databaseMetaData.getColumns(localCatalog, localSchema,\n localTableName, null);\n\n while (rs.next()) {\n ColumnDefinition cd = new ColumnDefinition(tc.getAlias(), abatorContext);\n\n cd.setJdbcType(rs.getInt(\"DATA_TYPE\")); //$NON-NLS-1$\n cd.setLength(rs.getInt(\"COLUMN_SIZE\")); //$NON-NLS-1$\n cd.setActualColumnName(rs.getString(\"COLUMN_NAME\")); //$NON-NLS-1$\n cd.setNullable(rs.getInt(\"NULLABLE\") == DatabaseMetaData.columnNullable); //$NON-NLS-1$\n cd.setScale(rs.getInt(\"DECIMAL_DIGITS\")); //$NON-NLS-1$\n cd.setTypeName(rs.getString(\"TYPE_NAME\")); //$NON-NLS-1$\n \n ActualTableName atn = new ActualTableName(rs.getString(\"TABLE_CAT\"), //$NON-NLS-1$\n rs.getString(\"TABLE_SCHEM\"), //$NON-NLS-1$\n rs.getString(\"TABLE_NAME\")); //$NON-NLS-1$\n \n List columns = (List) answer.get(atn);\n if (columns == null) {\n columns = new ArrayList();\n answer.put(atn, columns);\n }\n \n columns.add(cd);\n }\n \n closeResultSet(rs);\n \n return answer;\n }", "public SnmpMibTable getRegisteredTableMeta(String paramString) {\n/* 670 */ if (this.metadatas == null) return null; \n/* 671 */ if (paramString == null) return null; \n/* 672 */ return this.metadatas.get(paramString);\n/* */ }", "public List<Map<String, Object>> searchDBTableDate(String condition) {\n log.info(new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").format(new Date()) + \"search db table data\");\n// TrafferCurrentDB();\n List<Map<String, Object>> list = queryMap(condition);\n if (StringUtils.isEmpty(list)) {\n throw new SQLException(SQLError, SQLError);\n }\n if (list.size() == 0) {\n List<String> tableNameList = (List<String>) session.getAttribute(\"list\");\n String DBName = (String) session.getAttribute(\"dbName\");\n tableNameList.forEach(\n tableName -> {\n if (condition.contains(tableName)) {\n queryMap(\n \"SELECT column_name FROM information_schema.columns WHERE table_name='\" + dbNameTrim(tableName) + \"' And table_schema='\" + dbNameTrim(DBName) + \"'\").forEach(\n stringObjectMap -> {\n if (!list.contains(stringObjectMap)) {\n list.add(stringObjectMap);\n }\n }\n );\n }\n }\n );\n\n }\n return list;\n }", "@Cacheable(value = \"getShardsAndDaysHint\",\n key = \"{#root.target.dateIndexTableName,#root.target.auths,#root.target.collapseDatePercentThreshold,#field,#begin,#end,#rangeBegin,#rangeEnd,#datatypeFilter}\",\n cacheManager = \"dateIndexHelperCacheManager\")\n public String getShardsAndDaysHint(String field, Date begin, Date end, Date rangeBegin, Date rangeEnd, Set<String> datatypeFilter)\n throws TableNotFoundException {\n log.debug(\"cache fault for getShardsAndDaysHint(\" + dateIndexTableName + \", \" + auths + \", \" + collapseDatePercentThreshold + \", \" + field + \", \"\n + begin + \", \" + end + \", \" + rangeBegin + \", \" + rangeEnd + \", \" + datatypeFilter + \")\");\n if (log.isTraceEnabled()) {\n this.showMeDaCache(\"before getShardsAndDaysHint\");\n }\n long startTime = System.currentTimeMillis();\n if (log.isDebugEnabled()) {\n log.debug(\"timeTravel is \" + this.timeTravel);\n }\n SimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd\");\n String minShard = format.format(rangeBegin);\n String maxShard = format.format(rangeEnd);\n\n TreeMap<String,BitSet> bitsets = new TreeMap<>();\n\n BatchScanner bs = ScannerHelper.createBatchScanner(client, dateIndexTableName, auths, numQueryThreads);\n\n try {\n bs.setRanges(Arrays.asList(new Range(DateIndexUtil.format(begin), DateIndexUtil.format(end) + '~')));\n\n Iterator<Entry<Key,Value>> iterator = bs.iterator();\n\n while (iterator.hasNext()) {\n Entry<Key,Value> entry = iterator.next();\n Key k = entry.getKey();\n String[] parts = StringUtils.split(k.getColumnQualifier().toString(), '\\0');\n String date = parts[0];\n\n // If the event date is more than one day before the event actually happened,\n // then skip it, unless time-travel has been enabled.\n String[] columnFamilyParts = StringUtils.split(k.getColumnFamily().toString(), '\\0');\n if (timeTravel == false && columnFamilyParts.length > 0 && columnFamilyParts[0].equals(\"ACTIVITY\")) {\n try {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyyMMdd\");\n String rowDateString = k.getRow().toString();\n // the row may be sharded, i need to get the date part\n if (rowDateString.contains(\"_\")) {\n // strip off the shard number part of the rowDate string\n rowDateString = rowDateString.substring(0, rowDateString.indexOf(\"_\"));\n }\n LocalDate rowDate = LocalDate.parse(rowDateString, formatter);\n LocalDate shardDate = LocalDate.parse(date, formatter);\n if (shardDate.isBefore(rowDate.minusDays(1))) {\n continue;\n }\n } catch (Exception ex) {\n // likely a problem parsing the dates, Move on....\n log.info(\"problem during delorean check\", ex);\n }\n }\n\n // If the date is outside of the min and max shard, then continue to the next entry\n if (date.compareTo(minShard) < 0) {\n continue;\n }\n if (date.compareTo(maxShard) > 0) {\n continue;\n }\n\n if (parts[2].equals(field)) {\n if (datatypeFilter == null || datatypeFilter.isEmpty() || datatypeFilter.contains(parts[1])) {\n BitSet bits = BitSet.valueOf(entry.getValue().get());\n BitSet mappedBits = bitsets.get(date);\n if (mappedBits == null) {\n bitsets.put(date, bits);\n } else {\n mappedBits.or(bits);\n }\n }\n }\n }\n\n } finally {\n bs.close();\n }\n\n StringBuilder builder = new StringBuilder();\n for (Map.Entry<String,BitSet> entry : bitsets.entrySet()) {\n appendToShardsAndDays(builder, entry.getValue(), entry.getKey());\n }\n\n String shardsAndDays = builder.toString();\n\n if (log.isDebugEnabled()) {\n long endTime = System.currentTimeMillis();\n log.debug(\"getShardsAndDaysHint from table: \" + dateIndexTableName + \", \" + auths + \", \" + collapseDatePercentThreshold + \", \" + field + \", \"\n + begin + \", \" + end + \", \" + rangeBegin + \", \" + rangeEnd + \", \" + datatypeFilter + \" returned \" + shardsAndDays + \" in \"\n + (endTime - startTime) + \"ms\");\n }\n\n return shardsAndDays;\n }", "Map<String, ByteBuffer> getColumns(String columnFamily, String key, int limit, boolean reversed, String fromColumn, String toColumn);", "@SuppressWarnings({\"unchecked\", \"fallthrough\"})\n public static Class<? extends DataObject> modelFromTables(Connection connection, String classname, Action action, String... tablenames) throws Exception {\n\n /*\n SQL generation\n\n INSERT INTO T ( cols ) VALUES ( vals );\n UPDATE T SET cols WHERE vals;\n DELETE FROM T WHERE vals;\n SELECT * FROM cols WHERE vals;\n */\n\n ClassPool pool = ClassPool.getDefault();\n // this line is necessary for web applications (web container class loader in play)\n pool.appendClassPath(new LoaderClassPath(org.xillium.data.DataObject.class.getClassLoader()));\n\n CtClass cc = pool.makeClass(classname);\n cc.addInterface(pool.getCtClass(\"org.xillium.data.DataObject\"));\n ConstPool cp = cc.getClassFile().getConstPool();\n\n List<String> fragments = new ArrayList<String>();\n Set<String> unique = new HashSet<String>();\n\n/*SQL*/ StringBuilder\n cols = new StringBuilder(), // CREATE: COLUMNS, RETRIEVE: TABLES, UPDATE: SET CLAUSES, DELETE: (not used), SEARCH: TABLES\n vals = new StringBuilder(), // CREATE: VALUES, RETRIEVE: COND'S, UPDATE: COND'S, DELETE: COND'S, SEARCH: COND'S\n flds = new StringBuilder();\n\n // for SEARCH only\n Map<String, List<Pair<Integer, Integer>>> voptional = new HashMap<String, List<Pair<Integer, Integer>>>();\n Map<String, List<Pair<Integer, Integer>>> foptional = new HashMap<String, List<Pair<Integer, Integer>>>();\n Map<String, String> nametrans = new HashMap<String, String>();\n\n DatabaseMetaData meta = connection.getMetaData();\n String schema = meta.getUserName();\n List<String> dominant = new ArrayList<String>();\n\n for (int i = 0; i < tablenames.length; ++i) {\n // Dominant tables are recognized and maintained in 'dominant' list\n if (tablenames[i].charAt(0) == DOMINANT_INDICATOR) {\n tablenames[i] = tablenames[i].substring(1);\n dominant.add(tablenames[i]);\n }\n\n PreparedStatement stmt = connection.prepareStatement(\"SELECT * FROM \" + tablenames[i]);\n ResultSetMetaData rsmeta = stmt.getMetaData();\n Map<String, Integer> colref = new HashMap<String, Integer>();\n for (int j = 1, jj = rsmeta.getColumnCount(); j <= jj; ++j) {\n colref.put(rsmeta.getColumnLabel(j), new Integer(j));\n }\n\n Set<String> primaryKeys = new HashSet<String>();\n ResultSet keys = meta.getPrimaryKeys(connection.getCatalog(), schema, tablenames[i]);\n while (keys.next()) {\n primaryKeys.add(keys.getString(PKEY_COLUMN));\n }\n keys.close();\n\n // RETRIEVE is not compatible with tables without a primary key\n if (primaryKeys.isEmpty() && action.op == Operation.RETRIEVE) {\n throw new RuntimeException(\"Primary key expected for RETRIEVE command, but missing on table \" + tablenames[i]);\n }\n\n // ISA keys and table join conditions\n Set<String> isaKeys = new HashSet<String>();\n if (i > 0) {\n keys = meta.getImportedKeys(connection.getCatalog(), schema, tablenames[i]);\n while (keys.next()) {\n String jointable = null;\n for (int j = 0; j < i; ++j) {\n if (keys.getString(FKEY_REFERENCED_TABLE).equals(tablenames[j])) {\n jointable = tablenames[j];\n break;\n }\n }\n if (jointable != null) {\n String column = keys.getString(FKEY_REFERENCING_COLUMN);\n isaKeys.add(column);\n if (action.op == Operation.RETRIEVE || action.op == Operation.SEARCH) {\n /*SQL*/ vals.append(tablenames[i]).append('.').append(column).append('=').append(jointable).append('.').append(column).append(\" AND \");\n }\n }\n }\n keys.close();\n }\n\n String alias = ((action.op == Operation.RETRIEVE || action.op == Operation.SEARCH) && tablenames.length > 1) ? tablenames[i]+'.' : \"\";\n\n if (action.op != Operation.RETRIEVE && action.op != Operation.SEARCH) {\n cols.setLength(0);\n vals.setLength(0);\n flds.setLength(0);\n } else {\n /*SQL*/ if (cols.length() > 0) cols.append(',');\n /*SQL*/ cols.append(tablenames[i]);\n }\n\n // Go through all columns in action.args for UPDATE and SEARCH operations\n Set<String> requested = new HashSet<String>();\n Set<String> required = new HashSet<String>();\n if (action.op == Operation.UPDATE) {\n // UPDATE: the elements in the SET clause => cols\n for (String column: calcUpdateColumns(action.args, colref, primaryKeys)) {\n // skip all key columns, which might be legally included through the restriction list\n if (primaryKeys.contains(column)) continue;\n // ... and SET others\n Integer idx = colref.get(column);\n if (idx != null) {\n /*SQL*/ if (cols.length() > 0) cols.append(',');\n /*SQL*/ String restriction = action.restriction == null ? null : action.restriction.get(column);\n if (restriction == null) {\n boolean reqd = action.isRequired(column);\n if (reqd) {\n /*SQL*/ cols.append(column).append(\"=?\");\n } else {\n /*SQL*/ cols.append(column).append(\"=COALESCE(?,\").append(column).append(')');\n }\n /*SQL*/ if (flds.length() > 0) flds.append(',');\n flds.append(fieldName(tablenames[i], column)).append(':').append(rsmeta.getColumnType(idx.intValue()));\n requested.add(column);\n if (reqd) required.add(column);\n } else {\n /*SQL*/ cols.append(column).append('=').append(restriction);\n }\n }\n }\n } else if (action.op == Operation.SEARCH && action.args != null) {\n // SEARCH: the elements in the WHERE clause => vals\n for (int c = 0; c < action.args.length; ++c) {\n // skip all ISA columns, which might be legally included through the restriction list\n if (isaKeys.contains(action.args[c])) continue;\n // else ...\n Integer idx = colref.get(action.args[c]);\n if (idx != null) {\n /*SQL*/ String restriction = action.restriction == null ? null : action.restriction.get(action.args[c]);\n /*SQL*/ if (restriction == null || restriction.charAt(0) == NEGATIVE_INDICATOR) {\n if (restriction != null) {\n /*SQL*/ vals.append(tablenames[i]).append('.').append(action.args[c]).append(\"<>\").append(restriction.substring(1)).append(\" AND \");\n }\n int vstart = vals.length(), fstart = flds.length();\n /*SQL*/ vals.append(tablenames[i]).append('.').append(action.args[c]).append(action.cmps[c]).append(\"? AND \");\n flds.append(fieldName(tablenames[i], action.args[c])).append(':').append(rsmeta.getColumnType(idx.intValue())).append(',');\n if (!action.reqd[c]) {\n traceOptional(voptional, action.args[c], vstart, vals.length());\n traceOptional(foptional, action.args[c], fstart, flds.length());\n }\n requested.add(action.args[c]);\n if (action.reqd[c]) required.add(action.args[c]);\n } else {\n /*SQL*/ vals.append(tablenames[i]).append('.').append(action.args[c]).append('=').append(restriction).append(\" AND \");\n }\n }\n }\n }\n\n ResultSet columns = meta.getColumns(connection.getCatalog(), schema, tablenames[i], \"%\");\n columns:while (columns.next()) {\n String name = columns.getString(COLUMN_NAME), fname = fieldName(tablenames[i], name);\n int idx = colref.get(name).intValue();\n\n if ((action.op == Operation.RETRIEVE || action.op == Operation.DELETE) && !primaryKeys.contains(name)) {\n continue;\n } else if (action.op == Operation.UPDATE && !requested.contains(name) && !primaryKeys.contains(name)) {\n continue;\n } else if (action.op == Operation.SEARCH && !requested.contains(name)) {\n continue;\n }\n\n /*SQL*/ String restriction = action.restriction == null ? null : action.restriction.get(name);\n switch (action.op) {\n case CREATE:\n if (action.args != null) for (int j = 0; j < action.args.length; ++j) {\n if (action.args[j].equals(name)) continue columns;\n }\n /*SQL*/ if (cols.length() > 0) {\n /*SQL*/ cols.append(',');\n /*SQL*/ vals.append(',');\n /*SQL*/ }\n /*SQL*/ cols.append(name);\n /*SQL*/ if (restriction == null || restriction.charAt(0) == NEGATIVE_INDICATOR) {\n /*SQL*/ vals.append('?');\n /*SQL*/ if (flds.length() > 0) flds.append(',');\n flds.append(fname).append(':').append(rsmeta.getColumnType(idx));\n } else {\n /*SQL*/ vals.append(restriction);\n }\n break;\n case RETRIEVE:\n if (i > 0) {\n // NOTE: ISA relation dictates that sub-tables' primary key == super-table's primary key\n // therefore the join condition generated above is sufficient already\n break;\n }\n // fall through for the super-table\n case DELETE:\n // only primary key columns\n generateCondition(restriction, vals, flds, alias + name, fname, rsmeta.getColumnType(idx));\n break;\n case UPDATE:\n // only primary key & updating columns\n if (primaryKeys.contains(name)) {\n generateCondition(restriction, vals, flds, name, fname, rsmeta.getColumnType(idx));\n }\n break;\n case SEARCH:\n // file optionals lists under field names\n nametrans.put(name, fname);\n voptional.put(fname, voptional.get(name));\n foptional.put(fname, foptional.get(name));\n break;\n }\n\n if ((restriction != null && restriction.charAt(0) != NEGATIVE_INDICATOR) || isaKeys.contains(name)) {\n continue;\n } else if (unique.contains(name)) {\n continue;\n //throw new RuntimeException(\"Duplicate column in ISA relationship detected \" + tablenames[i] + ':' + name);\n } else {\n unique.add(name);\n }\n\n CtField field = new CtField(pool.getCtClass(MetaDataHelper.getClassName(rsmeta, idx)), fname, cc);\n field.setModifiers(java.lang.reflect.Modifier.PUBLIC);\n AnnotationsAttribute attr = new AnnotationsAttribute(cp, AnnotationsAttribute.visibleTag);\n\n if (required.contains(name)) {\n addAnnotation(attr, cp, \"org.xillium.data.validation.required\");\n } else if (columns.getInt(IS_NULLABLE) == DatabaseMetaData.attributeNoNulls) {\n if ((action.op != Operation.UPDATE || primaryKeys.contains(name)) && action.op != Operation.SEARCH) {\n addAnnotation(attr, cp, \"org.xillium.data.validation.required\");\n }\n }\n\n if (rsmeta.getPrecision(idx) != 0) {\n addAnnotation(attr, cp, \"org.xillium.data.validation.size\", \"value\", new IntegerMemberValue(cp, rsmeta.getPrecision(idx)));\n }\n\n addAnnotation(attr, cp, \"org.xillium.data.persistence.crud.tablename\", \"value\", new StringMemberValue(tablenames[i], cp));\n\n field.getFieldInfo().addAttribute(attr);\n cc.addField(field);\n }\n columns.close();\n stmt.close();\n\n switch (action.op) {\n case CREATE:\n fragments.add(\"org.xillium.data.persistence.ParametricStatement\");\n fragments.add(flds.toString());\n fragments.add(\"INSERT INTO \" + tablenames[i] + '(' + cols.toString() + \") VALUES(\" + vals.toString() + ')');\n fragments.add(Strings.toCamelCase(tablenames[i], '_'));\n break;\n case UPDATE:\n if (cols.length() > 0) {\n fragments.add(\"org.xillium.data.persistence.ParametricStatement\");\n fragments.add(flds.toString());\n fragments.add(\"UPDATE \" + tablenames[i] + \" SET \" + cols.toString() + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n fragments.add(Strings.toCamelCase(tablenames[i], '_'));\n }\n break;\n case DELETE:\n fragments.add(\"org.xillium.data.persistence.ParametricStatement\");\n fragments.add(flds.toString());\n fragments.add(\"DELETE FROM \" + tablenames[i] + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n fragments.add(Strings.toCamelCase(tablenames[i], '_'));\n break;\n case RETRIEVE:\n case SEARCH:\n break;\n }\n }\n\n if (action.op == Operation.RETRIEVE) {\n fragments.add(\"org.xillium.data.persistence.ParametricQuery\");\n fragments.add(flds.toString());\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n fragments.add(\"\");\n } else if (action.op == Operation.SEARCH) {\n if (action.opts != null) {\n for (int i = 0; i < action.opts.length; ++i) {\n action.opts[i] = nametrans.get(action.opts[i]);\n }\n int count = 1 << action.opts.length;\n\n String vtext = vals.toString(), ftext = flds.toString();\n for (int i = 0; i < count; ++i) {\n char[] vchars = vtext.toCharArray(), fchars = ftext.toCharArray();\n for (int j = 0; j < action.opts.length; ++j) {\n List<Pair<Integer, Integer>> vlist = voptional.get(action.opts[j]);\n List<Pair<Integer, Integer>> flist = foptional.get(action.opts[j]);\n if (vlist == null || flist == null) {\n throw new RuntimeException(\"Column{\"+action.opts[j]+\"}NotInRelevantTables\");\n }\n if ((i & (1 << j)) == 0) {\n for (Pair<Integer, Integer> part: vlist) Arrays.fill(vchars, part.first, part.second, ' ');\n for (Pair<Integer, Integer> part: flist) Arrays.fill(fchars, part.first, part.second, ' ');\n }\n }\n\n fragments.add(\"org.xillium.data.persistence.ParametricQuery\");\n fragments.add(new String(fchars).replaceAll(\"\\\\s+\", \" \"));\n String vals0 = new String(vchars).replaceAll(\"\\\\s+\", \" \").replaceAll(\" AND *$\", \"\").trim();\n if (vals0.length() > 0) {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols + \" WHERE \" + vals0);\n } else {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols);\n }\n fragments.add(\"\");\n }\n } else {\n fragments.add(\"org.xillium.data.persistence.ParametricQuery\");\n fragments.add(flds.toString());\n if (vals.length() > 0) {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n } else {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols);\n }\n fragments.add(\"\");\n }\n }\n\n CtField field = new CtField(pool.getCtClass(\"org.xillium.data.persistence.ParametricStatement[]\"), STATEMENT_FIELD_NAME, cc);\n field.setModifiers(java.lang.reflect.Modifier.PUBLIC | java.lang.reflect.Modifier.STATIC | java.lang.reflect.Modifier.FINAL);\n cc.addField(field, CtField.Initializer.byCallWithParams(\n pool.getCtClass(CrudCommand.class.getName()), \"buildStatements\", fragments.toArray(new String[fragments.size()])\n ));\n\n return (Class<? extends DataObject>)cc.toClass(CrudCommand.class.getClassLoader(), CrudCommand.class.getProtectionDomain());\n }", "@Test\n \tpublic void mapTable() {\n \t\t\n \t\tString[][] data = { { \"11\", \"12\" }, { \"21\", \"22\" } };\n \n \t\tTable table = tableWith(data,\"c1\",\"c2\");\n \n \t\tTableMapDirectives directives = new TableMapDirectives(table.columns().get(0));\n \t\t\n \t\tdirectives.add(column(\"TAXOCODE\"))\n \t\t .add(column(\"ISSCAAP\"))\n \t\t .add(column(\"Scientific_name\"))\n \t\t .add(column(\"English_name\").language(\"en\"))\n \t\t .add(column(\"French_name\").language(\"fr\"))\n \t\t .add(column(\"Spanish_name\").language(\"es\"))\n \t\t .add(column(\"Author\"))\n \t\t .add(column(\"Family\"))\n \t\t .add(column(\"Order\"));\n \n \t\tOutcome outcome = service.map(table, directives);\n \t\t\n \t\tassertNotNull(outcome.result());\n \t}", "public TapTable findOneTable(String tableName);", "public String dynLookupDependency() \r\n {\r\n\tSessionCO sessionCO = returnSessionObject();\r\n\tString elementId=null,colName =null, colDesc = null,colType =null,colTechName= null,elemId = null, colValue=null;\r\n\tDynCommonLookupSC dynCommonLookupSC =new DynCommonLookupSC ();\r\n\r\n\ttry\r\n\t{\r\n\t List<String> elemIds = new ArrayList<String>();\r\n\t for(Map.Entry<String, Object> entry : criteria.getElemHm().entrySet())\r\n\t {\r\n\t\tString entryKey = (String)entry.getKey();\r\n\t\telemIds.add(entryKey);\r\n\t\t//get column name\r\n\t\tif(\"colName\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t colName= val[0];\r\n\t\t}\r\n\t\t//get column description\r\n\t\telse if(\"colDesc\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t colDesc= val[0];\r\n\t\t}\r\n\t\t//get column technical name\r\n\t\telse if(\"colTechName\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t colTechName= val[0];\r\n\t\t}\r\n\t\telse if(\"elementId\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t elementId = val[0]; \r\n\t\t String[] arr = val[0].split(\"_\");\r\n\t\t elemId= arr[0];\r\n\r\n\t\t}\r\n\t\telse if(\"colValue\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t colValue= val[0];\r\n\t\t}\r\n\t\t//get Column Type\r\n\t\telse if(\"colType\".equals(entryKey))\r\n\t\t{\r\n\t\t String[] val = (String[])entry.getValue();\r\n\t\t colType= val[0];\r\n\t\t}\r\n\t }\r\n\t if(colValue.isEmpty())\r\n\t {\r\n\t\tcolValue=\"NULL\";\r\n\t }\r\n\t else {\r\n\t\t//check column type\r\n\t\tif(!colType.isEmpty())\r\n\t\t{\r\n\r\n\t\t switch(colType) {\r\n\t\t\tcase \"1\"://String\r\n\r\n\t\t\t //Escape single quotes\r\n\t\t\t if(colValue.indexOf(\"'\")!=-1)\r\n\t\t\t {\r\n\t\t\t\tcolValue = colValue.replaceAll(\"'\", \"''\"); \r\n\t\t\t }\r\n\t\t\t colValue= \"'\"+colValue+\"'\";\r\n\t\t\t break;\r\n\t\t\tcase \"2\"://Date\r\n\r\n\t\t\t //Escape single quotes\r\n\t\t\t if(colValue.indexOf(\"'\")!=-1)\r\n\t\t\t {\r\n\t\t\t\tcolValue = colValue.replaceAll(\"'\", \"''\"); \r\n\t\t\t }\r\n\t\t\t if(criteria.getIsOracle() == 1)\r\n\t\t\t {\r\n\t\t\t\tcolValue = \"TO_DATE(TO_CHAR('\" + colValue + \"','dd/mm/yyyy'),'dd/mm/yyyy')\";\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\tcolValue = \"CONVERT(DATE,CONVERT(VARCHAR,'\" + colValue + \"',103),103))\";\r\n\t\t\t }\r\n\t\t\t break;\r\n\t\t\tcase \"3\"://NUMERIC\r\n\t\t\t if(!NumberUtil.isNumber(colValue))\r\n\t\t\t {\r\n\t\t\t\tcolValue=\"NULL\";\r\n\t\t\t }\r\n\r\n\t\t\t break;\r\n\t\t\tcase \"4\"://BOOLEAN\r\n\t\t\t //Escape single quotes\r\n\t\t\t if(colValue.indexOf(\"'\")!=-1)\r\n\t\t\t {\r\n\t\t\t\tcolValue = colValue.replaceAll(\"'\", \"''\"); \r\n\t\t\t }\r\n\t\t\t colValue= \"'\"+colValue+\"'\";\r\n\t\t\t break;\r\n\r\n\t\t\tdefault:\r\n\t\t\t colValue=\"NULL\";\r\n\t\t\t break;\r\n\t\t }\r\n\r\n\t\t}\r\n\t }\r\n\t //get session values\r\n\t RequiredFieldsSC requiredFieldsSC = new RequiredFieldsSC(); \r\n\t requiredFieldsSC.setLoginUserId(sessionCO.getUserName());\r\n\t requiredFieldsSC.setCompCode(sessionCO.getCompanyCode());\r\n\t requiredFieldsSC.setCompanyName(sessionCO.getCompanyName());\r\n\t requiredFieldsSC.setBranchCode(sessionCO.getBranchCode());\r\n\t requiredFieldsSC.setBranchName(sessionCO.getBranchName());\r\n\t requiredFieldsSC.setUserFirstName(sessionCO.getUserFirstName());\r\n\t requiredFieldsSC.setUserLastName(sessionCO.getUserLastName());\r\n\t requiredFieldsSC.setBaseCurrencyName(sessionCO.getBaseCurrencyName());\r\n\t requiredFieldsSC.setIsTeller((sessionCO.getCtsTellerVO() != null ? BigDecimal.ONE : BigDecimal.ZERO));\r\n\t requiredFieldsSC.setRunningDate(sessionCO.getRunningDateRET());\r\n\t //get query result\r\n\t ArrayList<LinkedHashMap> result = null;\r\n\t if(elemId!=null && colTechName!=null && colValue!=null )\r\n\t {\r\n\t\t//escape single quote\r\n\t\tif(elemId.indexOf(\"'\")!=-1)\r\n\t\t{\r\n\t\t elemId = elemId.replaceAll(\"'\", \"''\"); \r\n\t\t}\r\n\t\telse if(colTechName.indexOf(\"'\")!=-1)\r\n\t\t{\r\n\t\t colTechName = colTechName.replaceAll(\"'\", \"''\");\r\n\t\t}\r\n\t\telse if(StringUtil.isNotEmpty(colDesc)&& colDesc.indexOf(\"'\")!=-1)\r\n\t\t{\r\n\t\t colDesc = colDesc.replaceAll(\"'\", \"''\");\r\n\t\t}\r\n\t\tdynCommonLookupSC.setElementId(new BigDecimal(elemId));\r\n\t\tdynCommonLookupSC.setColName(colTechName);\r\n\t\tdynCommonLookupSC.setColumnCode(colName);\r\n\t\tdynCommonLookupSC.setColValue(colValue);\r\n\t\tdynCommonLookupSC.setColDesc(colDesc);\r\n\t\tresult = dynamicScreenBO.validateColPropLookupQuery(requiredFieldsSC,dynCommonLookupSC,criteria.getElemHm()) ;\r\n\t }\r\n\r\n\t //TP#1053821 Additional lookup description for colProp\r\n\t if(result!=null && result.size()>0)\r\n\t {\r\n\t\tHashMap<String, Object> lookUpRow = (HashMap<String, Object>) result.get(0);\r\n\t\t\r\n\t\tif(StringUtil.isNotEmpty(colDesc) )\r\n\t\t{\r\n\t\t\tObject descStr = lookUpRow.get(colDesc) == null? \"\":lookUpRow.get(colDesc) ;\r\n\t\t\tcriteria.getElemHm().put(\"colDescValue\", descStr);\r\n\t\t\t//set lookupDesc to readonly\r\n\t\t\tcriteria.getElemHm().put(\"colDescReadOnly\", \"true\");\r\n\t\t}\r\n\t\tif(criteria.getElemHm().get(\"addLkpDesc\")!=null)\r\n\t\t{\r\n\t\t String[] val = (String[]) criteria.getElemHm().get(\"addLkpDesc\");\r\n\t\t String addLkpDesc = val[0];\r\n\t\t addLkpDesc = addLkpDesc.substring(0, addLkpDesc.length());\r\n\t\t \r\n\t\t if(StringUtil.isNotEmpty(addLkpDesc))\r\n\t\t {\r\n\t\t\tString[] addlkpArr = addLkpDesc.split(\";\");\r\n\t\t\tfor(int k=0;k<addlkpArr.length;k++) \r\n\t\t\t{\r\n\t\t\t String[] depElem = addlkpArr[k].split(\"~VALUE_\");\r\n\t\t\t colDesc = depElem[1];\r\n\t\t\t String elId = depElem[0];\r\n\t\t\t Object descStr = lookUpRow.get(colDesc) == null? lookUpRow.get(colDesc.toUpperCase()):lookUpRow.get(colDesc) ;\r\n\t\t\t criteria.getElemHm().put(elId, descStr);\r\n\t\t\t}\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t else \r\n\t {\r\n\t\tcriteria.getElemHm().put(\"colDescValue\", \"\");\r\n\t\tcriteria.getElemHm().put(\"colValue\", \"\");\r\n\t\tthrow new BOException(MessageCodes.INVALID_ENTRY);\r\n\t }\r\n\t return SUCCESS;\r\n\t}\r\n\r\n\tcatch(Exception e)\r\n\t{\r\n\t // TODO Auto-generated catch block\r\n\t handleException(e, null, null);\r\n\t return SUCCESS;\r\n\t}\r\n }", "Map<String, ByteBuffer> getColumns(String columnFamily, String key, boolean reversed, String... columns);", "int cacheRowsWhenScan();", "public void testGetColumnKey() {\n TaskSeriesCollection c = createCollection1();\n assertEquals(\"Task 1\", c.getColumnKey(0));\n assertEquals(\"Task 2\", c.getColumnKey(1));\n assertEquals(\"Task 3\", c.getColumnKey(2));\n }", "public abstract String [] getColumnNames(String tableName);", "private String getStringValueFromSelectedTableTableByFieldCode(String tableName, String value, String fieldCode, String indexColumn) throws CantCheckAssetReceptionProgressException, UnexpectedResultReturnedFromDatabaseException {\n try {\n this.database=openDatabase();\n DatabaseTable databaseTable = getDatabaseTable(tableName);\n databaseTable.setStringFilter(indexColumn, value, DatabaseFilterType.EQUAL);\n databaseTable.loadToMemory();\n DatabaseTableRecord databaseTableRecord;\n List<DatabaseTableRecord> databaseTableRecords=databaseTable.getRecords();\n if (databaseTableRecords.size() > 1){\n this.database.closeDatabase();\n throw new UnexpectedResultReturnedFromDatabaseException(\"Unexpected result. More than value returned.\", indexColumn+\":\" + value);\n } else {\n databaseTableRecord = databaseTableRecords.get(0);\n }\n this.database.closeDatabase();\n String stringToReturn=databaseTableRecord.getStringValue(fieldCode);\n return stringToReturn;\n } catch (CantExecuteDatabaseOperationException exception) {\n this.database.closeDatabase();\n throw new CantCheckAssetReceptionProgressException(exception, \"Trying to get \"+fieldCode,\"Cannot find or open the database\");\n } catch (CantLoadTableToMemoryException exception) {\n this.database.closeDatabase();\n throw new CantCheckAssetReceptionProgressException(exception, \"Trying to get \"+fieldCode,\"Cannot load the database into memory\");\n }\n }", "public HashMap<String, String>[] sqlSelect(String sTable, String hCols[],\n HashMap<String, String> hWhere) {\n Log.i(\"DBHelper:sqlSelect\", \"=> Start\");\n String sColsSelect = \"\";\n String sColsWhere = \" \";\n\n int i = 0;\n\n SQLiteDatabase db = this.getWritableDatabase();\n\n for (i = 0; i < hCols.length; i++) {\n sColsSelect = sColsSelect + hCols[i] + \", \";\n }\n\n for (Entry<String, String> e : hWhere.entrySet()) {\n String field = e.getKey();\n String value = e.getValue();\n sColsWhere = sColsWhere + field + \" = \" + value + \" and \";\n }\n String sqlQuery = \"SELECT \" + sColsSelect + \"1 FROM \" + sTable\n + \" WHERE \" + sColsWhere + \" 1=1 \";\n\n Log.i(\"DBHelper:sqlSelect\", sqlQuery);\n Cursor c = db.rawQuery(sqlQuery, null);\n int nRows = 0;\n HashMap<String, String>[] hResult = new HashMap[c.getCount()];\n Log.i(\"DBHelper:sqlSelect\", \"Total Rows : \" + c.getCount());\n if (c.moveToFirst()) {\n hResult[0] = new HashMap<String, String>();\n for (i = 0; i < hCols.length; i++) {\n hResult[0].put(hCols[i], c.getString(i));\n Log.i(\"DBHelper:sqlSelect\", c.getString(i));\n }\n }\n nRows++;\n while (c.moveToNext()) {\n hResult[nRows] = new HashMap<String, String>();\n for (i = 0; i < hCols.length; i++) {\n hResult[nRows].put(hCols[i], c.getString(i));\n Log.i(\"DBHelper:sqlSelect\", c.getString(i));\n }\n nRows++;\n }\n\n Log.i(\"DBHelper:sqlSelect\", \"Total records \" + hResult.length);\n\n Log.i(\"DBHelper:sqlSelect\", \"<= End\");\n return hResult;\n\n }", "private List<Table> getTableFromStringTableName(String tableName) throws HyracksDataException {\n\n // Get all the tables\n if (generateAllTables) {\n // Remove the DBGEN_VERSION table and all children tables, parent tables will generate them\n return Table.getBaseTables().stream()\n .filter(table -> !table.equals(Table.DBGEN_VERSION) && !table.isChild())\n .collect(Collectors.toList());\n }\n\n // Search for the table\n List<Table> matchedTables = Table.getBaseTables().stream()\n .filter(table -> tableName.equalsIgnoreCase(table.getName())).collect(Collectors.toList());\n\n // Ensure the table was found\n if (matchedTables.isEmpty()) {\n throw new RuntimeDataException(ErrorCode.TPCDS_INVALID_TABLE_NAME, getFunctionIdentifier().getName(),\n tableName);\n }\n\n return matchedTables;\n }", "@Override\n public ResultSet readTable (String tableName, String[] columns, int nThread) throws SQLException {\n tableName = tableName == null ? this.options.getSourceTable() : tableName;\n\n // If columns parameter is null, get it from options\n String allColumns = this.options.getSourceColumns() == null ? \"*\" : this.options.getSourceColumns();\n\n long offset = nThread * chunkSize;\n String sqlCmd;\n\n // Read table with source-query option specified\n if (options.getSourceQuery() != null && !options.getSourceQuery().isEmpty()) {\n sqlCmd = \"SELECT * FROM (\" +\n options.getSourceQuery() + \") as T1 \";\n } else {\n\n sqlCmd = \"SELECT \" +\n allColumns +\n \" FROM \" +\n escapeTableName(tableName);\n\n // Source Where\n if (options.getSourceWhere() != null && !options.getSourceWhere().isEmpty()) {\n sqlCmd = sqlCmd + \" WHERE \" + options.getSourceWhere();\n }\n\n }\n\n sqlCmd = sqlCmd + \" LIMIT ? OFFSET ? \";\n\n if (this.options.getJobs() == nThread + 1) {\n return super.execute(sqlCmd, \"-1\", offset);\n } else {\n return super.execute(sqlCmd, chunkSize, offset );\n }\n\n }", "@Override\n public ResultSet readTable (String tableName, String[] columns, int nThread) throws SQLException {\n tableName = tableName == null ? this.options.getSourceTable() : tableName;\n\n // If columns parameter is null, get it from options\n String allColumns = this.options.getSourceColumns() == null ? \"*\" : this.options.getSourceColumns();\n\n long offset = nThread * chunkSize;\n String sqlCmd;\n\n // Read table with source-query option specified\n if (options.getSourceQuery() != null && !options.getSourceQuery().isEmpty()) {\n sqlCmd = \"SELECT * FROM (\" + options.getSourceQuery() + \") AS REPLICADB_TABLE \";\n } else {\n\n sqlCmd = \"SELECT \" + allColumns + \" FROM \" + escapeTableName(tableName);\n\n // Source Where\n if (options.getSourceWhere() != null && !options.getSourceWhere().isEmpty()) {\n sqlCmd = sqlCmd + \" WHERE \" + options.getSourceWhere();\n }\n }\n\n if (chunkSize != 0L) {\n sqlCmd = sqlCmd + \" LIMIT ? OFFSET ?\";\n return super.execute(sqlCmd, chunkSize, offset);\n } else {\n return super.execute(sqlCmd);\n }\n }", "private void prefetchRegionCache(final byte[] tableName,\n final byte[] row) {\n // Implement a new visitor for MetaScanner, and use it to walk through\n // the .META.\n MetaScannerVisitor visitor = new MetaScannerVisitorBase() {\n public boolean processRow(Result result) throws IOException {\n try {\n byte[] value = result.getValue(HConstants.CATALOG_FAMILY,\n HConstants.REGIONINFO_QUALIFIER);\n HRegionInfo regionInfo = null;\n\n if (value != null) {\n // convert the row result into the HRegionLocation we need!\n regionInfo = Writables.getHRegionInfo(value);\n\n // possible we got a region of a different table...\n if (!Bytes.equals(regionInfo.getTableName(),\n tableName)) {\n return false; // stop scanning\n }\n if (regionInfo.isOffline()) {\n // don't cache offline regions\n return true;\n }\n value = result.getValue(HConstants.CATALOG_FAMILY,\n HConstants.SERVER_QUALIFIER);\n if (value == null) {\n return true; // don't cache it\n }\n final String hostAndPort = Bytes.toString(value);\n String hostname = Addressing.parseHostname(hostAndPort);\n int port = Addressing.parsePort(hostAndPort);\n value = result.getValue(HConstants.CATALOG_FAMILY,\n HConstants.STARTCODE_QUALIFIER);\n // instantiate the location\n HRegionLocation loc =\n new HRegionLocation(regionInfo, hostname, port);\n // cache this meta entry\n cacheLocation(tableName, loc);\n }\n return true;\n } catch (RuntimeException e) {\n throw new IOException(e);\n }\n }\n };\n try {\n // pre-fetch certain number of regions info at region cache.\n MetaScanner.metaScan(conf, this, visitor, tableName, row,\n this.prefetchRegionLimit, HConstants.META_TABLE_NAME);\n } catch (IOException e) {\n LOG.warn(\"Encountered problems when prefetch META table: \", e);\n }\n }", "public ArrayList<String> getTableColumns(String _tName) {\n ArrayList<String> retList = new ArrayList<String>();\n\n try {\n ResultSetMetaData rsmd = getMetaData(executeQuery(\"SELECT * FROM \" + _tName));\n\n for (int i = 1; i <= rsmd.getColumnCount(); i++) {\n retList.add(rsmd.getColumnName(i));\n }\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n\n return retList;\n }", "void gen_table_names(Connection c, PreparedStatement pst ) throws ClassNotFoundException, SQLException\n\t{\n\t String lambda_term_query = \"select subgoal_names from view2subgoals where view = '\"+ name +\"'\";\n\n\t\t\n\t pst = c.prepareStatement(lambda_term_query);\n\t \n\t ResultSet rs = pst.executeQuery();\n\t \n\t if(!rs.wasNull())\n\t {\n\t \twhile(rs.next())\n\t\t {\n\t\t \t\t \t\n\t\t \ttable_names.add(rs.getString(1));\n\t\t }\n\t }\n\t \n\t else\n\t {\n\t \tlambda_term_query = \"select subgoal from web_view_table where renamed_view = '\"+ name +\"'\";\n\n\t\t\t\n\t\t pst = c.prepareStatement(lambda_term_query);\n\t\t \n\t\t ResultSet r = pst.executeQuery();\n\n\t\t while(r.next())\n\t\t {\n\t\t \t\t \t\n\t\t \ttable_names.add(r.getString(1));\n\t\t }\n\t }\n\t \n\t \n\t \n\n\t}", "public ArrayList getSourceTableList(String tableName) {\r\n\t\tArrayList sourceTableList = new ArrayList();\r\n\t\tHashSet tableSet = new HashSet();\r\n\t\t// whether the table is a volatile table\r\n\t\tint index = -1;\r\n\t\tindex = volatileIndex(tableName);\r\n\t\t// is a volatile table\r\n\t\tif (index >= 0) {\r\n\t\t\tfor (int i = 0; i < volatileTableSourceList.size(); i++) {\r\n\t\t\t\tHashMap volatileTable = (HashMap) volatileTableSourceList.get(i);\r\n\t\t\t\tInteger volatileIndex = (Integer) volatileTable.get(\"sqlIndex\");\r\n\t\t\t\tif (index == volatileIndex.intValue()) {\r\n\t\t\t\t\ttableSet = (HashSet) volatileTable.get(\"sourceTableList\");\r\n\t\t\t\t\tArrayList tableList = new ArrayList(tableSet);\r\n\r\n\t\t\t\t\tfor (int j = 0; j < tableList.size(); j++) {\r\n\t\t\t\t\t\tHashMap table = (HashMap) tableList.get(j);\r\n\t\t\t\t\t\tString sTable_name = (String) table.get(\"sourceTable\");\r\n\t\t\t\t\t\t// String expressionExp = (String) table.get(\"expression\");\r\n\t\t\t\t\t\tHashMap sTable = new HashMap();\r\n\t\t\t\t\t\tsTable.put(\"sourceTable\", sTable_name);\r\n\t\t\t\t\t\tsTable.put(\"targetTable\", tableName);\r\n\t\t\t\t\t\t// sTable.put(\"expression\",expressionExp);\r\n\t\t\t\t\t\tsourceTableList.add(sTable);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tindex = commonIndex(tableName);\r\n\t\t\tif (index >= 0) {\r\n\t\t\t\tfor (int i = 0; i < commonTableSourceList.size(); i++) {\r\n\t\t\t\t\tHashMap commonTable = (HashMap) commonTableSourceList.get(i);\r\n\t\t\t\t\tInteger commonIndex = (Integer) commonTable.get(\"sqlIndex\");\r\n\t\t\t\t\tif (index == commonIndex.intValue()) {\r\n\t\t\t\t\t\ttableSet = (HashSet) commonTable.get(\"sourceTableList\");\r\n\t\t\t\t\t\tArrayList tableList = new ArrayList(tableSet);\r\n\r\n\t\t\t\t\t\tfor (int j = 0; j < tableList.size(); j++) {\r\n\t\t\t\t\t\t\tHashMap table = (HashMap) tableList.get(j);\r\n\t\t\t\t\t\t\tString sTable_name = (String) table.get(\"sourceTable\");\r\n\t\t\t\t\t\t\t// String expressionExp = (String) table.get(\"expression\");\r\n\t\t\t\t\t\t\tHashMap sTable = new HashMap();\r\n\t\t\t\t\t\t\tsTable.put(\"sourceTable\", sTable_name);\r\n\t\t\t\t\t\t\tsTable.put(\"targetTable\", tableName);\r\n\t\t\t\t\t\t\t// sTable.put(\"expression\",expressionExp);\r\n\t\t\t\t\t\t\tsourceTableList.add(sTable);\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} else {\r\n\t\t\t\tHashMap sourceTable = new HashMap();\r\n\t\t\t\tsourceTable.put(\"sourceTable\", \"\");\r\n\t\t\t\tsourceTable.put(\"targetTable\", tableName);\r\n\t\t\t\t// sourceTable.put(\"expression\",expString);\r\n\t\t\t\tsourceTableList.add(sourceTable);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new ArrayList(new HashSet(sourceTableList));\r\n\t}", "private CellTable<CQLFunctionArgument> addColumnToTable(CellTable<CQLFunctionArgument> table,\n\t\t\tListHandler<CQLFunctionArgument> sortHandler) {\n\t\tif (table.getColumnCount() != TABLE_ROW_COUNT) {\n\t\t\tcom.google.gwt.user.client.ui.Label searchHeader = new com.google.gwt.user.client.ui.Label(\n\t\t\t\t\t\"Added Arguments List\");\n\t\t\tsearchHeader.getElement().setId(\"searchHeader_Label\");\n\t\t\tsearchHeader.setStyleName(\"measureGroupingTableHeader\");\n\t\t\tsearchHeader.getElement().setAttribute(\"tabIndex\", \"0\");\n\t\t\tcom.google.gwt.dom.client.TableElement elem = table.getElement().cast();\n\t\t\tTableCaptionElement caption = elem.createCaption();\n\t\t\tcaption.appendChild(searchHeader.getElement());\n\t\t\t\n\t\t\tMultiSelectionModel<CQLFunctionArgument> selectionModel = new MultiSelectionModel<CQLFunctionArgument>();\n\t\t\ttable.setSelectionModel(selectionModel);\n\t\t\tColumn<CQLFunctionArgument, SafeHtml> nameColumn = new Column<CQLFunctionArgument, SafeHtml>(\n\t\t\t\t\tnew SafeHtmlCell()) {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic SafeHtml getValue(CQLFunctionArgument object) {\n\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\tStringBuilder value = new StringBuilder(object.getArgumentName());\n\t\t\t\t\t\n\t\t\t\t\ttitle = title.append(\"Name : \").append(value);\n\t\t\t\t\t/*\n\t\t\t\t\t * return\n\t\t\t\t\t * CellTableUtility.getColumnToolTip(value.toString(),\n\t\t\t\t\t * title.toString());\n\t\t\t\t\t */\n\t\t\t\t\treturn getDataTypeColumnToolTip(value.toString(), title, object.isValid());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t};\n\t\t\ttable.addColumn(nameColumn, SafeHtmlUtils.fromSafeConstant(\"<span title=\\\"Name\\\">\" + \"Name\" + \"</span>\"));\n\t\t\t\n\t\t\tColumn<CQLFunctionArgument, SafeHtml> dataTypeColumn = new Column<CQLFunctionArgument, SafeHtml>(\n\t\t\t\t\tnew SafeHtmlCell()) {\n\t\t\t\t@Override\n\t\t\t\tpublic SafeHtml getValue(CQLFunctionArgument object) {\n\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\tStringBuilder value = new StringBuilder(object.getArgumentType());\n\t\t\t\t\tif (value.toString().equalsIgnoreCase(CQLWorkSpaceConstants.CQL_MODEL_DATA_TYPE)) {\n\t\t\t\t\t\tvalue = value.append(\":\").append(object.getQdmDataType());\n\t\t\t\t\t\tif (object.getAttributeName() != null) {\n\t\t\t\t\t\t\tvalue = value.append(\".\").append(object.getAttributeName());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (value.toString().equalsIgnoreCase(CQLWorkSpaceConstants.CQL_OTHER_DATA_TYPE)) {\n\t\t\t\t\t\tvalue = value.append(\":\").append(object.getOtherType());\n\t\t\t\t\t}\n\t\t\t\t\ttitle = title.append(\"Datatype : \").append(value);\n\t\t\t\t\treturn CellTableUtility.getColumnToolTip(value.toString(), title.toString());\n\t\t\t\t}\n\t\t\t};\n\t\t\ttable.addColumn(dataTypeColumn,\n\t\t\t\t\tSafeHtmlUtils.fromSafeConstant(\"<span title=\\\"Datatype\\\">\" + \"Datatype\" + \"</span>\"));\n\t\t\t\n\t\t\tString colName = \"Modify\";\n\t\t\t\n\t\t\t// Modify by Delete Column\n\t\t\ttable.addColumn(\n\t\t\t\t\tnew Column<CQLFunctionArgument, CQLFunctionArgument>(getCompositeCellForQDMModifyAndDelete()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic CQLFunctionArgument getValue(CQLFunctionArgument object) {\n\t\t\t\t\t\t\treturn object;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, SafeHtmlUtils.fromSafeConstant(\"<span title='\" + colName + \"'> \" + colName + \"</span>\"));\n\t\t\t\n\t\t\ttable.setColumnWidth(0, 25.0, Unit.PCT);\n\t\t\ttable.setColumnWidth(1, 35.0, Unit.PCT);\n\t\t\ttable.setColumnWidth(2, 10.0, Unit.PCT);\n\t\t}\n\t\treturn table;\n\t}", "public Object lookup(Object key, Map cache)\n throws DBException, CacheException\n {\n if (!super.hasBeenInitialized)\n {\n init(cache);\n }\n Object target = null;\n if (key instanceof String)\n // make lookup case insensitive\n target = ((String)key).toLowerCase();\n else\n target = key;\n\n Object o = cache.get(target);\n if (super.debug)\n {\n if (o != null)\n {\n super.logger.logDebug(\"key found in cache: \" + key);\n }\n else\n {\n super.logger.logDebug(\"key not found in cache: \" + key);\n }\n }\n return o;\n }", "public abstract Map<String, Integer> getColumnTypes(String tableName);", "WebElement getColumnByName(WebElement tableRecord, String columnName);", "public ArrayList<String> initSearchTable(String searchName, String displayName, long rawContactId,\n String phoneNumber, long version, String key, Context context) {\n if (TextUtils.isEmpty(searchName)) {\n return null;\n }\n\n /* pinyin4Char saves the Pinyin strings for each Chinese character in name.\n * Because we might have multiple pinyin strings for one Chinese char,\n * so use list here. */\n ArrayList<String> pinyin4Char = new ArrayList<String>();\n /* cachePyList saves the full Pinyin strings for Chinese name or original letters for English name. */\n ArrayList<String> cachePyList = new ArrayList<String>();\n\n int iLength = searchName.length();\n\n int multiPinyinCount = 0;\n for (int namePosition = 0; namePosition < iLength; namePosition++) {\n char ch = searchName.charAt(namePosition);\n int chCode = ch;\n pinyin4Char.clear();\n if (HanziUtil.isHanziCharCode(chCode)) {\n for (int count = 0; count < PINYIN_CANDIDATE_PER_CHAR; count++) {\n String pinyin = getHanziPinyinDataForCharCode(chCode, count);\n if (pinyin == null) {\n break;\n }\n pinyin4Char.add(pinyin);\n }\n int polyCount = pinyin4Char.size();\n if (polyCount == 0) {\n // can not find pinyin for this char, skip it.\n continue;\n }\n if (cachePyList.size() == 0) {\n cachePyList.addAll(pinyin4Char);\n } else {\n int prevCount = cachePyList.size();\n boolean handleMultiPinyin = true;\n\n if(polyCount > 1) {\n multiPinyinCount ++;\n }\n if (multiPinyinCount > MULTI_PINYIN_LIMIT) {\n handleMultiPinyin = false;\n polyCount = 1;\n }\n\n ArrayList<String> tempArray = new ArrayList<String>(prevCount * polyCount);\n for (String pinyinItem : cachePyList) {\n if (handleMultiPinyin) {\n for (String pinyin : pinyin4Char) {\n tempArray.add(pinyinItem + pinyin);\n }\n } else {\n tempArray.add(pinyinItem + pinyin4Char.get(0));\n }\n }\n cachePyList.clear();\n cachePyList.addAll(tempArray);\n }\n } else {\n String letter = Character.toString(ch);\n if (letter.length() == 0) {\n if (Build.TYPE.equals(Build.USER)) {\n Log.w(TAG, \"initSearchTable: got 0 length char code: \"+chCode+\" in name **** at \"+namePosition);\n } else {\n Log.w(TAG, \"initSearchTable: got 0 length char code: \"+chCode+\" in name \"+searchName+\" at \"+namePosition);\n }\n continue;\n } else if ((ch >= '2') && (ch <= '9')) {\n letter = Character.toString((char) (ch - 32));\n } else if ((ch >= 'a') && (ch <= 'z')) {\n letter = letter.toUpperCase(Locale.US);\n } else if (((ch >= 'A') && (ch <= 'Z')) || (ch == '0') || (ch == '1')) {\n // keep letter unchanged, but go through the code after the if-statement.\n } else {\n // not digits and letters, this can be symbols,\n // like '#', '%', etc.\n // ignore the characters that cannot map to pinyin or digits\n continue;\n }\n if (cachePyList.isEmpty()) {\n cachePyList.add(letter);\n } else {\n int prevCount = cachePyList.size();\n ArrayList<String> tempArray = new ArrayList<String>(prevCount);\n for (String pinyinItem : cachePyList) {\n tempArray.add(pinyinItem + letter);\n }\n cachePyList.clear();\n cachePyList.addAll(tempArray);\n }\n }\n\n }\n ArrayList<String> retArray = new ArrayList<String>();\n StringBuilder firstChar = new StringBuilder();\n StringBuilder t9Str = new StringBuilder();\n for (String cachePy : cachePyList) {\n t9Str.setLength(0);\n\n int strLettersLength = cachePy.length();\n boolean addedFirstChar = false;\n for (int i = 0; i < strLettersLength; i++) {\n char c = cachePy.charAt(i);\n if ((c >= 'a') && (c <= 'z')) {\n c = HanziUtil.Data_Letters_To_T9[c - 'a'];\n } else if ((c >= 'A') && (c <= 'Z')) {\n char temp = HanziUtil.Data_Letters_To_T9[c - 'A'];\n c = (char) (temp - 32);\n firstChar.append(c).append(i);\n addedFirstChar = true;\n /*} else if ((c >= '2') && (c <= '9')) {\n c -= 32;\n firstChar.append(c).append(i);\n addedFirstChar = true;\n useless code, no '2' to '9' will be left here. */\n } else {\n firstChar.append('\\u0001').append(i);\n addedFirstChar = true;\n }\n t9Str.append(c);\n }\n if (addedFirstChar) {\n firstChar.append(',');\n }\n\n retArray.add(t9Str.toString());\n }\n // If firstChar has contents, then it must end with ',',\n // we need to remove the ',' at tail.\n if (firstChar.length() > 0) {\n firstChar.deleteCharAt(firstChar.length() - 1);\n }\n ContactInMemory myContactInfo = getSearchTableShadow().get(key);\n if (myContactInfo == null) {\n myContactInfo = new ContactInMemory();\n getSearchTableShadow().put(key, myContactInfo);\n }\n\n Iterator<String> it = retArray.iterator();\n StringBuilder sb = new StringBuilder();\n while (it.hasNext()) {\n String element = it.next();\n sb.append(element);\n sb.append(',');\n }\n if (sb.length() != 0) {\n sb.setLength(sb.length() -1);\n }\n\n myContactInfo.pinyinData = sb.toString();\n myContactInfo.length = searchName.length();\n myContactInfo.version = version;\n myContactInfo.contactName = displayName;\n myContactInfo.phoneNumber = phoneNumber;\n myContactInfo.area = getArea(phoneNumber, context);\n\n if (myContactInfo.allFistCharacter == null) {\n myContactInfo.allFistCharacter = firstChar.toString();\n } else if (myContactInfo.allFistCharacter.length() > 0) {\n myContactInfo.allFistCharacter += \",\";\n myContactInfo.allFistCharacter += firstChar.toString();\n }\n myContactInfo.retArray = retArray;\n addToSearchMap(getSearchMapShadow(),retArray,key);\n return retArray;\n }", "IExtensionPoint getTableValue(String rowId, String columnId) {\n lock.readLock().lock();\n try {\n return extensionPointPluginMap.contains(rowId, columnId)\n ? extensionPointPluginMap.get(rowId, columnId).get()\n : null;\n } finally {\n lock.readLock().unlock();\n }\n }", "List<Map<String, Object>> getTableValuesWithHeaders();", "@SuppressWarnings(\"unused\")\n\t@Override\n\tpublic ArrayList<TableColumnsInfo> getColumnsInfo(\n\t\t\tArrayList<String> arrTblNames) {\n\t\tArrayList<TableColumnsInfo> tableColumnsInfoArray = new ArrayList<TableColumnsInfo>();\n\t\tif (arrTblNames.size() == 0)\n\t\t\treturn tableColumnsInfoArray;\n\n\t\tfor (int j = 0; j < arrTblNames.size(); j++) {\n\t\t\tString tblName = arrTblNames.get(j);\n\t\t\tString[] columnNames;\n\n\t\t\tCursor c = ourDatabase.rawQuery(\"SELECT * FROM \" + tblName\n\t\t\t\t\t+ \" WHERE 0\", null);\n\t\t\ttry {\n\t\t\t\tcolumnNames = c.getColumnNames();\n\t\t\t} finally {\n\t\t\t\tc.close();\n\t\t\t}\n\n\t\t\t// SQLiteDatabase db = ourHelper.getWritableDatabase();\n\t\t\tCursor cursor = ourDatabase.rawQuery(\"PRAGMA table_info(\" + tblName\n\t\t\t\t\t+ \")\", null);\n\t\t\tcursor.moveToFirst();\n\t\t\tArrayList<ColumnInfo> colInfoArray = new ArrayList<DatabasesInterface.ColumnInfo>();\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\ttry {\n\t\t\t\t\tint nameIdx = cursor\n\t\t\t\t\t\t\t.getColumnIndexOrThrow(sqliteColumnsInfoNames[0]);\n\t\t\t\t\tint typeIdx = cursor\n\t\t\t\t\t\t\t.getColumnIndexOrThrow(sqliteColumnsInfoNames[1]);\n\t\t\t\t\tint notNullIdx = cursor\n\t\t\t\t\t\t\t.getColumnIndexOrThrow(sqliteColumnsInfoNames[2]);\n\t\t\t\t\tint dfltValueIdx = cursor\n\t\t\t\t\t\t\t.getColumnIndexOrThrow(sqliteColumnsInfoNames[3]);\n\t\t\t\t\tint primaryKeyIdx = cursor\n\t\t\t\t\t\t\t.getColumnIndexOrThrow(sqliteColumnsInfoNames[4]);\n\n\t\t\t\t\tString name = cursor.getString(nameIdx);\n\t\t\t\t\tString type = cursor.getString(typeIdx);\n\t\t\t\t\tint notNull = cursor.getInt(notNullIdx);\n\t\t\t\t\tString dfltValue = cursor.getString(dfltValueIdx);\n\t\t\t\t\tint primaryKey = cursor.getInt(primaryKeyIdx);\n\n\t\t\t\t\tColumnInfo colInfo = new ColumnInfo(name, type, notNull,\n\t\t\t\t\t\t\tdfltValue, primaryKey);\n\t\t\t\t\tcolInfoArray.add(colInfo);\n\t\t\t\t} finally {\n\t\t\t\t\tcursor.moveToNext();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcursor.close();\n\t\t\tTableColumnsInfo tblInfo = new TableColumnsInfo(tblName,\n\t\t\t\t\tcolInfoArray);\n\t\t\ttableColumnsInfoArray.add(tblInfo);\n\t\t}\n\t\treturn tableColumnsInfoArray;\n\n\t}", "public static ArrayList<HashMap<String, String>> getDoCustomerTable(\r\n\t\t\tint start, int length, int column, String order, int doId) {\r\n\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\t\t// HashMap<String, String> map = new HashMap<>();\r\n\t\tCallableStatement call = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry {\r\n\t\t\tConnection con = Connect.getConnection();\r\n\t\t\tSystem.out.println(\"start\");\r\n\t\t\t// ascending order\r\n\t\t\tif (order.equalsIgnoreCase(\"asc\")) {\r\n\t\t\t\tswitch (column) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\t// System.out.println(\"asdasdasd\");\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_customer_name_asc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_customer_cnic_asc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_customer_number_asc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_customer_status_asc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_appliance_name_asc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_appliance_number_asc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"CALL get_do_customer_list_order_by_charging_status_asc(?,?,?)\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_salesman_asc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 8:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_city_asc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\t\t\t\t// descending order\r\n\t\t\t} else if (order.equalsIgnoreCase(\"desc\")) {\r\n\t\t\t\tswitch (column) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\t// System.out.println(\"asdsdafa\");\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_customer_name_desc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_customer_cnic_desc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_customer_number_desc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_customer_status_desc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_appliance_name_desc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_appliance_number_desc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"CALL get_do_customer_list_order_by_charging_status_desc(?,?,?)\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_salesman_desc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 8:\r\n\t\t\t\t\tcall = con\r\n\t\t\t\t\t\t\t.prepareCall(\"{CALL get_do_customer_list_order_by_city_desc(?,?,?)}\");\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (call != null) {\r\n\r\n\t\t\t\tcall.setInt(1, start);\r\n\t\t\t\tcall.setInt(2, length);\r\n\t\t\t\tcall.setInt(3, doId);\r\n\t\t\t\trs = call.executeQuery();\r\n\t\t\t\t// System.out.println(\"aaaaacalled\");\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tHashMap<String, String> map = new HashMap<>();\r\n\t\t\t\t\tSystem.out.println(\"called\");\r\n\t\t\t\t\tmap.put(\"customerId\", rs.getInt(\"customer_id\") + \"\");\r\n\t\t\t\t\tmap.put(\"customerName\", rs.getString(\"customer_name\"));\r\n\t\t\t\t\tmap.put(\"customerCnic\", rs.getString(\"customer_cnic\"));\r\n\t\t\t\t\tmap.put(\"customerPhone\", rs.getString(\"customer_phone\"));\r\n\t\t\t\t\tmap.put(\"city\", rs.getString(\"city_name\"));\r\n\t\t\t\t\tmap.put(\"applianceNumber\", rs.getString(\"appliance_GSMno\"));\r\n\t\t\t\t\tmap.put(\"applianceStatus\", rs.getInt(\"appliance_status\")\r\n\t\t\t\t\t\t\t+ \"\");\r\n\t\t\t\t\tmap.put(\"salesmanName\", rs.getString(\"salesman_name\"));\r\n\t\t\t\t\tmap.put(\"applianceId\", rs.getInt(\"appliance_id\") + \"\");\r\n\t\t\t\t\tmap.put(\"salesmanId\", rs.getInt(\"salesman_id\") + \"\");\r\n\t\t\t\t\tmap.put(\"applianceName\", rs.getString(\"appliance_name\"));\r\n\t\t\t\t\tmap.put(\"status\", rs.getInt(\"status\") + \"\");\r\n\t\t\t\t\tlist.add(map);\r\n\t\t\t\t}\r\n\t\t\t\tcon.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "@Test\n public void testGetColumnName() {\n System.out.println(\"getColumnName\");\n int col = 0;\n LibraryTableModel instance = null;\n String expResult = \"Name\";\n String result = testLibraryLibraryTableModel.getColumnName(col);\n assertEquals(expResult, result);\n\n }", "public void updateColumnsFromTap(String fullTableName, Map<String, ColumnConfig> configs);", "public void loadItemsTable(String reqId) {\n dao.setup();\n ObservableList<RequisitionItemEntity> items = FXCollections.observableArrayList(dao.read(RequisitionItemEntity.class));\n dao.exit();\n\n TableColumn<RequisitionItemEntity, String> poIdCol = new TableColumn<>(\"Purchase ID\");\n poIdCol.setCellValueFactory(new PropertyValueFactory<RequisitionItemEntity, String>(\"poid\"));\n\n TableColumn<RequisitionItemEntity, String> reqIdCol = new TableColumn<>(\"Requisiton ID\");\n reqIdCol.setCellValueFactory(new PropertyValueFactory<>(\"reqid\"));\n\n TableColumn<RequisitionItemEntity, Number> supidCol = new TableColumn<>(\"Supplier ID\");\n supidCol.setCellValueFactory(new PropertyValueFactory<>(\"supplier_id\"));\n\n TableColumn<RequisitionItemEntity, Double> tamontCol = new TableColumn<>(\"Total Amount\");\n tamontCol.setCellValueFactory(new PropertyValueFactory<>(\"total_amount\"));\n\n for (RequisitionItemEntity item : items){\n if(reqId == item.getReqId())\n tableItems.getItems().add(item);\n }\n\n tableItems.getColumns().addAll(poIdCol,reqIdCol,supidCol,tamontCol);\n\n\n }", "public static HashMap<String, ArrayList<String>> parseCreateString(String createTableString, boolean metadata) throws FileNotFoundException {\n\n /*\n CREATE TABLE CUSTOMERS( ID INT PRIMARY KEY,NAME TEXT NOT NULL,AGE INT);\n */\n\n System.out.println(\"STUB: Calling your method to create a table\");\n System.out.println(\"Parsing the string:\\\"\" + createTableString + \"\\\"\");\n createTableString = createTableString.toLowerCase();\n String tablename = createTableString.substring(0, createTableString.indexOf(\"(\")).split(\" \")[2].trim();\n String tablenamefile = tablename + \".tbl\";\n Table newTable = new Table(tablenamefile, Constant.leafNodeType);\n HashMap<String, ArrayList<String>> columndata = new HashMap<>();\n TreeMap<Integer, String> columnOrdinalPosition = new TreeMap<>();\n int record_length = 0;\n Matcher m = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(createTableString);\n while (m.find()) {\n String cols = m.group(1);\n String singlecol[] = cols.split(\",\");\n ArrayList<String> colname;\n int ordinalPosition = 1;\n for (int i = singlecol.length - 1; i >= 0; i--) {\n\n\n colname = new ArrayList<>();\n singlecol[i] = singlecol[i].trim();\n String colNameType[] = singlecol[i].split(\" \");\n colNameType = removeWhiteSpacesInArray(colNameType);\n //columntype\n colname.add(0, colNameType[1]);\n\n columnTypeHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), colNameType[1]);\n record_length = record_length + RecordFormat.getRecordFormat(colNameType[1]);\n colname.add(1, \"yes\");\n //ordinaltype\n colname.add(2, String.valueOf(++ordinalPosition));\n columnOrdinalPosition.put(ordinalPosition, tablename.concat(\".\").concat(colNameType[0]));\n if (colNameType.length == 4) {\n if (colNameType[2].equals(\"primary\")) {\n colname.set(1, \"pri\");\n colname.set(2, String.valueOf(1));\n columnOrdinalPosition.remove(ordinalPosition);\n columnOrdinalPosition.put(1, tablename.concat(\".\").concat(colNameType[0]));\n --ordinalPosition;\n } else\n colname.set(1, \"no\");\n columnNotNullHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), \"NOT NULL\");\n }\n columndata.put(colNameType[0], colname);\n }\n\n }\n\n Iterator it = columnOrdinalPosition.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry) it.next();\n columnOrdinalHelper.setProperties(String.valueOf(pair.getValue()), String.valueOf(pair.getKey()));\n }\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.recordLength), String.valueOf(record_length));\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.numberOfColumns), String.valueOf(columnOrdinalPosition.size()));\n if (!metadata) {\n updateTablesTable(tablename, record_length);\n updateColumnsTable(tablename, columndata);\n }\n return columndata;\n\n }", "private Object[] lookupValues(RowMetaInterface rowMeta, Object[] row) throws KettleException\n\t{\n\t\tif (isStopped()) return null;\n\t\t\n\t\tif ( data.lookupColumnIndex == null ) \n\t\t{\n\t\t\tString names[] = data.lookupMeta.getFieldNames();\n\t\t\tdata.lookupColumnIndex = new int[names.length];\n\t\t\t\n\t\t\tfor( int i=0; i<names.length; i++ ) \n\t\t\t{\n\t\t\t\tdata.lookupColumnIndex[i] = rowMeta.indexOfValue(names[i]);\n\t\t\t\tif ( data.lookupColumnIndex[i] < 0 ) \n\t\t\t\t{\n\t\t\t\t\t// we should not get here\n\t\t\t\t\tthrow new KettleStepException( \"The lookup column '\"+names[i]+\"' could not be found\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Copy value references to lookup table.\n\t\t//\n Object[] lu = new Object[data.keynrs.length];\n for (int i=0;i<data.keynrs.length;i++) {\n \t// If the input is binary storage data, we convert it to normal storage.\n \t//\n \tif (data.convertKeysToNative[i]) {\n \t\tlu[i] = data.lookupMeta.getValueMeta(i).convertBinaryStringToNativeType((byte[])row[data.keynrs[i]]);\n \t} else {\n \t\tlu[i] = row[data.keynrs[i]];\n \t}\n }\n\n // Handle conflicting types (Number-Integer-String conversion to lookup type in hashtable)\n if (data.keyTypes!=null)\n {\n for (int i=0;i<data.lookupMeta.size();i++)\n {\n ValueMetaInterface inputValue = data.lookupMeta.getValueMeta(i);\n ValueMetaInterface lookupValue = data.keyTypes.getValueMeta(i);\n if (inputValue.getType()!=lookupValue.getType())\n {\n try\n {\n \t// Change the input value to match the lookup value\n \t//\n lu[i] = lookupValue.convertDataCompatible(inputValue, lu[i]);\n }\n catch (KettleValueException e)\n {\n throw new KettleStepException(\"Error converting data while looking up value\", e);\n }\n }\n }\n }\n \n Object[] add = null;\n \n\t\tif (data.hasLookupRows) \n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (meta.getKeystream().length>0)\n\t\t\t\t{\n\t\t\t\t\tadd=getFromCache(data.keyTypes, lu);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Just take the first element in the hashtable...\n\t\t\t\t\tthrow new KettleStepException(BaseMessages.getString(PKG, \"StreamLookup.Log.GotRowWithoutKeys\")); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tthrow new KettleStepException(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (add==null) // nothing was found, unknown code: add the specified default value...\n\t\t{\n\t\t\tadd=data.nullIf;\n\t\t} \n\t\t\n return RowDataUtil.addRowData(row, rowMeta.size(), add);\n\t}", "Get<K, C> addColumn(C column);", "@Override\r\n\tpublic List<TaskBean> getListByColumnSubordinate(String columnSearch, String value, Integer startRow, Integer endRow, \r\n\t\t\tInteger taskReceiver) throws SQLException {\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\tmap.put(\"columnSearch\", columnSearch);\r\n\t\tif(\"STARTDATE\".equals(columnSearch) || \"ESTIMATEDATE\".equals(columnSearch)) {\r\n\t\t\tString[] string = value.split(\";\");\r\n\t\t\tmap.put(\"startDate\", string[0]);\r\n\t\t\tmap.put(\"untilDate\", string[1]);\r\n\t\t} else {\r\n\t\t\tmap.put(\"value\", value);\r\n\t\t}\r\n\t\tmap.put(\"startRow\", startRow);\r\n\t\tmap.put(\"endRow\", endRow);\r\n\t\tmap.put(\"taskReceiver\", taskReceiver);\r\n\t\tmap.put(\"finish\", Constants.Status.FINISH);\r\n\t\tmap.put(\"abort\", Constants.Status.ABORT);\r\n\t\t\r\n\t\treturn mapper.queryForList(\"task.getListByColumnSubordinate\", map);\r\n\t}", "public String[] search(String tableName, String[] keyValue) {\r\n List<String> retVal = new ArrayList<String>();\r\n Connection con = null;\r\n Statement stmt = null;\r\n try {\r\n con = ConnectionManager.getInstance().getConnection(databaseName);\r\n stmt = con.createStatement();\r\n TableObject table = _create(tableName);\r\n if (table != null) {\r\n StringBuffer whereClause = new StringBuffer();\r\n for (int i = 0; i < keyValue.length; i++) {\r\n String[] kV = keyValue[i].split(\"=\");\r\n if (whereClause.length() < 1) {\r\n whereClause.append(\" AND \");\r\n }\r\n int multi = kV[1].indexOf(\",\");\r\n boolean isChar = false;\r\n TableField field = table.fields.get(kV[0]);\r\n isChar = field.fieldType.startsWith(\"VARCHAR\");\r\n if(multi < 0){\r\n if(isChar){\r\n whereClause.append( kV[0] + \" LIKE '%\" + kV[1] + \"%' \");\r\n }else{\r\n field.setValue(kV[1]);\r\n whereClause.append(kV[0] + \" = \" + convertValue(field));\r\n }\r\n }else{\r\n whereClause.append(kV[0] + \" in (\" + kV[0] + \") \");\r\n }\r\n }\r\n String searchQry = \"SELECT \" + table.key + \" FROM \" + tableName + \" WHERE \" + whereClause.toString();\r\n ResultSet rs = stmt.executeQuery(searchQry);\r\n while (rs.next()) {\r\n String keyVal = rs.getString(1);\r\n retVal.add(retrieve(tableName, keyVal));\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n Logger.getLogger(Converter.class.getName()).log(Level.SEVERE, null, e);\r\n } finally {\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (Exception e) {\r\n Logger.getLogger(Converter.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n }\r\n if (con != null) {\r\n try {\r\n //con.close();\r\n } catch (Exception e) {\r\n Logger.getLogger(Converter.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n }\r\n }\r\n return (String[])retVal.toArray();\r\n }", "public void cacheableQuery() throws HibException;", "protected abstract Map<String, Map<String, Object>> getData(String columnFamilyName);", "public List getColumns(Serializable columnId) {\n\tif(null==columnId){\r\n\t\treturn this.getColumnDao().getColumns();\r\n\t}else{\r\n\t\treturn this.getColumnDao().getColumns(columnId);\r\n\t}\r\n}", "public String getTableCellText(WebElement table, int searchColumn, String searchText, int returnColumnText) {\n List<WebElement> rows = table.findElements(By.tagName(\"tr\"));\n List<WebElement> columns = table.findElements(By.tagName(\"th\"));\n\n if (searchColumn >= columns.size() || returnColumnText >= columns.size()) {\n System.out.println(\"Desired searched column (\" + searchColumn + \") or Desired return column text (\" + returnColumnText + \") is not valid, please select a value between 0 - \" + (columns.size() - 1));\n // I would rather throw Exception instead of returning null just keep control\n // throw new RuntimeException(\"Desired searched column \" + searchColumn + \" is not valid, please select a value between 0 - \" + (columns.size() - 1));\n return null;\n }\n\n for (int i = 1; i < rows.size(); i++) {\n WebElement searchedElementByColumn = rows.get(i).findElements(By.tagName(\"td\")).get(searchColumn);\n if (searchedElementByColumn.getText().equals(searchText)) {\n return rows.get(i).findElements(By.tagName(\"td\")).get(returnColumnText).getText();\n }\n }\n\n System.out.println(\"Desired searched text (\" + searchText + \") does not exist in the searched column (\" + searchColumn + \")\");\n return null;\n // I would rather throw Exception instead of returning null just keep control\n // throw new RuntimeException(\"Desired searched text (\" + searchText + \") does not exist in the searched column (\" + searchColumn+ \")\");\n }", "public Collection getTables(String serviceProviderCode, String callerID) throws AAException, RemoteException;", "@ParameterizedTest\n @MethodSource(\"randomRecord\")\n public void testResolveTableFromColumn(Fixture fixture,\n Integer offset,\n Row row,\n SinkRecord record) {\n Map<String, String> props = fixture.props;\n\n props.put(ConnectorUtils.TABLE_FROM_COLUMN_CONFIG, Fixture.TABLE_COLUMN_ID);\n props.put(ConnectorUtils.TABLE_AUTOCREATE_SKELETON_COLUMN_CONFIG, Fixture.SKELETON_COLUMN_ID);\n\n this.task.start(props);\n this.task.put(Collections.singletonList(record));\n this.task.flush(new HashMap());\n\n // Sleep 1 second, our flush interval\n try {\n Thread.sleep(1100);\n } catch (Exception e) {\n throw new Error(\"Unexpected exception\", e);\n }\n\n String tableFromColumnName = fixture.tableFromColumnName[offset];\n\n Timespec ts = new Timespec(record.timestamp());\n TimeRange[] ranges = { new TimeRange(ts, ts.plusNanos(1)) };\n Reader reader = Table.reader(TestUtils.createSession(), tableFromColumnName, ranges);\n assertEquals(true, reader.hasNext());\n\n\n\n\n this.task.stop();\n }", "List<List<Object>> getTableValues(TableParameters tableParameters);", "@Transient\n public String getCacheKey() {\n return this.getTableName();\n }", "private List<String> getColNames() {\r\n\t\t//\r\n\t\tDBManager dbm = new DBManager(this);\r\n\t\t\r\n\t\tSQLiteDatabase wdb = dbm.getWritableDatabase();\r\n\r\n\t\t// REF=> http://stackoverflow.com/questions/947215/how-to-get-a-list-of-column-names-on-sqlite3-iphone\r\n\t\tString sql = \"PRAGMA table_info('\" + DBManager.tableName + \"')\";\r\n\t\t\r\n\t\tCursor c = wdb.rawQuery(sql, null);\r\n\t\t\r\n\t\t// Log\r\n\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t+ \"]\", \"c.getCount() => \" + c.getCount());\r\n\t\t\r\n\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t+ \"]\", \"c.getColumnCount() => \" + c.getColumnCount());\r\n\r\n\t\tList<String> colNames = new ArrayList<String>();\r\n\t\t\r\n\t\tc.moveToFirst();\r\n\t\t\r\n\t\tfor (int i = 0; i < c.getCount(); i++) {\r\n\t\t\t\r\n\t\t\tcolNames.add(c.getString(0));\r\n\t\t\t\r\n\t\t\t// Log\r\n\t\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t\t+ \"]\", \"c.getString(0) => \" + c.getString(0) + \r\n\t\t\t\t\t\" / \" + \"c.getString(1) => \" + c.getString(1));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tc.moveToNext();\r\n\t\t\t\r\n\t\t}//for (int i = 0; i < c.getCount(); i++)\r\n\t\t\r\n\t\twdb.close();\r\n\t\t\r\n\t\tfor (String string : colNames) {\r\n\t\t\t\r\n\t\t\t// Log\r\n\t\t\tLog.d(\"DBAdminActivity.java\" + \"[\"\r\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\r\n\t\t\t\t\t+ \"]\", \"colName => \" + string);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n//\t\treturn (String[])colNames.toArray();\r\n\t\treturn colNames;\r\n\t\t\r\n\t}", "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 }", "public void cacheResult(DataEntry dataEntry);", "@Test\n\tvoid selectDbTableColumns() {\n\t\tList<CodeGenTableColumn> res = service.selectDbTableColumns(\"SYS_ROLE\");\n\t\tAssertions.assertNotNull(res);\n\t}", "private ArrayList<String> getSpecimenColumns(String header) {\n Hashtable<String, String> columnTranslations = getColumnTranslations();\r\n \r\n String[] headers = header.split(\"\\t\", -1); // -1 doesn't remove empty elements\r\n //A.log(\"getSpecimenColumns() header:\" + header + \" headers:\" + headers);\r\n \r\n ArrayList<String> colList = new ArrayList<>();\r\n \r\n for (String theHead : headers) {\r\n theHead = theHead.trim();\r\n\r\n if (getHeaderArrayList().contains(theHead)) {\r\n if (columnTranslations.containsKey(theHead)) {\r\n theHead = columnTranslations.get(theHead);\r\n }\r\n colList.add(theHead);\r\n } else {\r\n //s_log.warn(\"getSpecimenColumns() !!!!!! theHead not found:\" + theHead);\r\n colList.add(null);\r\n }\r\n }\r\n\r\n //A.log(\"getSpecimenColumns() size:\" + colList.size() + \" colList:\" + colList);\r\n //A.log(\"getSpecimenColumns(\" + header + \") done\");\r\n return colList;\r\n }", "Object getTables();", "String getColumnField(String javaField) throws NullPointerException;", "String jobTableName();", "@Override\n protected String getColNamesQuery(String tableName) {\n return \"SELECT t.* FROM \" + escapeTableName(tableName) + \" AS t LIMIT 1\";\n }", "@Test\n public void testColumnStatsLoading() {\n for (FileScanTask fileTask : table.newScan().includeColumnStats().planFiles()) {\n Assert.assertNotNull(fileTask.file().valueCounts());\n Assert.assertNotNull(fileTask.file().nullValueCounts());\n Assert.assertNotNull(fileTask.file().lowerBounds());\n Assert.assertNotNull(fileTask.file().upperBounds());\n Assert.assertNotNull(fileTask.file().columnSizes());\n }\n }", "@Override\n public LookupRuntimeProvider getLookupRuntimeProvider(LookupContext context) {\n int[] keyIndices = new int[context.getKeys().length];\n int i = 0;\n for (int[] key : context.getKeys()) {\n if (key.length > 1) {\n throw new UnsupportedOperationException(\n \"Hive lookup can not support nested key now.\");\n }\n keyIndices[i] = key[0];\n i++;\n }\n return TableFunctionProvider.of(\n new OdpsLookupFunction(\n getOdpsInputFormat(),\n lookupOptions,\n keyIndices,\n (RowType) tableSchema.toRowDataType().getLogicalType()));\n }", "public abstract String [] listTables();", "public static String[] getNameMapTable(RConnection RC) {\n try {\n String rCommand = \"CreateMappingResultTable(NA)\";\n String[] resTable = RC.eval(rCommand).asStrings();\n RCenter.recordRCommand(RC, rCommand);\n return resTable;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "public String fetchPartitionColumn(String tableName) throws SQLException {\n String partitionColumn = null;\n PreparedStatement fetchTableMetadataStatement = null;\n\n try {\n fetchTableMetadataStatement =\n masterNodeConnection.prepareStatement(MASTER_FETCH_TABLE_METADATA);\n fetchTableMetadataStatement.setString(1, tableName);\n\n ResultSet tableMetadataResultSet = fetchTableMetadataStatement.executeQuery();\n\n tableMetadataResultSet.next();\n partitionColumn = tableMetadataResultSet.getString(PART_KEY_FIELD);\n\n } finally {\n releaseResources(fetchTableMetadataStatement);\n }\n\n return partitionColumn;\n }", "private JSONObject lookupJsonArrByName(String patName, JSONArray resultsArr){\n for(Object jObj: resultsArr){\n JSONObject result = (JSONObject) jObj;\n if(result.getString(\"patientname\").compareToIgnoreCase(patName)==0){\n return result;\n }\n }\n System.out.println(\"Patient not in cache\");\n\n return null;\n\n }", "@Override\n\tpublic String[] getTableColumns() {\n\t\treturn null;\n\t}", "List<Map<String, Object>> getTableValuesWithHeaders(TableParameters tableParameters);", "private TableInformation readTable(String tablePath, Component parent)\n {\n // Read the table's data from the database\n TableInformation tableInfo = dbTable.loadTableData(tablePath,\n false,\n false,\n false,\n false,\n parent);\n\n // Check that the data was successfully loaded from the database and\n // that the table isn't empty\n if (!tableInfo.isErrorFlag() && tableInfo.getData().length != 0)\n {\n // Get the table's type definition\n TypeDefinition typeDefn = tableTypeHandler.getTypeDefinition(tableInfo.getType());\n\n // Get the data and place it in an array for reference below. Add\n // columns to contain the table type and path\n String[][] data = CcddUtilities.appendArrayColumns(tableInfo.getData(), 2);\n int typeColumn = data[0].length - TYPE_COLUMN_DELTA;\n int pathColumn = data[0].length - PATH_COLUMN_DELTA;\n\n // Get the index of the column containing the data type for this\n // table if it has one\n int dataTypeColumn = typeDefn.getColumnIndexByInputType(InputDataType.PRIM_AND_STRUCT);\n\n // Step through each row\n for (int row = 0; row < data.length && !tableInfo.isErrorFlag(); row++)\n {\n // Use the index column to store the table path and type for\n // reference during script execution\n data[row][typeColumn] = tableInfo.getType();\n data[row][pathColumn] = tablePath;\n\n // Store the data from the table in the combined storage array\n combinedData = CcddUtilities.concatenateArrays(combinedData,\n new String[][] {data[row]});\n\n // Check if this is a table reference (a data type column was\n // found and it does not contain a primitive data type)\n if (dataTypeColumn != -1\n && !dataTypeHandler.isPrimitive(data[row][dataTypeColumn]))\n {\n // Get the column containing the variable name for this\n // table\n int varNameColumn = typeDefn.getColumnIndexByInputType(InputDataType.VARIABLE);\n\n // Check that a variable name column was found\n if (varNameColumn != -1)\n {\n // Get the column containing the array size for this\n // table\n int arraySizeColumn = typeDefn.getColumnIndexByInputType(InputDataType.ARRAY_INDEX);\n\n // Check if the data type or variable name isn't blank,\n // and if an array size column doesn't exist or that\n // the row doesn't reference an array definition. This\n // is necessary to prevent appending the prototype\n // information for this data type structure\n if ((!data[row][dataTypeColumn].isEmpty()\n || !data[row][varNameColumn].isEmpty())\n && (arraySizeColumn == -1\n || data[row][arraySizeColumn].isEmpty()\n || ArrayVariable.isArrayMember(data[row][varNameColumn])))\n {\n // Get the variable in the format\n // dataType.variableName, prepend a comma to\n // separate the new variable from the preceding\n // variable path, then break down the child table\n readTable(tablePath\n + \",\"\n + data[row][dataTypeColumn]\n + \".\"\n + data[row][varNameColumn],\n parent);\n }\n }\n // Table has no variable name column\n else\n {\n tableInfo.setErrorFlag();\n break;\n }\n }\n }\n }\n\n return tableInfo;\n }", "@Override\n @Nullable\n public Column findColumn(String name)\n {\n if (columnCache.containsKey(name)) {\n return columnCache.get(name);\n } else {\n final Column column = rac.findColumn(name);\n if (column == null) {\n columnCache.put(name, null);\n return null;\n }\n\n final ColumnAccessor accessor = column.toAccessor();\n return new ColumnAccessorBasedColumn(\n new ColumnAccessor()\n {\n @Override\n public ColumnType getType()\n {\n return accessor.getType();\n }\n\n @Override\n public int numRows()\n {\n return end - start;\n }\n\n @Override\n public boolean isNull(int rowNum)\n {\n return accessor.isNull(pointers[start + rowNum]);\n }\n\n @Nullable\n @Override\n public Object getObject(int rowNum)\n {\n return accessor.getObject(pointers[start + rowNum]);\n }\n\n @Override\n public double getDouble(int rowNum)\n {\n return accessor.getDouble(pointers[start + rowNum]);\n }\n\n @Override\n public float getFloat(int rowNum)\n {\n return accessor.getFloat(pointers[start + rowNum]);\n }\n\n @Override\n public long getLong(int rowNum)\n {\n return accessor.getLong(pointers[start + rowNum]);\n }\n\n @Override\n public int getInt(int rowNum)\n {\n return accessor.getInt(pointers[start + rowNum]);\n }\n\n @Override\n public int compareRows(int lhsRowNum, int rhsRowNum)\n {\n return accessor.compareRows(pointers[lhsRowNum], pointers[start + rhsRowNum]);\n }\n }\n );\n }\n }", "protected String[] getStringTable() {\n/* 199 */ return myStringTable;\n/* */ }", "private String[] convertLookupTables(LookupOp lookupOp) {\n\t\tLookupTable lookupTable = lookupOp.getTable();\n\t\tint nComponents = lookupTable.getNumComponents();\n\n\t\tif ((nComponents != 1) && (nComponents != 3) && (nComponents != 4))\n\t\t\tthrow new SVGGraphics2DRuntimeException(ERR_ILLEGAL_BUFFERED_IMAGE_LOOKUP_OP);\n\n\t\tStringBuilder[] lookupTableBuf = new StringBuilder[nComponents];\n\t\tfor (int i = 0; i < nComponents; i++)\n\t\t\tlookupTableBuf[i] = new StringBuilder();\n\n\t\tif (!(lookupTable instanceof ByteLookupTable)) {\n\t\t\tint[] src = new int[nComponents];\n\t\t\tint[] dest = new int[nComponents];\n\t\t\tint offset = lookupTable.getOffset();\n\n\t\t\t// Offsets are used for constrained sources. Therefore,\n\t\t\t// the lookup values should never be used under offset.\n\t\t\t// There is no SVG equivalent for this behavior.\n\t\t\t// These values are mapped to identity.\n\t\t\tfor (int i = 0; i < offset; i++) {\n\t\t\t\t// Fill in string buffers\n\t\t\t\tfor (int j = 0; j < nComponents; j++) {\n\t\t\t\t\t// lookupTableBuf[j].append(Integer.toString(i));\n\t\t\t\t\tlookupTableBuf[j].append(doubleString(i / 255.0)).append(SPACE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = offset; i <= 255; i++) {\n\t\t\t\t// Fill in source array\n\t\t\t\tArrays.fill(src, i);\n\n\t\t\t\t// Get destination values\n\t\t\t\tlookupTable.lookupPixel(src, dest);\n\n\t\t\t\t// Fill in string buffers\n\t\t\t\tfor (int j = 0; j < nComponents; j++) {\n\t\t\t\t\tlookupTableBuf[j].append(doubleString(dest[j] / 255.0)).append(SPACE);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tbyte[] src = new byte[nComponents];\n\t\t\tbyte[] dest = new byte[nComponents];\n\n\t\t\tint offset = lookupTable.getOffset();\n\n\t\t\t// Offsets are used for constrained sources. Therefore,\n\t\t\t// the lookup values should never be used under offset.\n\t\t\t// There is no SVG equivalent for this behavior.\n\t\t\t// These values are mapped to identity.\n\t\t\tfor (int i = 0; i < offset; i++) {\n\t\t\t\t// Fill in string buffers\n\t\t\t\tfor (int j = 0; j < nComponents; j++) {\n\t\t\t\t\t// lookupTableBuf[j].append(Integer.toString(i));\n\t\t\t\t\tlookupTableBuf[j].append(doubleString(i / 255.0)).append(SPACE);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0; i <= 255; i++) {\n\t\t\t\t// Fill in source array\n\t\t\t\tArrays.fill(src, (byte) (0xff & i));\n\n\t\t\t\t// Get destination values\n\t\t\t\t((ByteLookupTable) lookupTable).lookupPixel(src, dest);\n\n\t\t\t\t// Fill in string buffers\n\t\t\t\tfor (int j = 0; j < nComponents; j++) {\n\t\t\t\t\tlookupTableBuf[j].append(doubleString((0xff & dest[j]) / 255.0)).append(SPACE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tString[] lookupTables = new String[nComponents];\n\t\tfor (int i = 0; i < nComponents; i++)\n\t\t\tlookupTables[i] = lookupTableBuf[i].toString().trim();\n\n\t\t/*\n\t\t * for(int i=0; i<lookupTables.length; i++){\n\t\t * System.out.println(lookupTables[i]); }\n\t\t */\n\n\t\treturn lookupTables;\n\t}", "private void populateTable() {\n this.allLogs = this.auditLogService.getAllLogs();\n // Creat columns for users\n\n\n TableColumn<Map, String> actionColumn = new TableColumn<>(\"Action\");\n actionColumn.setCellValueFactory(new MapValueFactory<>(\"action\"));\n\n TableColumn<Map, String> actionByColumn = new TableColumn<>(\"By\");\n actionByColumn.setCellValueFactory(new MapValueFactory<>(\"actionByUserId\"));\n\n TableColumn<Map, String> actionAt = new TableColumn<>(\"At\");\n actionAt.setCellValueFactory(new MapValueFactory<>(\"createdAt\"));\n this.listOfLogs.getColumns().add(actionColumn);\n this.listOfLogs.getColumns().add(actionByColumn);\n this.listOfLogs.getColumns().add(actionAt);\n // Create an observable list to add customers to\n ObservableList<Map<String, Object>> items = FXCollections.<Map<String, Object>>observableArrayList();\n\n this.allLogs.forEach(log -> {\n Map<String, Object> obj = new HashMap<>();\n // Forces int to be string to be converted back to int\n obj.put(\"action\", log.getAction());\n obj.put(\"actionByUserId\", log.getActionByUserId().getName());\n obj.put(\"createdAt\", log.getCreatedAt());\n items.add(obj);\n });\n\n // Add all the users to the table\n this.listOfLogs.getItems().addAll(items);\n }", "public Cache.Entry get(String param1) {\n }", "public Table<Integer, Integer, String> getData();", "private static HashMap<String,String> buildColumnMap() {\n HashMap<String,String> map = new HashMap<String,String>();\n map.put( STATE_NAME, STATE_NAME );\n map.put( CAPITAL_NAME, CAPITAL_NAME );\n map.put( STATE_ABBR, STATE_ABBR );\n map.put( STATE_FOUNDING_DATE, STATE_FOUNDING_DATE );\n map.put( STATE_FUN_FACT, STATE_FUN_FACT );\n map.put( BaseColumns._ID, \"rowid AS \" +\n BaseColumns._ID );\n map.put( SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID, \"rowid AS \" +\n SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID );\n map.put( SearchManager.SUGGEST_COLUMN_SHORTCUT_ID, \"rowid AS \" +\n SearchManager.SUGGEST_COLUMN_SHORTCUT_ID );\n return map;\n }", "public void initializeTable(){\r\n\t \r\n\t // Adding a button to tableView\r\n\t /*\r\n\t TableColumn actionCol = new TableColumn( \"Action\" );\r\n actionCol.setCellValueFactory( new PropertyValueFactory<>( \"DUMMY\" ) );\r\n\r\n Callback<TableColumn<WorkflowEntry, String>, TableCell<WorkflowEntry, String>> cellFactory = //\r\n new Callback<TableColumn<WorkflowEntry, String>, TableCell<WorkflowEntry, String>>()\r\n {\r\n public TableCell<WorkflowEntry, String> call( final TableColumn<WorkflowEntry, String> param )\r\n {\r\n final TableCell<WorkflowEntry, String> cell = new TableCell<WorkflowEntry, String>()\r\n {\r\n\r\n final Button btn = new Button( \"Approve\" );\r\n\r\n @Override\r\n public void updateItem( String item, boolean empty )\r\n {\r\n super.updateItem( item, empty );\r\n if ( empty )\r\n {\r\n setGraphic( null );\r\n setText( null );\r\n }\r\n else\r\n {\r\n btn.setOnAction( ( ActionEvent event ) ->\r\n {\r\n WorkflowEntry person = getTableView().getItems().get( getIndex() );\r\n System.out.println( person.getName() );\r\n } );\r\n setGraphic( btn );\r\n setText( null );\r\n }\r\n }\r\n };\r\n return cell;\r\n }\r\n };\r\n\r\n actionCol.setCellFactory( cellFactory );*/\r\n\t\t\r\n\t\ttableView.setItems(data);\r\n\t}", "public static void parseQueryString(String queryString) {\n\n System.out.println(\"STUB: Calling parseQueryString(String s) to process queries\");\n System.out.println(\"Parsing the string:\\\"\" + queryString + \"\\\"\");\n queryString = queryString.toLowerCase();\n String colName = queryString.substring(0,queryString.indexOf(\"from\")+5).trim();\n String colNames[] = removeWhiteSpacesInArray(colName.split(\" \"));\n ArrayList<String> queryStringList = new ArrayList<String>(Arrays.asList(colNames));\n queryStringList.remove(\"select\");\n queryStringList.remove(\"from\");\n String condition = \"\";\n String keyValueCond[] = new String[]{};\n String tableName = \"\";\n if(queryString.contains(\"where\")) {\n tableName = queryString.substring(queryString.indexOf(\"from\") + 5, queryString.indexOf(\"where\")).trim();\n condition = queryString.substring(queryString.indexOf(\"where\")+6, queryString.length()).trim();\n keyValueCond = removeWhiteSpacesInArray(condition.split(\" \"));\n }else\n tableName = queryString.substring(queryString.indexOf(\"from\")+5).trim();\n try {\n Table table = new Table(tableName.concat(\".tbl\"));\n int noOfRecords = table.page.getNoOfRecords();\n long pos = table.page.getStartofContent();\n TreeMap<String, String> colOrder = columnOrdinalHelper.getColumnsInOrdinalPositionOrder(tableName);\n int recordLength = Integer.parseInt(recordLengthHelper.getProperties(tableName.concat(\".\").concat(Constant.recordLength)));\n if(keyValueCond.length>0){\n\n }else{\n Iterator it = colOrder.entrySet().iterator();\n while (it.hasNext()){\n Map.Entry<String, String> entryPair = (Map.Entry<String, String>) it.next();\n// ReadResult<Object> readResult = table.page.readIntasByte(pos);\n// System.out.println(readResult.getT());\n ReadResult<Object> readResult = RecordFormat.readRecordFormat(columnTypeHelper.getProperties(entryPair.getValue()),table,pos);\n System.out.println(\"RESULT COLUMN NAME : \"+entryPair.getValue()+\" Value : \"+readResult.getT());\n\n }\n\n }\n\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public synchronized Map<String, byte[]> getRow(String rowKey,\n Set<byte[]> columns, boolean cacheBlocks) throws IOException {\n HTable table = getTable();\n Get get = new Get(rowKey.getBytes());\n get.setCacheBlocks(cacheBlocks);\n for (byte[] column: columns) {\n get.addColumn(familyName, column);\n }\n Result row = table.get(get);\n if (row.raw().length >= 1) {\n Map<String, byte[]> result = new HashMap<String, byte[]>();\n for (KeyValue kv: row.raw()) {\n result.put(new String(kv.getQualifier()), kv.getValue());\n }\n return result;\n }\n return null;\n }", "private String[] getTableFields(String pTableName) {\r\n\t\tString[] returnedValue = null;\r\n\t\t\r\n\t\tif (getDatabse() != null && getDatabse().isOpen()) {\r\n\t\t\t\r\n\t\t\tCursor cursor = getDatabse().query(pTableName, null, null, null, null, null, null);\r\n\t\t\tif (cursor != null) {\r\n\t\t\t\treturnedValue = cursor.getColumnNames();\r\n\t\t\t}\r\n\t\t\tcursor.close();\r\n\t\t\tcursor = null;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn returnedValue;\r\n\t}", "protected Collection<Column> getColumns(BusinessObject bo, BusinessObjectRestrictions businessObjectRestrictions) {\n Collection<Column> columns = new ArrayList<Column>();\n\n for (String attributeName : getBusinessObjectDictionaryService().getLookupResultFieldNames(bo.getClass())) {\n columns.add(setupResultsColumn(bo, attributeName, businessObjectRestrictions));\n }\n return columns;\n }", "private static TextColumnBuilder getColumnByNameField(String nameField){ \n return drColumns.get(nameField);\n }", "public interface HiveMetaDao {\n String getLocationByDbAndTable(Map<String, String> map);\n List<String> getDbsByUser(String userName);\n List<Map<String, Object>> getTablesByDbNameAndUser(Map<String, String> map);\n Long getPartitionSize(Map<String, String> map);\n List<String> getPartitions(Map<String, String> map);\n List<Map<String, Object>> getColumns(Map<String, String> map);\n List<Map<String, Object>> getPartitionKeys(Map<String, String> map);\n String getTableComment(@Param(\"DbName\") String DbName, @Param(\"tableName\") String tableName);\n}", "private TableColumn<Object, ?> fillColumns() {\n\t\t\n\t\treturn null;\n\t}", "com.factset.protobuf.stach.v2.table.ColumnDefinitionProto.ColumnDefinition getColumns(int index);", "public ResultSet getCertainRow(String itemname, String tableName, String columnName)\n {\n\n String selectStr;\n ResultSet rs=null;\n String itemn=\"%\"+itemname+\"%\";\n\n try{\n\n selectStr=\"SELECT * FROM \"+tableName+\" WHERE \"+ columnName+\" LIKE \"+quotate(itemn);\n rs = stmt.executeQuery(selectStr);\n\n\n\n\n\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return rs;\n }", "List<Column> getQueryColumns();", "public void populateHiveTable(GenericService genericService, String nonce) {\n // Get the current method name\n String methodName = new Throwable().getStackTrace()[0].getMethodName();\n\n // To time how long function takes to run\n Stopwatch stopwatch = Stopwatch.createStarted();\n\n String numberColName = \"number\";\n if (!genericService.getTableName().equals(\"blocks\")\n && !genericService.getTableName().equals(\"block_timestamp_mapping\")) {\n numberColName = \"block_number\";\n }\n\n String liveTableCols = genericService.getFieldDescriptors().stream()\n .map(s -> String.format(\"`%s`\", s.getName()))\n .collect(Collectors.joining(\",\"));\n\n // Generate all columns of table\n String columns = genericService.getFieldDescriptors().stream()\n .map(s -> String.format(\"a.`%s`\", s.getName()))\n .collect(Collectors.joining(\",\"));\n\n // Strict mode insertion (for multi-user environment)\n // Use this mode when multiple imports are happening at once\n// String sql =\n// \"INSERT INTO %s.%s (%s) \"\n// + \"SELECT %s FROM %s a \"\n// + \"LEFT OUTER JOIN %s.%s b ON a.%s = b.%s \"\n// + \"WHERE b.%s IS NULL\";\n// String query = String.format(\n// sql,\n// schema,\n// genericService.getTableName(),\n// liveTableCols,\n// columns,\n// genericService.getTmpTableName() + \"_\" + nonce,\n// schema,\n// genericService.getTableName(),\n// numberColName,\n// numberColName,\n// numberColName\n// );\n\n // Non-strict mode insertion\n String sql =\n \"INSERT INTO %s.%s (%s) \"\n + \"SELECT %s FROM %s a\";\n String query = String.format(\n sql,\n schema,\n genericService.getTableName(),\n liveTableCols,\n columns,\n genericService.getTmpTableName() + \"_\" + nonce\n );\n \n jdbcTemplate.execute(query);\n\n stopwatch.stop(); // Optional\n log.info(\"[{} - {}] -> Time elapsed: [{}] ms\",\n genericService.getTableName(),\n methodName,\n stopwatch.elapsed(TimeUnit.MILLISECONDS)\n );\n }", "public T lookup( String name )\r\n {\r\n T result = null;\r\n \r\n for( HashMap<String,T> table : tables )\r\n {\r\n result = table.get( name );\r\n if( result!=null ) break;\r\n }\r\n \r\n return result;\r\n }", "private HashMap<String, ArrayList<String>> getAllTableContents(String table) {\r\n return getAllTableContentsWhere(table, null, null);\r\n }", "@Test\n public void doGetTable()\n throws Exception\n {\n logger.info(\"doGetTable - enter\");\n\n // Mock mapping.\n Schema mockMapping = SchemaBuilder.newBuilder()\n .addField(\"mytext\", Types.MinorType.VARCHAR.getType())\n .addField(\"mykeyword\", Types.MinorType.VARCHAR.getType())\n .addField(new Field(\"mylong\", FieldType.nullable(Types.MinorType.LIST.getType()),\n Collections.singletonList(new Field(\"mylong\",\n FieldType.nullable(Types.MinorType.BIGINT.getType()), null))))\n .addField(\"myinteger\", Types.MinorType.INT.getType())\n .addField(\"myshort\", Types.MinorType.SMALLINT.getType())\n .addField(\"mybyte\", Types.MinorType.TINYINT.getType())\n .addField(\"mydouble\", Types.MinorType.FLOAT8.getType())\n .addField(new Field(\"myscaled\",\n new FieldType(true, Types.MinorType.BIGINT.getType(), null,\n ImmutableMap.of(\"scaling_factor\", \"10.0\")), null))\n .addField(\"myfloat\", Types.MinorType.FLOAT4.getType())\n .addField(\"myhalf\", Types.MinorType.FLOAT4.getType())\n .addField(\"mydatemilli\", Types.MinorType.DATEMILLI.getType())\n .addField(\"mydatenano\", Types.MinorType.DATEMILLI.getType())\n .addField(\"myboolean\", Types.MinorType.BIT.getType())\n .addField(\"mybinary\", Types.MinorType.VARCHAR.getType())\n .addField(\"mynested\", Types.MinorType.STRUCT.getType(), ImmutableList.of(\n new Field(\"l1long\", FieldType.nullable(Types.MinorType.BIGINT.getType()), null),\n new Field(\"l1date\", FieldType.nullable(Types.MinorType.DATEMILLI.getType()), null),\n new Field(\"l1nested\", FieldType.nullable(Types.MinorType.STRUCT.getType()), ImmutableList.of(\n new Field(\"l2short\", FieldType.nullable(Types.MinorType.LIST.getType()),\n Collections.singletonList(new Field(\"l2short\",\n FieldType.nullable(Types.MinorType.SMALLINT.getType()), null))),\n new Field(\"l2binary\", FieldType.nullable(Types.MinorType.VARCHAR.getType()),\n null))))).build();\n\n // Real mapping.\n LinkedHashMap<String, Object> mapping = new ObjectMapper().readValue(\n \"{\\n\" +\n \" \\\"mishmash\\\" : {\\n\" + // Index: mishmash\n \" \\\"mappings\\\" : {\\n\" +\n \" \\\"_meta\\\" : {\\n\" + // _meta:\n \" \\\"mynested.l1nested.l2short\\\" : \\\"list\\\",\\n\" + // mynested.l1nested.l2short: LIST<SMALLINT>\n \" \\\"mylong\\\" : \\\"list\\\"\\n\" + // mylong: LIST<BIGINT>\n \" },\\n\" +\n \" \\\"properties\\\" : {\\n\" +\n \" \\\"mybinary\\\" : {\\n\" + // mybinary:\n \" \\\"type\\\" : \\\"binary\\\"\\n\" + // type: binary (VARCHAR)\n \" },\\n\" +\n \" \\\"myboolean\\\" : {\\n\" + // myboolean:\n \" \\\"type\\\" : \\\"boolean\\\"\\n\" + // type: boolean (BIT)\n \" },\\n\" +\n \" \\\"mybyte\\\" : {\\n\" + // mybyte:\n \" \\\"type\\\" : \\\"byte\\\"\\n\" + // type: byte (TINYINT)\n \" },\\n\" +\n \" \\\"mydatemilli\\\" : {\\n\" + // mydatemilli:\n \" \\\"type\\\" : \\\"date\\\"\\n\" + // type: date (DATEMILLI)\n \" },\\n\" +\n \" \\\"mydatenano\\\" : {\\n\" + // mydatenano:\n \" \\\"type\\\" : \\\"date_nanos\\\"\\n\" + // type: date_nanos (DATEMILLI)\n \" },\\n\" +\n \" \\\"mydouble\\\" : {\\n\" + // mydouble:\n \" \\\"type\\\" : \\\"double\\\"\\n\" + // type: double (FLOAT8)\n \" },\\n\" +\n \" \\\"myfloat\\\" : {\\n\" + // myfloat:\n \" \\\"type\\\" : \\\"float\\\"\\n\" + // type: float (FLOAT4)\n \" },\\n\" +\n \" \\\"myhalf\\\" : {\\n\" + // myhalf:\n \" \\\"type\\\" : \\\"half_float\\\"\\n\" + // type: half_float (FLOAT4)\n \" },\\n\" +\n \" \\\"myinteger\\\" : {\\n\" + // myinteger:\n \" \\\"type\\\" : \\\"integer\\\"\\n\" + // type: integer (INT)\n \" },\\n\" +\n \" \\\"mykeyword\\\" : {\\n\" + // mykeyword:\n \" \\\"type\\\" : \\\"keyword\\\"\\n\" + // type: keyword (VARCHAR)\n \" },\\n\" +\n \" \\\"mylong\\\" : {\\n\" + // mylong: LIST\n \" \\\"type\\\" : \\\"long\\\"\\n\" + // type: long (BIGINT)\n \" },\\n\" +\n \" \\\"mynested\\\" : {\\n\" + // mynested: STRUCT\n \" \\\"properties\\\" : {\\n\" +\n \" \\\"l1date\\\" : {\\n\" + // mynested.l1date:\n \" \\\"type\\\" : \\\"date_nanos\\\"\\n\" + // type: date_nanos (DATEMILLI)\n \" },\\n\" +\n \" \\\"l1long\\\" : {\\n\" + // mynested.l1long:\n \" \\\"type\\\" : \\\"long\\\"\\n\" + // type: long (BIGINT)\n \" },\\n\" +\n \" \\\"l1nested\\\" : {\\n\" + // mynested.l1nested: STRUCT\n \" \\\"properties\\\" : {\\n\" +\n \" \\\"l2binary\\\" : {\\n\" + // mynested.l1nested.l2binary:\n \" \\\"type\\\" : \\\"binary\\\"\\n\" + // type: binary (VARCHAR)\n \" },\\n\" +\n \" \\\"l2short\\\" : {\\n\" + // mynested.l1nested.l2short: LIST\n \" \\\"type\\\" : \\\"short\\\"\\n\" + // type: short (SMALLINT)\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" },\\n\" +\n \" \\\"myscaled\\\" : {\\n\" + // myscaled:\n \" \\\"type\\\" : \\\"scaled_float\\\",\\n\" + // type: scaled_float (BIGINT)\n \" \\\"scaling_factor\\\" : 10.0\\n\" + // factor: 10\n \" },\\n\" +\n \" \\\"myshort\\\" : {\\n\" + // myshort:\n \" \\\"type\\\" : \\\"short\\\"\\n\" + // type: short (SMALLINT)\n \" },\\n\" +\n \" \\\"mytext\\\" : {\\n\" + // mytext:\n \" \\\"type\\\" : \\\"text\\\"\\n\" + // type: text (VARCHAR)\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \"}\\n\", LinkedHashMap.class);\n LinkedHashMap<String, Object> index = (LinkedHashMap<String, Object>) mapping.get(\"mishmash\");\n LinkedHashMap<String, Object> mappings = (LinkedHashMap<String, Object>) index.get(\"mappings\");\n\n when(mockClient.getMapping(nullable(String.class))).thenReturn(mappings);\n\n // Get real mapping.\n when(domainMapProvider.getDomainMap(null)).thenReturn(ImmutableMap.of(\"movies\",\n \"https://search-movies-ne3fcqzfipy6jcrew2wca6kyqu.us-east-1.es.amazonaws.com\"));\n handler = new ElasticsearchMetadataHandler(awsGlue, new LocalKeyFactory(), awsSecretsManager, amazonAthena,\n \"spill-bucket\", \"spill-prefix\", domainMapProvider, clientFactory, 10, com.google.common.collect.ImmutableMap.of());\n GetTableRequest req = new GetTableRequest(fakeIdentity(), \"queryId\", \"elasticsearch\",\n new TableName(\"movies\", \"mishmash\"));\n GetTableResponse res = handler.doGetTable(allocator, req);\n Schema realMapping = res.getSchema();\n\n logger.info(\"doGetTable - {}\", res);\n\n // Test1 - Real mapping must NOT be empty.\n assertTrue(\"Real mapping is empty!\", realMapping.getFields().size() > 0);\n // Test2 - Real and mocked mappings must have the same fields.\n assertTrue(\"Real and mocked mappings are different!\",\n ElasticsearchSchemaUtils.mappingsEqual(realMapping, mockMapping));\n\n logger.info(\"doGetTable - exit\");\n }", "List<Map.Entry<Long, String>> getStopTimeTable(String stopId) throws Exception;" ]
[ "0.5708389", "0.5594477", "0.5280778", "0.52488846", "0.51681167", "0.5127585", "0.5107934", "0.50965285", "0.5005356", "0.49527687", "0.48998716", "0.489189", "0.486073", "0.479217", "0.4790461", "0.4784692", "0.47763944", "0.47752112", "0.477334", "0.47522944", "0.4752044", "0.47516346", "0.47514468", "0.47288302", "0.4724645", "0.47129294", "0.47084743", "0.46959123", "0.4672", "0.46713996", "0.4653669", "0.46459353", "0.46392372", "0.46311715", "0.46110237", "0.46036476", "0.45994735", "0.4592721", "0.45758384", "0.45607197", "0.45543802", "0.45461926", "0.4534172", "0.4532469", "0.45276976", "0.45266134", "0.45126688", "0.45118698", "0.45054057", "0.44900322", "0.4481934", "0.4481663", "0.4473679", "0.44672334", "0.4465728", "0.4453782", "0.44500378", "0.44486198", "0.44422695", "0.4437635", "0.4437288", "0.44352537", "0.44309422", "0.44292828", "0.44226673", "0.44173974", "0.4414843", "0.44131804", "0.44130403", "0.44086814", "0.44078276", "0.44056702", "0.4404943", "0.44048262", "0.44047245", "0.44027433", "0.44004637", "0.43996453", "0.43876892", "0.4386562", "0.43810546", "0.43794584", "0.437331", "0.43671492", "0.43657398", "0.43569523", "0.43550906", "0.4351428", "0.43470448", "0.4345313", "0.43385", "0.4333701", "0.43329766", "0.43292207", "0.43278572", "0.43258876", "0.432479", "0.43245193", "0.43086556", "0.4303848" ]
0.66334933
0
mostrar el bitmap tantos numeros de veces
public void drawBitmapText(Canvas c) { c.drawBitmap(frames[this.getcurrentFrame()], this.getX(),this.getY(),null); c.drawText(this.text, this.getX()+this.getWidth()+10,this.getY()+this.getHeight()+10, this.p); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showbitmap4() {\n \n \t}", "public void showbitmap3() {\n \n \t}", "public String printImage() {\n StringBuilder builder = new StringBuilder();\n builder.append(\"ID:\" + this.id + \"; Data:\\n\");\n\n for (int i = 1; i <= this.data.length; i++) {\n T t = data[i - 1];\n builder.append(t.toString() + \" \");\n if (i % 28 == 0) {\n builder.append(\"\\n\");\n }\n }\n return builder.toString().replace('0', ' ');\n }", "public void print1T0255(){\n StringBuilder out = new StringBuilder();\n for (int i = 1; i <= 255; i++){\n out.append( i + \" \");\n }\n System.out.println( out.toString());\n }", "public String memoryDisplayBin()\n {\n int pos = startingPos;\n String ret = \"\";\n while(pos <= endingPos)\n {\n String instruction = mem.getFourBytes(pos);\n String bin = BinaryFormater.format(Integer.toBinaryString(Integer.parseInt(instruction, 16)),32);\n ret += \"0x\"+Integer.toHexString(pos) + \": \" + bin.substring(0,16) + \" \" + bin.substring(16,32)+\"\\n\";\n pos += 4;\n }\n return ret;\n }", "private void paintNumbers() {\n\n g2d.setColor(_BOARDCOLOR);\n g2d.drawString(\"0\", 100, 150);\n g2d.drawString(\"1\", 200, 150);\n g2d.drawString(\"2\", 300, 150);\n g2d.drawString(\"3\", 400, 150);\n g2d.drawString(\"4\", 100, 250);\n g2d.drawString(\"5\", 200, 250);\n g2d.drawString(\"6\", 300, 250);\n g2d.drawString(\"7\", 400, 250);\n g2d.drawString(\"8\", 100, 350);\n g2d.drawString(\"9\", 200, 350);\n g2d.drawString(\"10\", 300, 350);\n g2d.drawString(\"11\", 400, 350);\n g2d.drawString(\"12\", 100, 450);\n g2d.drawString(\"13\", 200, 450);\n g2d.drawString(\"14\", 300, 450);\n g2d.drawString(\"15\", 400, 450);\n }", "public void displayImageToConsole();", "public void numberImage(){\r\n\t\t//Randomly generated values displayed on the canvas\r\n\t\tString strArray = String.valueOf(Arrays.toString(randArray));\r\n\t\tstrArray = strArray.substring(1, strArray.length()-1).replace(\",\", \"\");\r\n\t\tnumberImage = new GLabel(strArray,250,250 );\r\n\t\tnumberImage.setColor(Color.green);\r\n\t\tnumberImage.setFont(\"Arial-40\");\r\n\t\tcanvas.add(numberImage);\r\n\t}", "void mo12205a(Bitmap bitmap);", "public void ToImage(){\n\t\tint row=SL.length;\n\t\tint col=SL[0].length;\n\t\tint cr=0;\n\t\tint cb=0;\n\t\t// System.out.println(row+\" \"+col);\n\t\tint[] intArray = new int[3*row*col];\n\t\tint w=row;\n\t int h=col;\n\t BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);\n\t\tint pixel = 0;\n\t\tfor(int x=0;x<row;x++){\n\t\t\tfor(int y=0;y<col;y++){\n\t\t\t\tint rByte = (int)(SL[x][y]);\n\t\t int gByte = (int)(SL[x][y]);\n\t\t int bByte = (int)(SL[x][y]);\n\t\t \n\t\t // int rByte = (int)(SL[x][y]+1.402*(cr-128));\n\t\t // int gByte = (int)(SL[x][y]-0.3414*(cb-128)-0.71414*(cr-128));\n\t\t // int bByte = (int)(SL[x][y]+1.772*(cb-128));\n\t\t int rgb = (rByte *65536) + (gByte * 256) + bByte;\n\t\t image.setRGB(x,y,rgb);\n\t \t}\n\t\t}\n\t try {\n\t ImageIO.write(image, \"bmp\", new File(\"\"+picture_num+\".png\"));\n\t } catch (Exception e) {\n\t e.printStackTrace();\n\t }\n\t}", "public void printImage() {\n\t System.out.print(\"\\n\");\n for (int i=0; i<width*height; i++) {\n if (i % width==0) System.out.print(\"\\n\");\n System.out.print(image[i]+ \" \");\n }\n System.out.print(\"\\n\\n\");\n }", "public String getImage(){\n StringBuilder sb = new StringBuilder();\n for (char[] subArray : hidden) {\n sb.append(subArray);\n sb.append(\"\\n\");\n }\n return sb.toString();\n }", "private static byte[] m17790a(Bitmap bitmap) {\n int i;\n int i2;\n int i3;\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n OutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n for (i = 0; i < 32; i++) {\n byteArrayOutputStream.write(0);\n }\n int[] iArr = new int[(width - 2)];\n bitmap.getPixels(iArr, 0, width, 1, 0, width - 2, 1);\n Object obj = iArr[0] == -16777216 ? 1 : null;\n Object obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n int length = iArr.length;\n width = 0;\n int i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n int i5 = i4;\n int i6 = i5 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i3 = i - 1;\n } else {\n i3 = i;\n }\n iArr = new int[(height - 2)];\n bitmap.getPixels(iArr, 0, 1, 0, 1, 1, height - 2);\n obj = iArr[0] == -16777216 ? 1 : null;\n obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n length = iArr.length;\n width = 0;\n i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n i6 = i4 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i--;\n }\n for (i6 = 0; i6 < i3 * i; i6++) {\n C5225r.m17788a(byteArrayOutputStream, 1);\n }\n byte[] toByteArray = byteArrayOutputStream.toByteArray();\n toByteArray[0] = (byte) 1;\n toByteArray[1] = (byte) i5;\n toByteArray[2] = (byte) i4;\n toByteArray[3] = (byte) (i * i3);\n C5225r.m17787a(bitmap, toByteArray);\n return toByteArray;\n }", "Bitmap m7900a(Bitmap bitmap);", "Bitmap mo1406a(Bitmap bitmap, float f);", "public void mo5975l() {\n new C1292f(this.f5384D.getmImageView(), new int[]{R.drawable.iqoo_btn_play_15, R.drawable.iqoo_btn_play_14, R.drawable.iqoo_btn_play_13, R.drawable.iqoo_btn_play_12, R.drawable.iqoo_btn_play_11, R.drawable.iqoo_btn_play_10, R.drawable.iqoo_btn_play_9, R.drawable.iqoo_btn_play_8, R.drawable.iqoo_btn_play_7, R.drawable.iqoo_btn_play_6, R.drawable.iqoo_btn_play_5, R.drawable.iqoo_btn_play_4, R.drawable.iqoo_btn_play_3, R.drawable.iqoo_btn_play_2, R.drawable.iqoo_btn_play_1, R.drawable.iqoo_btn_play_0}, new int[]{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3});\n }", "public void display() {\n\t\ttree.resize(30,50);\n\t\tfor(int i = 650; i > 0; i -= 100) {\t\n\t\t\tt.image(tree,25,i);\n\t\t}\n\t\tfor(int i = 650; i > 0; i -= 100) {\t\n\t\t\tt.image(tree, 575, i);\n\t\t}\n\t}", "public byte[] bitmap();", "private String asciiImage(final boolean target) {\n \t\tfinal String newLine = System.getProperty(\"line.separator\");\n \t\tfinal StringBuilder sb = new StringBuilder();\n \t\tfinal int step = maxContrib / 4;\n \t\tfor (int y = 0; y < CAL_HEIGHT; y++) {\n \t\t\tfor (int x = 0; x < CAL_WIDTH; x++) {\n \t\t\t\tif (contrib[y][x] == null) {\n \t\t\t\t\tsb.append(\" \");\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\tfinal int value =\n \t\t\t\t\ttarget ? contrib[y][x].target : contrib[y][x].current;\n \t\t\t\tfinal int index = (value - 1) / step;\n \t\t\t\tsb.append(CAL_ASCII.charAt(index));\n \t\t\t}\n \t\t\tsb.append(newLine);\n \t\t}\n \t\treturn sb.toString();\n \t}", "@Override\n\tpublic String drawForConsole() {\n\t\tString[][] output = new String[this.getWidth()][this.getHeight()];\n\t\tString image = \"\";\n\t\tfor (int x = 0; x < this.getWidth(); x++) {\n\t\t\tfor (int y = 0; y < this.getHeight(); y++) {\n\t\t\t\tif (x == 0 || x == this.getWidth() - 1) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else if (y == 0 || y == this.getHeight() -1) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else if (this.isFilledIn()) {\n\t\t\t\t\toutput[x][y] = \"#\";\n\t\t\t\t} else {\n\t\t\t\t\toutput[x][y] = \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int y = 0; y < this.getHeight(); y++) {\n\t\t\tfor (int x = 0; x < this.getWidth(); x++) {\n\t\t\t\timage += output[x][y];\n\t\t\t\tif (x == this.getWidth() - 1) {\n\t\t\t\t\timage += \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn image;\n\t}", "public String showVision()\r\n {\r\n balayer();\r\n String res=\"Vision : +\\n\";\r\n for (int i=0; i<LONGUEUR ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<LARGEUR; j++) {\r\n res+=Vision[i][j][0];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n res += \"\\n\";\r\n for (int i=0; i<4 ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<4; j++) {\r\n res+=lignesHor[i][j];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n res += \"\\n\";\r\n for (int i=0; i<4 ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<4; j++) {\r\n res+=lignesVert[i][j];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n System.out.println(res);\r\n return res;\r\n }", "@Override\n\tpublic String toString() {\n\t\tString ans =\n\t\t\t\t\" EWAHCompressedBitmap, size in bits = \" + this.sizeinbits\n\t\t\t\t\t\t+ \" size in words = \" + this.actualsizeinwords + \"\\n\";\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\twhile (i.hasNext()) {\n\t\t\tRunningLengthWord localrlw = i.next();\n\t\t\tif (localrlw.getRunningBit()) {\n\t\t\t\tans += localrlw.getRunningLength() + \" 1x11\\n\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans += localrlw.getRunningLength() + \" 0x00\\n\";\n\t\t\t}\n\t\t\tans += localrlw.getNumberOfLiteralWords() + \" dirties\\n\";\n\t\t}\n\t\treturn ans;\n\t}", "private void render() {\n StringBuilder builder = new StringBuilder();\n builder.append(horizontalEdge).append(\"\\n\");\n for (int i = 0; i < this.height; i++) {\n builder.append(VERTICAL_CHAR);\n for (int j = 0; j < this.width; j++) {\n builder.append(pixels[i][j]);\n }\n builder.append(VERTICAL_CHAR);\n builder.append(\"\\n\");\n }\n builder.append(horizontalEdge);\n System.out.printf(builder.toString());\n }", "public void ocultarMensaje(String msje, String fo, String nueFo){\n String mensaje, binario;\n Color color;\n int r,g,b;\n try{\n mensaje = lecturaArchivo(msje);\n binario = preparaMensaje(mensaje);\n BufferedImage image = sacaFoto(fo);\n int k = 0;\n for(int i = 0; i < image.getHeight(); i++)\n for(int j = 0; j < image.getWidth(); j++){\n color = new Color(image.getRGB(j, i));\n if(k <= binario.length()){\n String red = toBinary((byte) color.getRed());\n String green = toBinary((byte) color.getGreen());\n String blue = toBinary((byte) color.getBlue());\n red = reemplazarLSB(red, binario);\n green = reemplazarLSB(green, binario);\n blue = reemplazarLSB(blue, binario);\n r = Integer.parseInt(red ,2);\n g = Integer.parseInt(green ,2);\n b = Integer.parseInt(blue ,2);\n }else{\n r = color.getRed();\n g = color.getGreen();\n b = color.getBlue();\n }\n image.setRGB(j, i, new Color(r,g,b).getRGB());\n k+=3;\n }\n File output = new File(nueFo);\n ImageIO.write(image, \"png\", output);\n }catch(IOException ioe){\n System.out.println(\"Hubo un error en la escritura de la imagen\");\n System.exit(1);\n }\n }", "public void borra() {\n dib.borra();\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta(); \n }", "public abstract String visualize(byte input);", "Bitmap mo6659a(Context context, String str, C1492a aVar);", "public static void printChunkInfo(Bitmap bm) {\n byte[] chunk = bm.getNinePatchChunk();\n if (null == chunk) {\n System.out.println(\"can't find chunk info from this bitmap(\" + bm\n + \")\");\n return;\n }\n int xLen = chunk[1];\n int yLen = chunk[2];\n int cLen = chunk[3];\n \n StringBuilder sb = new StringBuilder();\n int peddingLeft = getInt(chunk, 12);\n int paddingRight = getInt(chunk, 16);\n int paddingTop = getInt(chunk, 20);\n int paddingBottom = getInt(chunk, 24);\n sb.append(\"peddingLeft=\" + peddingLeft);\n sb.append(\"\\r\\n\");\n sb.append(\"paddingRight=\" + paddingRight);\n sb.append(\"\\r\\n\");\n sb.append(\"paddingTop=\" + paddingTop);\n sb.append(\"\\r\\n\");\n sb.append(\"paddingBottom=\" + paddingBottom);\n sb.append(\"\\r\\n\");\n \n sb.append(\"x info=\");\n for (int i = 0; i < xLen; i++) {\n int vv = getInt(chunk, 32 + i * 4);\n sb.append(\",\" + vv);\n }\n sb.append(\"\\r\\n\");\n sb.append(\"y info=\");\n for (int i = 0; i < yLen; i++) {\n int vv = getInt(chunk, xLen * 4 + 32 + i * 4);\n sb.append(\",\" + vv);\n }\n sb.append(\"\\r\\n\");\n sb.append(\"color info=\");\n for (int i = 0; i < cLen; i++) {\n int vv = getInt(chunk, xLen * 4 + yLen * 4 + 32 + i * 4);\n sb.append(\",\" + vv);\n }\n System.err.println(\"\" + sb);\n }", "private void visualizarm(){\r\n switch(this.opc){\r\n case 1:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t\\t\\t\\t\"+min+\":\"+seg+\"\\n\");\r\n System.out.printf(\"-----------------------------------------------------\\n\");\r\n for(int i=0;i<2;i++){\r\n for(int j=0;j<5;j++){\r\n System.out.printf(\"%s\\t\",mfacil[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n case 2:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t5\\n\");\r\n System.out.printf(\"-----------------------------------------------------\\n\");\r\n for(int i=0;i<3;i++){\r\n for(int j=0;j<6;j++){\r\n System.out.printf(\"%s\\t\",mmedio[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n case 3:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t5\\t6\\n\");\r\n System.out.printf(\"------------------------------------------------------------------------\\n\");\r\n for(int i=0;i<4;i++){\r\n for(int j=0;j<7;j++){\r\n System.out.printf(\"%s\\t\",mdificil[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n }\r\n }", "public String toString() {\n String res = \"\";\n \n for ( int[] row : img ) {\n for ( int x : row )\n res += x + \" \";\n res += \"\\n\";\n }\n return res;\n }", "public String toString(){\n\t\treturn \"(\" + width + \" , \" + height + \")\" ;\n\t}", "private static String m21386a(int i) {\n StringBuilder sb = new StringBuilder();\n sb.append(i & 255);\n String str = \".\";\n sb.append(str);\n sb.append((i >> 8) & 255);\n sb.append(str);\n sb.append((i >> 16) & 255);\n sb.append(str);\n sb.append((i >> 24) & 255);\n return sb.toString();\n }", "public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }", "@Override\r\n\tpublic int getImage() {\n\t\treturn Parametre.BALLE;\r\n\t}", "public String getPixelInfo()\n {\n return pixelInfo.toString();\n }", "public String toString() {\n // Replace the following line with your solution.\n\t String result=\"Run Length Encoding for Image:\"+getWidth()+\" by \"+getHeight()+\"\\n\";\n\t DListNode<int[]> node=runs.getFirst();\n\t \n\t \n\t for (int i=1;i<=runs.length();i++) {\n\t\t System.out.print(i);\n\t\t result +=\"(\";\n\t\t result+=node.item[0]+\" , \"+node.item[1]+\" , \"+node.item[2]+\" , \"+node.item[3];\n\t\t result+=\")\";\n\t\t\tresult+=\"\\n\";\n\t\t\t\tnode=node.next;\n\t\t\t}\n\t \n\t \n return result;\n }", "public int getImage();", "void showBits(long val) {\r\n\t\tlong mask = 1;\r\n\t\t\r\n\t\t// left- shift a 1 into the proper position\r\n\t\tmask <<= numBits-1;\r\n\t\t\r\n\t\tint spacer = 8 - (numBits % 8);\r\n\t\tfor (; mask != 0; mask >>>=1) {\r\n\t\t\tif((val & mask)!=0)System.out.print(\"1\");\r\n\t\t\telse System.out.print(\"0\");\r\n\t\t\t\r\n\t\t\tspacer++;\r\n\t\t\t\r\n\t\t\tif((spacer % 8) ==0) {\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tspacer = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "Bitmap mo27481a(String str);", "public void printOdd1To255(){\n StringBuilder out = new StringBuilder();\n for(int i = 1; i <= 255; i++){\n if(i % 2 != 0){\n out.append( i + \" \");\n }\n }\n System.out.println( out );\n }", "private void showBitmap() {\n Bitmap bitmap = BitmapFactory.decodeByteArray(mImgData, 0, mImgData.length);\n mImgView.setImageBitmap(bitmap);\n }", "private static String drawNumbers(ArrayList<String>[] lcdNumbers,int size){\n\t\tint columnas=size+2; \n\t\tint filas=2*size+3;\n\t\tString ret=\"\";\n\t\tint tamanio=lcdNumbers.length;\n\t\tint k = 0; \n\t\twhile ( k < filas ) {\n\n\t\t\tint i = 0; \n\t\t\tint j=k*(size+2);\n\t\t\twhile ( i < tamanio ) {\n\t\t\t\twhile (j < columnas ) {\n\t\t\t\t\tret+=lcdNumbers[i].get(j)+\"\";\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tret+=\" \";\n\t\t\t\ti++;\n\t\t\t\tj=k*(size+2);\n\t\t\t}\n\t\t\tk++;\n\t\t\tj=k*(size+2);\n\t\t\tcolumnas+=(size+2);\n\t\t\tret+=\"\\n\";\n\t\t}\n\t\treturn ret;\n\t}", "void mo27482a(String str, Bitmap bitmap);", "@Override\n public String exportImage() throws IllegalArgumentException {\n BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n for (int x = 0; x < this.width; x++) {\n for (int y = 0; y < this.height; y++) {\n int r = this.pixels[x][y][0];\n int g = this.pixels[x][y][1];\n int b = this.pixels[x][y][2];\n int color = (r << 16) | (g << 8) | b;\n img.setRGB(x, y, color);\n }\n }\n return exportHelp(img);\n }", "void draw() {\n\n // SeamInfo lowestSeam = this.lowestSeamVert();\n // lowestSeam.changeColor();\n\n ComputedPixelImage seamRemovedImg = new ComputedPixelImage(this.newImg.width,\n this.newImg.height);\n int countRow = 0;\n int countCol = 0;\n\n Pixel current = this.curPixel;\n Pixel temp;\n\n while (current.down != null) {\n temp = current.down;\n while (current.right != null) {\n Color c = Color.MAGENTA;\n if (current.highlighted) {\n c = Color.RED;\n }\n else {\n c = current.color;\n }\n if (this.showType.equals(\"e\")) {\n int energy = (int) (current.energy * 100);\n if (energy > 255) {\n System.out.println(\"energy: \" + energy + \" to 255\");\n energy = 255;\n }\n c = new Color(energy, energy, energy);\n }\n else if (this.showType.equals(\"w\")) {\n int weight = (int) (current.seam.totalWeight);\n if (weight > 255) {\n System.out.println(\"weight: \" + weight + \" to 255\");\n weight = 255;\n }\n c = new Color(weight, weight, weight);\n }\n\n seamRemovedImg.setColorAt(countCol, countRow, c);\n countCol += 1;\n current = current.right;\n }\n countCol = 0;\n countRow += 1;\n current = temp;\n }\n countCol = 0;\n\n this.newImg = seamRemovedImg;\n\n }", "int getBitsPerPixel();", "public static void main(String[] args) {\n int[][] bn = new int[127][];\n \n for(int i = 1; i <128; i++)\n {\n int m = (int) (Math.log10(i)/Math.log10(2));\n \n int l = i, j = 2*m; int[] b = new int[2*m+1]; \n \n while(l >= 1)\n {\n int k = l;\n l = l/2;\n \n b[j] = k - l*2; j--;\n }\n \n bn[i-1] = b;\n }\n \n /*int[] ds = new int[255*255*8];*/ int[] df = new int[14]; Arrays.fill(df, 0);\n //int l = 0;\n \n for(int i = 0; i <127; i++)\n {\n for(int j = 0; j<127; j++)\n {\n int k, d = 0;\n for(k = 0; k < bn[i].length; k++)\n { \n if(bn[i][k] == 0)\n {\n d++;\n }\n else if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n \n for(k = 0; k < bn[j].length; k++)\n {\n if(bn[j][k] == 0)\n {\n d++;\n }\n else if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n \n if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n }\n double sum = sum(df); int[] numb = {1,3,3,5,5,5,5,7,7,7,7,7,7,7,7}; int tb = 0;\n \n for(int i = 0; i < 14; i++)\n {\n tb = tb + (int)((df[i]*100/sum) + 0.5)*numb[i];\n \n System.out.print((int)((df[i]*100/sum) + 0.5)+\",\");\n }\n System.out.println();\n System.out.println(tb);\n }", "public void show() {\n\t\tImageJFunctions.show( imageFloat );\t\t\n\t}", "public void init241()\n {\n\t \twidth= p2[21]<<24 | p2[20]<<16 | p2[19]<<8 | p2[18];\n\n\n\n\t\theight= p2[25]<<24 | p2[24]<<16 | p2[23]<<8 | p2[22];\n\n\n\t\tint extra=(width*3)%4;\n \tif(extra!=0)\n \tpadding=4-extra;\n int x,z=54;\n l=0;\n int j=0;\n i=0;\n for(int q=0;q<height;q++)\n {\n x=0;\n \t while(x<width)\n \t{\n \t b=p2[z]&0xff;\n binary[j++]=b&0x01;\n g=p2[z+1]&0xff;\n binary[j++]=g&0x01;\n \t r=p2[z+2]&0xff;\n binary[j++]=r&0x01;\n \t pix[l]= 255<<24 | r<<16 | g<<8 | b;\n z=z+3;\n x++;\n \t l++;\n }\n z=z+padding;\n }\n int k;\n x=0;\n stringcon();\n\n\n\tfor(i=l-width;i>=0;i=i-width)\n\t{\n\t\tfor(k=0;k<width;k++)\n\t\t{\n\t\tpixels[x]=pix[i+k];\n// pixels1[x]=pix[i+k];\n\t\tx++;\n\t\t}\n\t}\n}", "public void printNumbersAndSum(){\n int sum = 0;\n for(int i = 0; i <= 255; i++){\n sum += i;\n System.out.println( \"New number: \" + i + \" Sum: \" + sum);\n }\n\n }", "public void act() \n {\n setImage(new GreenfootImage(\"== Total Pembayaran ==\",50,Color.yellow,Color.black));\n }", "public static void main(String[] args) {\n\t\tint n=2;\n\t\tArrayList arr=grayCode(n);\n\t\tfor(int i=0;i<arr.size();i++) {\n\t\t\tSystem.out.println(arr.get(i));\n\t\t}\n\n\t}", "static void MichelMethod() {\n String CSI = \"\\u001B[\";\n System.out.print(CSI + \"32\" + \"m\");\n\n System.out.println(\"This is the group U calculator.\");\n System.out.println(\"Thanks for your preference!\");\n System.out.println(CSI + \"m\");\n\n }", "public PixImage toPixImage() {\n // Replace the following line with your solution.\n\t PixImage image=new PixImage(getWidth(),getHeight());\n\t \n\t DList<int[]> runs_new=new DList<int[]>();\n\t\t\t for(RunIterator i=this.iterator();i.hasNext();) {\n\t\t\t int[] run = i.next();\n\t\t\t for (int t= 0; t < run[0]; t++) {\n\t\t\t \t runs_new.addLast(run);\n\t\t\t System.out.print(\"(\" + run[1]+\" \"+ run[2]+\" \"+run[3]+\")\");\n\t\t } \n\t }\t\n int position=1;\n for(int j=0;j<height;j++) {\n\t for(int i=0;i<width;i++) {\n\t\t\n\t\t DListNode<int[]> run_new=runs_new.nth(position);\n\t\t position++;\n\t\t \n\t\t image.setPixel(i, j, (short) run_new.item[1], (short) run_new.item[2], (short) run_new.item[3]);\n\t }\n }\n\t\t \n\t\t \n\t return image;\n }", "private void getnumber_Fourgroup6_xuan_big() {\n\t\tbtn_Fourgroup6_xuan_0.setBackgroundResource(R.drawable.round);\r\n\t\ttext_Fourgroup6_xuan_0.setTextColor(0xffdedede);\r\n\t\tbtn_Fourgroup6_xuan_1.setBackgroundResource(R.drawable.round);\r\n\t\ttext_Fourgroup6_xuan_1.setTextColor(0xffdedede);\r\n\t\tbtn_Fourgroup6_xuan_2.setBackgroundResource(R.drawable.round);\r\n\t\ttext_Fourgroup6_xuan_2.setTextColor(0xffdedede);\r\n\t\tbtn_Fourgroup6_xuan_3.setBackgroundResource(R.drawable.round);\r\n\t\ttext_Fourgroup6_xuan_3.setTextColor(0xffdedede);\r\n\t\tbtn_Fourgroup6_xuan_4.setBackgroundResource(R.drawable.round);\r\n\t\ttext_Fourgroup6_xuan_4.setTextColor(0xffdedede);\r\n\t\tbtn_Fourgroup6_xuan_5.setBackgroundResource(R.drawable.big_num_on);\r\n\t\ttext_Fourgroup6_xuan_5.setTextColor(0xffffffff);\r\n\t\tbtn_Fourgroup6_xuan_6.setBackgroundResource(R.drawable.big_num_on);\r\n\t\ttext_Fourgroup6_xuan_6.setTextColor(0xffffffff);\r\n\t\tbtn_Fourgroup6_xuan_7.setBackgroundResource(R.drawable.big_num_on);\r\n\t\ttext_Fourgroup6_xuan_7.setTextColor(0xffffffff);\r\n\t\tbtn_Fourgroup6_xuan_8.setBackgroundResource(R.drawable.big_num_on);\r\n\t\ttext_Fourgroup6_xuan_8.setTextColor(0xffffffff);\r\n\t\tbtn_Fourgroup6_xuan_9.setBackgroundResource(R.drawable.big_num_on);\r\n\t\ttext_Fourgroup6_xuan_9.setTextColor(0xffffffff);\r\n\t\tmyriabit[5] = \"1\";\r\n\t\tmyriabit[6] = \"1\";\r\n\t\tmyriabit[7] = \"1\";\r\n\t\tmyriabit[8] = \"1\";\r\n\t\tmyriabit[9] = \"1\";\r\n\t\tmyriabit[0] = \"0\";\r\n\t\tmyriabit[1] = \"0\";\r\n\t\tmyriabit[2] = \"0\";\r\n\t\tmyriabit[3] = \"0\";\r\n\t\tmyriabit[4] = \"0\";\r\n\r\n\t\tbtn_Fourgroup6_xuan_0_int = 1;\r\n\t\tbtn_Fourgroup6_xuan_1_int = 1;\r\n\t\tbtn_Fourgroup6_xuan_2_int = 1;\r\n\t\tbtn_Fourgroup6_xuan_3_int = 1;\r\n\t\tbtn_Fourgroup6_xuan_4_int = 1;\r\n\t\tbtn_Fourgroup6_xuan_5_int = -1;\r\n\t\tbtn_Fourgroup6_xuan_6_int = -1;\r\n\t\tbtn_Fourgroup6_xuan_7_int = -1;\r\n\t\tbtn_Fourgroup6_xuan_8_int = -1;\r\n\t\tbtn_Fourgroup6_xuan_9_int = -1;\r\n\t\tshow(myriabit);\r\n\t}", "@Override\n\tpublic void show() {\n\t\tfor (int i = 0; i < cache.length; i++) {\n\t\t\tSystem.out.println(\"####\\tWay \"+i+\"\\t####\");\n\t\t\tcache[i].show(qtdLinha/qtdConjunto*i);\n\t\t}\n\t\tmemoria.show();\n\t}", "public static void main(String[] args) {\n for(int count = 1 ; count <=3 ; ++count) {\n \tSystem.out.print(count+\"★★★★\");//요자리 요거 대신에 13~15행의 내용??\n \tSystem.out.println();\n \t\n }\n\t\t\n for( int col = 1; col <=4 ; col++ ) {\n\t\t\tSystem.out.print('★');\n\t\t\t\n \n }\t\n System.out.println(\"///////////\");\n \n for(int count = 1 ; count <=3 ; ++count) {\n \tfor(int col = 1 ; count <=4 ; col++) {\n \t\tSystem.out.print('★');\n }\n \tSystem.out.println();\n \t\n }\n}", "public void oneToTwoFiftyFive() {\n for (int i = 1; i<=255; i++) {\n System.out.print(i + \"\\n\");\n }\n }", "public static void show(int[][][] pic) {\n\t\tStdDraw.setCanvasSize(pic[0].length, pic.length);\n\t\tint height = pic.length;\n\t\tint width = pic[0].length;\n\t\tStdDraw.setXscale(0, width);\n\t\tStdDraw.setYscale(0, height);\n\t\tStdDraw.show(30);\n\t\tfor (int i = 0; i < height; i++) {\n\t\t\tfor (int j = 0; j < width; j++) {\n\t\t\t\tStdDraw.setPenColor(pic[i][j][0], pic[i][j][1], pic[i][j][2]);\n\t\t\t\tStdDraw.filledRectangle(j + 0.5, height - i - 0.5, 0.5, 0.5);\n\t\t\t}\n\t\t}\n\t\tStdDraw.show();\n\t}", "public String toString()\n {\n String output = \"Picture, filename \" + getFileName() + \n \" height \" + getHeight() \n + \" width \" + getWidth();\n return output;\n \n }", "public String toString()\n {\n String output = \"Picture, filename \" + getFileName() + \n \" height \" + getHeight() \n + \" width \" + getWidth();\n return output;\n \n }", "public void print()\n {\n System.out.println();\n for (int i = 0; i < 6; i++) {\n for (int j = 0; j < 6; j++) {\n int index=0;\n if(j>2)\n index++;\n if(i>2)\n index+=2;\n char c='○';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Black)\n c='B';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Red)\n c='R';\n System.out.print(c+\" \");\n if(j==2)\n System.out.print(\"| \");\n }\n System.out.println();\n if(i==2)\n System.out.println(\"-------------\");\n }\n }", "private void printScreen(byte[] screen, int width)\n\t{\n int w = width / 8;\n int ctr = 0;\n \n for (int i=0; i<screen.length; i++)\n {\n for (int j=0; j<8; j++)\n {\n if ((screen[i] & 1<<j) != 0)\n System.out.print(\"1\");\n else\n System.out.print(\"0\");\n }\n \n System.out.print(\",\");\n ctr++;\n \n if (ctr == w)\n {\n System.out.println();\n \tctr = 0;\n }\n }\n }", "public String toString() {\n String s = \"\";\n for(int i = 1; i <= rows; i++){\n for(int j = 1; j <= cols; j++){ \n s = s + String.format(\"%2d\",m[i][j]) + \" \";\n }\n s += \"\\n\";\n }\n return s;\n }", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public static BufferedImage makePPM(byte[] aux) {\n int w = 0, h = 0;\n boolean fin = true;\n\n char[] iaux = new char[aux.length];\n for (int j = 0; j < aux.length; j++) {\n iaux[j] = (char) (aux[j] & 0xFF);\n }\n\n for (int i = 3; iaux[i] != '\\n'; ++i) {\n if (iaux[i] == ' ') fin = false;\n else {\n if (fin) {\n int a = Character.getNumericValue(iaux[i]);\n w *= 10;\n w += a;\n } else {\n int a = Character.getNumericValue(iaux[i]);\n h *= 10;\n h += a;\n }\n }\n }\n\n BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);\n int r, g, b, k = 0, pixel;\n for (int y = 0; y < h; y++) {\n for (int x = 0; (x < w) && ((k + 3) < aux.length); x++) {\n r = aux[k++] & 0xFF;\n g = aux[k++] & 0xFF;\n b = aux[k++] & 0xFF;\n pixel = 0xFF000000 + (r << 16) + (g << 8) + b;\n image.setRGB(x, y, pixel);\n }\n }\n\n return image;\n }", "public void m2261I() {\n try {\n if (this.f2513n != null) {\n this.f2513n.setImageDrawable(C5150d.m3784a(mo61159b().getResources(), \"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA39pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDozODRkZTAxYi00OWRkLWM4NDYtYThkNC0wZWRiMDMwYTZlODAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QkE0Q0U2MUY2QzA0MTFFNUE3MkJGQjQ1MTkzOEYxQUUiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QkE0Q0U2MUU2QzA0MTFFNUE3MkJGQjQ1MTkzOEYxQUUiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjlkZjAyMGU0LTNlYmUtZTY0ZC04YjRiLWM5ZWY4MTU4ZjFhYyIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOmU1MzEzNDdlLTZjMDEtMTFlNS1hZGZlLThmMTBjZWYxMGRiZSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PngNsEEAAANeSURBVHjatFfNS1tBEH+pUZOQ0B4i3sTSxHMRFNQoFBEP7dHgvyDiKWgguQra9F+oxqNiwOTQ+oFI1ZM3jSf1YK5FL41ooaKZzu+x+4gv2bx9Rgd+JNn5zO7s7IzH0CQiCvLHZ8YnxkfGe8ZbwS4zSowTxi/GT4/Hc2u8BLHjCOM745b06VboRJpx7GN8ZfyDxUqlQgcHB5RMJmloaIg6Ozupra3NBL5jDTzIQFYQdDOw5db5B8YxLDw+PtLKygr19PQQWDqIRqOUzWZNXUHH2rvBgr2M39C6uLig/v5+bcd2QLdUKskgYLNX57yvIL2zs0OhUOjZziU6Ojro8PBQBnGl3Alm+BknkMI54mybdS4BW3t7ezKIInzVCwDJYm4Zon4p5xLYzfPzcxlEpl7S3SNpmjlznZwQiXn/5CjEnTUzt5GBsbExamlpUfLBg0wjG8vLy3IXlqTzEAoH7m4kElEqTk1Nmfd7bW2tbhBYAw8ykFXZgQ9RJ1CsQghgEr/29/eVStPT09XFhdbX18nr9Vr81tZWyuVyFh+yMzMzSnvwJWjyDS+MYic2NzeV17O7u9vg2m79jsfjBv9bg7PbxOrqqjExMWHxIdvV1aW0V+VrFDtwhFCGh4cbnl0mk6kp+BsbGybsBNlGtkZGRqToEQK4xjfUc6csXlhYcHyFFhcXHe3Al6BrQz427e3tWldpfn5e6Rw83cIkHyvXAUAZb4SdsKZbPe0BaB+Bz+cjTiDlDmxtbZkybo9AKwn9fj9tb2875gBkINvIFnzJJMQ1PMV9GBgYUF6bQCBgFAoFY3x8/Ml6KpUy0un0kzXIQBY6KqrydapViPL5fM0/Rfcj+fhuJw5CqxBpleJYLEY3NzeW8dnZ2RoZrEmCLHQcSvGdWYrFe7CEFTwUqqjR85XLZUokEkoZ8CADWe3HqKoTcnyOdW5KI5m+vj56eHiQz3G0bkNyeXn5ag3J2dmZ/PffVC1Z8bVast3d3eqWLKDVlAaDwaadh8Nhvaa0XluOHg7n9lzn0MWRarfltp0oysEErRqGDTeDCbK9ajApuh7TxGiWERlrjWZzc3M0ODhYM5phDTzbaHb/rNHMFkhUNK13LobTv6K2RJ3se1yO519s4/k7wf5jG89/6I7n/wUYAGo3YtcprD4sAAAAAElFTkSuQmCC\"));\n this.f2513n.setScaleType(ScaleType.FIT_CENTER);\n }\n } catch (Exception e) {\n C5017f.m3256a(mo61159b(), C5015d.EXCEPTION, \"MraidMode.showDefaultCloseButton\", e.getMessage(), \"\");\n }\n }", "public static void main(String[] args){\n\tImage test = new Image(700,700);\n\t//addRectangle(test, 0, 0, 600, 600, -1, -1, -1);\n\t//test.display();\n\taddCircle(test, 300, 300, 100, 255, 255, 255);\n\taddCircle(test, 500, 300, 100, 255, 255, 255);\n\taddCircle(test, 400, 400, 150, 255, 255, 255);\n\taddCircle(test, 350, 350, 25, 0, 0, 0);\n\taddCircle(test, 450, 350, 25, 0, 0, 0);\n\taddCircle(test, 350, 350, 24, 255, 255, 255);\n\taddCircle(test, 450, 350, 24, 255, 255, 255);\n\taddCircle(test, 350, 350, 10, 0, 0, 0);\n\taddCircle(test, 450, 350, 10, 0, 0, 0);\n\taddRectangle(test, 325, 475, 150, 20, 0, 0, 0);\n\ttest.setPixel(0,0,255,255,255);\n\ttest.display();\n\tencrypt(test, \"PerfektDokumentation\");\n\ttest.display();\n\tdecrypt(test, \"PerfektDokumentation\");\n\t\n\ttest.display();\n\t}", "public void mostrar() {\r\n\t\tfor (int i = 0; i < bolsa.length; i++) {\r\n\t\t\tSystem.out.printf(\"#%d: %d\\t\", i, bolsa[i]);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public String toString() {\n StringBuilder s = new StringBuilder();\n s.append(dimension + \"\\n\");\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n s.append(String.format(\"%2d \", (int) blocks[i * dimension + j]));\n }\n s.append(\"\\n\");\n }\n return s.toString();\n }", "private void getWidthandHeight(char[] imagenaux) {\n for (iterator = 3; imagenaux[iterator] != '\\n'; ++iterator) {\n if (imagenaux[iterator] == ' ') anchura = false;\n else {\n if (anchura) {\n int aux = Character.getNumericValue(imagenaux[iterator]);\n width *= 10;\n width += aux;\n } else {\n int aux = Character.getNumericValue(imagenaux[iterator]);\n height *= 10;\n height += aux;\n }\n }\n }\n ++iterator;\n while (imagenaux[iterator] != '\\n') { ++iterator; }\n ++iterator;\n }", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\t\tgc.drawImage(image.get(n), x, y);\n\t\tn++;\n\t\tif (n>=15) n=0;\n\t}", "private void drawStuff() {\n //Toolkit.getDefaultToolkit().sync();\n g = bf.getDrawGraphics();\n bf.show();\n Image background = window.getBackg();\n try {\n g.drawImage(background, 4, 24, this);\n\n for(i=12; i<264; i++) {\n cellKind = matrix[i];\n\n if(cellKind > 0)\n g.drawImage(tile[cellKind], (i%12)*23-3, (i/12)*23+17, this);\n }\n\n drawPiece(piece);\n drawNextPiece(pieceKind2);\n\n g.setColor(Color.WHITE);\n g.drawString(\"\" + (level+1), 303, 259);\n g.drawString(\"\" + score, 303, 339);\n g.drawString(\"\" + lines, 303, 429);\n\n } finally {bf.show(); g.dispose();}\n }", "public final Bitmap mo15606a(Integer num) {\n return (Bitmap) this.f13510a.get(num);\n }", "public static void main(String[] args) throws IOException {\n\t\tInputStream in = new FileInputStream(\"bitmap.inp\");\r\n\t\t//Scanner sc = new Scanner(in);\r\n\t\t\r\n\t\tFileWriter fw = new FileWriter(\"bitmap.out\");\r\n\t\tPrintWriter pw = new PrintWriter(fw);\r\n\r\n\t\tchar type;\r\n\t int numRows, numCols;\r\n\t \r\n\t type=(char) in.read();\r\n\t System.out.println(type);\r\n\t in.read();\r\n\t numRows=in.read()-48;\r\n\t System.out.println(numRows);\r\n\t in.read();\r\n\t numCols=in.read()-48;\r\n\t System.out.println(numCols);\r\n\t}", "public String toDebugString() {\n\t\tString ans =\n\t\t\t\t\" EWAHCompressedBitmap, size in bits = \" + this.sizeinbits\n\t\t\t\t\t\t+ \" size in words = \" + this.actualsizeinwords\n\t\t\t\t\t\t+ \" with last RLW \" + this.rlw.toString() + \"\\n\";\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\twhile (i.hasNext()) {\n\t\t\tRunningLengthWord localrlw = i.next();\n\t\t\tans += localrlw.position + \": \";\n\t\t\tif (localrlw.getRunningBit()) {\n\t\t\t\tans += localrlw.getRunningLength() + \" 1x11\\n\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans += localrlw.getRunningLength() + \" 0x00\\n\";\n\t\t\t}\n\t\t\tlong header = i.buffer()[i.rlw.position];\n\t\t\tans += \"\\t\" + longToBitString(header) + \"\\n\";\n\t\t\tans += localrlw.getNumberOfLiteralWords() + \" dirties\\n\";\n\t\t\tfor (int j = 0; j < localrlw.getNumberOfLiteralWords(); ++j) {\n\t\t\t\tlong data = i.buffer()[i.dirtyWords() + j];\n\t\t\t\tans += \"\\t\" + longToBitString(data) + \"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}", "public void display() {\n\t\tSystem.out.println(\" ---------------------------------------\");\n\t\t\n\t\tfor (byte r = (byte) (b.length - 1); r >= 0; r--) {\n\t\t\tSystem.out.print(r + 1);\n\t\t\t\n\t\t\tfor (byte c = 0; c < b[r].length; c++) {\n\t\t\t\tSystem.out.print(\" | \" + b[r][c]);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\" |\");\n\t\t\tSystem.out.println(\" ---------------------------------------\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" a b c d e f g h\");\n\t}", "private int m128366a() {\n String c = C40173d.m128358c();\n if (!new File(c).exists()) {\n new File(c).mkdirs();\n }\n for (MediaModel mediaModel : this.f104446a) {\n String str = mediaModel.f88156b;\n C7573i.m23582a((Object) str, \"model.filePath\");\n if (C40173d.m128357b(str)) {\n Bitmap a = C40168a.f104413a.mo99928a(mediaModel.f88156b, 720, 1280);\n if (a != null) {\n StringBuilder sb = new StringBuilder();\n sb.append(c);\n sb.append(C40173d.m128354a(\".png\"));\n String sb2 = sb.toString();\n C42341f.m134636a(a, new File(sb2), 50, CompressFormat.PNG);\n C40168a.m128334a(a);\n mediaModel.f88156b = sb2;\n }\n }\n }\n return 0;\n }", "public String mo1286b(Bitmap bitmap) {\n return C3039h.m11982b(C0987h.m3406a(bitmap), bitmap.getConfig());\n }", "public Display(){\n GridLayout layout = new GridLayout(1,DIGIT_COUNT);\n setLayout(layout);\n for (int i = 0; i < labels.length; i++) {\n labels[i] = new JLabel();\n labels[i].setIcon(numbers[0]);\n add(labels[i]);\n }\n\n setNumber(0);\n }", "public static void main(String args[]) {\n\t\tint[][][] pic = read(\"tinypic.ppm\"); \n\t\tSystem.out.println(\"Standart pic \\n\"); // For a clean code\n\t\t// Displays the array's data on standard output\n\t\tprint(pic);\n\n\t\tSystem.out.println(\"flipHorizontally pic \\n\");\n\t\tprint(flipHorizontally(pic));\n\n\t\tSystem.out.println(\"flipVertically pic \\n\");\n\t\tprint(flipVertically(pic));\n\n\t\tSystem.out.println(\"greyScale pic \\n\");\n\t\tprint(greyScale(pic));\n\n\t}", "private final void m119128e() {\n String image = ((OtherContentModel) mo108896M()).getImage();\n if (image == null || image.length() == 0) {\n this.f85358a.setVisibility(8);\n return;\n }\n C24380s.m119258a(this.f85359b, ((OtherContentModel) mo108896M()).getImage(), C24380s.m119245a(60, (Context) null, 1, (Object) null), (int) (((float) C24380s.m119245a(60, (Context) null, 1, (Object) null)) / ((OtherContentModel) mo108896M()).getImageRatio()));\n C24380s.m119258a(this.f85360c, ((OtherContentModel) mo108896M()).getLeftTopImage(), (int) (((float) C24380s.m119245a(17, (Context) null, 1, (Object) null)) * ((OtherContentModel) mo108896M()).getLeftTopRatio()), C24380s.m119245a(17, (Context) null, 1, (Object) null));\n C24380s.m119258a(this.f85361d, ((OtherContentModel) mo108896M()).getRightBottomImage(), (int) (((float) C24380s.m119245a(15, (Context) null, 1, (Object) null)) * ((OtherContentModel) mo108896M()).getRightBottomRatio()), C24380s.m119245a(15, (Context) null, 1, (Object) null));\n this.f85358a.setVisibility(0);\n }", "private void displayProcessedImage(Measurement measurement) {\n DecimalFormat df = new DecimalFormat(\"#0.000\");\n String pupilL_str = df.format(measurement.getPupilLeft()) + \"mm\";\n String pupilR_str = df.format(measurement.getPupilRight()) + \"mm\";\n String diff_str = df.format(measurement.getDifference()) + \"mm\";\n double difference = measurement.getDifference();\n String filepath = measurement.getFilepath();\n Bitmap imgBitmap = translateImgToBitmap(filepath);\n\n textLeftPupil.setText(pupilL_str);\n textRightPupil.setText(pupilR_str);\n textDifference.setText(diff_str);\n if(imgBitmap != null) resultImg.setImageBitmap(imgBitmap);\n\n if(difference > 0.0f) textResult1.setText(\"L > R\");\n if(difference < 0.0f) textResult1.setText(\"L < R\");\n if(difference == 0.0f) textResult1.setText(\"L = R\");\n\n showLayout(resultLayout);\n }", "public static void main(String[] args){\n float w = 11.56E2f;\n int hh = (int)w;\n System.out.println(hh);\n \n System.out.println((int)11.56);\n int cents = (int)(11.56 * 100);\n System.out.println(cents);\n System.out.println(4/7.0);\n System.out.println(Math.random());\n \n System.out.println(Toolkit.getDefaultToolkit().getScreenSize());\n int width=1366,height=768;\n Toolkit.getDefaultToolkit().getScreenSize();\n System.out.println(\"Loop to print first 10 numbers\");\n \n int [] number = {1,2,3,4,5,6,7,8,9,10};\n int total = 0;\n for(int n:number){\n total = total + n;\n }\n System.out.println(total);\n\n System.out.println(\"Loop to print first 10 numbers without arrays\");\n int counter = 0;\n for(int i = 0; i<=10; i++){\n counter = counter + i;\n }\n System.out.println(counter);\n }", "public void cbMohexShowRollout()\n {\n \tif (!m_white.wasSuccess()) \n \t return;\n \n \tString str = m_white.getResponse();\n Vector<Pair<String, String> > pairs = \n StringUtils.parseStringPairList(str);\n \n m_guiboard.clearMarks();\n m_guiboard.aboutToDirtyStones();\n \n HexPoint p = HexPoint.get(pairs.get(0).first);\n HexColor color = HexColor.get(pairs.get(0).second);\n m_guiboard.setColor(p, color);\n m_guiboard.setAlphaColor(p, Color.blue);\n \n for (int i=1; i<pairs.size(); i++) {\n \t HexPoint point = HexPoint.get(pairs.get(i).first);\n String value = pairs.get(i).second;\n if (value.equals(\"#\"))\n m_guiboard.setAlphaColor(point, Color.green);\n else\n m_guiboard.setAlphaColor(point, Color.red);\n \n m_guiboard.setText(point, Integer.toString(i));\n \n color = color.otherColor();\n m_guiboard.setColor(point, color);\n \t}\n \tm_guiboard.repaint();\n \n }", "String getImage();", "public void print() {\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tSystem.out.printf(\"%3d \", valueAt(i, j));\n\t\t\t}\n\t\t\tSystem.out.printf(\"\\n\");\n\t\t}\n\t\tSystem.out.printf(\"\\n\");\t\n\t}", "public String toString() {\r\n if(this.getImag() < 0)\r\n return String.format(\"%.1f - %.1fi\", this.getReal(), this.getImag() * -1); // imaginary to positive for output only\r\n return String.format(\"%.1f + %.1fi\", this.getReal(), this.getImag());\r\n }", "public static void main(String[] args) \n\t{\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME );\n\t\tMatToBufferedImage M2B = new MatToBufferedImage();\n \tMat mat = Highgui.imread(\"C:\\\\Users\\\\Dell\\\\Desktop\\\\Projects\\\\OpenCV\\\\image6.png\",Highgui.CV_LOAD_IMAGE_COLOR);\n \tMat newMat = new Mat(mat.rows(), mat.cols(), mat.type());\n \tmat.convertTo(mat, CvType.CV_64FC3); //CV_64FC3 it can use double[] instead of byte[] \n \t//Mat newMat = mat.clone();\n \n \t//byte buff[] = new byte[(int) (mat.total() * mat.channels())];\n \tdouble buff[] = new double[(int) (mat.total() * mat.channels())];\n \n\t\tdouble alpha = 2.2;\n \tint beta = 50; \n \n \tSystem.out.println(mat.type());\n \n \tmat.get(0, 0, buff);\n \n \tImageShow imshow = new ImageShow(M2B.getBufferedImage(mat));\n \n \tfor( int i = 0; i<buff.length; i++)\n \t{\n \t\tbuff[i] = (alpha*buff[i]+beta);\n \t}\n \n \tnewMat.put(0, 0, buff);\n \n\t\tImageShow imshow1 = new ImageShow(M2B.getBufferedImage(newMat));\n \n\n\t}", "private static final byte[] xfplot_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -60, 16, 0, -65,\n\t\t\t\t3, 28, -1, 0, 21, -1, 0, 68, 0, 0, 0, -1, 0, 114, -1, 0, -70,\n\t\t\t\t-18, 0, -1, -1, 0, -27, -52, 0, -1, -78, 0, -1, -121, 0, -1,\n\t\t\t\t59, 0, -1, 93, 0, -1, 0, -112, -1, 0, 102, -1, -1, -1, -1, -1,\n\t\t\t\t-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 0, 0, 0, 33, -7, 4, 1, 0, 0, 16, 0, 44, 0, 0, 0, 0,\n\t\t\t\t16, 0, 16, 0, 0, 5, 103, 32, 36, -114, 16, 0, -112, 40, 25,\n\t\t\t\t-84, 65, -102, 10, -80, -112, 14, 36, 97, -33, 40, 61, 22,\n\t\t\t\t-123, -51, -25, 35, -61, -31, -64, 27, 26, 72, 58, 8, -62, 32,\n\t\t\t\t60, 48, 17, 72, 81, 2, 65, 125, 82, 19, 35, 93, 98, 75, -67,\n\t\t\t\t110, -77, 16, -123, 88, -79, -35, -114, 21, -94, -63, -126,\n\t\t\t\t-63, 62, -117, -39, -116, 5, -92, -31, 120, -40, -31, 112, -5,\n\t\t\t\t-61, -47, -128, 12, 6, 122, 11, -126, 11, 122, 127, 72, -128,\n\t\t\t\t15, -126, 118, -122, 46, 127, 14, 14, -116, 46, 35, 13, 125,\n\t\t\t\t41, 33, 0, 59 };\n\t\treturn data;\n\t}", "public Image getEtat() {\n final BufferedImage image = new BufferedImage(GUIModel.SCREEN_SIZE.width / 4, GUIModel.SCREEN_SIZE.height / 6, BufferedImage.TYPE_INT_ARGB);\n final Graphics2D g = image.createGraphics();\n g.setColor(Color.black);\n //g.drawRect(0, 0, image.getWidth(), image.getHeight());\n g.drawString(\"Age : \" + tamagoStats.getAge(), 0, 10);\n g.drawString(\"Faim : \" + tamagoStats.getFaim() + \"/\" + TamagoStats.FAIM_MAX, 0, 30);\n g.drawString(\"Fatigue : \" + tamagoStats.getFatigue() + \"/\" + TamagoStats.FATIGUE_MAX, 0, 50);\n g.drawString(\"Humeur : \" + tamagoStats.getHumeur() + \"/\" + TamagoStats.HUMEUR_MAX, 100, 10);\n g.drawString(\"Poids : \" + tamagoStats.getPoids() + \"/\" + TamagoStats.HUMEUR_MAX, 100, 30);\n g.drawString(\"Saleté : \" + tamagoStats.getSale() + \"/\" + TamagoStats.SALE_MAX, 100, 50);\n g.drawString(\"*Retour*\", 50, 70);\n g.dispose();\n return image;\n }", "public void flip()throws IOException{\n String input = j.showInputDialog(\"Choose a file to use:\");\n Scanner ab = new Scanner(new File(input+\".ppm\"));\n input = j.showInputDialog(\"Choose a name for the new file:\");\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(input+\".ppm\")));\n input = j.showInputDialog(\"Flip: (1)Horizontal (2)Vertical (3)Both\");\n out.println(ab.next());\n int height=Integer.parseInt(ab.next());\n int width=Integer.parseInt(ab.next());\n out.println(height);out.println(width);\n out.println(ab.next());\n int asd[][][]=new int[width][height][3];\n for(int x=0;x<width;x++){\n for(int y=0;y<height;y++){\n for(int rgb=0;rgb<3;rgb++){\n String ass=ab.next();\n asd[x][y][rgb]= Integer.parseInt(ass);\n }\n }\n }\n if(Integer.parseInt(input)==1){\n for(int x=0;x<width;x++){\n for(int y=height-1;y>=0;y--){\n for(int rgb=0;rgb<3;rgb++){\n out.print(\" \"+asd[x][y][rgb]+\" \");\n }\n }\n }\n }\n else if(Integer.parseInt(input)==2){\n for(int x=width-1;x>=0;x--){\n for(int y=0;y<height;y++){\n for(int rgb=0;rgb<3;rgb++){\n out.print(\" \"+asd[x][y][rgb]+\" \");\n }\n }\n }\n }else{\n for(int x=width-1;x>=0;x--){\n for(int y=height-1;y>=0;y--){\n for(int rgb=0;rgb<3;rgb++){\n out.print(\" \"+asd[x][y][rgb]);\n }\n }\n }\n }\n out.close(); \n ab.close();\n System.exit(0);\n }", "public void rellenaImagen()\n {\n rellenaDatos(\"1\",\"Samsung\", \"cv3\", \"blanco\" , \"50\", 1200,2);\n rellenaDatos(\"2\",\"Samsung\", \"cv5\", \"negro\" , \"30\", 600,5);\n }", "public static void printNumbers() {\n\t\tSystem.out.println(56);\n\t\tSystem.out.println(0b11); // 3 binary\n\t\tSystem.out.println(017); // 15 octal\n\t\tSystem.out.println(0x1F); //31 hexadecimal\n\t}", "public void pixaveGreyscale(int x1, int y1, int x2, int y2) {\n //float sumr,sumg,sumb;\n float sumg;\n int pix;\n //int r,g,b;\n float g;\n int n;\n\n if(x1<0) x1=0;\n if(x2>=kWidth) x2=kWidth-1;\n if(y1<0) y1=0;\n if(y2>=kHeight) y2=kHeight-1;\n\n //sumr=sumg=sumb=0.0;\n sumg = 0.0f;\n for(int y=y1; y<=y2; y++) {\n for(int i=kWidth*y+x1; i<=kWidth*y+x2; i++) {\n \n // old method use depth image\n //pix= kinecter.depthImg.pixels[i];\n //g = pix & 0xFF; // grey\n //sumg += g;\n \n //b=pix & 0xFF; // blue\n // pix = pix >> 8;\n //g=pix & 0xFF; // green\n //pix = pix >> 8;\n //r=pix & 0xFF; // red\n //if( random(0, 150000) > 149000 && r > 0) println(\"r \" + r + \" b \" + b + \" g \" + g);\n // averaging the values\n //sumr += b;//r;//g;//r;\n //sumg += b;//r;//g;\n //sumb += b;//r;//g;//b;\n \n // WORK WITH RAW DEPTH INSTEAD\n sumg += kinecter.rawDepth[i];\n\n \n }\n }\n n = (x2-x1+1)*(y2-y1+1); // number of pixels\n // the results are stored in static variables\n //ar = sumr/n; \n //ag = sumg/n; \n //ab = sumb/n;\n\n ar = sumg/n; \n ag = ar; \n ab = ar;\n }", "public void updateValue (BufferedImage bi)\n {\n String text = bi.getWidth()+ \" x \"+ bi.getHeight();\n GreenfootImage tempTextImage = new GreenfootImage (text, 20, Color.RED, null);\n myImage = new GreenfootImage (tempTextImage.getWidth() + 8, tempTextImage.getHeight() + 8); \n myImage.drawImage (tempTextImage, 4, 4);\n\n setImage(myImage);\n }", "@Test\n void writeToImage() {\n String imagename = \"img\";\n int width = 1600;\n int height = 1000;\n int nx =500;\n int ny =800;\n ImageWriter imageWriter = new ImageWriter(imagename, width, height, nx, ny);\n for (int col = 0; col < ny; col++) {\n for (int row = 0; row < nx; row++) {\n if (col % 10 == 0 || row % 10 == 0) {\n imageWriter.writePixel(row, col, Color.blue);\n }\n }\n }\n imageWriter.writeToImage();\n }", "private void drawPin() {\n\t\tString speedShow = df.format(App.speed);\n\t\tint strWidth;\n\n\t\tAffineTransform restore = g2.getTransform();\n\t\tAffineTransform trans = new AffineTransform();\n\t\ttrans.translate(266, 90);\n\t\ttrans.rotate(Math.toRadians(getPinAngle(App.speed)), 40, 165);\n\t\tg2.setTransform(trans);\n\t\tg2.drawImage(speedoPinWhite, 0, 0, this);\n\t\tg2.setTransform(restore);\n\n\t\t// Draw actual speed\n\t\tg2.setFont(new Font(\"Loma\", Font.BOLD, 30));\n\t\tg2.setColor(Color.BLACK);\n\t\tFontMetrics metrics = g2.getFontMetrics();\n\t\tstrWidth = metrics.stringWidth(speedShow);\n\n\t\tg2.drawString(String.valueOf(speedShow), 306 - strWidth / 2, 265);\n\t}", "public static void main(String[] args) {\n\t\tint A = 255;\n\t\tint R = 10;\n\t\tint G = 200;\n\t\tint B = 31;\n\t\t\n\t\tint ARGB = A<<24|R<<16|G<<8|B;\n\t\t\n\t\tint a,r,g,b;\n\t\ta = (ARGB & 0xff000000)>>>24;\n\t\tr = (ARGB & 0x00ff0000)>>16;\n\t\tg = (ARGB & 0x0000ff00)>>8;\n\t\tb = (ARGB & 0x000000ff);\n\t\t\n\t\tSystem.out.println(\"a=\" +a);\n\t\tSystem.out.println(\"r=\" +r);\n\t\tSystem.out.println(\"b=\" +b);\n\t\tSystem.out.println(\"g=\" +g);\n\t\t\n\t}", "private void displayExp(int disp_nr){\r\n\t\tswitch (disp_nr){\r\n\t\t\tcase 0 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(200,100), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Bei 'Fletcher's Checksum' handelt es sich, wie beim Namen ersichtlich,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"um einen Pruefsummen-Algorithmus zur Erkennung von Datenuebertragungsfehlern.\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"Er ist aehnlich stark wie das CRC-Verfahren,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"hat aber einen teils wesentlich geringeren Rechenaufwand.\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"Wir sehen uns den Algorithmus in 2 Faellen an:\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"- Korrekte uebertragung der Daten\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"- Fehlerhafte uebertragung der Daten\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"Doch zuerst muessen die Pruefsummen selbst berechnet werden.\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"In der urspruenglichen Variante des Algorithmus wird hierfuer der Datenstream\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"in Bytes (8-Bit Bloecke) zerlegt...\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 1 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Nun stehen die zwei Pruefsummen fest.\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Damit aber die Qualitaet von CRC in Sachen Fehlererkennung erreicht wird,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"muessen diese noch einmal verarbeitet werden und zwar wie folgt:\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Diese 2 Werte werden nun an die zu versendende Nachricht drangehaengt\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 3 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Zur Fehlerpruefung muss der Empfaenger nun den Algorithmus erneut\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"auf die empfangene Nachricht, samt Prueffeldern, andwenden\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 4 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Die Pruefsumme (sum1 + sum2) ist 0! Somit kann von einer\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"korrekten uebertragung der Daten ausgegangen werden!\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 5 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Nun ein anderes Szenario: Bei der uebertragung ist ein Fehler \", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"aufgetreten - hier : in Byte #\" + error_position, null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 6 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Wir pruefen erneut wie vorher...\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 7 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Die Pruefsumme ist NICHT 0. Somit weiss der Empfaenger,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"dass ein Fehler aufgetreten ist\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 9 :\r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Es wurden\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"- Beim ersten Errechnen von sum1 und sum2 \"+op_counts[0]+\" Operationen\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"- Beim Pruefen der Nachricht jeweils \"+op_counts[2]+\" Operationen\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"... durchgefuehrt\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Man erkennt, dass die Zeitkomplexitaet ( der Hauptschleife ) bei n*4 liegt\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"wobei n die Laenge der Nachricht ( die zu erweitern oder zu pruefen ist ) in Bytes ist.\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Dies steht im Gegensatz zu - zB. - dem CRC-Verfahren, welches (im schlimmsten Fall) von der Anzahl der einzelnen Bits abhaengt.\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"\",null,0,null);\r\n\t\t\t\texpl.addCodeLine(\"Fazit: Ein einfacher, aber effektiver Algorithmus zur Erkennung\" +\r\n\t\t\t\t\t\t\" von uebertragungsfehlern. Hoffentlich war diese Animation aufschlussreich!\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 10 : \r\n\t\t\t\texpl = lang.newSourceCode(new Coordinates(300,150), \"\", null, expl_props);\r\n\t\t\t\texpl.addCodeLine(\"Die Schwaeche dieses Verfahrens liegt darin, dass es nicht zwischen den Bytes 11111111 und 00000000,\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"bzw. 255 und 0 ( in Dezimal ) unterscheiden kann, weswegen sich die Pruefsummen nicht geaendert und folgich der Fehler\", null, 0, null);\r\n\t\t\t\texpl.addCodeLine(\"leider nicht entdeckt wurde\", null, 0, null);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault : break;\r\n\t\t}\r\n\t\tlang.nextStep();\r\n\t}", "private String m568a(Context context, int i) {\r\n Camera open;\r\n Throwable th;\r\n String str = \"%2$d*%3$d\";\r\n String str2 = bi_常量类.f6358b_空串;\r\n float o = C0163a.m590o(context.getApplicationContext());\r\n Camera camera = null;\r\n try {\r\n open = Camera.open(i);\r\n try {\r\n List<Size> supportedPreviewSizes = open.getParameters().getSupportedPreviewSizes();\r\n Collections.sort(supportedPreviewSizes, new C0162a());\r\n int i2 = 0;\r\n for (Size size : supportedPreviewSizes) {\r\n if (size.width >= 600) {\r\n if ((((double) Math.abs((((float) size.width) / ((float) size.height)) - o)) <= 0.03d ? 1 : null) != null) {\r\n break;\r\n }\r\n }\r\n i2++;\r\n }\r\n String format = ((Size) supportedPreviewSizes.get(i2 == supportedPreviewSizes.size() ? supportedPreviewSizes.size() - 1 : i2)) != null ? String.format(Locale.ENGLISH, str, new Object[]{Integer.valueOf(i), Integer.valueOf(((Size) supportedPreviewSizes.get(i2 == supportedPreviewSizes.size() ? supportedPreviewSizes.size() - 1 : i2)).width), Integer.valueOf(((Size) supportedPreviewSizes.get(i2 == supportedPreviewSizes.size() ? supportedPreviewSizes.size() - 1 : i2)).height)}) : str2;\r\n if (open == null) {\r\n return format;\r\n }\r\n open.release();\r\n return format;\r\n } catch (RuntimeException e) {\r\n camera = open;\r\n if (camera != null) {\r\n camera.release();\r\n return str2;\r\n }\r\n return str2;\r\n } catch (Exception e2) {\r\n if (open != null) {\r\n open.release();\r\n return str2;\r\n }\r\n return str2;\r\n } catch (Throwable th2) {\r\n th = th2;\r\n if (open != null) {\r\n open.release();\r\n }\r\n throw th;\r\n }\r\n } catch (RuntimeException e3) {\r\n if (camera != null) {\r\n camera.release();\r\n return str2;\r\n }\r\n return str2;\r\n } catch (Exception e4) {\r\n open = null;\r\n if (open != null) {\r\n open.release();\r\n return str2;\r\n }\r\n return str2;\r\n } catch (Throwable th3) {\r\n open = null;\r\n th = th3;\r\n if (open != null) {\r\n open.release();\r\n }\r\n throw th;\r\n }\r\n }" ]
[ "0.68133", "0.66618747", "0.65208656", "0.6373298", "0.6201388", "0.60281324", "0.59976375", "0.5977666", "0.5933073", "0.5928426", "0.59178776", "0.58446914", "0.5834491", "0.5825623", "0.5798114", "0.5717477", "0.56035286", "0.5585206", "0.55820537", "0.5565843", "0.55489415", "0.55391765", "0.5534047", "0.5520375", "0.5499655", "0.5497952", "0.54863614", "0.54760486", "0.54688287", "0.5461672", "0.5454882", "0.5454016", "0.5435216", "0.54349136", "0.5413888", "0.5395345", "0.5394957", "0.538781", "0.5387725", "0.5384472", "0.5377191", "0.5374049", "0.5370273", "0.5367763", "0.5367191", "0.53653866", "0.53605217", "0.5339516", "0.5334065", "0.53273517", "0.53226984", "0.53121656", "0.5304852", "0.5303498", "0.5298468", "0.5296575", "0.52852875", "0.52664536", "0.5262327", "0.5255628", "0.5255628", "0.5253205", "0.52445316", "0.52395487", "0.5232989", "0.52284884", "0.5221072", "0.521556", "0.5209243", "0.5204406", "0.51989317", "0.5196969", "0.5192398", "0.51918954", "0.51858026", "0.5184412", "0.51823425", "0.5181393", "0.51801646", "0.5172345", "0.51645064", "0.5164283", "0.5161513", "0.515453", "0.51459616", "0.5143784", "0.5139657", "0.51376903", "0.5136986", "0.5133604", "0.51325035", "0.5125922", "0.5122968", "0.51152146", "0.5113926", "0.5113271", "0.51068527", "0.5105809", "0.51009387", "0.5095196", "0.5094373" ]
0.0
-1
Test a remote grantor
@Test public void testRemoteGrantor() throws Exception { IgnoredException.addIgnoredException("killing members ds"); final CacheTransactionManager txMgr = getCache().getCacheTransactionManager(); final String rgnName = getUniqueName(); Region rgn = getCache().createRegion(rgnName, getRegionAttributes()); rgn.create("key", null); Invoke.invokeInEveryVM(new SerializableRunnable("testRemoteGrantor: initial configuration") { @Override public void run() { try { Region rgn1 = getCache().createRegion(rgnName, getRegionAttributes()); rgn1.put("key", "val0"); } catch (CacheException e) { Assert.fail("While creating region", e); } } }); Host host = Host.getHost(0); VM vm0 = host.getVM(0); // VM vm1 = host.getVM(1); // VM vm2 = host.getVM(2); vm0.invoke(new SerializableRunnable("testRemoteGrantor: remote grantor init") { @Override public void run() { try { Region rgn1 = getCache().getRegion(rgnName); final CacheTransactionManager txMgr2 = getCache().getCacheTransactionManager(); txMgr2.begin(); rgn1.put("key", "val1"); txMgr2.commit(); assertNotNull(TXLockService.getDTLS()); assertTrue(TXLockService.getDTLS().isLockGrantor()); } catch (CacheException e) { fail("While performing first transaction"); } } }); // fix for bug 38843 causes the DTLS to be created in every TX participant assertNotNull(TXLockService.getDTLS()); assertFalse(TXLockService.getDTLS().isLockGrantor()); assertEquals("val1", rgn.getEntry("key").getValue()); vm0.invoke(new SerializableRunnable("Disconnect from DS, remote grantor death") { @Override public void run() { try { MembershipManagerHelper.crashDistributedSystem(getSystem()); } finally { // Allow getCache() to re-establish a ds connection closeCache(); } } }); // Make this VM the remote Grantor txMgr.begin(); rgn.put("key", "val2"); txMgr.commit(); assertNotNull(TXLockService.getDTLS()); assertTrue(TXLockService.getDTLS().isLockGrantor()); SerializableRunnable remoteComm = new SerializableRunnable("testRemoteGrantor: remote grantor commit") { @Override public void run() { try { Cache c = getCache(); CacheTransactionManager txMgr2 = c.getCacheTransactionManager(); Region rgn1 = c.getRegion(rgnName); if (rgn1 == null) { // This block should only execute on VM0 rgn1 = c.createRegion(rgnName, getRegionAttributes()); } txMgr2.begin(); rgn1.put("key", "val3"); txMgr2.commit(); if (TXLockService.getDTLS() != null) { assertTrue(!TXLockService.getDTLS().isLockGrantor()); } } catch (CacheException e) { Assert.fail("While creating region", e); } } }; Invoke.invokeInEveryVM(remoteComm); // vm1.invoke(remoteComm); // vm2.invoke(remoteComm); assertNotNull(TXLockService.getDTLS()); assertTrue(TXLockService.getDTLS().isLockGrantor()); assertEquals("val3", rgn.getEntry("key").getValue()); rgn.destroyRegion(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void approveGrant() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var grantedAuth = GrantedAuthorization.apply(approvedBy, approvedAt, grantFor);\n var member = DatasetMember.apply(grantedAuth, privilege);\n\n /*\n * When\n */\n grant = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * Then\n */\n assertThat(grant.getRequest())\n .as(\"The request should be available in the grant.\")\n .isPresent()\n .satisfies(ro -> ro.ifPresent(r -> {\n assertThat(r).isEqualTo(request);\n }));\n\n assertThat(grant.getRequestResponse())\n .as(\"The request response should be set and it should be approved\")\n .isPresent()\n .satisfies(ro -> ro.ifPresent(r -> {\n assertThat(r)\n .extracting(\n o -> o.getExecuted().getBy(),\n o -> o.getExecuted().getAt(),\n AccessRequestResponse::isApproved)\n .containsExactly(approvedBy, approvedAt, true);\n }));\n\n assertThat(grant)\n .as(\"Since the request is approved, the grant should be active\")\n .satisfies(g -> {\n assertThat(g.asDatasetMember())\n .isPresent()\n .get()\n .isEqualTo(member);\n\n assertThat(g.isOpen()).isFalse();\n assertThat(g.isActive()).isTrue();\n assertThat(g.isClosed()).isFalse();\n });\n }", "@Test(dependsOnMethods = \"testRoleAdd\", groups = \"role\", priority = 1)\n public void testRoleGrantPermission() throws ExecutionException, InterruptedException {\n this.authDisabledAuthClient\n .roleGrantPermission(rootRole, rootRolekeyRangeBegin, rootkeyRangeEnd,\n Permission.Type.READWRITE).get();\n this.authDisabledAuthClient\n .roleGrantPermission(userRole, userRolekeyRangeBegin, userRolekeyRangeEnd, Type.READWRITE)\n .get();\n }", "@Test\n public void testGetSupportedOperations() {\n PasswordGrant instance = new PasswordGrant();\n List<String> expResult = new ArrayList<String>();\n expResult.add(\"authenticate\");\n expResult.add(\"refresh\");\n List<String> result = instance.getSupportedOperations();\n assertEquals(expResult, result);\n }", "@Test\n public void testValidParameters() {\n Map params = new HashMap();\n params.put(\"provider_url\", \"http://localhost:8080/v1/oauth/tokens\");\n params.put(\"grant_type\", \"password\");\n params.put(\"client_id\", \"test_client_1\");\n params.put(\"provider_id\", \"local\");\n params.put(\"basic_username\", \"test_client_1\");\n params.put(\"basic_password\", \"test_secret\");\n params.put(\"username\", \"test_client_1\");\n params.put(\"password\", \"test_secret\");\n PasswordGrant instance = new PasswordGrant();\n Boolean expResult = true;\n Boolean result = instance.validParameters(params);\n assertEquals(expResult, result);\n \n }", "@Test\n public void rejectGrant() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var rejectBy = UserId.random();\n var rejectAt = Instant.now();\n var justification = Markdown.lorem();\n\n /*\n * When\n */\n grant = grant\n .reject(rejectBy, rejectAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * Then\n */\n assertThat(grant.getRequest())\n .as(\"The request should be available in the grant.\")\n .isPresent()\n .satisfies(ro -> ro.ifPresent(r -> {\n assertThat(r).isEqualTo(request);\n }));\n\n assertThat(grant.getRequestResponse())\n .as(\"The request response should be set and it should be rejected\")\n .isPresent()\n .satisfies(ro -> ro.ifPresent(r -> {\n assertThat(r)\n .extracting(\n o -> o.getExecuted().getBy(),\n o -> o.getExecuted().getAt(),\n AccessRequestResponse::isApproved)\n .containsExactly(rejectBy, rejectAt, false);\n }));\n\n assertThat(grant)\n .as(\"Since the request is approved, the grant should be active\")\n .satisfies(g -> {\n assertThat(g.asDatasetMember()).isNotPresent();\n assertThat(g.isOpen()).isFalse();\n assertThat(g.isActive()).isFalse();\n assertThat(g.isClosed()).isTrue();\n });\n }", "@Test\n public void test_access_to_modify_team_success() {\n try {\n Assert.assertTrue(authBO.hasAccessToModifyTeam(1, 1));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "@Override\n public boolean testPermission(CommandSource source) {\n return source.hasPermission(\"core.tps\");\n }", "@Test\n public void acceptRevoked() {\n /*\n * Given\n */\n var uid = UID.apply();\n var user = UserAuthorization.random();\n var granted = Instant.now();\n var privilege = DatasetPrivilege.CONSUMER;\n var executor = UserId.random();\n\n var grant = DatasetGrant.createApproved(\n uid, user, privilege,\n executor, granted, Markdown.lorem());\n\n var revoked = grant.revoke(UserId.random(), Instant.now(), Markdown.lorem());\n\n /*\n * When\n */\n var approved = revoked.approve(executor, Instant.now(), Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(approved)\n .as(\"The approval should not be successful\")\n .satisfies(a -> {\n assertThat(a.isFailure()).isTrue();\n });\n }", "@Test(expected = RpcException.class)\n public void unauthorizedTarget() throws Exception {\n final String unauthorizedTarget = BaseTestImpersonation.org2Users[0];\n final Properties connectionProps = new Properties();\n connectionProps.setProperty(USER, TestInboundImpersonation.PROXY_NAME);\n connectionProps.setProperty(PASSWORD, TestInboundImpersonation.PROXY_PASSWORD);\n connectionProps.setProperty(IMPERSONATION_TARGET, unauthorizedTarget);\n BaseTestQuery.updateClient(connectionProps);// throws up\n\n }", "@Test\n void checkManagerWithPermissionGetAlert(){\n LinkedList<PermissionEnum.Permission> list=new LinkedList<>();\n list.add(PermissionEnum.Permission.RequestBidding);\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,NofetID);\n tradingSystem.EditManagerPermissions(EuserId,EconnID,storeID,NofetID,list);\n Response Alert=new Response(\"Alert\");\n store.sendAlertOfBiddingToManager(Alert);\n //??\n }", "@Test\n public void createRequested() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n\n /*\n * When\n */\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n /*\n * Then\n */\n assertThat(grant.getRequestResponse())\n .as(\"There shouldn't be a response for the grant.\")\n .isNotPresent();\n\n assertThat(grant.getRequest())\n .as(\"The request should be available in the grant.\")\n .isPresent()\n .satisfies(ro -> ro.ifPresent(r -> {\n assertThat(r).isEqualTo(request);\n }));\n\n assertThat(grant)\n .as(\"Since the request is not approved, the grant is not active\")\n .satisfies(g -> {\n assertThat(g.asDatasetMember()).isNotPresent();\n assertThat(g.isOpen()).isTrue();\n assertThat(g.isActive()).isFalse();\n assertThat(g.isClosed()).isFalse();\n });\n }", "public void grant(Object proxy) {\n storedProxy = proxy;\n if (grantTrap != null) {\n throw grantTrap;\n }\n\tsuper.grant(proxy);\n }", "private void verifyAuthWithServer() {\n mResetModel.connect(\n myBinding.editResetEmail.getText().toString());\n //This is an Asynchronous call. No statements after should rely on the\n //result of connect().\n }", "boolean testConnection(RemoteService service);", "@Test\n\tpublic void retrievePasswordReplayAttackTest() throws RemoteException, NoSuchAlgorithmException, InvalidKeySpecException, IOException, InvalidKeyException, SignatureException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnrecoverableKeyException, KeyStoreException, CertificateException {\n\t\tPasswordManager pm = new PasswordManager(8080);\n\t\tString responseRegister = pm.registerUser(byteToString(cliPubKey.getEncoded()), \n\t\t\t\tDigitalSignature.getSignature(cliPubKey.getEncoded(),cliPrivKey));\n\n\t\t// Set global variables for Secret Key and Server Public Key based on the register\n\t\tbyte[] secretKeyByte = RSAMethods.decipher(responseRegister.split(\"-\")[2], cliPrivKey);\n\t\tString secretKeyStr = new String(secretKeyByte, \"UTF-8\");\n\t\tsecretKey = new SecretKeySpec(stringToByte(secretKeyStr), 0, stringToByte(secretKeyStr).length, \"HmacMD5\");\n\t\tservPubKey = getServerPublicKey(responseRegister.split(\"-\")[0]);\n\t\t\n\t\t// Simulate the save request from client\n\t\tString domain = \"facebook\";\n\t\tString username = \"test\";\n\t\tString password = \"123aBc456\";\n\t\tint seqNum = 0;\n\t\tString msg = messageToSend(domain,username,password,\"0\",seqNum);\n\n\t\t// Call savePassword method on server\n\t\tpm.savePassword(msg);\n\n\t\t// Simulate the retrieve request from client\n\t\tseqNum = 1;\n\t\tmsg = messageToSend(domain,username,\"\",\"1\",seqNum);\n\n\t\t// Simulate a Replay Attack by sending the same message twice\n\t\tpm.retrievePassword(msg);\n\t\tString retrieveResponse2 = pm.retrievePassword(msg);\n\t\t\n\t\t// Check the way server deals with freshness of messages\n\t\tbyte[] responseTest = RSAMethods.decipher(retrieveResponse2.split(\"-\")[0],cliPrivKey);\n\t\tString responseTestStr = new String(responseTest, \"UTF-8\");\n\t\tAssert.assertEquals(\"Error\", responseTestStr);\n\t}", "public void sendTokenToRemote() { }", "@Test\n public void testWithoutExpectedClientScope() {\n AuthzClient authzClient = getAuthzClient();\n PermissionRequest request = new PermissionRequest(\"Resource A\");\n String ticket = authzClient.protection().permission().create(request).getTicket();\n try {\n authzClient.authorization(\"marta\", \"password\", \"baz\").authorize(new AuthorizationRequest(ticket));\n fail(\"Should fail.\");\n } catch (AuthorizationDeniedException ignore) {\n\n }\n\n // Access Resource B with client scope foo.\n request = new PermissionRequest(\"Resource B\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n try {\n authzClient.authorization(\"marta\", \"password\", \"foo\").authorize(new AuthorizationRequest(ticket));\n fail(\"Should fail.\");\n } catch (AuthorizationDeniedException ignore) {\n\n }\n }", "@Test\n public void respondRejected() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var rejectBy = UserId.random();\n var rejectAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstGrant = grant\n .reject(rejectBy, rejectAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstGrant.approve(rejectBy, rejectAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstGrant.reject(UserId.random(), rejectAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(approve.isFailure())\n .as(\"The 2nd call to approve cannot be successful\")\n .isTrue();\n\n assertThat(reject)\n .as(\"The 2nd call to reject is also successful with the same result\")\n .satisfies(r -> {\n var secondGrant = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondGrant).isEqualTo(firstGrant);\n });\n }", "protected boolean mustTunnel (RequestHandler rh) {\n\tString auth = request.getHeader (\"Authorization\");\n\tif (auth != null) {\n\t if (auth.startsWith (\"NTLM\") || auth.startsWith (\"Negotiate\"))\n\t\treturn true;\n\t}\n\treturn false;\n }", "@Test\n public void testWithExpectedClientScope() {\n AuthzClient authzClient = getAuthzClient();\n PermissionRequest request = new PermissionRequest(\"Resource A\");\n String ticket = authzClient.protection().permission().create(request).getTicket();\n AuthorizationResponse response = authzClient.authorization(\"marta\", \"password\", \"foo\")\n .authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n\n // Access Resource A with client scope bar.\n request = new PermissionRequest(\"Resource A\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n response = authzClient.authorization(\"marta\", \"password\", \"bar\").authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n\n // Access Resource B with client scope bar.\n request = new PermissionRequest(\"Resource B\");\n ticket = authzClient.protection().permission().create(request).getTicket();\n response = authzClient.authorization(\"marta\", \"password\", \"bar\").authorize(new AuthorizationRequest(ticket));\n assertNotNull(response.getToken());\n }", "@Test\n public void supervisorCanOpenACashRegister() {\n this.supervisor.canOpen();\n }", "@Test\n public void testGetMinimumGrantParameters() {\n PasswordGrant instance = new PasswordGrant();\n List<String> expResult = new ArrayList<String>();\n expResult.add(\"grant_type\");\n expResult.add(\"username\");\n expResult.add(\"password\");\n List<String> result = instance.getMinimumGrantParameters();\n assertEquals(expResult, result);\n }", "public void grantAccess(String hash, String token) {\n PasswordResetToken passwordResetToken = getAndValidate(hash, token);\n authManager.grantChangePasswordPrivilege(passwordResetToken.getUser());\n }", "@Test\n public void respondApproved() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n var approvedBy = UserId.random();\n var approvedAt = Instant.now();\n var justification = Markdown.lorem();\n\n var firstReject = grant\n .approve(approvedBy, approvedAt, justification)\n .map(g -> g, e -> null);\n\n /*\n * When\n */\n Result<DatasetGrant> approve = firstReject.approve(approvedBy, approvedAt, Markdown.lorem());\n Result<DatasetGrant> reject = firstReject.reject(UserId.random(), approvedAt, Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(reject.isFailure())\n .as(\"The 2nd call as reject cannot be successful\")\n .isTrue();\n\n assertThat(approve)\n .as(\"The 2nd call as approve is also successful with the same result\")\n .satisfies(r -> {\n var secondReject = r.map(g -> g, g -> null);\n assertThat(r.isSuccess()).isTrue();\n assertThat(secondReject).isEqualTo(firstReject);\n });\n }", "private void processGrantOrRevoke(boolean grant) throws HsqlException {\n\n int right;\n Object accessKey;\n String token;\n\n session.checkAdmin();\n session.checkDDLWrite();\n session.setScripting(true);\n\n right = 0;\n token = tokenizer.getSimpleToken();\n\n tokenizer.back();\n\n if (!GranteeManager.validRightString(token)) {\n processRoleGrantOrRevoke(grant);\n\n return;\n }\n\n do {\n token = tokenizer.getSimpleToken();\n right |= GranteeManager.getCheckRight(token);\n } while (tokenizer.isGetThis(Token.T_COMMA));\n\n tokenizer.getThis(Token.T_ON);\n\n accessKey = null;\n\n if (tokenizer.isGetThis(Token.T_CLASS)) {\n accessKey = tokenizer.getSimpleName();\n\n if (!tokenizer.wasQuotedIdentifier()) {\n throw Trace.error(Trace.QUOTED_IDENTIFIER_REQUIRED);\n }\n } else {\n token = tokenizer.getName();\n\n String schema =\n session.getSchemaName(tokenizer.getLongNameFirst());\n Table t = database.schemaManager.getTable(session, token, schema);\n\n accessKey = t.getName();\n\n session.setScripting(true);\n }\n\n tokenizer.getThis(grant ? Token.T_TO\n : Token.T_FROM);\n\n token = getUserIdentifier();\n\n GranteeManager gm = database.getGranteeManager();\n\n if (grant) {\n gm.grant(token, accessKey, right);\n } else {\n gm.revoke(token, accessKey, right);\n }\n }", "public void testInvokeShell() throws Exception {\n PKey hostKey = PKey.readPrivateKeyFromStream(new FileInputStream(\n \"test/test_rsa.key\"), null);\n PKey publicHostKey = PKey.createFromBase64(hostKey.getBase64());\n mTS.addServerKey(hostKey);\n final FakeServer server = new FakeServer();\n\n final Event sync = new Event();\n new Thread(new Runnable() {\n public void run() {\n try {\n mTS.start(server, 15000);\n sync.set();\n } catch (IOException x) {}\n }\n }).start();\n\n mTC.start(publicHostKey, 15000);\n mTC.authPassword(\"slowdive\", \"pygmalion\", 15000);\n\n sync.waitFor(5000);\n assertTrue(sync.isSet());\n assertTrue(mTS.isActive());\n\n Channel chan = mTC.openSession(5000);\n chan.invokeShell(5000);\n Channel schan = mTS.accept(5000);\n chan.getOutputStream().write(\"communist j. cat\\n\".getBytes());\n assertFalse(chan.isClosed());\n chan.close();\n assertTrue(chan.isClosed());\n\n BufferedReader r = new BufferedReader(new InputStreamReader(\n schan.getInputStream()));\n assertEquals(\"communist j. cat\", r.readLine());\n schan.close();\n }", "public boolean isSetGrant_priv() {\n return this.__isset.grant_priv;\n }", "@Test\r\n public void test() {\r\n Owner owner = new Owner();\r\n owner.setOauthToken(\"CAACEdEose0cBAMCKHcqSEOcS5O40e4co26HaL6YyEtM7PZAUlPSSDbIca80wF2w3G9B43ZCAx8vojAQKfeyk8ZAapSjv5ala0FPAawudbeNPpFMgyGCDmR0bEhNUuj9gbRjKHQqvVt28DUegx6uAVtMy5PYGhoFSYHstHBtt8Hby7wp2cIczDeZAiuoKe0L6qbGJnFRHqzO87pyZBEhPDpbAZBWjrtCyQZD\");\r\n owner.setFacebookID(\"1492826064306740\");\r\n\r\n MonitorRunner runner = new MonitorRunner(owner);\r\n //runner.run();\r\n }", "@Test\n void checkTheManagerGetAlertAfterOwnerChangeTheBid() {\n String guest= tradingSystem.ConnectSystem().returnConnID();\n tradingSystem.Register(guest, \"Manager2\", \"123\");\n Response res= tradingSystem.Login(guest, \"Manager2\", \"123\");\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,res.returnUserID());\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,4,20,2);\n store.changeSubmissionBid(EuserId,NofetID,4,30,1);\n }", "@Override\r\n\tpublic void testPrivateBelongsToOtherUser() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testPrivateBelongsToOtherUser();\r\n\t\t}\r\n\t}", "@Test\n\t// Delivery 2 Use Case 1. Grant/Deny Access to commands based on profile's role\n\tpublic void test() {\n\n\t\tUsers user1 = new Users(\"Test1\", \"PARENT\");\n\t\tUsers user2 = new Users(\"Test2\", \"STRANGER\");\n\t\tUsers user3 = new Users(\"Test3\", \"CHILDREN\");\n\t\tUsers user4 = new Users(\"Test4\", \"GUEST\");\n\n\t\t// Checking if users have permissions\n\t\tassertEquals(\"PARENT\", user1.getPermission());\n\t\tassertEquals(\"STRANGER\", user2.getPermission());\n\t\tassertEquals(\"CHILDREN\", user3.getPermission());\n\t\tassertEquals(\"GUEST\", user4.getPermission());\n\n\t}", "@Test\n public void revokeRequested() {\n /*\n * Given\n */\n var uid = UID.apply();\n var grantFor = UserAuthorization.random();\n var privilege = DatasetPrivilege.CONSUMER;\n\n var executed = Executed.now(UserId.random());\n var request = AccessRequest.apply(executed, Markdown.lorem());\n var grant = DatasetGrant.createRequested(uid, grantFor, privilege, request);\n\n /*\n * When\n */\n DatasetGrant revoked = grant.revoke(UserId.random(), Instant.now(), Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(revoked)\n .as(\"The request is closed and not active after it is revoked\")\n .satisfies(g -> {\n assertThat(g.asDatasetMember()).isNotPresent();\n assertThat(g.isOpen()).isFalse();\n assertThat(g.isActive()).isFalse();\n assertThat(g.isClosed()).isTrue();\n });\n }", "private void verifyAuthWithServer() {\n mRegisterModel.connect(binding.personFirstName.getText().toString(),\n binding.personLastName.getText().toString(),\n binding.registerEmail.getText().toString(),\n binding.registerPassword.getText().toString());\n //this is an Asynchronous call no statements after should rely on the result of connect\n }", "@Test\n public void testJdoeAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/jdoe\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"jdoe\");\n\n // jdoe can access information about alice because he is granted with \"people-manager\" role\n response = makeRequest(\"http://localhost:8080/api/alice\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"alice\");\n }", "private void grantDB(String ipAddr, boolean grant) throws IOException{\n\t\tString datfile = System.getProperty(\"queue.dir\")+\"grantUser.sql\";\r\n\t\tString user = connector.username; // \"root\";\r\n\t\tString pwd = connector.password; // \"password\";\r\n\t\tString execS =\"\";\r\n\t\t\r\n\t\tFile fOut = new File(datfile);\r\n\t\tFileOutputStream out = new FileOutputStream(fOut);\r\n\t\tWriter wr = new OutputStreamWriter(out);\r\n\t\tif (grant)\r\n\t\t\twr.write(\"GRANT ALL PRIVILEGES ON queue.* TO root@\" + ipAddr + \" IDENTIFIED BY 'password' ;\" + \"\\r\\n\" +\r\n\t\t\t\t\t \"FLUSH PRIVILEGES;\" + \"\\r\\n\");\r\n\t\telse\r\n\t\t\twr.write(\"REVOKE ALL PRIVILEGES ON queue.* FROM root@\" + ipAddr + \" IDENTIFIED BY 'password' ;\" + \"\\r\\n\" +\r\n\t\t\t\t\t\"FLUSH PRIVILEGES;\" + \"\\r\\n\");\r\n\t\twr.flush();\r\n\t\twr.close();\r\n\t\tout.close();\r\n\t\t\r\n\t\t//to execute grant process\r\n\t\tRuntime runT = Runtime.getRuntime();\r\n\t\ttry{\r\n\t\t\texecS = \"mysql -u \"+user+\" -p\"+pwd+\" queue < \"+datfile ;\r\n\t\t\trunT.exec( execS );\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\t\t\r\n\t\tfinally{\r\n\t\t\tif (fOut.exists()) fOut.delete();\r\n\t\t}\r\n\t}", "@Test\n public void authorisedTest() {\n assertTrue(authResponse.isAuthorised());\n }", "@Test\n\tpublic void retrievePasswordManInTheMiddleTest() throws RemoteException, NoSuchAlgorithmException, InvalidKeySpecException, IOException, InvalidKeyException, SignatureException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnrecoverableKeyException, KeyStoreException, CertificateException {\n\t\tPasswordManager pm = new PasswordManager(8080);\n\t\tString responseRegister = pm.registerUser(byteToString(cliPubKey.getEncoded()), \n\t\t\t\tDigitalSignature.getSignature(cliPubKey.getEncoded(),cliPrivKey));\n\n\t\t// Set global variables for Secret Key and Server Public Key based on the register\n\t\tbyte[] secretKeyByte = RSAMethods.decipher(responseRegister.split(\"-\")[2], cliPrivKey);\n\t\tString secretKeyStr = new String(secretKeyByte, \"UTF-8\");\n\t\tsecretKey = new SecretKeySpec(stringToByte(secretKeyStr), 0, stringToByte(secretKeyStr).length, \"HmacMD5\");\n\t\tservPubKey = getServerPublicKey(responseRegister.split(\"-\")[0]);\n\t\t\n\t\t// Simulate the save request from client\n\t\tString domain = \"facebook\";\n\t\tString username = \"test\";\n\t\tString password = \"123aBc456\";\n\t\tint seqNum = 0;\n\t\tString msg = messageToSend(domain,username,password,\"0\",seqNum);\n\n\t\t// Call savePassword method on server\n\t\tpm.savePassword(msg);\n\t\t\n\t\t// Simulate the retrieve request from client\n\t\tseqNum = 1;\n\t\tmsg = messageToSend(domain,username,\"\",\"1\",seqNum);\n\n\t\t//Simulate a Man-In-The-Middle attack by changing the content of message\n\t\tStringBuilder newMsg = new StringBuilder(msg);\n\t\tnewMsg.insert(4, \"a\");\n\t\t\n\t\t// Call retrievePassword method on server\n\t\tString retrieveResponse = pm.retrievePassword(newMsg.toString());\n\t\t\n\t\t// Check the integrity of the server\n\t\tAssert.assertEquals(\"Error\", retrieveResponse.split(\"-\")[0]);\n\t}", "public boolean attempt(CommandSender sender) {\n boolean allowed = test(sender);\n if (!allowed) {\n sender.sendMessage(NO_PERMISSION);\n }\n return allowed;\n }", "@Test\n\tpublic void savePasswordReplayAttackTest() throws RemoteException, NoSuchAlgorithmException, InvalidKeySpecException, IOException, InvalidKeyException, SignatureException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnrecoverableKeyException, KeyStoreException, CertificateException {\n\t\tPasswordManager pm = new PasswordManager(8080);\n\t\tString responseRegister = pm.registerUser(byteToString(cliPubKey.getEncoded()), \n\t\t\t\tDigitalSignature.getSignature(cliPubKey.getEncoded(),cliPrivKey));\n\n\t\t// Set global variables for Secret Key and Server Public Key based on the register\n\t\tbyte[] secretKeyByte = RSAMethods.decipher(responseRegister.split(\"-\")[2], cliPrivKey);\n\t\tString secretKeyStr = new String(secretKeyByte, \"UTF-8\");\n\t\tsecretKey = new SecretKeySpec(stringToByte(secretKeyStr), 0, stringToByte(secretKeyStr).length, \"HmacMD5\");\n\t\tservPubKey = getServerPublicKey(responseRegister.split(\"-\")[0]);\n\t\t\n\t\t// Simulate the request from client\n\t\tString domain = \"facebook\";\n\t\tString username = \"test\";\n\t\tString password = \"123aBc456\";\n\t\tint seqNum = 0;\n\t\tString msg = messageToSend(domain,username,password,\"0\",seqNum);\n\t\t\n\t\t// Simulate a Replay Attack by sending the same message twice\n\t\tpm.savePassword(msg);\n\t\tString saveResponse2 = pm.savePassword(msg.toString()); // Replay attack by sending msg twice\n\t\t\n\t\t// Check the way server deals with freshness of messages\n\t\tbyte[] responseTest = RSAMethods.decipher(saveResponse2.split(\"-\")[0],cliPrivKey);\n\t\tString responseTestStr = new String(responseTest, \"UTF-8\");\n\t\tAssert.assertEquals(\"Error\", responseTestStr);\n\t}", "public void ejbPassivate() {\n testAllowedOperations(\"ejbPassivate\");\n }", "public boolean test(CommandListenerWrapper wrapper) {\n/* 48 */ return this.command.testPermissionSilent(wrapper.getBukkitSender());\n/* */ }", "@Override\r\n\tpublic int managerCheck(String id, String password) {\n\t\treturn 0;\r\n\t}", "public void grantAdminOnIndividualToSystemUser(Individual i, SystemUser user);", "@Test\n void testGetRegistrarForUser_noAccess_isNotAdmin_notReal() {\n expectGetRegistrarFailure(\n OTE_CLIENT_ID_WITHOUT_CONTACT,\n USER,\n \"user [email protected] doesn't have access to registrar OteRegistrar\");\n verify(lazyGroupsConnection).get();\n }", "@Test\n public void testGrantPreviouslyRevokedWithPrejudiceShowsPrompt_part2() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CALENDAR));\n\n // Request the permission and allow it\n BasePermissionActivity.Result thirdResult = requestPermissions(new String[] {\n Manifest.permission.READ_CALENDAR}, REQUEST_CODE_PERMISSIONS + 2,\n BasePermissionActivity.class, () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Make sure the permission is granted\n assertPermissionRequestResult(thirdResult, REQUEST_CODE_PERMISSIONS + 2,\n new String[] {Manifest.permission.READ_CALENDAR}, new boolean[] {true});\n }", "public abstract void grantMembership(String nickname);", "@Test\n\tpublic void retrievePasswordConfidentialityTest() throws RemoteException, NoSuchAlgorithmException, InvalidKeySpecException, IOException, InvalidKeyException, SignatureException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnrecoverableKeyException, KeyStoreException, CertificateException {\n\t\tPasswordManager pm = new PasswordManager(8080);\n\t\tString responseRegister = pm.registerUser(byteToString(cliPubKey.getEncoded()),\n\t\t\t\tDigitalSignature.getSignature(cliPubKey.getEncoded(),cliPrivKey));\n\n\t\t// Set global variables for Secret Key and Server Public Key based on the register\n\t\tbyte[] secretKeyByte = RSAMethods.decipher(responseRegister.split(\"-\")[2], cliPrivKey);\n\t\tString secretKeyStr = new String(secretKeyByte, \"UTF-8\");\n\t\tsecretKey = new SecretKeySpec(stringToByte(secretKeyStr), 0, stringToByte(secretKeyStr).length, \"HmacMD5\");\n\t\tservPubKey = getServerPublicKey(responseRegister.split(\"-\")[0]);\n\t\t\n\t\t// Simulate the save request from client\n\t\tString domain = \"facebook\";\n\t\tString username = \"test\";\n\t\tString password = \"123aBc456\";\n\t\tint seqNum = 0;\n\t\tString msg = messageToSend(domain,username,password,\"0\",seqNum);\n\t\t\n\t\t// Call savePassword method on server\n\t\tpm.savePassword(msg);\n\t\t\n\t\t// Simulate the retrieve request from client\n\t\tseqNum = 1;\n\t\tmsg = messageToSend(domain,username,\"\",\"1\",seqNum);\n\n\t\t// Call retrievePassword method on server\n\t\tString retrieveResponse = pm.retrievePassword(msg);\n\t\t\n\t\t// Check the confientiality of the answer\n\t\tAssert.assertNotSame(password, retrieveResponse.split(\"-\")[0]);\n\n\t\t// Analyse the correctness of the answer\n\t\tbyte[] responseTest = RSAMethods.decipher(retrieveResponse.split(\"-\")[0],cliPrivKey);\n\t\tString responseTestStr = new String(responseTest, \"UTF-8\");\n\t\tAssert.assertEquals(password, responseTestStr);\n\t}", "@Test\n public void testRuntimeGroupGrantExpansion() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.RECEIVE_SMS));\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.SEND_SMS));\n\n String[] permissions = new String[] {Manifest.permission.RECEIVE_SMS};\n\n // request only one permission from the 'SMS' permission group at runtime,\n // but two from this group are <uses-permission> in the manifest\n // request only one permission from the 'contacts' permission group\n BasePermissionActivity.Result result = requestPermissions(permissions,\n REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class,\n () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is granted\n assertPermissionRequestResult(result, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {true});\n\n // We should now have been granted both of the permissions from this group.\n assertEquals(PackageManager.PERMISSION_GRANTED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.SEND_SMS));\n }", "@Test(groups = \"Integration\")\n public void testIsSshableWhenTrue() throws Exception {\n assertTrue(host.isSshable());\n }", "@Test\n public void rejectRevoked() {\n /*\n * Given\n */\n var uid = UID.apply();\n var user = UserAuthorization.random();\n var granted = Instant.now();\n var privilege = DatasetPrivilege.CONSUMER;\n var executor = UserId.random();\n\n var grant = DatasetGrant.createApproved(\n uid, user, privilege,\n executor, granted, Markdown.lorem());\n\n var revoked = grant.revoke(UserId.random(), Instant.now(), Markdown.lorem());\n\n /*\n * When\n */\n var rejected = revoked.reject(UserId.random(), Instant.now(), Markdown.lorem());\n\n /*\n * Then\n */\n assertThat(rejected)\n .as(\"The reject should not be successful\")\n .satisfies(a -> {\n assertThat(a.isFailure()).isTrue();\n });\n }", "boolean authQop() {\n/* 114 */ return this.serverQop;\n/* */ }", "@Test\n public void testCreateOnBehalfUser_asTechnologyManager() throws Exception {\n container.login(supplierAdminUser.getKey(), ROLE_TECHNOLOGY_MANAGER);\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), \"abcdef\");\n checkCreatedUser(result, customer, \"abcdef\", false);\n checkUserRoleAssignment(result, ROLE_ORGANIZATION_ADMIN);\n }", "public abstract void grantModerator(String nickname);", "@Test\n public void testRuntimeGroupGrantSpecificity() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.WRITE_CONTACTS));\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CONTACTS));\n\n String[] permissions = new String[] {Manifest.permission.WRITE_CONTACTS};\n\n // request only one permission from the 'contacts' permission group\n BasePermissionActivity.Result result = requestPermissions(permissions,\n REQUEST_CODE_PERMISSIONS,\n BasePermissionActivity.class,\n () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Expect the permission is granted\n assertPermissionRequestResult(result, REQUEST_CODE_PERMISSIONS,\n permissions, new boolean[] {true});\n\n // Make sure no undeclared as used permissions are granted\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CONTACTS));\n }", "@Test\n public void doSuccessfulAuthTest() throws IOException {\n // Load valid credentials\n loadValidCredentials();\n\n final RestClient restClient = new HttpClientRestClient();\n restClient.init(testConfig);\n\n // Validate not yet valid\n assertFalse(\"should not yet be valid\", sessionRefreshHandler.isValid());\n// TODO\n// assertNull(\"Should have no header value yet\", sessionRefreshHandler.getAuthorizationHeaderValue());\n\n // Call method with valid credentials and this should return true.\n assertTrue(sessionRefreshHandler.refreshCredentials(pardotClient));\n\n // Sanity check\n assertTrue(sessionRefreshHandler.isValid());\n// TODO\n// assertNotNull(sessionRefreshHandler.getAuthorizationHeaderValue());\n }", "@Test\r\n public void testGetGuestSessionToken() throws Exception {\r\n LOG.info(\"getGuestSessionToken\");\r\n TokenSession result = tmdb.getGuestSessionToken();\r\n \r\n assertTrue(\"Failed to get guest session\", result.getSuccess());\r\n }", "@Ignore\n\t@Test\n\tpublic void testAgentAccepts() {\n\t\tparty.connect(connection);\n\t\tparty.notifyChange(settings);\n\n\t\tBid bid = makeBid(\"1\", \"1\");// best pssible\n\t\tparty.notifyChange(new ActionDone(new Offer(otherparty, bid)));\n\t\tparty.notifyChange(new YourTurn());\n\t\tassertEquals(1, connection.getActions().size());\n\t\tassertTrue(connection.getActions().get(0) instanceof Accept);\n\n\t}", "@Test\n public void testGetNewUser() throws Exception {\n UserMultiID umk = createRU(\"remote-user-\" + getRandomString());\n String idp = \"test-idp-\" + getRandomString();\n // create a new user.\n XMLMap map = getDBSClient().getUser(umk, idp);\n assert getDBSClient().hasUser(umk, idp);\n Identifier uid = BasicIdentifier.newID(map.get(userKeys.identifier()).toString());\n User user2 = getUserStore().get(uid);\n checkUserAgainstMap(map, user2);\n }", "@Test\n public void sshCommandCanBeExecuted() throws Exception {\n allowGlobalCapabilities(REGISTERED_USERS, GlobalCapability.ACCESS_DATABASE);\n\n for (String root : COMMANDS.keySet()) {\n for (String command : COMMANDS.get(root)) {\n // We can't assert that adminSshSession.hasError() is false, because using the --help\n // option causes the usage info to be written to stderr. Instead, we assert on the\n // content of the stderr, which will always start with \"gerrit command\" when the --help\n // option is used.\n String cmd = String.format(\"gerrit%s%s %s\", root.isEmpty() ? \"\" : \" \", root, command);\n log.debug(cmd);\n adminSshSession.exec(String.format(\"%s --help\", cmd));\n String response = adminSshSession.getError();\n assertWithMessage(String.format(\"command %s failed: %s\", command, response))\n .that(response)\n .startsWith(cmd);\n }\n }\n }", "@Test\n public void testAccess() throws Exception {\n wrapper.setServerConfig(\"access2\");\n \n String command = getCommandAllEnvVariables();\n FreeStyleBuild build = runBatchCommand(command);\n\n // Assert that the console log contains the output we expect\n checkBinUnset(build);\n checkMetricsUnset(build);\n checkAccessSet(build, \n \"ps_helper_access IS UNSET\", // because there is no credentials\n \"http\",\n \"access2.com\",\n \"19444\",\n \"http://access2.com:19444\");\n }", "boolean authNeeded();", "@Test\n public void existingUserOK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"secret\", 0); \n //Then\n assertThat(result, is(true));\n }", "boolean isIsRemote();", "@Test\n public void testCheckExistsPermission() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"OPEN_OFFICE\");\n permissionManager.addPermission(permission);\n assertTrue(permissionManager.checkExists(permission));\n Permission permission2 = permissionManager.getPermissionInstance(\"CLOSE_OFFICE\");\n assertFalse(permissionManager.checkExists(permission2));\n }", "@Test\n\tpublic void test03_AcceptARequest(){\n\t\tinfo(\"Test03: Accept a Request\");\n\t\tinfo(\"prepare data\");\n\t\t/*Create data test*/\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\n\t\t/*Step Number: 1\n\t\t *Step Name: Accept a request\n\t\t *Step Description: \n\t\t\t- Login as John\n\t\t\t- Open intranet homepage\n\t\t\t- On this gadget, mouse over an invitation of mary\n\t\t\t- Click on Accept button\n\t\t *Input Data: \n\t\t/*Expected Outcome: \n\t\t\t- The invitation of root, mary is shown on the invitation gadget\n\t\t\t- The Accept and Refuse button are displayed.\n\t\t\t- John is connected to mary and the invitation fades out and is permanently removed from the list\n\t\t\t- Request of root are moving to the top of the gadget if needed*/ \n\t\tinfo(\"Sign in with mary account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tmouseOver(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2),true);\n\t\tclick(hp.ELEMENT_INVITATIONS_PEOPLE_ACCEPT_BTN.replace(\"${name}\",username2), 2,true);\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\tinfo(\"Clear Data\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t}", "@Test\n public void testPlayerInNegotiateCommand() {\n d_orderProcessor.processOrder(\"negotiate user3\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n assertEquals(false, l_order.executeOrder());\n }", "boolean canRobPlayer(HexLocation location, int victimIndex);", "boolean hasPants();", "@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}", "@When(\"Try to Determine application's/system's password policy\")\npublic void trydetermineapplicationssystemspasswordpolicy(){\n}", "@Test\n public void testAliceAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/alice\", \"alice\", \"alice\");\n assertAccessGranted(response, \"alice\");\n\n // alice can not access information about jdoe\n response = makeRequest(\"http://localhost:8080/api/jdoe\", \"alice\", \"alice\");\n assertEquals(403, response.getStatusLine().getStatusCode());\n }", "public boolean doRemoteSetupAndVerification() throws Exception {\n return true;\n }", "@Test\n public void testBasicAuthUserFail() {\n HttpAuthenticationFeature feature = \n HttpAuthenticationFeature.basic(\"NOTadmin\", \"admin\");\n Client client = ClientBuilder.newClient();\n URI uri = UriBuilder\n .fromUri(APPLICATION_NAME + APPLICATION_API_VERSION)\n .scheme(\"http\")\n .host(\"localhost\")\n .port(8080)\n .build();\n WebTarget webTarget = client\n .register(feature)\n .target(uri)\n .path(\"user\");\n Response response = webTarget\n .request(APPLICATION_JSON)\n .get();\n assertThat(response.getStatus(), is(401));\n }", "@Test\n public void testConnectionWhenBadPass() {\n \tForm form = new Form();\n \tform.param(\"login\", \"user\");\n \tform.param(\"psw\", \"00000\");\n \t\n \tResponse connect = target.path(auth).request().post(Entity.form(form));\n \tassertEquals(530,connect.getStatus());\n }", "@Test\r\n public void testGraphPerms1()\r\n throws Exception {\r\n\r\n GraphManager gmgr = databaseClient.newGraphManager();\r\n createUserRolesWithPrevilages(\"test-role\");\r\n GraphPermissions gr = testAdminCon.getDefaultGraphPerms();\r\n \r\n // ISSUE # 175 uncomment after issue is fixed\r\n Assert.assertEquals(0L, gr.size());\r\n \r\n testAdminCon.setDefaultGraphPerms(gmgr.permission(\"test-role\", Capability.READ, Capability.UPDATE));\r\n String defGraphQuery = \"CREATE GRAPH <http://marklogic.com/test/graph/permstest> \";\r\n MarkLogicUpdateQuery updateQuery = testAdminCon.prepareUpdate(QueryLanguage.SPARQL, defGraphQuery);\r\n updateQuery.execute();\r\n \r\n String defGraphQuery1 = \"INSERT DATA { GRAPH <http://marklogic.com/test/graph/permstest> { <http://marklogic.com/test1> <pp2> \\\"test\\\" } }\";\r\n String checkQuery = \"ASK WHERE { GRAPH <http://marklogic.com/test/graph/permstest> {<http://marklogic.com/test> <pp2> \\\"test\\\" }}\";\r\n MarkLogicUpdateQuery updateQuery1 = testAdminCon.prepareUpdate(QueryLanguage.SPARQL, defGraphQuery1);\r\n updateQuery1.execute();\r\n \r\n BooleanQuery booleanQuery = testAdminCon.prepareBooleanQuery(QueryLanguage.SPARQL, checkQuery);\r\n boolean results = booleanQuery.evaluate();\r\n Assert.assertEquals(false, results);\r\n \r\n gr = testAdminCon.getDefaultGraphPerms();\r\n Assert.assertEquals(1L, gr.size());\r\n Iterator<Entry<String, Set<Capability>>> resultPerm = gr.entrySet().iterator();\r\n while(resultPerm.hasNext()){\r\n \t Entry<String, Set<Capability>> perms = resultPerm.next();\r\n \t Assert.assertTrue(\"test-role\" == perms.getKey());\r\n \t Iterator<Capability> capability = perms.getValue().iterator();\r\n \t while (capability.hasNext())\r\n \t\t assertThat(capability.next().toString(), anyOf(equalTo(\"UPDATE\"), is(equalTo(\"READ\"))));\r\n }\r\n \r\n String defGraphQuery2 = \"CREATE GRAPH <http://marklogic.com/test/graph/permstest1> \";\r\n testAdminCon.setDefaultGraphPerms(null);\r\n updateQuery = testAdminCon.prepareUpdate(QueryLanguage.SPARQL, defGraphQuery2);\r\n updateQuery.execute();\r\n gr = testAdminCon.getDefaultGraphPerms();\r\n Assert.assertEquals(0L, gr.size());\r\n \r\n \r\n createUserRolesWithPrevilages(\"multitest-role\");\r\n testAdminCon.setDefaultGraphPerms(gmgr.permission(\"multitest-role\", Capability.READ).permission(\"test-role\", Capability.UPDATE));\r\n defGraphQuery = \"CREATE GRAPH <http://marklogic.com/test/graph/permstest2> \";\r\n updateQuery = testAdminCon.prepareUpdate(QueryLanguage.SPARQL, defGraphQuery);\r\n updateQuery.execute();\r\n gr = testAdminCon.getDefaultGraphPerms();\r\n Assert.assertEquals(2L, gr.size());\r\n testAdminCon.setDefaultGraphPerms(null);\r\n testAdminCon.setDefaultGraphPerms(null);\r\n // ISSUE 180\r\n //testAdminCon.setDefaultGraphPerms((GraphPermissions)null);\r\n gr = testAdminCon.getDefaultGraphPerms();\r\n Assert.assertEquals(0L, gr.size());\r\n \r\n \r\n }", "private void processRoleGrantOrRevoke(boolean grant) throws HsqlException {\n\n String token;\n HsqlArrayList list = new HsqlArrayList();\n String role;\n GranteeManager granteeManager = database.getGranteeManager();\n\n do {\n role = tokenizer.getSimpleToken();\n\n Trace.check(granteeManager.isRole(role),\n (grant ? Trace.NO_SUCH_ROLE_GRANT\n : Trace.NO_SUCH_ROLE_REVOKE));\n list.add(role);\n } while (tokenizer.isGetThis(Token.T_COMMA));\n\n tokenizer.getThis(grant ? Token.T_TO\n : Token.T_FROM);\n\n token = getUserIdentifier();\n\n GranteeManager gm = database.getGranteeManager();\n\n for (int i = 0; i < list.size(); i++) {\n if (grant) {\n gm.grant(token, (String) list.get(i));\n } else {\n gm.revoke(token, (String) list.get(i));\n }\n }\n }", "public interface IBillingServer extends Remote {\r\n\r\n\t/**\r\n\t * \r\n\t * @param username\r\n\t * @param password\r\n\t * @return null if user not authorized, access otherwise\r\n\t * @throws RemoteException\r\n\t */\r\n\tIBillingServerSecure login(String username, String password) throws RemoteException;\r\n}", "private void checkRep(){\n assert !this.username.equals(\"\");\n assert !this.password.equals(\"\");\n assert accessLevel != null;\n }", "@Test\n public void testCheckAuth() throws Exception {\n SettingsManager manager = new SettingsManager();\n //manager.username = \"testUsername\";\n //manager.password = \"testPassword\";\n Assert.assertTrue(\"Correct credentials should return true\", manager.checkAuth(\"testUsername\", \"testPassword\"));\n Assert.assertFalse(\"Bad username should return false\", manager.checkAuth(\"badUsername\", \"testPassword\"));\n Assert.assertFalse(\"Bad password should return false\", manager.checkAuth(\"testUsername\", \"wrongPassword\"));\n }", "@Test\n public void testGetPermissionsRole() throws Exception\n {\n permission = permissionManager.getPermissionInstance(\"GREET_PEOPLE\");\n permissionManager.addPermission(permission);\n Permission permission2 = permissionManager.getPermissionInstance(\"ADMINISTER_DRUGS\");\n permissionManager.addPermission(permission2);\n Role role = securityService.getRoleManager().getRoleInstance(\"VET_TECH\");\n securityService.getRoleManager().addRole(role);\n ((DynamicModelManager) securityService.getModelManager()).grant(role, permission);\n PermissionSet permissions = ((DynamicRole) role).getPermissions();\n assertEquals(1, permissions.size());\n assertTrue(permissions.contains(permission));\n assertFalse(permissions.contains(permission2));\n }", "@Test\n\tpublic void testIsPermitted_2()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tList<Permission> permissions = new Vector();\n\n\t\tboolean[] result = fixture.isPermitted(permissions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "int validResponsableAuthentification(Responsable r, String password) throws NoSuchAlgorithmException;", "public boolean handlePerm(Player player, String perm);", "public void grantOper2Role(final Role role, final String operId);", "@Override\n @Test(description = \"Configure a NRP on a dvs by a user \"\n + \"having DVSwitch.ResourceManagement privilege\")\n public void test()\n throws Exception\n {\n // update nrp\n idvs.updateNetworkResourcePool(dvsMor,\n new DVSNetworkResourcePoolConfigSpec[] { nrpConfigSpec });\n\n // verify with the dvs\n Assert.assertTrue(NetworkResourcePoolHelper.verifyNrpFromDvs(connectAnchor,\n dvsMor, nrpConfigSpec), \"NRP verified from dvs\",\n \"NRP not matching with DVS nrp\");\n }", "@Test\n public void testConnectionWhenGoodLogs() {\n \tForm form = new Form();\n \tform.param(\"login\", \"user\");\n \tform.param(\"psw\", \"12345\");\n \t\n \tResponse connect = target.path(\"auth\").request().post(Entity.form(form));\n \tassertEquals(230,connect.getStatus());\n }", "public void enterPrivilegedMode() throws Exception{\n\t if(this.getConnectionType().equals(ConnectionType.SSH)){\n\t if(!(session.isConnected())){\n\t\t log.fatal(\"X---------FatalErrorOccured-----------X\\n\\n\");\n\t\t log.error(\"Can't enter the privileged mode without connecting to the device!!!\");\n\t\t log.info(\"Call connectSSH() first and then try again.\");\n\t\t Exception e =new Exception(\"NoConnectionHasBeenMade\");\n\t\t throw e;\n\t }\n\t else{\n\t\t log.info(\"Trying to enter the privileged mode ... \");\n\t\t this.startExpectSSH();\n\t\t String command=setCommand(\"PRIVILEGED_MODE\", this.deviceType.toString());\n\t\t log.info(\"Command \\\"\"+command+\"\\\" is going to be executed\");\n\t\t expect.expect(TIME_OUT,Pattern.compile(\".*>$\"));\n\t\t log.info(\"The following was happening on the terminal screen\\n\\t\\t\");\n\t\t log.info(expect.before);\n\t\t expect.send(command+\"\\n\");\n\t\t expect.expect(TIME_OUT,\"Password\");\n\t\t expect.send(this.deviceEnPassword+\"\\n\");\n\t\t log.info(\"Command \\\"\"+command+\"\\\" was sent. Waiting for response ... \");\n\t\t log.info(\"---The command executed was \\n\"+expect.before);\n\t\t expect.expect(TIME_OUT,Pattern.compile(\".*#$\"));\n\t\t log.info(\"----After execution of command \\n\"+expect.before);\n\t }\n\t }\n\t else{\n\t\t if(!(this.telnetClient.isConnected())){\n\t\t\t log.fatal(\"X---------FatalErrorOccured-----------X\\n\\n\");\n\t\t\t log.error(\"Can't enter the privileged mode without connecting to the device!!!\");\n\t\t\t log.info(\"Call connectTelnet() first and then try again.\");\n\t\t\t Exception e =new Exception(\"NoConnectionHasBeenMade\");\n\t\t\t throw e;\n\t\t }\n\t\t else{\n\t\t\t log.info(\"Trying to enter the privileged mode ... \");\n\t\t\t this.startExpectTelnet();\n\t\t\t String command=setCommand(\"PRIVILEGED_MODE\", this.getDeviceType().toString());\n\t\t\t log.info(\"Command \\\"\"+command+\"\\\" is going to be executed\");\n\t\t\t expect.expect(TIME_OUT,Pattern.compile(\".*>$\"));\n\t\t\t log.info(\"The following was happening on the terminal screen\\n\\t\\t\");\n\t\t\t log.info(expect.before);\n\t\t\t expect.send(command+\"\\n\");\n\t\t\t expect.expect(TIME_OUT,\"Password\");\n\t\t\t expect.send(this.deviceEnPassword+\"\\n\");\n\t\t\t log.info(\"Command \\\"\"+command+\"\\\" was sent. Waiting for response ... \");\n\t\t\t log.info(\"---The command executed was \\n\"+expect.before);\n\t\t\t expect.expect(TIME_OUT,Pattern.compile(\".*#$\"));\n\t\t\t log.info(\"----After execution of command \\n\"+expect.before);\n\t\t }\n\t }\n }", "private boolean _credInit() throws FileNotFoundException, IOException \n {\n\n String user = (String) this._argTable.get(CMD.USER);\n String svgp = (String) this._argTable.get(CMD.SERVERGROUP);\n String password = null;\n\n //get the server group first\n if (svgp == null) \n {\n while (svgp == null)\n {\n //if servergroup is null, query.If empty, set to null (which is default) \n System.out.print(\"Server group>> \");\n svgp = this._readTTYLine();\n //System.out.println(\"\");\n svgp = svgp.trim();\n if (svgp.equals(\"\"))\n svgp = null;\n \n if (svgp == null)\n {\n System.out.println(\"Server group must be specified. Enter 'abort' to quit.\");\n }\n else if (svgp.equalsIgnoreCase(\"abort\") || svgp.equalsIgnoreCase(\"exit\") ||\n svgp.equalsIgnoreCase(\"quit\") || svgp.equalsIgnoreCase(\"bye\")) \n {\n System.exit(0);\n }\n }\n }\n else\n {\n System.out.println(\"Server group>> \"+svgp); \n }\n \n //---------------------------\n\n //request the authentication method from the servergroup\n AuthenticationType authType = null;\n try {\n authType = getAuthenticationType(svgp);\n } catch (SessionException sesEx) {\n \n if (sesEx.getErrno() == Constants.CONN_FAILED)\n {\n this._logger.error(\"Unable to connect to server group '\" +\n svgp+\"'.\\nPlease check network status and \"+\n \"FEI domain file configuration.\");\n \n// this._logger.severe(\"Unable to authenticate for group '\"+svgp+\n// \"' due to connection failure. Possible network issue.\");\n }\n else\n {\n this._logger.severe(\"Authentication Error! Unable to query server \"+\n \"authentication method for servergroup '\"+svgp + \"'. (\"+\n sesEx.getErrno()+\")\");\n }\n _logger.trace(null,sesEx);\n return false;\n }\n \n final String pwdPrompt = PasswordUtil.getPrompt(authType);\n\n //---------------------------\n \n if (user == null) \n {\n System.out.print(\"User name>> \");\n user = this._readTTYLine();\n user = user.trim();\n } \n else\n {\n System.out.print(\"User name>> \"+user);\n }\n \n boolean ok = false; \n while (!ok)\n { \n password = ConsolePassword.getPassword(pwdPrompt+\">> \");\n //System.out.println(\"\");\n password = password.trim();\n if (!password.equals(\"\"))\n ok = true; \n }\n \n //System.out.println(\"\");\n //password = password.trim();\n \n if (password.equalsIgnoreCase(\"abort\") || password.equalsIgnoreCase(\"exit\") ||\n password.equalsIgnoreCase(\"quit\") || password.equalsIgnoreCase(\"bye\")) \n {\n System.exit(0);\n }\n \n \n //create the encrypter for passwords\n String encrypted = null;\n try {\n encrypted = this._encrypter.encrypt(password);\n } catch (Exception ex) {\n this._logger.severe(\"Password encrypt Error! Could not write login credentials.\");\n _logger.trace(null,ex);\n return false;\n }\n \n\n \n UserToken userToken = null;\n String authToken = encrypted;\n try {\n userToken = getAuthenticationToken(svgp, user, encrypted);\n } catch (SessionException sesEx) {\n this._logger.severe(\"Authentication Error! Could not authenticate \"+\n \"user '\"+user+\"' for servergroup '\"+svgp + \"'.\"); \n _logger.trace(null,sesEx);\n return false;\n }\n \n \n //user was not authenticated\n if (userToken == null || !userToken.isValid())\n {\n this._logger.severe(\"Authentication Error: Could not authenticate \"+\n \"user '\"+user+\"' for servergroup '\"+svgp + \"'.\"); \n return false;\n }\n \n this._loginReader.setUsername(svgp, user);\n this._loginReader.setPassword(svgp, userToken.getToken());\n this._loginReader.setExpiry( svgp, userToken.getExpiry());\n \n \n boolean success = true;\n try {\n this._loginReader.commit();\n } catch (IOException ioEx) {\n this._logger.severe(\"Login File Error! Could not write login credentials.\");\n _logger.trace(null, ioEx);\n success = false;\n ++this._errorCount;\n }\n return success;\n \n }", "@Test\n void testGetRegistrarForUser_noAccess_isNotAdmin() {\n expectGetRegistrarFailure(\n REAL_CLIENT_ID_WITHOUT_CONTACT,\n USER,\n \"user [email protected] doesn't have access to registrar NewRegistrar\");\n verify(lazyGroupsConnection).get();\n }", "public void testExternalGroupsSupported()\n {\n _ruleSet.grant(1, \"extgroup1\", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n _ruleSet.grant(2, \"extgroup2\", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);\n assertEquals(2, _ruleSet.getRuleCount());\n\n assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"usera\", \"extgroup1\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n assertEquals(Result.DENIED, _ruleSet.check(TestPrincipalUtils.createTestSubject(\"userb\", \"extgroup2\"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));\n }", "@Test\n public void makeCredentialAndGetAssertionWithAllowCredential() throws VirgilException, WebAuthnException, CborException {\n AuthenticatorMakeCredentialOptions makeCredentialOptions = AuthenticatorMakeCredentialOptions.fromJSON(MAKE_CREDENTIAL_JSON);\n AttestationObject attObj = authenticator.makeCredential(makeCredentialOptions);\n byte[] cborEncoded = attObj.asCBOR();\n\n ByteArrayInputStream bais = new ByteArrayInputStream(cborEncoded);\n Map decoded = (Map) new CborDecoder(bais).decode().get(0);\n String fmt = ((UnicodeString) decoded.get(new UnicodeString(\"fmt\"))).getString();\n assertEquals(fmt, \"none\");\n\n byte[] credentialId = attObj.getCredentialId();\n\n // Now let's see if we can generate an assertion based on the returned credential ID\n AuthenticatorGetAssertionOptions getAssertionOptions = AuthenticatorGetAssertionOptions.fromJSON(GET_ASSERTION_JSON);\n //getAssertionOptions.allowCredentialDescriptorList.clear();\n getAssertionOptions.allowCredentialDescriptorList.add(new PublicKeyCredentialDescriptor(\"public-key\", credentialId, null));\n\n AuthenticatorGetAssertionResult getAssertionResult = authenticator.getAssertion(getAssertionOptions, new CredentialSelector() {\n @Override\n public PublicKeyCredentialSource selectFrom(List<PublicKeyCredentialSource> credentialList) {\n return credentialList.get(0);\n }\n });\n\n ByteBuffer resultBuf = ByteBuffer.allocate(getAssertionOptions.clientDataHash.length + getAssertionResult.authenticatorData.length);\n resultBuf.put(getAssertionResult.authenticatorData);\n resultBuf.put(getAssertionOptions.clientDataHash);\n byte[] signedData = resultBuf.array();\n List<PublicKeyCredentialSource> sources = this.credentialSafe.getKeysForEntity(makeCredentialOptions.rpEntity.id);\n PublicKeyCredentialSource source = sources.get(sources.size() - 1);\n KeyPair keyPair = this.credentialSafe.getKeyPairByAlias(source.keyPairAlias);\n assertTrue(this.cryptography.verifySignature(keyPair.getPublic(), signedData, getAssertionResult.signature));\n }", "@Override\n\tpublic void credite() {\n\t\t\n\t}", "@Test\n public void updateAccept() throws Exception {\n\n }", "public Boolean setFloodPerm(String floodPerm) throws PermissionDeniedException;", "public String isValidAgentLogin(String userName, String password);", "@Test(description=\"Retrieve consumer\")\n\tpublic void test_consumerRetrieve() {\n\t\tKatelloUtils.sshOnClient(\"subscription-manager clean\");\n\t\tKatelloSystem sys = new KatelloSystem(this.system_name, this.org_name, null);\n\t\texec_result = sys.rhsm_register(); \n\t\tAssert.assertTrue(exec_result.getExitCode().intValue() == 0, \"Check - return code\");\n\t\t\n\t\texec_result = sys.rhsm_identity();\n\t\tString id = KatelloCli.grepCLIOutput(\"Current identity is\", getOutput(exec_result).trim(),1);\n\n\t\t\n\t\texec_result = KatelloUtils.sshOnClient(\"curl -H \\\"Content-Type: application/json\\\" -H \\\"Accept: application/json\\\" -# -k -u \" + user_name + \":\" + KatelloUser.DEFAULT_USER_PASS + \" https://localhost/\"+ System.getProperty(\"katello.product\", \"katello\") + \"/api/consumers/\" + id);\n\t\tAssert.assertTrue(getOutput(exec_result).replaceAll(\"\\n\", \"\").contains(\"User \" + user_name + \" is not allowed to access api/systems/show\"), \"Check - access denied output\");\n\t\t\n\t\texec_result = KatelloUtils.sshOnClient(\"curl -H \\\"Content-Type: application/json\\\" -H \\\"Accept: application/json\\\" -# -k -u \" + KatelloUser.DEFAULT_ADMIN_PASS + \":\" + KatelloUser.DEFAULT_ADMIN_PASS + \" https://localhost/\" + System.getProperty(\"katello.product\", \"katello\") + \"/api/consumers/\" + id);\n\t\tAssert.assertFalse(getOutput(exec_result).replaceAll(\"\\n\", \"\").contains(\"User \" + KatelloUser.DEFAULT_ADMIN_PASS + \" is not allowed to access api/systems/show\"), \"Check - access granted output\");\n\n\t}", "@Test\n\tpublic void test04_RefuseARequest(){\n\t\tinfo(\"Test 04: Refuse a request\");\n\t\tinfo(\"prepare data\");\n\t\t/*Create data test*/\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\n\t\t//createRequestsConnections();\n\t\t/*Step Number: 1\n\t\t *Step Name: Refuse a request\n\t\t *Step Description: \n\t\t\t- Login as mary\n\t\t\t- Open intranet homepage\n\t\t\t- On this gadget, mouse over an invitation of Jack(demo)\n\t\t\t- Click on Refuse icon\n\t\t *Input Data: \n\n\t\t *Expected Outcome: \n\t\t\t- Invitations of root, james are displayed on Invitation gadget\n\t\t\t- The Accept and Refuse button are displayed.\n\t\t\t- The invitation of jack fades out and is permanently removed from the list\n\t\t\t- Requests of James is moved to the top of the gadget*/\n\t\tinfo(\"Sign in with mary account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"Sign in with john account\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tmouseOver(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2),true);\n\t\tUtils.pause(2000);\n\t\tclick(hp.ELEMENT_INVITATIONS_PEOPLE_REFUSE_BTN.replace(\"${name}\",username2), 2,true);\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\tinfo(\"Clear Data\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t}", "@Test\n public void testFailureParUsedByOtherClient() throws Exception {\n // create client dynamically\n String victimClientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.FALSE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation victimOidcCRep = getClientDynamically(victimClientId);\n String victimClientSecret = victimOidcCRep.getClientSecret();\n assertEquals(Boolean.FALSE, victimOidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(victimOidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n assertEquals(OIDCLoginProtocol.CLIENT_SECRET_BASIC, victimOidcCRep.getTokenEndpointAuthMethod());\n\n authManageClients();\n\n String attackerClientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation attackerOidcCRep = getClientDynamically(attackerClientId);\n assertEquals(Boolean.TRUE, attackerOidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(attackerOidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n assertEquals(OIDCLoginProtocol.CLIENT_SECRET_BASIC, attackerOidcCRep.getTokenEndpointAuthMethod());\n\n // Pushed Authorization Request\n oauth.clientId(victimClientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(victimClientId, victimClientSecret);\n assertEquals(201, pResp.getStatusCode());\n String requestUri = pResp.getRequestUri();\n\n // Authorization Request with request_uri of PAR\n // remove parameters as query strings of uri\n // used by other client\n oauth.clientId(attackerClientId);\n oauth.redirectUri(null);\n oauth.scope(null);\n oauth.responseType(null);\n oauth.requestUri(requestUri);\n String state = oauth.stateParamRandom().getState();\n oauth.stateParamHardcoded(state);\n UriBuilder b = UriBuilder.fromUri(oauth.getLoginFormUrl());\n driver.navigate().to(b.build().toURL());\n OAuthClient.AuthorizationEndpointResponse errorResponse = new OAuthClient.AuthorizationEndpointResponse(oauth);\n Assert.assertFalse(errorResponse.isRedirected());\n }", "@Test\n public void testConnectionWhenBadUser() {\n \tForm form = new Form();\n \tform.param(\"login\", \"test\");\n \tform.param(\"psw\", \"12345\");\n \t\n \tResponse connect = target.path(auth).request().post(Entity.form(form));\n \tassertEquals(530,connect.getStatus());\n }", "@Test\n public void testBasicAuthUserSuccess() {\n HttpAuthenticationFeature feature = \n HttpAuthenticationFeature.basic(\"admin\", \"admin\");\n Client client = ClientBuilder.newClient();\n URI uri = UriBuilder\n .fromUri(APPLICATION_NAME + APPLICATION_API_VERSION)\n .scheme(\"http\")\n .host(\"localhost\")\n .port(8080)\n .build();\n WebTarget webTarget = client\n .register(feature)\n .target(uri)\n .path(\"user\");\n Response response = webTarget\n .request(APPLICATION_JSON)\n .get();\n assertThat(response.getStatus(), is(200));\n }" ]
[ "0.5864683", "0.5767358", "0.5680803", "0.56550217", "0.5618339", "0.55840576", "0.5560663", "0.54996383", "0.54993236", "0.54260516", "0.5401129", "0.53746754", "0.53593814", "0.5300327", "0.5289086", "0.52781725", "0.52738017", "0.52665025", "0.52612734", "0.5245168", "0.522637", "0.52181983", "0.5217992", "0.52158266", "0.51842964", "0.51761335", "0.5175442", "0.51723367", "0.5171258", "0.51569074", "0.5129916", "0.51253396", "0.51112646", "0.5094641", "0.5094301", "0.5094135", "0.5091717", "0.50830096", "0.50799215", "0.5073933", "0.5071444", "0.5065899", "0.5065411", "0.5056057", "0.5053581", "0.5048769", "0.503596", "0.5029149", "0.5023792", "0.50154686", "0.5007624", "0.50052166", "0.5005144", "0.4996924", "0.4988361", "0.4984806", "0.49747908", "0.49659485", "0.49650523", "0.496143", "0.49589458", "0.49585247", "0.49564525", "0.49493885", "0.49458295", "0.49275208", "0.49115908", "0.4910658", "0.49058083", "0.48990703", "0.48986393", "0.48976007", "0.48943076", "0.48908073", "0.48807177", "0.4877237", "0.4873407", "0.48717934", "0.48666155", "0.48660016", "0.48620075", "0.4856024", "0.4850963", "0.48376793", "0.4830037", "0.48265672", "0.4814326", "0.48041213", "0.48033535", "0.47982827", "0.4796223", "0.47822803", "0.47813419", "0.4779066", "0.47787982", "0.47740033", "0.47658435", "0.4761499", "0.4758617", "0.47485384" ]
0.637144
0
Test the internal callbacks used for what else... testing
@Test public void testInternalCallbacks() throws Exception { final CacheTransactionManager txMgr = getCache().getCacheTransactionManager(); final String rgnName1 = getUniqueName() + "_1"; final String rgnName2 = getUniqueName() + "_2"; final String rgnName3 = getUniqueName() + "_3"; Region rgn1 = getCache().createRegion(rgnName1, getRegionAttributes()); Host host = Host.getHost(0); VM vm0 = host.getVM(0); VM vm1 = host.getVM(1); SerializableRunnable createRgn = new SerializableRunnable("testInternalCallbacks: initial configuration") { @Override public void run() { try { Region rgn1a = getCache().createRegion(rgnName1, getRegionAttributes()); Region rgn2 = getCache().createRegion(rgnName2, getRegionAttributes()); Region rgn3 = getCache().createRegion(rgnName3, getRegionAttributes(Scope.DISTRIBUTED_NO_ACK)); rgn1a.create("key", null); rgn2.create("key", null); rgn3.create("key", null); } catch (CacheException e) { Assert.fail("While creating region", e); } } }; vm0.invoke(createRgn); vm1.invoke(createRgn); // Standard commit check txMgr.begin(); rgn1.put("key", "value0"); txMgr.commit(); SerializableRunnable checkRgn1 = new SerializableRunnable("testInternalCallbacks: check rgn1 valus") { @Override public void run() { Region rgn1a = getCache().getRegion(rgnName1); assertNotNull(rgn1a); assertEquals("value0", rgn1a.getEntry("key").getValue()); } }; vm0.invoke(checkRgn1); vm1.invoke(checkRgn1); { final byte[] cbSensors = {0, 0, 0, 0, 0, 0, 0, 0, 0}; txMgr.begin(); ((TXStateProxyImpl) ((TXManagerImpl) txMgr).getTXState()).forceLocalBootstrap(); setInternalCallbacks(((TXManagerImpl) txMgr).getTXState(), cbSensors); rgn1.put("key", "value1"); txMgr.commit(); for (int i = cbSensors.length - 3; i >= 0; --i) { assertEquals("Internal callback " + i + " was not called the expected number of times!", (byte) 1, cbSensors[i]); } for (int i = cbSensors.length - 1; i > cbSensors.length - 3; --i) { assertEquals( "Internal \"during\" callback " + i + " invoked an unexpected number of times!", (byte) 2, cbSensors[i]); } } SerializableRunnable checkRgn1Again = new SerializableRunnable("testInternalCallbacks: validate remote values") { @Override public void run() { Region rgn1a = getCache().getRegion(rgnName1); assertNotNull(rgn1a); assertEquals("value1", rgn1a.getEntry("key").getValue()); } }; vm0.invoke(checkRgn1Again); vm1.invoke(checkRgn1Again); // Try 2 regions Region rgn2 = getCache().createRegion(rgnName2, getRegionAttributes()); txMgr.begin(); rgn1.put("key", "value2"); rgn2.put("key", "value2"); txMgr.commit(); SerializableRunnable checkRgn12 = new SerializableRunnable("testInternalCallbacks: check rgn1 valus") { @Override public void run() { Region rgn1a = getCache().getRegion(rgnName1); assertNotNull(rgn1a); assertEquals("value2", rgn1a.getEntry("key").getValue()); Region rgn2a = getCache().getRegion(rgnName2); assertNotNull(rgn2a); assertEquals("value2", rgn2a.getEntry("key").getValue()); } }; vm0.invoke(checkRgn12); vm1.invoke(checkRgn12); { final byte[] cbSensors = {0, 0, 0, 0, 0, 0, 0, 0, 0}; txMgr.begin(); ((TXStateProxyImpl) ((TXManagerImpl) txMgr).getTXState()).forceLocalBootstrap(); setInternalCallbacks(((TXManagerImpl) txMgr).getTXState(), cbSensors); rgn1.put("key", "value3"); rgn2.put("key", "value3"); txMgr.commit(); for (int i = cbSensors.length - 3; i >= 0; i--) { assertEquals("Internal callback " + i + " was not called the expected number of times!", (byte) 1, cbSensors[i]); } for (int i = cbSensors.length - 1; i > cbSensors.length - 3; --i) { assertEquals( "Internal \"during\" callback " + i + " invoked an unexpected number of times!", (byte) 2, cbSensors[i]); } } SerializableRunnable checkRgn12Again = new SerializableRunnable("testInternalCallbacks: validate both regions remote values") { @Override public void run() { Region rgn1a = getCache().getRegion(rgnName1); assertNotNull(rgn1a); assertEquals("value3", rgn1a.getEntry("key").getValue()); Region rgn2a = getCache().getRegion(rgnName2); assertNotNull(rgn2a); assertEquals("value3", rgn2a.getEntry("key").getValue()); } }; vm0.invoke(checkRgn12Again); vm1.invoke(checkRgn12Again); // Try a third region (D_NO_ACK) Region rgn3 = getCache().createRegion(rgnName3, getRegionAttributes(Scope.DISTRIBUTED_NO_ACK)); txMgr.begin(); rgn1.put("key", "value4"); rgn2.put("key", "value4"); rgn3.put("key", "value4"); txMgr.commit(); SerializableRunnable checkRgn123 = new SerializableRunnable("testInternalCallbacks: check rgn1 valus") { @Override public void run() { Region rgn1a = getCache().getRegion(rgnName1); assertNotNull(rgn1a); assertEquals("value4", rgn1a.getEntry("key").getValue()); Region rgn2a = getCache().getRegion(rgnName2); assertNotNull(rgn2a); assertEquals("value4", rgn2a.getEntry("key").getValue()); Region rgn3a = getCache().getRegion(rgnName3); assertNotNull(rgn3a); assertEquals("value4", rgn3a.getEntry("key").getValue()); } }; vm0.invoke(checkRgn123); vm1.invoke(checkRgn123); { final byte[] cbSensors = {0, 0, 0, 0, 0, 0, 0, 0, 0}; txMgr.begin(); ((TXStateProxyImpl) ((TXManagerImpl) txMgr).getTXState()).forceLocalBootstrap(); setInternalCallbacks(((TXManagerImpl) txMgr).getTXState(), cbSensors); rgn1.put("key", "value5"); rgn2.put("key", "value5"); rgn3.put("key", "value5"); txMgr.commit(); for (int i = cbSensors.length - 3; i >= 0; i--) { assertEquals("Internal callback " + i + " was not called the expected number of times!", (byte) 1, cbSensors[i]); } for (int i = cbSensors.length - 1; i > cbSensors.length - 3; --i) { assertEquals( "Internal \"during\" callback " + i + " invoked an unexpected number of times!", (byte) 2, cbSensors[i]); } } SerializableRunnable checkRgn123Again = new SerializableRunnable("testInternalCallbacks: validate both regions remote values") { @Override public void run() { Region rgn1a = getCache().getRegion(rgnName1); assertNotNull(rgn1a); assertEquals("value5", rgn1a.getEntry("key").getValue()); Region rgn2a = getCache().getRegion(rgnName2); assertNotNull(rgn2a); assertEquals("value5", rgn2a.getEntry("key").getValue()); Region rgn3a = getCache().getRegion(rgnName3); assertNotNull(rgn3a); assertEquals("value5", rgn3a.getEntry("key").getValue()); } }; vm0.invoke(checkRgn123Again); vm1.invoke(checkRgn123Again); rgn1.destroyRegion(); rgn2.destroyRegion(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void assertCallbacksReset()\n {\n int expectedCalls = 0;\n this.assertCallsExpected(expectedCalls);\n }", "@Test\n public void testRwbmInternal()\n {\n generateEvents(\"dist-rwbm-internal-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "@Override\n\tpublic void onCallback() {\n\t\t\n\t}", "@Test\n public void testGetEmailFromUser() throws InterruptedException {\n Callback tstCallBackSuccess = new Callback() {\n @Override\n public void onSuccess(Map<String, Object> data, String message) {\n Assert.assertEquals(data.get(\"userID\"), \"En8fRBqxPiZ13HvOabUx7uOXN2T2\");\n }\n\n @Override\n public void onFailure(String error, MyError.ErrorCode errorCode) {\n // bad\n Assert.assertEquals(1,0);\n }\n };\n Utils utils = Utils.getInstance();\n utils.getUserFromEmail(\"[email protected]\", tstCallBackSuccess);\n\n\n // now test email that is not in\n Callback tstCallBackFailure = new Callback() {\n @Override\n public void onSuccess(Map<String, Object> data, String message) {\n // this shouldnt happen\n Assert.assertEquals(1,0);\n }\n\n @Override\n public void onFailure(String error, MyError.ErrorCode errorCode) {\n Assert.assertEquals(errorCode, MyError.ErrorCode.NOT_FOUND);\n Assert.assertEquals(error, \"No Matching Email\");\n }\n };\n\n utils.getUserFromEmail(\"[email protected]\", tstCallBackFailure);\n\n\n Thread.sleep(2000);\n }", "@Override\n\t\t\tpublic void callbackCall() {\n\t\t\t}", "@Test\n public void testNearBack()\n {\n String sName = \"near-back-listener\";\n generateEvents(sName);\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "@Override\n\tpublic void callback() {\n\t}", "public void callback() {\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\n\tpublic void onTestSuccess(ITestResult arg0) {\n\n\t}", "private void test() {\n\n\t}", "static void testMusicOnCompletionListener()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t}\n\t\t\n\t\tmusicOnCompletionListener.onCompletion(null);\n\t}", "@Test\n public void testNear()\n {\n String sName = \"near-client-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }", "@Test\n\tpublic void testUpdatePoStatusErrorListenerSuccesTest() {\n\t\ttry{\n\t\t\t//Is used in soap request preparation because value is used in reply soap header.\n\t\t\t final String callbackRefMockUri = mockOsbBusinessService(\n\t\t\t //\"SalesOrderErrorListener/operations/receiveSalesOrderLineErrorMessage/business-service/SalesOrderServiceCallback\",\n\t\t\t PATH_UPDATE_STATUS_CALLBACK,\n\t\t\t updatePoStatusCallbackPortMock);\t\n\t\t\t \n\t\t\t mockOsbBusinessService(\n\t\t\t PATH_RESPONSE_RETRY_WRAPPER,\n\t\t\t responseRetryWrapperMock);\n\t\n\t\t\tfinal String requestString = new ParameterReplacer(readClasspathFile(\"Request_UpdatePOStatusErrorListener.xml\"))\n\t\t\t\t\t.replace(REPLACE_PARAM_CORRELATION_ID, randomCorrelationId)\n\t\t\t\t\t.replace(REPLACE_PARAM_PURCHASE_ORDER_NUMBER, randomPoNumber)\n\t\t\t\t\t.replace(REPLACE_PARAM_COMBOX_ID, randomCoboxId)\n\t\t\t\t\t.replace(REPLY_TO, callbackRefMockUri)\n\t\t\t\t\t.replace(MESSAGE_ID, randomMessageId).build();\n\t\t\t\t\t\n\t\n\t\t\tLOGGER.info(\"+++ request \" + requestString);\n\t\n\t\t\tinvokeOsbProxyService(PATH_SERVICE, requestString);\n\t\n\t\t\t// P1002-ORDER-SENT-ERR must be written once to BAL\n\t\t\tassertThat(\"BAL not written for P1002-ORDER-SENT-ERR\",\n\t\t\t\t\t\t\tgetOtmDao().query(createBALQuery(\"P1002-ORDER-SENT-ERR\",randomCorrelationId)).size() == 1);\n\t\t\t// P1002-ORDER-SENT-ERR must be written once to OTM PO\n\t\t\tassertThat(\"OTM PO not written for P1002-ORDER-SENT-ERR\",\n\t\t\t\t\tgetOtmDao().query(createOSMPOQuery(\"P1002-ORDER-SENT-ERR\",randomCorrelationId)).size() == 1);\n\t\n\t\n\t\t\t\n\t\t\tassertThat(\"updatePoStatusCallbackPortMock is not invocked!\",updatePoStatusCallbackPortMock.hasBeenInvoked());\n\t\t\t//This should not be invoked\n\t\t\tassertThat(\"responseRetryWrapperMock should not be invocked!\",!responseRetryWrapperMock.hasBeenInvoked());\n\t\n\t\t\t\n\t\t\t//Get message from process as it is\n\t\t\tString updatePoStatusCallbackPortMockMsg = updatePoStatusCallbackPortMock.getLastReceivedRequest();\n\t\t\t\n\t\t\t//Get example message and change dynamic used values.\n\t\t\tString updatePoStatusCallbackPortMockMsgExpected = new ParameterReplacer(readClasspathFile(\"Callback_UpdatePOStatusErrorListener.xml\")).replace(REPLACE_PARAM_CORRELATION_ID, randomCorrelationId)\n\t\t\t\t\t.replace(REPLACE_PARAM_PURCHASE_ORDER_NUMBER, randomPoNumber)\n\t\t\t\t\t.replace(REPLACE_PARAM_COMBOX_ID, randomCoboxId)\n\t\t\t\t\t.replace(REPLY_TO, callbackRefMockUri)\n\t\t\t\t\t.replace(MESSAGE_ID, randomMessageId).build();\n\t\t\t\t\t\n\t\t\t\n\t\t\tassertXmlEquals(updatePoStatusCallbackPortMockMsgExpected,\tupdatePoStatusCallbackPortMockMsg);\n\t\t}catch(ServiceException e) {\n\t\t\tfail();\n\t\t}\n\n\t}", "@Override\r\n\tpublic void onTestSuccess(ITestResult arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onTestSuccess(ITestResult arg0) {\n\t\t\r\n\t}", "public void testExecute() {\n\t\taes.execute();\n\t\t\n\t\tassertTrue(a.wasStopPollingMessagesCalled);\n\t\tassertTrue(osm.wasWriteCalled);\n\t}", "@Test\n public void getCallbackTest() {\n final String callbackId = startCallbackTest();\n\n Callback callback = callbackRepository.findByCallbackId(callbackId);\n assertNotNull(callback);\n assertEquals(callback.getStatus(), StatusEnum.NOT_STARTED.toString());\n\n GetStatusResponse getStatusResponse = callbackApiService.getCallbackStatus(callbackId);\n\n assertEquals(getStatusResponse.getStatus(), callback.getStatus());\n assertEquals(getStatusResponse.getBody(), getStatusResponse.getBody());\n assertEquals(getStatusResponse.getDetail(), getStatusResponse.getDetail());\n }", "public void callback();", "@Test\n public void testRwbmInternalBoth()\n {\n generateEvents(\"dist-rwbm-internal-both\");\n checkEvents(true, true);\n }", "public void testReceiveFeedback() {\n\n\t}", "@Test\n public void testNearFront()\n {\n String sName = \"near-front-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }", "@Override\n\tpublic void callback(Object o) {}", "public void testInternalListeners() {\n\n\t\tLogAndTraceBroker broker = LogAndTraceBroker.getBroker();\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"WARNING\");\n\t\tbroker.registerInternalListeners();\n\n\t\tList<?> listeners = broker.getLogListeners();\n\t\tverify(\"Count of internal log listeners\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(2));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of internal trace listeners\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(1));\n\n\t\t// Make sure reregistration doesn't register two copies\n\t\tbroker.registerInternalListeners();\n\n\t\tlisteners = broker.getLogListeners();\n\t\tverify(\"Count of internal log listeners after reregister\", EQUAL, new Integer(listeners\n\t\t\t\t.size()), new Integer(2));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of internal trace listeners after reregister\", EQUAL, new Integer(listeners\n\t\t\t\t.size()), new Integer(1));\n\n\t\tverify(\"testInternalListeners: isLoggableMessage(OFF) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.OFF) == false);\n\t\tverify(\"testInternalListeners: isLoggableTrace(OFF) != false\", broker\n\t\t\t\t.isLoggableTrace(Level.OFF) == false);\n\t\tverify(\"testInternalListeners: isLoggableMessage(+1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.SEVERE) == true);\n\t\tverify(\"testInternalListeners: isLoggableTrace(+1) != true\", broker\n\t\t\t\t.isLoggableTrace(Level.SEVERE) == true);\n\t\tverify(\"testInternalListeners: isLoggableMessage(==) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.WARNING) == true);\n\t\tverify(\"testInternalListeners: isLoggableTrace(==) != true\", broker\n\t\t\t\t.isLoggableTrace(Level.WARNING) == true);\n\t\tverify(\"testInternalListeners: isLoggableMessage(-1) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.INFO) == false);\n\t\tverify(\"testInternalListeners: isLoggableTrace(-1) != false\", broker\n\t\t\t\t.isLoggableTrace(Level.INFO) == false);\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"OFF\");\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\t}", "@Test\n @MediumTest\n public void initializationCallbackErrorReported() throws Exception {\n CallbackHelper compositorErrorCallback = new CallbackHelper();\n mLinkClickHandler = new TestLinkClickHandler();\n PostTask.postTask(TaskTraits.UI_DEFAULT, () -> {\n PaintPreviewTestService service =\n new PaintPreviewTestService(mTempFolder.getRoot().getPath());\n // Use the wrong URL to simulate a failure.\n mPlayerManager = new PlayerManager(new GURL(\"about:blank\"), getActivity(), service,\n TEST_DIRECTORY_KEY, new PlayerManager.Listener() {\n @Override\n public void onCompositorError(int status) {\n compositorErrorCallback.notifyCalled();\n }\n\n @Override\n public void onViewReady() {\n Assert.fail(\"View Ready callback occurred, but expected a failure.\");\n }\n\n @Override\n public void onFirstPaint() {}\n\n @Override\n public void onUserInteraction() {}\n\n @Override\n public void onUserFrustration() {}\n\n @Override\n public void onPullToRefresh() {\n Assert.fail(\"Unexpected overscroll refresh attempted.\");\n }\n\n @Override\n public void onLinkClick(GURL url) {\n mLinkClickHandler.onLinkClicked(url);\n }\n\n @Override\n public boolean isAccessibilityEnabled() {\n return false;\n }\n\n @Override\n public void onAccessibilityNotSupported() {}\n }, 0xffffffff, false);\n mPlayerManager.setCompressOnClose(false);\n });\n compositorErrorCallback.waitForFirst();\n }", "public void onTestSuccess(ITestResult arg0) {\n\t\t\n\t}", "public void onTestSuccess(ITestResult arg0) {\n\t\t\n\t}", "VerifyBasicCallback() {\n m_transactionType = null;\n m_procedureName = null;\n }", "protected abstract void beforeCall();", "public Response callback() throws Exception;", "public void testListeners() {\n\n\t\tLogAndTraceBroker broker = LogAndTraceBroker.getBroker();\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"WARNING\");\n\t\tbroker.registerInternalListeners();\n\n\t\tLogListener logL = new LogListener() {\n\n\t\t\tpublic void log(Level pLevel, String pMessageKey, String pMessage, Object[] pParameters) {\n\t\t\t\tString s = \"log(\" + pLevel.intValue() + \",\" + pMessageKey + \",\" + pMessage + \",\"\n\t\t\t\t\t\t+ pParameters.length + \")\";\n\t\t\t\tverify(\"log(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t};\n\t\tbroker.addLogListener(logL);\n\n\t\tTraceListener traceL = new TraceListener() {\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage,\n\t\t\t\t\tThrowable pThrown) {\n\t\t\t\tString s = \"trace(\" + pLevel.intValue() + \",\" + pOrigin.toString() + \",\" + pMessage\n\t\t\t\t\t\t+ \",\" + pThrown.getMessage() + \")\";\n\t\t\t\tverify(\"trace(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage) {\n\t\t\t\tString s = \"trace(\" + pLevel.intValue() + \",\" + pOrigin.toString() + \",\" + pMessage\n\t\t\t\t\t\t+ \")\";\n\t\t\t\tverify(\"trace(3)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t};\n\t\tbroker.addTraceListener(traceL);\n\n\t\t// At this point, should have the three internal and two external\n\t\t// listeners\n\t\tList<?> listeners = broker.getLogListeners();\n\t\tverify(\"Count of log listeners\", EQUAL, new Integer(listeners.size()), new Integer(3));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of trace listeners\", EQUAL, new Integer(listeners.size()), new Integer(2));\n\n\t\tLogListener logDummy = new LogListener() {\n\n\t\t\tpublic void log(Level pLevel, String pMessageKey, String pMessage, Object[] pParameters) {\n\t\t\t\tString s = \"dummy log(\" + pLevel.intValue() + \",\" + pMessageKey + \",\" + pMessage\n\t\t\t\t\t\t+ \",\" + pParameters.length + \")\";\n\t\t\t\tverify(\"log(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t};\n\n\t\tbroker.removeLogListener(logDummy);\n\n\t\t// At this point, should still have the three internal and two external\n\t\t// listeners (previous removeLogListener did nothing)\n\t\tlisteners = broker.getLogListeners();\n\t\tverify(\"Count of log listeners\", EQUAL, new Integer(listeners.size()), new Integer(3));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of trace listeners\", EQUAL, new Integer(listeners.size()), new Integer(2));\n\n\t\tverify(\"testListeners1: isLoggableMessage(OFF) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.OFF) == false);\n\t\tverify(\"testListeners1: isLoggableTrace(OFF) != false\",\n\t\t\t\tbroker.isLoggableTrace(Level.OFF) == false);\n\t\tverify(\"testListeners1: isLoggableMessage(+1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.SEVERE) == true);\n\t\tverify(\"testListeners1: isLoggableTrace(+1) != true\",\n\t\t\t\tbroker.isLoggableTrace(Level.SEVERE) == true);\n\t\tverify(\"testListeners1: isLoggableMessage(==) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.WARNING) == true);\n\t\tverify(\"testListeners1: isLoggableTrace(==) != true\",\n\t\t\t\tbroker.isLoggableTrace(Level.WARNING) == true);\n\t\tverify(\"testListeners1: isLoggableMessage(-1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.INFO) == true);\n\t\tverify(\"testListeners1: isLoggableTrace(-1) != true\",\n\t\t\t\tbroker.isLoggableTrace(Level.INFO) == true);\n\n\t\tbroker.removeLogListener(logL);\n\t\tbroker.removeTraceListener(traceL);\n\n\t\t// At this point, should have the three internal listeners\n\t\tlisteners = broker.getLogListeners();\n\t\tverify(\"Count of log listeners - external\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(2));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of trace listeners - external\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(1));\n\n\t\tverify(\"testListeners2: isLoggableMessage(+1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.SEVERE) == true);\n\t\tverify(\"testListeners2: isLoggableTrace(+1) != true\",\n\t\t\t\tbroker.isLoggableTrace(Level.SEVERE) == true);\n\t\tverify(\"testListeners2: isLoggableMessage(==) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.WARNING) == true);\n\t\tverify(\"testListeners2: isLoggableTrace(==) != true\",\n\t\t\t\tbroker.isLoggableTrace(Level.WARNING) == true);\n\t\tverify(\"testListeners2: isLoggableMessage(-1) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.INFO) == false);\n\t\tverify(\"testListeners2: isLoggableTrace(-1) != false\",\n\t\t\t\tbroker.isLoggableTrace(Level.INFO) == false);\n\n\t\tList<LogListener> logListeners = broker.getLogListeners();\n\t\tIterator<LogListener> iterL = logListeners.iterator();\n\t\twhile (iterL.hasNext()) {\n\t\t\tbroker.removeLogListener(iterL.next());\n\t\t}\n\n\t\tList<TraceListener> traceListeners = broker.getTraceListeners();\n\t\tIterator<TraceListener> iterT = traceListeners.iterator();\n\t\twhile (iterT.hasNext()) {\n\t\t\tbroker.removeTraceListener(iterT.next());\n\t\t}\n\n\t\t// At this point, should have no listeners\n\t\tlisteners = broker.getLogListeners();\n\t\tverify(\"Count of log listeners - all\", EQUAL, new Integer(listeners.size()), new Integer(0));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of trace listeners - all\", EQUAL, new Integer(listeners.size()), new Integer(\n\t\t\t\t0));\n\n\t\tverify(\"testListeners3: isLoggableMessage(+1) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.SEVERE) == false);\n\t\tverify(\"testListeners3: isLoggableTrace(+1) != false\",\n\t\t\t\tbroker.isLoggableTrace(Level.SEVERE) == false);\n\t\tverify(\"testListeners3: isLoggableMessage(==) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.WARNING) == false);\n\t\tverify(\"testListeners3: isLoggableTrace(==) != false\", broker\n\t\t\t\t.isLoggableTrace(Level.WARNING) == false);\n\t\tverify(\"testListeners3: isLoggableMessage(-1) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.INFO) == false);\n\t\tverify(\"testListeners3: isLoggableTrace(-1) != false\",\n\t\t\t\tbroker.isLoggableTrace(Level.INFO) == false);\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"OFF\");\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\t}", "public void onTestSuccess(ITestResult arg0) {\n\t\t\r\n\t}", "@Override\n public void test() {\n \n }", "@Test public void shouldDoSomething() {\n manager.initialize();\n\n // validate that addListener was called\n verify(database).addListener(any(ArticleListener.class));\n }", "@Override\n public void runTest() {\n }", "@Override\n\tpublic void test() {\n\t\t\n\t}", "@Test\r\n\tpublic void test() {\r\n\t\tassertEquals(subscribe.getTopic() , \"room1\");\r\n\t\tassertEquals(subscribe.getTypeMap() , \"Galilei\");\r\n\t\tassertTrue(subscribe.isPossible(server));\r\n\t\tassertTrue(!subscribe2.isPossible(server));\r\n\t}", "public interface TestOnSeparateThreadCallback {\n\n void finish(TestRunner.Stats stats);\n\n}", "@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t}", "protected void javaCallback() {\n\t}", "@Override\n public void onTestSuccess(ITestResult result) {\n\n }", "public void testExternalListeners() {\n\n\t\tLogAndTraceBroker broker = LogAndTraceBroker.getBroker();\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"WARNING\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"WARNING\");\n\n\t\tbroker.addLogListener(new LogListener() {\n\n\t\t\tpublic void log(Level pLevel, String pMessageKey, String pMessage, Object[] pParameters) {\n\t\t\t\tString s = \"log(\" + pLevel.intValue() + \",\" + pMessageKey + \",\" + pMessage + \",\"\n\t\t\t\t\t\t+ pParameters.length + \")\";\n\t\t\t\tverify(\"log(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t});\n\n\t\tbroker.addTraceListener(new TraceListener() {\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage,\n\t\t\t\t\tThrowable pThrown) {\n\t\t\t\tString s = \"trace(\" + pLevel.intValue() + \",\" + pOrigin.toString() + \",\" + pMessage\n\t\t\t\t\t\t+ \",\" + pThrown.getMessage() + \")\";\n\t\t\t\tverify(\"trace(4)\", NOT_EQUAL, s, null);\n\t\t\t}\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage) {\n\t\t\t\tString s = \"trace(\" + pLevel.intValue() + \",\" + pOrigin.toString() + \",\" + pMessage\n\t\t\t\t\t\t+ \")\";\n\t\t\t\tverify(\"trace(3)\", NOT_EQUAL, s, null);\n\t\t\t}\n\t\t});\n\n\t\tList<?> listeners = broker.getLogListeners();\n\t\tverify(\"Count of external log listeners\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(1));\n\t\tlisteners = broker.getTraceListeners();\n\t\tverify(\"Count of external trace listeners\", EQUAL, new Integer(listeners.size()),\n\t\t\t\tnew Integer(1));\n\n\t\tverify(\"testExternalListeners: isLoggableMessage(OFF) != false\", broker\n\t\t\t\t.isLoggableMessage(Level.OFF) == false);\n\t\tverify(\"testExternalListeners: isLoggableTrace(OFF) != false\", broker\n\t\t\t\t.isLoggableTrace(Level.OFF) == false);\n\t\tverify(\"testExternalListeners: isLoggableMessage(+1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.SEVERE) == true);\n\t\tverify(\"testExternalListeners: isLoggableTrace(+1) != true\", broker\n\t\t\t\t.isLoggableTrace(Level.SEVERE) == true);\n\t\tverify(\"testExternalListeners: isLoggableMessage(==) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.WARNING) == true);\n\t\tverify(\"testExternalListeners: isLoggableTrace(==) != true\", broker\n\t\t\t\t.isLoggableTrace(Level.WARNING) == true);\n\t\tverify(\"testExternalListeners: isLoggableMessage(-1) != true\", broker\n\t\t\t\t.isLoggableMessage(Level.INFO) == true);\n\t\tverify(\"testExternalListeners: isLoggableTrace(-1) != true\", broker\n\t\t\t\t.isLoggableTrace(Level.INFO) == true);\n\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.LOG_FILE_LEVEL, \"OFF\");\n\t\tSystem.setProperty(WBEMConfigurationProperties.TRACE_FILE_LEVEL, \"OFF\");\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\t}", "protected void onBSLock() {\n\n }", "@Test\n public void testRwbm()\n {\n generateEvents(\"dist-rwbm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "@Test\n public void testRecordProvidedServices() {\n for (int i = 0; i < 10; i++) {\n presenter.onRecordProvidedService();\n }\n Assert.assertEquals(10, view.getManageRecordProvidedServicesClicks());\n }", "@Override\npublic void onTestSuccess(ITestResult result) {\n\t\n}", "private void doTests()\n {\n doDeleteTest(); // doSelectTest();\n }", "void onTestSuccess(ITestResult result);", "public void testComplete(String msg);", "@Test\n public void roundTrip() throws RemoteException {\n mHbmController.enable(mOnEnabled);\n\n // Should set the appropriate refresh rate for UDFPS and notify the caller.\n verify(mDisplayCallback).onHbmEnabled(eq(DISPLAY_ID));\n verify(mOnEnabled).run();\n\n // Disable the UDFPS mode.\n mHbmController.disable(mOnDisabled);\n\n // Should unset the refresh rate and notify the caller.\n verify(mOnDisabled).run();\n verify(mDisplayCallback).onHbmDisabled(eq(DISPLAY_ID));\n }", "@Test\n public void testLocalClient()\n {\n generateEvents(\"local-client\");\n checkEvents(true, false);\n }", "int callback(int num_msg, Pointer msg, Pointer resp, Pointer _ptr);", "public abstract void actionReal(HttpResponseCallback callback);", "interface Callbacks {\n void pipelineModeChanged(boolean z) throws ;\n\n void requestSent() throws ;\n\n void serverError(int i) throws ;\n }", "@Test\n public void testHandleMessages() throws Exception {\n Controller controller = getController();\n controller.removeOFMessageListeners(OFType.PACKET_IN);\n \n IOFSwitch sw = createMock(IOFSwitch.class);\n expect(sw.getStringId()).andReturn(\"00:00:00:00:00:00:00\").anyTimes();\n expect(sw.getFeaturesReply()).andReturn(new OFFeaturesReply()).anyTimes();\n \n // Build our test packet\n IPacket testPacket = new Ethernet()\n .setSourceMACAddress(\"00:44:33:22:11:00\")\n .setDestinationMACAddress(\"00:11:22:33:44:55\")\n .setEtherType(Ethernet.TYPE_ARP)\n .setPayload(\n new ARP()\n .setHardwareType(ARP.HW_TYPE_ETHERNET)\n .setProtocolType(ARP.PROTO_TYPE_IP)\n .setHardwareAddressLength((byte) 6)\n .setProtocolAddressLength((byte) 4)\n .setOpCode(ARP.OP_REPLY)\n .setSenderHardwareAddress(Ethernet.toMACAddress(\"00:44:33:22:11:00\"))\n .setSenderProtocolAddress(IPv4.toIPv4AddressBytes(\"192.168.1.1\"))\n .setTargetHardwareAddress(Ethernet.toMACAddress(\"00:11:22:33:44:55\"))\n .setTargetProtocolAddress(IPv4.toIPv4AddressBytes(\"192.168.1.2\")));\n byte[] testPacketSerialized = testPacket.serialize();\n \n // Build the PacketIn \n OFPacketIn pi = ((OFPacketIn) new BasicFactory().getMessage(OFType.PACKET_IN))\n .setBufferId(-1)\n .setInPort((short) 1)\n .setPacketData(testPacketSerialized)\n .setReason(OFPacketInReason.NO_MATCH)\n .setTotalLength((short) testPacketSerialized.length);\n \n IOFMessageListener test1 = createMock(IOFMessageListener.class);\n expect(test1.getName()).andReturn(\"test1\").anyTimes();\n expect(test1.isCallbackOrderingPrereq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n expect(test1.isCallbackOrderingPostreq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n expect(test1.receive(eq(sw), eq(pi), isA(FloodlightContext.class))).andThrow(new RuntimeException(\"This is NOT an error! We are testing exception catching.\"));\n IOFMessageListener test2 = createMock(IOFMessageListener.class);\n expect(test2.getName()).andReturn(\"test2\").anyTimes();\n expect(test2.isCallbackOrderingPrereq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n expect(test2.isCallbackOrderingPostreq((OFType)anyObject(), (String)anyObject())).andReturn(false).anyTimes();\n // expect no calls to test2.receive() since test1.receive() threw an exception\n \n replay(test1, test2, sw);\n controller.addOFMessageListener(OFType.PACKET_IN, test1);\n controller.addOFMessageListener(OFType.PACKET_IN, test2);\n try {\n controller.handleMessage(sw, pi, null);\n } catch (RuntimeException e) {\n assertEquals(e.getMessage().startsWith(\"This is NOT an error!\"), true);\n }\n verify(test1, test2, sw);\n \n // verify STOP works\n reset(test1, test2, sw);\n expect(test1.receive(eq(sw), eq(pi), isA(FloodlightContext.class))).andReturn(Command.STOP); \n expect(test1.getId()).andReturn(0).anyTimes();\n expect(sw.getStringId()).andReturn(\"00:00:00:00:00:00:00\").anyTimes();\n expect(sw.getFeaturesReply()).andReturn(new OFFeaturesReply()).anyTimes();\n replay(test1, test2, sw);\n controller.handleMessage(sw, pi, null);\n verify(test1, test2, sw);\n }", "@Test\n public void testDistBm()\n {\n generateEvents(\"dist-bm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "public void testCustomEventListener() throws Exception\n {\n checkEventTypeRegistration(CUSTOM_EVENT_BUILDER, \"\");\n }", "public static void testLowLevelApi() {\n StreamTask task = new StreamTask() {\n @Override\n public void process(IncomingMessageEnvelope envelope, MessageCollector collector, TaskCoordinator coordinator) throws Exception {\n }\n };\n\n TestApplication.TaskTest app = TestApplication.create(task, new MapConfig());\n app.addInputStream(\"queuing.PageViewEvent\", CollectionStream.of(ImmutableMap.of(\n \"1\", \"PageView1\",\n \"2\", \"PageView2\"\n )));\n app.addOutputStream(\"queuing.MyPageViewEvent\", CollectionStream.empty());\n\n TaskAssert.that(\"queuing.MyPageViewEvent\").contains(ImmutableMap.of(\n \"1\", \"PageView1\",\n \"2\", \"PageView2\"\n ));\n \n app.run();\n }", "public interface Callbacks {\n void onStateChanged();\n void onProximityNegative();\n }", "public void testHandleActionEvent_RedoChangesEvent_Accuracy()\n throws Exception {\n setUpEventManager();\n actionManager.undoActions(undoableAction1);\n\n RedoChangesEvent redoChangesEvent = new RedoChangesEvent(undoableAction2, new String());\n //actionManager.undoActions(undoableAction3);\n // Handle the event, actionEventListener1 and actionEventListener2 should be notified\n eventManager.handleActionEvent(redoChangesEvent);\n\n // 'undoableAction1' should be handled\n Pair<RedoChangesEvent, UndoableAction> performRecord\n = new Pair<RedoChangesEvent, UndoableAction>(redoChangesEvent, undoableAction1);\n // actionEventListener1 should not be notified\n assertTrue(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener1).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener2 should be notified\n assertTrue(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener2).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener3 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener3).getRedoPerformedRecords().contains(performRecord));\n\n // 'undoableAction2' should also be handled\n performRecord = new Pair<RedoChangesEvent, UndoableAction>(redoChangesEvent, undoableAction2);\n // actionEventListener1 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener1).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener2 should be notified\n assertTrue(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener2).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener3 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener3).getRedoPerformedRecords().contains(performRecord));\n\n // 'undoableAction3' should not be handled\n performRecord = new Pair<RedoChangesEvent, UndoableAction>(redoChangesEvent, undoableAction3);\n // actionEventListener1 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener1).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener2 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener2).getRedoPerformedRecords().contains(performRecord));\n // actionEventListener3 should not be notified\n assertFalse(\"Test method for 'EventManager.handleActionEvent(ActionEvent)' failed.\",\n ((MockActionEventListener) actionEventListener3).getRedoPerformedRecords().contains(performRecord));\n }", "public static void dummyTest(){}", "public static void dummyTest(){}", "private void verifyMockControlExpectations() {\n this.xmlRpcElementFactoryControl.verify();\n this.xmlRpcRequestParserControl.verify();\n this.xmlRpcResponseWriterControl.verify();\n this.xmlRpcServiceExporterControl.verify();\n }", "interface OperationCallbacks {\n /**\n * Fired when checking of view status is completed\n * @param isViewed true if is viewed, false otherwise\n */\n void onCheckViewedComplete(boolean isViewed);\n }", "@Test\n public void testDistOverflowBack()\n {\n String sName = \"dist-overflow-back\";\n generateTwoEvents(sName);\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "public NameMdoCallbackTest(String testName) {\r\n super(testName);\r\n }", "public interface IQueryTCFZListCallback {\n void querySuccessed();\n void queryUnSuccessed();\n}", "@Override\r\n\tprotected void doVerify() {\n\t\t\r\n\t}", "@Test\n public void testOverflowClient()\n {\n String sName = \"local-overflow-client\";\n generateEvents(sName);\n checkEvents(true, false);\n }", "@Test\n public void testOnParentOnChildrenChanged() throws Exception {\n BluetoothCall parentCall = createActiveCall();\n BluetoothCall activeCall = getMockCall();\n BluetoothCall heldCall = createHeldCall();\n mBluetoothInCallService.onCallAdded(parentCall);\n mBluetoothInCallService.onCallAdded(activeCall);\n mBluetoothInCallService.onCallAdded(heldCall);\n String parentId = parentCall.getTelecomCallId();\n when(activeCall.getParentId()).thenReturn(parentId);\n when(heldCall.getParentId()).thenReturn(parentId);\n\n ArrayList<String> calls = new ArrayList<>();\n calls.add(activeCall.getTelecomCallId());\n\n when(parentCall.getChildrenIds()).thenReturn(calls);\n when(parentCall.isConference()).thenReturn(true);\n\n removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN);\n addCallCapability(parentCall, Connection.CAPABILITY_SWAP_CONFERENCE);\n when(parentCall.wasConferencePreviouslyMerged()).thenReturn(false);\n\n clearInvocations(mMockBluetoothHeadset);\n // Be sure that onIsConferencedChanged rejects spurious changes during set up of\n // CDMA \"conference\"\n mBluetoothInCallService.getCallback(activeCall).onParentChanged(activeCall);\n verify(mMockBluetoothHeadset, never()).phoneStateChanged(anyInt(), anyInt(), anyInt(),\n anyString(), anyInt(), nullable(String.class));\n\n mBluetoothInCallService.getCallback(heldCall).onParentChanged(heldCall);\n verify(mMockBluetoothHeadset, never()).phoneStateChanged(anyInt(), anyInt(), anyInt(),\n anyString(), anyInt(), nullable(String.class));\n\n mBluetoothInCallService.getCallback(parentCall)\n .onChildrenChanged(\n parentCall,\n mBluetoothInCallService.getBluetoothCallsByIds(calls));\n verify(mMockBluetoothHeadset, never()).phoneStateChanged(anyInt(), anyInt(), anyInt(),\n anyString(), anyInt(), nullable(String.class));\n\n calls.add(heldCall.getTelecomCallId());\n mBluetoothInCallService.onCallAdded(heldCall);\n mBluetoothInCallService.getCallback(parentCall)\n .onChildrenChanged(\n parentCall,\n mBluetoothInCallService.getBluetoothCallsByIds(calls));\n verify(mMockBluetoothHeadset).phoneStateChanged(eq(1), eq(1), eq(CALL_STATE_IDLE),\n eq(\"\"), eq(128), nullable(String.class));\n }", "public interface OnSequencePlayFinished {\n void testFinished();\n}", "@Test\n public void testViewClientHistory() {\n for (int i = 0; i < 10; i++) {\n presenter.onViewClientHistory();\n }\n Assert.assertEquals(10, view.getManageViewClientHistoryClicks());\n }", "@Test\n public void updateAccept() throws Exception {\n\n }", "@Test public void connect_shouldAddConnectionCallbacks() throws Exception {\n new LostApiClientImpl(application, new LostApiClient.ConnectionCallbacks() {\n @Override public void onConnected() {\n // Connect second Lost client with new connection callbacks once the service has connected.\n new LostApiClientImpl(application, new TestConnectionCallbacks(),\n new LostClientManager(clock, handlerFactory)).connect();\n }\n\n @Override public void onConnectionSuspended() {\n }\n }, new LostClientManager(clock, handlerFactory)).connect();\n\n FusedLocationProviderApiImpl api =\n (FusedLocationProviderApiImpl) LocationServices.FusedLocationApi;\n\n // Verify both sets of connection callbacks have been stored in the service connection manager.\n assertThat(api.getServiceConnectionManager().getConnectionCallbacks()).hasSize(2);\n }", "public static void internal_test() {\n\t\tTest.start(\"PetrinetIO\");\n\t\tPetrinet pn = PetrinetIO.loadXML(\"data/agv.xml\");\n\t\tTest.checkEquality(pn.numberOfPlaces(), 64, \"# of places loaded\");\n\t\tTest.checkEquality(pn.numberOfTransitions(), 53, \"# of transition loaded\");\n\n\t\t// XXX: we need more tests !\n\t\tTest.end();\n\t}", "@Before\n public void setUp() {\n ofProtocolListener = new OpenflowProtocolListenerFullImpl(connectionAdapter, deviceReplyProcessor);\n connectionAdapter.setMessageListener(ofProtocolListener);\n Mockito.when(connectionAdapter.getRemoteAddress())\n .thenReturn(InetSocketAddress.createUnresolved(\"ofp-junit.example.org\", 6663));\n Mockito.verify(connectionAdapter).setMessageListener(any(OpenflowProtocolListener.class));\n }", "public void testReceiver() throws Exception\n {\n }", "@Test\n public void testDistOverflowFront()\n {\n String sName = \"dist-overflow-front\";\n generateEvents(sName);\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "@Override\n public void onActivityTestResponse(ActivityTestResponse arg0) {\n\n }", "@Test\n public void testOncoKBInfo() {\n // TODO: test OncoKBInfo\n }", "@Override\n\tpublic void runTest() throws Throwable {}", "@Test\n public void testReplicatedBm()\n {\n generateEvents(\"repl-bm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "public void testBidu(){\n\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void callback(int position) {\n\n\t\t\t\t\t\t\t\t\t}", "@Test\n public void launchesEventhandlerUpdatelastmodificationTest() {\n // TODO: test launchesEventhandlerUpdatelastmodification\n }", "public interface InfosCallback {\n void OnRequestDone(boolean isFailed, String result);\n}", "private void verifyChanges() {\n System.out.println(\"Verify changes\"); \n }", "@Test\n public void testLocalBm()\n {\n generateEvents(\"local-bm\");\n checkEvents(false, true);\n\n }", "public void testTrace() {\n\t\tLogAndTraceBroker broker = LogAndTraceBroker.getBroker();\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\n\t\tbroker.addLogListener(new LogListener() {\n\n\t\t\t/**\n\t\t\t * @param pLevel\n\t\t\t * @param pMessageKey\n\t\t\t * @param pMessage\n\t\t\t * @param pParameters\n\t\t\t */\n\t\t\tpublic void log(Level pLevel, String pMessageKey, String pMessage, Object[] pParameters) {\n\t\t\t\tsetLogMessages(getLogMessages() + 1);\n\t\t\t}\n\t\t});\n\n\t\tbroker.addTraceListener(new TraceListener() {\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage,\n\t\t\t\t\tThrowable pThrown) {\n\t\t\t\tsetTraceMessages(getTraceMessages() + 1);\n\t\t\t\tif (pMessage.startsWith(TEST)) {\n\t\t\t\t\tverify(\"Message level\", EQUAL, pLevel, Level.FINE);\n\t\t\t\t\tverify(\"Message text\", EQUAL, pMessage, TEST);\n\t\t\t\t\tverify(\"Message param\", EQUAL, pThrown.getMessage(), TEST);\n\t\t\t\t\tverify(\"Origin\", EQUAL, pOrigin.getMethodName(), \"testTrace\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic void trace(Level pLevel, StackTraceElement pOrigin, String pMessage) {\n\t\t\t\tsetTraceMessages(getTraceMessages() + 1);\n\t\t\t\tif (pMessage.startsWith(TEST)) {\n\t\t\t\t\tverify(\"Message level\", EQUAL, pLevel, Level.FINEST);\n\t\t\t\t\tverify(\"Message text\", EQUAL, pMessage, TEST);\n\t\t\t\t\tverify(\"Origin\", EQUAL, pOrigin.getMethodName(), \"testTrace\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tsetLogMessages(0);\n\t\tsetTraceMessages(0);\n\t\tbroker.trace(Level.FINEST, TEST);\n\t\tbroker.trace(Level.FINE, TEST, new RuntimeException(TEST));\n\t\tverify(\"Message count logged\", EQUAL, new Integer(getLogMessages()), new Integer(0));\n\t\tverify(\"Message count traced\", EQUAL, new Integer(getTraceMessages()), new Integer(2));\n\n\t\tbroker.clearLogListeners();\n\t\tbroker.clearTraceListeners();\n\t}", "@Test\n\tpublic void testConfigureMessageBrokerMakesExpectedCalls() {\n\n\t\tMessageBrokerRegistry registry = Mockito.mock(MessageBrokerRegistry.class);\n\n\t\tGameWebSocketConfig gameWebSocketConfig = new GameWebSocketConfig();\n\t\tgameWebSocketConfig.configureMessageBroker(registry);\n\n\t\tverify(registry, times(1)).enableSimpleBroker(anyString());\n\t\tverify(registry, times(1)).enableSimpleBroker(\"/topic\");\n\n\t\tverify(registry, times(1)).setApplicationDestinationPrefixes(anyString());\n\t\tverify(registry, times(1)).setApplicationDestinationPrefixes(\"/app\");\n\t}", "@Override\n public void accept(@NonNull List<TestItem> testItems) throws Exception {\n verify(storIOContentResolver).observeChangesOfUri(query.uri(), BackpressureStrategy.MISSING);\n\n verify(storIOContentResolver).defaultRxScheduler();\n\n verifyBehavior(testItems);\n }", "@Test\n public void testProcessUserAttributeChangeEvent() throws Exception {\n testExtension.iterableService = Mockito.mock(IterableService.class);\n testExtension.processUserAttributeChangeEvent(new UserAttributeChangeEvent());\n Mockito.verify(testExtension.iterableService, never()).userUpdate(Mockito.any(), Mockito.any());\n }", "public interface Callback {\n }", "public void test() {\n\t}", "@Before\n public void setUp() throws Exception {\n\n clientObserver = mock(MarshalObserver.class);\n client2Observer = mock(MarshalObserver.class);\n serverObserver = mock(MarshalObserver.class);\n\n client = getClientStrategy();\n client2 = getClientStrategy();\n server = getServerStrategy();\n\n client.setListener(clientObserver);\n client2.setListener(client2Observer);\n server.setListener(serverObserver);\n }", "private void verifyEvents(boolean titleEvent, boolean nameEvent, boolean descriptionEvent) {\n if (titleEvent) {\n Assert.assertEquals(\"Missing title change event\", titleEvent, titleChangeEvent);\n }\n if (nameEvent) {\n Assert.assertEquals(\"Missing name change event\", nameEvent, nameChangeEvent);\n }\n if (descriptionEvent) {\n Assert.assertEquals(\"Missing content description event\", descriptionEvent, contentChangeEvent);\n }\n }", "@Test\r\n\tpublic void testDoLoanChromebook() {\n\r\n\t\tResourceCentre.addChromebook(chromebookList, cb1);\r\n\t\tResourceCentre.addChromebook(chromebookList, cb2);\r\n\r\n\t\t// Item list is not null, newly added item can be loaned out successfully.\r\n\t\tassertNotNull(\"Test that list is not null\", chromebookList);\r\n\t\tassertTrue(\"Test if item can be loaned successfully\",\r\n\t\t\t\tResourceCentre.doLoanChromebook(chromebookList, \"CB0011\", \"01/01/2010\"));\r\n\r\n\t\t// Item availability is false, when item is loaned out.\r\n\t\tassertFalse(\"Test that itemAvailability is false when loaned out\", cb1.getIsAvailable());\r\n\r\n\t\t// After item is loaned out, it cannot be loaned again.\r\n\t\tassertFalse(\"Test that item cannot be loaned once loaned out\",\r\n\t\t\t\tResourceCentre.doLoanChromebook(chromebookList, \"CB0011\", \"01/01/2010\"));\r\n\r\n\t\t// Another item in the list can be loaned out successfully.\r\n\t\tassertTrue(\"Test that item can be loaned out successfully\",\r\n\t\t\t\tResourceCentre.doLoanChromebook(chromebookList, \"CB0012\", \"01/01/2010\"));\r\n\t\tassertFalse(\"Test that itemAvailability is false when loaned out\", cb2.getIsAvailable());\r\n\r\n\t\t// Item can be loaned out again when returned.\r\n\t\tassertTrue(\"Return item.\", ResourceCentre.doReturnChromebook(chromebookList, \"CB0011\"));\r\n\t\tassertTrue(\"Test that item can be loaned again when returned.\",\r\n\t\t\t\tResourceCentre.doLoanChromebook(chromebookList, \"CB0011\", \"01/01/2010\"));\r\n\r\n\t}", "public void onTestSkipped() {}", "@Test\n public void testRwbmBoth()\n {\n generateEvents(\"dist-rwbm-both\");\n checkEvents(true, true);\n }" ]
[ "0.66224474", "0.64852947", "0.62815815", "0.6274758", "0.6213628", "0.6156129", "0.6063455", "0.6053142", "0.60152674", "0.5965846", "0.59598017", "0.5958036", "0.5955695", "0.59298456", "0.5918955", "0.5918955", "0.5884312", "0.5881294", "0.5873374", "0.5864566", "0.585171", "0.5820155", "0.58196056", "0.5807856", "0.5800199", "0.57914126", "0.57914126", "0.5786207", "0.577022", "0.57452875", "0.57417786", "0.57216555", "0.57116336", "0.57101154", "0.56882644", "0.56879747", "0.5686641", "0.56804407", "0.56650597", "0.56628865", "0.5648323", "0.56464624", "0.5642627", "0.5636229", "0.5621407", "0.56184363", "0.560611", "0.56016636", "0.55963784", "0.5571684", "0.5566749", "0.5565649", "0.5561989", "0.55618155", "0.5554366", "0.5552676", "0.55371624", "0.5536814", "0.55320984", "0.55315983", "0.55066717", "0.5504302", "0.5504302", "0.54982185", "0.54933083", "0.5491286", "0.5488082", "0.5478698", "0.54774487", "0.5465062", "0.5460105", "0.54572743", "0.545717", "0.54562414", "0.545287", "0.54525155", "0.54492074", "0.5437031", "0.54295033", "0.5429485", "0.5428009", "0.5424442", "0.5423053", "0.54136133", "0.5406068", "0.5403124", "0.54008377", "0.53996694", "0.5396312", "0.53878057", "0.5384531", "0.53831935", "0.53809726", "0.5377611", "0.5373989", "0.53728426", "0.5369021", "0.5365257", "0.5362909", "0.5359966" ]
0.6030139
8
Test distributed ack transactions that consist only of data from loaded values
@Test public void testDACKLoadedMessage() throws Exception { final CacheTransactionManager txMgr = getCache().getCacheTransactionManager(); final String rgnName = getUniqueName(); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); factory.setCacheLoader(new CacheLoader() { @Override public Object load(LoaderHelper helper) { return "val" + helper.getArgument(); } @Override public void close() {} }); Region rgn = getCache().createRegion(rgnName, factory.create()); Invoke.invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: intial configuration") { @Override public void run() { try { AttributesFactory factory2 = new AttributesFactory(); factory2.setScope(Scope.DISTRIBUTED_ACK); factory2.setEarlyAck(false); // factory.setDataPolicy(DataPolicy.REPLICATE); factory2.setMirrorType(MirrorType.KEYS); getCache().createRegion(rgnName, factory2.create()); } catch (CacheException e) { Assert.fail("While creating region", e); } } }); // Confirm the standard case txMgr.begin(); rgn.put("key1", "val1"); txMgr.commit(); assertEquals("val1", rgn.getEntry("key1").getValue()); Invoke .invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: confirm standard case") { @Override public void run() { Region rgn1 = getCache().getRegion(rgnName); assertEquals("val1", rgn1.getEntry("key1").getValue()); } }); // Confirm loaded value case txMgr.begin(); rgn.get("key2", 2); txMgr.commit(); assertEquals("val2", rgn.getEntry("key2").getValue()); Invoke .invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: confirm standard case") { @Override public void run() { Region rgn1 = getCache().getRegion(rgnName); assertEquals("val2", rgn1.getEntry("key2").getValue()); } }); // This should use the ack w/ the lockid txMgr.begin(); rgn.put("key3", "val3"); rgn.get("key4", 4); txMgr.commit(); Invoke .invokeInEveryVM(new SerializableRunnable("testDACKLoadedMessage: confirm standard case") { @Override public void run() { Region rgn1 = getCache().getRegion(rgnName); assertEquals("val3", rgn1.getEntry("key3").getValue()); assertEquals("val4", rgn1.getEntry("key4").getValue()); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testAcknowledgeMessageDownloadAcknowledgeText() {\n Session session = HibernateUtil.getSessionFactory().openSession();\n session.beginTransaction();\n FrinmeDbText msgtext = new FrinmeDbText();\n msgtext.setText(textmsg_org);\n session.save(msgtext);\n FrinmeDbChats c = new FrinmeDbChats();\n c.setChatname(\"Test Chat Text\");\n c.setFrinmeDbUsers(u);\n session.save(c);\n FrinmeDbUserToChats u2c = new FrinmeDbUserToChats();\n u2c.setFrinmeDbChats(c);\n u2c.setFrinmeDbUsers(u);\n session.save(u2c);\n FrinmeDbMessages m = new FrinmeDbMessages();\n m.setFrinmeDbUsers(u);\n m.setMessageTyp(Constants.TYP_TEXT);\n m.setSendTimestamp(10);\n m.setFrinmeDbUserToChats(u2c);\n m.setFrinmeDbText(msgtext);\n session.save(m);\n session.getTransaction().commit();\n session.close();\n \n int hashCode = textmsg_org.hashCode();\n String sha1b64 = new String(\n Base64.encodeBase64(String.valueOf(hashCode).getBytes()),\n Charset.forName(Constants.CHARACTERSET));\n \n IAckMD in = new IAckMD();\n in.setMID(m.getId());\n in.setACK(sha1b64);\n OAckMD out = callTarget(in);\n LOGGER.debug(out.getACK());\n assertThat(out.getACK(), is(Constants.ACKNOWLEDGE_TRUE));\n }", "@Test\n @SuppressWarnings(\"unchecked\")\n void activation_not_sent_before_all_distributors_have_acked_state_bundle() {\n var f = StateActivationFixture.withTwoPhaseEnabled();\n var cf = f.cf;\n\n f.expectSetSystemStateInvocationsToBothDistributors();\n f.simulateBroadcastTick(cf, 123);\n\n // Respond from distributor 0, but not yet from distributor 1\n respondToSetClusterStateBundle(cf.cluster.getNodeInfo(Node.ofDistributor(0)), f.stateBundle, f.d0Waiter.getValue());\n f.simulateBroadcastTick(cf, 123);\n\n // No activations should be sent yet\n cf.cluster().getNodeInfos().forEach(nodeInfo -> {\n verify(f.mockCommunicator, times(0)).activateClusterStateVersion(eq(123), eq(nodeInfo), any());\n });\n assertNull(f.broadcaster.getLastClusterStateBundleConverged());\n\n respondToSetClusterStateBundle(cf.cluster.getNodeInfo(Node.ofDistributor(1)), f.stateBundle, f.d1Waiter.getValue());\n f.simulateBroadcastTick(cf, 123);\n\n // Activation should now be sent to _all_ nodes (distributor and storage)\n cf.cluster().getNodeInfos().forEach(nodeInfo -> {\n verify(f.mockCommunicator).activateClusterStateVersion(eq(123), eq(nodeInfo), any());\n });\n // But not converged yet, as activations have not been ACKed\n assertNull(f.broadcaster.getLastClusterStateBundleConverged());\n }", "@Test\n void activation_not_sent_if_deferred_activation_is_disabled_in_state_bundle() {\n var f = StateActivationFixture.withTwoPhaseDisabled();\n var cf = f.cf;\n\n f.ackStateBundleFromBothDistributors();\n\n // At this point the cluster state shall be considered converged.\n assertEquals(f.stateBundle, f.broadcaster.getLastClusterStateBundleConverged());\n\n // No activations shall have been sent.\n clusterNodeInfos(cf.cluster(), Node.ofDistributor(0), Node.ofDistributor(1)).forEach(nodeInfo -> {\n verify(f.mockCommunicator, times(0)).activateClusterStateVersion(eq(123), eq(nodeInfo), any());\n });\n }", "@Override\n\t\tboolean needsAck() {\n\t\t\treturn byteChunks.length > 0; // don't retry empty ack\n\t\t}", "boolean needsAck() { return true; }", "@Override\n protected boolean shouldAck() {\n return true;\n }", "@Test\n @SuppressWarnings(\"unchecked\")\n void state_bundle_not_considered_converged_until_activation_acked_by_all_distributors() {\n var f = StateActivationFixture.withTwoPhaseEnabled();\n var cf = f.cf;\n\n f.ackStateBundleFromBothDistributors();\n\n final var d0ActivateWaiter = ArgumentCaptor.forClass(Communicator.Waiter.class);\n final var d1ActivateWaiter = ArgumentCaptor.forClass(Communicator.Waiter.class);\n\n clusterNodeInfos(cf.cluster(), Node.ofDistributor(0), Node.ofDistributor(1)).forEach(nodeInfo -> {\n verify(f.mockCommunicator).activateClusterStateVersion(eq(123), eq(nodeInfo),\n (nodeInfo.getNodeIndex() == 0 ? d0ActivateWaiter : d1ActivateWaiter).capture());\n });\n\n respondToActivateClusterStateVersion(cf.cluster.getNodeInfo(Node.ofDistributor(0)),\n f.stateBundle, d0ActivateWaiter.getValue());\n f.simulateBroadcastTick(cf, 123);\n\n assertNull(f.broadcaster.getLastClusterStateBundleConverged()); // Not yet converged\n\n respondToActivateClusterStateVersion(cf.cluster.getNodeInfo(Node.ofDistributor(1)),\n f.stateBundle, d1ActivateWaiter.getValue());\n f.simulateBroadcastTick(cf, 123);\n\n // Finally, all distributors have ACKed the version! State is marked as converged.\n assertEquals(f.stateBundle, f.broadcaster.getLastClusterStateBundleConverged());\n }", "@Test\n void latestValuePerKeyTest() {\n\n\n this.testTopology.input()\n .add(\"a\", \"order 1 Placed\")\n .add(\"a\", \"order 2 placed\")\n .add(\"ccc\", \"order 3 placed\");\n\n this.testTopology.getTestDriver().advanceWallClockTime(60000L);\n\n\n this.testTopology.tableOutput().withSerde(Serdes.String(), Serdes.String())\n .expectNextRecord().hasValue(\"order 2 placed\")\n .expectNextRecord().hasValue(\"order 3 placed\")\n .expectNoMoreRecord();\n }", "@Test\n\tpublic void testSelfHealingTx() throws InterruptedException {\n\t\tMFDataSetDefinitionMongo ddl = DataAccessCommitAndRollbackIT.insert(service, txManager, false, 0);\n\t\t// at this point we have data and everything has been commited. Now we\n\t\t// need to simulate that there are some pending transactions\n\t\tDB db = service.getMongoConnection();\n\t\tTransaction tx = txManager.startTransaction(db, ddl, OPERATION.INSERT);\n\n\t\t// access directly to the databag to simulate that some data were\n\t\t// neither commit nor rollback\n\t\tDBCollection col = db.getCollection(DataDefinitionService.getCollectionOfMetadataRef(ddl.getMetaDataRef()));\n\t\tint numberOfPendingData = 2;\n\t\tDBCursor cursor = col.find();\n\t\tint i = 0;\n\t\twhile (cursor.hasNext() && i < numberOfPendingData) {\n\t\t\tDBObject obj = cursor.next();\n\t\t\tDataContainer data = new DataContainer();\n\t\t\tdata.fromMongo(obj);\n\t\t\tdata.setTx(tx.getId());\n\t\t\tdata.setTxState(TX_STATE.PENDING);\n\t\t\tcol.update(obj, data.toMongo());\n\t\t\ti++;\n\t\t}\n\t\tList<MFManagedData> rows = service.listAllData(ddl.getMetaDataRef(), ddl.getVersion(), null);\n\t\t// the expected number of data is the total data inserted minus the\n\t\t// number of data that we have marked as \"pending\"\n\t\tint numberOfInsertedData = DataAccessCommitAndRollbackIT.numberOfData();\n\t\tint expectedNumberOfData = numberOfInsertedData - numberOfPendingData;\n\t\tAssert.assertEquals(expectedNumberOfData, rows.size());\n\n\t\t// Although the data was not returned by calling the method listAllData\n\t\t// we check with the following query that the rows are in the mongo DB\n\t\tint dataBagSize = col.find().count();\n\t\tAssert.assertEquals(numberOfInsertedData, dataBagSize);\n\n\t\t// commit what needs to be commited or rollback. In this case it will be\n\t\t// rolled back\n\t\ttxManager.processActiveTransactions(db);\n\n\t\t// check that the data non commited data are not comming (same as\n\t\t// before)\n\t\trows = service.listAllData(ddl.getMetaDataRef(), ddl.getVersion(), null);\n\t\tAssert.assertEquals(expectedNumberOfData, rows.size());\n\n\t\t// Note that the data on the databag doesn't longer exist.\n\t\tdataBagSize = col.find().count();\n\t\tAssert.assertEquals(expectedNumberOfData, dataBagSize);\n\n\t}", "boolean hasAck();", "void beforeAckMessages(Collection<Message> messages, MutationBatch mb);", "public void run() {\n\t\t\tBundle b = null;\n\t\t\tint i = 0, j;\n\t\t\ttry {\n\t\t\t\tfor (i = 0; i < t.length; i++) {\n\t\t\t\t\tString timestamp = \"\";\n\t\t\t\t\twhile (t[i].noOfBundles == 0)\n\t\t\t\t\t\t;\n\t\t\t\t\tfor (j = seq; j < t[i].noOfBundles; j++) {\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t// System.out.println(\"SEQ ACK : \" +\n\t\t\t\t\t\t\t// t[i].noOfBundles);\n\t\t\t\t\t\t\tbyte[] buffer = (byte[]) ois.readObject();\n\t\t\t\t\t\t\tb = new Bundle();\n\t\t\t\t\t\t\tb.parse(buffer);\n\t\t\t\t\t\t\tif (b.bundleNumber == b.noOfBundles - 1)\n\t\t\t\t\t\t\t\ttimestamp = new String(b.data);\n\t\t\t\t\t\t\t// System.out.println(\"ACK WAITING : \" + j);\n\t\t\t\t\t\t\t// System.out.println(\"ACK RECEIVED : \"\n\t\t\t\t\t\t\t// + b.bundleNumber);\n\t\t\t\t\t\t\t// System.out.println(t[i].transactionId + \" \"\n\t\t\t\t\t\t\t// + t[i].noOfBundles + \" \" + j);\n\t\t\t\t\t\t} while (!b.isAcknowledgement(t[i].transactionId,\n\t\t\t\t\t\t\t\tt[i].noOfBundles, j));\n\t\t\t\t\t}\n\t\t\t\t\t// System.out.println(\"TIMESTAMP RECEIVED IS :\" +\n\t\t\t\t\t// timestamp);\n\t\t\t\t\tlong ts = Long.parseLong(timestamp);\n\t\t\t\t\tdh.setSynced(ts, t[i].records);\n\t\t\t\t\tseq = 0;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tObjectOutputStream fout;\n\t\t\t\ttry {\n\t\t\t\t\tfout = new ObjectOutputStream(new FileOutputStream(\n\t\t\t\t\t\t\tnew File(storagePath + \"/push\")));\n\t\t\t\t\tfout.writeObject(t);\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\t// System.out.println(\"Written broken transaction!!!\");\n\t\t\t\t\t// System.out\n\t\t\t\t\t// .println(\"-----------------------------------------------------\");\n\t\t\t\t\tfout.close();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(\"ACK ENDED\");\n\t\t}", "void beforeAckMessage(Message message, MutationBatch mb);", "void ackResult(boolean resultMatch);", "@Override\r\n\tpublic int ack(int x, int y) {\n\t\treturn 0;\r\n\t}", "@Test\n public void SameTokenNameOpenSuccessExchangeWithdraw() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(firstTokenId));\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n // V1,Data is no longer update\n Assert.assertFalse(dbManager.getExchangeStore().has(ByteArray.fromLong(exchangeId)));\n //V2\n ExchangeCapsule exchangeCapsuleV2 =\n dbManager.getExchangeV2Store().get(ByteArray.fromLong(exchangeId));\n Assert.assertNotNull(exchangeCapsuleV2);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsuleV2.getCreatorAddress());\n Assert.assertEquals(exchangeId, exchangeCapsuleV2.getID());\n Assert.assertEquals(1000000, exchangeCapsuleV2.getCreateTime());\n Assert\n .assertTrue(Arrays.equals(firstTokenId.getBytes(), exchangeCapsuleV2.getFirstTokenId()));\n Assert.assertEquals(firstTokenId, ByteArray.toStr(exchangeCapsuleV2.getFirstTokenId()));\n Assert.assertEquals(0L, exchangeCapsuleV2.getFirstTokenBalance());\n Assert.assertEquals(secondTokenId, ByteArray.toStr(exchangeCapsuleV2.getSecondTokenId()));\n Assert.assertEquals(0L, exchangeCapsuleV2.getSecondTokenBalance());\n\n accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(firstTokenQuant, assetV2Map.get(firstTokenId).longValue());\n Assert.assertEquals(secondTokenQuant, assetV2Map.get(secondTokenId).longValue());\n\n } catch (ContractValidateException e) {\n logger.info(e.getMessage());\n Assert.assertFalse(e instanceof ContractValidateException);\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } catch (ItemNotFoundException e) {\n Assert.assertFalse(e instanceof ItemNotFoundException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "boolean ack( long revision );", "@Test\n public void testFlowControl() throws Exception {\n int numMessages = RawReaderImpl.DEFAULT_RECEIVER_QUEUE_SIZE * 5;\n String topic = \"persistent://my-property/my-ns/\" + BrokerTestUtil.newUniqueName(\"reader\");\n\n publishMessages(topic, numMessages);\n\n RawReader reader = RawReader.create(pulsarClient, topic, subscription).get();\n List<Future<RawMessage>> futures = new ArrayList<>();\n Set<String> keys = new HashSet<>();\n\n // +1 to make sure we read past the end\n for (int i = 0; i < numMessages + 1; i++) {\n futures.add(reader.readNextAsync());\n }\n int timeouts = 0;\n for (Future<RawMessage> f : futures) {\n try (RawMessage m = f.get(1, TimeUnit.SECONDS)) {\n // Assert each key is unique\n String key = extractKey(m);\n Assert.assertTrue(\n keys.add(key),\n \"Received duplicated key '\" + key + \"' : already received keys = \" + keys);\n } catch (TimeoutException te) {\n timeouts++;\n }\n }\n Assert.assertEquals(timeouts, 1);\n Assert.assertEquals(keys.size(), numMessages);\n reader.closeAsync().get(3, TimeUnit.SECONDS);\n }", "@Test\n public void testAtMostOnceModeDoesNotCommitAckedTuples() {\n KafkaSpoutConfig<String, String> spoutConfig = createKafkaSpoutConfigBuilder(mock(TopicFilter.class), mock(ManualPartitioner.class), -1)\n .setProcessingGuarantee(KafkaSpoutConfig.ProcessingGuarantee.AT_MOST_ONCE)\n .setTupleTrackingEnforced(true)\n .build();\n try (SimulatedTime ignored = new SimulatedTime()) {\n KafkaSpout<String, String> spout = SpoutWithMockedConsumerSetupHelper.setupSpout(spoutConfig, conf, contextMock, collectorMock, consumerMock, partition);\n\n when(consumerMock.poll(anyLong())).thenReturn(new ConsumerRecords<>(Collections.singletonMap(partition,\n SpoutWithMockedConsumerSetupHelper.createRecords(partition, 0, 1))));\n\n spout.nextTuple();\n clearInvocations(consumerMock);\n\n ArgumentCaptor<KafkaSpoutMessageId> msgIdCaptor = ArgumentCaptor.forClass(KafkaSpoutMessageId.class);\n verify(collectorMock).emit(eq(SingleTopicKafkaSpoutConfiguration.STREAM), anyList(), msgIdCaptor.capture());\n assertThat(\"Should have captured a message id\", msgIdCaptor.getValue(), not(nullValue()));\n\n spout.ack(msgIdCaptor.getValue());\n\n Time.advanceTime(KafkaSpout.TIMER_DELAY_MS + spoutConfig.getOffsetsCommitPeriodMs());\n\n when(consumerMock.poll(anyLong())).thenReturn(new ConsumerRecords<>(Collections.emptyMap()));\n\n spout.nextTuple();\n\n verify(consumerMock, never()).commitSync(argThat((Map<TopicPartition, OffsetAndMetadata> arg) -> !arg.containsKey(partition)));\n }\n }", "@Test\n public void SameTokenNameCloseSuccessExchangeWithdraw() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetMap.get(firstTokenId));\n Assert.assertEquals(null, assetMap.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n long id = 1;\n //V1\n ExchangeCapsule exchangeCapsule = dbManager.getExchangeStore().get(ByteArray.fromLong(id));\n Assert.assertNotNull(exchangeCapsule);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsule.getCreatorAddress());\n Assert.assertEquals(id, exchangeCapsule.getID());\n Assert.assertEquals(1000000, exchangeCapsule.getCreateTime());\n Assert.assertTrue(Arrays.equals(firstTokenId.getBytes(), exchangeCapsule.getFirstTokenId()));\n Assert.assertEquals(firstTokenId, ByteArray.toStr(exchangeCapsule.getFirstTokenId()));\n Assert.assertEquals(0L, exchangeCapsule.getFirstTokenBalance());\n Assert.assertEquals(secondTokenId, ByteArray.toStr(exchangeCapsule.getSecondTokenId()));\n Assert.assertEquals(0L, exchangeCapsule.getSecondTokenBalance());\n //V2\n ExchangeCapsule exchangeCapsule2 = dbManager.getExchangeV2Store().get(ByteArray.fromLong(id));\n Assert.assertNotNull(exchangeCapsule2);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsule2.getCreatorAddress());\n Assert.assertEquals(id, exchangeCapsule2.getID());\n Assert.assertEquals(1000000, exchangeCapsule2.getCreateTime());\n Assert.assertEquals(0L, exchangeCapsule2.getFirstTokenBalance());\n Assert.assertEquals(0L, exchangeCapsule2.getSecondTokenBalance());\n\n accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(firstTokenQuant, assetMap.get(firstTokenId).longValue());\n Assert.assertEquals(secondTokenQuant, assetMap.get(secondTokenId).longValue());\n\n Assert.assertEquals(secondTokenQuant, ret.getExchangeWithdrawAnotherAmount());\n\n } catch (ContractValidateException e) {\n logger.info(e.getMessage());\n Assert.assertFalse(e instanceof ContractValidateException);\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } catch (ItemNotFoundException e) {\n Assert.assertFalse(e instanceof ItemNotFoundException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void testQueryLessKeys1() throws Exception {\n File file = new File(testInfo.getDir());\n FileUtils.deleteDirectory(file);\n\n EventSchema eventSchema = GenericAggregateSerializerTest.getEventSchema();\n\n String[] dimensionSpecs = new String[] {\n \"time=\" + TimeUnit.MINUTES,\n \"time=\" + TimeUnit.MINUTES + \":adUnit\",\n \"time=\" + TimeUnit.MINUTES + \":adId\",\n \"time=\" + TimeUnit.MINUTES + \":pubId\",\n \"time=\" + TimeUnit.MINUTES + \":adId:adUnit\",\n \"time=\" + TimeUnit.MINUTES + \":pubId:adUnit\",\n \"time=\" + TimeUnit.MINUTES + \":pubId:adId\",\n \"time=\" + TimeUnit.MINUTES + \":pubId:adId:adUnit\"\n };\n\n GenericAggregator[] aggregators = new GenericAggregator[dimensionSpecs.length];\n for (int i = dimensionSpecs.length; i-- > 0;) {\n GenericAggregator aggregator = new GenericAggregator(eventSchema);\n aggregator.init(dimensionSpecs[i]);\n aggregators[i] = aggregator;\n }\n\n DimensionStoreOperator hdsOut = new DimensionStoreOperator() {\n @Override\n public void setup(OperatorContext arg0)\n {\n super.setup(arg0);\n super.writeExecutor = super.queryExecutor = MoreExecutors.sameThreadExecutor(); // synchronous processing\n }\n };\n TFileImpl hdsFile = new TFileImpl.DefaultTFileImpl();\n hdsOut.setFileStore(hdsFile);\n hdsFile.setBasePath(testInfo.getDir());\n //GenericAggregator aggregator = new GenericAggregator(eventSchema);\n //aggregator.init(\"time=MINUTES:pubId:adId:adUnit\");\n hdsOut.setEventSchemaJSON(GenericAggregateSerializerTest.TEST_SCHEMA_JSON);\n hdsOut.setAggregator(aggregators[0]);\n hdsOut.setMaxCacheSize(100);\n hdsOut.setFlushIntervalCount(100);\n hdsOut.setup(null);\n\n CollectorTestSink<DimensionStoreOperator.HDSRangeQueryResult> queryResults = new CollectorTestSink<DimensionStoreOperator.HDSRangeQueryResult>();\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n CollectorTestSink<Object> tmp = (CollectorTestSink) queryResults;\n hdsOut.queryResult.setSink(tmp);\n\n\n long baseTime = System.currentTimeMillis();\n long baseMinute = TimeUnit.MILLISECONDS.convert(TimeUnit.MINUTES.convert(baseTime, TimeUnit.MILLISECONDS), TimeUnit.MINUTES);\n\n int numMinutes = 5;\n int wid = 1;\n for(int i = 0; i < numMinutes; i++) {\n hdsOut.beginWindow(wid);\n\n long timestamp = baseMinute - TimeUnit.MINUTES.toMillis(i);\n\n // Check aggregation for ae1 and ae2 as they have same key.\n Map<String, Object> eventMap = Maps.newHashMap();\n eventMap.put(\"timestamp\", timestamp);\n eventMap.put(\"pubId\", 1);\n eventMap.put(\"adId\", 2);\n eventMap.put(\"adUnit\", 3);\n eventMap.put(\"clicks\", 10L);\n\n GenericEvent ge = eventSchema.convertMapToGenericEvent(eventMap);\n\n int aggrIdx = 0;\n for (GenericAggregator aggregator : aggregators) {\n GenericAggregate aggr = aggregator.getGroup(ge, aggrIdx);\n aggregator.aggregate(aggr, ge);\n hdsOut.input.process(aggr);\n aggrIdx++;\n }\n hdsOut.endWindow();\n wid++;\n }\n\n hdsOut.beginWindow(wid);\n\n int pubId = 1;\n int adId = 2;\n int adUnit = 3;\n\n for(int i = 0; i < 8; i++) {\n JSONObject keys = new JSONObject();\n if ((i & 0x1) != 0)\n keys.put(\"pubId\", pubId);\n if ((i & 0x2) != 0)\n keys.put(\"adId\", adId);\n if ((i & 0x4) != 0)\n keys.put(\"adUnit\", adUnit);\n\n JSONObject query = new JSONObject();\n query.put(\"keys\", keys);\n query.put(\"id\", \"query\" + i);\n query.put(\"startTime\", baseMinute - TimeUnit.MILLISECONDS.convert(20, TimeUnit.MINUTES));\n query.put(\"endTime\", baseMinute);\n\n hdsOut.query.process(query.toString());\n }\n Assert.assertEquals(\"timeSeriesQueries \" + hdsOut.rangeQueries, 8, hdsOut.rangeQueries.size());\n hdsOut.endWindow();\n\n Assert.assertEquals(\"queryResults \" + queryResults.collectedTuples, 8, queryResults.collectedTuples.size());\n System.out.println(\"basetime \" + baseMinute);\n\n for(HDSRangeQueryResult r : queryResults.collectedTuples) {\n Assert.assertEquals(\"result points \" + r, Math.min(numMinutes, 20), r.data.size());\n for(Object o : r.data)\n System.out.println(o);\n }\n }", "public void ack() {\n }", "@Test\n public void testTransactional() throws Throwable {\n final List<MagicKey> keys = init();\n final CountDownLatch l = new CountDownLatch(1);\n final AtomicBoolean rollback = new AtomicBoolean(false);\n\n Future<Void> future = fork(() -> {\n try {\n // start a transaction on c1.\n TransactionManager t1 = TestingUtil.getTransactionManager(c1);\n t1.begin();\n c1.put(keys.get(0), \"transactionally_replaced\");\n Transaction tx = t1.getTransaction();\n tx.enlistResource(new XAResourceAdapter() {\n public int prepare(Xid id) {\n // this would be called *after* the cache prepares.\n try {\n log.debug(\"Unblocking commit\");\n l.await();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n return XAResource.XA_OK;\n }\n });\n t1.commit();\n } catch (Exception e) {\n log.error(\"Error committing transaction\", e);\n rollback.set(true);\n throw new RuntimeException(e);\n }\n });\n\n log.info(\"Invoking rehash event\");\n performRehashEvent(true);\n l.countDown();\n future.get(30, TimeUnit.SECONDS);\n\n //ownership can only be verified after the rehashing has completed\n waitForRehashCompletion();\n log.info(\"Rehash complete\");\n\n //only check for these values if tx was not rolled back\n if (!rollback.get()) {\n // the ownership of k1 might change during the tx and a cache might end up with it in L1\n assertOwnershipAndNonOwnership(keys.get(0), true);\n assertOwnershipAndNonOwnership(keys.get(1), false);\n assertOwnershipAndNonOwnership(keys.get(2), false);\n assertOwnershipAndNonOwnership(keys.get(3), false);\n\n // checking the values will bring the keys to L1, so we want to do it after checking ownership\n assertOnAllCaches(keys.get(0), \"transactionally_replaced\");\n assertOnAllCaches(keys.get(1), \"v0\");\n assertOnAllCaches(keys.get(2), \"v0\");\n assertOnAllCaches(keys.get(3), \"v0\");\n }\n }", "@Test\n public void oldNotUpdateSuccessExchangeWithdraw() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 100000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 200000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetMap.get(firstTokenId));\n Assert.assertEquals(null, assetMap.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, String.valueOf(1), firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n long id = 1;\n //V1 not update\n ExchangeCapsule exchangeCapsule = dbManager.getExchangeStore().get(ByteArray.fromLong(id));\n Assert.assertNotNull(exchangeCapsule);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsule.getCreatorAddress());\n Assert.assertEquals(id, exchangeCapsule.getID());\n Assert.assertEquals(1000000, exchangeCapsule.getCreateTime());\n Assert.assertTrue(Arrays.equals(firstTokenId.getBytes(), exchangeCapsule.getFirstTokenId()));\n Assert.assertEquals(firstTokenId, ByteArray.toStr(exchangeCapsule.getFirstTokenId()));\n Assert.assertEquals(secondTokenId, ByteArray.toStr(exchangeCapsule.getSecondTokenId()));\n Assert.assertNotEquals(0L, exchangeCapsule.getFirstTokenBalance());\n Assert.assertNotEquals(0L, exchangeCapsule.getSecondTokenBalance());\n //V2\n ExchangeCapsule exchangeCapsule2 = dbManager.getExchangeV2Store().get(ByteArray.fromLong(id));\n Assert.assertNotNull(exchangeCapsule2);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsule2.getCreatorAddress());\n Assert.assertEquals(id, exchangeCapsule2.getID());\n Assert.assertEquals(1000000, exchangeCapsule2.getCreateTime());\n Assert.assertEquals(0L, exchangeCapsule2.getFirstTokenBalance());\n Assert.assertEquals(0L, exchangeCapsule2.getSecondTokenBalance());\n\n accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n assetMap = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(firstTokenQuant, assetMap.get(String.valueOf(1)).longValue());\n Assert.assertEquals(secondTokenQuant, assetMap.get(String.valueOf(2)).longValue());\n\n Assert.assertEquals(secondTokenQuant, ret.getExchangeWithdrawAnotherAmount());\n\n } catch (ContractValidateException e) {\n logger.info(e.getMessage());\n Assert.assertFalse(e instanceof ContractValidateException);\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } catch (ItemNotFoundException e) {\n Assert.assertFalse(e instanceof ItemNotFoundException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\r\n\tpublic void testSyncAb() throws Throwable {\n\r\n\t\tsyncService.syncAB();\r\n\r\n//\t\tnotProcessedCount = (Number) jdbcTemplate.queryForObject(\r\n//\t\t\t\t\"select count(1) from ab_sync_changes_tbl where processed=0\", Number.class);\r\n//\t\tassertEquals(\"Should not have not processed data\", 0, notProcessedCount.intValue());\r\n\t}", "@Test\n public void testColocatedPRRedundancyRecovery() throws Throwable {\n createCacheInAllVms();\n redundancy = 1;\n localMaxmemory = 50;\n totalNumBuckets = 11;\n // Create Customer PartitionedRegion in Data store 1\n regionName = CustomerPartitionedRegionName;\n colocatedWith = null;\n isPartitionResolver = Boolean.FALSE;\n Object[] attributeObjects1 = new Object[] {regionName, redundancy, localMaxmemory,\n totalNumBuckets, colocatedWith, isPartitionResolver};\n dataStore1.invoke(PRColocationDUnitTest.class, \"createPR\", attributeObjects1);\n\n // Create Order PartitionedRegion in Data store 1\n regionName = OrderPartitionedRegionName;\n colocatedWith = CustomerPartitionedRegionName;\n isPartitionResolver = Boolean.FALSE;\n Object[] attributeObjects2 = new Object[] {regionName, redundancy, localMaxmemory,\n totalNumBuckets, colocatedWith, isPartitionResolver};\n dataStore1.invoke(PRColocationDUnitTest.class, \"createPR\", attributeObjects2);\n\n // create a few buckets in dataStore1\n dataStore1.invoke(new SerializableRunnable(\"put data in region\") {\n @Override\n public void run() {\n Region region1 = basicGetCache().getRegion(CustomerPartitionedRegionName);\n Region region2 = basicGetCache().getRegion(OrderPartitionedRegionName);\n region1.put(1, \"A\");\n region1.put(2, \"A\");\n region2.put(1, \"A\");\n region2.put(2, \"A\");\n }\n });\n\n // add a listener for region recovery\n dataStore2.invoke(new SerializableRunnable(\"Add recovery listener\") {\n @Override\n public void run() {\n InternalResourceManager.setResourceObserver(new MyResourceObserver());\n }\n });\n\n dataStore2.invoke(PRColocationDUnitTest.class, \"createPR\", attributeObjects1);\n\n // Make sure no redundant copies of buckets get created for the first PR in datastore2 because\n // the second PR has not yet been created.\n SerializableRunnable checkForBuckets = new SerializableRunnable(\"check for buckets\") {\n @Override\n public void run() {\n PartitionedRegion region1 =\n (PartitionedRegion) basicGetCache().getRegion(CustomerPartitionedRegionName);\n MyResourceObserver observer =\n (MyResourceObserver) InternalResourceManager.getResourceObserver();\n try {\n observer.waitForRegion(region1, 60 * 1000);\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n\n // there should be no buckets on this node, because we don't\n // have all of the colocated regions\n assertEquals(Collections.emptyList(), region1.getLocalBucketsListTestOnly());\n assertEquals(0, region1.getRegionAdvisor().getBucketRedundancy(1));\n }\n };\n\n dataStore2.invoke(checkForBuckets);\n\n // create another bucket in dataStore1\n dataStore1.invoke(new SerializableRunnable(\"put data in region\") {\n @Override\n public void run() {\n Region region1 = basicGetCache().getRegion(CustomerPartitionedRegionName);\n Region region2 = basicGetCache().getRegion(OrderPartitionedRegionName);\n region1.put(3, \"A\");\n region2.put(3, \"A\");\n }\n });\n\n\n // Make sure that no copies of buckets are created for the first PR in datastore2\n dataStore2.invoke(checkForBuckets);\n\n dataStore2.invoke(PRColocationDUnitTest.class, \"createPR\", attributeObjects2);\n\n // Now we should get redundant copies of buckets for both PRs\n dataStore2.invoke(new SerializableRunnable(\"check for bucket creation\") {\n @Override\n public void run() {\n PartitionedRegion region1 =\n (PartitionedRegion) basicGetCache().getRegion(CustomerPartitionedRegionName);\n PartitionedRegion region2 =\n (PartitionedRegion) basicGetCache().getRegion(OrderPartitionedRegionName);\n MyResourceObserver observer =\n (MyResourceObserver) InternalResourceManager.getResourceObserver();\n try {\n observer.waitForRegion(region2, 60 * 1000);\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n\n // we should now have copies all of the buckets\n assertEquals(3, region1.getLocalBucketsListTestOnly().size());\n assertEquals(3, region2.getLocalBucketsListTestOnly().size());\n }\n });\n }", "@Test\n void checkBidAddedAfterSubscribeBidding(){\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,1,2950,1);\n boolean added=false;\n for (Bid b:store.getBids()\n ) {\n if(b.getProductID()==1&&b.getUserID()==NofetID&&b.getPrice()==2950&&b.getQuantity()==1){\n added=true;\n }\n }\n assertTrue(added);\n }", "@Test\n public void testGetAllSnacks() throws Exception {\n\n //creating a snack to test\n Snack testSnack = new Snack(\"1111\");\n testSnack.setName(\"Cookies\");\n testSnack.setPrice(new BigDecimal(\"6.99\"));\n testSnack.setQuantity(1);\n\n //adding the snack to the hashmap (inventory)\n dao.addSnack(testSnack.getSnackId(), testSnack);\n\n //the size returned should be 1\n assertEquals(1, dao.getAllSnacks().size());\n\n //removing the test snack from the hashmap\n dao.removeSnack(testSnack.getSnackId());\n }", "@Test\n public void testMarketOrder() throws InterruptedException {\n setUp();\n testMatchingEngine.start();\n\n NewOrder nosB1 = createLimitOrder(\"BUY1\", Side.BUY, 100, 100.1, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB1);\n NewOrder nosB2 = createLimitOrder(\"BUY2\", Side.BUY, 200, 99.99, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB2);\n NewOrder nosB3 = createLimitOrder(\"BUY3\", Side.BUY, 300, 99.79, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB3);\n\n // Sell Order with Qty=150 and Market Order\n NewOrder nosS1 = createMarketOrder(\"SELL1\", Side.SELL, 700, System.currentTimeMillis());\n clientSession.sendNewOrder(nosS1);\n\n List<Event> msg = clientSession.getMessagesInQueue();\n assertEquals(7, msg.size());\n\n Trade t = ( Trade) msg.get(0);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(1);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(2);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(3);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(4);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n t = ( Trade) msg.get(5);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n Canceled t1 = ( Canceled) msg.get(6);\n assertEquals( t1.getCanceledQty() , 100 );\n }", "@Test\n public void SameTokenNameOpenTnotherTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long quant = 1L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(firstTokenId.getBytes(), 1000L, dbManager);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw another token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void testNonTransactional() throws Throwable {\n List<MagicKey> keys = init();\n\n log.info(\"Invoking rehash event\");\n performRehashEvent(false);\n\n waitForRehashCompletion();\n log.info(\"Rehash complete\");\n\n for (MagicKey key : keys) assertOnAllCachesAndOwnership(key, \"v0\");\n }", "@Test\n public void processTestA()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //pass transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),300);\n\n Assert.assertEquals(true,trans.process());\n }", "@Test\n public void processTestB()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //failed transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),2000);\n\n Assert.assertEquals(false,trans.process());\n }", "@Test\n public void SameTokenNameOpenTokenBalanceZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 200000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(firstTokenId.getBytes(), firstTokenQuant, dbManager);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n ExchangeCapsule exchangeCapsuleV2 = dbManager.getExchangeV2Store()\n .get(ByteArray.fromLong(exchangeId));\n exchangeCapsuleV2.setBalance(0, 0);\n dbManager.getExchangeV2Store().put(exchangeCapsuleV2.createDbKey(), exchangeCapsuleV2);\n\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Token balance in exchange is equal with 0,\"\n + \"the exchange has been closed\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } catch (ItemNotFoundException e) {\n Assert.assertFalse(e instanceof ItemNotFoundException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void testRegisterAck() throws Exception {\n System.out.println(\"registerAck\");\n\n Sendable s = sendAMessage();\n\n String a = s.getMessageId();\n String comment = \"comment\";\n String ack = \"ack\";\n instance.setEbXmlEventListener(ebXmlEventListener);\n\n // removes the message that's just been added but doesn't delete the file because there isn't one yet\n instance.registerAck(a, comment, ack);\n }", "@Test\n public void SameTokenNameOpenSuccessExchangeWithdraw2() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 2;\n String firstTokenId = \"_\";\n long firstTokenQuant = 1_000_000_000000L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 4_000_000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n // V1,Data is no longer update\n Assert.assertFalse(dbManager.getExchangeStore().has(ByteArray.fromLong(exchangeId)));\n //V2\n ExchangeCapsule exchangeCapsuleV2 = dbManager.getExchangeV2Store()\n .get(ByteArray.fromLong(exchangeId));\n Assert.assertNotNull(exchangeCapsuleV2);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsuleV2.getCreatorAddress());\n Assert.assertEquals(exchangeId, exchangeCapsuleV2.getID());\n Assert.assertEquals(1000000, exchangeCapsuleV2.getCreateTime());\n Assert\n .assertTrue(Arrays.equals(firstTokenId.getBytes(), exchangeCapsuleV2.getFirstTokenId()));\n Assert.assertEquals(firstTokenId, ByteArray.toStr(exchangeCapsuleV2.getFirstTokenId()));\n Assert.assertEquals(0L, exchangeCapsuleV2.getFirstTokenBalance());\n Assert.assertEquals(secondTokenId, ByteArray.toStr(exchangeCapsuleV2.getSecondTokenId()));\n Assert.assertEquals(0L, exchangeCapsuleV2.getSecondTokenBalance());\n\n accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(firstTokenQuant + 10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(10_000_000L, assetV2Map.get(secondTokenId).longValue());\n\n } catch (ContractValidateException e) {\n logger.info(e.getMessage());\n Assert.assertFalse(e instanceof ContractValidateException);\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } catch (ItemNotFoundException e) {\n Assert.assertFalse(e instanceof ItemNotFoundException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "public void testUnpack() throws InvalidAdviceException {\n {\n String bag = \"bag1\";\n Object[][] packedTuple = {{\"dsifji2oj\", \"23498ngnjs\"}};\n BaggageAPIForTest baggage = new BaggageAPIForTest().put(bag, packedTuple);\n EmitAPIForTest results = new EmitAPIForTest();\n Advice advice = AdviceTestUtils.newAdvice().observe(\"oa\", \"ob\").unpack(bag, \"pa\", \"pb\").emit(\"test1\", \"oa\", \"pb\", \"pa\", \"ob\").build(baggage, results);\n \n assertTrue(\"Expect nothing emitted yet\", results.emitted.size() == 0);\n advice.advise(\"d8jdj2\", \"ooowoowq\");\n results.expectTuple(\"d8jdj2\", \"23498ngnjs\", \"dsifji2oj\", \"ooowoowq\");\n results.check();\n assertTrue(\"Expect 1 output tuple emitted\", results.emitted.size() == 1);\n }\n {\n String bag = \"bag7\";\n Object[][] packedTuple = {{\"dsifji2oj\", \"23498ngnjs\"}};\n BaggageAPIForTest baggage = new BaggageAPIForTest().put(bag, packedTuple);\n EmitAPIForTest results = new EmitAPIForTest();\n Advice advice = AdviceTestUtils.newAdvice().observe(\"oa\", \"ob\").unpack(bag, \"pa\", \"pb\").emit(\"test1\", \"oa\").build(baggage, results);\n \n assertTrue(\"Expect nothing emitted yet\", results.emitted.size() == 0);\n advice.advise(\"d8jdj2\", \"ooowoowq\");\n results.expectTuple(\"d8jdj2\");\n results.check();\n assertTrue(\"Expect 1 output tuple emitted\", results.emitted.size() == 1);\n }\n {\n String bag = \"bag4\";\n Object[][] packedTuple = {{\"dsifji2oj\", \"23498ngnjs\"}};\n BaggageAPIForTest baggage = new BaggageAPIForTest().put(bag, packedTuple);\n EmitAPIForTest results = new EmitAPIForTest();\n Advice advice = AdviceTestUtils.newAdvice().observe(\"oa\", \"ob\").unpack(bag, \"pa\", \"pb\").emit(\"test1\", \"pb\").build(baggage, results);\n \n assertTrue(\"Expect nothing emitted yet\", results.emitted.size() == 0);\n advice.advise(\"d8jdj2\", \"ooowoowq\");\n results.expectTuple(\"23498ngnjs\");\n results.check();\n assertTrue(\"Expect 1 output tuple emitted\", results.emitted.size() == 1);\n }\n }", "@Test\n void attemptSuccess() {\n when(factStore.currentStateFor(factSpecs)).thenReturn(noEvents);\n\n // publishing went through without any problems\n when(factStore.publishIfUnchanged(any(), any())).thenReturn(true);\n\n UUID aggId = UUID.randomUUID();\n\n when(factus.fetch(UserAggregate.class, aggId)).thenReturn(userAggregate);\n\n AggregateUtil.aggregateId(userAggregate, aggId);\n userAggregate.name(\"Peter\");\n\n BiConsumer<UserAggregate, RetryableTransaction> businessCode =\n spy(\n // cannot be lambda, as we cannot spy on it otherwise\n new BiConsumer<UserAggregate, RetryableTransaction>() {\n @Override\n public void accept(UserAggregate projection, RetryableTransaction tx) {\n if (Objects.equals(projection.name(), \"Peter\")) {\n tx.publish(new UserDeleted(aggId));\n } else {\n tx.abort(\"Peter not found\");\n }\n }\n });\n\n Fact mockedUserDeletedFact = mock(Fact.class);\n when(factus.toFact(any(UserDeleted.class))).thenReturn(mockedUserDeletedFact);\n\n // RUN\n underTest.attempt(businessCode);\n\n // ASSERT\n InOrder inOrder = inOrder(factus, businessCode, factStore);\n\n // verify that first, projection got updated...\n inOrder.verify(factus).fetch(UserAggregate.class, aggId);\n // ... then our business code was run...\n inOrder.verify(businessCode).accept(any(), any());\n // ... and then we published things\n inOrder.verify(factStore).publishIfUnchanged(factListCaptor.capture(), tokenCaptor.capture());\n\n assertThat(factListCaptor.getValue()).hasSize(1);\n\n assertThat(factListCaptor.getValue().get(0)).isEqualTo(mockedUserDeletedFact);\n\n assertThat(tokenCaptor.getValue()).isPresent().get().isEqualTo(noEvents);\n }", "boolean getLockstepAck();", "public void testOutOfOrderDeliveryForAppendOnlyOperations() throws Exception {\n try (ReplicationGroup shards = createGroup(1)) {\n shards.startAll();\n final IndexShard primary = shards.getPrimary();\n final IndexShard replica = shards.getReplicas().get(0);\n // Append-only request - without id\n final BulkShardRequest indexRequest = indexOnPrimary(\n new IndexRequest(index.getName()).id(null).source(\"{}\", MediaTypeRegistry.JSON),\n primary\n );\n final String docId = Iterables.get(getShardDocUIDs(primary), 0);\n final BulkShardRequest deleteRequest = deleteOnPrimary(new DeleteRequest(index.getName()).id(docId), primary);\n deleteOnReplica(deleteRequest, shards, replica);\n indexOnReplica(indexRequest, shards, replica);\n shards.assertAllEqual(0);\n }\n }", "public void testUnpackFromCorrectBag() throws InvalidAdviceException {\n Object[][] t1 = {{\"dsifji2oj\", \"23498ngnjs\"}};\n Object[][] t2 = {{\"dsfj9\", \"u1h32jbn4l1 '\"}};\n Object[][] t3 = {{\"24oi23n\", \"022l;'][ \"}};\n Object[][] t4 = {{\"0m0lkj34\", \"hh2h2n jds \"}};\n BaggageAPIForTest baggage = new BaggageAPIForTest().put(\"bag1\", t1).put(\"bag2\", t2).put(\"bag3\", t3).put(\"bag4\", t4);\n\n {\n EmitAPIForTest results = new EmitAPIForTest();\n Advice advice = AdviceTestUtils.newAdvice().observe(\"oa\", \"ob\").unpack(\"bag1\", \"pa\", \"pb\").emit(\"test1\", \"oa\", \"pb\", \"pa\", \"ob\").build(baggage, results);\n \n assertTrue(\"Expect nothing emitted yet\", results.emitted.size() == 0);\n advice.advise(\"d8jdj2\", \"ooowoowq\");\n results.expectTuple(\"d8jdj2\", \"23498ngnjs\", \"dsifji2oj\", \"ooowoowq\");\n results.check();\n assertTrue(\"Expect 1 output tuple emitted\", results.emitted.size() == 1);\n }\n {\n EmitAPIForTest results = new EmitAPIForTest();\n Advice advice = AdviceTestUtils.newAdvice().observe(\"oa\", \"ob\").unpack(\"bag2\", \"pa\", \"pb\").emit(\"test1\", \"oa\", \"pb\", \"pa\", \"ob\").build(baggage, results);\n \n assertTrue(\"Expect nothing emitted yet\", results.emitted.size() == 0);\n advice.advise(\"d8jdj2\", \"ooowoowq\");\n results.expectTuple(\"d8jdj2\", \"u1h32jbn4l1 '\", \"dsfj9\", \"ooowoowq\");\n results.check();\n assertTrue(\"Expect 1 output tuple emitted\", results.emitted.size() == 1);\n }\n {\n EmitAPIForTest results = new EmitAPIForTest();\n Advice advice = AdviceTestUtils.newAdvice().observe(\"oa\", \"ob\").unpack(\"bag3\", \"pa\", \"pb\").emit(\"test1\", \"oa\", \"pb\", \"pa\", \"ob\").build(baggage, results);\n \n assertTrue(\"Expect nothing emitted yet\", results.emitted.size() == 0);\n advice.advise(\"d8jdj2\", \"ooowoowq\");\n results.expectTuple(\"d8jdj2\", \"022l;'][ \", \"24oi23n\", \"ooowoowq\");\n results.check();\n assertTrue(\"Expect 1 output tuple emitted\", results.emitted.size() == 1);\n }\n {\n EmitAPIForTest results = new EmitAPIForTest();\n Advice advice = AdviceTestUtils.newAdvice().observe(\"oa\", \"ob\").unpack(\"bag4\", \"pa\", \"pb\").emit(\"test1\", \"oa\", \"pb\", \"pa\", \"ob\").build(baggage, results);\n \n assertTrue(\"Expect nothing emitted yet\", results.emitted.size() == 0);\n advice.advise(\"d8jdj2\", \"ooowoowq\");\n results.expectTuple(\"d8jdj2\", \"hh2h2n jds \", \"0m0lkj34\", \"ooowoowq\");\n results.check();\n assertTrue(\"Expect 1 output tuple emitted\", results.emitted.size() == 1);\n }\n }", "@Test\n public void processTestC()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //failed transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),5,10);\n\n Assert.assertEquals(false,trans.process());\n }", "@Test(groups = { \"unittest\", \"postiontests\" })\n public void testMatchOnlineAndBatch() throws Exception {\n BatchPositionCache batchCache = loadTestBatchFile();\n\n assertTrue(batchCache.size() > 0, \"Failed to read batch records\");\n \n // check that we have the records we need\n BatchPosition bp1 = batchCache.getCacheItem(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(96)));\n assertNotNull(bp1, \"Failed to find TUU8 for NDayBreak position 96\");\n assertComparable(bp1.getFullCurrentNetPosition(), new BigDecimal(7200000), \"Current position is wrong\");\n \n BatchPosition bp2 = batchCache.getCacheItem(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(-96)));\n assertNotNull(bp2, \"Failed to find TUU8 for NDayBreak position -96\");\n assertComparable(bp2.getFullCurrentNetPosition(), new BigDecimal(7200000), \"Current position is wrong\");\n \n // Build the online cache\n OnlinePositionAggregateCache onlineCache = loadTestOnlineFile(); \n \n assertTrue(onlineCache.size() > 0, \"Failed to read in online records\");\n \n // check that we have the records we need\n RtfOnlinePosition op1 = onlineCache.getOnlinePosition(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(96)));\n assertNotNull(op1, \"Failed to find TUU8 for NDayBreak position 96\");\n assertEquals(op1.getPrimeBroker(), \"NO PB\", \"Wrong record found\");\n assertEquals(op1.getCurrentPosition(), BigDecimal.ZERO, \"Current position is wrong\");\n \n RtfOnlinePosition op2 = onlineCache.getOnlinePosition(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(-96)));\n assertNotNull(op2, \"Failed to find TUU8 for NDayBreak position -96\");\n assertEquals(op2.getPrimeBroker(), \"GSFUT\", \"Wrong record found\");\n assertEquals(op2.getCurrentPosition(), BigDecimal.ZERO, \"Current position is wrong\");\n }", "@Test\n public void test5() throws InsufficientCashException {\n Map<Integer, Integer> map1 = new TreeMap<Integer, Integer>();\n map1.put(1000, 0);\n map1.put(500, 10);\n map1.put(100, 1);\n map1.put(25, 0);\n map1.put(10, 0);\n map1.put(5, 0);\n map1.put(1, 99);\n try {\n assertEquals(map1, cashRegister.withdraw(50, 100));\n } catch (InsufficientCashException e) {\n fail();\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"Invalid arguments\");\n }\n }", "@Test\n void receivesWithSmallPrefetch() {\n // Arrange\n final String secondPartitionId = \"2\";\n final AtomicBoolean isActive = new AtomicBoolean(true);\n final EventHubProducerAsyncClient producer = toClose(builder.buildAsyncProducerClient());\n\n final Disposable producerEvents = toClose(getEvents(isActive)\n .flatMap(event -> producer.send(event, new SendOptions().setPartitionId(secondPartitionId)))\n .subscribe(\n sent -> {\n },\n error -> logger.error(\"Error sending event\", error),\n () -> logger.info(\"Event sent.\")));\n\n final int prefetch = 5;\n final int backpressure = 3;\n final int batchSize = 10;\n final EventHubConsumerAsyncClient consumer = toClose(builder\n .prefetchCount(prefetch)\n .buildAsyncConsumerClient());\n\n // Act & Assert\n try {\n StepVerifier.create(consumer.receiveFromPartition(secondPartitionId, EventPosition.latest()), prefetch)\n .expectNextCount(prefetch)\n .thenRequest(backpressure)\n .expectNextCount(backpressure)\n .thenRequest(batchSize)\n .expectNextCount(batchSize)\n .thenRequest(batchSize)\n .expectNextCount(batchSize)\n .thenAwait(Duration.ofSeconds(1))\n .thenCancel()\n .verify(TIMEOUT);\n } finally {\n isActive.set(false);\n }\n }", "@Test\n public void shouldCreateKnownBsmCoreData() {\n \n Integer testMsgCnt = 127;\n Integer expectedMsgCnt = 127;\n \n Integer testId = 0b11111111111111111111111111111111;\n String expectedId = \"FF\";\n \n Integer testSec = 65534;\n Integer expectedSec = 65534;\n \n Integer testLat = 900000000;\n BigDecimal expectedLat = BigDecimal.valueOf(90.0000000).setScale(7);\n \n Integer testLong = 1800000000;\n BigDecimal expectedLong = BigDecimal.valueOf(180.0000000).setScale(7);\n \n Integer testElev = 61439;\n BigDecimal expectedElev = BigDecimal.valueOf(6143.9);\n \n // Positional accuracy\n Integer testSemiMajorAxisAccuracy = 254;\n BigDecimal expectedSemiMajorAxisAccuracy = BigDecimal.valueOf(12.70).setScale(2);\n \n Integer testSemiMinorAxisAccuracy = 254;\n BigDecimal expectedSemiMinorAxisAccuracy = BigDecimal.valueOf(12.70).setScale(2);\n \n Integer testSemiMajorAxisOrientation = 65534;\n BigDecimal expectedSemiMajorAxisOrientation = BigDecimal.valueOf(359.9945078786);\n \n \n Integer testTransmissionState = 6;\n String expectedTransmissionState = \"reserved3\";\n \n Integer testSpeed = 8190;\n BigDecimal expectedSpeed = BigDecimal.valueOf(163.80).setScale(2);\n \n Integer testHeading = 28799;\n BigDecimal expectedHeading = BigDecimal.valueOf(359.9875);\n \n Integer testSteeringWheelAngle = 126;\n BigDecimal expectedSteeringWheelAngle = BigDecimal.valueOf(189.0).setScale(1);\n \n // Acceleration set \n Integer testAccelLong = 2000;\n BigDecimal expectedAccelLong = BigDecimal.valueOf(20.00).setScale(2);\n \n Integer testAccelLat = 2000;\n BigDecimal expectedAccelLat = BigDecimal.valueOf(20.00).setScale(2);\n \n Integer testAccelVert = 127;\n BigDecimal expectedAccelVert = BigDecimal.valueOf(2.54);\n \n Integer testAccelYaw = 32767;\n BigDecimal expectedAccelYaw = BigDecimal.valueOf(327.67);\n \n // Brake system status\n byte[] testWheelBrakesBytes = new byte[1];\n testWheelBrakesBytes[0] = (byte) 0b10000000;\n String expectedBrakeAppliedStatus = \"unavailable\";\n \n Integer testTractionControlStatus = 3;\n String expectedTractionControlStatus = \"engaged\";\n \n Integer testAntiLockBrakeStatus = 3;\n String expectedAntiLockBrakeStatus = \"engaged\";\n \n Integer testStabilityControlStatus = 3;\n String expectedStabilityControlStatus = \"engaged\";\n \n Integer testBrakeBoostApplied = 2;\n String expectedBrakeBoostApplied = \"on\";\n \n Integer testAuxiliaryBrakeStatus = 3;\n String expectedAuxiliaryBrakeStatus = \"reserved\";\n \n // Vehicle size\n Integer testVehicleWidth = 1023;\n Integer expectedVehicleWidth = 1023;\n \n Integer testVehicleLength = 4095;\n Integer expectedVehicleLength = 4095;\n \n BSMcoreData testcd = new BSMcoreData();\n testcd.msgCnt = new MsgCount(testMsgCnt);\n testcd.id = new TemporaryID(new byte[]{testId.byteValue()});\n testcd.secMark = new DSecond(testSec);\n testcd.lat = new Latitude(testLat);\n testcd._long = new Longitude(testLong);\n testcd.elev = new Elevation(testElev);\n testcd.accuracy = new PositionalAccuracy(\n new SemiMajorAxisAccuracy(testSemiMajorAxisAccuracy),\n new SemiMinorAxisAccuracy(testSemiMinorAxisAccuracy),\n new SemiMajorAxisOrientation(testSemiMajorAxisOrientation));\n testcd.transmission = new TransmissionState(testTransmissionState);\n testcd.speed = new Speed(testSpeed);\n testcd.heading = new Heading(testHeading);\n testcd.angle = new SteeringWheelAngle(testSteeringWheelAngle);\n testcd.accelSet = new AccelerationSet4Way(\n new Acceleration(testAccelLong),\n new Acceleration(testAccelLat),\n new VerticalAcceleration(testAccelVert),\n new YawRate(testAccelYaw));\n testcd.brakes = new BrakeSystemStatus(\n new BrakeAppliedStatus(testWheelBrakesBytes),\n new TractionControlStatus(testTractionControlStatus),\n new AntiLockBrakeStatus(testAntiLockBrakeStatus),\n new StabilityControlStatus(testStabilityControlStatus),\n new BrakeBoostApplied(testBrakeBoostApplied),\n new AuxiliaryBrakeStatus(testAuxiliaryBrakeStatus));\n testcd.size = new VehicleSize(\n new VehicleWidth(testVehicleWidth),\n new VehicleLength(testVehicleLength));\n \n BasicSafetyMessage testbsm = new BasicSafetyMessage();\n testbsm.coreData = testcd;\n \n J2735Bsm actualbsm = null;\n try {\n actualbsm = OssBsm.genericBsm(testbsm);\n \n if (actualbsm.coreData == null) {\n fail(\"Bsm core data failed to populate\");\n }\n \n } catch (OssBsmPart2Exception e) {\n fail(\"Unexpected exception: \" + e.getClass());\n }\n \n J2735BsmCoreData actualcd = actualbsm.coreData;\n \n assertEquals(\"Incorrect message count\", expectedMsgCnt, actualcd.msgCnt);\n assertEquals(\"Incorrect message id\", expectedId, actualcd.id);\n assertEquals(\"Incorrect second\", expectedSec, actualcd.secMark);\n assertEquals(\"Incorrect lat position\", expectedLat, actualcd.position.getLatitude());\n assertEquals(\"Incorrect long position\", expectedLong, actualcd.position.getLongitude());\n assertEquals(\"Incorrect elev position\", expectedElev, actualcd.position.getElevation());\n assertEquals(\"Incorrect semi major accuracy\", expectedSemiMajorAxisAccuracy, actualcd.accuracy.semiMajor);\n assertEquals(\"Incorrect semi minor accuracy\", expectedSemiMinorAxisAccuracy, actualcd.accuracy.semiMinor);\n assertEquals(\"Incorrect semi major orient\", expectedSemiMajorAxisOrientation, actualcd.accuracy.orientation);\n assertEquals(\"Incorrect transmission state\", expectedTransmissionState, actualcd.transmission.name());\n assertEquals(\"Incorrect speed\", expectedSpeed, actualcd.speed);\n assertEquals(\"Incorrect heading\", expectedHeading, actualcd.heading);\n assertEquals(\"Incorrect steering wheel angle\", expectedSteeringWheelAngle, actualcd.angle);\n assertEquals(\"Incorrect accel long\", expectedAccelLong, actualcd.accelSet.getAccelLong());\n assertEquals(\"Incorrect accel lat\", expectedAccelLat, actualcd.accelSet.getAccelLat());\n assertEquals(\"Incorrect accel vert\", expectedAccelVert, actualcd.accelSet.getAccelVert());\n assertEquals(\"Incorrect accel yaw\", expectedAccelYaw, actualcd.accelSet.getAccelYaw());\n for (Map.Entry<String, Boolean> curVal: actualcd.brakes.wheelBrakes.entrySet()) {\n if (curVal.getKey() == expectedBrakeAppliedStatus) {\n assertTrue(\"Incorrect brake applied status, expected \" + curVal.getKey() + \" to be true\", curVal.getValue());\n } else {\n assertFalse(\"Incorrect brake applied status, expected \" + curVal.getKey() + \" to be false\", curVal.getValue());\n }\n }\n assertEquals(\"Incorrect brake tcs status\", expectedTractionControlStatus, actualcd.brakes.traction);\n assertEquals(\"Incorrect brake abs status\", expectedAntiLockBrakeStatus, actualcd.brakes.abs);\n assertEquals(\"Incorrect brake scs status\", expectedStabilityControlStatus, actualcd.brakes.scs);\n assertEquals(\"Incorrect brake boost status\", expectedBrakeBoostApplied, actualcd.brakes.brakeBoost);\n assertEquals(\"Incorrect brake aux status\", expectedAuxiliaryBrakeStatus, actualcd.brakes.auxBrakes);\n assertEquals(\"Incorrect vehicle width\", expectedVehicleWidth, actualcd.size.getWidth());\n assertEquals(\"Incorrect vehicle length\", expectedVehicleLength, actualcd.size.getLength());\n }", "@Test\n public void testAtMostOnceModeCommitsBeforeEmit() {\n KafkaSpoutConfig<String, String> spoutConfig = createKafkaSpoutConfigBuilder(mock(TopicFilter.class), mock(ManualPartitioner.class), -1)\n .setProcessingGuarantee(KafkaSpoutConfig.ProcessingGuarantee.AT_MOST_ONCE)\n .build();\n KafkaSpout<String, String> spout = SpoutWithMockedConsumerSetupHelper.setupSpout(spoutConfig, conf, contextMock, collectorMock, consumerMock, partition);\n\n when(consumerMock.poll(anyLong())).thenReturn(new ConsumerRecords<>(Collections.singletonMap(partition,\n SpoutWithMockedConsumerSetupHelper.createRecords(partition, 0, 1))));\n\n spout.nextTuple();\n\n //The spout should have emitted the tuple, and must have committed it before emit\n InOrder inOrder = inOrder(consumerMock, collectorMock);\n inOrder.verify(consumerMock).poll(anyLong());\n inOrder.verify(consumerMock).commitSync(commitCapture.capture());\n inOrder.verify(collectorMock).emit(eq(SingleTopicKafkaSpoutConfiguration.STREAM), anyList());\n\n CommitMetadataManager metadataManager = new CommitMetadataManager(contextMock, KafkaSpoutConfig.ProcessingGuarantee.AT_MOST_ONCE);\n Map<TopicPartition, OffsetAndMetadata> committedOffsets = commitCapture.getValue();\n assertThat(committedOffsets.get(partition).offset(), is(0L));\n assertThat(committedOffsets.get(partition).metadata(), is(metadataManager.getCommitMetadata()));\n }", "@Test\r\n public void noEmitFromOtherFlows() throws Exception {\r\n ModuleURN instanceURN = new ModuleURN(PROVIDER_URN, \"mymodule\");\r\n FlowSpecificListener listener = new FlowSpecificListener();\r\n mManager.addSinkListener(listener);\r\n //Set up a data flow with this module as an emitter.\r\n //No data should be received from within this data flow\r\n DataFlowID emitOnlyflowID = mManager.createDataFlow(new DataRequest[]{\r\n new DataRequest(instanceURN)\r\n });\r\n //Setup two other data flows\r\n Object[] reqParms1 = {\"firstOne\", BigDecimal.TEN, \"uno\"};\r\n Object[] reqParms2 = {\"secondOne\", BigDecimal.ZERO, \"dos\"};\r\n DataFlowID flowID1 = mManager.createDataFlow(new DataRequest[]{\r\n new DataRequest(CopierModuleFactory.INSTANCE_URN, reqParms1),\r\n new DataRequest(instanceURN)\r\n });\r\n DataFlowID flowID2 = mManager.createDataFlow(new DataRequest[]{\r\n new DataRequest(CopierModuleFactory.INSTANCE_URN, reqParms2),\r\n new DataRequest(instanceURN)\r\n });\r\n //Wait for data from each of the flows\r\n //flowID2\r\n while(!listener.getFlows().contains(flowID2)) {\r\n Thread.sleep(100);\r\n }\r\n for(Object o: reqParms2) {\r\n assertEquals(o, listener.getNextDataFor(flowID2));\r\n }\r\n //flowID1\r\n while(!listener.getFlows().contains(flowID1)) {\r\n Thread.sleep(100);\r\n }\r\n for(Object o: reqParms1) {\r\n assertEquals(o, listener.getNextDataFor(flowID1));\r\n }\r\n //No data should be received for the very first data flow\r\n assertThat(listener.getFlows(), Matchers.not(Matchers.hasItem(emitOnlyflowID)));\r\n //verify queue sizes for all of them via JMX\r\n assertEquals(0, getMBeanServer().getAttribute(instanceURN.toObjectName(), SimpleAsyncProcessor.ATTRIB_PREFIX + emitOnlyflowID));\r\n assertEquals(0, getMBeanServer().getAttribute(instanceURN.toObjectName(), SimpleAsyncProcessor.ATTRIB_PREFIX + flowID1));\r\n assertEquals(0, getMBeanServer().getAttribute(instanceURN.toObjectName(), SimpleAsyncProcessor.ATTRIB_PREFIX + flowID2));\r\n //verify that the data for each flow is delivered in a unique thread.\r\n assertEquals(null, listener.getThreadNameFor(emitOnlyflowID));\r\n assertThat(listener.getThreadNameFor(flowID1),\r\n Matchers.startsWith(SimpleAsyncProcessor.ASYNC_THREAD_NAME_PREFIX + \"-\" + instanceURN.instanceName()));\r\n assertThat(listener.getThreadNameFor(flowID2), \r\n Matchers.startsWith(SimpleAsyncProcessor.ASYNC_THREAD_NAME_PREFIX + \"-\" + instanceURN.instanceName()));\r\n assertThat(listener.getThreadNameFor(flowID1), Matchers.not(\r\n Matchers.equalTo(listener.getThreadNameFor(flowID2))));\r\n assertThat(listener.getThreadNameFor(flowID1), Matchers.not(\r\n Matchers.equalTo(Thread.currentThread().getName())));\r\n //Cancel all the data flows\r\n mManager.cancel(emitOnlyflowID);\r\n mManager.cancel(flowID1);\r\n //verify that we only have a single flow attribute left\r\n List<String> list = getAttributes(instanceURN);\r\n assertEquals(1, list.size());\r\n assertThat(list, Matchers.hasItem(SimpleAsyncProcessor.ATTRIB_PREFIX + flowID2));\r\n mManager.cancel(flowID2);\r\n //verify that the module is deleted.\r\n List<ModuleURN> instances = mManager.getModuleInstances(PROVIDER_URN);\r\n assertTrue(instances.toString(), instances.isEmpty());\r\n mManager.removeSinkListener(listener);\r\n }", "@Disabled\n @Test\n void processDepositValidatorPubkeysContainsPubkey() {\n }", "boolean getAck();", "@Test\n public void test1() throws InsufficientCashException {\n cashRegister.addPennies(5);\n cashRegister.addDimes(2);\n cashRegister.addDimes(3);\n cashRegister.addFives(10);\n cashRegister.addNickels(4);\n cashRegister.addOnes(1);\n cashRegister.addQuarters(1);\n cashRegister.addTens(5);\n Map<Integer, Integer> map = new TreeMap<Integer, Integer>();\n map.put(1000, 5);\n map.put(500, 10);\n map.put(100, 1);\n map.put(25, 1);\n map.put(10, 5);\n map.put(5, 4);\n map.put(1, 5);\n assertEquals(map, cashRegister.getContents());\n Map<Integer, Integer> map1 = new TreeMap<Integer, Integer>();\n map1.put(1, 5);\n map1.put(5, 4);\n map1.put(10, 5);\n map1.put(25, 1);\n map1.put(100, 1);\n map1.put(1000, 2);\n try {\n assertEquals(map1, cashRegister.withdraw(22, 0));\n } catch (InsufficientCashException e) {\n fail();\n }\n map.put(1000, 3);\n map.put(500, 10);\n map.put(100, 0);\n map.put(25, 0);\n map.put(10, 0);\n map.put(5, 0);\n map.put(1, 0);\n assertEquals(map, cashRegister.getContents());\n String s = \"Deposit: 0.05\\n\"\n + \"Deposit: 0.20\\n\"\n + \"Deposit: 0.30\\n\"\n + \"Deposit: 50.00\\n\"\n + \"Deposit: 0.20\\n\"\n + \"Deposit: 1.00\\n\"\n + \"Deposit: 0.25\\n\"\n + \"Deposit: 50.00\\n\"\n + \"Withdraw: 22.00\";\n assertEquals(s, cashRegister.getAuditLog());\n }", "@Override\n public void receiveAck(Context context, int transactionId) {\n switch (transactionId) {\n case MESSAGE_STOPS_METADATA:\n\n break;\n case MESSAGE_STOP_DATA:\n break;\n }\n }", "protected void pktsAcked(int n, long rtt) {}", "@Test\n public void shouldNotJoinWithEmptyTableOnStreamUpdates() {\n pushToStream(2, \"X\");\n processor.checkAndClearProcessResult(EMPTY);\n }", "@Test\n public void testRaiseAlertStandingOrderDebit() {\n BigDecimal balance = new BigDecimal(\"39.99\").setScale(2);\n String threshold = \"40\";\n long accountNumber = 1234567L;\n Integer transactionClass = 15;\n Integer transactionType = 2269;\n BigDecimal transactionAmount = new BigDecimal(\"10.00\").setScale(2);\n\n String accountNumberString = Long.toString(accountNumber);\n when(tuple.getValueByField(CBSMessageFields.FIELD_CURRENT_ACCOUNT_BALANCE)).thenReturn(balance);\n when(tuple.getStringByField(OCISDetails.THRESHOLD)).thenReturn(threshold);\n when(tuple.getLongByField(CBSMessageFields.FIELD_ACCOUNT_NUMBER)).thenReturn(accountNumber);\n when(tuple.getValueByField(CBSMessageFields.FIELD_TXN_AMOUNT)).thenReturn(transactionAmount);\n when(tuple.getIntegerByField(CBSMessageFields.FIELD_TXN_CLASS)).thenReturn(transactionClass);\n when(tuple.getIntegerByField(CBSMessageFields.FIELD_TXN_TYPE)).thenReturn(transactionType);\n\n RaiseLowBalanceAlert alertFunction = new RaiseLowBalanceAlert();\n alertFunction.execute(tuple, collector);\n\n ArgumentCaptor<Values> valuesCaptor = ArgumentCaptor.forClass(Values.class);\n verify(collector).emit(valuesCaptor.capture());\n\n Values values = valuesCaptor.getValue();\n assertThat(values, notNullValue());\n assertThat(values.size(), is(2));\n\n assertThat((String)values.get(0), is(accountNumberString));\n assertThat((String)values.get(1), containsString(\"1234567|balance is under expected threshold|39.99\"));\n }", "@Test\n public void SameTokenNameCloseTnotherTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long quant = 1L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmount(firstTokenId.getBytes(), 1000L);\n accountCapsule.addAssetAmount(secondTokenId.getBytes(), secondTokenQuant);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, secondTokenId, quant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw another token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void testDistBm()\n {\n generateEvents(\"dist-bm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "@Test\n public void testReplicatedBm()\n {\n generateEvents(\"repl-bm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "@Test\n public void SameTokenNameOpenTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = -1L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmountV2(firstTokenId.getBytes(), 1000L, dbManager);\n accountCapsule.addAssetAmountV2(secondTokenId.getBytes(), secondTokenQuant, dbManager);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void testTariffTransaction ()\n {\n initializeService();\n accountingService.addTariffTransaction(TariffTransaction.Type.SIGNUP,\n tariffB1, customerInfo1, 2, 0.0, 42.1);\n accountingService.addTariffTransaction(TariffTransaction.Type.CONSUME,\n tariffB1, customerInfo2, 7, -77.0, 7.7);\n accountingService.addRegulationTransaction(tariffB1, customerInfo1,\n 2, 10.0, -2.5);\n accountingService.addRegulationTransaction(tariffB1, customerInfo2,\n 7, -10.0, 2.0);\n assertEquals(4, accountingService.getPendingTransactions().size(), \"correct number in list\");\n assertEquals(4, accountingService.getPendingTariffTransactions().size(), \"correct number in ttx list\");\n List<BrokerTransaction> pending = accountingService.getPendingTransactions();\n List<BrokerTransaction> signups = filter(pending,\n new Predicate<BrokerTransaction>() {\n public boolean apply (BrokerTransaction tx) {\n return (tx instanceof TariffTransaction &&\n ((TariffTransaction)tx).getTxType() == TariffTransaction.Type.SIGNUP);\n }\n });\n assertEquals(1, signups.size(), \"one signup\");\n TariffTransaction ttx = (TariffTransaction)signups.get(0);\n assertNotNull(ttx, \"first ttx not null\");\n assertEquals(42.1, ttx.getCharge(), 1e-6, \"correct charge id 0\");\n Broker b1 = ttx.getBroker();\n Broker b2 = brokerRepo.findById(bob.getId());\n assertEquals(b1, b2, \"same broker\");\n List<BrokerTransaction> consumes = filter(pending,\n new Predicate<BrokerTransaction>() {\n public boolean apply (BrokerTransaction tx) {\n return (tx instanceof TariffTransaction &&\n ((TariffTransaction)tx).getTxType() == TariffTransaction.Type.CONSUME);\n }\n });\n assertEquals(2, consumes.size(), \"two consumes\");\n ttx = (TariffTransaction)consumes.get(0);\n assertNotNull(ttx, \"second ttx not null\");\n TariffTransaction ttx1 = (TariffTransaction)consumes.get(1);\n assertNotNull(ttx1, \"third ttx not null\");\n if (ttx.isRegulation()) {\n // swap\n ttx = ttx1;\n ttx1 = (TariffTransaction)consumes.get(0);\n }\n assertEquals(-77.0, ttx.getKWh(), 1e-6, \"correct amount 1\");\n assertFalse(ttx.isRegulation(), \"not regulation\");\n assertEquals(-10.0, ttx1.getKWh(), 1e-6, \"correct amount 2\");\n assertTrue(ttx1.isRegulation(), \"regulation\");\n List<BrokerTransaction> produces = filter(pending,\n new Predicate<BrokerTransaction>() {\n public boolean apply (BrokerTransaction tx) {\n return (tx instanceof TariffTransaction &&\n ((TariffTransaction)tx).getTxType() == TariffTransaction.Type.PRODUCE);\n }\n });\n assertEquals(1, produces.size(), \"one produce\");\n ttx = (TariffTransaction)produces.get(0);\n assertEquals(10.0, ttx.getKWh(), 1e-6, \"correct amount 3\");\n assertTrue(ttx.isRegulation(), \"regulation\");\n }", "@Test\n public void SameTokenNameCloseSuccessExchangeWithdraw2() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 2;\n String firstTokenId = \"_\";\n long firstTokenQuant = 1_000_000_000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 4_000_000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetMap.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n Assert.assertEquals(ret.getInstance().getRet(), code.SUCESS);\n //V1\n ExchangeCapsule exchangeCapsule = dbManager.getExchangeStore()\n .get(ByteArray.fromLong(exchangeId));\n Assert.assertNotNull(exchangeCapsule);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsule.getCreatorAddress());\n Assert.assertEquals(exchangeId, exchangeCapsule.getID());\n Assert.assertEquals(1000000, exchangeCapsule.getCreateTime());\n Assert.assertTrue(Arrays.equals(firstTokenId.getBytes(), exchangeCapsule.getFirstTokenId()));\n Assert.assertEquals(firstTokenId, ByteArray.toStr(exchangeCapsule.getFirstTokenId()));\n Assert.assertEquals(0L, exchangeCapsule.getFirstTokenBalance());\n Assert.assertEquals(secondTokenId, ByteArray.toStr(exchangeCapsule.getSecondTokenId()));\n Assert.assertEquals(0L, exchangeCapsule.getSecondTokenBalance());\n //V2\n ExchangeCapsule exchangeCapsule2 = dbManager.getExchangeStore()\n .get(ByteArray.fromLong(exchangeId));\n Assert.assertNotNull(exchangeCapsule2);\n Assert.assertEquals(ByteString.copyFrom(ownerAddress), exchangeCapsule2.getCreatorAddress());\n Assert.assertEquals(exchangeId, exchangeCapsule2.getID());\n Assert.assertEquals(1000000, exchangeCapsule2.getCreateTime());\n// Assert.assertTrue(Arrays.equals(firstTokenId.getBytes(), exchangeCapsule2.getFirstTokenId()));\n// Assert.assertEquals(firstTokenId, ByteArray.toStr(exchangeCapsule2.getFirstTokenId()));\n Assert.assertEquals(0L, exchangeCapsule2.getFirstTokenBalance());\n// Assert.assertEquals(secondTokenId, ByteArray.toStr(exchangeCapsule2.getSecondTokenId()));\n Assert.assertEquals(0L, exchangeCapsule2.getSecondTokenBalance());\n\n accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(firstTokenQuant + 10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(10_000_000L, assetMap.get(secondTokenId).longValue());\n\n } catch (ContractValidateException e) {\n logger.info(e.getMessage());\n Assert.assertFalse(e instanceof ContractValidateException);\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } catch (ItemNotFoundException e) {\n Assert.assertFalse(e instanceof ItemNotFoundException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n\tpublic void checkReady_test1()\n\t{\n\t\tb.set(0,0, 'x');\n\t\tb.set(0,1, 'o');\n\t\tb.set(1,0, 'x');\n\t\tb.set(0,2, 'o');\n\t\tb.set(2,0, 'x');\n\t\tassertTrue(b.checkReady());\n\t}", "@Test\n public void SameTokenNameOpenExchangeBalanceIsNotEnough() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(1);\n InitExchangeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"123\";\n long firstTokenQuant = 100_000_001L;\n String secondTokenId = \"456\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetV2Map = accountCapsule.getAssetMapV2();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetV2Map.get(firstTokenId));\n Assert.assertEquals(null, assetV2Map.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"exchange balance is not enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void preDefine_TestA()\n {\n //list of prerequisites,i.e. source accounts and destination accounts\n //source accounts created and added to db\n Account Deposit_High_Risk_srcAccount = new Account(3123, \"Deposit_High_Risk_srcAccount\", 10000);\n Account Deposit_Low_Risk_srcAccount = new Account(8665, \"Deposit_Low_Risk_srcAccount\", 10000);\n Account Main_High_Risk_srcAccount = new Account(3143, \"Main_High_Risk_srcAccount\", 10000);\n Account Main_Low_Risk_srcAccount = new Account(3133, \"Main_Low_Risk_srcAccount\", 10000);\n Account Commission_High_Risk_srcAccount = new Account(6565, \"Commission_High_Risk_srcAccount\", 10000);\n Account Commission_Low_Risk_srcAccount = new Account(6588, \"Commission_Low_Risk_srcAccount\", 10000);\n acc_db.addAccount(Deposit_High_Risk_srcAccount);\n acc_db.addAccount(Deposit_Low_Risk_srcAccount);\n acc_db.addAccount(Main_High_Risk_srcAccount);\n acc_db.addAccount(Main_Low_Risk_srcAccount);\n acc_db.addAccount(Commission_High_Risk_srcAccount);\n acc_db.addAccount(Commission_Low_Risk_srcAccount);\n\n //create and add destination accounts\n Account Commission_High_Risk_destAccount = new Account(4444, \"Commission_High_Risk_destAccount\", 10000);\n Account Commission_Low_Risk_destAccount = new Account(4445, \"Commission_Low_Risk_destAccount\", 10000);\n acc_db.addAccount(Commission_High_Risk_destAccount);\n acc_db.addAccount(Commission_Low_Risk_destAccount);\n\n\n\n //adding Main Transaction Destination Accounts to database\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n CompoundTransaction ct = new CompoundTransaction(\"High Risk Preset\");\n\n List<Account> mainDests = new ArrayList<Account>();\n mainDests.add(acc);\n mainDests.add(acc2);\n\n List<Long> mainAmounts = new ArrayList<Long>();\n long main_amount1 = 130;\n long main_amount2=70;\n mainAmounts.add(main_amount1);\n mainAmounts.add(main_amount2);\n\n //Creating and Adding Deposit Destination Account to Database\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n long depAmount = 20;\n acc_db.addAccount(acc3);\n\n RiskPresets preset = new RiskPresets(\"high\");\n\n Assert.assertEquals(true,ct.preDefine(preset,acc3,depAmount,mainDests,mainAmounts,acc_db));\n }", "@Test\n public void testNoGuaranteeModeCommitsPolledTuples() {\n KafkaSpoutConfig<String, String> spoutConfig = createKafkaSpoutConfigBuilder(mock(TopicFilter.class), mock(ManualPartitioner.class), -1)\n .setProcessingGuarantee(KafkaSpoutConfig.ProcessingGuarantee.NO_GUARANTEE)\n .setTupleTrackingEnforced(true)\n .build();\n\n try (SimulatedTime ignored = new SimulatedTime()) {\n KafkaSpout<String, String> spout = SpoutWithMockedConsumerSetupHelper.setupSpout(spoutConfig, conf, contextMock, collectorMock, consumerMock, partition);\n\n when(consumerMock.poll(anyLong())).thenReturn(new ConsumerRecords<>(Collections.singletonMap(partition,\n SpoutWithMockedConsumerSetupHelper.createRecords(partition, 0, 1))));\n\n spout.nextTuple();\n\n when(consumerMock.position(partition)).thenReturn(1L);\n\n ArgumentCaptor<KafkaSpoutMessageId> msgIdCaptor = ArgumentCaptor.forClass(KafkaSpoutMessageId.class);\n verify(collectorMock).emit(eq(SingleTopicKafkaSpoutConfiguration.STREAM), anyList(), msgIdCaptor.capture());\n assertThat(\"Should have captured a message id\", msgIdCaptor.getValue(), not(nullValue()));\n\n Time.advanceTime(KafkaSpout.TIMER_DELAY_MS + spoutConfig.getOffsetsCommitPeriodMs());\n\n spout.nextTuple();\n\n verify(consumerMock).commitAsync(commitCapture.capture(), isNull());\n\n CommitMetadataManager metadataManager = new CommitMetadataManager(contextMock, KafkaSpoutConfig.ProcessingGuarantee.NO_GUARANTEE);\n Map<TopicPartition, OffsetAndMetadata> committedOffsets = commitCapture.getValue();\n assertThat(committedOffsets.get(partition).offset(), is(1L));\n assertThat(committedOffsets.get(partition).metadata(), is(metadataManager.getCommitMetadata()));\n }\n }", "private int handleTestSetValuePacket()\n{\n \n int dataSize = 5; //one byte plus one integer (4 bytes)\n \n //read remainder of packet from socket and verify against the checksum\n int lStatus = readBlockAndVerify(dataSize, Notcher.TEST_SET_VALUE_CMD);\n\n //on error reading and verifying, return the error code\n if (lStatus == -1){ return(status); }\n \n //only store the values if there was no error -- errors cause return above\n\n outBufScrIndex = 0; //start with byte 0 in array\n \n testSetByte = inBuffer[outBufScrIndex];\n \n testSetInt = extractInt(inBuffer);\n \n sendACKPacket();\n \n return(lStatus);\n \n}", "@Test\n public void testInternalCallbacks() throws Exception {\n final CacheTransactionManager txMgr = getCache().getCacheTransactionManager();\n final String rgnName1 = getUniqueName() + \"_1\";\n final String rgnName2 = getUniqueName() + \"_2\";\n final String rgnName3 = getUniqueName() + \"_3\";\n Region rgn1 = getCache().createRegion(rgnName1, getRegionAttributes());\n\n Host host = Host.getHost(0);\n VM vm0 = host.getVM(0);\n VM vm1 = host.getVM(1);\n\n SerializableRunnable createRgn =\n new SerializableRunnable(\"testInternalCallbacks: initial configuration\") {\n @Override\n public void run() {\n try {\n Region rgn1a = getCache().createRegion(rgnName1, getRegionAttributes());\n Region rgn2 = getCache().createRegion(rgnName2, getRegionAttributes());\n Region rgn3 =\n getCache().createRegion(rgnName3, getRegionAttributes(Scope.DISTRIBUTED_NO_ACK));\n rgn1a.create(\"key\", null);\n rgn2.create(\"key\", null);\n rgn3.create(\"key\", null);\n } catch (CacheException e) {\n Assert.fail(\"While creating region\", e);\n }\n }\n };\n vm0.invoke(createRgn);\n vm1.invoke(createRgn);\n\n // Standard commit check\n txMgr.begin();\n rgn1.put(\"key\", \"value0\");\n txMgr.commit();\n SerializableRunnable checkRgn1 =\n new SerializableRunnable(\"testInternalCallbacks: check rgn1 valus\") {\n @Override\n public void run() {\n Region rgn1a = getCache().getRegion(rgnName1);\n assertNotNull(rgn1a);\n assertEquals(\"value0\", rgn1a.getEntry(\"key\").getValue());\n }\n };\n vm0.invoke(checkRgn1);\n vm1.invoke(checkRgn1);\n\n {\n final byte[] cbSensors = {0, 0, 0, 0, 0, 0, 0, 0, 0};\n txMgr.begin();\n ((TXStateProxyImpl) ((TXManagerImpl) txMgr).getTXState()).forceLocalBootstrap();\n setInternalCallbacks(((TXManagerImpl) txMgr).getTXState(), cbSensors);\n rgn1.put(\"key\", \"value1\");\n txMgr.commit();\n for (int i = cbSensors.length - 3; i >= 0; --i) {\n assertEquals(\"Internal callback \" + i + \" was not called the expected number of times!\",\n (byte) 1, cbSensors[i]);\n }\n for (int i = cbSensors.length - 1; i > cbSensors.length - 3; --i) {\n assertEquals(\n \"Internal \\\"during\\\" callback \" + i + \" invoked an unexpected number of times!\",\n (byte) 2, cbSensors[i]);\n }\n }\n SerializableRunnable checkRgn1Again =\n new SerializableRunnable(\"testInternalCallbacks: validate remote values\") {\n @Override\n public void run() {\n Region rgn1a = getCache().getRegion(rgnName1);\n assertNotNull(rgn1a);\n assertEquals(\"value1\", rgn1a.getEntry(\"key\").getValue());\n }\n };\n vm0.invoke(checkRgn1Again);\n vm1.invoke(checkRgn1Again);\n\n // Try 2 regions\n Region rgn2 = getCache().createRegion(rgnName2, getRegionAttributes());\n txMgr.begin();\n rgn1.put(\"key\", \"value2\");\n rgn2.put(\"key\", \"value2\");\n txMgr.commit();\n SerializableRunnable checkRgn12 =\n new SerializableRunnable(\"testInternalCallbacks: check rgn1 valus\") {\n @Override\n public void run() {\n Region rgn1a = getCache().getRegion(rgnName1);\n assertNotNull(rgn1a);\n assertEquals(\"value2\", rgn1a.getEntry(\"key\").getValue());\n Region rgn2a = getCache().getRegion(rgnName2);\n assertNotNull(rgn2a);\n assertEquals(\"value2\", rgn2a.getEntry(\"key\").getValue());\n }\n };\n vm0.invoke(checkRgn12);\n vm1.invoke(checkRgn12);\n\n {\n final byte[] cbSensors = {0, 0, 0, 0, 0, 0, 0, 0, 0};\n txMgr.begin();\n ((TXStateProxyImpl) ((TXManagerImpl) txMgr).getTXState()).forceLocalBootstrap();\n setInternalCallbacks(((TXManagerImpl) txMgr).getTXState(), cbSensors);\n rgn1.put(\"key\", \"value3\");\n rgn2.put(\"key\", \"value3\");\n txMgr.commit();\n\n for (int i = cbSensors.length - 3; i >= 0; i--) {\n assertEquals(\"Internal callback \" + i + \" was not called the expected number of times!\",\n (byte) 1, cbSensors[i]);\n }\n for (int i = cbSensors.length - 1; i > cbSensors.length - 3; --i) {\n assertEquals(\n \"Internal \\\"during\\\" callback \" + i + \" invoked an unexpected number of times!\",\n (byte) 2, cbSensors[i]);\n }\n }\n SerializableRunnable checkRgn12Again =\n new SerializableRunnable(\"testInternalCallbacks: validate both regions remote values\") {\n @Override\n public void run() {\n Region rgn1a = getCache().getRegion(rgnName1);\n assertNotNull(rgn1a);\n assertEquals(\"value3\", rgn1a.getEntry(\"key\").getValue());\n Region rgn2a = getCache().getRegion(rgnName2);\n assertNotNull(rgn2a);\n assertEquals(\"value3\", rgn2a.getEntry(\"key\").getValue());\n }\n };\n vm0.invoke(checkRgn12Again);\n vm1.invoke(checkRgn12Again);\n\n // Try a third region (D_NO_ACK)\n Region rgn3 = getCache().createRegion(rgnName3, getRegionAttributes(Scope.DISTRIBUTED_NO_ACK));\n txMgr.begin();\n rgn1.put(\"key\", \"value4\");\n rgn2.put(\"key\", \"value4\");\n rgn3.put(\"key\", \"value4\");\n txMgr.commit();\n SerializableRunnable checkRgn123 =\n new SerializableRunnable(\"testInternalCallbacks: check rgn1 valus\") {\n @Override\n public void run() {\n Region rgn1a = getCache().getRegion(rgnName1);\n assertNotNull(rgn1a);\n assertEquals(\"value4\", rgn1a.getEntry(\"key\").getValue());\n Region rgn2a = getCache().getRegion(rgnName2);\n assertNotNull(rgn2a);\n assertEquals(\"value4\", rgn2a.getEntry(\"key\").getValue());\n Region rgn3a = getCache().getRegion(rgnName3);\n assertNotNull(rgn3a);\n assertEquals(\"value4\", rgn3a.getEntry(\"key\").getValue());\n }\n };\n vm0.invoke(checkRgn123);\n vm1.invoke(checkRgn123);\n\n {\n final byte[] cbSensors = {0, 0, 0, 0, 0, 0, 0, 0, 0};\n txMgr.begin();\n ((TXStateProxyImpl) ((TXManagerImpl) txMgr).getTXState()).forceLocalBootstrap();\n setInternalCallbacks(((TXManagerImpl) txMgr).getTXState(), cbSensors);\n\n rgn1.put(\"key\", \"value5\");\n rgn2.put(\"key\", \"value5\");\n rgn3.put(\"key\", \"value5\");\n txMgr.commit();\n\n for (int i = cbSensors.length - 3; i >= 0; i--) {\n assertEquals(\"Internal callback \" + i + \" was not called the expected number of times!\",\n (byte) 1, cbSensors[i]);\n }\n for (int i = cbSensors.length - 1; i > cbSensors.length - 3; --i) {\n assertEquals(\n \"Internal \\\"during\\\" callback \" + i + \" invoked an unexpected number of times!\",\n (byte) 2, cbSensors[i]);\n }\n }\n SerializableRunnable checkRgn123Again =\n new SerializableRunnable(\"testInternalCallbacks: validate both regions remote values\") {\n @Override\n public void run() {\n Region rgn1a = getCache().getRegion(rgnName1);\n assertNotNull(rgn1a);\n assertEquals(\"value5\", rgn1a.getEntry(\"key\").getValue());\n Region rgn2a = getCache().getRegion(rgnName2);\n assertNotNull(rgn2a);\n assertEquals(\"value5\", rgn2a.getEntry(\"key\").getValue());\n Region rgn3a = getCache().getRegion(rgnName3);\n assertNotNull(rgn3a);\n assertEquals(\"value5\", rgn3a.getEntry(\"key\").getValue());\n }\n };\n vm0.invoke(checkRgn123Again);\n vm1.invoke(checkRgn123Again);\n\n rgn1.destroyRegion();\n rgn2.destroyRegion();\n }", "@Test\n public void mixedSSTableFailure() throws Exception\n {\n cfs.getCompactionStrategyManager().disable();\n QueryProcessor.executeInternal(\"INSERT INTO ks.tbl (k, v) VALUES (1, 1);\");\n Util.flush(cfs);\n QueryProcessor.executeInternal(\"INSERT INTO ks.tbl (k, v) VALUES (2, 2);\");\n Util.flush(cfs);\n QueryProcessor.executeInternal(\"INSERT INTO ks.tbl (k, v) VALUES (3, 3);\");\n Util.flush(cfs);\n QueryProcessor.executeInternal(\"INSERT INTO ks.tbl (k, v) VALUES (4, 4);\");\n Util.flush(cfs);\n\n List<SSTableReader> sstables = new ArrayList<>(cfs.getLiveSSTables());\n Assert.assertEquals(4, sstables.size());\n\n SSTableReader unrepaired = sstables.get(0);\n SSTableReader repaired = sstables.get(1);\n SSTableReader pending1 = sstables.get(2);\n SSTableReader pending2 = sstables.get(3);\n\n mutateRepaired(repaired, FBUtilities.nowInSeconds(), ActiveRepairService.NO_PENDING_REPAIR, false);\n mutateRepaired(pending1, UNREPAIRED_SSTABLE, nextTimeUUID(), false);\n mutateRepaired(pending2, UNREPAIRED_SSTABLE, nextTimeUUID(), false);\n\n LifecycleTransaction txn = null;\n List<SSTableReader> toCompact = new ArrayList<>(sstables);\n for (int i=0; i<sstables.size(); i++)\n {\n try\n {\n txn = cfs.getTracker().tryModify(sstables, OperationType.COMPACTION);\n Assert.assertNotNull(txn);\n CompactionTask task = new CompactionTask(cfs, txn, 0);\n Assert.fail(\"Expected IllegalArgumentException\");\n }\n catch (IllegalArgumentException e)\n {\n // expected\n }\n finally\n {\n if (txn != null)\n txn.abort();\n }\n Collections.rotate(toCompact, 1);\n }\n }", "@Test\n public void testInsert() {\n // Define a HashMap to insert and another one for the comparison operation.\n HashMap<String, String> insertValue = RiakKVClientTest.createExpectedHashMap(RiakKVClientTest.recordsToInsert);\n HashMap<String, ByteIterator> readValue = new HashMap<>();\n // Check whether the insertion transaction was performed or not.\n Assert.assertEquals(\"Insert transaction FAILED.\", OK, RiakKVClientTest.riakClient.insert(RiakKVClientTest.bucket, ((RiakKVClientTest.keyPrefix) + (Integer.toString(RiakKVClientTest.recordsToInsert))), StringByteIterator.getByteIteratorMap(insertValue)));\n // Finally, compare the insertion performed with the one expected by reading the key.\n Assert.assertEquals(\"Insert test FAILED. Unable to read inserted value.\", OK, RiakKVClientTest.riakClient.read(RiakKVClientTest.bucket, ((RiakKVClientTest.keyPrefix) + (Integer.toString(RiakKVClientTest.recordsToInsert))), null, readValue));\n Assert.assertEquals(\"Insert test FAILED. Actual read transaction value is NOT MATCHING the inserted one.\", insertValue.toString(), readValue.toString());\n }", "@Test\n public void testWithOperationSerializationFailures() throws Exception {\n int streamSegmentCount = 10;\n int appendsPerStreamSegment = 80;\n int failAppendFrequency = 7; // Fail every X appends encountered.\n\n @Cleanup\n TestContext context = new TestContext();\n\n // Generate some test data (no need to complicate ourselves with Transactions here; that is tested in the no-failure test).\n HashSet<Long> streamSegmentIds = createStreamSegmentsInMetadata(streamSegmentCount, context.metadata);\n List<Operation> operations = generateOperations(streamSegmentIds, new HashMap<>(), appendsPerStreamSegment,\n METADATA_CHECKPOINT_EVERY, false, false);\n\n // Replace some of the Append Operations with a FailedAppendOperation. Some operations fail at the beginning,\n // some at the end of the serialization.\n int appendCount = 0;\n HashSet<Integer> failedOperationIndices = new HashSet<>();\n for (int i = 0; i < operations.size(); i++) {\n if (operations.get(i) instanceof StreamSegmentAppendOperation) {\n if ((appendCount++) % failAppendFrequency == 0) {\n operations.set(i, new FailedStreamSegmentAppendOperation((StreamSegmentAppendOperation) operations.get(i)));\n failedOperationIndices.add(i);\n }\n }\n }\n\n // Setup an OperationProcessor and start it.\n @Cleanup\n TestDurableDataLog dataLog = TestDurableDataLog.create(CONTAINER_ID, MAX_DATA_LOG_APPEND_SIZE, executorService());\n dataLog.initialize(TIMEOUT);\n @Cleanup\n OperationProcessor operationProcessor = new OperationProcessor(context.metadata, context.stateUpdater,\n dataLog, getNoOpCheckpointPolicy(), executorService());\n operationProcessor.startAsync().awaitRunning();\n\n // Process all generated operations.\n List<OperationWithCompletion> completionFutures = processOperations(operations, operationProcessor);\n\n // Wait for all such operations to complete. We are expecting exceptions, so verify that we do.\n AssertExtensions.assertThrows(\n \"No operations failed.\",\n OperationWithCompletion.allOf(completionFutures)::join,\n ex -> ex instanceof IntentionalException);\n\n // Verify that the \"right\" operations failed, while the others succeeded.\n for (int i = 0; i < completionFutures.size(); i++) {\n OperationWithCompletion oc = completionFutures.get(i);\n if (failedOperationIndices.contains(i)) {\n AssertExtensions.assertThrows(\n \"Unexpected exception for failed Operation.\",\n oc.completion::join,\n ex -> ex instanceof IntentionalException);\n } else {\n // Verify no exception was thrown.\n oc.completion.join();\n }\n }\n\n performLogOperationChecks(completionFutures, context.memoryLog, dataLog, context.metadata);\n performMetadataChecks(streamSegmentIds, new HashSet<>(), new HashMap<>(), completionFutures, context.metadata, false, false);\n performReadIndexChecks(completionFutures, context.readIndex);\n operationProcessor.stopAsync().awaitTerminated();\n }", "@Test\n public void preDefine_TestB()\n {\n //list of prerequisites,i.e. source accounts and destination accounts\n //source accounts created and added to db\n Account Deposit_High_Risk_srcAccount = new Account(3123, \"Deposit_High_Risk_srcAccount\", 10000);\n Account Deposit_Low_Risk_srcAccount = new Account(8665, \"Deposit_Low_Risk_srcAccount\", 10000);\n Account Main_High_Risk_srcAccount = new Account(3143, \"Main_High_Risk_srcAccount\", 10000);\n Account Main_Low_Risk_srcAccount = new Account(3133, \"Main_Low_Risk_srcAccount\", 10000);\n Account Commission_High_Risk_srcAccount = new Account(6565, \"Commission_High_Risk_srcAccount\", 10000);\n Account Commission_Low_Risk_srcAccount = new Account(6588, \"Commission_Low_Risk_srcAccount\", 10000);\n acc_db.addAccount(Deposit_High_Risk_srcAccount);\n acc_db.addAccount(Deposit_Low_Risk_srcAccount);\n acc_db.addAccount(Main_High_Risk_srcAccount);\n acc_db.addAccount(Main_Low_Risk_srcAccount);\n acc_db.addAccount(Commission_High_Risk_srcAccount);\n acc_db.addAccount(Commission_Low_Risk_srcAccount);\n\n //create and add destination accounts\n Account Commission_High_Risk_destAccount = new Account(4444, \"Commission_High_Risk_destAccount\", 10000);\n Account Commission_Low_Risk_destAccount = new Account(4445, \"Commission_Low_Risk_destAccount\", 10000);\n acc_db.addAccount(Commission_High_Risk_destAccount);\n acc_db.addAccount(Commission_Low_Risk_destAccount);\n\n //adding Main Transaction Destination Accounts to database\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n CompoundTransaction ct = new CompoundTransaction(\"Low Risk Preset\");\n\n List<Account> mainDests = new ArrayList<Account>();\n mainDests.add(acc);\n mainDests.add(acc2);\n\n List<Long> mainAmounts = new ArrayList<Long>();\n long main_amount1 = 130;\n long main_amount2=70;\n mainAmounts.add(main_amount1);\n mainAmounts.add(main_amount2);\n\n //Creating and Adding Deposit Destination Account to Database\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n long depAmount = 20;\n acc_db.addAccount(acc3);\n\n RiskPresets preset = new RiskPresets(\"low\");\n\n Assert.assertEquals(true,ct.preDefine(preset,acc3,depAmount,mainDests,mainAmounts,acc_db));\n }", "@Test\n public void testLoadToStagingTable() {\n\n // create a list of 8 transfer objects and set the batch size to 5\n List<BulkLoadElementTO> lTOList = populateBulkLoadElementTO( 8 );\n setBatchSize( 5 );\n\n // load the data to the staging table. All data should be written with two batch operations\n // (one for 5 rows and one for 3 rows)\n iBulkLoadDataService.loadToStagingTable( lTOList, iFileImportKey );\n\n // assert whether all 8 rows have been written to the staging table\n BulkLoadElementTableRow lBulkLoadElementRow;\n for ( int i = 0; i < 8; i++ ) {\n lBulkLoadElementRow = iBulkLoadElementDao.findByPrimaryKey(\n new BulkLoadElementKey( iFileImportKey.getDbId(), iFileImportKey.getId(), i ) );\n\n assertEquals( \"Component 1 (C0)\", C0, lBulkLoadElementRow.getC0() );\n\n }\n }", "@Test\n public void testDontRaiseAlertAmountDidntTipBalance() {\n BigDecimal balance = new BigDecimal(\"3.99\").setScale(2);\n String threshold = \"40\";\n long accountNumber = 1234567L;\n Integer transactionClass = 6;\n Integer transactionType = 2269;\n BigDecimal transactionAmount = new BigDecimal(\"10.00\").setScale(2);\n\n String accountNumberString = Long.toString(accountNumber);\n when(tuple.getValueByField(CBSMessageFields.FIELD_CURRENT_ACCOUNT_BALANCE)).thenReturn(balance);\n when(tuple.getStringByField(OCISDetails.THRESHOLD)).thenReturn(threshold);\n when(tuple.getLongByField(CBSMessageFields.FIELD_ACCOUNT_NUMBER)).thenReturn(accountNumber);\n when(tuple.getValueByField(CBSMessageFields.FIELD_TXN_AMOUNT)).thenReturn(transactionAmount);\n when(tuple.getIntegerByField(CBSMessageFields.FIELD_TXN_CLASS)).thenReturn(transactionClass);\n when(tuple.getIntegerByField(CBSMessageFields.FIELD_TXN_TYPE)).thenReturn(transactionType);\n\n RaiseLowBalanceAlert alertFunction = new RaiseLowBalanceAlert();\n alertFunction.execute(tuple, collector);\n\n ArgumentCaptor<Values> valuesCaptor = ArgumentCaptor.forClass(Values.class);\n verify(collector).emit(valuesCaptor.capture());\n\n Values values = valuesCaptor.getValue();\n assertThat(values, notNullValue());\n assertThat(values.size(), is(2));\n assertThat((String)values.get(0), is(accountNumberString));\n assertThat(values.get(1), nullValue());\n }", "private void populateDataAndVerify(ReplicatedEnvironment masterEnv) {\n createTestData();\n populateDB(masterEnv, dbName, keys);\n readDB(masterEnv, dbName, startKey, numKeys);\n logger.info(numKeys + \" records (start key: \" +\n startKey + \") have been populated into db \" +\n dbName + \" and verified\");\n }", "@Test\n public void SameTokenNameCloseTokenBalanceZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 200000000L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmount(firstTokenId.getBytes(), firstTokenQuant);\n accountCapsule.addAssetAmount(secondTokenId.getBytes(), secondTokenQuant);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n ExchangeCapsule exchangeCapsule = dbManager.getExchangeStore()\n .get(ByteArray.fromLong(exchangeId));\n exchangeCapsule.setBalance(0, 0);\n dbManager.getExchangeStore().put(exchangeCapsule.createDbKey(), exchangeCapsule);\n\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"Token balance in exchange is equal with 0,\"\n + \"the exchange has been closed\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } catch (ItemNotFoundException e) {\n Assert.assertFalse(e instanceof ItemNotFoundException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void SameTokenNameCloseTokenQuantLessThanZero() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = -1L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n accountCapsule.addAssetAmount(firstTokenId.getBytes(), 1000L);\n accountCapsule.addAssetAmount(secondTokenId.getBytes(), secondTokenQuant);\n accountCapsule.setBalance(10000_000000L);\n dbManager.getAccountStore().put(ownerAddress, accountCapsule);\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"withdraw token quant must greater than zero\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "@Test\n public void testDataMix()\n throws InterruptedException {\n\n createGroup(2);\n\n ReplicatedEnvironment menv = repEnvInfo[0].getEnv();\n TransactionConfig txnConfig = RepTestUtils.WNSYNC_NONE_TC;\n Transaction txn = menv.beginTransaction(null, txnConfig);\n Database db = menv.openDatabase(txn, \"mixed\", dbconfig);\n txn.commit();\n txn = null;\n RepTestUtils.syncGroup(repEnvInfo);\n\n repEnvInfo[1].closeEnv();\n assertEquals(menv.getState(), State.MASTER);\n\n final int batchBuffSize =\n Integer.parseInt(RepParams.FEEDER_BATCH_BUFF_KB.getDefault()) *\n 1024;\n\n txn = menv.beginTransaction(null, txnConfig);\n\n /*\n * Generate a log pattern with an intervening large object that serves\n * to break up a batch.\n */\n for (int size : new int[] { 1, 2, /* batch 1 */\n batchBuffSize + 1, /* break the batch */\n 3, 4 /* batch 2 */\n }) {\n IntegerBinding.intToEntry(size, key);\n data.setData(new byte[size]);\n db.put(txn, key, data);\n }\n txn.commit();\n db.close();\n\n\n ReplicatedEnvironmentStats stats =\n menv.getRepStats(StatsConfig.CLEAR);\n\n repEnvInfo[1].openEnv();\n final VLSN vlsn = RepTestUtils.syncGroup(repEnvInfo);\n\n stats = menv.getRepStats(null);\n\n /*\n * Seven total messages: 1 unconditional startup heartbeat +\n * 5 puts + 1 commit\n */\n assertEquals(7, stats.getNProtocolMessagesWritten());\n\n /* 4 puts + 1 commit batched. */\n assertEquals(5, stats.getNProtocolMessagesBatched());\n\n /* 2 batches as above. */\n assertEquals(2, stats.getNProtocolMessageBatches());\n\n RepTestUtils.checkNodeEquality(vlsn, false, repEnvInfo);\n }", "@Test\n\tpublic void testBooleanTrueSingleSource() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query03.rq\", \"/tests/basic/query03.srx\", false);\n\t}", "@Test\n public void testZookeeperCacheLoader() throws InterruptedException, KeeperException, Exception {\n\n DiscoveryZooKeeperClientFactoryImpl.zk = mockZookKeeper;\n\n @SuppressWarnings(\"resource\")\n ZookeeperCacheLoader zkLoader = new ZookeeperCacheLoader(new DiscoveryZooKeeperClientFactoryImpl(), \"\", 30_000);\n\n List<String> brokers = Lists.newArrayList(\"broker-1:15000\", \"broker-2:15000\", \"broker-3:15000\");\n for (int i = 0; i < brokers.size(); i++) {\n try {\n LoadManagerReport report = i % 2 == 0 ? getSimpleLoadManagerLoadReport(brokers.get(i))\n : getModularLoadManagerLoadReport(brokers.get(i));\n zkLoader.getLocalZkCache().getZooKeeper().create(LOADBALANCE_BROKERS_ROOT + \"/\" + brokers.get(i),\n ObjectMapperFactory.getThreadLocal().writeValueAsBytes(report), ZooDefs.Ids.OPEN_ACL_UNSAFE,\n CreateMode.PERSISTENT);\n } catch (Exception e) {\n fail(\"failed while creating broker znodes\");\n }\n }\n\n // strategically wait for cache to get sync\n for (int i = 0; i < 5; i++) {\n if (zkLoader.getAvailableBrokers().size() == 3 || i == 4) {\n break;\n }\n Thread.sleep(1000);\n }\n\n // 2. get available brokers from ZookeeperCacheLoader\n List<LoadManagerReport> list = zkLoader.getAvailableBrokers();\n\n // 3. verify retrieved broker list\n Set<String> cachedBrokers = list.stream().map(loadReport -> loadReport.getWebServiceUrl())\n .collect(Collectors.toSet());\n Assert.assertEquals(list.size(), brokers.size());\n Assert.assertTrue(brokers.containsAll(cachedBrokers));\n\n // 4.a add new broker\n final String newBroker = \"broker-4:15000\";\n LoadManagerReport report = getSimpleLoadManagerLoadReport(newBroker);\n zkLoader.getLocalZkCache().getZooKeeper().create(LOADBALANCE_BROKERS_ROOT + \"/\" + newBroker,\n ObjectMapperFactory.getThreadLocal().writeValueAsBytes(report), ZooDefs.Ids.OPEN_ACL_UNSAFE,\n CreateMode.PERSISTENT);\n brokers.add(newBroker);\n\n Thread.sleep(100); // wait for 100 msec: to get cache updated\n\n // 4.b. get available brokers from ZookeeperCacheLoader\n list = zkLoader.getAvailableBrokers();\n\n // 4.c. verify retrieved broker list\n cachedBrokers = list.stream().map(loadReport -> loadReport.getWebServiceUrl()).collect(Collectors.toSet());\n Assert.assertEquals(list.size(), brokers.size());\n Assert.assertTrue(brokers.containsAll(cachedBrokers));\n\n }", "@Test\n\tpublic void testScenario1() {\n\t\tSystem.out.println(\"----------Running Recovery Scenario 1----------\");\n\t\t// Creating a Block.\n\t\tBlock blk1 = new Block(\"filename\", 1);\n\t\tBlock blk2 = new Block(\"filename\", 2);\n\n\t\t// Create a RecoveryManager\n\t\tint txid = 123;\n\t\tint txid2 = 143;\n\t\tRecoveryMgr rm = new RecoveryMgr(txid);\n\t\tRecoveryMgr rm2 = new RecoveryMgr(txid2);\n\n\t\t// Sample setInt\n\t\tBufferMgr basicBufferMgr = new SimpleDB().bufferMgr();\n\t\tBuffer buff = basicBufferMgr.pin(blk1);\n\t\tBuffer buff2 = basicBufferMgr.pin(blk2);\n\t\tint offset = 8;\n\t\tint offset2 = 16;\n\t\tint oldValue = buff.getInt(offset);\n\t\tint oldValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"Old Value: \" + oldValue);\n\t\tSystem.out.println(\"Old Value2: \" + oldValue2);\n\t\tint valueToSet = oldValue + 10;\n\t\tint valueToSet2 = oldValue2 + 20;\n\t\tint lsn = rm.setInt(buff, offset, valueToSet);\n\t\tbuff.setInt(offset, valueToSet, txid, lsn);\n\t\tint lsn2 = rm2.setInt(buff2, offset2, valueToSet2);\n\t\tbuff2.setInt(offset2, valueToSet2, txid2, lsn2);\n\t\tint newValue = buff.getInt(offset);\n\t\tSystem.out.println(\"New Value without committing: \" + newValue);\n\t\tint newValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"New Value2 without committing: \" + newValue2);\n\n\t\trm2.commit();\n\t\trm2.recover();\n\t\tnewValue = buff.getInt(offset);\n\t\tnewValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"New Value after recovering: \" + newValue);\n\t\tSystem.out.println(\"New Value2 after recovering: \" + newValue2);\n\t\tAssert.assertEquals(oldValue, newValue);\n\t\tAssert.assertEquals(valueToSet2, newValue2);\n\t\tSystem.out.println(\"----------Recovery Scenario 1 Run Complete----------\");\n\t}", "@Test\n public void SameTokenNameCloseExchangeBalanceIsNotEnough() {\n dbManager.getDynamicPropertiesStore().saveAllowSameTokenName(0);\n InitExchangeBeforeSameTokenNameActive();\n long exchangeId = 1;\n String firstTokenId = \"abc\";\n long firstTokenQuant = 100_000_001L;\n String secondTokenId = \"def\";\n long secondTokenQuant = 400000000L;\n\n byte[] ownerAddress = ByteArray.fromHexString(OWNER_ADDRESS_FIRST);\n AccountCapsule accountCapsule = dbManager.getAccountStore().get(ownerAddress);\n Map<String, Long> assetMap = accountCapsule.getAssetMap();\n Assert.assertEquals(10000_000000L, accountCapsule.getBalance());\n Assert.assertEquals(null, assetMap.get(firstTokenId));\n Assert.assertEquals(null, assetMap.get(secondTokenId));\n\n ExchangeWithdrawActuator actuator = new ExchangeWithdrawActuator(getContract(\n OWNER_ADDRESS_FIRST, exchangeId, firstTokenId, firstTokenQuant),\n dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n\n try {\n actuator.validate();\n actuator.execute(ret);\n fail();\n } catch (ContractValidateException e) {\n Assert.assertTrue(e instanceof ContractValidateException);\n Assert.assertEquals(\"exchange balance is not enough\",\n e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse(e instanceof ContractExeException);\n } finally {\n dbManager.getExchangeStore().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeStore().delete(ByteArray.fromLong(2L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(1L));\n dbManager.getExchangeV2Store().delete(ByteArray.fromLong(2L));\n }\n }", "boolean hasJsonAckMsg();", "@Test\n @Commit\n public void dynamicUpdateContent(){\n }", "@Test\n public void givenUSCensusData_WhenTrue_RecordShouldMatch() throws CSVBuilderException {\n final String CSV_FILE_PATH = \"src/test/resources/USCensusData.csv\";\n try\n {\n int noOfRecords = usCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.US, CSV_FILE_PATH);\n Assert.assertEquals(51, noOfRecords);\n }\n catch (CSVBuilderException e)\n {\n\n }\n }", "@Test\n public void test6() {\n Map<Integer, Integer> map1 = new TreeMap<Integer, Integer>();\n try {\n assertEquals(map1, cashRegister.withdraw(50, 100));\n } catch (InsufficientCashException e) {\n fail();\n } catch (IllegalArgumentException e) {\n assertEquals(e.getMessage(), \"Invalid arguments\");\n }\n assertEquals(\"\", cashRegister.getAuditLog());\n }", "@Test\n public void testNoGuaranteeModeCannotReplayTuples() {\n KafkaSpoutConfig<String, String> spoutConfig = createKafkaSpoutConfigBuilder(mock(TopicFilter.class), mock(ManualPartitioner.class), -1)\n .setProcessingGuarantee(KafkaSpoutConfig.ProcessingGuarantee.NO_GUARANTEE)\n .setTupleTrackingEnforced(true)\n .build();\n doTestModeCannotReplayTuples(spoutConfig);\n }", "public void testLoadOrder() throws Exception {\n }", "public Transaction getDummyTransaction(String action) {\n\n\t\t// Long payerAccountNum = 111l;\n\t\tLong payerRealmNum = 0l;\n\t\tLong payerShardNum = 0l;\n\t\t// Long nodeAccountNum=123l;\n\t\tLong nodeRealmNum = 0l;\n\t\tLong nodeShardNum = 0l;\n\t\tlong transactionFee = 0l;\n\t\tTimestamp startTime =\n\t\t\t\tRequestBuilder.getTimestamp(Instant.now(Clock.systemUTC()).minusSeconds(13));\n\t\tDuration transactionDuration = RequestBuilder.getDuration(100);\n\t\tboolean generateRecord = false;\n\t\tString memo = \"UnitTesting\";\n\t\tint thresholdValue = 10;\n\t\tList<Key> keyList = new ArrayList<>();\n\t\tKeyPair pair = new KeyPairGenerator().generateKeyPair();\n\t\tbyte[] pubKey = ((EdDSAPublicKey) pair.getPublic()).getAbyte();\n\t\tKey akey =\n\t\t\t\tKey.newBuilder().setEd25519(ByteString.copyFromUtf8((MiscUtils.commonsBytesToHex(pubKey)))).build();\n\t\tPrivateKey priv = pair.getPrivate();\n\t\tkeyList.add(akey);\n\t\tlong initBal = 100;\n\t\tlong sendRecordThreshold = 5;\n\t\tlong receiveRecordThreshold = 5;\n\t\tboolean receiverSign = false;\n\t\tDuration autoRenew = RequestBuilder.getDuration(100);\n\t\t;\n\t\tlong proxyAccountNum = 12345l;\n\t\tlong proxyRealmNum = 0l;\n\t\tlong proxyShardNum = 0l;\n\t\tint proxyFraction = 10;\n\t\tint maxReceiveProxyFraction = 10;\n\t\tlong shardID = 0l;\n\t\tlong realmID = 0l;\n\n\t\tTransaction trx = null;\n\t\tSignatureList sigList = SignatureList.getDefaultInstance();\n\t\tTimestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\n\t\t/**\n\t\t * SignatureList sigList = SignatureList.getDefaultInstance(); Transaction transferTx =\n\t\t * RequestBuilder.getCryptoTransferRequest( payer.getAccountNum(), payer.getRealmNum(),\n\t\t * payer.getShardNum(), nodeAccount.getAccountNum(), nodeAccount.getRealmNum(),\n\t\t * nodeAccount.getShardNum(), 800, timestamp, transactionDuration, false, \"test\", sigList,\n\t\t * payer.getAccountNum(), -100l, nodeAccount.getAccountNum(), 100l); transferTx =\n\t\t * TransactionSigner.signTransaction(transferTx, accountKeys.get(payer));\n\t\t */\n\n\t\tif (\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t\ttrx = RequestBuilder.getCryptoTransferRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 800, timestamp,\n\t\t\t\t\ttransactionDuration, false, \"test\", sigList, payerAccountId.getAccountNum(), -100l,\n\t\t\t\t\tnodeAccountId.getAccountNum(), 100l);\n\t\t\t// trx = TransactionSigner.signTransaction(trx, account2keyMap.get(payerAccountId));\n\t\t}\n\n\t\tif (\"createContract\".equalsIgnoreCase(action)) {\n\t\t\tFileID fileID = FileID.newBuilder().setFileNum(9999l).setRealmNum(1l).setShardNum(2l).build();\n\n\t\t\ttrx = RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t\t\t\tpayerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t\t\t\tnodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 50000000000l, timestamp,\n\t\t\t\t\ttransactionDuration, true, \"createContract\", DEFAULT_CONTRACT_OP_GAS, fileID,\n\t\t\t\t\tByteString.EMPTY, 0, transactionDuration,\n\t\t\t\t\tSignatureList.newBuilder().addSigs(\n\t\t\t\t\t\t\tSignature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t\t\t\t\t\t.build(),\n\t\t\t\t\t\"\");\n\t\t}\n\n\t\t// if(\"SolidityIDQuery\".equalsIgnoreCase(action)) {\n\t\t// long durationInSeconds = DAY_SEC * 30;\n\t\t// * Duration contractAutoRenew = Duration.newBuilder().setSeconds(durationInSeconds).build();\n\t\t// * Timestamp timestamp = TestHelper.getDefaultCurrentTimestampUTC();\n\t\t// * Duration transactionDuration = RequestBuilder.getDuration(30, 0);\n\t\t// * Transaction createContractRequest =\n\t\t// RequestBuilder.getCreateContractRequest(payerAccountId.getAccountNum(),\n\t\t// * payerAccountId.getRealmNum(), payerAccountId.getShardNum(), nodeAccountId.getAccountNum(),\n\t\t// * nodeAccountId.getRealmNum(), nodeAccountId.getShardNum(), 100l, timestamp,\n\t\t// transactionDuration, true, \"createContract\",\n\t\t// * DEFAULT_CONTRACT_OP_GAS, contractFile, ByteString.EMPTY, 0, contractAutoRenew,\n\t\t// * SignatureList.newBuilder()\n\t\t// *\n\t\t// .addSigs(Signature.newBuilder().setEd25519(ByteString.copyFrom(\"testsignature\".getBytes())))\n\t\t// * .build());\n\t\t// }\n\n\t\treturn trx;\n\n\t}", "@Ignore\n @Test\n public void testFaultInEntryValueShouldbeSerialized() {\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 }\n\n // assert for value should be Byte Array\n // here value is not delivered to client and should be get deserialized\n // value in region should be serialized form\n assertTrue(\"FaultIn Value in not a byte Array \", rgn.get(6L) instanceof byte[]);\n\n } catch (Exception ex) {\n ex.printStackTrace();\n fail(\"Test failed\");\n }\n }", "@Test\n\tpublic void testBooleanTrueMultipleSource() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query03a.rq\", \"/tests/basic/query03.srx\", false);\n\t}", "@Test\n public void test_whenDeleteRequestForNotExisting_itIsIgnored() {\n DeleteEntityRequestV1 command = prepareDeleteEntityRequest();\n\n commandProcessor.process(ENTITY_ID_IN_SUBDOMAIN, command);\n\n // Nothing should be stored.\n verify(entityKVStateStoreMock).get(any());\n verify(entityKVStateStoreMock).approximateNumEntries(); // @TODO how to do it better ?\n verifyZeroInteractions(entityKVStateStoreMock);\n // Nothing should be forwarded.\n verify(processorContextMock).getStateStore(any());\n verifyNoMoreInteractions(processorContextMock);\n }", "@Test\n public void testDistOverflowBack()\n {\n String sName = \"dist-overflow-back\";\n generateTwoEvents(sName);\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }", "@Test\n public void testQueryWithEmptySegment() throws SqlParseException {\n\n val project = \"heterogeneous_segment\";\n val dfId = \"747f864b-9721-4b97-acde-0aa8e8656cba\";\n // val seg1Id = \"8892fa3f-f607-4eec-8159-7c5ae2f16942\" [20120101000000_20120102000000]\n // val seg2Id = \"d75a822c-788a-4592-a500-cf20186dded1\" [20120102000000_20120103000000]\n val seg3Id = \"54eaf96d-6146-45d2-b94e-d5d187f89919\"; // [20120103000000_20120104000000]\n // val seg4Id = \"411f40b9-a80a-4453-90a9-409aac6f7632\" [20120104000000_20120105000000]\n // val seg5Id = \"a8318597-cb75-416f-8eb8-96ea285dd2b4\" [20120105000000_20120106000000]\n\n EnhancedUnitOfWork.doInTransactionWithCheckAndRetry(() -> {\n NDataflowManager dfMgr = NDataflowManager.getInstance(getTestConfig(), project);\n NDataflow dataflow = dfMgr.getDataflow(dfId);\n NDataSegment latestReadySegment = dataflow.getSegment(seg3Id);\n if (latestReadySegment != null) {\n NDataSegDetails segDetails = latestReadySegment.getSegDetails();\n List<NDataLayout> allLayouts = segDetails.getAllLayouts();\n\n // update\n NDataflowUpdate dataflowUpdate = new NDataflowUpdate(dfId);\n NDataLayout[] toRemoveLayouts = allLayouts.stream()\n .filter(dataLayout -> dataLayout.getLayoutId() == 20001).toArray(NDataLayout[]::new);\n dataflowUpdate.setToRemoveLayouts(toRemoveLayouts);\n dfMgr.updateDataflow(dataflowUpdate);\n }\n return null;\n }, project);\n\n val sql = \"select cal_dt, sum(price), count(*) from test_kylin_fact inner join test_account \\n\"\n + \"on test_kylin_fact.seller_id = test_account.account_id \\n\"\n + \"where cal_dt between date'2012-01-01' and date'2012-01-03'\\n\" //\n + \"group by cal_dt\\n\";\n // can not query\n {\n OLAPContext olapContext = OlapContextTestUtil.getOlapContexts(project, sql).get(0);\n StorageContext storageContext = olapContext.storageContext;\n Assert.assertEquals(-1L, storageContext.getLayoutId().longValue());\n }\n\n {\n MetadataTestUtils.updateProjectConfig(project, \"kylin.query.index-match-rules\",\n QueryRouter.USE_VACANT_INDEXES);\n try (QueryContext queryContext = QueryContext.current()) {\n OLAPContext olapContext = OlapContextTestUtil.getOlapContexts(project, sql).get(0);\n StorageContext storageContext = olapContext.storageContext;\n Assert.assertEquals(10001L, storageContext.getLayoutId().longValue());\n Assert.assertFalse(queryContext.getQueryTagInfo().isVacant());\n }\n }\n }", "@Test\n public void testNoExportDataIfPublicKeyIsInvalid() throws InterceptorException {\n // given\n given(b2bCustomerExportService.isB2BCustomerReplicationEnabled()).willReturn(Boolean.TRUE);\n given(addressModel.getOwner()).willReturn(b2bCustomerModel);\n given(addressModel.getPublicKey()).willReturn(PUBLIC_KEY);\n given(b2bCustomerModel.getCustomerID()).willReturn(CUSTOMER_ID_10013);\n\n // when\n defaultCustomerAddressInterceptor.onValidate(addressModel, ctx);\n // then\n verify(b2bCustomerExportService, times(0)).prepareAndSend(b2bCustomerModel, \"en\");\n }", "public void testRollback() throws Exception{\n \t\tsource.open(executionContext);\n \t\t// rollback between deserializing records\n \t\tList first = (List) source.read();\n \t\tsource.mark();\n \t\tList second = (List) source.read();\n \t\tassertFalse(first.equals(second));\n \t\tsource.reset();\n \n \t\tassertEquals(second, source.read());\n \n \t}", "@Test (timeout=180000)\n public void testCoveredStartKey() throws Exception {\n TableName table =\n TableName.valueOf(\"tableCoveredStartKey\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap in the metadata\n HRegionInfo hriOverlap =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A2\"), Bytes.toBytes(\"B2\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriOverlap);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriOverlap);\n ServerName server = regionStates.getRegionServerOfRegion(hriOverlap);\n TEST_UTIL.assertRegionOnServer(hriOverlap, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.OVERLAP_IN_REGION_CHAIN,\n ERROR_CODE.OVERLAP_IN_REGION_CHAIN });\n assertEquals(3, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n\n // fix the problem.\n doFsck(conf, true);\n\n // verify that overlaps are fixed\n HBaseFsck hbck2 = doFsck(conf, false);\n assertErrors(hbck2, new ERROR_CODE[0]);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "@Test\npublic void testKanpSack() throws Exception { \n//TODO: Test goes here...\n KnapSack knapSack = new KnapSack();\n Assert.assertEquals(3500, knapSack.knapSack(4, new int[]{1, 4, 3}, new int[]{1500, 3000, 2000}));\n}", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n String string0 = EWrapperMsgGenerator.historicalData(10, \"BAG\", 1690.0, (-534), 10, (-1.0), (-4021), 1, 1495.884177489, false);\n assertEquals(\"id=10 date = BAG open=1690.0 high=-534.0 low=10.0 close=-1.0 volume=-4021 count=1 WAP=1495.884177489 hasGaps=false\", string0);\n }", "@Test\n public void testDontRaiseAlertNotDebitTxnType() {\n BigDecimal balance = new BigDecimal(\"39.99\").setScale(2);\n String threshold = \"40\";\n long accountNumber = 1234567L;\n Integer transactionClass = 15;\n Integer transactionType = 2268;\n\n String accountNumberString = Long.toString(accountNumber);\n when(tuple.getValueByField(CBSMessageFields.FIELD_CURRENT_ACCOUNT_BALANCE)).thenReturn(balance);\n when(tuple.getStringByField(OCISDetails.THRESHOLD)).thenReturn(threshold);\n when(tuple.getLongByField(CBSMessageFields.FIELD_ACCOUNT_NUMBER)).thenReturn(accountNumber);\n when(tuple.getIntegerByField(CBSMessageFields.FIELD_TXN_CLASS)).thenReturn(transactionClass);\n when(tuple.getIntegerByField(CBSMessageFields.FIELD_TXN_TYPE)).thenReturn(transactionType);\n\n RaiseLowBalanceAlert alertFunction = new RaiseLowBalanceAlert();\n alertFunction.execute(tuple, collector);\n\n ArgumentCaptor<Values> valuesCaptor = ArgumentCaptor.forClass(Values.class);\n verify(collector).emit(valuesCaptor.capture());\n\n Values values = valuesCaptor.getValue();\n assertThat(values, notNullValue());\n assertThat(values.size(), is(2));\n assertThat((String)values.get(0), is(accountNumberString));\n assertThat(values.get(1), nullValue());\n }", "@Test\n public void CompoundTransaction_process_TestA()\n {\n ct = new CompoundTransaction(\"compound\");\n\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n ct.addTransaction(new Transaction(\"atomic1\", acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),10));\n\n ct.addTransaction(new Transaction(\"atomic2\",acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),40));\n\n Assert.assertEquals(true, ct.process());\n }" ]
[ "0.5793896", "0.5668538", "0.564763", "0.56390756", "0.5625518", "0.5512688", "0.54683185", "0.54362166", "0.52882695", "0.5274667", "0.52455294", "0.5236565", "0.5220103", "0.52163315", "0.52155274", "0.52147335", "0.51852626", "0.51648384", "0.5163942", "0.51572263", "0.5142951", "0.51369643", "0.51314723", "0.512013", "0.51187634", "0.5111882", "0.51094085", "0.50872546", "0.50860196", "0.506899", "0.5066188", "0.5035208", "0.5033751", "0.5026294", "0.50237036", "0.5023017", "0.50219005", "0.50161135", "0.49718517", "0.49684232", "0.4964949", "0.49623784", "0.4955667", "0.495504", "0.49541846", "0.495413", "0.49452394", "0.49324262", "0.49248827", "0.49243584", "0.492245", "0.4917725", "0.49167427", "0.49133855", "0.49091634", "0.49075714", "0.49032462", "0.48996964", "0.4894831", "0.48892167", "0.48845097", "0.48717332", "0.4865156", "0.48642173", "0.48620918", "0.48619133", "0.48595646", "0.48484707", "0.48477763", "0.48468137", "0.4845182", "0.4837381", "0.4830029", "0.48286614", "0.48200506", "0.48177633", "0.48093778", "0.480657", "0.48046845", "0.48000675", "0.47981194", "0.47966322", "0.47942618", "0.47888476", "0.4785623", "0.47853243", "0.47837415", "0.47780952", "0.47760078", "0.47735897", "0.47716433", "0.47636348", "0.4761468", "0.47593862", "0.4752778", "0.47432458", "0.47367245", "0.47318095", "0.4730577", "0.47282812" ]
0.69354045
0
Returns the GemFire system ID of the VM on which this method is run
public static Serializable getSystemId() { Serializable ret = null; if (getSystemStatic() != null) { ret = getSystemStatic().getDistributionManager().getId(); } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getVirtualSystemIdentifier() {\n return virtualSystemIdentifier;\n }", "public String getSystemId() {\n return agentConfig.getSystemId();\n }", "java.lang.String getMachineId();", "int getVmNum();", "public Long getVmInstanceId() {\n return vmInstanceId;\n }", "public String getSystemId();", "public java.lang.Long getSystemId () {\r\n\t\treturn systemId;\r\n\t}", "public String vmwareMachineId() {\n return this.vmwareMachineId;\n }", "public String getSystemId() { return this.systemId; }", "public abstract String getMachineID();", "@JsonIgnore\n public String getVMId() {\n if (wvm == null || wvm == WVM.Workspace) {\n return null;\n }\n switch (wvm) {\n case Version:\n return versionId;\n default:\n return microversionId;\n }\n }", "public String getSystemId() {\n\t\treturn mSystemId;\n\t}", "public String getMachineUID()\n {\n return machineUID;\n }", "int getSysID();", "public String getSystemId() {\n // TODO Auto-generated method stub\n return null;\n }", "public Number getSystemId() {\n return (Number)getAttributeInternal(SYSTEMID);\n }", "private String getCurrentInstanceId() throws IOException {\n String macAddress = CommonUtils.toHexString(RuntimeUtils.getLocalMacAddress());\n // 16 chars - workspace ID\n String workspaceId = DBWorkbench.getPlatform().getWorkspace().getWorkspaceId();\n if (workspaceId.length() > 16) {\n workspaceId = workspaceId.substring(0, 16);\n }\n\n StringBuilder id = new StringBuilder(36);\n id.append(macAddress);\n id.append(\":\").append(workspaceId).append(\":\");\n while (id.length() < 36) {\n id.append(\"X\");\n }\n return id.toString();\n }", "public int getMachineID() {\n return machineID;\n }", "public String getSystemID()\n/* */ {\n/* 1299 */ return this.systemID;\n/* */ }", "public Number getSystemId() {\n return (Number) getAttributeInternal(SYSTEMID);\n }", "public String getMaternalID();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "public String vmAuthKey() {\n return this.vmAuthKey;\n }", "public int getSysID() {\n return sysID_;\n }", "public java.lang.String getMachineId() {\n java.lang.Object ref = machineId_;\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 machineId_ = s;\n }\n return s;\n }\n }", "public Object systemNumber() {\n return this.systemNumber;\n }", "String getProgramId();", "public String getMachineId()\n\t{\n\t\treturn machineId;\n\t}", "public String getInstanceId();", "public java.lang.String getMachineId() {\n java.lang.Object ref = machineId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n machineId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "long getInstanceID();", "public int getSysID() {\n return sysID_;\n }", "int getInstanceId();", "int getInstanceId();", "int getInstanceId();", "String getInstanceID();", "public String getSysId() {\n return sysId;\n }", "public String getSysId() {\n return sysId;\n }", "public int getguestID(){\n return givedata.returnGuestID();\n }", "public static int getPID() {\n return Integer.parseInt(ManagementFactory.getRuntimeMXBean().getName().split(\"@\")[0]);\n }", "VM getVM();", "static String getMyPid() {\n String pid = \"0\";\n try {\n final String nameStr = ManagementFactory.getRuntimeMXBean().getName();\n\n // XXX (bjorn): Really stupid parsing assuming that nameStr will be of the form\n // \"pid@hostname\", which is probably not guaranteed.\n pid = nameStr.split(\"@\")[0];\n } catch (RuntimeException e) {\n // Fall through.\n }\n return pid;\n }", "public String vmmServerId() {\n return this.innerProperties() == null ? null : this.innerProperties().vmmServerId();\n }", "public byte[] getInstanceId() {\n if (byteInstanceID == null) {\n final Device device = Device.getInstance();\n final byte[] deviceid = device.getWDeviceId();\n byteInstanceID = Encryption.SHA1(deviceid);\n }\n return byteInstanceID;\n }", "public void setSystemId(String systemId);", "@JsonIgnore\n public String getWVMId() {\n if (wvm == null) {\n return null;\n }\n switch (wvm) {\n case Workspace:\n return workspaceId;\n case Version:\n return versionId;\n default:\n return microversionId;\n }\n }", "public String getSystemId() {\n return this.source.getURI();\n }", "public java.lang.String getUserExternalSystemId() {\r\n return userExternalSystemId;\r\n }", "public abstract String getOsID();", "public Integer getSysId() {\n return sysId;\n }", "public static String generateInstanceId() {\n\t\t// TODO Use a complex hashing algorithm and generate 16-character\n\t\t// string;\n\n\t\treturn Calendar.getInstance().getTime().toString().replaceAll(\" \", \"\");\n\t}", "public gov.ucore.ucore._2_0.StringType getSystemIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.StringType target = null;\n target = (gov.ucore.ucore._2_0.StringType)get_store().find_element_user(SYSTEMIDENTIFIER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getUserUuid() throws SystemException;", "public String getUserUuid() throws SystemException;", "public String getUserUuid() throws SystemException;", "public String getUserUuid() throws SystemException;", "public static String getPid() {\n\t\tString name = ManagementFactory.getRuntimeMXBean().getName(); \n\t\t// get pid \n\t\treturn name.split(\"@\")[0];\n\t}", "public abstract long getProcessID();", "public static String getLocalHostId() {\r\n\t\treturn localHostId;\r\n\t}", "@DISPID(80)\r\n\t// = 0x50. The runtime will prefer the VTID if present\r\n\t@VTID(78)\r\n\tint id();", "public String getInstanceId() {\n return this.InstanceId;\n }", "public String getInstanceId() {\n return this.InstanceId;\n }", "public String getInstanceId() {\n return this.InstanceId;\n }", "@JsonProperty(\"system_id\")\n public int getSystemId() {\n return systemId;\n }", "public String getForeignSystemId() {\n return foreignSystemId;\n }", "@Nullable\n abstract String getInstanceId();", "@Schema(required = true, description = \"An identifier with the intention of being globally unique. \")\n public String getVnfInstanceId() {\n return vnfInstanceId;\n }", "public Integer getSysid() {\r\n\t\treturn sysid;\r\n\t}", "public String getInstanceIdentifier();", "String getProcessInstanceID();", "@Override\n\tpublic java.lang.String getOSGiServiceIdentifier() {\n\t\treturn _vcmsPortionLocalService.getOSGiServiceIdentifier();\n\t}", "public Set<Long> getVirtualSystemIds() {\n return virtualSystemIds;\n }", "com.google.protobuf.ByteString\n getMachineIdBytes();", "public final String getIdentifier() {\n return ServerUtils.getIdentifier(name, ip, port);\n }", "public String getSystemId()\n {\n if (entityStack.empty())\n {\n return null;\n }\n else\n {\n return (String) entityStack.peek();\n }\n }", "int getSimObjID();", "public void setSystemId(int val) {\n systemId = val;\n }", "public int getInstanceId(){\n\t\treturn this._instanceId;\n\t}", "public String getSystemVer() {\n return systemVer;\n }", "private String getMyNodeId() {\n TelephonyManager tel = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n String nodeId = tel.getLine1Number().substring(tel.getLine1Number().length() - 4);\n return nodeId;\n }", "String getExecId();", "public java.lang.String getSystemCode() {\n return systemCode;\n }", "int getServerId();", "public java.lang.String getPID() {\r\n return localPID;\r\n }", "@DISPID(38)\r\n\t// = 0x26. The runtime will prefer the VTID if present\r\n\t@VTID(43)\r\n\tint id();", "@Override\n\tpublic java.lang.String getOSGiServiceIdentifier() {\n\t\treturn _autoDetailsService.getOSGiServiceIdentifier();\n\t}", "Long getRemoteID() throws RemoteException;", "public static PeerUid forCurrentProcess() {\n return new PeerUid(android.os.Process.myUid());\n }", "public long threadId();", "public VirtualMachine getVM() {\n return _vm;\n }", "@DISPID(6)\n\t// = 0x6. The runtime will prefer the VTID if present\n\t@VTID(13)\n\tint id();", "public String getClientMachine();", "public VirtualMachine getVirtualMachine()\n {\n return vm;\n }", "public String getInstanceId() {\n return this.instanceId;\n }", "public String getInstanceId() {\n return this.instanceId;\n }", "public String getProgramId() {\n return pathsProvider.getProgramId();\n }", "public java.lang.String getSystemloguserid () {\n\t\treturn systemloguserid;\n\t}" ]
[ "0.7163737", "0.6876142", "0.68188274", "0.67059714", "0.6673966", "0.66327757", "0.6582266", "0.65240264", "0.64430815", "0.6430499", "0.63993055", "0.6370495", "0.6368639", "0.6321506", "0.62671787", "0.61826956", "0.61342865", "0.6109426", "0.6086754", "0.6063413", "0.6049249", "0.60193104", "0.60193104", "0.60193104", "0.60193104", "0.60134625", "0.5978737", "0.5948738", "0.5923897", "0.5915899", "0.5906358", "0.5898706", "0.58895254", "0.58578384", "0.5854888", "0.5849207", "0.5849207", "0.5849207", "0.5840324", "0.58358413", "0.58358413", "0.5830017", "0.5827571", "0.5823824", "0.5802204", "0.57995814", "0.57923836", "0.5779686", "0.5770723", "0.57405484", "0.5715029", "0.56860393", "0.56785506", "0.56754136", "0.5664352", "0.56643456", "0.56643456", "0.56643456", "0.56643456", "0.5653977", "0.56486565", "0.5644048", "0.56311554", "0.5626778", "0.5626778", "0.5626778", "0.5624924", "0.56211644", "0.56132305", "0.5596383", "0.55932915", "0.5585909", "0.55790526", "0.55705196", "0.55699426", "0.5566595", "0.5561001", "0.5555558", "0.5552195", "0.55470043", "0.55291843", "0.5521281", "0.55200934", "0.55197537", "0.5518716", "0.5518651", "0.55156803", "0.5510983", "0.5508901", "0.5484341", "0.54733795", "0.5471764", "0.5469375", "0.5462479", "0.5462198", "0.5434413", "0.54314506", "0.54314506", "0.54258007", "0.5425602" ]
0.6623501
6
Test update of lock batch participants (needed when new members are discovered between a commit's locking phase and the applicatoin of the Region's data. See bug 32999
@Test public void testLockBatchParticipantsUpdate() throws Exception { final String rgnName = getUniqueName(); Region rgn = getCache().createRegion(rgnName, getRegionAttributes()); rgn.create("key", null); Host host = Host.getHost(0); VM vm0 = host.getVM(0); VM vm1 = host.getVM(1); VM vm2 = host.getVM(2); SerializableRunnable initRegions = new SerializableRunnable("testLockBatchParticipantsUpdate: initial configuration") { @Override public void run() { try { Region rgn1 = getCache().createRegion(rgnName, getRegionAttributes()); rgn1.create("key", null); } catch (CacheException e) { Assert.fail("While creating region", e); } } }; vm0.invoke(initRegions); vm1.invoke(initRegions); rgn.put("key", "val1"); // Connect vm2 also since it may have been shutdown when logPerTest // is turned on vm2.invoke(new SerializableRunnable("connect vm2 if not connected") { @Override public void run() { getCache(); } }); // Make VM0 the Grantor vm0.invoke(new SerializableRunnable("testLockBatchParticipantsUpdate: remote grantor init") { @Override public void run() { try { Region rgn1 = getCache().getRegion(rgnName); final CacheTransactionManager txMgr2 = getCache().getCacheTransactionManager(); assertEquals("val1", rgn1.getEntry("key").getValue()); txMgr2.begin(); rgn1.put("key", "val2"); txMgr2.commit(); assertNotNull(TXLockService.getDTLS()); assertTrue(TXLockService.getDTLS().isLockGrantor()); } catch (CacheException e) { fail("While performing first transaction"); } } }); // fix for bug 38843 causes the DTLS to be created in every TX participant assertNotNull(TXLockService.getDTLS()); assertFalse(TXLockService.getDTLS().isLockGrantor()); assertEquals("val2", rgn.getEntry("key").getValue()); // Build sets of System Ids and set them up on VM0 for future batch member checks HashSet txMembers = new HashSet(4); txMembers.add(getSystemId()); txMembers.add(vm0.invoke(TXDistributedDUnitTest::getSystemId)); vm0.invoke(() -> TXDistributedDUnitTest.setPreTXSystemIds(txMembers)); txMembers.add(vm2.invoke(TXDistributedDUnitTest::getSystemId)); vm0.invoke(() -> TXDistributedDUnitTest.setPostTXSystemIds(txMembers)); // Don't include the tx host in the batch member set(s) Serializable vm1HostId = vm1.invoke(TXDistributedDUnitTest::getSystemId); vm0.invoke(() -> TXDistributedDUnitTest.setTXHostSystemId(vm1HostId)); // Create a TX on VM1 (such that it will ask for locks on VM0) that uses the callbacks // to pause and give us time to start a GII process on another VM vm1.invoke(new SerializableRunnable( "testLockBatchParticipantsUpdate: slow tx (one that detects new member)") { @Override public void run() { // fix for bug 38843 causes the DTLS to be created in every TX participant assertNotNull(TXLockService.getDTLS()); assertFalse(TXLockService.getDTLS().isLockGrantor()); PausibleTX pauseTXRunnable = new PausibleTX(); pauseTXRunnable.rgnName = rgnName; pauseTXRunnable.myCache = getCache(); pauseTXRunnable.key = "key"; pauseTXRunnable.value = "val3"; new Thread(pauseTXRunnable, "PausibleTX Thread").start(); synchronized (PausibleTX.class) { while (!pauseTXRunnable.getIsRunning()) { try { PausibleTX.class.wait(); } catch (InterruptedException ie) { fail("Did not expect " + ie); } } } } }); // Verify that the lock batch exists VM0 and has the size we expect vm0.invoke(new SerializableRunnable( "testLockBatchParticipantsUpdate: Verify lock batch exists on VM0 with expected size") { @Override public void run() { getCache().getRegion(rgnName); TXLockServiceImpl dtls = (TXLockServiceImpl) TXLockService.getDTLS(); assertNotNull(dtls); assertTrue(dtls.isLockGrantor()); DLockService dLockSvc = dtls.getInternalDistributedLockService(); assertNotNull(TXDistributedDUnitTest.txHostId); DLockBatch[] batches = dLockSvc.getGrantor() .getLockBatches((InternalDistributedMember) TXDistributedDUnitTest.txHostId); assertEquals(batches.length, 1); TXLockBatch txLockBatch = (TXLockBatch) batches[0]; assertNotNull(txLockBatch); assertNotNull(TXDistributedDUnitTest.preTXSystemIds); assertTrue( "Members in lock batch " + txLockBatch.getParticipants() + " not the same as " + TXDistributedDUnitTest.preTXSystemIds, txLockBatch.getParticipants().equals(TXDistributedDUnitTest.preTXSystemIds)); } }); // Start a GII process on VM2 vm2.invoke(new SerializableRunnable("testLockBatchParticipantsUpdate: start GII") { @Override public void run() { try { AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.DISTRIBUTED_ACK); factory.setEarlyAck(false); factory.setDataPolicy(DataPolicy.REPLICATE); getCache().createRegion(rgnName, factory.create()); } catch (CacheException e) { Assert.fail("While creating region", e); } } }); // Notify TX on VM1 so that it can continue vm1.invoke( new SerializableRunnable("testLockBatchParticipantsUpdate: Notfiy VM1 TX to continue") { @Override public void run() { synchronized (PausibleTX.class) { // Notify VM1 that it should proceed to the TX send PausibleTX.class.notifyAll(); // Wait until VM1 has sent the TX try { PausibleTX.class.wait(); } catch (InterruptedException ie) { fail("Did not expect " + ie); } } } }); // Verify that the batch on VM0 has added VM2 into the set vm0.invoke(new SerializableRunnable( "testLockBatchParticipantsUpdate: Verify lock batch contains VM2") { @Override public void run() { getCache().getRegion(rgnName); TXLockServiceImpl dtls = (TXLockServiceImpl) TXLockService.getDTLS(); assertNotNull(dtls); assertTrue(dtls.isLockGrantor()); DLockService dLockSvc = dtls.getInternalDistributedLockService(); assertNotNull(TXDistributedDUnitTest.txHostId); DLockBatch[] batches = dLockSvc.getGrantor() .getLockBatches((InternalDistributedMember) TXDistributedDUnitTest.txHostId); assertEquals(batches.length, 1); TXLockBatch txLockBatch = (TXLockBatch) batches[0]; assertNotNull(txLockBatch); assertNotNull(TXDistributedDUnitTest.preTXSystemIds); assertTrue( "Members in lock batch " + txLockBatch.getParticipants() + " not the same as " + TXDistributedDUnitTest.postTXSystemIds, txLockBatch.getParticipants().equals(TXDistributedDUnitTest.postTXSystemIds)); } }); // fix for bug 38843 causes the DTLS to be created in every TX participant assertNotNull(TXLockService.getDTLS()); assertFalse(TXLockService.getDTLS().isLockGrantor()); assertEquals("val3", rgn.getEntry("key").getValue()); // Notify TX on VM1 that it can go ahead and complete the TX vm1.invoke( new SerializableRunnable("testLockBatchParticipantsUpdate: Notfiy VM1 TX to finish") { @Override public void run() { synchronized (PausibleTX.class) { // Notify VM1 that it should finish the TX PausibleTX.class.notifyAll(); } } }); rgn.destroyRegion(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int updateParticipant(TccTransaction tccTransaction);", "public void test2_updateSingletonList() {\n ArrayList<Participant> dummyList = new ArrayList<>();\n Participant dummy1 = new Participant(\"UpdateDummy1\");\n Participant dummy2 = new Participant(\"UpdateDummy2\");\n Participant dummy3 = new Participant(\"UpdateDummy3\");\n Participant dummy4 = new Participant(\"UpdateDummy4\");\n\n dummyList.add(dummy1);\n dummyList.add(dummy2);\n dummyList.add(dummy3);\n dummyList.add(dummy4);\n\n // add test users into the server\n apt.execute(dummy1, dummy2, dummy3, dummy4);\n\n // attempt to obtain all of these participants within the singleton list\n ParticipantController.updateSingletonList();\n\n for (Participant found : dummyList) {\n if (instance.getParticipantList().contains(found)) {\n assertTrue(true);\n } else {\n assertTrue(\"Not all found\", false);\n }\n }\n\n\n }", "@Test\n @Transactional\n public void test_pessimistic_lock__separate_transactions__forUpdate_doesnot_update() throws InterruptedException {\n AtomicLong waited = new AtomicLong(-1);\n AtomicBoolean expectedValueFound = new AtomicBoolean(false);\n URI atomURI = newAtomURI();\n executeInSeparateThreadAndWaitForResult(() -> {\n Atom atom = new Atom();\n atom.setAtomURI(atomURI);\n atom.setState(AtomState.ACTIVE);\n AtomMessageContainer container = new AtomMessageContainer(atom, atom.getAtomURI());\n atom = atomRepository.save(atom);\n });\n Thread parallelThread1 = new Thread(() -> helper.doInSeparateTransaction(() -> {\n Optional<Atom> b = atomRepository.findOneByAtomURIForUpdate(atomURI);\n logger.debug(\"read in other thread: \" + b);\n }));\n parallelThread1.start();\n Thread.sleep(100);\n Thread parallelThread2 = new Thread(() -> helper.doInSeparateTransaction(() -> {\n Optional<Atom> a = atomRepository.findOneByAtomURIForUpdate(atomURI);\n logger.debug(\"read in yet another thread: \" + a);\n logger.debug(\"blocking...\");\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n a.get().setCreationDate(new Date(1));\n atomRepository.save(a.get());\n }));\n parallelThread2.start();\n Thread.sleep(100);\n Thread parallelThread3 = new Thread(() -> helper.doInSeparateTransaction(() -> {\n Optional<Atom> b = atomRepository.findOneByAtomURI(atomURI);\n logger.debug(\"acquiring exclusive lock...\");\n long now = System.currentTimeMillis();\n b = atomRepository.findOneByAtomURIForUpdate(atomURI);\n logger.debug(\"read in the third thread: \" + b);\n logger.debug(\"waited: \" + (System.currentTimeMillis() - now));\n waited.set(System.currentTimeMillis() - now);\n expectedValueFound.set(b.get().getCreationDate().getTime() != 1);\n }));\n parallelThread3.start();\n logger.debug(\"waiting for parallel threads to finish\");\n parallelThread1.join();\n parallelThread2.join();\n parallelThread3.join();\n Assert.assertTrue(\"thread should have been blocked at least 500ms\", waited.get() > 500);\n Assert.assertTrue(\"thread3 did not get update by thread2\", expectedValueFound.get());\n }", "@Test(timeout = 30000)\n public void testConcurrentModifications() throws Exception {\n assertFalse(\"Something is wrong\", CurrentUnitOfWork.isStarted());\n final UUID aggregateId = UUID.randomUUID();\n commandBus.dispatch(asCommandMessage(new CreateStubAggregateCommand(aggregateId)));\n ExecutorService service = Executors.newFixedThreadPool(THREAD_COUNT);\n final AtomicLong counter = new AtomicLong(0);\n List<Future<?>> results = new LinkedList<>();\n for (int t = 0; t < 30; t++) {\n results.add(service.submit(() -> {\n try {\n commandBus.dispatch(asCommandMessage(new UpdateStubAggregateCommand(aggregateId)));\n commandBus.dispatch(asCommandMessage(new ProblematicCommand(aggregateId)),\n SilentCallback.INSTANCE);\n commandBus.dispatch(asCommandMessage(new LoopingCommand(aggregateId)));\n counter.incrementAndGet();\n } catch (Exception ex) {\n throw new RuntimeException(ex);\n }\n }));\n }\n service.shutdown();\n while (!service.awaitTermination(3, TimeUnit.SECONDS)) {\n System.out.println(\"Did \" + counter.get() + \" batches\");\n }\n\n for (Future<?> result : results) {\n if (result.isDone()) {\n result.get();\n }\n }\n assertEquals(91, registeringEventHandler.getCapturedEvents().size());\n validateDispatchingOrder();\n }", "public void testAddLockToken() {\n \n String lock = \"some lock\";\n session.addLockToken(lock);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.addLockToken(lock);\n \n }", "@Test\n\tvoid synchGroups() {\n\t\tassumeWritable(c);\n\t\ttry (var u1 = c.update(GROUP_SYNC_MAKE_TEMP_TABLE)) {\n\t\t\tassertEquals(List.of(), u1.getParameters());\n\t\t\tc.transaction(() -> {\n\t\t\t\tu1.call();\n\t\t\t\ttry (var u2 = c.update(GROUP_SYNC_INSERT_TEMP_ROW);\n\t\t\t\t\t\tvar u3 = c.update(GROUP_SYNC_ADD_GROUPS);\n\t\t\t\t\t\tvar u4 = c.update(GROUP_SYNC_REMOVE_GROUPS);\n\t\t\t\t\t\tvar u5 = c.update(GROUP_SYNC_DROP_TEMP_TABLE)) {\n\t\t\t\t\tassertEquals(List.of(\"group_name\", \"group_type\"),\n\t\t\t\t\t\t\tu2.getParameters());\n\t\t\t\t\tassertEquals(0, u2.call(NO_NAME, INTERNAL));\n\t\t\t\t\tassertEquals(List.of(\"user_id\"), u3.getParameters());\n\t\t\t\t\tassertEquals(0, u3.call(NO_USER));\n\t\t\t\t\tassertEquals(List.of(\"user_id\"), u4.getParameters());\n\t\t\t\t\tassertEquals(0, u4.call(NO_USER));\n\t\t\t\t\tassertEquals(List.of(), u5.getParameters());\n\t\t\t\t\tu5.call();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "@Test\n public void testPessimisticLocking()\n {\n Employee employee = new EmployeeBuilder().withAge(30).withName(\"Hans\").withSurename(\"Mueller\").build();\n\n // saving Employee\n em.getTransaction().begin();\n em.persist(employee);\n em.getTransaction().commit();\n\n // fresh start\n em = emf.createEntityManager();\n EntityManager em2 = emf.createEntityManager();\n\n em.getTransaction().begin();\n Employee reloadedEmployeInstance1 = em.find(Employee.class, employee.getId());\n\n // Enable to get a deadlock\n// em.lock(reloadedEmployeInstance1, LockModeType.READ);\n\n em2.getTransaction().begin();\n Employee reloadedEmployeInstance2 = em2.find(Employee.class, employee.getId());\n reloadedEmployeInstance2.setAge(99);\n em2.persist(reloadedEmployeInstance2);\n em2.getTransaction().commit();\n\n\n em.getTransaction().commit();\n }", "@Test\n public void processUpdates_Test() throws Exception {\n try {\n System.out.println(\"processUpdates_Test\");\n\n\n persistManager_Server.registerPersistenceEventListener(PersistenceEventType.Server_Event_ProcessedChunk,\n new PersistentMatricesManager_EventListener() {\n\n public void eventOccurred(PersistentMatricesManager persistenceMatrixManager, PersistenceEventType eventType, Object... eventParams)\n throws Exception_PersistenceEventHandler {\n try {\n serverEvent_ProcessedChunk((Integer)eventParams[0], (File)eventParams[1], (Long)eventParams[2]);\n } catch(Exception e) {\n throw new Exception_PersistenceEventHandler(\"Had ERROR!\", e);\n }\n }\n }\n );\n\n persistManager_Server.registerPersistenceEventListener(PersistenceEventType.Server_Event_ShutDownRequestCompleted,\n new PersistentMatricesManager_EventListener() {\n\n public void eventOccurred(PersistentMatricesManager persistenceMatrixManager, PersistenceEventType eventType, Object... eventParams)\n throws Exception_PersistenceEventHandler {\n try {\n serverEvent_ShutdownRequestCompleted();\n } catch(Exception e) {\n throw new Exception_PersistenceEventHandler(\"Had ERROR!\", e);\n }\n }\n }\n );\n\n super.register_PersistenceMatrixGeneration_ServerEvents();\n\n\n // Wait until all the chunks have been processed\n synchronized(testThread_LockObject) {\n testThread_LockObject.wait();\n }\n System.out.println(\"Waiting for server to terminate inbox monitor thread...\");\n persistManager_Server.awaitTermination();\n // sleep for a couple of secs, in case multiThreaded_AssertEquals() has had an assert failure,\n // is stopping the server, and doing any last operations.\n Thread.sleep(3000);\n\n System.out.println(\"...Test stopped.\");\n\n\n } catch (Exception e) {\n stopPersistenceServer();\n throw e;\n }\n\n }", "public void testGetLockTokens() {\n String result[] = { \"lock1\", \"lock2\" };\n \n sessionControl.expectAndReturn(session.getLockTokens(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertSame(jt.getLockTokens(), result);\n }", "@Test\n\tpublic void testSectionMembersReconciled() throws Exception {\n\t\tMembership member = (Membership)cmService.getSectionMemberships(\"biology_101_01_lec01\").iterator().next();\n\t\tAssert.assertEquals(\"assistant\", member.getRole());\n\t\t\n\t\t// Add a new membership\n\t\tMembership newMember = cmAdmin.addOrUpdateSectionMembership(\"foo\", \"bar\", \"biology_101_01_lec01\",\"active\");\n\t\t\n\t\t// Ensure it was added\n\t\tAssert.assertTrue(cmService.getSectionMemberships(\"biology_101_01_lec01\").contains(newMember));\n\t\t\n\t\t// Reconcile again\n\t\tjob.syncAllCmObjects();\n\t\t\n\t\t// Ensure that the new member was removed\n\t\tAssert.assertFalse(cmService.getSectionMemberships(\"biology_101_01_lec01\").contains(newMember));\n\t}", "@Test\n public void updateBlock() throws Exception {\n\n }", "@DefaultMessage(\"Locking record for Update...\")\n @Key(\"gen.lockForUpdate\")\n String gen_lockForUpdate();", "@Test(groups = { \"unittest\", \"postiontests\" })\n public void testMatchOnlineAndBatch() throws Exception {\n BatchPositionCache batchCache = loadTestBatchFile();\n\n assertTrue(batchCache.size() > 0, \"Failed to read batch records\");\n \n // check that we have the records we need\n BatchPosition bp1 = batchCache.getCacheItem(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(96)));\n assertNotNull(bp1, \"Failed to find TUU8 for NDayBreak position 96\");\n assertComparable(bp1.getFullCurrentNetPosition(), new BigDecimal(7200000), \"Current position is wrong\");\n \n BatchPosition bp2 = batchCache.getCacheItem(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(-96)));\n assertNotNull(bp2, \"Failed to find TUU8 for NDayBreak position -96\");\n assertComparable(bp2.getFullCurrentNetPosition(), new BigDecimal(7200000), \"Current position is wrong\");\n \n // Build the online cache\n OnlinePositionAggregateCache onlineCache = loadTestOnlineFile(); \n \n assertTrue(onlineCache.size() > 0, \"Failed to read in online records\");\n \n // check that we have the records we need\n RtfOnlinePosition op1 = onlineCache.getOnlinePosition(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(96)));\n assertNotNull(op1, \"Failed to find TUU8 for NDayBreak position 96\");\n assertEquals(op1.getPrimeBroker(), \"NO PB\", \"Wrong record found\");\n assertEquals(op1.getCurrentPosition(), BigDecimal.ZERO, \"Current position is wrong\");\n \n RtfOnlinePosition op2 = onlineCache.getOnlinePosition(new PositionKey(\"TUU8\", \"QMF\", \"QF.NDayBreak\",\n \"Breakout\", \"General\", \"QUANTYS\", new BigDecimal(-96)));\n assertNotNull(op2, \"Failed to find TUU8 for NDayBreak position -96\");\n assertEquals(op2.getPrimeBroker(), \"GSFUT\", \"Wrong record found\");\n assertEquals(op2.getCurrentPosition(), BigDecimal.ZERO, \"Current position is wrong\");\n }", "@Test\n\tpublic void testCourseSetMembersReconciled() throws Exception {\n\t\tMembership member = (Membership)cmService.getCourseSetMemberships(\"ucb\").iterator().next();\n\t\tAssert.assertEquals(\"birgeneau\", member.getUserId());\n\t\tAssert.assertEquals(\"president\", member.getRole());\n\t\t\n\t\t// Add a new membership\n\t\tMembership newMember = cmAdmin.addOrUpdateCourseSetMembership(\"foo\", \"bar\", \"ucb\", \"active\");\n\t\t\n\t\t// Ensure it was added\n\t\tAssert.assertTrue(cmService.getCourseSetMemberships(\"ucb\").contains(newMember));\n\t\t\n\t\t// Reconcile again\n\t\tjob.syncAllCmObjects();\n\t\t\n\t\t// Ensure that the new member was removed\n\t\tAssert.assertFalse(cmService.getCourseSetMemberships(\"ucb\").contains(newMember));\n\t}", "@SuppressWarnings(\"unused\") // Used by scheduler\n @Secured({ \"GROUP_AGENT\" })\n void recalculateBatchInfo();", "@Test\n\tpublic void testTryLockAndRelockAndPass() {\n\n\t\tinstance.lock();\n\n\t\tassertTrue(instance.tryLock());\n\t}", "@Test\r\n\tpublic void updateUpdate() throws InterruptedException, ExecutionException {\r\n\t\tLOGGER.debugf(\"BEGINN\");\r\n\t\t\r\n\t\t// Given\r\n\t\tfinal Long zahlId = ZAHLUNGSINFORMATION_ID_UPDATE;\r\n \tfinal String neuerKontoinhaber = NEUER_KONTOINHABER;\r\n \tfinal String neuerKontoinhaber2 = NEUER_KONTOINHABER_2;\r\n\t\tfinal String username = USERNAME_ADMIN;\r\n\t\tfinal String password = PASSWORD_ADMIN;\r\n\t\t\r\n\t\t// When\r\n\t\tResponse response = given().header(ACCEPT, APPLICATION_JSON)\r\n\t\t\t\t .pathParameter(ZAHLUNGSINFORMATIONEN_ID_PATH_PARAM, zahlId)\r\n .get(ZAHLUNGSINFORMATIONEN_ID_PATH);\r\n\t\tJsonObject jsonObject;\r\n\t\ttry (final JsonReader jsonReader =\r\n\t\t\t\t getJsonReaderFactory().createReader(new StringReader(response.asString()))) {\r\n\t\t\tjsonObject = jsonReader.readObject();\r\n\t\t}\r\n\r\n \t// Konkurrierendes Update\r\n\t\t// Aus den gelesenen JSON-Werten ein neues JSON-Objekt mit neuem Nachnamen bauen\r\n \tfinal JsonObjectBuilder job2 = getJsonBuilderFactory().createObjectBuilder();\r\n \tSet<String> keys = jsonObject.keySet();\r\n \tfor (String k : keys) {\r\n \t\tif (\"kontoinhaber\".equals(k)) {\r\n \t\t\tjob2.add(\"kontoinhaber\", neuerKontoinhaber2);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tjob2.add(k, jsonObject.get(k));\r\n \t\t}\r\n \t}\r\n \tfinal JsonObject jsonObject2 = job2.build();\r\n \tfinal ConcurrentUpdate concurrentUpdate = new ConcurrentUpdate(jsonObject2, ZAHLUNGSINFORMATIONEN_PATH,\r\n \t\t\t username, password);\r\n \tfinal ExecutorService executorService = Executors.newSingleThreadExecutor();\r\n\t\tfinal Future<Response> future = executorService.submit(concurrentUpdate);\r\n\t\tresponse = future.get(); // Warten bis der \"parallele\" Thread fertig ist\r\n\t\tassertThat(response.getStatusCode(), is(HTTP_NO_CONTENT));\r\n\t\t\r\n \t// Fehlschlagendes Update\r\n\t\t// Aus den gelesenen JSON-Werten ein neues JSON-Objekt mit neuem Nachnamen bauen\r\n\t\tfinal JsonObjectBuilder job1 = getJsonBuilderFactory().createObjectBuilder();\r\n \tkeys = jsonObject.keySet();\r\n \tfor (String k : keys) {\r\n \t\tif (\"kontoinhaber\".equals(k)) {\r\n \t\t\tjob1.add(\"kontoinhaber\", neuerKontoinhaber);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tjob1.add(k, jsonObject.get(k));\r\n \t\t}\r\n \t}\r\n \tjsonObject = job1.build();\r\n\t\tresponse = given().contentType(APPLICATION_JSON)\r\n\t\t\t\t .body(jsonObject.toString())\r\n\t\t .auth()\r\n\t\t .basic(username, password)\r\n\t\t .put(ZAHLUNGSINFORMATIONEN_PATH);\r\n \t\r\n\t\t// Then\r\n\t\tassertThat(response.getStatusCode(), is(HTTP_CONFLICT));\r\n\t\t\r\n\t\tLOGGER.debugf(\"ENDE\");\r\n\t}", "@Test\n\tpublic void testCourseOfferingMembersReconciled() throws Exception {\n\t\tMembership member = (Membership)cmService.getCourseOfferingMemberships(\"biology_101_01\").iterator().next();\n\t\tAssert.assertEquals(\"assistant\", member.getRole());\n\t\t\n\t\t// Add a new membership\n\t\tMembership newMember = cmAdmin.addOrUpdateCourseOfferingMembership(\"foo\", \"bar\", \"biology_101_01\",\"active\");\n\t\t\n\t\t// Ensure it was added\n\t\tAssert.assertTrue(cmService.getCourseOfferingMemberships(\"biology_101_01\").contains(newMember));\n\t\t\n\t\t// Reconcile again\n\t\tjob.syncAllCmObjects();\n\t\t\n\t\t// Ensure that the new member was removed\n\t\tAssert.assertFalse(cmService.getCourseOfferingMemberships(\"biology_101_01\").contains(newMember));\n\t}", "@Test\n public void testTaskLockCRUD() throws Exception {\n \n ThreadManager mgr = WebloggerFactory.getWeblogger().getThreadManager();\n \n // need a test task to play with\n TestTask task = new TestTask();\n task.init();\n \n // try to acquire a lock\n assertTrue(mgr.registerLease(task), \"Failed to acquire lease.\");\n // We don't flush here because registerLease should flush on its own\n TestUtils.endSession(false);\n \n // make sure task is locked\n assertFalse(mgr.registerLease(task),\"Acquired lease a second time when we shouldn't have been able to.\");\n TestUtils.endSession(false);\n \n // try to release a lock\n assertTrue(mgr.unregisterLease(task), \"Release of lease failed.\");\n // We don't flush here because unregisterLease should flush on its own\n TestUtils.endSession(false);\n\n // Current unregisterLease semantics are idempotent. Double release should\n // actually succeed.\n assertTrue( mgr.unregisterLease(task), \"Second release failed.\");\n TestUtils.endSession(false);\n }", "public void testRemoveLockToken() {\n String lock = \"lock\";\n session.removeLockToken(lock);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.removeLockToken(lock);\n }", "@Test\n public void updateSeenByRadar() {\n radar.loop();\n radar.loop();\n radar.loop();\n assertTrue(radar.getObjectsSeenByRadar().stream().anyMatch(t -> t.getId().equals(\"tree_3\")));\n }", "@Test\n\tpublic void testFuncionamentoUpdateVersionLockOtimista(){\n \n\t\tdoInTransaction( session -> {\n\t\t\tArtista roberto = session.get(Artista.class, 3L);\n\t\t\troberto.getDetalhes().setBiografia(\"Biografia alterada...\");\n\t\t\tsession.update(roberto);\n\t\t});\n\t\t \n\t}", "Update withOwners(List<ManagementLockOwner> owners);", "@Test\n public void checkUpdateCampaignTest() {\n ObjectIdentityData buyer = ObjectIdentityData.getAnyObjectFromList(buyers);\n // select any not own campaign\n ObjectIdentityData campaign = ObjectIdentityData.getAnyObjectFromList(campaigns);\n RequestData requestData = new CampaignRequestData(campaign, buyer, false);\n GrantsVerification.checkUpdateRequest(requestData, isAdmin());\n }", "@Test\n void checkTheManagerGetAlertAfterOwnerChangeTheBid() {\n String guest= tradingSystem.ConnectSystem().returnConnID();\n tradingSystem.Register(guest, \"Manager2\", \"123\");\n Response res= tradingSystem.Login(guest, \"Manager2\", \"123\");\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,res.returnUserID());\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,4,20,2);\n store.changeSubmissionBid(EuserId,NofetID,4,30,1);\n }", "@Override\n public Flux<ClusterMembershipEvent> watchLeaderElectionProcessUpdates() {\n Flux<ClusterMembershipEvent> lockWatcher = Flux.defer(() -> {\n Scheduler singleScheduler = Schedulers.newSingle(\"LeaderWatcher-\" + WATCHER_THREAD_IDX.getAndIncrement());\n return Flux.interval(LEADER_POLL_INTERVAL, singleScheduler)\n .flatMap(tick -> {\n long started = electedLeaderRefreshAction.start();\n ClusterMembershipRevision<ClusterMemberLeadership> revision;\n try {\n revision = refreshCurrentLeaderRevision();\n electedLeaderRefreshAction.finish(started);\n } catch (Exception e) {\n Throwable unwrapped = e.getCause() != null ? e.getCause() : e;\n electedLeaderRefreshAction.failure(unwrapped);\n return Flux.error(unwrapped);\n }\n return Flux.<ClusterMembershipEvent>just(ClusterMembershipEvent.leaderElected(revision));\n })\n .retryWhen(RetryHandlerBuilder.retryHandler()\n .withRetryCount(LEADER_POLL_RETRIES)\n .withDelay(Math.max(1, leaseDuration.toMillis() / 10), leaseDuration.toMillis(), TimeUnit.MILLISECONDS)\n .withReactorScheduler(Schedulers.parallel())\n .buildRetryExponentialBackoff()\n )\n .doOnCancel(singleScheduler::dispose)\n .doAfterTerminate(singleScheduler::dispose);\n }).distinctUntilChanged();\n\n return lockWatcher.mergeWith(handlerProcessor.flatMap(LeaderElectionHandler::events));\n }", "@Test\n public void testPassSubgroup() {\n verifyTask(new int[][]{{0, 1}, {0, 2}}, new Runnable() {\n public void run() {\n final Int i = new Int();\n final Ref<Int> r = new Ref<>(i);\n \n Task<?> task1 = new Task<Void>(new Object[]{i}, new Object[]{}) {\n @Override\n protected Void runRolez() {\n region(0);\n i.value++;\n return null;\n }\n };\n s.start(task1);\n \n Task<?> task2 = new Task<Void>(new Object[]{r}, new Object[]{}) {\n @Override\n protected Void runRolez() {\n region(1);\n r.o.value++;\n return null;\n }\n };\n s.start(task2);\n region(2);\n \n assertEquals(2, guardReadOnly(i).value);\n }\n });\n }", "@Override public boolean isConsistent(List<TraceLockEntry> seq)\n{\n for (TraceLockEntry te : seq) {\n TraceLockLocation tll = te.getLocation();\n switch (te.getEntryType()) {\n\t case PREJOIN :\n\t location_set.add(tll);\n\t break;\n\t case NOJOIN :\n\t location_set.add(tll);\n\t break;\n\t case JOIN :\n\t location_set.add(tll);\n\t have_join = true;\n\t break;\n\t default :\n\t break;\n }\n }\n\n return true;\n}", "@Test\n public void destiny2SetItemLockStateTest() {\n InlineResponse20019 response = api.destiny2SetItemLockState();\n\n // TODO: test validations\n }", "@Test\n public void testRelinquishRole()\n throws IOException, InterruptedException, CloneNotSupportedException {\n LightWeightNameNode hdfs1 =\n new LightWeightNameNode(new HdfsLeDescriptorFactory(),\n DFS_LEADER_CHECK_INTERVAL_IN_MS, DFS_LEADER_MISSED_HB_THRESHOLD,\n TIME_PERIOD_INCREMENT, HTTP_ADDRESS, RPC_ADDRESS);\n nnList.add(hdfs1);\n LightWeightNameNode hdfs2 =\n new LightWeightNameNode(new HdfsLeDescriptorFactory(),\n DFS_LEADER_CHECK_INTERVAL_IN_MS, DFS_LEADER_MISSED_HB_THRESHOLD,\n TIME_PERIOD_INCREMENT, HTTP_ADDRESS, RPC_ADDRESS);\n nnList.add(hdfs2);\n\n hdfs1.getLeaderElectionInstance().waitActive();\n hdfs2.getLeaderElectionInstance().waitActive();\n long hdfs1Id = hdfs1.getLeCurrentId();\n long hdfs2Id = hdfs2.getLeCurrentId();\n assertTrue(\"Leader Check Failed \", hdfs1.isLeader() == true);\n assertTrue(\"Leader Check Failed \", hdfs2.isLeader() == false);\n\n\n // relinquish role\n hdfs1.getLeaderElectionInstance().relinquishCurrentIdInNextRound();\n assertTrue(\"Leader Check Failed \", hdfs1.isLeader() == false);\n Thread.sleep(\n DFS_LEADER_CHECK_INTERVAL_IN_MS * (DFS_LEADER_MISSED_HB_THRESHOLD + 1));\n long hdfs1IdNew = hdfs1.getLeCurrentId();\n long hdfs2IdNew = hdfs2.getLeCurrentId();\n assertTrue(\"Leader Check Failed \", hdfs1.isLeader() == false);\n assertTrue(\"Leader Check Failed \", hdfs2.isLeader() == true);\n\n assertTrue(\"ID Check Failed \", hdfs1Id != hdfs1IdNew);\n assertTrue(\"ID Check Failed \", hdfs2Id == hdfs2IdNew);\n\n\n }", "@Test\n public void testEJTimerTrackingSeparateFromRegularTracking() {\n setDischarging();\n setProcessState(ActivityManager.PROCESS_STATE_IMPORTANT_BACKGROUND);\n\n JobStatus jobReg1 = createJobStatus(\"testEJTimerTrackingSeparateFromRegularTracking\", 1);\n JobStatus jobEJ1 =\n createExpeditedJobStatus(\"testEJTimerTrackingSeparateFromRegularTracking\", 2);\n JobStatus jobReg2 = createJobStatus(\"testEJTimerTrackingSeparateFromRegularTracking\", 3);\n JobStatus jobEJ2 =\n createExpeditedJobStatus(\"testEJTimerTrackingSeparateFromRegularTracking\", 4);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(jobReg1, null);\n mQuotaController.maybeStartTrackingJobLocked(jobEJ1, null);\n mQuotaController.maybeStartTrackingJobLocked(jobReg2, null);\n mQuotaController.maybeStartTrackingJobLocked(jobEJ2, null);\n }\n assertNull(mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE));\n assertNull(mQuotaController.getEJTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE));\n List<TimingSession> expectedRegular = new ArrayList<>();\n List<TimingSession> expectedEJ = new ArrayList<>();\n\n // First, regular job runs by itself.\n long start = JobSchedulerService.sElapsedRealtimeClock.millis();\n synchronized (mQuotaController.mLock) {\n mQuotaController.prepareForExecutionLocked(jobReg1);\n }\n advanceElapsedClock(10 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStopTrackingJobLocked(jobReg1, jobReg1, true);\n }\n expectedRegular.add(createTimingSession(start, 10 * SECOND_IN_MILLIS, 1));\n assertEquals(expectedRegular,\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE));\n assertNull(mQuotaController.getEJTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE));\n\n advanceElapsedClock(SECOND_IN_MILLIS);\n\n // Next, EJ runs by itself.\n start = JobSchedulerService.sElapsedRealtimeClock.millis();\n synchronized (mQuotaController.mLock) {\n mQuotaController.prepareForExecutionLocked(jobEJ1);\n }\n advanceElapsedClock(10 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStopTrackingJobLocked(jobEJ1, null, false);\n }\n expectedEJ.add(createTimingSession(start, 10 * SECOND_IN_MILLIS, 1));\n assertEquals(expectedRegular,\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(expectedEJ,\n mQuotaController.getEJTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE));\n\n advanceElapsedClock(SECOND_IN_MILLIS);\n\n // Finally, a regular job and EJ happen to overlap runs.\n start = JobSchedulerService.sElapsedRealtimeClock.millis();\n synchronized (mQuotaController.mLock) {\n mQuotaController.prepareForExecutionLocked(jobEJ2);\n }\n advanceElapsedClock(5 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.prepareForExecutionLocked(jobReg2);\n }\n advanceElapsedClock(5 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStopTrackingJobLocked(jobEJ2, null, false);\n }\n expectedEJ.add(createTimingSession(start, 10 * SECOND_IN_MILLIS, 1));\n advanceElapsedClock(5 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStopTrackingJobLocked(jobReg2, null, false);\n }\n expectedRegular.add(\n createTimingSession(start + 5 * SECOND_IN_MILLIS, 10 * SECOND_IN_MILLIS, 1));\n assertEquals(expectedRegular,\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(expectedEJ,\n mQuotaController.getEJTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE));\n }", "@Test\n public void testUpdatePerson() {\n final AuthenticationToken myToken = login(\"[email protected]\", \"finland\");\n final Group memberGroup = findMemberGroup(myToken);\n final FetchGroupRequest groupRequest = new FetchGroupRequest(memberGroup.getGroupId());\n groupRequest.setUsersToFetch(FetchGroupRequest.UserFetchType.ACTIVE);\n final FetchGroupResponse groupResponse1 = administration.fetchGroup(myToken, groupRequest);\n assertThat(groupResponse1.isOk(), is(true));\n assertThat(groupResponse1.getMembers().size(), is(1));\n\n // Now, let's update the Object, and send it into the IWS\n final User myself = groupResponse1.getMembers().get(0).getUser();\n final Person person = myself.getPerson();\n final Address address = new Address();\n address.setStreet1(\"Mainstreet 1\");\n address.setPostalCode(\"12345\");\n address.setCity(\"Cooltown\");\n address.setState(\"Coolstate\");\n person.setAddress(address);\n person.setFax(\"My fax\");\n person.setBirthday(new Date(\"01-JAN-1980\"));\n person.setMobile(\"+1 1234567890\");\n person.setGender(Gender.UNKNOWN);\n person.setPhone(\"+1 0987654321\");\n person.setUnderstoodPrivacySettings(true);\n person.setAcceptNewsletters(false);\n myself.setPerson(person);\n final UserRequest updateRequest = new UserRequest();\n updateRequest.setUser(myself);\n final Response updateResult = administration.controlUserAccount(myToken, updateRequest);\n assertThat(updateResult.isOk(), is(true));\n\n // Let's find the account again, and verify that the updates were applied\n final FetchUserRequest userRequest = new FetchUserRequest();\n userRequest.setUserId(myself.getUserId());\n final FetchUserResponse userResponse = administration.fetchUser(myToken, userRequest);\n assertThat(userResponse.isOk(), is(true));\n final User myUpdate = userResponse.getUser();\n final Person updatedPerson = myUpdate.getPerson();\n assertThat(updatedPerson.getAlternateEmail(), is(person.getAlternateEmail()));\n assertThat(updatedPerson.getBirthday(), is(person.getBirthday()));\n assertThat(updatedPerson.getFax(), is(person.getFax()));\n assertThat(updatedPerson.getGender(), is(person.getGender()));\n assertThat(updatedPerson.getMobile(), is(person.getMobile()));\n assertThat(updatedPerson.getPhone(), is(person.getPhone()));\n assertThat(updatedPerson.getUnderstoodPrivacySettings(), is(person.getUnderstoodPrivacySettings()));\n assertThat(updatedPerson.getAcceptNewsletters(), is(person.getAcceptNewsletters()));\n\n final Address updatedAddress = updatedPerson.getAddress();\n assertThat(updatedAddress.getStreet1(), is(address.getStreet1()));\n assertThat(updatedAddress.getStreet2(), is(address.getStreet2()));\n assertThat(updatedAddress.getPostalCode(), is(address.getPostalCode()));\n assertThat(updatedAddress.getCity(), is(address.getCity()));\n assertThat(updatedAddress.getState(), is(address.getState()));\n\n // Wrapup... logout\n logout(myToken);\n }", "@Test\n\tpublic void test_synchronization() throws InterruptedException, ExecutionException {\n\t\t\n\t\tIkanowV1SyncService_LibraryJars s1 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\tIkanowV1SyncService_LibraryJars s2 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\tIkanowV1SyncService_LibraryJars s3 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\t\n\t\tint old = IkanowV1SyncService_LibraryJars._num_leader_changes;\n\t\t\n\t\ts1.start(); s2.start(); s3.start();\n\t\tfor (int i = 0; i < 4; ++i) {\n\t\t\ttry { Thread.sleep(1000); } catch (Exception e) {}\n\t\t}\n\t\ts1.stop(); s2.stop(); s3.stop();\n\t\t\n\t\tassertEquals(old + 1, IkanowV1SyncService_LibraryJars._num_leader_changes);\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal ICrudService<JsonNode> v1_config_db = _service_context.getCoreManagementDbService().getUnderlyingPlatformDriver(ICrudService.class, Optional.of(\"social.share\")).get();\t\t\t\t\n\t\t\n\t\tassertTrue(\"Query optimized\", v1_config_db.deregisterOptimizedQuery(Arrays.asList(\"title\")));\n\t\t\n\t}", "@Test\n public void testSubsequentUpdateTimestamp() {\n Product newProduct = TestUtil.createProduct();\n productCurator.create(newProduct);\n Pool pool = createPoolAndSub(owner, newProduct, 1L,\n TestUtil.createDate(2011, 3, 30),\n TestUtil.createDate(2022, 11, 29));\n \n pool = poolCurator.create(pool);\n \n // set updated to 10 minutes ago\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MINUTE, -10);\n pool.setUpdated(calendar.getTime());\n \n Date updated = (Date) pool.getUpdated().clone();\n pool.setQuantity(23L);\n pool = poolCurator.merge(pool);\n \n assertFalse(updated.getTime() == pool.getUpdated().getTime());\n }", "@Test\n public void processTransactionManagerCaseE() throws InterruptedException\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n trans_mang.processTransaction(acc.get_Account_Number(),acc2.get_Account_Number(),30);\n\n Thread.sleep(15000);\n\n Assert.assertEquals(true,trans_mang.processTransaction(acc.get_Account_Number(),acc2.get_Account_Number(),30));\n }", "@Test\n\tpublic void testColisaoCamposObjetosDiferentesLockOtimista(){\n\t\tArtista artista = doWithSession( session -> {\n\t\t\t\n\t\t\tArtista roberto = session.createNamedQuery(\"findByNome\", Artista.class)\n\t\t\t\t\t.setParameter(\"nome\", \"Roberto Carlos\")\n\t\t\t\t\t.getSingleResult(); \n\t\t\treturn roberto;\n\t\t});\n\t\t\n\t\t// Lido e escrito pelo User B\n\t\tdoInTransaction( session -> {\n\n\t\t\tArtista roberto = session.createNamedQuery(\"findByNome\", Artista.class)\n\t\t\t\t\t.setParameter(\"nome\", \"Roberto Carlos\")\n\t\t\t\t\t.getSingleResult(); \n\t\t\troberto.setNome(\"Nome alterado...\");\n\t\t\tsession.update(roberto);\n\t\t});\n\t\t\n\t\t// Escrito pelo User A // javax.persistence.OptimisticLockException: -> org.hibernate.StaleStateException:\n\t\tdoInTransaction( session -> {\n\t\t\tartista.getDetalhes().setDataNascimento(new Date());\n\t\t\tsession.update(artista);\n\t\t});\n\t}", "@Test\n public void participantsWithMismatchTest() throws Exception {\n List<ClusterParticipant> participants = new ArrayList<>();\n // create a latch with init value = 2 and add it to second participant. This latch will count down under certain condition\n CountDownLatch invocationLatch = new CountDownLatch(3);\n MockClusterParticipant participant1 =\n new MockClusterParticipant(new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), null, null, null);\n MockClusterParticipant participant2 =\n new MockClusterParticipant(new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), null, null,\n invocationLatch);\n participants.add(participant1);\n participants.add(participant2);\n clusterAgentsFactory.setClusterParticipants(participants);\n AmbryServer server =\n new AmbryServer(new VerifiableProperties(props), clusterAgentsFactory, notificationSystem, time);\n server.startup();\n // initially, two participants have consistent sealed/stopped replicas. Verify that:\n // 1. checker is instantiated 2. no mismatch event is emitted.\n assertNotNull(\"The mismatch metric should be created\",\n server.getServerMetrics().sealedReplicasMismatchCount);\n assertNotNull(\"The mismatch metric should be created\",\n server.getServerMetrics().partiallySealedReplicasMismatchCount);\n assertEquals(\"Sealed replicas mismatch count should be 0\", 0,\n server.getServerMetrics().sealedReplicasMismatchCount.getCount());\n assertEquals(\"Sealed replicas mismatch count should be 0\", 0,\n server.getServerMetrics().partiallySealedReplicasMismatchCount.getCount());\n assertEquals(\"Stopped replicas mismatch count should be 0\", 0,\n server.getServerMetrics().stoppedReplicasMismatchCount.getCount());\n // induce mismatch for sealed and stopped replica list\n // add 1 sealed replica to participant1\n ReplicaId mockReplica1 = Mockito.mock(ReplicaId.class);\n when(mockReplica1.getReplicaPath()).thenReturn(\"12\");\n participant1.setReplicaSealedState(mockReplica1, ReplicaSealStatus.SEALED);\n // add 1 stopped replica to participant2\n ReplicaId mockReplica2 = Mockito.mock(ReplicaId.class);\n when(mockReplica2.getReplicaPath()).thenReturn(\"4\");\n participant2.setReplicaStoppedState(Collections.singletonList(mockReplica2), true);\n // add 1 partially sealed replica to participant2\n ReplicaId mockReplica3 = Mockito.mock(ReplicaId.class);\n when(mockReplica2.getReplicaPath()).thenReturn(\"5\");\n participant2.setReplicaSealedState(mockReplica3, ReplicaSealStatus.PARTIALLY_SEALED);\n assertTrue(\"The latch didn't count to zero within 5 secs\", invocationLatch.await(5, TimeUnit.SECONDS));\n assertTrue(\"Sealed replicas mismatch count should be non-zero\",\n server.getServerMetrics().sealedReplicasMismatchCount.getCount() > 0);\n assertTrue(\"Partially sealed replicas mismatch count should be non-zero\",\n server.getServerMetrics().partiallySealedReplicasMismatchCount.getCount() > 0);\n assertTrue(\"Stopped replicas mismatch count should be non-zero\",\n server.getServerMetrics().stoppedReplicasMismatchCount.getCount() > 0);\n server.shutdown();\n }", "@Test\n public void testCheckExternalIdUniquenessForUpdate3() {\n\n try {\n\n Map<String, String> externalIdReqMap = new HashMap<>();\n externalIdReqMap.put(JsonKey.ID, \"123209-453445934-23128u3423-dsafsa32c43-few43\");\n externalIdReqMap.put(JsonKey.PROVIDER, \"AP\");\n externalIdReqMap.put(JsonKey.ID_TYPE, \"PAN\");\n externalIdReqMap.put(JsonKey.OPERATION, JsonKey.UPDATE);\n List<Map<String, String>> extIdList = new ArrayList<>();\n extIdList.add(externalIdReqMap);\n\n User user2 = new User();\n user2.setUserId(\"456456\");\n user2.setExternalIds(extIdList);\n\n Util.checkExternalIdUniqueness(user2, JsonKey.UPDATE);\n } catch (Exception ex) {\n System.out.println(\"4\" + ex.getMessage());\n assertTrue(\n ex.getMessage()\n .equalsIgnoreCase(\n \"External ID (id: 123209-453445934-23128u3423-dsafsa32c43-few43, idType: PAN, provider: AP) not found for given user.\"));\n }\n }", "@Test(expected = RollbackException.class)\n public void testOptimisticLocking()\n {\n Employee employee = new EmployeeBuilder().withAge(30).withName(\"Hans\").withSurename(\"Mueller\").build();\n\n // saving Employee\n em.getTransaction().begin();\n em.persist(employee);\n em.getTransaction().commit();\n\n // fresh start\n em = emf.createEntityManager();\n EntityManager em2 = emf.createEntityManager();\n\n\n Employee reloadedEmployeInstance1 = em.find(Employee.class, employee.getId());\n Employee reloadedEmployeInstance2 = em2.find(Employee.class, employee.getId());\n\n // --- client 1 ---\n // saving employee1\n reloadedEmployeInstance1.setAge(100);\n em.getTransaction().begin();\n em.persist(reloadedEmployeInstance1);\n em.getTransaction().commit();\n\n // --- client 2 ---\n // saving employe2\n reloadedEmployeInstance2.setAge(99);\n em2.getTransaction().begin();\n em2.persist(reloadedEmployeInstance2);\n em2.getTransaction().commit();\n }", "@Test\n public void testPassSubgroup2() {\n verifyTask(new int[][]{{0, 1}, {0, 2}}, new Runnable() {\n public void run() {\n final Int i = new Int();\n final Ref<Int> r = new Ref<>(i);\n \n Task<?> task1 = new Task<Void>(new Object[]{r}, new Object[]{}) {\n @Override\n protected Void runRolez() {\n region(0);\n r.o.value++;\n return null;\n }\n };\n s.start(task1);\n \n Task<?> task2 = new Task<Void>(new Object[]{i}, new Object[]{}) {\n @Override\n protected Void runRolez() {\n region(1);\n i.value++;\n return null;\n }\n };\n s.start(task2);\n region(2);\n \n assertEquals(2, guardReadOnly(i).value);\n }\n });\n }", "@Test(expected=OptimisticLockException.class)\n\tpublic void testColisaoCamposDiferentesLockOtimista(){\n\t\t// Detached Artista (Lido pelo User A)\n\t\tArtista artista = doWithSession( session -> {\n\t\t\t\n\t\t\tArtista roberto = session.createNamedQuery(\"findByNome\", Artista.class)\n\t\t\t\t\t.setParameter(\"nome\", \"Roberto Carlos\")\n\t\t\t\t\t.getSingleResult(); \n\t\t\treturn roberto;\n\t\t});\n\t\t\n\t\t// Lido e escrito pelo User B\n\t\tdoInTransaction( session -> {\n\n\t\t\tArtista roberto = session.createNamedQuery(\"findByNome\", Artista.class)\n\t\t\t\t\t.setParameter(\"nome\", \"Roberto Carlos\")\n\t\t\t\t\t.getSingleResult(); \n\t\t\troberto.getDetalhes().setBiografia(\"Biografia alterada...\");\n\t\t\tsession.update(roberto);\n\t\t});\n\t\t\n\t\t// Escrito pelo User A // javax.persistence.OptimisticLockException: -> org.hibernate.StaleStateException:\n\t\tdoInTransaction( session -> {\n\t\t\tartista.getDetalhes().setDataNascimento(new Date());\n\t\t\tsession.update(artista);\n\t\t});\n\t}", "ManagementLockObject.Update update();", "private void checkSyncFlags(GridIoMessage msg) {\n if (!(ClientAbstractMultiNodeSelfTest.commSpiEnabled))\n return;\n\n Object o = msg.message();\n if (!(o instanceof GridDistributedLockRequest))\n return;\n\n IgniteKernal g = ((IgniteKernal) (G.ignite(ignite.configuration().getNodeId())));\n GridCacheContext<Object, Object> cacheCtx = g.internalCache(ClientAbstractMultiNodeSelfTest.REPLICATED_ASYNC_CACHE_NAME).context();\n IgniteTxManager tm = cacheCtx.tm();\n GridCacheVersion v = version();\n IgniteInternalTx t = tm.tx(v);\n if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject(\"x1\"))))\n assertEquals((\"Invalid tx flags: \" + t), CacheWriteSynchronizationMode.FULL_ASYNC, syncMode());\n else\n if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject(\"x2\"))))\n assertEquals((\"Invalid tx flags: \" + t), CacheWriteSynchronizationMode.FULL_SYNC, syncMode());\n else\n if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject(\"x3\"))))\n assertEquals((\"Invalid tx flags: \" + t), CacheWriteSynchronizationMode.FULL_ASYNC, syncMode());\n else\n if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject(\"x4\"))))\n assertEquals((\"Invalid tx flags: \" + t), CacheWriteSynchronizationMode.FULL_SYNC, syncMode());\n\n\n\n\n }", "@Test\n public void multipleProducerScenarioTest() throws InterruptedException, JsonProcessingException, ExecutionException {\n\n //Create list of chunk for producer 1\n ObjectMapper objectMapper = new ObjectMapper();\n List<Chunk> chunkList1 = new ArrayList<>();\n Chunk chunk = new Chunk();\n chunk.setData(Arrays.asList(objectMapper.readValue(\"{\\\"id\\\":\\\"1\\\", \\\"asOf\\\":\\\"2021-09-07T21:26:57.202898400\\\", \\\"payload\\\":{\\\"Price\\\":20.139961889377744}}\", Record.class),\n objectMapper.readValue(\"{\\\"id\\\":\\\"2\\\", \\\"asOf\\\":\\\"2021-09-07T09:26:57.265399700\\\", \\\"payload\\\":{\\\"Price\\\":70.14384608537513}}\", Record.class)));\n chunkList1.add(chunk);\n ExecutorService executorService = Executors.newFixedThreadPool(2);\n ProducerThread producerThread1 = new ProducerThread(\"Producer1\", chunkList1, 10, new ApplicationService());\n\n Future<String> producerResult = executorService.submit(producerThread1);\n while (true) {\n if (producerResult.isDone())\n break;\n }\n\n //Once the producer 1 is done with the batch run, producer 2 starts the batch run\n if (ProducerConstants.BATCH_COMPLETION_MESSAGE.equals(producerResult.get())) {\n List<Chunk> chunkList2 = new ArrayList<>();\n chunk.setData(Arrays.asList(objectMapper.readValue(\"{\\\"id\\\":\\\"1\\\", \\\"asOf\\\":\\\"2021-09-07T21:55:57.265399700\\\", \\\"payload\\\":{\\\"Price\\\":98.12933222921298}}\", Record.class),\n objectMapper.readValue(\"{\\\"id\\\":\\\"2\\\", \\\"asOf\\\":\\\"2021-09-06T10:26:57.265399700\\\", \\\"payload\\\":{\\\"Price\\\":31.54355122981366}}\", Record.class)));\n chunkList2.add(chunk);\n ProducerThread producerThread2 = new ProducerThread(\"Producer2\", chunkList2, 10, new ApplicationService());\n\n producerResult = executorService.submit(producerThread2);\n while (true) {\n if (producerResult.isDone())\n break;\n }\n\n //Once producer 2 is also done with the batch , then start 2 consumer threads to access the instrument id value.\n if (ProducerConstants.BATCH_COMPLETION_MESSAGE.equals(producerResult.get())) {\n Future<String> priceFromConsumer1 = executorService.submit(new ConsumerThread(\"Consumer1\", 1, new ApplicationService()));\n Future<String> priceFromConsumer2 = executorService.submit(new ConsumerThread(\"Consumer2\", 2, new ApplicationService()));\n\n assertEquals(\"98.12933222921298\", priceFromConsumer1.get());\n assertEquals(\"70.14384608537513\", priceFromConsumer2.get());\n }\n }\n\n executorService.shutdown();\n\n }", "@Test\n public void shouldUpdateTheSpezifiedValidRoomAndPersistTheChanges()\n\t throws Exception {\n\n\tfinal ArrayList<String> newValidValues = Lists.newArrayList(\"Hilton\",\n\t\t\"Hamburg\", \"2\", \"N\", \"12\", \"12.02.2007\", \"\");\n\n\tfinal UpdateRoomCommand command = new UpdateRoomCommand(newValidValues,\n\t\tvalidRoomOffer);\n\n\tfinal UrlyBirdRoomOfferService roomOfferService = new UrlyBirdRoomOfferService(\n\t\tdao, builder, null, null);\n\twhen(dao.read(validRoomOffer.getIndex())).thenReturn(validRoomOffer);\n\twhen(builder.createRoomOffer(newValidValues, validRoomOffer.getIndex()))\n\t\t.thenReturn(validRoomOffer);\n\n\tfinal UrlyBirdRoomOffer updatedRoomOffer = roomOfferService\n\t\t.updateRoomOffer(command);\n\n\tverify(dao).lock(validRoomOffer.getIndex());\n\tverify(dao).unlock(eq(validRoomOffer.getIndex()), anyLong());\n\tverify(dao).update(eq(validRoomOffer), anyLong());\n\tassertThat(updatedRoomOffer, is(equalTo(validRoomOffer)));\n }", "@Test\n public void testGetTimeUntilQuotaConsumedLocked_QuotaBump() {\n setDeviceConfigLong(QcConstants.KEY_QUOTA_BUMP_ADDITIONAL_DURATION_MS, MINUTE_IN_MILLIS);\n setDeviceConfigLong(QcConstants.KEY_QUOTA_BUMP_WINDOW_SIZE_MS, 8 * HOUR_IN_MILLIS);\n\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Close to RARE boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS - 30 * SECOND_IN_MILLIS),\n 30 * SECOND_IN_MILLIS, 5), false);\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE)\n .add(new QuotaBump(now - 16 * HOUR_IN_MILLIS));\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE)\n .add(new QuotaBump(now - 12 * HOUR_IN_MILLIS));\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE)\n .add(new QuotaBump(now - 8 * HOUR_IN_MILLIS));\n // Far away from FREQUENT boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (7 * HOUR_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5), false);\n // Overlap WORKING_SET boundary.\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE)\n .add(new QuotaBump(now - 2 * HOUR_IN_MILLIS));\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (2 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS),\n 3 * MINUTE_IN_MILLIS, 5), false);\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE)\n .add(new QuotaBump(now - 15 * MINUTE_IN_MILLIS));\n // Close to ACTIVE boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (9 * MINUTE_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5), false);\n\n setStandbyBucket(RARE_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(3 * MINUTE_IN_MILLIS + 30 * SECOND_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(4 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n setStandbyBucket(FREQUENT_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(4 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(4 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(8 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n // ACTIVE window = allowed time, so jobs can essentially run non-stop until they reach the\n // max execution time.\n setStandbyBucket(ACTIVE_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(mQcConstants.MAX_EXECUTION_TIME_MS - 9 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }", "@Test\n public void testIsInWaitList() {\n }", "@Test(description = \"Verify node's update reject request with the same responsible for different matching \"\n + \"node_type+External ID (Negative)\", groups = \"smoke\")\n public void updateRegisteredNodeWithSameResponsibleForDifferentMatchingTest() {\n AccountEntity cameraResponsible = new AccountEntityManager().createAccountEntity();\n Response cameraResponsibleResponse =\n AccountEntityServiceMethods.createAccountEntityRequest(cameraResponsible);\n Integer cameraResponsibleId = getAccountId(cameraResponsibleResponse);\n\n //Create responsible for airsensor\n AccountEntity airsensorResponsible = new AccountEntityManager().createAccountEntity();\n Response airsensorResponsibleResponse =\n AccountEntityServiceMethods.createAccountEntityRequest(airsensorResponsible);\n Integer airsensorResponsibleId = getAccountId(airsensorResponsibleResponse);\n\n //LWA Camera registration\n LightWeightAccount.Node node = createDefaultNode();\n\n LightWeightAccount lwa = createDefaultLightWeightAccount(node)\n .setResponsibleId(cameraResponsibleId.toString())\n .setStartDate(DateTimeHelper.getCurrentDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START));\n\n LightWeightAccountServiceMethods.newNodeRegistration(lwa).then().statusCode(200);\n\n //LWA Airsensor registration\n LightWeightAccount.Node node2 = createDefaultNode()\n .setNodeType(\"AIRSENSOR\")\n .setAttributes(new HashMap<String, Object>() {{\n put(\"msisdn\", \"value1\");\n put(\"oem\", \"11\");\n put(\"location\", \"12356\");\n put(\"model\", \"1234\");\n }});\n\n LightWeightAccount lwa2 = createDefaultLightWeightAccount(node2)\n .setResponsibleId(airsensorResponsibleId.toString())\n .setStartDate(DateTimeHelper.getCurrentDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START));\n\n LightWeightAccountServiceMethods.newNodeRegistration(lwa2).then().statusCode(200);\n\n //Update camera with same responsible\n LightWeightAccount lwaCameraUpdated = new LightWeightAccount()\n .setExternalId(lwa.getExternalId())\n .setResponsibleId(cameraResponsibleId.toString())\n .setStartDate(DateTimeHelper.getTomorrowDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START))\n .setNode(new LightWeightAccount.Node().setNodeType(node.getNodeType()));\n\n //request rejection check\n LightWeightAccountServiceMethods.updateNodeRegistration(lwaCameraUpdated).then().statusCode(428);\n\n //Update airsensor with new responsible\n LightWeightAccount lwaAirsensorUpdated = new LightWeightAccount()\n .setExternalId(lwa2.getExternalId())\n .setResponsibleId(cameraResponsibleId.toString())\n .setStartDate(DateTimeHelper.getTomorrowDate(DateTimeHelper.DATE_PATTERN_DEFAULT_START))\n .setNode(new LightWeightAccount.Node().setNodeType(\"AIRSENSOR\"));\n\n //request rejection check\n LightWeightAccountServiceMethods.updateNodeRegistration(lwaAirsensorUpdated).then().statusCode(200);\n }", "@Test\r\n\tpublic void testConcurentUpdate() throws InterruptedException, ExecutionException{\r\n\t\tfinal Annotations annos = new Annotations();\r\n\t\t// Apply these annos to this node.\r\n\t\tannos.setId(KeyFactory.keyToString(node.getId()));\r\n\t\tannos.addAnnotation(\"stringKey\", \"String\");\r\n\t\t\r\n\t\tLoopingAnnotaionsWoker workerOne = new LoopingAnnotaionsWoker(dboAnnotationsDao, 10, annos);\r\n\t\tLoopingAnnotaionsWoker workerTwo = new LoopingAnnotaionsWoker(dboAnnotationsDao, 10, annos);\r\n\t\t// Start both workers\r\n\t\tExecutorService pool = Executors.newFixedThreadPool(2);\r\n\t\tFuture<Boolean> furtureOne = pool.submit(workerOne);\r\n\t\tFuture<Boolean> furtureTwo = pool.submit(workerTwo);\r\n\t\t// Wait for the threads to finish.\r\n\r\n\t\tassertTrue(furtureOne.get());\r\n\t\tassertTrue(furtureTwo.get());\r\n\r\n\t\t// There should be no duplication.\r\n\t\tAnnotations clone = dboAnnotationsDao.getAnnotations(node.getId());\r\n\t\t// There should be no duplication.\r\n\t\tassertNotNull(clone);\r\n\t\tCollection list = clone.getAllValues(\"stringKey\");\r\n\t\tassertNotNull(list);\r\n\t\tassertEquals(\"There should only be one value for this annotations. That means multiple threads caused duplication!\", 1, list.size());\r\n\t\tassertEquals(\"String\", list.iterator().next() );\r\n\t}", "@Test\n @Issue(\"JENKINS-41685\")\n public void testParallelsWithDuplicateEvents() throws Exception {\n //https://gist.github.com/vivek/ccf3a4ef25fbff267c76c962d265041d\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"ParallelInsanity\");\n job.setDefinition(new CpsFlowDefinition(\"\" +\n \"echo 'first stage'\\n\" +\n \"parallel left : {\\n\" +\n \" echo 'run a bit'\\n\" +\n \" echo 'run a bit more'\\n\" +\n \" semaphore 'wait1'\\n\" +\n \"}, right : {\\n\" +\n \" echo 'wozzle'\\n\" +\n \" semaphore 'wait2'\\n\" +\n \"}\\n\" +\n \"echo 'last stage'\\n\" +\n \"echo \\\"last done\\\"\\n\",\n true));\n ForkScanner scan = new ForkScanner();\n ChunkFinder labelFinder = new NoOpChunkFinder();\n WorkflowRun run = job.scheduleBuild2(0).getStartCondition().get();\n SemaphoreStep.waitForStart(\"wait1/1\", run);\n SemaphoreStep.waitForStart(\"wait2/1\", run);\n\n TestVisitor test = new TestVisitor();\n List<FlowNode> heads = run.getExecution().getCurrentHeads();\n scan.setup(heads);\n scan.visitSimpleChunks(test, labelFinder);\n\n SemaphoreStep.success(\"wait1\"+\"/1\", null);\n SemaphoreStep.success(\"wait2\"+\"/1\", null);\n r.waitForCompletion(run);\n\n int atomEventCount = 0;\n int parallelBranchEndCount = 0;\n int parallelStartCount = 0;\n for (TestVisitor.CallEntry ce : test.calls) {\n switch (ce.type) {\n case ATOM_NODE:\n atomEventCount++;\n break;\n case PARALLEL_BRANCH_END:\n parallelBranchEndCount++;\n break;\n case PARALLEL_START:\n parallelStartCount++;\n break;\n default:\n break;\n }\n }\n\n sanityTestIterationAndVisiter(heads);\n Assert.assertEquals(10, atomEventCount);\n Assert.assertEquals(1, parallelStartCount);\n Assert.assertEquals(2, parallelBranchEndCount);\n }", "private void runWrongUpdateTask2(BdbMapDao<BytesValue> dbLock,\n BdbMapDao<Blog.BlogEntry> blogEntryDao,\n ByteString key,\n AtomicInteger conflictCount) throws InterruptedException {\n for (int i = 0; i < execTimes; ++i) {\n\n // Optimistic lock, still causes a lot of contention\n boolean wasSuccessful = false;\n\n for (int retries = 0; retries < MAX_RETRIES; ++retries) {\n // [1] acquire record\n BytesValue lock = dbLock.get(null, key, () -> null);\n if (lock == null) { // does somebody acquired this record before?\n // ok - version is empty, looks like we are the ones who acquired it first\n // NOTE: we need big endian representation of long here!\n final ByteString versionKey = ByteString.copyFrom(Longs.toByteArray(versionId.incrementAndGet()));\n\n // [2] assign update version\n dbLock.put(null, key, BytesValue.newBuilder().setValue(versionKey).build());\n\n // [3] retrieve version once more, duplicates should be disregarded\n lock = dbLock.get(null, key, () -> null);\n if (lock != null && lock.getValue().equals(versionKey)) {\n // [4] same version, proceed with the update\n final Blog.BlogEntry original = blogEntryDao.get(null, key);\n blogEntryDao.put(null, key, Blog.BlogEntry.newBuilder(original)\n .setLikes(original.getLikes() + 1)\n .build());\n\n // [5] clear lock versions\n dbLock.delete(null, key);\n wasSuccessful = true;\n break;\n }\n }\n conflictCount.incrementAndGet(); // CAS failed, do it all over again\n } // optimistic lock retry loop\n\n if (!wasSuccessful) {\n throw new IllegalStateException();\n }\n }\n }", "@Override\r\n\t\tpublic Boolean call() throws Exception {\n\t\t\tint count = 10;\r\n\t\t\tint deadlockCount = 0;\r\n\t\t\twhile (count > 0) {\r\n\t\t\t\tassertTrue(\"Too many deadlock exceptions\", deadlockCount < 10);\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// Replace the annotations\r\n\t\t\t\t\tdboAnnotationsDao.replaceAnnotations(annos);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// Deadlock is the only acceptable exception here, just retry\r\n\t\t\t\t\tif (e.getMessage().indexOf(\"Deadlock found when trying to get lock\") > -1) {\r\n\t\t\t\t\t\tdeadlockCount++;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow e;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcount--;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}", "@Test\n public void testEPTIDWins() throws Exception {\n // Get a set of keys.\n UserMultiID umk = createUMK();\n\n User user = newUser();\n UserMultiID newUmk = new UserMultiID(umk.getEppn(), umk.getEptid());\n user.setUserMultiKey(newUmk);\n getUserStore().save(user);\n UserMultiID umkNoEPPN = new UserMultiID(umk.getEptid());\n UserMultiID umkNewEPPN = new UserMultiID(new EduPersonPrincipleName(\"eppn:\" + getRandomString()), umk.getEptid());\n\n Collection<User> users = getUserStore().get(umkNoEPPN, user.getIdP());\n assert users.size() == 1 : \"Incorrect number of users found. Expected one and got \" + users.size();\n assert user.equals(users.iterator().next());\n\n users = getUserStore().get(umkNewEPPN, user.getIdP());\n assert users.size() == 1 : \"Incorrect number of users found. Expected one and got \" + users.size();\n assert user.equals(users.iterator().next());\n\n XMLMap userMap = getDBSClient().getUser(user.getIdentifier());\n checkUserAgainstMap(userMap, user);\n }", "private void doMasterUpdates() \n throws Exception {\n\n int txnRounds = 0;\n int tempRound = roundPerSync;\n\n UpdateRange range = new UpdateRange();\n\n openStore();\n\n Transaction txn = null;\n while (runnable) {\n if (Utils.VERBOSE) {\n System.out.println\n (\"Updating rounds left on Master: \" + totalRounds);\n }\n\n /* Traverse the database and do updates. */\n for (int i = range.getStart(); i <= range.getEnd(); i++) {\n /* Create a new transaction for every txnOps operations. */\n if ((i - 1) % txnOps == 0) {\n txn = master.beginTransaction(null, null);\n txnRounds++;\n }\n\n /* Do updates. */\n if (range.doDelete(i)) {\n doDeleteWork(primaryIndex, txn, i);\n } else {\n /* Updates and inserts are actually putting a record. */\n doPutWork(primaryIndex, txn, range, i, txnRounds);\n }\n }\n\n /* Shift the range so that it can traverse the database again. */\n range.shift();\n\n /* Exit the loop if the updates have been finished. */\n if (--totalRounds == 0) {\n runnable = false;\n }\n\n /* If a round of traverses finishes, synch the group. */\n if (--tempRound == 0 || !runnable) {\n dbStore.close();\n Utils.doSyncAndCheck(repEnvInfo);\n if (runnable) {\n openStore();\n }\n tempRound = roundPerSync;\n }\n }\n }", "@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }", "@Test\n public void testGetUsersForOrganization_SubMgr() throws Exception {\n\n // given\n container.login(customerUser.getKey(), ROLE_ORGANIZATION_ADMIN);\n List<VOUserDetails> oldList = idService.getUsersForOrganization();\n\n // execute\n container.login(supplierAdminUser.getKey(), ROLE_SUBSCRIPTION_MANAGER);\n List<VOUserDetails> newList = idService.getUsersForOrganization();\n\n assertEquals(oldList.size(), newList.size());\n }", "@Test(timeout = 30000)\n public void testConcurrentWriteAndDeleteBlock() throws Exception {\n final int numBlocks = 1000;\n final int threadCount = 10;\n // Generate data blocks.\n ExecutorService pool = Executors.newFixedThreadPool(threadCount);\n List<Future<?>> futureList = new ArrayList<>();\n Random random = new Random();\n // Random write block and delete half of them.\n for (int i = 0; i < threadCount; i++) {\n Thread thread = new Thread() {\n @Override\n public void run() {\n try {\n String bpid = BLOCK_POOL_IDS[random.nextInt(BLOCK_POOL_IDS.length)];\n for (int blockId = 0; blockId < numBlocks; blockId++) {\n ExtendedBlock eb = new ExtendedBlock(bpid, blockId);\n ReplicaHandler replica = null;\n try {\n replica = dataset.createRbw(StorageType.DEFAULT, null, eb,\n false);\n if (blockId % 2 > 0) {\n dataset.invalidate(bpid, new Block[]{eb.getLocalBlock()});\n }\n } finally {\n if (replica != null) {\n replica.close();\n }\n }\n }\n // Just keep final consistency no need to care exception.\n } catch (Exception ignore) {}\n }\n };\n thread.setName(\"AddBlock\" + i);\n futureList.add(pool.submit(thread));\n }\n // Wait for data generation\n for (Future<?> f : futureList) {\n f.get();\n }\n // Wait for the async deletion task finish.\n GenericTestUtils.waitFor(() -> dataset.asyncDiskService.countPendingDeletions() == 0,\n 100, 10000);\n for (String bpid : dataset.volumeMap.getBlockPoolList()) {\n assertEquals(numBlocks / 2, dataset.volumeMap.size(bpid));\n }\n }", "@Test\n public void testBug35945() throws Exception {\n PORT1 = server1.invoke(HAInterestTestCase::createServerCache);\n server1.invoke(HAInterestTestCase::createEntriesK1andK2);\n createClientPoolCacheConnectionToSingleServer(getName(),\n getServerHostName(server1.getHost()));\n registerK1AndK2();\n verifyRefreshedEntriesFromServer();\n\n server1.invoke(HAInterestTestCase::stopServer);\n verifyDeadAndLiveServers(1, 0);\n // put on stopped server\n server1.invoke(HAInterestTestCase::putK1andK2);\n // spawn a thread to put on server , which will acquire a lock on entry\n setClientServerObserverForBeforeInterestRecovery();\n server1.invoke(HAInterestTestCase::startServer);\n verifyDeadAndLiveServers(0, 1);\n waitForBeforeInterestRecoveryCallBack();\n // verify updated value of k1 as a refreshEntriesFromServer\n final Region r1 = cache.getRegion(SEPARATOR + REGION_NAME);\n assertNotNull(r1);\n\n WaitCriterion wc = new WaitCriterion() {\n private String excuse;\n\n @Override\n public boolean done() {\n Entry e1 = r1.getEntry(k1);\n Entry e2 = r1.getEntry(k2);\n Object v1 = null;\n if (e1 != null) {\n try {\n v1 = e1.getValue();\n } catch (EntryDestroyedException ignore) {\n // handled to fix GEODE-296\n }\n }\n if (e1 == null || !server_k1_updated.equals(v1)) {\n excuse = \"v1=\" + v1;\n return false;\n }\n Object v2 = null;\n if (e2 != null) {\n try {\n v2 = e2.getValue();\n } catch (EntryDestroyedException ignore) {\n // handled to fix GEODE-296\n }\n }\n if (e2 == null || !server_k2.equals(v2)) {\n excuse = \"v2=\" + v2;\n return false;\n }\n return true;\n }\n\n @Override\n public String description() {\n return excuse;\n }\n };\n GeodeAwaitility.await().untilAsserted(wc);\n }", "@Test\n public void shouldPartiallyUpdateAPaymentViaPatch() throws Exception {\n ResponseEntity<String> response = postTestPaymentAndGetResponse();\n String location = getLocationHeader(response);\n\n //when: just the organisation_id is updated:\n HttpEntity entity = getHttpEntityForTestRequest(\"{\\\"organisation_id\\\":\\\"newOrganisationId\\\"}\");\n RestTemplate restTemplateForPatch = getRestTemplateForPatch();\n ResponseEntity<String> patchResponse = restTemplateForPatch.exchange(location, HttpMethod.PATCH, entity, String.class);\n //then: a 200 ok status code is returned:\n assertEquals(HttpStatus.OK, patchResponse.getStatusCode());\n\n //when: the payment is fetched again:\n Payment updatedPayment = restTemplate.getForEntity(location, Payment.class).getBody();\n //then: the data on the response should be correct, e.g. check the orgainsation_id field:\n assertEquals(\"newOrganisationId\", updatedPayment.getOrganisationId());\n }", "@Test(groups = { \"lock\", \"nightly\" }, enabled=false)\n public void testMultipleWorkflowsWithLocks() {\n RaptureURI workflowRepo = helper.getRandomAuthority(Scheme.WORKFLOW);\n HttpDecisionApi decisionApi = helper.getDecisionApi();\n HttpScriptApi scriptApi = helper.getScriptApi();\n List<Step> thirtyNine = new ArrayList<Step>();\n String scriptUri = RaptureURI.builder(helper.getRandomAuthority(Scheme.SCRIPT)).docPath(\"sleep\").asString();\n long scriptSleepTime=10000;\n long timeoutValueSeconds=2;\n int numWorkflows=15;\n \n if (!scriptApi.doesScriptExist(scriptUri)) {\n @SuppressWarnings(\"unused\")\n RaptureScript executable = scriptApi.createScript(scriptUri, RaptureScriptLanguage.REFLEX, RaptureScriptPurpose.PROGRAM,\n \"println(\\\"Thread sleeping\\\");\\nsleep(\"+scriptSleepTime+\");\\nreturn 'next';\");\n }\n\n Step s1 = new Step();\n s1.setName(\"first\");\n s1.setExecutable(scriptUri);\n s1.setDescription(\"first sleep step\");\n\n Transition trans1 = new Transition();\n trans1.setName(\"next\");\n trans1.setTargetStep(\"$RETURN\");\n\n Transition error = new Transition();\n error.setName(\"error\");\n error.setTargetStep(\"$FAIL\");\n\n s1.setTransitions(ImmutableList.of(trans1, error));\n thirtyNine.add(s1);\n\n String semaphoreConfig = \"{\\\"maxAllowed\\\":1, \\\"timeout\\\":\"+timeoutValueSeconds+\" }\";\n\n // Begin by creating a couple of workflows.\n // In the real world these would be created by two different threads/users/applications,\n // so they use the same URI and semaphore config.\n\n Workflow flow = new Workflow();\n flow.setStartStep(\"first\");\n flow.setSteps(thirtyNine);\n String flowUri = RaptureURI.builder(workflowRepo).docPath(\"lockTest\").asString();\n flow.setWorkflowURI(flowUri);\n flow.setSemaphoreType(SemaphoreType.WORKFLOW_BASED);\n flow.setSemaphoreConfig(semaphoreConfig);\n decisionApi.putWorkflow(flow);\n\n \n RaptureURI lockUri = RaptureURI.builder(helper.getRandomAuthority(Scheme.DOCUMENT)).build();\n\t\tRaptureLockConfig lockConfig = lockApi.createLockManager(lockUri.toString(), \"LOCKING USING ZOOKEEPER {}\", \"\");\n // Start the first workflow. It will sleep for 5s then exit\n Map<String, String> params = new HashMap<String, String>();\n CreateResponse orderUri = decisionApi.createWorkOrderP(flow.getWorkflowURI(), params, null);\n assertNotNull(orderUri);\n\n List<String>woList = new ArrayList<String> ();\n for (int woCount =0; woCount<=numWorkflows; woCount++) {\n \tCreateResponse woUri = decisionApi.createWorkOrderP(flow.getWorkflowURI(), params, null);\n \t\n \ttry {\n \t\tThread.sleep(225);\n } catch (InterruptedException e) {\n }\n \tReporter.log(\"Checking work order attempt \"+woCount,true);\n \tlong successfulWoNumber=scriptSleepTime/(timeoutValueSeconds*1000);\n \tif (woCount % successfulWoNumber ==0 && woCount >0) {\n \t\tAssert.assertNotNull(woUri.getUri());\n \t\twoList.add(woUri.getUri());\n \t}\n \telse\n \t\tAssert.assertNull(woUri.getUri());\n \t\n }\n try {\n \tThread.sleep(10000);\n } catch (Exception e) {}\n for (String wo : woList) {\n \tReporter.log (\"Checking status of \"+wo,true);\n \tAssert.assertEquals(decisionApi.getWorkOrderStatus(wo).getStatus(),WorkOrderExecutionState.FINISHED);\n }\n }", "@Test\n public void testTransactional() throws Throwable {\n final List<MagicKey> keys = init();\n final CountDownLatch l = new CountDownLatch(1);\n final AtomicBoolean rollback = new AtomicBoolean(false);\n\n Future<Void> future = fork(() -> {\n try {\n // start a transaction on c1.\n TransactionManager t1 = TestingUtil.getTransactionManager(c1);\n t1.begin();\n c1.put(keys.get(0), \"transactionally_replaced\");\n Transaction tx = t1.getTransaction();\n tx.enlistResource(new XAResourceAdapter() {\n public int prepare(Xid id) {\n // this would be called *after* the cache prepares.\n try {\n log.debug(\"Unblocking commit\");\n l.await();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n return XAResource.XA_OK;\n }\n });\n t1.commit();\n } catch (Exception e) {\n log.error(\"Error committing transaction\", e);\n rollback.set(true);\n throw new RuntimeException(e);\n }\n });\n\n log.info(\"Invoking rehash event\");\n performRehashEvent(true);\n l.countDown();\n future.get(30, TimeUnit.SECONDS);\n\n //ownership can only be verified after the rehashing has completed\n waitForRehashCompletion();\n log.info(\"Rehash complete\");\n\n //only check for these values if tx was not rolled back\n if (!rollback.get()) {\n // the ownership of k1 might change during the tx and a cache might end up with it in L1\n assertOwnershipAndNonOwnership(keys.get(0), true);\n assertOwnershipAndNonOwnership(keys.get(1), false);\n assertOwnershipAndNonOwnership(keys.get(2), false);\n assertOwnershipAndNonOwnership(keys.get(3), false);\n\n // checking the values will bring the keys to L1, so we want to do it after checking ownership\n assertOnAllCaches(keys.get(0), \"transactionally_replaced\");\n assertOnAllCaches(keys.get(1), \"v0\");\n assertOnAllCaches(keys.get(2), \"v0\");\n assertOnAllCaches(keys.get(3), \"v0\");\n }\n }", "@Test\n public void testValidateAndUpdateCache() throws Exception {\n OMRequestTestUtils.addVolumeAndBucketToDB(volumeName, bucketName,\n omMetadataManager, getBucketLayout());\n\n addKeyToOpenKeyTable(volumeName, bucketName);\n\n OMRequest modifiedOmRequest =\n doPreExecute(createAllocateBlockRequest());\n\n OMAllocateBlockRequest omAllocateBlockRequest =\n getOmAllocateBlockRequest(modifiedOmRequest);\n\n // Check before calling validateAndUpdateCache. As adding DB entry has\n // not added any blocks, so size should be zero.\n\n OmKeyInfo omKeyInfo = verifyPathInOpenKeyTable(keyName, clientID,\n true);\n\n List<OmKeyLocationInfo> omKeyLocationInfo =\n omKeyInfo.getLatestVersionLocations().getLocationList();\n\n Assert.assertTrue(omKeyLocationInfo.size() == 0);\n\n OMClientResponse omAllocateBlockResponse =\n omAllocateBlockRequest.validateAndUpdateCache(ozoneManager, 100L,\n ozoneManagerDoubleBufferHelper);\n\n Assert.assertEquals(OzoneManagerProtocolProtos.Status.OK,\n omAllocateBlockResponse.getOMResponse().getStatus());\n\n // Check open table whether new block is added or not.\n\n omKeyInfo = verifyPathInOpenKeyTable(keyName, clientID,\n true);\n\n // Check modification time\n Assert.assertEquals(modifiedOmRequest.getAllocateBlockRequest()\n .getKeyArgs().getModificationTime(), omKeyInfo.getModificationTime());\n\n // creationTime was assigned at OMRequestTestUtils.addKeyToTable\n // modificationTime was assigned at\n // doPreExecute(createAllocateBlockRequest())\n Assert.assertTrue(\n omKeyInfo.getCreationTime() <= omKeyInfo.getModificationTime());\n\n // Check data of the block\n OzoneManagerProtocolProtos.KeyLocation keyLocation =\n modifiedOmRequest.getAllocateBlockRequest().getKeyLocation();\n\n omKeyLocationInfo =\n omKeyInfo.getLatestVersionLocations().getLocationList();\n\n Assert.assertTrue(omKeyLocationInfo.size() == 1);\n\n Assert.assertEquals(keyLocation.getBlockID().getContainerBlockID()\n .getContainerID(), omKeyLocationInfo.get(0).getContainerID());\n\n Assert.assertEquals(keyLocation.getBlockID().getContainerBlockID()\n .getLocalID(), omKeyLocationInfo.get(0).getLocalID());\n\n }", "@Test\n void testGetAndSetId() {\n isLockedRequest2.setId(3);\n assertEquals(3, isLockedRequest2.getId());\n }", "private void testPrimaryChange(ExceptionRunnable topologyChange) throws Exception {\n MagicKey backupKey = new MagicKey(cache(0), cache(1));\n MagicKey nonOwnerKey = new MagicKey(cache(0), cache(2));\n\n // node0 is the primary owner\n assertPrimaryOwner(backupKey, 0);\n tm(0).begin();\n cache(0).put(backupKey, \"value-0\");\n Transaction tx0 = tm(0).suspend();\n\n tm(0).begin();\n advancedCache(0).lock(nonOwnerKey);\n Transaction tx1 = tm(0).suspend();\n\n // expect keys to be locked on primary owner\n assertLocked(0, backupKey);\n assertLocked(0, nonOwnerKey);\n\n // switch primary owner: node1\n factory.setOwnerIndexes(new int[][]{{1, 0}, {1, 0}});\n\n topologyChange.run();\n\n assertPrimaryOwner(backupKey, 1);\n assertPrimaryOwner(nonOwnerKey, 1);\n\n AdvancedCache<Object, Object> zeroTimeoutCache1 = advancedCache(1).withFlags(Flag.ZERO_LOCK_ACQUISITION_TIMEOUT);\n assertPutTimeout(backupKey, zeroTimeoutCache1);\n assertLockTimeout(backupKey, zeroTimeoutCache1);\n assertPutTimeout(nonOwnerKey, zeroTimeoutCache1);\n assertLockTimeout(nonOwnerKey, zeroTimeoutCache1);\n\n tm(0).resume(tx0);\n tm(0).commit();\n\n tm(0).resume(tx1);\n tm(0).commit();\n\n assertEquals(\"value-0\", cache(0).get(backupKey));\n assertEquals(\"value-0\", cache(1).get(backupKey));\n assertNull(cache(0).get(nonOwnerKey));\n assertNull(cache(1).get(nonOwnerKey));\n }", "@Test\n void register() {\n assertTrue(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 1), registrationSystem.getCourseController().findOne((long) 1)));\n assertEquals(6, registrationSystem.getStudentController().findOne((long) 1).getTotalCredits()); // Student should have now a total of 6 credits\n assertTrue(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 1), registrationSystem.getCourseController().findOne((long) 2)));\n assertEquals(11, registrationSystem.getStudentController().findOne((long) 1).getTotalCredits()); // Student should have now a total of 6 credits\n\n // Enrolling the student with ID 2 to the course with ID 1 and course with ID 2\n assertTrue(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 2), registrationSystem.getCourseController().findOne((long) 1)));\n assertEquals(6, registrationSystem.getStudentController().findOne((long) 2).getTotalCredits()); // Student should have now a total of 6 credits\n assertTrue(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 2), registrationSystem.getCourseController().findOne((long) 2)));\n assertEquals(11, registrationSystem.getStudentController().findOne((long) 2).getTotalCredits()); // Student should have now a total of 6 credits\n\n // Trying to enroll the students for the same courses\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 1), registrationSystem.getCourseController().findOne((long) 1)));\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 1), registrationSystem.getCourseController().findOne((long) 2)));\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 2), registrationSystem.getCourseController().findOne((long) 1)));\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 2), registrationSystem.getCourseController().findOne((long) 2)));\n\n // Trying to enroll the students, that already have 30 credits\n student1.setTotalCredits(30);\n student2.setTotalCredits(30);\n registrationSystem.getStudentController().update(student1);\n registrationSystem.getStudentController().update(student2);\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 1), registrationSystem.getCourseController().findOne((long) 1)));\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 1), registrationSystem.getCourseController().findOne((long) 2)));\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 2), registrationSystem.getCourseController().findOne((long) 1)));\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 2), registrationSystem.getCourseController().findOne((long) 2)));\n\n // Trying to enroll the students for a course, that has no more free places left\n course1.setMaxEnrollment(2);\n course2.setMaxEnrollment(2);\n registrationSystem.getCourseController().update(course1);\n registrationSystem.getCourseController().update(course2);\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 1), registrationSystem.getCourseController().findOne((long) 1)));\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 1), registrationSystem.getCourseController().findOne((long) 2)));\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 2), registrationSystem.getCourseController().findOne((long) 1)));\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 2), registrationSystem.getCourseController().findOne((long) 2)));\n\n // Trying to enroll the students to a non existing course\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 1), new Course(\"newCourse\", teacher1, 50, 6, 20)));\n assertFalse(registrationSystem.register(registrationSystem.getStudentController().findOne((long) 2), new Course(\"newCourse\", teacher1, 50, 6, 21)));\n\n // Trying to enroll non existing students\n assertFalse(registrationSystem.register(new Student(\"new\", \"student\", 10), registrationSystem.getCourseController().findOne((long) 1)));\n assertFalse(registrationSystem.register(new Student(\"new\", \"student\", 11), registrationSystem.getCourseController().findOne((long) 2)));\n }", "@Test\n public void testCheckExternalIdUniquenessForUpdate2() {\n\n try {\n user.setUserId(\"456456\");\n user.getExternalIds().get(0).put(JsonKey.OPERATION, JsonKey.UPDATE);\n Util.checkExternalIdUniqueness(user, JsonKey.UPDATE);\n } catch (Exception ex) {\n System.out.println(\"3\" + ex.getMessage());\n assertTrue(\n ex.getMessage()\n .equalsIgnoreCase(\n \"External ID (id: 123209-453445934-23128u3423-dsafsa32c43-few43-wesc49cjkf, idType: AAADHAR, provider: AP) not found for given user.\"));\n }\n }", "@Test\n public void testFailLock() {\n if (getConnection().isNis()) {\n // TODO Workaround on Solaris NIS: there doesn't seem to be a way\n // how to handle user locks on NIS.\n log.info(\"skipping test 'testLock', as LOCK attribute is not supported by the connector on NIS.\");\n return;\n }\n try {\n getFacade().update(ObjectClass.ACCOUNT, new Uid(getUsername()),\n CollectionUtil.newSet(AttributeBuilder.build(AccountAttribute.LOCK.getName())),\n null);\n AssertJUnit\n .fail(\"passing null option to Lock should cause failure. It must have a boolean value.\");\n } catch (Exception ex) {\n // OK\n }\n try {\n getFacade().create(\n ObjectClass.ACCOUNT,\n CollectionUtil.newSet(AttributeBuilder.build(Name.NAME, \"fooconn\"),\n AttributeBuilder.buildPassword(\"foo134\".toCharArray()),\n AttributeBuilder.build(AccountAttribute.LOCK.getName())), null);\n AssertJUnit\n .fail(\"passing null option to Lock should cause failure. It must have a boolean value.\");\n } catch (Exception ex) {\n // OK\n } finally {\n try {\n getFacade().delete(ObjectClass.ACCOUNT, new Uid(\"foo134\"), null);\n } catch (Exception ex) {\n // OK\n }\n }\n }", "@Override\n public void syncUserData() {\n\n List<User> users = userRepository.getUserList();\n List<LdapUser> ldapUsers = getAllUsers();\n Set<Integer> listUserIdRemoveAM = new HashSet<>();\n\n //check update or delete \n for (User user : users) {\n boolean isDeleted = true;\n for (LdapUser ldapUser : ldapUsers) {\n if (user.getUserID().equals(ldapUser.getUserID())) {\n // is updateours\n user.setFirstName(ldapUser.getFirstName());\n user.setLastName(ldapUser.getLastName());\n user.setUpdatedAt(Utils.getCurrentTime());\n user.setEmail(ldapUser.getMail().trim());\n user.setJobTitle(ldapUser.getTitle() == null ? DEFAULT_JOB_TITLE : ldapUser.getTitle());\n user.setPhoneNumber(ldapUser.getTelephonNumber());\n user.setOfficeLocation(ldapUser.getOfficeLocation());\n \n String managerId = ldapUser.getManagerUser();\n User manager = getUserFromListByUserID(users, managerId);\n user.setManagerId(manager == null ? 0 : manager.getId());\n \n //This code will be lock till deploy the real LDAP have 2 properties are \"department\" and \"userAccountControl\"\n /*user.setActive(ldapUser.getUserAccountControl() == 514 ? (byte) 0 : (byte) 1);*/\n Department department = departmentRepository.getDepartmentByName(ldapUser.getDepartment());\n checkChangeDepartment(user, department, listUserIdRemoveAM);\n \n userRepository.editUser(user);\n \n isDeleted = false;\n break;\n }\n }\n if (isDeleted) {\n user.setIsDeleted((byte) 1);\n user.setActive((byte) 0);\n userRepository.editUser(user);\n }\n }\n\n //check new user\n for (LdapUser ldapUser : ldapUsers) {\n boolean isNew = true;\n for(User user : users){\n if(ldapUser.getUserID().equals(user.getUserID())){\n isNew = false;\n break;\n }\n }\n if(isNew){\n logger.debug(\"Is new User userID = \"+ldapUser.getUserID());\n User user = new User();\n user.setUserID(ldapUser.getUserID());\n user.setStaffCode(ldapUser.getUserID());\n user.setFirstName(ldapUser.getFirstName());\n user.setLastName(ldapUser.getLastName());\n user.setCreatedAt(Utils.getCurrentTime());\n user.setUpdatedAt(Utils.getCurrentTime());\n user.setEmail(ldapUser.getMail().trim());\n user.setJobTitle(ldapUser.getTitle() == null ? DEFAULT_JOB_TITLE : ldapUser.getTitle());\n user.setPhoneNumber(ldapUser.getTelephonNumber());\n user.setActive((byte) 1);\n user.setIsDeleted((byte) 0);\n user.setOfficeLocation(ldapUser.getOfficeLocation());\n user.setRoleId(4);\n user.setApprovalManagerId(0);;\n \n String managerId = ldapUser.getManagerUser();\n User manager = getUserFromListByUserID(users, managerId);\n user.setManagerId(manager == null ? 0 : manager.getId());\n\n //This code will be lock till deploy the real LDAP have 2 properties are \"department\" and \"userAccountControl\"\n Department department = departmentRepository.getDepartmentByName(ldapUser.getDepartment());\n user.setDepartmentId(department == null ? 0 : department.getId());\n \n /*user.setActive(ldapUser.getUserAccountControl() == 514 ? (byte) 0 : (byte) 1);*/\n \n userRepository.addUser(user);\n logger.debug(\"Is new User id = \"+user.getId());\n }\n }\n \n //Remove AprovalManager out User\n for(Integer userId : listUserIdRemoveAM){\n if(userId == null) continue;\n User userRemoveAMId = userRepository.getUserById(userId);\n userRemoveAMId.setApprovalManagerId(0);\n userRepository.editUser(userRemoveAMId);\n }\n }", "@Test\n public void testBatchMerge() throws Exception {\n final int BATCH_SIZE = 7;\n try (Connection con = GridCacheDynamicLoadOnClientTest.connect(GridCacheDynamicLoadOnClientTest.clientNode);Statement stmt = con.createStatement()) {\n for (int idx = 0, i = 0; i < BATCH_SIZE; ++i , idx += i) {\n stmt.addBatch((((((((((((\"merge into \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (_key, name, orgId) values (\") + (100 + idx)) + \",\") + \"'\") + \"batch-\") + idx) + \"'\") + \",\") + idx) + \")\"));\n }\n int[] updCnts = stmt.executeBatch();\n assertEquals(\"Invalid update counts size\", BATCH_SIZE, updCnts.length);\n }\n }", "@Test(expected=OptimisticLockException.class)\n\tpublic void testColisaoLockOtimista(){\n\t\tArtista artista = doWithSession( session -> {\n\t\t\t\n\t\t\tArtista roberto = session.createNamedQuery(\"findByNome\", Artista.class)\n\t\t\t\t\t.setParameter(\"nome\", \"Roberto Carlos\")\n\t\t\t\t\t.getSingleResult(); \n\t\t\treturn roberto;\n\t\t});\n\t\t\n\t\t// Lido e escrito pelo User B\n\t\tdoInTransaction( session -> {\n\n\t\t\tArtista roberto = session.createNamedQuery(\"findByNome\", Artista.class)\n\t\t\t\t\t.setParameter(\"nome\", \"Roberto Carlos\")\n\t\t\t\t\t.getSingleResult(); \n\t\t\troberto.getDetalhes().setBiografia(\"Biografia alterada...\");\n\t\t\tsession.update(roberto);\n\t\t});\n\t\t\n\t\t// Escrito pelo User A // javax.persistence.OptimisticLockException: -> org.hibernate.StaleStateException:\n\t\tdoInTransaction( session -> {\n\t\t\tartista.getDetalhes().setBiografia(\"Conlisão!!!\");\n\t\t\tsession.update(artista);\n\t\t});\n\t}", "@Test\n public void testConsumerAccessExceptionDuringBatchRun() throws ExecutionException, InterruptedException {\n List<Chunk> chunkList = new ArrayList<>();\n //generate chunks\n int numOfChunksToUpload = 1000;\n while (numOfChunksToUpload > 0) {\n chunkList.add(generateChunk(10));\n numOfChunksToUpload--;\n }\n\n //Start a producer thread\n ExecutorService executorService = Executors.newFixedThreadPool(2);\n ProducerThread producerThread = new ProducerThread(\"Producer1\", chunkList, 20, new ApplicationService());\n Future<String> producerResult = executorService.submit(producerThread);\n //Wait for batch run to start\n Thread.sleep(10);\n //Start a consumer thread in parallel\n Future<String> result = executorService.submit(new ConsumerThread(\"Consumer1\", 1, new ApplicationService()));\n //Consumer threads gets null value of instrument id price\n assertNull(result.get());\n log.info(\"Producer result:\" + producerResult.get());\n\n }", "@Test\n public void test2() {\n MPCS_52011.setStudentCount(60); // Set the course as full for testing purposes.\n CourseAdd Course_Adder = new CourseAdd(MPCS_52011,Sophia,con);\n int updates = Course_Adder.getState().addStudent(Course_Adder,MPCS_52011,Sophia);\n assertEquals(1,updates); // Assert that an update was made\n assertTrue(MPCS_52011.getWaitingList().contains(Sophia)); // Check if Sophia present in waitlist\n List<Integer> StudentIDs = new ArrayList<Integer>();\n try{ // Check Database\n Statement stmt=con.createStatement();\n ResultSet rs=stmt.executeQuery(\"select StudentID from Waitlisted_Students where course_code = '\" + MPCS_52011.getcode() + \"';\");\n while(rs.next()){\n StudentIDs.add(rs.getInt(1)); // Add each student ID from database\n }\n }catch (Exception e){\n System.out.println(e);\n }\n assertTrue(StudentIDs.contains(Sophia.getID())); // Check is Sophia present in waitlist\n }", "@Test\n public void test_access_to_modify_team_success() {\n try {\n Assert.assertTrue(authBO.hasAccessToModifyTeam(1, 1));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "@Test\n\tpublic void testProcessInventoryUpdateOrderPlaced() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproductSku.setProduct(product);\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tallowing(beanFactory).getBean(INVENTORY_JOURNAL);\n\t\t\t\twill(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, WAREHOUSE_UID,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\n\t\t// WE SHALL CHECK THE RESULT FROM processInventoryUpdate()\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(inventoryDto.getQuantityOnHand(), QUANTITY_ONHAND);\n\t\tassertEquals(inventoryDto.getAvailableQuantityInStock(), QUANTITY_ONHAND - QUANTITY_10);\n\t\tassertEquals(inventoryDto.getAllocatedQuantity(), QUANTITY_10);\n\t}", "@Test\n public void testSplitRoomReservationReportJob() throws Exception {\n Job allocJob = new AllocationScraperJob();\n allocJob.setStatus( JobStatus.completed );\n dao.insertJob( allocJob );\n\n // setup a job to find all bookings spanning different rooms\n Job j = new SplitRoomReservationReportJob();\n j.setStatus( JobStatus.submitted );\n j.setParameter( \"allocation_scraper_job_id\", String.valueOf( allocJob.getId() ) );\n int jobId = dao.insertJob( j );\n\n // this should now run the job\n processorService.processJobs();\n\n // verify that the job completed successfully\n Job jobVerify = dao.fetchJobById( jobId );\n Assert.assertEquals( JobStatus.completed, jobVerify.getStatus() );\n }", "@Test\n public void testDataMix()\n throws InterruptedException {\n\n createGroup(2);\n\n ReplicatedEnvironment menv = repEnvInfo[0].getEnv();\n TransactionConfig txnConfig = RepTestUtils.WNSYNC_NONE_TC;\n Transaction txn = menv.beginTransaction(null, txnConfig);\n Database db = menv.openDatabase(txn, \"mixed\", dbconfig);\n txn.commit();\n txn = null;\n RepTestUtils.syncGroup(repEnvInfo);\n\n repEnvInfo[1].closeEnv();\n assertEquals(menv.getState(), State.MASTER);\n\n final int batchBuffSize =\n Integer.parseInt(RepParams.FEEDER_BATCH_BUFF_KB.getDefault()) *\n 1024;\n\n txn = menv.beginTransaction(null, txnConfig);\n\n /*\n * Generate a log pattern with an intervening large object that serves\n * to break up a batch.\n */\n for (int size : new int[] { 1, 2, /* batch 1 */\n batchBuffSize + 1, /* break the batch */\n 3, 4 /* batch 2 */\n }) {\n IntegerBinding.intToEntry(size, key);\n data.setData(new byte[size]);\n db.put(txn, key, data);\n }\n txn.commit();\n db.close();\n\n\n ReplicatedEnvironmentStats stats =\n menv.getRepStats(StatsConfig.CLEAR);\n\n repEnvInfo[1].openEnv();\n final VLSN vlsn = RepTestUtils.syncGroup(repEnvInfo);\n\n stats = menv.getRepStats(null);\n\n /*\n * Seven total messages: 1 unconditional startup heartbeat +\n * 5 puts + 1 commit\n */\n assertEquals(7, stats.getNProtocolMessagesWritten());\n\n /* 4 puts + 1 commit batched. */\n assertEquals(5, stats.getNProtocolMessagesBatched());\n\n /* 2 batches as above. */\n assertEquals(2, stats.getNProtocolMessageBatches());\n\n RepTestUtils.checkNodeEquality(vlsn, false, repEnvInfo);\n }", "@Override\n\tpublic boolean merge(final List<Partner> partners) {\n\t\tboolean result = true;\n\t\tresult = this.transactionTemplate.execute(new TransactionCallback<Boolean>() {\n\n\t\t\t@Override\n\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\n\t\t\t\tboolean result = true;\n\t\t\t\ttry{\n\t\t\t\t\t//step 1: batch delete related data\n\t\t\t\t\tString delete = \"DELETE FROM PARTNER WHERE PART_ID = :partId\";\n\t\t\t\t\tSqlParameterSource[] batch = SqlParameterSourceUtils.createBatch(partners.toArray());\n\t\t\t\t\tnamedParameterJdbcTemplate.batchUpdate(delete, batch);\n\t\t\t\t\t\n\t\t\t\t\t//step 2: batch insert sync data\n\t\t\t\t\tString insert = \"INSERT INTO PARTNER(NAME) VALUES(:fullName)\";\n\t\t\t\t\tnamedParameterJdbcTemplate.batchUpdate(insert, batch);\n\t\t\t\t}catch(Exception ex){\n\t\t\t\t\tstatus.setRollbackOnly();\n\t\t\t\t\tresult = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\t});\n\t\treturn result;\n\t}", "@Test\n public void successScenarioTest() throws ExecutionException, InterruptedException {\n List<Chunk> chunkList = new ArrayList<>();\n //generate 5 chunks of 10 records each\n int numOfChunksToUpload = 5;\n while (numOfChunksToUpload > 0) {\n chunkList.add(generateChunk(10));\n numOfChunksToUpload--;\n }\n\n //Calculate expected result\n Map<String, Record> expectedPriceList = new HashMap<>();\n String expectedPrice;\n chunkList.forEach((chunk) -> {\n Map<String, List<Record>> groupedRecords = chunk.getData().stream().collect(Collectors.groupingBy(Record::getId));\n groupedRecords.forEach((s, l) -> {\n l.sort(recordComparator);\n Record latestRecord = l.get(0);\n expectedPriceList.put(latestRecord.getId(), latestRecord);\n\n });\n\n });\n expectedPrice = String.valueOf(expectedPriceList.get(\"7\").getPayload().get(\"Price\"));\n log.debug(\"Expected latest price: \" + expectedPrice);\n\n //InstrumentId 7 is to be accessed by consumer thread\n int instrumentId = 7;\n log.info(\"Latest price to be accessed for : \" + instrumentId);\n ExecutorService executorService = Executors.newFixedThreadPool(2);\n ProducerThread producerThread = new ProducerThread(\"Producer1\", chunkList, 20, new ApplicationService());\n ConsumerThread consumerThread = new ConsumerThread(\"Consumer1\", instrumentId, new ApplicationService());\n\n Future<String> producerResult = executorService.submit(producerThread);\n //Wait for producer thread to complete\n while (true) {\n if (producerResult.isDone())\n break;\n }\n\n //Check if the producer thread is complete successfully\n if (ProducerConstants.BATCH_COMPLETION_MESSAGE.equals(producerResult.get())) {\n Future<String> consumerResult = executorService.submit(consumerThread);\n while (true) {\n if (consumerResult.isDone())\n break;\n }\n String str = consumerResult.get();\n //Check if the expected and actual price is same\n assertEquals(0, Double.compare(Double.parseDouble(expectedPrice), Double.parseDouble(str)));\n } else {\n //If producer fails to complete batch run, then fail the test case\n Assert.fail();\n }\n\n\n executorService.shutdown();\n\n\n }", "@Test\n public void writeTryLockFailedTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n int threadNum = 2;\n final CountDownLatch countDownLatch = new CountDownLatch(threadNum);\n for (int i = 0; i < threadNum; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n testUse.minusCountAndSleepInWriteTryLock(2000);\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n boolean result = false;\n if (testUse.count == 1000 || testUse.count == 999) {\n result = true;\n }\n Assert.assertTrue(result);\n }", "@Test\n void joinQuiz() throws Exception {\n int oldCount = quizService.findById(1L).getParticipants().size();\n quizService.JoinQuiz(\"mahnaemehjeff\", \"S3NDB0BSANDV4G3N3\");\n int newCount = quizService.findById(1L).getParticipants().size();\n\n assertNotEquals(oldCount, newCount);\n }", "@Test\n public void testDeleteUserWhenOnlyUserInGroup4() throws Exception {\n /*\n * This test has the following setup:\n * - Step 1: user B\n * - Step 2: user C\n * - Step 3: user B\n *\n * This test will perform the following checks:\n * - create a workspace item, and let it move to step 1\n * - approve it by user B, and let it move to step 2\n * - approve it by user C, and let it move to step 3\n * - claim it by user B\n * - remove user B from step 1\n * - delete user B\n * - verify the delete is refused\n * - remove user B from step 3, verify that the removal is refused due to user B having a claimed task and there\n * being no other members in step 3\n * - approve it by user B\n * - delete user B\n * - verify the delete suceeds\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .withWorkflowGroup(2, workflowUserC)\n .withWorkflowGroup(3, workflowUserB)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n\n assertDeletionOfEperson(workflowUserB, false);\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collection, REVIEW_ROLE, true);\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collection, FINAL_EDIT_ROLE, false);\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collection, FINAL_EDIT_ROLE, true);\n assertDeletionOfEperson(workflowUserB, true);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }", "@Test\n public void testDeleteUserWhenOnlyUserInGroup5() throws Exception {\n /*\n * This test has the following setup:\n * - Collection A - Step 1: user B\n * - Collection A - Step 2: user C\n * - Collection A - Step 3: user B\n *\n * - Collection B - Step 1: user B\n *\n * This test will perform the following checks:\n * - create a workspace item in Collection A, and let it move to step 1\n * - claim it by user B\n * - delete user B\n * - verify the delete is refused\n * - remove user B from Col A - step 3\n * - remove user B from Col B - step 1\n * - remove user B from Col A - step 1\n * - Verify that the removal from Col A - step 1 is refused because user B has a claimed task in that\n * collection and no other user is present\n * - approve it by user B, and let it move to step 2\n * - remove user B from Col A - step 1\n * - verify it succeeds\n * - delete user B\n * - verify it succeeds\n * - approve it by user C\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collectionA = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .withWorkflowGroup(2, workflowUserC)\n .withWorkflowGroup(3, workflowUserB)\n .build();\n\n Collection collectionB = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collectionA)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collectionA);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collectionA, FINAL_EDIT_ROLE, true);\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collectionB, REVIEW_ROLE, true);\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collectionA, REVIEW_ROLE, false);\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n assertRemovalOfEpersonFromWorkflowGroup(workflowUserB, collectionA, REVIEW_ROLE, true);\n assertDeletionOfEperson(workflowUserB, true);\n\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }", "@Test\n public void testDeleteUserWhenOnlyUserInGroup6() throws Exception {\n /*\n * This test has the following setup:\n * - Submitter: user A\n * - Step 1: user B\n * - Step 2: user C\n * - Step 3: user B\n *\n * - create a workspace item, and let it move to step 1\n * - delete the submitter\n * - verify it succeeds\n * - Approve it by user B\n * - verify that the item moved to step 2\n * - Approve it by user C\n * - verify that the item moved to step 3\n * - Approve it by user B\n * - verify that the item is archived\n */\n context.turnOffAuthorisationSystem();\n\n Community parent = CommunityBuilder.createCommunity(context).build();\n Collection collection = CollectionBuilder.createCollection(context, parent)\n .withWorkflowGroup(1, workflowUserB)\n .withWorkflowGroup(2, workflowUserC)\n .withWorkflowGroup(3, workflowUserB)\n .build();\n\n WorkspaceItem wsi = WorkspaceItemBuilder.createWorkspaceItem(context, collection)\n .withSubmitter(workflowUserA)\n .withTitle(\"Test item full workflow\")\n .withIssueDate(\"2019-03-06\")\n .withSubject(\"ExtraEntry\")\n .build();\n\n Workflow workflow = XmlWorkflowServiceFactory.getInstance().getWorkflowFactory().getWorkflow(collection);\n\n XmlWorkflowItem workflowItem = xmlWorkflowService.startWithoutNotify(context, wsi);\n MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();\n httpServletRequest.setParameter(\"submit_approve\", \"submit_approve\");\n\n assertDeletionOfEperson(workflowUserA, true);\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, REVIEW_STEP, REVIEW_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserC, workflow, workflowItem, EDIT_STEP, EDIT_ACTION);\n\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP, CLAIM_ACTION);\n executeWorkflowAction(httpServletRequest, workflowUserB, workflow, workflowItem, FINAL_EDIT_STEP,\n FINAL_EDIT_ACTION);\n\n assertTrue(workflowItem.getItem().isArchived());\n\n }", "@Test\n public void shouldJoinOnlyIfMatchFoundOnStreamUpdates() {\n pushToTable(2, \"Y\");\n processor.checkAndClearProcessResult(EMPTY);\n\n // push all four items to the primary stream. this should produce two items.\n pushToStream(4, \"X\");\n processor.checkAndClearProcessResult(new KeyValueTimestamp<>(0, \"X0+Y0\", 0),\n new KeyValueTimestamp<>(1, \"X1+Y1\", 1));\n }", "private boolean checkLock(UndoLog log) {\n LogData entry = log.getData();\n ByteBuffer bb = entry.getData();\n bb.mark();\n short rowid = bb.getShort();\n bb.reset();\n int loc = dir.loc(rowid);\n long holder = RowHeader.getLockHolder(pageBuffer, loc);\n return holder == log.getTransID();\n }", "interface WithOwners {\n /**\n * Specifies the owners property: The owners of the lock..\n *\n * @param owners The owners of the lock.\n * @return the next definition stage.\n */\n Update withOwners(List<ManagementLockOwner> owners);\n }", "@Test\n public void testStopSendingEditsWhenOutOfSync() throws Exception {\n Mockito.doThrow(new IOException(\"injected error\"))\n .when(mockProxy).journal(\n Mockito.<RequestInfo>any(),\n Mockito.eq(1L), Mockito.eq(1L),\n Mockito.eq(1), Mockito.same(FAKE_DATA));\n\n try {\n ch.sendEdits(1L, 1L, 1, FAKE_DATA).get();\n fail(\"Injected JOOSE did not cause sendEdits() to throw\");\n } catch (ExecutionException ee) {\n GenericTestUtils.assertExceptionContains(\"injected\", ee);\n }\n Mockito.verify(mockProxy).journal(\n Mockito.<RequestInfo>any(),\n Mockito.eq(1L), Mockito.eq(1L),\n Mockito.eq(1), Mockito.same(FAKE_DATA));\n\n assertTrue(ch.isOutOfSync());\n \n try {\n ch.sendEdits(1L, 2L, 1, FAKE_DATA).get();\n fail(\"sendEdits() should throw until next roll\");\n } catch (ExecutionException ee) {\n GenericTestUtils.assertExceptionContains(\"disabled until next roll\",\n ee.getCause());\n }\n \n // It should have failed without even sending the edits, since it was not sync.\n Mockito.verify(mockProxy, Mockito.never()).journal(\n Mockito.<RequestInfo>any(),\n Mockito.eq(1L), Mockito.eq(2L),\n Mockito.eq(1), Mockito.same(FAKE_DATA));\n // It should have sent a heartbeat instead.\n Mockito.verify(mockProxy).heartbeat(\n Mockito.<RequestInfo>any());\n \n // After a roll, sending new edits should not fail.\n ch.startLogSegment(3L, NameNodeLayoutVersion.CURRENT_LAYOUT_VERSION).get();\n assertFalse(ch.isOutOfSync());\n\n ch.sendEdits(3L, 3L, 1, FAKE_DATA).get();\n }", "public void testBatchUpdate() {\n template.getJdbcOperations().batchUpdate(new String[]{websource.method2()});\n\n //Test SimpleJdbcOperations execute\n template.getJdbcOperations().execute(websource.method2());\n }", "private void updateMultipleAndAssertUpdateSuccess(long[] dataIds) {\n String[] ids = new String[dataIds.length];\n for (int i = 0; i < dataIds.length; i++) {\n ids[i] = String.valueOf(dataIds[i]);\n }\n Uri uri = DataUsageFeedback.FEEDBACK_URI.buildUpon().appendPath(TextUtils.join(\",\", ids))\n .appendQueryParameter(DataUsageFeedback.USAGE_TYPE,\n DataUsageFeedback.USAGE_TYPE_CALL).build();\n int result = mResolver.update(uri, new ContentValues(), null, null);\n assertTrue(result > 0);\n }", "@Test\n public void testDeletionWithExpiredAndValidLocks() throws BackendException {\n\n final int lockCount = 10;\n final int expiredCount = 3;\n assertTrue(expiredCount + 2 <= lockCount);\n final long timeIncr = 1L;\n final long timeStart = 0L;\n final long timeCutoff = timeStart + (expiredCount * timeIncr);\n\n ImmutableList.Builder<Entry> locksBuilder = ImmutableList.builder();\n ImmutableList.Builder<Entry> delsBuilder = ImmutableList.builder();\n\n for (int i = 0; i < lockCount; i++) {\n final long ts = timeStart + (timeIncr * i);\n Entry lock = StaticArrayEntry.of(\n codec.toLockCol(ts, defaultLockRid),\n BufferUtil.getIntBuffer(0));\n\n if (ts < timeCutoff) {\n delsBuilder.add(lock);\n }\n\n locksBuilder.add(lock);\n }\n\n EntryList locks = StaticArrayEntryList.of(locksBuilder.build());\n EntryList dels = StaticArrayEntryList.of(delsBuilder.build());\n assertTrue(expiredCount == dels.size());\n\n del = new StandardLockCleanerRunnable(store, kc, tx, codec, timeCutoff);\n\n expect(store.getSlice(eq(ksq), eq(tx))).andReturn(locks);\n\n store.mutate(\n eq(key),\n eq(ImmutableList.<Entry> of()),\n eq(columnsOf(dels)),\n anyObject(StoreTransaction.class));\n\n ctrl.replay();\n del.run();\n }", "@Test\n\tpublic void testScenario3() {\n\t\tSystem.out.println(\"----------Running Recovery Scenario 3----------\");\n\t\t// Creating a Block.\n\t\tBlock blk1 = new Block(\"filename\", 1);\n\t\tBlock blk2 = new Block(\"filename\", 2);\n\n\t\t// Create a RecoveryManager\n\t\tint txid = 123;\n\t\tint txid2 = 143;\n\t\tRecoveryMgr rm = new RecoveryMgr(txid);\n\t\tRecoveryMgr rm2 = new RecoveryMgr(txid2);\n\n\t\t// Sample setInt\n\t\tBufferMgr basicBufferMgr = new SimpleDB().bufferMgr();\n\t\tBuffer buff = basicBufferMgr.pin(blk1);\n\t\tBuffer buff2 = basicBufferMgr.pin(blk2);\n\t\tint offset = 8;\n\t\tint offset2 = 16;\n\t\tint oldValue = buff.getInt(offset);\n\t\tint oldValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"Old Value: \" + oldValue);\n\t\tSystem.out.println(\"Old Value2: \" + oldValue2);\n\t\tint valueToSet = oldValue + 10;\n\t\tint valueToSet2 = oldValue2 + 20;\n\t\tint lsn = rm.setInt(buff, offset, valueToSet);\n\t\tbuff.setInt(offset, valueToSet, txid, lsn);\n\t\tint lsn2 = rm2.setInt(buff2, offset2, valueToSet2);\n\t\tbuff2.setInt(offset2, valueToSet2, txid2, lsn2);\n\t\tint newValue = buff.getInt(offset);\n\t\tSystem.out.println(\"New Value without committing: \" + newValue);\n\t\tint newValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"New Value2 without committing: \" + newValue2);\n\n\t\trm2.recover();\n\t\tnewValue = buff.getInt(offset);\n\t\tnewValue2 = buff2.getInt(offset2);\n\t\tSystem.out.println(\"New Value after recovering: \" + newValue);\n\t\tSystem.out.println(\"New Value2 after recovering: \" + newValue2);\n\t\tAssert.assertEquals(oldValue, newValue);\n\t\tAssert.assertEquals(oldValue2, newValue2);\n\t\tSystem.out.println(\"----------Recovery Scenario 3 Run Complete----------\");\n\t}", "@Test\n public void testGroupModification() {\n app.getNavigationHelper().gotoGroupPage();\n\n if (! app.getGroupHelper().isThereAGroup()) {//якщо не існує ні одної групи\n app.getGroupHelper().createGroup(new CreateGroupData(\"Tol-AutoCreate\", \"Tol-AutoCreate\", null));\n }\n\n //int before = app.getGroupHelper().getGroupCount(); //count groups before test\n List<CreateGroupData> before = app.getGroupHelper().getGroupList(); // quantity of group before creation\n app.getGroupHelper().selectGroup(before.size() - 1);\n app.getGroupHelper().initGroupModification();\n CreateGroupData group = new CreateGroupData(before.get(before.size()-1).getId(),\"Change1-name\", \"Change2-header\", \"Change3-footer\");\n app.getGroupHelper().fillGroupData(group);\n app.getGroupHelper().submitGroupModification();\n app.getGroupHelper().returnToGroupPage();\n //int after = app.getGroupHelper().getGroupCount();\n List<CreateGroupData> after = app.getGroupHelper().getGroupList(); // quantity of group after creation\n //Assert.assertEquals(after, before);\n Assert.assertEquals(after.size(), before.size());\n\n before.remove(before.size() - 1);\n before.add(group); //add object to the list after creation/modification of a group\n Assert.assertEquals(new HashSet<>(before), new HashSet<>(after)); //compare two lists без учета порядка\n }", "@Test\n public void testIsWithinEJQuotaLocked_TempAllowlisting() {\n setDischarging();\n JobStatus js = createExpeditedJobStatus(\"testIsWithinEJQuotaLocked_TempAllowlisting\", 1);\n setStandbyBucket(FREQUENT_INDEX, js);\n setDeviceConfigLong(QcConstants.KEY_EJ_LIMIT_FREQUENT_MS, 10 * MINUTE_IN_MILLIS);\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (HOUR_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5), true);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (30 * MINUTE_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5), true);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (5 * MINUTE_IN_MILLIS), 4 * MINUTE_IN_MILLIS, 5), true);\n synchronized (mQuotaController.mLock) {\n assertFalse(mQuotaController.isWithinEJQuotaLocked(js));\n }\n\n setProcessState(ActivityManager.PROCESS_STATE_RECEIVER);\n final long gracePeriodMs = 15 * SECOND_IN_MILLIS;\n setDeviceConfigLong(QcConstants.KEY_EJ_GRACE_PERIOD_TEMP_ALLOWLIST_MS, gracePeriodMs);\n Handler handler = mQuotaController.getHandler();\n spyOn(handler);\n\n // Apps on the temp allowlist should be able to schedule & start EJs, even if they're out\n // of quota (as long as they are in the temp allowlist grace period).\n mTempAllowlistListener.onAppAdded(mSourceUid);\n synchronized (mQuotaController.mLock) {\n assertTrue(mQuotaController.isWithinEJQuotaLocked(js));\n }\n advanceElapsedClock(10 * SECOND_IN_MILLIS);\n mTempAllowlistListener.onAppRemoved(mSourceUid);\n advanceElapsedClock(10 * SECOND_IN_MILLIS);\n // Still in grace period\n synchronized (mQuotaController.mLock) {\n assertTrue(mQuotaController.isWithinEJQuotaLocked(js));\n }\n advanceElapsedClock(6 * SECOND_IN_MILLIS);\n // Out of grace period.\n synchronized (mQuotaController.mLock) {\n assertFalse(mQuotaController.isWithinEJQuotaLocked(js));\n }\n }", "@Test\n public void testMultipleBlocks()\n {\n long blockSize = 1000;\n int noOfBlocks = (int)((testMeta.dataFile.length() / blockSize)\n + (((testMeta.dataFile.length() % blockSize) == 0) ? 0 : 1));\n\n testMeta.blockReader.beginWindow(1);\n\n for (int i = 0; i < noOfBlocks; i++) {\n BlockMetadata.FileBlockMetadata blockMetadata = new BlockMetadata.FileBlockMetadata(s3Directory + FILE_1, i,\n i * blockSize, i == noOfBlocks - 1 ? testMeta.dataFile.length() : (i + 1) * blockSize, i == noOfBlocks - 1,\n i - 1, testMeta.dataFile.length());\n testMeta.blockReader.blocksMetadataInput.process(blockMetadata);\n }\n\n testMeta.blockReader.endWindow();\n\n List<Object> messages = testMeta.messageSink.collectedTuples;\n Assert.assertEquals(\"No of records\", testMeta.messages.size(), messages.size());\n for (int i = 0; i < messages.size(); i++) {\n\n byte[] msg = (byte[])messages.get(i);\n Assert.assertTrue(\"line \" + i, Arrays.equals(new String(msg).split(\",\"), testMeta.messages.get(i)));\n }\n }", "@Test(priority=2,description=\"check Plocked users\")\npublic void test2() throws Throwable \n{\n\ttry {\n\t\tlogin.UserInfo = driver.LocateById(login.logoutDivID);\n\t\t}catch(Exception e) {\n\t\tReporter.log(\"Can't login\");\n\t\tAssert.assertTrue(false);\n\t\t}\n\t\tact = builder.moveToElement(login.UserInfo).click().build();\n\t\tact.perform();\n\t\ttry {\n\t\tlogin.profileBTN = driver.LocateByXpath(\"//*[@id='loggedbutton']//following-sibling::ul/li[2]\");\n\t\t}catch(Exception e) {\n\t\tReporter.log(\"Can't find setting btn\");\n\t\tAssert.assertTrue(false);\n\t\t}\n\t\tact = builder.moveToElement(login.profileBTN).click().build();\n\t\tact.perform();\n\t\tThread.sleep(1000);\t\t\t\t\t\t\t\t// open profile\n\ttry {\n\t\tProfPage.blockBTN = driver.LocateById(ProfPage.blockBTNid);\n\t\t}catch(Exception e) {\n\t\tReporter.log(\"Can't login\");\n\t\tAssert.assertTrue(false);\n\t\t}\n\t\tact = builder.moveToElement(ProfPage.blockBTN).click().build();\n\t\tact.perform();\n\t\tboolean getUser=false;\n\t\tList<WebElement> BlockedUsersList = driver.driver.findElements(By.xpath(\"//*[@id='box']//p\"));\n\t int x =BlockedUsersList.size();\n\t for(int i=0;i<x;i++)\n\t {\n\t \tReporter.log(BlockedUsersList.get(i).getText());\n\t \tif (BlockedUsersList.get(i).getText().equals(\"sayed\"))\n\t \t{\n\t \t\tgetUser=true;\n\t \t}\n\t \t\n\t }\n\t assertTrue(getUser);\n\t\t\n}", "@Test\n public void testUpdateCheckpointBadConcurrencyToken() throws LeasingException {\n TestHarnessBuilder builder = new TestHarnessBuilder();\n builder.withLease(leaseKey, null).build();\n\n coordinator.runLeaseTaker();\n coordinator.runLeaseRenewer();\n Lease lease = coordinator.getCurrentlyHeldLease(leaseKey);\n\n assertNotNull(lease);\n\n ExtendedSequenceNumber newCheckpoint = new ExtendedSequenceNumber(\"newCheckpoint\");\n assertFalse(dynamoDBCheckpointer.setCheckpoint(lease.leaseKey(), newCheckpoint, UUID.randomUUID()));\n\n Lease fromDynamo = leaseRefresher.getLease(lease.leaseKey());\n\n // Owner should be the only thing that changed.\n lease.leaseOwner(coordinator.workerIdentifier());\n assertEquals(lease, fromDynamo);\n }", "@Test\n\tpublic void testExecutes() throws java.rmi.AlreadyBoundException\n\t{\n\t\tClientPlayerManager pm = ClientPlayerManager.getSingleton();\n\t\tPlayersForTest john = PlayersForTest.JOHN;\n\t\tpm.initiateLogin(john.getPlayerName(), john.getPlayerPassword());\n\n\t\ttry\n\t\t{\n\t\t\tpm.finishLogin(john.getPlayerID());\n\t\t} catch (AlreadyBoundException | NotBoundException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Could not create this client's player from login\");\n\t\t}\n\n\t\tArrayList<ClientPlayerQuestState> quests = new ArrayList<ClientPlayerQuestState>();\n\t\tClientPlayerQuestState q = new ClientPlayerQuestState(42, \"title\",\n\t\t\t\t\"silly\", QuestStateEnum.AVAILABLE, 42, 4, false, null);\n\t\tquests.add(q);\n\t\tLevelRecord level = new LevelRecord(\"One\", 15, 0, 0);\n\t\tint knowledgePoints = 100;\n\n\t\tCommandKnowledgePointsChanged x = new CommandKnowledgePointsChanged(\n\t\t\t\tnew InitializeThisClientsPlayerMessage(quests, 0, knowledgePoints, level));\n\t\tx.execute();\n\n\t\tThisClientsPlayer player = ClientPlayerManager.getSingleton().getThisClientsPlayer();\n\t\tassertEquals(knowledgePoints , player.getKnowledgePoints());\n\t}", "private void notifyAllUnlockedUsers() {\n LinkedList<Integer> users = new LinkedList<>();\r\n synchronized (mLock) {\r\n for (Map.Entry<Integer, Boolean> entry : mUserUnlockedStatus.entrySet()) {\r\n if (entry.getValue()) {\r\n users.add(entry.getKey());\r\n }\r\n }\r\n }\r\n if (DBG) {\r\n Slog.d(TAG, \"notifyAllUnlockedUsers:\" + users);\r\n }\r\n for (Integer i : users) {\r\n sendSetUserLockStatusBinderCall(i, true);\r\n }\r\n }", "@Test\n public void testEJTimerTracking_Discharging() {\n setDischarging();\n setProcessState(ActivityManager.PROCESS_STATE_BACKUP);\n\n JobStatus jobStatus = createExpeditedJobStatus(\"testEJTimerTracking_Discharging\", 1);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(jobStatus, null);\n }\n\n assertNull(mQuotaController.getEJTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE));\n\n List<TimingSession> expected = new ArrayList<>();\n\n long start = JobSchedulerService.sElapsedRealtimeClock.millis();\n synchronized (mQuotaController.mLock) {\n mQuotaController.prepareForExecutionLocked(jobStatus);\n }\n advanceElapsedClock(5 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStopTrackingJobLocked(jobStatus, null, false);\n }\n expected.add(createTimingSession(start, 5 * SECOND_IN_MILLIS, 1));\n assertEquals(expected,\n mQuotaController.getEJTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE));\n\n // Test overlapping jobs.\n JobStatus jobStatus2 = createExpeditedJobStatus(\"testEJTimerTracking_Discharging\", 2);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(jobStatus2, null);\n }\n\n JobStatus jobStatus3 = createExpeditedJobStatus(\"testEJTimerTracking_Discharging\", 3);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(jobStatus3, null);\n }\n\n advanceElapsedClock(SECOND_IN_MILLIS);\n\n start = JobSchedulerService.sElapsedRealtimeClock.millis();\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(jobStatus, null);\n mQuotaController.prepareForExecutionLocked(jobStatus);\n }\n advanceElapsedClock(10 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.prepareForExecutionLocked(jobStatus2);\n }\n advanceElapsedClock(10 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStopTrackingJobLocked(jobStatus, null, false);\n }\n advanceElapsedClock(10 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.prepareForExecutionLocked(jobStatus3);\n }\n advanceElapsedClock(20 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStopTrackingJobLocked(jobStatus3, null, false);\n }\n advanceElapsedClock(10 * SECOND_IN_MILLIS);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStopTrackingJobLocked(jobStatus2, null, false);\n }\n expected.add(createTimingSession(start, MINUTE_IN_MILLIS, 3));\n assertEquals(expected,\n mQuotaController.getEJTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE));\n }", "@Test\n @Ignore(\"This is only applicable to Neo4j 2.0.0-M03 and below where transactions \" +\n \"were not mandatory for reading\")\n public void defaultReadingIsReadCommitted() throws Exception {\n assertNameAndAgeViaLookup(john.getId(), \"John\", 34, \"John\");\n\n // Do the update in a separate Thread and ensure its actually updated\n doUpdateInSeparateThread(new PersonUpdater(\"John\", 44));\n\n // Now, back in our thread, ensure we read the commited value\n assertNameAndAgeViaLookup(john.getId(), \"John\", 44, \"John\");\n }" ]
[ "0.59308535", "0.5820273", "0.5756388", "0.5662491", "0.5633997", "0.5585301", "0.55777454", "0.55528116", "0.54999596", "0.54809433", "0.54615533", "0.5437349", "0.5294243", "0.529269", "0.5291293", "0.5285004", "0.52546626", "0.5219582", "0.51851404", "0.51743984", "0.5169026", "0.511581", "0.5113257", "0.51018304", "0.5094552", "0.50735426", "0.50715804", "0.5054321", "0.50490206", "0.5044335", "0.5042739", "0.5037087", "0.5036138", "0.5017437", "0.50148904", "0.500387", "0.49970984", "0.49908102", "0.49759692", "0.49741322", "0.49685493", "0.4965782", "0.49529678", "0.49481663", "0.4946482", "0.4942285", "0.49401823", "0.49382016", "0.49341446", "0.49329168", "0.49287695", "0.49282682", "0.49282098", "0.49280262", "0.4914872", "0.49141672", "0.49096036", "0.49092314", "0.49019566", "0.49018782", "0.48880562", "0.48879996", "0.4884383", "0.48678318", "0.48626515", "0.48485288", "0.48474172", "0.4843013", "0.48356447", "0.4831434", "0.48246893", "0.4823748", "0.48207128", "0.48191997", "0.48097873", "0.48050082", "0.48046678", "0.4800307", "0.47992197", "0.47988325", "0.47917542", "0.47863767", "0.4785759", "0.47819003", "0.47806418", "0.47768357", "0.4773331", "0.4757883", "0.47568092", "0.47545072", "0.47513884", "0.4744438", "0.47390825", "0.4732923", "0.47245538", "0.47220007", "0.47181976", "0.47117928", "0.47093055", "0.47080317" ]
0.75593203
0
fix for bug 38843 causes the DTLS to be created in every TX participant
@Override public void run() { assertNotNull(TXLockService.getDTLS()); assertFalse(TXLockService.getDTLS().isLockGrantor()); PausibleTX pauseTXRunnable = new PausibleTX(); pauseTXRunnable.rgnName = rgnName; pauseTXRunnable.myCache = getCache(); pauseTXRunnable.key = "key"; pauseTXRunnable.value = "val3"; new Thread(pauseTXRunnable, "PausibleTX Thread").start(); synchronized (PausibleTX.class) { while (!pauseTXRunnable.getIsRunning()) { try { PausibleTX.class.wait(); } catch (InterruptedException ie) { fail("Did not expect " + ie); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeToTransport(INetworkContext context, ByteBuffer buffer) throws MqttsnException {\n if(context.getReceivePort() == options.getSecurePort()){\n\n //-- use the DTLS version...\n\n } else {\n super.writeToTransport(context, buffer);\n }\n }", "private static String a(long l10, String string2, long l11, byte[] byArray, String string3) {\n Object object;\n Object object2;\n JSONObject jSONObject;\n long l12;\n Object object3;\n int n10;\n Object object4;\n block17: {\n block16: {\n object4 = byArray;\n n10 = TextUtils.isEmpty((CharSequence)string3);\n object3 = \"\";\n if (n10 != 0) {\n return object3;\n }\n long l13 = System.currentTimeMillis();\n long l14 = 1000L;\n l12 = l13 / l14;\n jSONObject = new JSONObject();\n object2 = \"TLS.ver\";\n String string4 = \"2.0\";\n try {\n jSONObject.put((String)object2, (Object)string4);\n object2 = \"TLS.identifier\";\n string4 = string2;\n }\n catch (JSONException jSONException) {\n l14 = l10;\n string4 = string2;\n break block16;\n }\n try {\n jSONObject.put((String)object2, (Object)string2);\n object2 = \"TLS.sdkappid\";\n l14 = l10;\n }\n catch (JSONException jSONException) {\n l14 = l10;\n break block16;\n }\n try {\n jSONObject.put((String)object2, l10);\n object2 = \"TLS.expire\";\n }\n catch (JSONException jSONException) {\n break block16;\n }\n try {\n jSONObject.put((String)object2, l11);\n object2 = \"TLS.time\";\n jSONObject.put((String)object2, l12);\n break block17;\n }\n catch (JSONException jSONException) {}\n }\n object2.printStackTrace();\n }\n n10 = 0;\n object2 = null;\n if (object4 != null) {\n n10 = 2;\n object4 = Base64.encodeToString((byte[])object4, (int)n10);\n object2 = \"TLS.userbuf\";\n try {\n jSONObject.put((String)object2, object4);\n }\n catch (JSONException jSONException) {\n jSONException.printStackTrace();\n }\n object = object4;\n } else {\n object = null;\n }\n object2 = d.v.o.c.d(l10, string2, l12, l11, string3, object);\n int n11 = ((String)object2).length();\n if (n11 == 0) {\n return object3;\n }\n object4 = \"TLS.sig\";\n try {\n jSONObject.put((String)object4, object2);\n }\n catch (JSONException jSONException) {\n jSONException.printStackTrace();\n }\n object2 = new Deflater();\n object4 = jSONObject.toString();\n object3 = Charset.forName(\"UTF-8\");\n object4 = object4.getBytes((Charset)object3);\n ((Deflater)object2).setInput((byte[])object4);\n ((Deflater)object2).finish();\n object4 = new byte[2048];\n int n12 = ((Deflater)object2).deflate((byte[])object4);\n ((Deflater)object2).end();\n object4 = d.v.o.c.b(Arrays.copyOfRange(object4, 0, n12));\n return new String((byte[])object4);\n }", "public LWTRTPdu connectReq() throws IncorrectTransitionException;", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:02:01.332 -0500\", hash_original_method = \"65A9306BD8ABF19429A09B81D2DB8751\", hash_generated_method = \"79C24DC7FBEDF6FC9189D433464AE63B\")\n \nprotected SSLSocket() {\n }", "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 TlsClientImpl(DtlsPacketTransformer packetTransformer)\n {\n super(BC_TLS_CRYPTO);\n this.packetTransformer = packetTransformer;\n }", "@Test\n public void testComputeForTLS10() throws CryptoException {\n byte[] secret = new byte[0];\n PRFAlgorithm prfAlgorithm = PRFAlgorithm.TLS_PRF_LEGACY;\n String label = \"master secret\";\n byte[] seed = new byte[60];\n int size = 48;\n\n byte[] result1 = TlsUtils.PRF_legacy(secret, label, seed, size);\n byte[] result2 = PseudoRandomFunction.compute(PRFAlgorithm.TLS_PRF_LEGACY, secret, label, seed, size);\n assertArrayEquals(result1, result2);\n\n /*\n * Test case 2: test the whole keyBlock generation process check, if master secret is computed correctly\n */\n DHClientKeyExchangeMessage message = new DHClientKeyExchangeMessage();\n message.setPublicKey(new byte[] { 1 });\n message.prepareComputations();\n message.getComputations().setPremasterSecret(ArrayConverter.hexStringToByteArray(\n \"17631f03fb5f59e65ef9b581bb6494e7304e2eaffb07ff7356cf62db1c44f4e4c15614909a3f2980c1908da2200924a23bc037963c204048cc77b1bcab5e6c9ef2c32928bcbdc0b664535885d46a9d4af4104eba4d7428c5741cf1c74bbd54d8e7ea16eaa126218286639a740fc39173e8989aea7f4b4440e1cad321315911fc4a8135d1217ebada1c70cb4ce99ff11dc8c8ca4ffc3c48a9f3f2143588a8fec147a6c3da4d36df18cf075eb7de187d83c7e3b7fd27124741a4b8809bed4f43ed9a434ce59c6a33277be96d8ef27b8e6a59d70bf6a04a86f04dfc37ab69ad90da53dfc1ea27f60a32ee7608b2197943bf8673dbe68003277bfd40b40d18b1a3bf\"));\n message.getComputations().setClientServerRandom(ArrayConverter.hexStringToByteArray(\n \"c8c9c788adbd9dc72b5dd0635f9e2576e09c87b67e045c026ffa3281069601fd594c07e445947b545a746fcbc094e12427e0286be2199300925a81be02bf5467\"));\n result1 = TlsUtils.PRF_legacy(message.getComputations().getPremasterSecret().getValue(), label,\n message.getComputations().getClientServerRandom().getValue(), size);\n result2 = PseudoRandomFunction.compute(PRFAlgorithm.TLS_PRF_LEGACY,\n message.getComputations().getPremasterSecret().getValue(), label,\n message.getComputations().getClientServerRandom().getValue(), size);\n assertArrayEquals(result1, result2);\n\n /*\n * check, if keyblock is computed correctly TLS_DHE_RSA_WITH_AES_256_CBC_SHA MAC Write Client 20 Bytes Mac Write\n * Server 20 Bytes Enc Write Client 32 Bytes Enc Write Server 32 Bytes IV Write Client 16 Bytes IV Write Server\n * 16 Bytes\n */\n byte[] serverClientRandom = ArrayConverter.hexStringToByteArray(\n \"4a8135d1217ebada1c70cb4ce99ff11dc8c8ca4ffc3c48a9f3f2143588a8fec147a6c3da4d36df18cf075eb7de187d83c7e3b7fd27124741a4b8809bed4f43ed9a434ce59c6a33277be96d8ef27b8e6a59d70bf6a04a86f04dfc37ab69ad90da53dfc1ea27f60a32ee7608b2197943bf8673dbe68003277bfd40b40d18b1a3bf17631f03fb5f59e65ef9b581bb6494e7304e2eaffb07ff7356cf62db1c44f4e4c15614909a3f2980c1908da2200924a23bc037963c204048cc77b1bcab5e6c9ef2c32928bcbdc0b664535885d46a9d4af4104eba4d7428c5741cf1c74bbd54d8e7ea16eaa126218286639a740fc39173e8989aea7f4b4440e1cad321315911fc\");\n result1 = TlsUtils.PRF_legacy(result1, \"key expansion\", serverClientRandom, 136);\n result2 = PseudoRandomFunction.compute(PRFAlgorithm.TLS_PRF_LEGACY, result2, \"key expansion\",\n serverClientRandom, 136);\n assertArrayEquals(result1, result2);\n }", "private void createSSLContext() throws Exception {\n\n char[] passphrase = \"passphrase\".toCharArray();\n\n KeyStore ks = KeyStore.getInstance(\"JKS\");\n ks.load(new FileInputStream(\"testkeys\"), passphrase);\n\n KeyManagerFactory kmf = KeyManagerFactory.getInstance(\"SunX509\");\n kmf.init(ks, passphrase);\n\n TrustManagerFactory tmf = TrustManagerFactory.getInstance(\"SunX509\");\n tmf.init(ks);\n\n sslContext = SSLContext.getInstance(\"TLS\");\n sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);\n }", "@Override\n protected SessionTicketTLSExtensionMessage createExtensionMessage() {\n return new SessionTicketTLSExtensionMessage();\n }", "private static SSLContext createSSLContext() {\n\t try {\n\t SSLContext context = SSLContext.getInstance(\"SSL\");\n\t if (devMode) {\n\t \t context.init( null, new TrustManager[] {new RESTX509TrustManager(null)}, null); \n\t } else {\n\t TrustManager[] trustManagers = tmf.getTrustManagers();\n\t if ( kmf!=null) {\n\t KeyManager[] keyManagers = kmf.getKeyManagers();\n\t \n\t // key manager and trust manager\n\t context.init(keyManagers,trustManagers,null);\n\t }\n\t else\n\t \t// no key managers\n\t \tcontext.init(null,trustManagers,null);\n\t }\n\t return context;\n\t } \n\t catch (Exception e) {\n\t \t logger.error(e.toString());\n\t throw new HttpClientError(e.toString());\n\t \t }\n }", "public abstract T useTransportSecurity(File certChain, File privateKey);", "public String name () {\n return \"tls\";\n }", "public SSLContext mo12551a() {\n try {\n CertificateFactory instance = CertificateFactory.getInstance(\"X.509\");\n TrustManagerFactory instance2 = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());\n KeyStore instance3 = KeyStore.getInstance(KeyStore.getDefaultType());\n instance3.load(null, null);\n instance3.setCertificateEntry(\"DigiCertGlobalRootCA\", (X509Certificate) instance.generateCertificate(new BufferedInputStream(getClass().getClassLoader().getResourceAsStream(\"com/clevertap/android/sdk/certificates/DigiCertGlobalRootCA.crt\"))));\n instance3.setCertificateEntry(\"DigiCertSHA2SecureServerCA\", (X509Certificate) instance.generateCertificate(new BufferedInputStream(getClass().getClassLoader().getResourceAsStream(\"com/clevertap/android/sdk/certificates/DigiCertSHA2SecureServerCA.crt\"))));\n instance2.init(instance3);\n SSLContext instance4 = SSLContext.getInstance(\"TLS\");\n instance4.init(null, instance2.getTrustManagers(), null);\n C3111h1.m14930d(\"SSL Context built\");\n return instance4;\n } catch (Throwable th) {\n C3111h1.m14937e(\"Error building SSL Context\", th);\n return null;\n }\n }", "@Test\n\tpublic void testGetCACerts_simpleEnroll_TLSwPoP() {\n\t\tSystem.out.println(\"Beginning TC2024\");\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.TRUE);\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 TC2024\");\n\t}", "@Test\n\tpublic void testGetCACerts_simpleEnroll_TLSv6() {\n\t\tSystem.out.println(\"Beginning TC2047\");\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\t// ipv6\n\t\tec.setServerName(\"ip6-localhost\");\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\t// ipv6\n\t\tec.setServerName(\"ip6-localhost\");\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 TC2047\");\n\t}", "@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}", "@Test\n public void testPrepare() {\n context.getConfig()\n .setDefaultServerDhGenerator(\n new BigInteger(\n ArrayConverter.hexStringToByteArray(\n \"a51883e9ac0539859df3d25c716437008bb4bd8ec4786eb4bc643299daef5e3e5af5863a6ac40a597b83a27583f6a658d408825105b16d31b6ed088fc623f648fd6d95e9cefcb0745763cddf564c87bcf4ba7928e74fd6a3080481f588d535e4c026b58a21e1e5ec412ff241b436043e29173f1dc6cb943c09742de989547288\")));\n context.getConfig()\n .setDefaultServerDhModulus(\n new BigInteger(\n 1,\n ArrayConverter.hexStringToByteArray(\n \"da3a8085d372437805de95b88b675122f575df976610c6a844de99f1df82a06848bf7a42f18895c97402e81118e01a00d0855d51922f434c022350861d58ddf60d65bc6941fc6064b147071a4c30426d82fc90d888f94990267c64beef8c304a4b2b26fb93724d6a9472fa16bc50c5b9b8b59afb62cfe9ea3ba042c73a6ade35\")));\n context.setClientRandom(ArrayConverter.hexStringToByteArray(\"AABBCCDD\"));\n context.setServerRandom(ArrayConverter.hexStringToByteArray(\"AABBCCDD\"));\n // Set Signature and Hash Algorithm\n List<SignatureAndHashAlgorithm> SigAndHashList = new LinkedList<>();\n SigAndHashList.add(SignatureAndHashAlgorithm.RSA_SHA1);\n SigAndHashList.add(SignatureAndHashAlgorithm.DSA_MD5);\n context.getConfig().setDefaultClientSupportedSignatureAndHashAlgorithms(SigAndHashList);\n // Test\n preparator.prepareHandshakeMessageContents();\n\n assertArrayEquals(\n ArrayConverter.hexStringToByteArray(\n \"a51883e9ac0539859df3d25c716437008bb4bd8ec4786eb4bc643299daef5e3e5af5863a6ac40a597b83a27583f6a658d408825105b16d31b6ed088fc623f648fd6d95e9cefcb0745763cddf564c87bcf4ba7928e74fd6a3080481f588d535e4c026b58a21e1e5ec412ff241b436043e29173f1dc6cb943c09742de989547288\"),\n message.getGenerator().getValue());\n assertArrayEquals(\n ArrayConverter.hexStringToByteArray(\n \"da3a8085d372437805de95b88b675122f575df976610c6a844de99f1df82a06848bf7a42f18895c97402e81118e01a00d0855d51922f434c022350861d58ddf60d65bc6941fc6064b147071a4c30426d82fc90d888f94990267c64beef8c304a4b2b26fb93724d6a9472fa16bc50c5b9b8b59afb62cfe9ea3ba042c73a6ade35\"),\n message.getModulus().getValue());\n assertArrayEquals(\n ArrayConverter.hexStringToByteArray(\"AABBCCDDAABBCCDD\"),\n message.getComputations().getClientServerRandom().getValue());\n assertArrayEquals(\n ArrayConverter.hexStringToByteArray(\"0201\"),\n message.getSignatureAndHashAlgorithm().getValue());\n assertNotNull(message.getSignature().getValue());\n assertNotNull(message.getSignatureLength().getValue());\n }", "@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:02:01.395 -0500\", hash_original_method = \"886AE080148D5E5D7C66238C628CC678\", hash_generated_method = \"B59D430B54A9E84755CD1B8DE11AFB42\")\n \npublic void setSSLParameters(SSLParameters p) {\n String[] cipherSuites = p.getCipherSuites();\n if (cipherSuites != null) {\n setEnabledCipherSuites(cipherSuites);\n }\n String[] protocols = p.getProtocols();\n if (protocols != null) {\n setEnabledProtocols(protocols);\n }\n if (p.getNeedClientAuth()) {\n setNeedClientAuth(true);\n } else if (p.getWantClientAuth()) {\n setWantClientAuth(true);\n } else {\n setWantClientAuth(false);\n }\n }", "@Test\r\n\tpublic void testD() {\r\n\t\t\r\n\t\tObjectHandshake h = new ObjectHandshake();\r\n\t\th.setUuid( UuidTool.getOne() );\r\n\t\t\r\n\t\tRunProtocol run = null;\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_A);\r\n\t\tassertTrue(run.beginA());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_A);\r\n\t\tassertTrue(run.commitA());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_B);\r\n\t\tassertTrue(run.beginB());\r\n\t\t\r\n\t\trun = new RunProtocol(h, IHandshake.PARTNER_B);\r\n\t\tassertTrue(run.commitB());\r\n\t\t\r\n\t\tassertEquals(h.getLog(), \"1-1-100-1-1-101-2-2-200-2-2-201-\");\r\n\t}", "@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 }", "@Test\n public void cdsResponseV2WithUpstreamTlsContext() {\n RpcCall<DiscoveryRequest, DiscoveryResponse> call =\n startResourceWatcher(ResourceType.CDS, CDS_RESOURCE, cdsResourceWatcher);\n\n // Management server sends back CDS response with UpstreamTlsContext.\n io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext testUpstreamTlsContext =\n buildUpstreamTlsContextV2(\"secret1\", \"unix:/var/uds2\");\n List<Any> clusters = ImmutableList.of(\n Any.pack(buildClusterV2(\"cluster-bar.googleapis.com\", null, false)),\n Any.pack(buildSecureClusterV2(CDS_RESOURCE,\n \"eds-cluster-foo.googleapis.com\", true, testUpstreamTlsContext)),\n Any.pack(buildClusterV2(\"cluster-baz.googleapis.com\", null, false)));\n DiscoveryResponse response =\n buildDiscoveryResponseV2(\"0\", clusters, AbstractXdsClient.ADS_TYPE_URL_CDS_V2, \"0000\");\n call.responseObserver.onNext(response);\n\n // Client sent an ACK CDS request.\n verify(call.requestObserver)\n .onNext(eq(buildDiscoveryRequestV2(NODE, \"0\", CDS_RESOURCE,\n AbstractXdsClient.ADS_TYPE_URL_CDS_V2, \"0000\")));\n verify(cdsResourceWatcher, times(1)).onChanged(cdsUpdateCaptor.capture());\n CdsUpdate cdsUpdate = cdsUpdateCaptor.getValue();\n EnvoyServerProtoData.UpstreamTlsContext upstreamTlsContext = cdsUpdate\n .getUpstreamTlsContext();\n SdsSecretConfig validationContextSdsSecretConfig = upstreamTlsContext.getCommonTlsContext()\n .getValidationContextSdsSecretConfig();\n assertThat(validationContextSdsSecretConfig.getName()).isEqualTo(\"secret1\");\n assertThat(\n Iterables.getOnlyElement(\n validationContextSdsSecretConfig\n .getSdsConfig()\n .getApiConfigSource()\n .getGrpcServicesList())\n .getGoogleGrpc()\n .getTargetUri())\n .isEqualTo(\"unix:/var/uds2\");\n }", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-25 10:38:11.973 -0500\", hash_original_method = \"1269355D60D7190EAE617D5C71982259\", hash_generated_method = \"5E1FC5222F1D24E03DD02D8882E1411F\")\n \npublic CharGenUDPClient()\n {\n // CharGen return packets have a maximum length of 512\n __receiveData = new byte[512];\n __receivePacket = new DatagramPacket(__receiveData, 512);\n __sendPacket = new DatagramPacket(new byte[0], 0);\n }", "@Test\n\tpublic void testGetCACerts_simpleEnroll_TLSwPoPv6() {\n\t\tSystem.out.println(\"Beginning TC2048\");\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\t// ipv6\n\t\tec.setServerName(\"ip6-localhost\");\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\t// ipv6\n\t\tec.setServerName(\"ip6-localhost\");\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.TRUE);\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 TC2048\");\n\t}", "@Test\n\tpublic void serviceQualificationEE() throws Exception {\n\t\tTSLParser parser = new TSLParser(new FileInputStream(new File(\"src/test/resources/tsls/0A191C3E18CAB7B783E690D3E4431C354A068FF0.xml\")));\n\t\tTSLParserResult model = parser.call();\n\n\t\tList<TSLServiceProvider> serviceProviders = model.getServiceProviders();\n\t\tassertEquals(2, serviceProviders.size());\n\n\t\tTSLService service = getESTEIDSK2007(serviceProviders);\n\t\tassertNotNull(service);\n\n\t\tList<TSLServiceExtension> extensions = service.getExtensions();\n\t\tassertEquals(1, extensions.size());\n\t\tTSLServiceExtension extension = extensions.get(0);\n\n\t\tList<TSLConditionsForQualifiers> conditionsForQualifiers = extension.getConditionsForQualifiers();\n\t\tassertEquals(1, conditionsForQualifiers.size());\n\n\t\tTSLConditionsForQualifiers qcStatement = getQualificationQCStatement(conditionsForQualifiers);\n\t\tassertNull(qcStatement);\n\n\t\t// ***************************** NEW VERSION OF TL\n\n\t\tCertificateToken certificate = DSSUtils.loadCertificateFromBase64EncodedString(\n\t\t\t\t\"MIID3DCCAsSgAwIBAgIER/idhzANBgkqhkiG9w0BAQUFADBbMQswCQYDVQQGEwJFRTEiMCAGA1UEChMZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEPMA0GA1UECxMGRVNURUlEMRcwFQYDVQQDEw5FU1RFSUQtU0sgMjAwNzAeFw0wODA0MDYwOTUzMDlaFw0xMjAzMDUyMjAwMDBaMIGWMQswCQYDVQQGEwJFRTEPMA0GA1UEChMGRVNURUlEMRowGAYDVQQLExFkaWdpdGFsIHNpZ25hdHVyZTEiMCAGA1UEAxMZU0lOSVZFRSxWRUlLTywzNjcwNjAyMDIxMDEQMA4GA1UEBBMHU0lOSVZFRTEOMAwGA1UEKhMFVkVJS08xFDASBgNVBAUTCzM2NzA2MDIwMjEwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCGRN42R9e6VEHMCyvacuubjtm1+5Kk92WgIgtWA8hY8DW2iNvQJ3jOF5XlVIyIDTwl2JVKxWKhXX+8+yNFPpqAK43IINcmMfznw/KcR7jACGNuTrivA9HrvRiqDzTg5E1rktjho6OkDkdV3dgOLB2wyhVm2anNpICfrUq8c09HPwIDMMP5o4HvMIHsMA4GA1UdDwEB/wQEAwIGQDA8BgNVHR8ENTAzMDGgL6AthitodHRwOi8vd3d3LnNrLmVlL2NybHMvZXN0ZWlkL2VzdGVpZDIwMDcuY3JsMFEGA1UdIARKMEgwRgYLKwYBBAHOHwEBAQEwNzASBggrBgEFBQcCAjAGGgRub25lMCEGCCsGAQUFBwIBFhVodHRwOi8vd3d3LnNrLmVlL2Nwcy8wHwYDVR0jBBgwFoAUSAbevoyHV5WAeGP6nCMrK6A6GHUwHQYDVR0OBBYEFJAJUyDrH3rdxTStU+LDa6aHdE8dMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQEFBQADggEBAA5qjfeuTdOoEtatiA9hpjDHzyqN1PROcaPrABXGqpLxcHbLVr7xmovILAjxS9fJAw28u9ZE3asRNa9xgQNTeX23mMlojJAYVbYCeIeJ6jtsRiCo34wgvO3CtVfO3+C1T8Du5XLCHa6SoT8SpCApW+Crwe+6eCZDmv2NKTjhn1wCCNO2e8HuSt+pTUNBTUB+rkvF4KO9VnuzRzT7zN7AUdW4OFF3bI+9+VmW3t9vq1zDOxNTdBkCM3zm5TRa8ZtyAPL48bW19JAcYzQLjPGORwoIRNSXdVTqX+cDiw2wbmb2IhPdxRqN9uPwU1x/ltZZ3W5GzJ1t8JeQN7PuGM0OHqE=\");\n\n\t\tparser = new TSLParser(new FileInputStream(new File(\"src/test/resources/tsls/0A191C3E18CAB7B783E690D3E4431C354A068FF0-2.xml\")));\n\t\tmodel = parser.call();\n\n\t\tserviceProviders = model.getServiceProviders();\n\t\tassertEquals(2, serviceProviders.size());\n\n\t\tservice = getESTEIDSK2007(serviceProviders);\n\t\tassertNotNull(service);\n\n\t\textensions = service.getExtensions();\n\t\tassertEquals(1, extensions.size());\n\t\textension = extensions.get(0);\n\n\t\tconditionsForQualifiers = extension.getConditionsForQualifiers();\n\t\tassertEquals(2, conditionsForQualifiers.size());\n\n\t\tqcStatement = getQualificationQCStatement(conditionsForQualifiers);\n\t\tassertNotNull(qcStatement);\n\n\t\tCondition condition = qcStatement.getCondition();\n\t\tassertTrue(condition.check(certificate));\n\t}", "public void test() throws IOException {\n SocketChannel socketChannel = SocketChannel.open();\n socketChannel.configureBlocking(false);\n socketChannel.connect(new InetSocketAddress(BuildConfig.API_URL, ServerIP.PORT));\n\n// Complete connection\n while (!socketChannel.finishConnect()) {\n // do something until connect completed\n }\n\n// Create byte buffers to use for holding application and encoded data\n SSLSession session = sslEngine.getSession();\n ByteBuffer myAppData = ByteBuffer.allocate(session.getApplicationBufferSize());\n ByteBuffer myNetData = ByteBuffer.allocate(session.getPacketBufferSize());\n ByteBuffer peerAppData = ByteBuffer.allocate(session.getApplicationBufferSize());\n ByteBuffer peerNetData = ByteBuffer.allocate(session.getPacketBufferSize());\n\n// Do initial handshake\n// doHandshake(socketChannel, sslEngine, myNetData, peerNetData);\n\n myAppData.put(\"hello\".getBytes());\n myAppData.flip();\n\n while (myAppData.hasRemaining()) {\n // Generate SSL/TLS encoded data (handshake or application data)\n SSLEngineResult res = sslEngine.wrap(myAppData, myNetData);\n\n // Process status of call\n if (res.getStatus() == SSLEngineResult.Status.OK) {\n myAppData.compact();\n\n // Send SSL/TLS encoded data to peer\n while(myNetData.hasRemaining()) {\n int num = socketChannel.write(myNetData);\n if (num == 0) {\n // no bytes written; try again later\n }\n }\n }\n\n // Handle other status: BUFFER_OVERFLOW, CLOSED\n }\n\n // Read SSL/TLS encoded data from peer\n int num = socketChannel.read(peerNetData);\n if (num == -1) {\n // The channel has reached end-of-stream\n } else if (num == 0) {\n // No bytes read; try again ...\n } else {\n // Process incoming data\n peerNetData.flip();\n SSLEngineResult res = sslEngine.unwrap(peerNetData, peerAppData);\n\n if (res.getStatus() == SSLEngineResult.Status.OK) {\n peerNetData.compact();\n\n if (peerAppData.hasRemaining()) {\n // Use peerAppData\n }\n }\n // Handle other status: BUFFER_OVERFLOW, BUFFER_UNDERFLOW, CLOSED\n }\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n public static TransportReader<TransportMessage>\n createProductionDefault() {\n\n /*\n * TODO Remove raw types and unchecked conversion. Unfortunately I could\n * not find a way around using raw types and unchecked conversion my be\n * some one else can.\n */\n\n PtTlsMessageHeaderReader mReader = new PtTlsMessageHeaderReader(\n new PtTlsMessageHeaderBuilderIetf());\n\n PtTlsReader reader = new PtTlsReader(mReader);\n\n reader.add(IETFConstants.IETF_PEN_VENDORID,\n PtTlsMessageTypeEnum.IETF_PT_TLS_VERSION_REQUEST.id(),\n (TransportReader) new PtTlsMessageVersionRequestValueReader(\n new PtTlsMessageValueVersionRequestBuilderIetf()));\n reader.add(IETFConstants.IETF_PEN_VENDORID,\n PtTlsMessageTypeEnum.IETF_PT_TLS_VERSION_RESPONSE.id(),\n (TransportReader) new PtTlsMessageVersionResponseValueReader(\n new PtTlsMessageValueVersionResponseBuilderIetf()));\n reader.add(IETFConstants.IETF_PEN_VENDORID,\n PtTlsMessageTypeEnum.IETF_PT_TLS_PB_BATCH.id(),\n (TransportReader) new PtTlsMessagePbBatchValueReader(\n new PtTlsMessageValuePbBatchBuilderIetf()));\n reader.add(IETFConstants.IETF_PEN_VENDORID,\n PtTlsMessageTypeEnum.IETF_PT_TLS_ERROR.id(),\n (TransportReader) new PtTlsMessageErrorValueReader(\n new PtTlsMessageValueErrorBuilderIetf()));\n reader.add(IETFConstants.IETF_PEN_VENDORID,\n PtTlsMessageTypeEnum.IETF_PT_TLS_SASL_MECHANISMS.id(),\n (TransportReader) new PtTlsMessageSaslMechanismsValueReader(\n new PtTlsMessageValueSaslMechanismsBuilderIetf()));\n reader.add(\n IETFConstants.IETF_PEN_VENDORID,\n PtTlsMessageTypeEnum.IETF_PT_TLS_SASL_MECHANISM_SELECTION.id(),\n (TransportReader) new PtTlsMessageSaslMechanismSelectionValueReader(\n new PtTlsMessageValueSaslMechanismSelectionBuilderIetf()));\n reader.add(\n IETFConstants.IETF_PEN_VENDORID,\n PtTlsMessageTypeEnum.IETF_PT_TLS_SASL_AUTHENTICATION_DATA.id(),\n (TransportReader) new PtTlsMessageSaslAuthenticationDataValueReader(\n new PtTlsMessageValueSaslAuthenticationDataBuilderIetf()));\n reader.add(IETFConstants.IETF_PEN_VENDORID,\n PtTlsMessageTypeEnum.IETF_PT_TLS_SASL_RESULT.id(),\n (TransportReader) new PtTlsMessageSaslResultValueReader(\n new PtTlsMessageValueSaslResultBuilderIetf()));\n\n return reader;\n }", "public static List<CertKeyPair> exampleTlsCerts() {\n final Path root = getFlightTestDataRoot();\n return Arrays.asList(new CertKeyPair(root.resolve(\"cert0.pem\")\n .toFile(), root.resolve(\"cert0.pkcs1\").toFile()),\n new CertKeyPair(root.resolve(\"cert1.pem\")\n .toFile(), root.resolve(\"cert1.pkcs1\").toFile()));\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 }", "@Test\n public void testLockBatchParticipantsUpdate() throws Exception {\n final String rgnName = getUniqueName();\n Region rgn = getCache().createRegion(rgnName, getRegionAttributes());\n rgn.create(\"key\", null);\n\n Host host = Host.getHost(0);\n VM vm0 = host.getVM(0);\n VM vm1 = host.getVM(1);\n VM vm2 = host.getVM(2);\n SerializableRunnable initRegions =\n new SerializableRunnable(\"testLockBatchParticipantsUpdate: initial configuration\") {\n @Override\n public void run() {\n try {\n Region rgn1 = getCache().createRegion(rgnName, getRegionAttributes());\n rgn1.create(\"key\", null);\n } catch (CacheException e) {\n Assert.fail(\"While creating region\", e);\n }\n }\n };\n vm0.invoke(initRegions);\n vm1.invoke(initRegions);\n rgn.put(\"key\", \"val1\");\n\n // Connect vm2 also since it may have been shutdown when logPerTest\n // is turned on\n vm2.invoke(new SerializableRunnable(\"connect vm2 if not connected\") {\n @Override\n public void run() {\n getCache();\n }\n });\n\n // Make VM0 the Grantor\n vm0.invoke(new SerializableRunnable(\"testLockBatchParticipantsUpdate: remote grantor init\") {\n @Override\n public void run() {\n try {\n Region rgn1 = getCache().getRegion(rgnName);\n final CacheTransactionManager txMgr2 = getCache().getCacheTransactionManager();\n assertEquals(\"val1\", rgn1.getEntry(\"key\").getValue());\n txMgr2.begin();\n rgn1.put(\"key\", \"val2\");\n txMgr2.commit();\n assertNotNull(TXLockService.getDTLS());\n assertTrue(TXLockService.getDTLS().isLockGrantor());\n } catch (CacheException e) {\n fail(\"While performing first transaction\");\n }\n }\n });\n\n // fix for bug 38843 causes the DTLS to be created in every TX participant\n assertNotNull(TXLockService.getDTLS());\n assertFalse(TXLockService.getDTLS().isLockGrantor());\n assertEquals(\"val2\", rgn.getEntry(\"key\").getValue());\n\n // Build sets of System Ids and set them up on VM0 for future batch member checks\n HashSet txMembers = new HashSet(4);\n txMembers.add(getSystemId());\n txMembers.add(vm0.invoke(TXDistributedDUnitTest::getSystemId));\n vm0.invoke(() -> TXDistributedDUnitTest.setPreTXSystemIds(txMembers));\n txMembers.add(vm2.invoke(TXDistributedDUnitTest::getSystemId));\n vm0.invoke(() -> TXDistributedDUnitTest.setPostTXSystemIds(txMembers));\n\n // Don't include the tx host in the batch member set(s)\n Serializable vm1HostId = vm1.invoke(TXDistributedDUnitTest::getSystemId);\n vm0.invoke(() -> TXDistributedDUnitTest.setTXHostSystemId(vm1HostId));\n\n // Create a TX on VM1 (such that it will ask for locks on VM0) that uses the callbacks\n // to pause and give us time to start a GII process on another VM\n vm1.invoke(new SerializableRunnable(\n \"testLockBatchParticipantsUpdate: slow tx (one that detects new member)\") {\n @Override\n public void run() {\n // fix for bug 38843 causes the DTLS to be created in every TX participant\n assertNotNull(TXLockService.getDTLS());\n assertFalse(TXLockService.getDTLS().isLockGrantor());\n\n PausibleTX pauseTXRunnable = new PausibleTX();\n pauseTXRunnable.rgnName = rgnName;\n pauseTXRunnable.myCache = getCache();\n pauseTXRunnable.key = \"key\";\n pauseTXRunnable.value = \"val3\";\n new Thread(pauseTXRunnable, \"PausibleTX Thread\").start();\n synchronized (PausibleTX.class) {\n while (!pauseTXRunnable.getIsRunning()) {\n try {\n PausibleTX.class.wait();\n } catch (InterruptedException ie) {\n fail(\"Did not expect \" + ie);\n }\n }\n }\n }\n });\n\n // Verify that the lock batch exists VM0 and has the size we expect\n vm0.invoke(new SerializableRunnable(\n \"testLockBatchParticipantsUpdate: Verify lock batch exists on VM0 with expected size\") {\n @Override\n public void run() {\n getCache().getRegion(rgnName);\n TXLockServiceImpl dtls = (TXLockServiceImpl) TXLockService.getDTLS();\n assertNotNull(dtls);\n assertTrue(dtls.isLockGrantor());\n DLockService dLockSvc = dtls.getInternalDistributedLockService();\n assertNotNull(TXDistributedDUnitTest.txHostId);\n DLockBatch[] batches = dLockSvc.getGrantor()\n .getLockBatches((InternalDistributedMember) TXDistributedDUnitTest.txHostId);\n assertEquals(batches.length, 1);\n TXLockBatch txLockBatch = (TXLockBatch) batches[0];\n assertNotNull(txLockBatch);\n assertNotNull(TXDistributedDUnitTest.preTXSystemIds);\n assertTrue(\n \"Members in lock batch \" + txLockBatch.getParticipants() + \" not the same as \"\n + TXDistributedDUnitTest.preTXSystemIds,\n txLockBatch.getParticipants().equals(TXDistributedDUnitTest.preTXSystemIds));\n }\n });\n\n // Start a GII process on VM2\n vm2.invoke(new SerializableRunnable(\"testLockBatchParticipantsUpdate: start GII\") {\n @Override\n public void run() {\n try {\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.DISTRIBUTED_ACK);\n factory.setEarlyAck(false);\n factory.setDataPolicy(DataPolicy.REPLICATE);\n getCache().createRegion(rgnName, factory.create());\n } catch (CacheException e) {\n Assert.fail(\"While creating region\", e);\n }\n }\n });\n\n // Notify TX on VM1 so that it can continue\n vm1.invoke(\n new SerializableRunnable(\"testLockBatchParticipantsUpdate: Notfiy VM1 TX to continue\") {\n @Override\n public void run() {\n synchronized (PausibleTX.class) {\n // Notify VM1 that it should proceed to the TX send\n PausibleTX.class.notifyAll();\n // Wait until VM1 has sent the TX\n try {\n PausibleTX.class.wait();\n } catch (InterruptedException ie) {\n fail(\"Did not expect \" + ie);\n }\n }\n }\n });\n\n // Verify that the batch on VM0 has added VM2 into the set\n vm0.invoke(new SerializableRunnable(\n \"testLockBatchParticipantsUpdate: Verify lock batch contains VM2\") {\n @Override\n public void run() {\n getCache().getRegion(rgnName);\n TXLockServiceImpl dtls = (TXLockServiceImpl) TXLockService.getDTLS();\n assertNotNull(dtls);\n assertTrue(dtls.isLockGrantor());\n DLockService dLockSvc = dtls.getInternalDistributedLockService();\n assertNotNull(TXDistributedDUnitTest.txHostId);\n DLockBatch[] batches = dLockSvc.getGrantor()\n .getLockBatches((InternalDistributedMember) TXDistributedDUnitTest.txHostId);\n assertEquals(batches.length, 1);\n TXLockBatch txLockBatch = (TXLockBatch) batches[0];\n assertNotNull(txLockBatch);\n assertNotNull(TXDistributedDUnitTest.preTXSystemIds);\n assertTrue(\n \"Members in lock batch \" + txLockBatch.getParticipants() + \" not the same as \"\n + TXDistributedDUnitTest.postTXSystemIds,\n txLockBatch.getParticipants().equals(TXDistributedDUnitTest.postTXSystemIds));\n }\n });\n // fix for bug 38843 causes the DTLS to be created in every TX participant\n assertNotNull(TXLockService.getDTLS());\n assertFalse(TXLockService.getDTLS().isLockGrantor());\n assertEquals(\"val3\", rgn.getEntry(\"key\").getValue());\n\n\n // Notify TX on VM1 that it can go ahead and complete the TX\n vm1.invoke(\n new SerializableRunnable(\"testLockBatchParticipantsUpdate: Notfiy VM1 TX to finish\") {\n @Override\n public void run() {\n synchronized (PausibleTX.class) {\n // Notify VM1 that it should finish the TX\n PausibleTX.class.notifyAll();\n }\n }\n });\n\n\n rgn.destroyRegion();\n }", "public interface LWTRTState {\n\t\n\t/**\n\t * Aktiver Verbindungsaufbau (1. Schritt)\n\t * Dienstnehmer uebertraegt Wunsch zum Verbindungsaufbau.\n\t * \n\t * @return Vorbereitete Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu connect() throws IncorrectTransitionException;\n\t\n\t/**\n\t * Passiver Verbindungsaufbau (1. Schritt)\n\t * Wunsch zum Verbindungsaufbau wird ueber eine PDU mitgeteilt\n\t * \n\t * @return Vorbereitete Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu connectReq() throws IncorrectTransitionException;\n\t\n\t/**\n\t * Aktiver Verbindungsaufbau (2. Schritt)\n\t * Best+tigung des Verbindungsaufbaus wird +ber eine PDU mitgeteilt\n\t * @return Vorbereitet Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu connectRsp() throws IncorrectTransitionException;\n\n\t/**\n\t * Passiver Verbindungsaufbau (2. Schritt)\n\t * Dienstnehmer bestaetigt den Wunsch zum Verbindungsaufbau\n\t * \n\t * @return Vorbereitete Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu connectAcpt() throws IncorrectTransitionException;\n\t\n\t/**\n\t * Aktiver Verbindungsabbau (1. Schritt)\n\t * Dienstnehmer uebertraegt Wunsch zum Verbindungsabbau.\n\t * \n\t * @return Vorbereitete Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu disConnect() throws IncorrectTransitionException;\n\t\n\t/**\n\t * Passiver Verbindungsabbau (1. Schritt)\n\t * Wunsch zum Verbindungsabbau des Verbindungspartners wird +ber eine PDU mitgeteilt\n\t * \n\t * @return Vorbereitete Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu disConnectReq() throws IncorrectTransitionException;\n\t\n\t/**\n\t * Aktiver Verbindungsabbau (2. Schritt)\n\t * Best+tigung des Verbindungsaufbaus wird +ber eine PDU mitgeteilt\n\t * \n\t * @return Vorbereitete Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu disConnectRsp() throws IncorrectTransitionException;\n\n\t/**\n\t * Passiver Verbindungsabbau (2. Schritt)\n\t * Dienstnehmer bestaetigt die abgebaute Verbindung\n\t * \n\t * @return Vorbereitete Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu disConnectAcpt() throws IncorrectTransitionException;\n\t\n\t/**\n\t * Timeout\n\t * Das Auslaufen eines Timer wird angezeigt\n\t * \n\t * @return Vorbereitete Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu timeout() throws IncorrectTransitionException;\n\t\n\t/**\n\t * Data senden\n\t * Wunsch Daten zu senden (aktiv)\n\t * \n\t * @param chatPdu zu sendende PDU\n\t * @return Vorbereitete Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu data(Object chatPdu) throws IncorrectTransitionException;\n\t\n\t/**\n\t * Daten empfangen (passiv)\n\t * Daten werden empfangen (DATA-REQ)\n\t * \n\t * @param lwtrtPdu empfangenes PDU\n\t * @return Vorbereitet Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu dataReq(LWTRTPdu lwtrtPdu) throws IncorrectTransitionException;\n\t\n\t/**\n\t * Datenempfang wurde bestaetigt (akttiv)\n\t * Eine Bestaetigung des Datenempfang wurde empfnagen (DATA-RSP)\n\t * \n\t * @param lwtrtPdu empfangene Best+tigung\n\t * @return Vorbereitete Antwort-PDU oder <code>null</code> wenn nicht geantwortet wird.\n\t * @throws IncorrectTransitionException wenn der Zustandsuebergang nicht vorgesehen ist\n\t */\n\tpublic LWTRTPdu dataRsp(LWTRTPdu lwtrtPdu) throws IncorrectTransitionException;\n\t\n}", "public DsaQ()\n\t{\n\t q = new DSAlinkedL();\n\t}", "public LWTRTPdu connect() throws IncorrectTransitionException;", "public Provider() {\n super(PROVIDER_NAME, 0.1, \"WebID-TLS Provider\");\n }", "public static void main(String[] args) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException, UnrecoverableKeyException, KeyManagementException {\n\t\tKeyStore trustStore = KeyStore.getInstance(\"jks\");\n\t\tInputStream truststore=new FileInputStream(\"client.store\");\n\t\ttrustStore.load(truststore, \"123456\".toCharArray());\n\t\tTrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(\"SunX509\");\n\t\ttrustManagerFactory.init(trustStore);\n\t\t\n\t\t//import jks keystore from filesystem (includes private part for client auth)\n\t\tKeyStore keyStore = KeyStore.getInstance(\"jks\");\n\t\tInputStream keystore=new FileInputStream(\"client.store\");\n\t\tkeyStore.load(keystore, \"123456\".toCharArray());\n\t\tKeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(\"SunX509\");\n\t\tkeyManagerFactory.init(keyStore, \"1234\".toCharArray());\n\n\t\t\n\t\t//create SSLContext - https://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLContext.html\n\t\tSSLContext context = SSLContext.getInstance(\"TLS\");\n\t\tcontext.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), new SecureRandom());\n\t\n\t\t try {\n\t\t\t \t//create clientsocket\n\t\t\t \tSSLSocketFactory sslsocketfactory = context.getSocketFactory();\n\t\t\t \tSSLSocket sslsocket = (SSLSocket) sslsocketfactory.createSocket(\"localhost\", 9999);\n\t sslsocket.setEnabledCipherSuites(sslsocketfactory.getSupportedCipherSuites());\n\t \n\t //client<->server Console Text Transfer\n\t InputStream inputstream = System.in;\n\t InputStreamReader inputstreamreader = new InputStreamReader(inputstream);\n\t BufferedReader bufferedreader = new BufferedReader(inputstreamreader);\n\n\t OutputStream outputstream = sslsocket.getOutputStream();\n\t OutputStreamWriter outputstreamwriter = new OutputStreamWriter(outputstream);\n\t BufferedWriter bufferedwriter = new BufferedWriter(outputstreamwriter);\n\t \t \n\t SSLSession session = sslsocket.getSession();\t// initiate ssl handshake and client auth if server.needclientauth=true\n\t \n\t //display some connection parameters\n\t\t\t System.out.println(\"The Certificates used by peer\");\n\t\t\t \tSystem.out.println(\"Peer host is \" + session.getPeerHost());\n\t\t\t System.out.println(\"Cipher: \" + session.getCipherSuite());\n\t\t\t System.out.println(\"Protocol: \" + session.getProtocol());\n\t\t\t System.out.println(\"ID: \" + new BigInteger(session.getId()));\n\t\t\t System.out.println(\"Session created: \" + session.getCreationTime());\n\t\t\t System.out.println(\"Session accessed: \" + session.getLastAccessedTime());\n\t\t\t System.out.println(\"Peer certificates: \" +session.getPeerCertificates());\n\t\t\t System.out.println(\"local certificates: \" +session.getLocalCertificates().toString());\n\t\t\t System.out.println(\"peer cert-chain: \" +session.getPeerCertificateChain());\n\t \n\t String string = null;\n\t while ((string = bufferedreader.readLine()) != null) {\n\t bufferedwriter.write(string + '\\n');\n\t bufferedwriter.flush();\n\t }\n\t } catch (Exception exception) {\n\t exception.printStackTrace();\n\t }\n\t }", "public LWTRTPdu disConnectReq() throws IncorrectTransitionException;", "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 static void setTLSContextName(String name) {\n TLSContextName = name;\n }", "private Pdu makePdu(String name)\n {\n Pdu pdu = this.channel.makePdu();\n pdu.putString(\"tkn\", \"PEER-\" + TKN_CPT++);\n pdu.putString(\"name\", name);\n return pdu;\n }", "@DSSource({DSSourceKind.NETWORK})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:02:01.392 -0500\", hash_original_method = \"B1069FA99460064F4DAFA14459B677AD\", hash_generated_method = \"E49272E6A5C5F4C5B789C28E3A1AD325\")\n \npublic SSLParameters getSSLParameters() {\n SSLParameters p = new SSLParameters();\n p.setCipherSuites(getEnabledCipherSuites());\n p.setProtocols(getEnabledProtocols());\n p.setNeedClientAuth(getNeedClientAuth());\n p.setWantClientAuth(getWantClientAuth());\n return p;\n }", "@Override\n protected void prepareHandshakeMessageContents() {\n }", "@Test\n public void testMutualAuthenticationWithDNSInCNField() throws Exception {\n final SaslClientFactory clientFactory = obtainSaslClientFactory(EntitySaslClientFactory.class);\n assertNotNull(clientFactory);\n\n final KeyStore keyStore = serverKeyStore;\n final Certificate[] certificateChain = keyStore.getCertificateChain(\"dnsInCNServer\");\n final SaslServer saslServer = createSaslServer(SaslMechanismInformation.Names.IEC_ISO_9798_M_DSA_SHA1, \"testserver2.example.com\",\n serverTrustStore, (PrivateKey) keyStore.getKey(\"dnsInCNServer\", KEYSTORE_PASSWORD),\n Arrays.copyOf(certificateChain, certificateChain.length, X509Certificate[].class));\n\n final String[] mechanisms = new String[] { SaslMechanismInformation.Names.IEC_ISO_9798_M_DSA_SHA1 };\n CallbackHandler cbh = createClientCallbackHandler(mechanisms, clientKeyStore, \"dnsInCNClient\", KEYSTORE_PASSWORD, getX509TrustManager(clientTrustStore));\n final SaslClient saslClient = clientFactory.createSaslClient(mechanisms, null, \"test\", \"testserver2.example.com\",\n Collections.<String, Object>emptyMap(), cbh);\n assertFalse(saslServer.isComplete());\n assertFalse(saslClient.isComplete());\n\n byte[] message = saslServer.evaluateResponse(new byte[0]);\n assertFalse(saslServer.isComplete());\n assertFalse(saslClient.isComplete());\n\n message = saslClient.evaluateChallenge(message);\n assertFalse(saslServer.isComplete());\n assertFalse(saslClient.isComplete());\n\n message = saslServer.evaluateResponse(message);\n assertNotNull(message);\n\n message = saslClient.evaluateChallenge(message);\n assertNull(message);\n assertTrue(saslClient.isComplete());\n assertTrue(saslServer.isComplete());\n assertEquals(\"cn=testclient2.example.com,ou=jboss,o=red hat,l=raleigh,st=north carolina,c=us\", saslServer.getAuthorizationID());\n }", "public LWTRTPdu connectAcpt() throws IncorrectTransitionException;", "private PtTlsReaderFactory() {\n throw new AssertionError();\n }", "public void setSmtpTLS(boolean value) {\n this.smtpTLS = value;\n }", "dkk mo4509g();", "private void createTx() throws Exception {\n PublicKey recipient = Seed.getRandomAddress();\n Transaction tx = new Transaction(wallet.pb, recipient, wallet.pr);\n//\t\tSystem.out.println(\"Created a tx\");\n txPool.add(tx);\n//\t\tcache.put(tx.txId, null);\n sendTx(tx);\n }", "@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 void EngineInit() {\n TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[] {};\n }\n\n public void checkClientTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n }\n\n public void checkServerTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n }\n } };\n\n try {\n\n\n //取得SSL的SSLContext实例\n SSLContext sslContext = SSLContext.getInstance(\"TLS\");\n sslContext.init(null,trustAllCerts,new java.security.SecureRandom());\n sslEngine = sslContext.createSSLEngine();\n sslEngine.setUseClientMode(true);\n\n } catch(NoSuchAlgorithmException e) {\n } catch(KeyManagementException e) {\n }\n SSLSession session = sslEngine.getSession();\n int appBufferMax = session.getApplicationBufferSize();\n int netBufferMax = session.getPacketBufferSize();\n Log.i(\"123\", \"EngineInit: appBufferMax:\"+appBufferMax + \"netBufferMax:\"+netBufferMax);\n ByteBuffer mTunSSRAppData = ByteBuffer.allocate(appBufferMax);\n ByteBuffer mTunSSRWrapData = ByteBuffer.allocate(netBufferMax);\n ByteBuffer peerAppData = ByteBuffer.allocate(appBufferMax);\n ByteBuffer peerNetData = ByteBuffer.allocate(netBufferMax);\n }", "@Ignore\n @Test\n public void startSender() throws IOException, InterruptedException {\n\n final int maxPeers = 10;\n PeerDHT[] peers = createPeers(PORT, maxPeers, \"sender\");\n for (PeerDHT peer : peers) {\n peer.peer().bootstrap().inetAddress(InetAddress.getByName(ADDR)).ports(PORT).start().awaitUninterruptibly();\n peer.peer().objectDataReply(new ObjectDataReply() {\n @Override\n public Object reply(final PeerAddress sender, final Object request) throws Exception {\n System.out.println(\"wrong!!!!\");\n return \"wrong!!!!\";\n }\n });\n }\n Number160 keyForID = Number160.createHash(\"key\");\n Msg message = new Msg();\n\n System.out.println(String.format(\"Sending message '%s' to key '%s' converted to '%s'\", message.getType(),\n \"key\", keyForID.toString()));\n FutureSend futureDHT = peers[0].send(keyForID).object(message).requestP2PConfiguration(REQ).start();\n futureDHT.awaitUninterruptibly();\n System.out.println(\"got: \" + futureDHT.object());\n Thread.sleep(Long.MAX_VALUE);\n }", "public static void sycNewTraderClient() {\n\t\tString key = \"123\";\n\t\ttry {\n\t\t\tif(newTradeServiceLock.tryLock(5, TimeUnit.SECONDS)){\n\t\t\t\ttry{\n\t\t\t\t\tif(mapTradeService.containsKey(key)){\n\t\t\t\t\t\t//客户端发起重连,但是服务端没有断开\n\t\t\t\t\t}\n\t\t\t\t}finally{\n\t\t\t\t\tnewTradeServiceLock.unlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.err.println(\"线程已经超时返回! key : \"+key);\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t}", "private static void setupKeysAndCertificates() throws Exception {\n // set up our certificates\n //\n KeyPairGenerator kpg = KeyPairGenerator.getInstance(\"RSA\", \"BC\");\n\n kpg.initialize(1024, new SecureRandom());\n\n String issueDN = \"O=Punkhorn Software, C=US\";\n issueKP = kpg.generateKeyPair();\n issueCert = Utils.makeCertificate(\n issueKP, issueDN, issueKP, issueDN);\n\n //\n // certificate we sign against\n //\n String signingDN = \"CN=William J. Collins, [email protected], O=Punkhorn Software, C=US\";\n signingKP = kpg.generateKeyPair();\n signingCert = Utils.makeCertificate(\n signingKP, signingDN, issueKP, issueDN);\n\n certList = new ArrayList<>();\n\n certList.add(signingCert);\n certList.add(issueCert);\n\n decryptingKP = signingKP;\n\n }", "public LWTRTPdu connectRsp() throws IncorrectTransitionException;", "@Override\n public void setUp() throws Exception {\n transport = new TFramedTransport(new TSocket(\"123.56.206.195\", 1982));\n\n\n\n TProtocol protocol = new TBinaryProtocol(transport);\n client = new SubjectServ.Client(protocol);\n transport.open();\n }", "@Test\n @Override\n public void testPrepare() throws IOException {\n context.getConfig()\n .setDefaultExplicitCertificateKeyPair(\n new CertificateKeyPair(\n certificate,\n new CustomRSAPrivateKey(\n context.getConfig().getDefaultClientRSAModulus(),\n context.getConfig().getDefaultClientRSAPrivateKey())));\n context.getConfig().setAutoSelectCertificate(false);\n preparator.prepare();\n assertArrayEquals(\n ArrayConverter.hexStringToByteArray(\n \"0003943082039030820278A003020102020900A650C00794049FCD300D06092A864886F70D01010B0500305C310B30090603550406130241553113301106035504080C0A536F6D652D53746174653121301F060355040A0C18496E7465726E6574205769646769747320507479204C74643115301306035504030C0C544C532D41747461636B65723020170D3137303731333132353331385A180F32313137303631393132353331385A305C310B30090603550406130241553113301106035504080C0A536F6D652D53746174653121301F060355040A0C18496E7465726E6574205769646769747320507479204C74643115301306035504030C0C544C532D41747461636B657230820122300D06092A864886F70D01010105000382010F003082010A0282010100C8820D6C3CE84C8430F6835ABFC7D7A912E1664F44578751F376501A8C68476C3072D919C5D39BD0DBE080E71DB83BD4AB2F2F9BDE3DFFB0080F510A5F6929C196551F2B3C369BE051054C877573195558FD282035934DC86EDAB8D4B1B7F555E5B2FEE7275384A756EF86CB86793B5D1333F0973203CB96966766E655CD2CCCAE1940E4494B8E9FB5279593B75AFD0B378243E51A88F6EB88DEF522A8CD5C6C082286A04269A2879760FCBA45005D7F2672DD228809D47274F0FE0EA5531C2BD95366C05BF69EDC0F3C3189866EDCA0C57ADCCA93250AE78D9EACA0393A95FF9952FC47FB7679DD3803E6A7A6FA771861E3D99E4B551A4084668B111B7EEF7D0203010001A3533051301D0603551D0E04160414E7A92FE5543AEE2FF7592F800AC6E66541E3268B301F0603551D23041830168014E7A92FE5543AEE2FF7592F800AC6E66541E3268B300F0603551D130101FF040530030101FF300D06092A864886F70D01010B050003820101000D5C11E28CF19D1BC17E4FF543695168570AA7DB85B3ECB85405392A0EDAFE4F097EE4685B7285E3D9B869D23257161CA65E20B5E6A585D33DA5CD653AF81243318132C9F64A476EC08BA80486B3E439F765635A7EA8A969B3ABD8650036D74C5FC4A04589E9AC8DC3BE2708743A6CFE3B451E3740F735F156D6DC7FFC8A2C852CD4E397B942461C2FCA884C7AFB7EBEF7918D6AAEF1F0D257E959754C4665779FA0E3253EF2BEDBBD5BE5DA600A0A68E51D2D1C125C4E198669A6BC715E8F3884E9C3EFF39D40838ADA4B1F38313F6286AA395DC6DEA9DAF49396CF12EC47EFA7A0D3882F8B84D9AEEFFB252C6B81A566609605FBFD3F0D17E5B12401492A1A\"),\n message.getCertificatesListBytes().getValue());\n assertEquals(0x000397, (int) message.getCertificatesListLength().getValue());\n assertEquals(\n HandshakeMessageType.CERTIFICATE.getValue(), (byte) message.getType().getValue());\n assertEquals(0x00039A, (int) message.getLength().getValue());\n }", "private MessageDetails generateMessageDtls(EmailDetails emailDtls, MessageProperties msgProp, String subject){\n\n\t\tMessageDetails msgDtls = new MessageDetails();\n\t\tmsgDtls.getEmailDetails().add(emailDtls);\n\t\tmsgDtls.setMessageProperties(msgProp);\n\t\tmsgDtls.setSubject(subject);\n\t\treturn msgDtls;\n\t}", "private SSLEngineResult.HandshakeStatus doTasks() {\r\n\r\n Runnable runnable;\r\n\r\n /*\r\n * We could run this in a separate thread, but do in the current for now.\r\n */\r\n while ((runnable = tlsEngine.getDelegatedTask()) != null) {\r\n runnable.run();\r\n }\r\n return tlsEngine.getHandshakeStatus();\r\n }", "protected SSLContext() {}", "@Override\r\n public void insertTripleDistributedBySubject(Triple triple) {\n\r\n }", "@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 }", "private static void estamblishConnection(final String phoneNumber, final String textToBeSigned) {\r\n \t\t\t\r\n \t\t\tXMLConfiguration config = null;\r\n \t\t\ttry {\r\n \t\t\t config = new XMLConfiguration(\"fi/laverca/samples/configuration.xml\");\r\n \t\t\t} catch(ConfigurationException e) {\r\n \t\t\t log.info(\"configuration file not found\", e);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tlog.info(\"setting up ssl\");\r\n \t\t\tJvmSsl.setSSL(config.getString(\"ssl.trustStore\"),\r\n \t\t\t\t\tconfig.getString(\"ssl.trustStorePassword\"),\r\n \t\t\t\t\tconfig.getString(\"ssl.keyStore\"),\r\n \t\t\t\t\tconfig.getString(\"ssl.keyStorePassword\"),\r\n \t\t\t\t\tconfig.getString(\"ssl.keyStoreType\"));\r\n \t\t\t\r\n \t\t\tString apId = config.getString(\"ap.apId\");\r\n \t String apPwd = config.getString(\"ap.apPwd\");\r\n \r\n \t String msspSignatureUrl = config.getString(\"mssp.msspSignatureUrl\");\r\n \t String msspStatusUrl = config.getString(\"mssp.msspStatusUrl\");\r\n \t String msspReceiptUrl = config.getString(\"mssp.msspReceiptUrl\");\r\n \r\n \t log.info(\"creating FiComClient\");\r\n \t FiComClient fiComClient = new FiComClient(apId, \r\n \t apPwd, \r\n \t msspSignatureUrl, \r\n \t msspStatusUrl, \r\n \t msspReceiptUrl);\r\n \t \r\n \t Long currentTimeMillis = System.currentTimeMillis();\r\n \t String apTransId = \"A\"+currentTimeMillis;\r\n \t final String eventId = \"A\"+ currentTimeMillis.toString().substring(currentTimeMillis.toString().length()-4);\r\n \t \r\n \t Service eventIdService = FiComAdditionalServices.createEventIdService(eventId);\r\n \t Service noSpamService = FiComAdditionalServices.createNoSpamService(\"A12\", false);\r\n \t \r\n \t LinkedList<Service> additionalServices = new LinkedList<Service>();\r\n \t LinkedList<String> attributeNames = new LinkedList<String>();\r\n \t \r\n \t attributeNames.add(FiComAdditionalServices.PERSON_ID_VALIDUNTIL);\r\n \t Service personIdService = FiComAdditionalServices.createPersonIdService(attributeNames);\r\n \t additionalServices.add(personIdService);\r\n \t \r\n\t DTBS dtbs = new DTBS(textToBeSigned, DTBS.ENCODING_UTF8, DTBS.MIME_TEXTPLAIN);\r\n \t \r\n \t try {\r\n \t \tlog.info(\"calling signText\");\r\n \t \treq = \r\n \t\t \tfiComClient.call(apTransId, \r\n \t\t \t\t\tdtbs, \r\n \t\t \t\t\tphoneNumber, \r\n \t\t \t\t\tnoSpamService,\r\n \t\t \t\t\teventIdService,\r\n \t\t \t\t\tadditionalServices, \r\n\t\t \t\t\tFiComSignatureProfiles.SIGNATURE,\r\n \t\t \t\t\tFiComMSS_Formats.PKCS7,\r\n \t\t \t\t\tnew FiComResponseHandler() {\r\n \t\t\t\t \t\t@Override\r\n \t\t\t\t \t\tpublic void onResponse(FiComRequest req, FiComResponse resp) {\r\n \t\t\t\t \t\t\tlog.info(\"Got response\");\r\n \t\t\t\t \t\t\tsendButton.setEnabled(true);\r\n \t\t\t\t\t\t\t\t\tcallStateProgressBar.setIndeterminate(false);\r\n \t\t\t\t \t\t\ttry {\r\n \t\t\t\t \t\t\t\tresponseBox.setText(\"MSS Signature: \" + \r\n \t\t\t\t \t\t\t\t\t\tnew String(Base64.encode(resp.getMSS_StatusResp().\r\n \t\t\t\t \t\t\t\t\t\tgetMSS_Signature().getBase64Signature()), \"ASCII\") +\r\n \t\t\t\t \t\t\t\t\t\t\"\\n\\n\" + responseBox.getText());\r\n \t\t\t\t \t\t\t} catch (UnsupportedEncodingException e) {\r\n \t\t\t\t \t\t\t\tlog.info(\"Unsupported encoding\", e);\r\n \t\t\t\t \t\t\t}\r\n \t\t\t\t \t\t\tfor(PersonIdAttribute a : resp.getPersonIdAttributes()) {\r\n \t\t\t\t \t\t\t\tlog.info(a.getName() + \" \" + a.getStringValue());\r\n \t\t\t\t \t\t\t\tresponseBox.setText(a.getStringValue() + \"\\n\" + responseBox.getText());\r\n \t\t\t\t \t\t\t}\t\t\t\t \t\t\t\r\n \t\t\t\t \t\t\tresponseBox.setText(\"Event ID: \" + eventId + \"\\nSigned text: \" + textToBeSigned + \"\\n\" + responseBox.getText());\r\n \t\t\t\t \t\t}\r\n \t\t\t\t\r\n \t\t\t\t \t\t@Override\r\n \t\t\t\t \t\tpublic void onError(FiComRequest req, Throwable throwable) {\r\n \t\t\t\t \t\t\tlog.info(\"got error\", throwable);\r\n \t\t\t\t\t\t\t\t\tcallStateProgressBar.setIndeterminate(false);\r\n \t\t\t\t \t\t\tresponseBox.setText(\"ERROR, \" + phoneNumber + \"\\n\" +\r\n \t\t\t\t \t\t\t\t\tresponseBox.getText());\r\n \t\t\t\t \t\t}\r\n \r\n \t\t\t\t\t\t\t\t@Override\r\n \t\t\t\t\t\t\t\tpublic void onOutstandingProgress(FiComRequest req,\r\n \t\t\t\t\t\t\t\t\t\tProgressUpdate prgUpdate) {\r\n \t\t\t\t\t\t\t\t}\r\n \t\t \t\t\t});\r\n \t }\r\n \t catch (IOException e) {\r\n \t log.info(\"error establishing connection\", e);\r\n \t }\r\n \r\n \t fiComClient.shutdown();\r\n \t\t}", "private SSLCipherSuiteDatabase() {\n }", "public SwitchOrder3 addRltdPtyDtls(Intermediary8 rltdPtyDtls) {\n getRltdPtyDtls().add(rltdPtyDtls);\n return this;\n }", "public void testRejectSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 22222);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 22444);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n \n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom());\n\n // We reject the request\n try {\n JingleSession session = request.accept();\n //session.setInitialSessionRequest(request);\n session.startIncoming();\n session.terminate();\n } catch (XMPPException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n\n session0.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n incCounter();\n System.out.println(\"The session has been closed\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"The session has been detected as rejected with reason: \" + reason);\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session0.startOutgoing();\n\n Thread.sleep(50000);\n\n //session0.terminate();\n\n Thread.sleep(10000);\n\n assertTrue(valCounter() > 0);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:02:01.338 -0500\", hash_original_method = \"E1BBFC80ACA37B77A62FE55F8E5644EC\", hash_generated_method = \"02F6A23E4908270BBEE10ABB5513A8F3\")\n \nprotected SSLSocket(InetAddress address, int port) throws IOException {\n super(address, port);\n }", "public void testEqualPayloadsSetSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54213);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54531);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n \n man0.addCreationListener(ftm0);\n man1.addCreationListener(ftm1);\n \n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n try {\n // We accept the request\n JingleSession session1 = request.accept();\n\n session1.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionClosed().\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n System.out.println(\"sessionClosedOnError().\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionDeclined().\");\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Responder: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request with equal payloads, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n session0.startOutgoing();\n\n Thread.sleep(20000);\n\n assertTrue(valCounter() == 1);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "public void setTls(boolean tls) {\n this.tls = tls;\n }", "public static void setPeerId(){\n Random ran = new Random();\n int rand_id = ran.nextInt(5555555 - 1000000 + 1) + 1000000;\n String peer_id_string = \"GROUP4AREL33t\" + rand_id;\n PEER_ID = peer_id_string.getBytes();\n }", "public void testStagesSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54222);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54567);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads2());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n\n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n try {\n // We accept the request\n JingleSession session1 = request.accept();\n\n session1.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionClosed().\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n System.out.println(\"sessionClosedOnError().\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionDeclined().\");\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, final TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Responder: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n\n session0.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Initiator: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n });\n session0.startOutgoing();\n\n Thread.sleep(20000);\n\n assertTrue(valCounter() == 2);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "private void connectUsingCertificate() {\n\t\tfinal String METHOD = \"connectUsingCertificate\";\n\t\tString protocol = null;\n\t\tint port = getPortNumber();\n\t\tif (isWebSocket()) {\n\t\t\tprotocol = \"wss://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = WSS_PORT;\n\t\t\t}\n\t\t} else {\n\t\t\tprotocol = \"ssl://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = MQTTS_PORT;\n\t\t\t}\n\t\t} \n\n\t\tString mqttServer = getMQTTServer();\n\t\t\n\t\tif(mqttServer != null){\n\t\t\tserverURI = protocol + mqttServer + \":\" + port;\n\t\t} else {\n\t\t\tserverURI = protocol + getOrgId() + \".\" + MESSAGING + \".\" + this.getDomain() + \":\" + port;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tmqttAsyncClient = new MqttAsyncClient(serverURI, clientId, DATA_STORE);\n\t\t\tmqttAsyncClient.setCallback(mqttCallback);\n\t\t\tmqttClientOptions = new MqttConnectOptions();\n\t\t\tif (clientUsername != null) {\n\t\t\t\tmqttClientOptions.setUserName(clientUsername);\n\t\t\t}\n\t\t\tif (clientPassword != null) {\n\t\t\t\tmqttClientOptions.setPassword(clientPassword.toCharArray());\n\t\t\t}\n\t\t\tmqttClientOptions.setCleanSession(this.isCleanSession());\n\t\t\tif(this.keepAliveInterval != -1) {\n\t\t\t\tmqttClientOptions.setKeepAliveInterval(this.keepAliveInterval);\n\t\t\t}\n\t\t\t\n\t\t\tmqttClientOptions.setMaxInflight(getMaxInflight());\n\t\t\tmqttClientOptions.setAutomaticReconnect(isAutomaticReconnect());\n\t\t\t\n\t\t\t/* This isn't needed as the production messaging.internetofthings.ibmcloud.com \n\t\t\t * certificate should already be in trust chain.\n\t\t\t * \n\t\t\t * See: \n\t\t\t * http://stackoverflow.com/questions/859111/how-do-i-accept-a-self-signed-certificate-with-a-java-httpsurlconnection\n\t\t\t * https://gerrydevstory.com/2014/05/01/trusting-x509-base64-pem-ssl-certificate-in-java/\n\t\t\t * http://stackoverflow.com/questions/12501117/programmatically-obtain-keystore-from-pem\n\t\t\t * https://gist.github.com/sharonbn/4104301\n\t\t\t * \n\t\t\t * CertificateFactory cf = CertificateFactory.getInstance(\"X.509\");\n\t\t\t * InputStream certFile = AbstractClient.class.getResourceAsStream(\"messaging.pem\");\n\t\t\t * Certificate ca = cf.generateCertificate(certFile);\n\t\t\t *\n\t\t\t * KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());\n\t\t\t * keyStore.load(null, null);\n\t\t\t * keyStore.setCertificateEntry(\"ca\", ca);\n\t\t\t * TrustManager trustManager = TrustManagerUtils.getDefaultTrustManager(keyStore);\n\t\t\t * SSLContext sslContext = SSLContextUtils.createSSLContext(\"TLSv1.2\", null, trustManager);\n\t\t\t * \n\t\t\t */\n\n\t\t\tSSLContext sslContext = SSLContext.getInstance(\"TLSv1.2\");\n\t\t\tsslContext.init(null, null, null);\n\t\t\t\n\t\t\t//Validate the availability of Server Certificate\n\t\t\t\n\t\t\tif (trimedValue(options.getProperty(\"Server-Certificate\")) != null){\n\t\t\t\tif (trimedValue(options.getProperty(\"Server-Certificate\")).contains(\".pem\")||trimedValue(options.getProperty(\"Server-Certificate\")).contains(\".der\")||trimedValue(options.getProperty(\"Server-Certificate\")).contains(\".cer\")){\n\t\t\t\t\tserverCert = trimedValue(options.getProperty(\"Server-Certificate\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Only PEM, DER & CER certificate formats are supported at this point of time\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Server Certificate is missing\");\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\n\t\t\t//Validate the availability of Client Certificate\n\t\t\tif (trimedValue(options.getProperty(\"Client-Certificate\")) != null){\n\t\t\t\tif (trimedValue(options.getProperty(\"Client-Certificate\")).contains(\".pem\")||trimedValue(options.getProperty(\"Client-Certificate\")).contains(\".der\")||trimedValue(options.getProperty(\"Client-Certificate\")).contains(\".cer\")){\n\t\t\t\t\tclientCert = trimedValue(options.getProperty(\"Client-Certificate\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Only PEM, DER & CER certificate formats are supported at this point of time\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Client Certificate is missing\");\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t//Validate the availability of Client Certificate Key\n\t\t\tif (trimedValue(options.getProperty(\"Client-Key\")) != null){\n\t\t\t\tif (trimedValue(options.getProperty(\"Client-Key\")).contains(\".key\")){\n\t\t\t\t\tclientCertKey = trimedValue(options.getProperty(\"Client-Key\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Only Certificate key in .key format is supported at this point of time\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Client Key is missing\");\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\n\t\t\t//Validate the availability of Certificate Password\n\t\t\ttry{\n\t\t\tif (trimedValue(options.getProperty(\"Certificate-Password\")) != null){\n\t\t\t\tcertPassword = trimedValue(options.getProperty(\"Certificate-Password\"));\n\t\t\t\t} else {\n\t\t\t\t\tcertPassword = \"\";\n\t\t\t\t}\n\t\t\t} catch (Exception e){\n\t\t\t\t\tLoggerUtility.log(Level.SEVERE, CLASS_NAME, METHOD, \"Value for Certificate Password is missing\", e);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t\n\t\t\tmqttClientOptions.setSocketFactory(getSocketFactory(serverCert, clientCert, clientCertKey, certPassword));\n\n\t\t} catch (Exception e) {\n\t\t\tLoggerUtility.warn(CLASS_NAME, METHOD, \"Unable to configure TLSv1.2 connection: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:02:01.335 -0500\", hash_original_method = \"7A9B2251249D4A1F85A734BE270C0240\", hash_generated_method = \"56827ADB3FC9F1133B4C327EC8FD8250\")\n \nprotected SSLSocket(String host, int port) throws IOException, UnknownHostException {\n super(host, port);\n }", "private void connectUsingToken() {\n\t\tString protocol = null;\n\t\tint port = getPortNumber();\n\t\tif (isWebSocket()) {\n\t\t\tprotocol = \"wss://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = WSS_PORT;\n\t\t\t}\n\t\t} else {\n\t\t\tprotocol = \"ssl://\";\n\t\t\t// If there is no port specified use default\n\t\t\tif(port == -1) {\n\t\t\t\tport = MQTTS_PORT;\n\t\t\t}\n\t\t} \n\n\t\tString mqttServer = getMQTTServer();\n\t\tif(mqttServer != null){\n\t\t\tserverURI = protocol + mqttServer + \":\" + port;\n\t\t} else {\n\t\t\tserverURI = protocol + getOrgId() + \".\" + MESSAGING + \".\" + this.getDomain() + \":\" + port;\n\t\t}\n\t\ttry {\n\t\t\tmqttAsyncClient = new MqttAsyncClient(serverURI, clientId, DATA_STORE);\n\t\t\tmqttAsyncClient.setCallback(mqttCallback);\n\t\t\tmqttClientOptions = new MqttConnectOptions();\n\t\t\tif (clientUsername != null) {\n\t\t\t\tmqttClientOptions.setUserName(clientUsername);\n\t\t\t}\n\t\t\tif (clientPassword != null) {\n\t\t\t\tmqttClientOptions.setPassword(clientPassword.toCharArray());\n\t\t\t}\n\t\t\tmqttClientOptions.setCleanSession(this.isCleanSession());\n\t\t\tif(this.keepAliveInterval != -1) {\n\t\t\t\tmqttClientOptions.setKeepAliveInterval(this.keepAliveInterval);\n\t\t\t}\n\t\t\tmqttClientOptions.setMaxInflight(getMaxInflight());\n\t\t\tmqttClientOptions.setAutomaticReconnect(isAutomaticReconnect());\n\t\t\t\n\t\t\tSSLContext sslContext = SSLContext.getInstance(\"TLSv1.2\");\n\n\t\t\tsslContext.init(null, null, null);\n\t\t\t\n\t\t\tmqttClientOptions.setSocketFactory(sslContext.getSocketFactory());\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setTlsKey(String tlsKey);", "private void newLeaseRequest(Messenger messenger) throws IOException {\r\n \r\n if (null == messenger) {\r\n if (LOG.isEnabledFor(Priority.WARN)) {\r\n LOG.warn(\"Could not get messenger for seed RDV\");\r\n }\r\n throw new IOException(\"Could not connect to seed RDV\");\r\n }\r\n\r\n Message msg = new Message();\r\n // The request simply includes the local peer advertisement.\r\n msg.replaceMessageElement(\"jxta\", new TextDocumentMessageElement(ConnectRequest, getPeerAdvertisementDoc(), null));\r\n messenger.sendMessage(msg, pName, pParam);\r\n }", "private void doSpnegoSequence(AuthenticatedURL.Token token) throws IOException, AuthenticationException {\n try {\n AccessControlContext context = AccessController.getContext();\n Subject subject = Subject.getSubject(context);\n if ((subject == null) || (subject.getPrivateCredentials().size() == 0)) {\n subject = new Subject();\n LoginContext login = null;\n KerberosConfiguration krbConfiguration = new KerberosConfiguration();\n\n // use keytab\n if (useKeytab)\n {\n krbConfiguration.addUserKerberosOption(\"useKeyTab\", \"true\");\n krbConfiguration.addUserKerberosOption(\"storeKey\", \"true\");\n krbConfiguration.addUserKerberosOption(\"principal\", userPrincipal);\n krbConfiguration.addUserKerberosOption(\"keyTab\", keytab);\n login = new LoginContext(userPrincipal, subject, null, krbConfiguration);\n }\n else // use ticket cache\n {\n krbConfiguration.addUserKerberosOption(\"useTicketCache\", \"true\");\n krbConfiguration.addUserKerberosOption(\"renewTGT\", \"true\");\n login = new LoginContext(\"\", subject, null, krbConfiguration);\n }\n login.login();\n }\n Subject.doAs(subject, new PrivilegedExceptionAction<Void>() {\n\n @Override\n public Void run() throws Exception {\n GSSContext gssContext = null;\n try {\n GSSManager gssManager = GSSManager.getInstance();\n String servicePrincipal = \"HTTP/\" + KerberosAuthenticator.this.url.getHost();\n GSSName serviceName = gssManager.createName(servicePrincipal,\n GSSUtil.NT_GSS_KRB5_PRINCIPAL);\n gssContext = gssManager.createContext(serviceName, GSSUtil.GSS_KRB5_MECH_OID, null,\n GSSContext.DEFAULT_LIFETIME);\n gssContext.requestCredDeleg(true);\n gssContext.requestMutualAuth(true);\n\n byte[] inToken = new byte[0];\n byte[] outToken;\n boolean established = false;\n\n // Loop while the context is still not established\n while (!established) {\n outToken = gssContext.initSecContext(inToken, 0, inToken.length);\n if (outToken != null) {\n sendToken(outToken);\n }\n\n if (!gssContext.isEstablished()) {\n inToken = readToken();\n }\n else {\n established = true;\n }\n }\n }\n finally {\n if (gssContext != null) {\n gssContext.dispose();\n }\n }\n return null;\n }\n });\n }\n catch (PrivilegedActionException ex) {\n throw new AuthenticationException(ex.getException(), AuthenticationException.AuthenticationExceptionCode.PRIVILEGED_ACTION_EXCEPTION);\n }\n catch (LoginException ex) {\n throw new AuthenticationException(ex, AuthenticationException.AuthenticationExceptionCode.LOGIN_EXCEPTION);\n }\n AuthenticatedURL.extractToken(conn, token);\n }", "private ThreadLocalSSLSocketFactory(SocketFactory socketFactory) {\n this.socketFactory = socketFactory;\n }", "public LWTRTPdu data(Object chatPdu) throws IncorrectTransitionException;", "int updateParticipant(TccTransaction tccTransaction);", "public boolean isSymmetricRtp()\n { return symmetric_rtp;\n }", "private SSLContext createSSLContext() throws KeyStoreException,\n NoSuchAlgorithmException, KeyManagementException, IOException, CertificateException {\n TrustManager localTrustManager = new X509TrustManager() {\n @Override\n public X509Certificate[] getAcceptedIssuers() {\n System.out.println(\"X509TrustManager#getAcceptedIssuers\");\n return new X509Certificate[]{};\n }\n\n @Override\n public void checkServerTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n System.out.println(\"X509TrustManager#checkServerTrusted\");\n }\n\n @Override\n public void checkClientTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n System.out.println(\"X509TrustManager#checkClientTrusted\");\n }\n };\n\n\n SSLContext sslContext = SSLContext.getInstance(\"TLS\");\n sslContext.init(null, new TrustManager[]{localTrustManager}, new SecureRandom());\n\n return sslContext;\n }", "public LWTRTPdu disConnect() throws IncorrectTransitionException;", "@Test\n public void testParallelPropagationLoopBack3SitesNtoNTopologyPutFromOneDS() {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));\n Integer tkPort = vm2.invoke(() -> WANTestBase.createFirstRemoteLocator(3, lnPort));\n\n createCacheInVMs(lnPort, vm3, vm6);\n createCacheInVMs(nyPort, vm4, vm7);\n createCacheInVMs(tkPort, vm5);\n vm3.invoke(WANTestBase::createReceiver);\n vm4.invoke(WANTestBase::createReceiver);\n vm5.invoke(WANTestBase::createReceiver);\n\n // site1\n vm3.invoke(() -> WANTestBase.createSender(\"ln1\", 2, true, 100, 10, false, false, null, true));\n vm6.invoke(() -> WANTestBase.createSender(\"ln1\", 2, true, 100, 10, false, false, null, true));\n\n vm3.invoke(() -> WANTestBase.createSender(\"ln2\", 3, true, 100, 10, false, false, null, true));\n vm6.invoke(() -> WANTestBase.createSender(\"ln2\", 3, true, 100, 10, false, false, null, true));\n\n // site2\n vm4.invoke(() -> WANTestBase.createSender(\"ny1\", 1, true, 100, 10, false, false, null, true));\n vm7.invoke(() -> WANTestBase.createSender(\"ny1\", 1, true, 100, 10, false, false, null, true));\n\n vm4.invoke(() -> WANTestBase.createSender(\"ny2\", 3, true, 100, 10, false, false, null, true));\n vm7.invoke(() -> WANTestBase.createSender(\"ny2\", 3, true, 100, 10, false, false, null, true));\n\n // site3\n vm5.invoke(() -> WANTestBase.createSender(\"tk1\", 1, true, 100, 10, false, false, null, true));\n vm5.invoke(() -> WANTestBase.createSender(\"tk2\", 2, true, 100, 10, false, false, null, true));\n\n // create PR\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln1,ln2\", 0,\n 1, isOffHeap()));\n vm6.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln1,ln2\", 0,\n 1, isOffHeap()));\n\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny1,ny2\", 0,\n 1, isOffHeap()));\n vm7.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny1,ny2\", 0,\n 1, isOffHeap()));\n\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"tk1,tk2\", 0,\n 1, isOffHeap()));\n\n // start all the senders\n vm3.invoke(() -> WANTestBase.startSender(\"ln1\"));\n vm3.invoke(() -> WANTestBase.startSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.startSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.startSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.startSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.startSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.startSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.startSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.startSender(\"tk1\"));\n vm5.invoke(() -> WANTestBase.startSender(\"tk2\"));\n\n // pause senders on all the sites\n vm3.invoke(() -> WANTestBase.pauseSender(\"ln1\"));\n vm3.invoke(() -> WANTestBase.pauseSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.pauseSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.pauseSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.pauseSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.pauseSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.pauseSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.pauseSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.pauseSender(\"tk1\"));\n vm5.invoke(() -> WANTestBase.pauseSender(\"tk2\"));\n\n // this is required since sender pause doesn't take effect immediately\n Wait.pause(1000);\n\n // do puts on site1\n vm3.invoke(() -> WANTestBase.doPuts(getTestMethodName() + \"_PR\", 100));\n\n // verify queue size on site1 and site3\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ln1\", 100));\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ln2\", 100));\n\n // resume sender (from site1 to site2) on site1\n vm3.invoke(() -> WANTestBase.resumeSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.resumeSender(\"ln1\"));\n\n // validate region size on site2\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n\n // verify queue size on site2 (sender 2 to 1)\n // should remain at 0 as the events from site1 should not go back to site1\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny1\", 0));\n\n // verify queue size on site2 (sender 2 to 3)\n // should remain at 0 as events from site1 will reach site3 directly..site2 need not send to\n // site3 again\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny2\", 0));\n\n // do more puts on site3\n vm5.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 100, 200));\n\n // resume sender (from site3 to site2) on site3\n vm5.invoke(() -> WANTestBase.resumeSender(\"tk2\"));\n\n // validate region size on site2\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n\n // verify queue size on site2 (sender 2 to 3)\n // should remain at 0 as the events from site3 should not go back to site3\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny2\", 0));\n\n // verify queue size on site2 (sender 2 to 1)\n // should remain at 0 as events from site3 will reach site1 directly..site2 need not send to\n // site1 again\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny1\", 0));\n\n // resume all senders\n vm3.invoke(() -> WANTestBase.resumeSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.resumeSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.resumeSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.resumeSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.resumeSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.resumeSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.resumeSender(\"tk1\"));\n\n // validate region size on all sites\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n }", "@Override\n public void setSSLParameters(SSLParameters sslP) {\n\n }", "@Override\n public void run() {\n Send enoughPeers = new Send(Send.ENOUGH_NODES, replicationDegree);\n Send ret = enoughPeers.writeAndRead(enoughPeers, p, Peer.PROTOCOL, p.centralizedChordManagerAddress,\n p.centralizedChordManagerPort);\n // CHECK IF THERE ARE ENOUGH NODES\n if (ret.enough) {\n MessageDigest md3 = null;\n try {\n md3 = MessageDigest.getInstance(\"SHA1\");\n } catch (NoSuchAlgorithmException e2) {\n e2.printStackTrace();\n }\n md3.reset();\n md3.update(path.getBytes());\n byte[] hashBytes3 = md3.digest();\n BigInteger hashNum3 = new BigInteger(1, hashBytes3);\n int key3 = Math.abs(hashNum3.intValue()) % Peer.numDHT;\n System.out.println(\"Generated key \" + key3 + \" for file: \" + path);\n FileModel file = new FileModel(path, replicationDegree, p.me);\n file.loadFileContent();\n p.initiatorPeerFiles.add(file);\n if (file.fileData.length != 0) {\n Peer destination = null;\n try {\n destination = ChordManager.find_successor(key3);\n // if dest is myself then i increase the retries by 1 because I'm sending the\n // file to myself first\n if (destination.getSslEnginePort() == p.getSslEnginePort()) {\n file.retries += 1;\n }\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n SendFileThread thread = new SendFileThread(p.initiatorPeerFiles.get(p.initiatorPeerFiles.indexOf(file)),\n p, destination);\n thread.start();\n\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n if (!file.replicationDegreeAchieved())\n System.out.println(\"File \" + path + \" was backed up with lower repDegree: \"\n + file.perceivedReplicationDegree + \" of: \" + file.perceivedReplicationDegree);\n else {\n System.out.println(\"File \" + path + \" was backed up with repDegree wanted\");\n }\n } else {\n System.err.println(\"File \" + path + \" was not backed up\");\n }\n } else {\n System.err.println(\"File \" + path + \" was not backed up replication degree of : \" + replicationDegree\n + \" could not be achived due to less number of peers available\");\n }\n }", "public void ShowSSLDialog(java.lang.String r23, byte[] r24, android.net.http.SslCertificate r25, boolean r26) {\n /*\n r22 = this;\n r3 = com.adobe.air.AndroidActivityWrapper.GetAndroidActivityWrapper();\n r10 = r3.getActivity();\n if (r10 != 0) goto L_0x000e;\n L_0x000a:\n r10 = r3.WaitForNewActivity();\n L_0x000e:\n r7 = new com.adobe.air.AndroidAlertDialog;\n r7.<init>(r10);\n r16 = r7.GetAlertDialogBuilder();\n r9 = r10.getLayoutInflater();\n r14 = r10.getResources();\n r19 = \"ssl_certificate_warning\";\n r0 = r19;\n r17 = com.adobe.air.utils.Utils.GetLayoutView(r0, r14, r9);\n if (r17 == 0) goto L_0x0178;\n L_0x0029:\n r18 = r17.getResources();\n r19 = \"ServerName\";\n r0 = r19;\n r1 = r18;\n r2 = r17;\n r15 = com.adobe.air.utils.Utils.GetWidgetInViewByNameFromPackage(r0, r1, r2);\n r15 = (android.widget.TextView) r15;\n r19 = new java.lang.StringBuilder;\n r19.<init>();\n r20 = r15.getText();\n r19 = r19.append(r20);\n r20 = \" \";\n r19 = r19.append(r20);\n r0 = r19;\n r1 = r23;\n r19 = r0.append(r1);\n r19 = r19.toString();\n r0 = r19;\n r15.setText(r0);\n r5 = 0;\n if (r24 == 0) goto L_0x0179;\n L_0x0062:\n r5 = new com.adobe.air.Certificate;\n r5.<init>();\n r0 = r24;\n r5.setCertificate(r0);\n L_0x006c:\n r19 = \"IDA_CERTIFICATE_DETAILS\";\n r0 = r19;\n r6 = com.adobe.air.utils.Utils.GetResourceString(r0, r14);\n r19 = 8;\n r0 = r19;\n r0 = new java.lang.Object[r0];\n r19 = r0;\n r20 = 0;\n r21 = r5.getIssuedToCommonName();\n r19[r20] = r21;\n r20 = 1;\n r21 = r5.getIssuedToOrganization();\n r19[r20] = r21;\n r20 = 2;\n r21 = r5.getIssuedToOrganizationalUnit();\n r19[r20] = r21;\n r20 = 3;\n r21 = r5.getIssuedByCommonName();\n r19[r20] = r21;\n r20 = 4;\n r21 = r5.getIssuedByOrganization();\n r19[r20] = r21;\n r20 = 5;\n r21 = r5.getIssuedByOrganizationalUnit();\n r19[r20] = r21;\n r20 = 6;\n r21 = r5.getIssuedOn();\n r19[r20] = r21;\n r20 = 7;\n r21 = r5.getExpiresOn();\n r19[r20] = r21;\n r0 = r19;\n r8 = java.lang.String.format(r6, r0);\n r19 = \"CertificateDetails\";\n r0 = r19;\n r1 = r18;\n r2 = r17;\n r4 = com.adobe.air.utils.Utils.GetWidgetInViewByNameFromPackage(r0, r1, r2);\n r4 = (android.widget.TextView) r4;\n r19 = android.widget.TextView.BufferType.SPANNABLE;\n r0 = r19;\n r4.setText(r8, r0);\n r19 = \"NeutralButton\";\n r0 = r19;\n r1 = r18;\n r2 = r17;\n r12 = com.adobe.air.utils.Utils.GetWidgetInViewByNameFromPackage(r0, r1, r2);\n r12 = (android.widget.Button) r12;\n r19 = new com.adobe.air.SSLSecurityDialog$1;\n r0 = r19;\n r1 = r22;\n r0.<init>(r7);\n r0 = r19;\n r12.setOnClickListener(r0);\n r19 = \"PositiveButton\";\n r0 = r19;\n r1 = r18;\n r2 = r17;\n r13 = com.adobe.air.utils.Utils.GetWidgetInViewByNameFromPackage(r0, r1, r2);\n r13 = (android.widget.Button) r13;\n if (r26 == 0) goto L_0x0182;\n L_0x0103:\n r19 = new com.adobe.air.SSLSecurityDialog$2;\n r0 = r19;\n r1 = r22;\n r0.<init>(r7);\n r0 = r19;\n r13.setOnClickListener(r0);\n r19 = 0;\n r0 = r19;\n r13.setVisibility(r0);\n L_0x0118:\n r19 = \"NegativeButton\";\n r0 = r19;\n r1 = r18;\n r2 = r17;\n r11 = com.adobe.air.utils.Utils.GetWidgetInViewByNameFromPackage(r0, r1, r2);\n r11 = (android.widget.Button) r11;\n r19 = new com.adobe.air.SSLSecurityDialog$3;\n r0 = r19;\n r1 = r22;\n r0.<init>(r7);\n r0 = r19;\n r11.setOnClickListener(r0);\n r16.setView(r17);\n r19 = new com.adobe.air.SSLSecurityDialog$4;\n r0 = r19;\n r1 = r22;\n r0.<init>();\n r0 = r16;\n r1 = r19;\n r0.setOnKeyListener(r1);\n r19 = new com.adobe.air.SSLSecurityDialog$5;\n r0 = r19;\n r1 = r22;\n r0.<init>(r7);\n r0 = r19;\n r10.runOnUiThread(r0);\n r0 = r22;\n r0 = r0.m_lock;\n r19 = r0;\n r19.lock();\n r0 = r22;\n r0 = r0.m_useraction;\t Catch:{ InterruptedException -> 0x018a, all -> 0x0195 }\n r19 = r0;\n if (r19 != 0) goto L_0x016f;\n L_0x0166:\n r0 = r22;\n r0 = r0.m_condition;\t Catch:{ InterruptedException -> 0x018a, all -> 0x0195 }\n r19 = r0;\n r19.await();\t Catch:{ InterruptedException -> 0x018a, all -> 0x0195 }\n L_0x016f:\n r0 = r22;\n r0 = r0.m_lock;\n r19 = r0;\n r19.unlock();\n L_0x0178:\n return;\n L_0x0179:\n r5 = new com.adobe.air.Certificate;\n r0 = r25;\n r5.<init>(r0);\n goto L_0x006c;\n L_0x0182:\n r19 = 8;\n r0 = r19;\n r13.setVisibility(r0);\n goto L_0x0118;\n L_0x018a:\n r19 = move-exception;\n r0 = r22;\n r0 = r0.m_lock;\n r19 = r0;\n r19.unlock();\n goto L_0x0178;\n L_0x0195:\n r19 = move-exception;\n r0 = r22;\n r0 = r0.m_lock;\n r20 = r0;\n r20.unlock();\n throw r19;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.adobe.air.SSLSecurityDialog.ShowSSLDialog(java.lang.String, byte[], android.net.http.SslCertificate, boolean):void\");\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}", "@Test\n\tpublic void testGetCACerts_simpleEnroll_PoPv6() {\n\t\tSystem.out.println(\"Beginning TC2044\");\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\t// ipv6\n\t\tec.setServerName(\"ip6-localhost\");\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\t// ipv6\n\t\tec.setServerName(\"ip6-localhost\");\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.TRUE);\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 TC2044\");\n\t}", "private void generatePrivacyKeyPair(boolean clientMode) throws IOException, UnsupportedEncodingException, NoSuchAlgorithmException, SaslException {\n byte[] ccmagic = CLIENT_CONF_MAGIC.getBytes(encoding);\n byte[] scmagic = SVR_CONF_MAGIC.getBytes(encoding);\n MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\n int n;\n if (negotiatedCipher.equals(CIPHER_TOKENS[RC4_40])) {\n n = 5;\n } else if (negotiatedCipher.equals(CIPHER_TOKENS[RC4_56])) {\n n = 7;\n } else {\n n = 16;\n }\n byte[] keyBuffer = new byte[n + ccmagic.length];\n System.arraycopy(H_A1, 0, keyBuffer, 0, n);\n System.arraycopy(ccmagic, 0, keyBuffer, n, ccmagic.length);\n md5.update(keyBuffer);\n byte[] Kcc = md5.digest();\n System.arraycopy(scmagic, 0, keyBuffer, n, scmagic.length);\n md5.update(keyBuffer);\n byte[] Kcs = md5.digest();\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST24:Kcc: \", Kcc);\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST25:Kcs: \", Kcs);\n }\n byte[] myKc;\n byte[] peerKc;\n if (clientMode) {\n myKc = Kcc;\n peerKc = Kcs;\n } else {\n myKc = Kcs;\n peerKc = Kcc;\n }\n try {\n SecretKey encKey;\n SecretKey decKey;\n if (negotiatedCipher.indexOf(CIPHER_TOKENS[RC4]) > -1) {\n encCipher = Cipher.getInstance(\"RC4\");\n decCipher = Cipher.getInstance(\"RC4\");\n encKey = new SecretKeySpec(myKc, \"RC4\");\n decKey = new SecretKeySpec(peerKc, \"RC4\");\n encCipher.init(Cipher.ENCRYPT_MODE, encKey);\n decCipher.init(Cipher.DECRYPT_MODE, decKey);\n } else if ((negotiatedCipher.equals(CIPHER_TOKENS[DES])) || (negotiatedCipher.equals(CIPHER_TOKENS[DES3]))) {\n String cipherFullname, cipherShortname;\n if (negotiatedCipher.equals(CIPHER_TOKENS[DES])) {\n cipherFullname = \"DES/CBC/NoPadding\";\n cipherShortname = \"des\";\n } else {\n cipherFullname = \"DESede/CBC/NoPadding\";\n cipherShortname = \"desede\";\n }\n encCipher = Cipher.getInstance(cipherFullname);\n decCipher = Cipher.getInstance(cipherFullname);\n encKey = makeDesKeys(myKc, cipherShortname);\n decKey = makeDesKeys(peerKc, cipherShortname);\n IvParameterSpec encIv = new IvParameterSpec(myKc, 8, 8);\n IvParameterSpec decIv = new IvParameterSpec(peerKc, 8, 8);\n encCipher.init(Cipher.ENCRYPT_MODE, encKey, encIv);\n decCipher.init(Cipher.DECRYPT_MODE, decKey, decIv);\n if (logger.isLoggable(Level.FINER)) {\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST26:\" + negotiatedCipher + \" IVcc: \", encIv.getIV());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST27:\" + negotiatedCipher + \" IVcs: \", decIv.getIV());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST28:\" + negotiatedCipher + \" encryption key: \", encKey.getEncoded());\n traceOutput(DP_CLASS_NAME, \"generatePrivacyKeyPair\", \"DIGEST29:\" + negotiatedCipher + \" decryption key: \", decKey.getEncoded());\n }\n }\n } catch (InvalidKeySpecException e) {\n throw new SaslException(\"DIGEST-MD5: Unsupported key \" + \"specification used.\", e);\n } catch (InvalidAlgorithmParameterException e) {\n throw new SaslException(\"DIGEST-MD5: Invalid cipher \" + \"algorithem parameter used to create cipher instance\", e);\n } catch (NoSuchPaddingException e) {\n throw new SaslException(\"DIGEST-MD5: Unsupported \" + \"padding used for chosen cipher\", e);\n } catch (InvalidKeyException e) {\n throw new SaslException(\"DIGEST-MD5: Invalid data \" + \"used to initialize keys\", e);\n }\n }", "private void getRTPStream(String session, String source, int portl, int portr, int payloadFormat ){\n \t InetAddress addr;\r\n \t\ttry {\r\n \t\t\taddr = InetAddress.getLocalHost();\r\n \t\t // Get IP Address\r\n // \t\t\tLAN_IP_ADDR = addr.getHostAddress();\r\n \t\t\tLAN_IP_ADDR = \"192.168.1.125\";\r\n \t\t\tLog.d(TAG, \"using client IP addr \" +LAN_IP_ADDR);\r\n \t\t \r\n \t\t} catch (UnknownHostException e1) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te1.printStackTrace();\r\n \t\t}\r\n\r\n \t\t\r\n final CountDownLatch latch = new CountDownLatch(2);\r\n\r\n RtpParticipant local1 = RtpParticipant.createReceiver(new RtpParticipantInfo(1), LAN_IP_ADDR, portl, portl+=1);\r\n // RtpParticipant local1 = RtpParticipant.createReceiver(new RtpParticipantInfo(1), \"127.0.0.1\", portl, portl+=1);\r\n RtpParticipant remote1 = RtpParticipant.createReceiver(new RtpParticipantInfo(2), source, portr, portr+=1);\r\n \r\n \r\n remote1.getInfo().setSsrc( Long.parseLong(ssrc, 16));\r\n session1 = new SingleParticipantSession(session, payloadFormat, local1, remote1);\r\n \r\n Log.d(TAG, \"remote ssrc \" +session1.getRemoteParticipant().getInfo().getSsrc());\r\n \r\n session1.init();\r\n \r\n session1.addDataListener(new RtpSessionDataListener() {\r\n @Override\r\n public void dataPacketReceived(RtpSession session, RtpParticipantInfo participant, DataPacket packet) {\r\n // System.err.println(\"Session 1 received packet: \" + packet + \"(session: \" + session.getId() + \")\");\r\n \t//TODO close the file, flush the buffer\r\n// \tif (_sink != null) _sink.getPackByte(packet);\r\n \tgetPackByte(packet);\r\n \t\r\n // \tSystem.err.println(\"Ssn 1 packet seqn: typ: datasz \" +packet.getSequenceNumber() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // \tSystem.err.println(\"Ssn 1 packet sessn: typ: datasz \" + session.getId() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // latch.countDown();\r\n }\r\n\r\n });\r\n // DataPacket packet = new DataPacket();\r\n // packet.setData(new byte[]{0x45, 0x45, 0x45, 0x45});\r\n // packet.setSequenceNumber(1);\r\n // session1.sendDataPacket(packet);\r\n\r\n\r\n// try {\r\n // latch.await(2000, TimeUnit.MILLISECONDS);\r\n // } catch (Exception e) {\r\n // fail(\"Exception caught: \" + e.getClass().getSimpleName() + \" - \" + e.getMessage());\r\n \r\n // }\r\n \t}", "public DNSUDPTransport() {\r\n\t\tlistHostPort = new ArrayList();\r\n\t\tconnTimeout = 0;\r\n\t}", "private static byte[] makeKeyMaterial(TlsContext tlsContext, String index) {\n SSL2CipherSuite cipherSuite = tlsContext.getChooser().getSSL2CipherSuite();\n\n byte[] clearKey = tlsContext.getClearKey();\n\n // The Premaster Secret is equivalent to SECRET-KEY-DATA\n byte[] secretKey = tlsContext.getPreMasterSecret();\n if (clearKey.length != cipherSuite.getClearKeyByteNumber()) {\n // Special DROWN with \"extra clear\" oracle\n int remainingLength =\n secretKey.length - (clearKey.length - cipherSuite.getClearKeyByteNumber());\n secretKey = Arrays.copyOfRange(secretKey, 0, remainingLength);\n }\n\n byte[] masterKey = ArrayConverter.concatenate(clearKey, secretKey);\n return makeKeyMaterial(\n masterKey, tlsContext.getClientRandom(), tlsContext.getServerRandom(), index);\n }", "private void m1388b(SSLSocket sSLSocket) {\n sSLSocket.setEnabledProtocols(new String[]{\"TLSv1.2\"});\n }", "public static X509V3CertificateGenerator GenerateSelfSignedCerteficate(X500Principal dnName1,X500Principal dnName2, BigInteger serialNumber ,PublicKey mypublicKey, PrivateKey myprivateKey, KeyUsage Keyus ) throws CertificateEncodingException, InvalidKeyException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException\n\t {\n\t\t\t X509V3CertificateGenerator certGen = new X509V3CertificateGenerator();\n\t\t \n\n\t\t\t //certGen.addExtension(X509Extensions.ExtendedKeyUsage, true, new DERSequence(new DERObjectIdentifier(\"2.23.43.6.1.2\")));\n\n\t\t\t certGen.setSerialNumber(serialNumber);\n\t\t\t certGen.setSerialNumber(BigInteger.valueOf(System.currentTimeMillis()));\n\t\t certGen.setIssuerDN(dnName1); // use the same\n\t\t\t certGen.setSubjectDN(dnName2);\n\t\t\t // yesterday\n\t\t\t certGen.setNotBefore(new Date(System.currentTimeMillis() - 24 * 60 * 60 * 1000));\n\t\t\t // in 2 years\n\t\t\t certGen.setNotAfter(new Date(System.currentTimeMillis() + 2 * 365 * 24 * 60 * 60 * 1000));\n\t\t\t certGen.setPublicKey(mypublicKey);\n\t\t\t certGen.setSignatureAlgorithm(\"SHA256WithRSAEncryption\");\n\t\t\t certGen.addExtension(X509Extensions.KeyUsage, true, Keyus);\n\t\t\t certGen.addExtension(X509Extensions.ExtendedKeyUsage, true, new ExtendedKeyUsage(KeyPurposeId.id_kp_serverAuth));\n\n\t\t\t \n\t \treturn certGen;\n\t \t\n\t }", "@Override\n public void run() {\n byte[] deviceTxPayload = CoreServices.getOrCreateHardwareWalletService().get().getContext().getSerializedTx().toByteArray();\n\n log.info(\"DeviceTx payload:\\n{}\", Utils.HEX.encode(deviceTxPayload));\n\n // Load deviceTx\n Transaction deviceTx = new Transaction(MainNetParams.get(), deviceTxPayload);\n\n log.info(\"deviceTx:\\n{}\", deviceTx.toString());\n\n // Check the signatures are canonical\n for (TransactionInput txInput : deviceTx.getInputs()) {\n byte[] signature = txInput.getScriptSig().getChunks().get(0).data;\n if (signature != null) {\n log.debug(\n \"Is signature canonical test result '{}' for txInput '{}', signature '{}'\",\n TransactionSignature.isEncodingCanonical(signature),\n txInput.toString(),\n Utils.HEX.encode(signature));\n } else {\n log.warn(\"No signature data\");\n }\n }\n\n log.debug(\"Committing and broadcasting the last tx\");\n\n BitcoinNetworkService bitcoinNetworkService = CoreServices.getOrCreateBitcoinNetworkService();\n\n if (bitcoinNetworkService.getLastSendRequestSummaryOptional().isPresent()\n && bitcoinNetworkService.getLastWalletOptional().isPresent()) {\n\n SendRequestSummary sendRequestSummary = bitcoinNetworkService.getLastSendRequestSummaryOptional().get();\n\n // Check the unsigned and signed tx are essentially the same as a check against malware attacks on the Trezor\n if (TransactionUtils.checkEssentiallyEqual(sendRequestSummary.getSendRequest().get().tx, deviceTx)) {\n // Substitute the signed tx from the trezor\n log.debug(\n \"Substituting the Trezor signed tx '{}' for the unsigned version {}\",\n deviceTx.toString(),\n sendRequestSummary.getSendRequest().get().tx.toString()\n );\n sendRequestSummary.getSendRequest().get().tx = deviceTx;\n log.debug(\"The transaction fee was {}\", sendRequestSummary.getSendRequest().get().fee);\n\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_TRANSACTION_CREATED_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n\n // Get the last wallet\n Wallet wallet = bitcoinNetworkService.getLastWalletOptional().get();\n\n // Commit and broadcast\n bitcoinNetworkService.commitAndBroadcast(sendRequestSummary, wallet, paymentRequestData);\n\n // Ensure the header is switched off whilst the send is in progress\n ViewEvents.fireViewChangedEvent(ViewKey.HEADER, false);\n } else {\n // The signed transaction is essentially different from what was sent to it - abort send\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_FAILURE_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n }\n } else {\n log.debug(\"Cannot commit and broadcast the last send as it is not present in bitcoinNetworkService\");\n }\n // Clear the previous remembered tx\n bitcoinNetworkService.setLastSendRequestSummaryOptional(Optional.<SendRequestSummary>absent());\n bitcoinNetworkService.setLastWalletOptional(Optional.<Wallet>absent());\n }", "private static void runTest(SSLEngine ssle) throws Exception {\n byte[] msg_clihello = {\n (byte)0x16, (byte)0x03, (byte)0x01, (byte)0x00,\n (byte)0x6f, (byte)0x01, (byte)0x00, (byte)0x00,\n (byte)0x6b, (byte)0x03, (byte)0x01, (byte)0x48,\n (byte)0x90, (byte)0x71, (byte)0xfc, (byte)0xf9,\n (byte)0xa2, (byte)0x3a, (byte)0xd7, (byte)0xa8,\n (byte)0x0b, (byte)0x25, (byte)0xf1, (byte)0x2b,\n (byte)0x88, (byte)0x80, (byte)0x66, (byte)0xca,\n (byte)0x07, (byte)0x78, (byte)0x2a, (byte)0x08,\n (byte)0x9d, (byte)0x62, (byte)0x1d, (byte)0x89,\n (byte)0xc9, (byte)0x1e, (byte)0x1f, (byte)0xe5,\n (byte)0x92, (byte)0xfe, (byte)0x8d, (byte)0x00,\n (byte)0x00, (byte)0x24, (byte)0x00, (byte)0x88,\n (byte)0x00, (byte)0x87, (byte)0x00, (byte)0x39,\n (byte)0x00, (byte)0x38, (byte)0x00, (byte)0x84,\n (byte)0x00, (byte)0x35, (byte)0x00, (byte)0x45,\n (byte)0x00, (byte)0x44, (byte)0x00, (byte)0x33,\n (byte)0x00, (byte)0x32, (byte)0x00, (byte)0x41,\n (byte)0x00, (byte)0x04, (byte)0x00, (byte)0x05,\n (byte)0x00, (byte)0x2f, (byte)0x00, (byte)0x16,\n (byte)0x00, (byte)0x13, (byte)0xfe, (byte)0xff,\n (byte)0x00, (byte)0x0a, (byte)0x01, (byte)0x00,\n (byte)0x00, (byte)0x1e, (byte)0x00, (byte)0x00,\n (byte)0x00, (byte)0x16, (byte)0x00, (byte)0x14,\n (byte)0x00, (byte)0x00, (byte)0x11, (byte)0x6a,\n (byte)0x75, (byte)0x73, (byte)0x74, (byte)0x69,\n (byte)0x6e, (byte)0x2e, (byte)0x75, (byte)0x6b,\n (byte)0x2e, (byte)0x73, (byte)0x75, (byte)0x6e,\n (byte)0x2e, (byte)0x63, (byte)0x6f, (byte)0x6d,\n (byte)0x00, (byte)0x23, (byte)0x00, (byte)0x00\n };\n ByteBuffer bf_clihello = ByteBuffer.wrap(msg_clihello);\n\n SSLSession session = ssle.getSession();\n int appBufferMax = session.getApplicationBufferSize();\n int netBufferMax = session.getPacketBufferSize();\n\n ByteBuffer serverIn = ByteBuffer.allocate(appBufferMax + 50);\n ByteBuffer serverOut = ByteBuffer.wrap(\"I'm Server\".getBytes());\n ByteBuffer sTOc = ByteBuffer.allocate(netBufferMax);\n\n ssle.beginHandshake();\n\n // unwrap the clientHello message.\n SSLEngineResult result = ssle.unwrap(bf_clihello, serverIn);\n System.out.println(\"server unwrap \" + result);\n runDelegatedTasks(result, ssle);\n\n // one more step, ensure the clientHello message is parsed.\n SSLEngineResult.HandshakeStatus status = ssle.getHandshakeStatus();\n if ( status == HandshakeStatus.NEED_UNWRAP) {\n result = ssle.unwrap(bf_clihello, serverIn);\n System.out.println(\"server unwrap \" + result);\n runDelegatedTasks(result, ssle);\n } else if ( status == HandshakeStatus.NEED_WRAP) {\n result = ssle.wrap(serverOut, sTOc);\n System.out.println(\"server wrap \" + result);\n runDelegatedTasks(result, ssle);\n } else {\n throw new Exception(\"unexpected handshake status \" + status);\n }\n\n // enough, stop\n }", "@DSSafe(DSCat.SAFE_OTHERS)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:02:01.340 -0500\", hash_original_method = \"A98E3D3F4703F52B86E74E8B006B047C\", hash_generated_method = \"F94C2ABC483A9F1A0B00B8F9F0839B05\")\n \nprotected SSLSocket(String host, int port, InetAddress clientAddress, int clientPort)\n throws IOException, UnknownHostException {\n super(host, port, clientAddress, clientPort);\n }", "@Before\n public void setUp() throws Exception {\n StoreDefinition.createAllTables(injector.getInstance(StructuredTableAdmin.class));\n cConf.setBoolean(Constants.Tethering.TETHERING_SERVER_ENABLED, true);\n cConf.setInt(Constants.Tethering.CONNECTION_TIMEOUT_SECONDS, 1);\n\n List<Permission> tetheringPermissions = Arrays.asList(InstancePermission.TETHER);\n InMemoryAccessController inMemoryAccessController = new InMemoryAccessController();\n inMemoryAccessController.grant(\n Authorizable.fromEntityId(InstanceId.SELF),\n MASTER_PRINCIPAL,\n Collections.unmodifiableSet(new HashSet<>(tetheringPermissions)));\n ContextAccessEnforcer contextAccessEnforcer =\n new DefaultContextAccessEnforcer(new AuthenticationTestContext(), inMemoryAccessController);\n AuthenticationTestContext.actAsPrincipal(MASTER_PRINCIPAL);\n\n service =\n new CommonNettyHttpServiceBuilder(\n CConfiguration.create(),\n getClass().getSimpleName(),\n new NoOpMetricsCollectionService())\n .setHttpHandlers(\n new TetheringServerHandler(\n cConf,\n tetheringStore,\n messagingService,\n contextAccessEnforcer,\n messagingProgramStatePublisher),\n new TetheringHandler(cConf, tetheringStore, messagingService, profileService))\n .build();\n service.start();\n config =\n ClientConfig.builder()\n .setConnectionConfig(\n ConnectionConfig.builder()\n .setHostname(service.getBindAddress().getHostName())\n .setPort(service.getBindAddress().getPort())\n .setSSLEnabled(false)\n .build())\n .build();\n }", "@org.junit.Test\n public void testTLSHOKSignedEndorsing() throws Exception {\n\n SpringBusFactory bf = new SpringBusFactory();\n URL busFile = SamlTokenTest.class.getResource(\"client.xml\");\n\n Bus bus = bf.createBus(busFile.toString());\n BusFactory.setDefaultBus(bus);\n BusFactory.setThreadDefaultBus(bus);\n\n URL wsdl = SamlTokenTest.class.getResource(\"DoubleItSaml.wsdl\");\n Service service = Service.create(wsdl, SERVICE_QNAME);\n QName portQName = new QName(NAMESPACE, \"DoubleItTLSHOKSignedEndorsingPort\");\n DoubleItPortType samlPort =\n service.getPort(portQName, DoubleItPortType.class);\n String portNumber = PORT2;\n if (STAX_PORT.equals(test.getPort())) {\n portNumber = STAX_PORT2;\n }\n updateAddressPort(samlPort, portNumber);\n\n if (test.isStreaming()) {\n SecurityTestUtil.enableStreaming(samlPort);\n }\n\n samlPort.doubleIt(25);\n\n ((java.io.Closeable)samlPort).close();\n bus.shutdown(true);\n }", "public static void main(String[] args) throws Exception{\n Web3j web3 = Web3j.build(new HttpService(\"https://kovan.infura.io/mew\"));\n\n\n\n String sm1addr=\"0x16039e45f59c46507ba4c1c8a40e829af281256a\";\n String sm2addr=\"0x1286470032cc2729774f5cf966770b450825f104\";\n\n String privkey=\"8e1a2ec8d8e729183e028207c068ec9a4655512017e456b301a18d5bbc350775\";\n String pubkey=\"\";\n\n BigInteger privateKeyInBT = new BigInteger(privkey, 16);\n\n ECKeyPair aPair = ECKeyPair.create(privateKeyInBT);\n\n BigInteger publicKeyInBT = aPair.getPublicKey();\n\n String sPublickeyInHex = publicKeyInBT.toString(16);\n pubkey=sPublickeyInHex;\n\n\n\n\n Credentials credentials = Credentials.create(privkey,pubkey);//WalletUtils.loadCredentials(\"cfvggkrubhcg\",\"MezhBlockchain/keyMetamask.json\");\n //TransactionManager tm=;\n //Sum sumc=Sum.deploy(web3,credentials,big(1),big(200000)).send();\n //System.out.println(sumc.getContractAddress());\n //Sum sumc=Sum.load(\"\",web3,credentials,big(1),big(200000));System.out.println(\"CONNECTED!\");\n Sm1 sm1=Sm1.load(sm1addr,web3,credentials,big(1),big(2000000));\n System.out.println(\"SM1 IS READY!\");\n //Sm2 sm2=Sm2.load(sm2addr,web3,credentials,big(0),big(2000000));\n //System.out.println(\"SM2 IS READY!\");\n\n sm1.transwerMessage(\"0xafd6f3dd885ee964365f891d91733133b6c93017\",new byte[]{1,2,3,100}).send();\n System.out.println(\"OK!\");\n }", "public void setTlsCertPath(String tlsCertPath);", "public void mo33395e() {\n if (XGPushConfig.enableDebug) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Action -> checkAndSetupClient( tpnsClient = \");\n sb.append(this.f23297x);\n sb.append(\", isClientCreating = \");\n sb.append(this.f23298y);\n sb.append(\")\");\n C6864a.m29286a(\"TpnsChannel\", sb.toString());\n }\n synchronized (this) {\n if (this.f23297x == null && !this.f23298y) {\n this.f23298y = true;\n try {\n C6938d.m29638a().mo33180a(this.f23288H);\n } catch (Exception e) {\n C6864a.m29302d(\"TpnsChannel\", \"createOptimalSocketChannel error\", e);\n }\n } else if (!this.f23298y && this.f23297x != null && !this.f23297x.mo33374d()) {\n C6864a.m29308i(\"TpnsChannel\", \"The socket Channel is unconnected\");\n try {\n this.f23297x.mo33373c();\n C6938d.m29638a().mo33180a(this.f23288H);\n } catch (Exception e2) {\n C6864a.m29302d(Constants.ServiceLogTag, \"createOptimalSocketChannel error\", e2);\n }\n }\n }\n }" ]
[ "0.56608546", "0.5649102", "0.54663396", "0.54315734", "0.5424284", "0.5405531", "0.5390632", "0.53705657", "0.5330268", "0.5299093", "0.52577883", "0.5219361", "0.5204013", "0.5175257", "0.5172295", "0.51624346", "0.51567006", "0.5155743", "0.511638", "0.51135904", "0.51011777", "0.5095544", "0.5086675", "0.5084595", "0.50839895", "0.50295174", "0.50223696", "0.50202435", "0.4998429", "0.49914652", "0.4987288", "0.49854708", "0.49836695", "0.49671748", "0.49655628", "0.49606186", "0.49440852", "0.49363828", "0.4916973", "0.49101055", "0.48886472", "0.4885194", "0.48841596", "0.48830396", "0.48783234", "0.4868026", "0.48660854", "0.48655367", "0.48642993", "0.484802", "0.48477748", "0.48471597", "0.48408327", "0.4837989", "0.48369712", "0.48142067", "0.48139146", "0.48018092", "0.4801434", "0.47952354", "0.4785649", "0.4774", "0.4763857", "0.47513103", "0.4749305", "0.47492334", "0.47486016", "0.47469765", "0.4737216", "0.47349605", "0.4728927", "0.4722344", "0.47218728", "0.4720597", "0.47156775", "0.47070688", "0.47022438", "0.47011334", "0.47004718", "0.46972594", "0.46846223", "0.46838248", "0.4683004", "0.46815565", "0.46714216", "0.46612117", "0.46476826", "0.46432403", "0.46327484", "0.46301934", "0.46299693", "0.46262455", "0.46219772", "0.46203148", "0.46194318", "0.4618446", "0.46167707", "0.46150395", "0.4614842", "0.46111593" ]
0.47249335
71
private final Region r;
@Override public void call(LocalRegion r, Operation op, RegionEntry re) { if (TROUBLE_KEY.equals(re.getKey())) { throw new DiskAccessException(TROUBLE_KEY, r); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Region region();", "Region region();", "Region region();", "Region region();", "IRegion getRegion();", "public Region getRegion() {\n return region;\n }", "public CoordinateRadius getRegion();", "public Region() { }", "public Region() {\n }", "public EnumRegion getRegion()\n {\n return region;\n }", "@Override\r\n\tpublic void getROI() {\n\t\t\r\n\t}", "public TypeOfRegion getRegion();", "public void setRegion(CoordinateRadius region);", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "@NotNull\n @Generated\n @Selector(\"region\")\n public native UIRegion region();", "public RegionSample() {\n\t\tsuper();\n\t}", "public String getRegion() {\n return this.region;\n }", "int getRegionValue();", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public LocalRegion getRegion() {\n\t\treturn this.region;\n\t}", "public String getRegion() {\n return region;\n }", "public Rectangle2D.Float getRegion() {\n\t\t\treturn new Rectangle2D.Float(origin.x, origin.y, width, height);\n\t\t}", "public int getRegionValue() {\n return region_;\n }", "@Override \n public Vector getLocation() {\n return this.getR();\n }", "public XnRegion sharedRegion(TracePosition trace) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9681:OrglRoot methodsFor: 'accessing'!\n{XnRegion} sharedRegion: trace {TracePosition}\n\t\"Return a region for all the stuff in this orgl that can backfollow to trace.\"\n\tself subclassResponsibility!\n*/\n}", "public void setRegion(Region region) {\n this.region = region;\n }", "void addRegion(Region region);", "public int getRegionValue() {\n return region_;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "@Override\n\tpublic void r() {\n\n\t}", "public int[] isTripleCopy(Region r) {\n\t\tint[] res=new int[2];\n\t\tif (!nearlyEquals(this.sizeX, r.sizeX) && !nearlyEquals(this.sizeY, r.sizeY))\n\t\t\treturn res;\n\t\tRegion newr=this.generateEqual(new Pair(0,0));\n\t\tif (!nearlyEquals(this.sizeY, r.sizeY)) {\n\t\t\tif (this.sizeY<r.sizeY)\n\t\t\t\treturn res;\n\t\t\tnewr.cutRegion(r, 2);\n\t\t\tnewr.cutRegion(r, 3);\n\t\t\t\n\t\t\tint error=0;\n\t\t\tfor (int i=0;i<r.sizeX;i++) {\n\t\t\t\tfor (int j=0;j<r.sizeY;j++) {\n\t\t\t\t\tif (newr.get(i, (newr.sizeY-r.sizeY)/2+j)!=r.get(i, j))\n\t\t\t\t\t\terror++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (error<r.square/10) {\n\t\t\t\tres[0]=2;\n\t\t\t\tres[1]=(newr.sizeY-r.sizeY)/2;\n\t\t\t}\n\t\t\treturn res;\n\t\t} else if (!nearlyEquals(this.sizeX, r.sizeX)) {\n\t\t\tif (this.sizeX<r.sizeX)\n\t\t\t\treturn res;\n\t\t\tnewr.cutRegion(r, 0);\n\t\t\tnewr.cutRegion(r, 1);\n\t\t\t\n\t\t\tint error=0;\n\t\t\tfor (int i=0;i<r.sizeX;i++) {\n\t\t\t\tfor (int j=0;j<r.sizeY;j++) {\n\t\t\t\t\tif (newr.get((newr.sizeX-r.sizeX)/2+i, j)!=r.get(i, j))\n\t\t\t\t\t\terror++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (error<r.square/10) {\n\t\t\t\tres[0]=1;\n\t\t\t\tres[1]=(newr.sizeX-r.sizeX)/2;\n\t\t\t}\n\t\t\treturn res;\n\t\t} else\n\t\t\treturn res;\n\t}", "public void setRegion(String region);", "private int getRegion(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getRegion(java.lang.String):int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getRegion(java.lang.String):int\");\n }", "private Region creatRegion(String rName) {\n\t\tfor (Region region : listRegions) {\r\n\t\t\tif (region.getName().equals(rName)) {\r\n\t\t\t\treturn region;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void cutRegion(Region r, int direction) {\n\t\tswitch (direction) {\n\t\t\tcase 0: {\n\t\t\t\tfor (int i=0;i<r.sizeX;i++) {\n\t\t\t\t\tfor (int j=0;j<r.sizeY;j++) {\n\t\t\t\t\t\tthis.set(i, j, subtractBool(this.get(i, j), r.get(i, j)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 1: {\n\t\t\t\tfor (int i=0;i<r.sizeX;i++) {\n\t\t\t\t\tfor (int j=0;j<r.sizeY;j++) {\n\t\t\t\t\t\tthis.set(this.sizeX-r.sizeX+i, j, subtractBool(this.get(this.sizeX+i-r.sizeX, j), r.get(i, j)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 2: {\n\t\t\t\tfor (int i=0;i<r.sizeX;i++) {\n\t\t\t\t\tfor (int j=0;j<r.sizeY;j++) {\n\t\t\t\t\t\tthis.set(i, j, subtractBool(this.get(i, j), r.get(i, j)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 3: {\n\t\t\t\tfor (int i=0;i<r.sizeX;i++) {\n\t\t\t\t\tfor (int j=0;j<r.sizeY;j++) {\n\t\t\t\t\t\tthis.set(i, this.sizeY-r.sizeY+j, subtractBool(this.get(i, this.sizeY-r.sizeY+j), r.get(i, j)));\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}", "public void setRegion(EnumRegion region)\n {\n this.region = region;\n }", "public double regionValue(){\n return counter.regionValue();\n }", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public Region getCurrentRegion() {\n\n return currentRegion;\n }", "@Override\n public Color getRegionColor(double[] offset, double[] size) {\n double[] sums = new double[4];\n double area = 0;\n\n int leftIntInside = (int)offset[0];\n if (leftIntInside < offset[0]) leftIntInside++;\n int topIntInside = (int)offset[1];\n if (topIntInside < offset[1]) topIntInside++;\n int rightIntInside = (int)(size[0] + offset[0]);\n int botIntInside = (int)(size[1] + offset[1]);\n \n // Whole internal pixels\n for (int y = topIntInside; y < botIntInside; y++) {\n for (int x = leftIntInside; x < rightIntInside; x++) {\n int[] pix = MeUtils.intToARGB(getPixel(x, y));\n for (int i = 0; i < 4; i++) {\n sums[i] += pix[i];\n }\n }\n }\n // Assuming non-negative area....\n area += (rightIntInside - leftIntInside) * (botIntInside - topIntInside);\n \n // Left edge\n for (int y = topIntInside; y < botIntInside; y++) {\n double x = offset[0];\n double width = leftIntInside - x;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width);\n }\n } \n // Assuming non-negative area....\n area += (leftIntInside - offset[0]) * (botIntInside - topIntInside);\n\n // Right edge\n for (int y = topIntInside; y < botIntInside; y++) {\n double x = rightIntInside;\n double width = (offset[0] + size[0]) - x;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width);\n }\n } \n // Assuming non-negative area....\n area += (offset[0] + size[0] - rightIntInside) * (botIntInside - topIntInside);\n\n // Top edge\n for (int x = leftIntInside; x < rightIntInside; x++) {\n double y = offset[1];\n double height = topIntInside - y;\n int[] pix = MeUtils.intToARGB(getPixel(x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * height);\n }\n } \n // Assuming non-negative area....\n area += (rightIntInside - leftIntInside) * (topIntInside - offset[1]);\n\n // Bottom edge\n for (int x = leftIntInside; x < rightIntInside; x++) {\n double y = botIntInside;\n double height = (offset[1] + size[1]) - y;\n int[] pix = MeUtils.intToARGB(getPixel(x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * height);\n }\n } \n // Assuming non-negative area....\n area += (rightIntInside - leftIntInside) * (offset[1] + size[1] - botIntInside);\n \n // Top left corner\n {\n double x = offset[0];\n double y = offset[1];\n double width = leftIntInside - x;\n double height = topIntInside - y;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width * height);\n }\n }\n // Assuming non-negative area....\n area += (leftIntInside - offset[0]) * (topIntInside - offset[1]);\n\n // Top right corner\n {\n double x = rightIntInside;\n double y = offset[1];\n double width = (offset[0] + size[0]) - x;\n double height = topIntInside - y;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width * height);\n }\n }\n // Assuming non-negative area....\n area += (offset[0] + size[0] - rightIntInside) * (topIntInside - offset[1]);\n \n // Bottom left corner\n {\n double x = offset[0];\n double y = botIntInside;\n double width = leftIntInside - x;\n double height = (offset[1] + size[1]) - y;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width * height);\n }\n }\n // Assuming non-negative area....\n area += (leftIntInside - offset[0]) * (offset[1] + size[1] - botIntInside);\n\n // Bottom right corner\n {\n double x = rightIntInside;\n double y = botIntInside;\n double width = (offset[0] + size[0]) - x;\n double height = (offset[1] + size[1]) - y;\n int[] pix = MeUtils.intToARGB(getPixel((int)x, (int)y));\n for (int i = 0; i < 4; i++) {\n sums[i] += (pix[i] * width * height);\n }\n }\n // Assuming non-negative area....\n area += (offset[0] + size[0] - rightIntInside) * (offset[1] + size[1] - botIntInside);\n \n float[] avg = new float[sums.length];\n for (int i = 0; i < 4; i++) {\n // Also scaling to [0,1]\n avg[i] = (float)((sums[i] / area) / 0xFF);\n }\n \n return new Color(MeMath.bound(avg[1], 0, 1), MeMath.bound(avg[2], 0, 1), MeMath.bound(avg[3], 0, 1), MeMath.bound(avg[0], 0, 1));\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "kr.pik.message.Profile.HowMe.Region getRegion();", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public abstract Color getRegionColor(double[] offset, double[] size);", "public MarkedRegion(AbstractInsnNode start) {\n this.start = start;\n this.ends = new LinkedList<AbstractInsnNode>();\n }", "public interface ConflictRegionStrategy extends AlgStrategy {}", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "public int getRegionid() {\n\treturn regionid;\n}", "public int getItuRegion() {\n return localItuRegion;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public long getRegionId() {\r\n return regionId;\r\n }", "private List<Region> experimentFullRegions() {\n\t\tList<Region> rs = new ArrayList<Region>();\n\t\tRegion r;\n\n\t\t// Vassar St\n\t\tr = new Region(\"Vassar-1\");\n\t\tr.addVertex(42.36255147026933, -71.09034599930573);\n\t\tr.addVertex(42.36240877523236, -71.08975591332245);\n\t\tr.addVertex(42.36013353836458, -71.09434785515595);\n\t\tr.addVertex(42.360442721730834, -71.0948091951065);\n\t\trs.add(r);\n\n\t\t// Windsor-1\n\t\tr = new Region(\"Windsor-1\");\n\t\tr.addVertex(42.36302711805193, -71.09707297951508);\n\t\tr.addVertex(42.36297955343571, -71.09641852051544);\n\t\tr.addVertex(42.3615288153431, -71.09657945305634);\n\t\tr.addVertex(42.36186970216797, -71.09723391205597);\n\t\trs.add(r);\n\n\t\t// Mass-1\n\t\tr = new Region(\"Mass-1\");\n\t\tr.addVertex(42.362678310030105, -71.0995620694809);\n\t\tr.addVertex(42.3629954083118, -71.09918656021881);\n\t\tr.addVertex(42.36179042632724, -71.09720172554779);\n\t\tr.addVertex(42.361322696830854, -71.09736265808868);\n\t\trs.add(r);\n\n\t\t// Mass-2\n\t\tr = new Region(\"Mass-2\");\n\t\tr.addVertex(42.36114036066024, -71.09588207871246);\n\t\tr.addVertex(42.360791542163774, -71.09660091072845);\n\t\tr.addVertex(42.36106901157985, -71.0969335046463);\n\t\tr.addVertex(42.36156052582344, -71.09657945305634);\n\t\trs.add(r);\n\n\t\t// Mass-3\n\t\tr = new Region(\"Mass-3\");\n\t\tr.addVertex(42.36035551632001, -71.09489502579498);\n\t\tr.addVertex(42.3601731773427, -71.09523834854889);\n\t\tr.addVertex(42.360577493491306, -71.095978638237);\n\t\tr.addVertex(42.36077568673155, -71.0955816713028);\n\t\trs.add(r);\n\n\t\t/*\n\t\t * Albany-1-full r = new Region(\"Albany-1\");\n\t\t * r.addVertex(42.36087874696942, -71.09530272156525);\n\t\t * r.addVertex(42.361227564981775, -71.0956353154831);\n\t\t * r.addVertex(42.362678310030105, -71.092556139534);\n\t\t * r.addVertex(42.362527687785665, -71.09185876519012); rs.add(r);\n\t\t */\n\n\t\t// Albany-1\n\t\tr = new Region(\"Albany-1\");\n\t\tr.addVertex(42.36172700558263, -71.09442295700836);\n\t\tr.addVertex(42.3614891772202, -71.09410109192658);\n\t\tr.addVertex(42.360823253016186, -71.09553875595856);\n\t\tr.addVertex(42.361084866938036, -71.09590353638458);\n\t\trs.add(r);\n\n\t\t// Albany-2\n\t\tr = new Region(\"Albany-2\");\n\t\tr.addVertex(42.362678310030105, -71.09243812233734);\n\t\tr.addVertex(42.36253561528121, -71.09191240937042);\n\t\tr.addVertex(42.36180628150339, -71.09342517525482);\n\t\tr.addVertex(42.36223436974708, -71.09344663292694);\n\t\trs.add(r);\n\n\t\t// Portland-1\n\t\tr = new Region(\"Portland-1\");\n\t\tr.addVertex(42.362757584750575, -71.09386505753326);\n\t\tr.addVertex(42.36273380234492, -71.09342517525482);\n\t\tr.addVertex(42.36217887699113, -71.09354319245148);\n\t\tr.addVertex(42.36198861574153, -71.09409036309052);\n\t\trs.add(r);\n\n\t\t// Main-2\n\t\tr = new Region(\"Main-1\");\n\t\tr.addVertex(42.36321737615673, -71.09918656021881);\n\t\tr.addVertex(42.36356618118581, -71.09917583138275);\n\t\tr.addVertex(42.36342348845344, -71.0969335046463);\n\t\tr.addVertex(42.363042972916034, -71.09699787766266);\n\t\trs.add(r);\n\n\t\t// Main-2\n\t\tr = new Region(\"Main-2\");\n\t\tr.addVertex(42.36318566651262, -71.09384359986115);\n\t\tr.addVertex(42.36278929461076, -71.09392943054962);\n\t\tr.addVertex(42.36297162599619, -71.09643997818756);\n\t\tr.addVertex(42.36336799674776, -71.09641852051544);\n\t\trs.add(r);\n\n\t\t// Main-3\n\t\tr = new Region(\"Main-3\");\n\t\tr.addVertex(42.36300333574834, -71.09216990143585);\n\t\tr.addVertex(42.36271794740286, -71.09249176651764);\n\t\tr.addVertex(42.36277343968266, -71.09333934456635);\n\t\tr.addVertex(42.363106392332284, -71.09324278504181);\n\t\trs.add(r);\n\n\t\t// Main-4\n\t\tr = new Region(\"Main-4\");\n\t\tr.addVertex(42.36289235154579, -71.09035672814178);\n\t\tr.addVertex(42.36259110772208, -71.09038891464996);\n\t\tr.addVertex(42.36264660011392, -71.09166564614105);\n\t\tr.addVertex(42.36303504548448, -71.09157981545258);\n\t\trs.add(r);\n\n\t\tLocation l;\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36035940296916);\n\t\tl.setLongitude(-71.0944926738739);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36081921192526);\n\t\tl.setLongitude(-71.09338760375977);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36160405047349);\n\t\tl.setLongitude(-71.0919177532196);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3619370093201);\n\t\tl.setLongitude(-71.09123110771179);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36234924163794);\n\t\tl.setLongitude(-71.09039425849915);\n\t\tlog(String.format(\"Test point on Vassar is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3631736981596);\n\t\tl.setLongitude(-71.09626293182373);\n\t\tlog(String.format(\"Test point on Main-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36303893196785);\n\t\tl.setLongitude(-71.09436392784119);\n\t\tlog(String.format(\"Test point on Main-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362935875273244);\n\t\tl.setLongitude(-71.09288334846497);\n\t\tlog(String.format(\"Test point on Main-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362785253646265);\n\t\tl.setLongitude(-71.09100580215454);\n\t\tlog(String.format(\"Test point on Main-3 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362476081807);\n\t\tl.setLongitude(-71.0936987400055);\n\t\tlog(String.format(\"Test point on Portland-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36099362133876);\n\t\tl.setLongitude(-71.09561920166016);\n\t\tlog(String.format(\"Test point on Albany-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36154855716084);\n\t\tl.setLongitude(-71.0943853855133);\n\t\tlog(String.format(\"Test point on Albany-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362008357414815);\n\t\tl.setLongitude(-71.093430519104);\n\t\tlog(String.format(\"Test point on Albany-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.362610849206014);\n\t\tl.setLongitude(-71.09221816062927);\n\t\tlog(String.format(\"Test point on Albany-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3611521749309);\n\t\tl.setLongitude(-71.09653115272522);\n\t\tlog(String.format(\"Test point on Mass-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.3604862471552);\n\t\tl.setLongitude(-71.09537243843079);\n\t\tlog(String.format(\"Test point on Mass-2 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\tl = new Location(\"\");\n\t\tl.setLatitude(42.36238887921827);\n\t\tl.setLongitude(-71.09683156013489);\n\t\tlog(String.format(\"Test point on Windsor-1 is in region %s\",\n\t\t\t\tgetRegion(rs, l)));\n\n\t\treturn rs;\n\t}", "public ComplexRegionNode(){\n innerComplexes=null;\n innerRegions=null;\n m_cvComplexBoundaries=new ArrayList();\n }", "public WorldRegions getWorldRegions()\n {\n return regions;\n }", "@Nullable public abstract URI region();", "@AutoEscape\n public String getRegion();", "public void setRegion(String region) {\n this.region = region;\n }", "public Long getRegionId() {\n return this.regionId;\n }", "@Override\n public int apply(int[][] region) {\n return 0;\n }", "void drawRegion (double b, double e) {\n begT = b; endT = e;\n drawStuff (img.getGraphics ());\n }", "public Regions getRegions () {\n return this.regions;\n }", "public Region getRoot() {\r\n return root;\r\n }", "public int getRegionid() {\n return regionid;\n }", "public TextureRegion getStandRight(){\n return standRight;\n }", "public TileRegion() {\n\t\tthis.bounds = new Rectangle();\n\t\tthis.type\t= CollisionType.land;\n\t}", "public TextureRegion loadTextureRegion(Texture texture, Rectangle rec);", "@Override\n \tpublic SipApplicationRoutingRegion getRegion() {\n \t\treturn null;\n \t}", "public int getR() {\r\n\t\treturn r;\r\n\t}", "AREA createAREA();", "void removeRegion(Region region);", "@Override\n protected Rectangle getSelectedRegion()\n {\n // Go through all widgets and union their bounds.\n Iterator<FrameEltSelnFig<?>> selectedFigs =\n selection.getSelectedFigures();\n\n return computeUnion(selectedFigs);\n }", "public int getR();", "public void setRegion(final TypeOfRegion region);", "private int getRegion(Point p) {\n // divide top segment equally\n Segment topSegment = Segment.fromStartAndWidth(this.topLeft.getX(), getWidth());\n EqualSegmentDivision partsOfPaddle = new EqualSegmentDivision(topSegment, REGIONS);\n\n // get index on the line division\n int index = partsOfPaddle.getIndexForPosition(p.getX());\n\n // do validity checks\n if (index < 0) {\n return 0;\n } else if (index >= REGIONS) {\n return REGIONS - 1;\n } else {\n return index;\n }\n }", "public abstract CDasherView.DRect VisibleRegion();", "public String getOperateRegion() {\r\n return operateRegion;\r\n }", "public void controlLeftRightRgionEntry(Region r,Player player){\n\t\t\n\t\tint x = player.getPlayerCurXPos();\t\t\n\t\t\n\t\tif(isExtremeLeftRegion(r.getRegionID()) && x<0){\n\t\t\t//logger.info(\"BMK4---RegionController.java--Extreme left region. X =\" + x);\n\t\t\t//logger.info(\"Extreme left region. X =\" + x);\n\t\t\tplayer.setPlayerCurXPos(0);\n\t\t}\n\t\t\n\t\telse if(isLeftRegion(r.getRegionID()))\n\t\t//if(r.regionID==1 || r.regionID==3)\n\t\t{\n\t\t\t\n\t\t\t//entering to region2 from region1 or region4 from region3\n\t\t\tif((x+ playerBoundaryCheck)>=r.rX2){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tplayer.rBYUpFlag = player.rBYDownFlag = false;\n\t\t\t\tplayer.rBXRightFlag = true;\n\t\t\t\tplayer.rBXLeftFlag = false;\n\t\t\t\t\n\t\t\t\tlogger.info(\"RXRight flag is true\");\n\t\t\t\tx = 0;\n\t\t\t\tplayer.setPlayerCurXPos(0);\n\t\t\t}\n\t\t\t\n\t\t\t//no regions to the left of region1 or region3\n\t\t\telse if(x<0){\n\t\t\t\t//logger.info(\"RXLeft flag is true\");\n\t\t\t\t//player.setPlayerCurXPos(0);\n\t\t\t\tplayer.rBYUpFlag = player.rBYDownFlag = false;\n\t\t\t\tplayer.rBXRightFlag = false;\n\t\t\t\tplayer.rBXLeftFlag = true;\n\t\t\t\tx=r.rX2 - Constants.getImagesize();\n\t\t\t\tplayer.setPlayerCurXPos(x);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\telse if(isRightRegion(r.getRegionID()))\n\t\t//else if(r.regionID==2 || r.regionID==4)\t\t\n\t\t{\n\t\t\t\n\t\t\t//entering to region1 from region2 or region3 from region4\n\t\t\tif(x<0){\n\t\t\t\t//logger.info(\"BMK4---RegionController.java--entering to region 1 from region 2\");\n\t\t\t\tplayer.rBYDownFlag = player.rBYUpFlag = false;\n\t\t\t\t\n\t\t\t\tplayer.rBXRightFlag = false;\n\t\t\t\tplayer.rBXLeftFlag = true;\n\t\t\t\t\n\t\t\t\tx=r.rX2 - Constants.getImagesize();\n\t\t\t\tplayer.setPlayerCurXPos(x);\n\t\t\t}\n\t\t\t\n\t\t\t//no further regions from region2 or region4\n\t\t\telse if((x+ playerBoundaryCheck)>=r.rX2)\n\t\t\t{\t\n\t\t\t\tx = r.rX2 -Constants.getImagesize();\n\t\t\t\tplayer.setPlayerCurXPos(x);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "SemanticRegion<T> parent();", "public String getRegion_id() {\n return region_id;\n }", "public final int getR() {\n return r;\n }", "public String getRegionFullName() {\n return regionFullName;\n }", "public final SphRegion get_cur_region () {\n\t\tif (!( modstate >= MODSTATE_CATALOG )) {\n\t\t\tthrow new IllegalStateException (\"Access to RJGUIModel.cur_region while in state \" + cur_modstate_string());\n\t\t}\n\t\treturn fetch_fcparams.aftershock_search_region;\n\t}", "public void setViewRectangle(Rectangle r) {\n\n\t}", "@Test\n public void regionTest() {\n // TODO: test region\n }", "@Test\n public void testSetAndGetRegion() {\n System.out.println(\"getRegion\");\n TextRegion instance = new TextRegion();\n assertNull(instance.getRegion());\n String expResult = \"region\";\n instance.setRegion(expResult);\n String result = instance.getRegion();\n assertEquals(expResult, result);\n assertEquals(0.0f, instance.getConfidence(), 0.001f);\n assertNull(instance.getImageUrl());\n assertNull(instance.getOrder());\n assertNull(instance.getPageUrl());\n assertNull(instance.getResourceId());\n assertNull(instance.getText());\n }", "public java.lang.String getRegionname() {\n\treturn regionname;\n}", "public String getRegionName() {\r\n return regionName;\r\n }", "public String getRegionNo() {\n return regionNo;\n }" ]
[ "0.7627276", "0.7627276", "0.7627276", "0.7627276", "0.72616607", "0.7146784", "0.7084651", "0.70411545", "0.6872719", "0.6731915", "0.66665304", "0.666629", "0.6656427", "0.64966995", "0.64966995", "0.64966995", "0.64917535", "0.64917535", "0.6461667", "0.6431708", "0.64131933", "0.6403501", "0.6398582", "0.6398582", "0.6398582", "0.6398582", "0.6398582", "0.63470596", "0.63141215", "0.62990826", "0.6291418", "0.6253779", "0.6205092", "0.61929667", "0.61614", "0.6132968", "0.61092895", "0.60977286", "0.60598195", "0.60545355", "0.6052537", "0.60405797", "0.60402966", "0.599186", "0.59840876", "0.59706086", "0.59637564", "0.5963006", "0.59575593", "0.59535545", "0.59535545", "0.59535545", "0.5949922", "0.5935474", "0.59327143", "0.5916589", "0.5903324", "0.5891348", "0.58874977", "0.588345", "0.58826137", "0.58826137", "0.58826137", "0.5874056", "0.58731943", "0.585921", "0.5855599", "0.5851133", "0.58410144", "0.5810716", "0.5806577", "0.5789089", "0.5784274", "0.57813096", "0.57484204", "0.5733928", "0.573224", "0.57314235", "0.57104254", "0.5694372", "0.5687233", "0.5681485", "0.56714225", "0.5666314", "0.56632155", "0.5656352", "0.5653939", "0.5651177", "0.5647656", "0.562389", "0.56161624", "0.5615618", "0.56123054", "0.56062263", "0.56056863", "0.5605178", "0.5599092", "0.5594008", "0.5591104", "0.5586878", "0.55802697" ]
0.0
-1
metodo setter establece valor de propiedad el void no hace return
public void setColor(String color) { this.color=color; //el this se coloca a la propiedad de la clase // para diferenciarla del parametro }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public void setdat()\n {\n }", "@Test\r\n public void testSetValor() {\r\n \r\n }", "private void setData() {\n\n }", "public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* 90:141 */ this.empresa = empresa;\r\n/* 91: */ }", "String setValue();", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "@Override\n public void onSetSuccess() {\n }", "@Override\n public void onSetSuccess() {\n }", "@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "public void setValue(Object val);", "public void comecar() { setEstado(estado.comecar()); }", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "protected void setValue(T value) {\r\n this.value = value;\r\n }", "public void set(boolean bol);", "@Override\n public void setValue(Object val)\n {\n value = val;\n }", "public abstract void setValue(T value);", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "V setValue(final V value) {\n\t setMethod.accept(value);\n\n\t return value;\n\t}", "public void setValue(Object value);", "public abstract void set(M newValue);", "Object setValue(Object value) throws NullPointerException;", "public void dataWasSet();", "@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}", "void setValue(Object value);", "public abstract void setNombre(java.lang.String newNombre);", "public void setValue(Object value) { this.value = value; }", "@Override\n\tpublic void setValue(Object object) {\n\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void setEnqueteur(Enqueteur enqueteur)\r\n/* */ {\r\n/* 65 */ this.enqueteur = enqueteur;\r\n/* */ }", "protected abstract void setValue(V value);", "public void setValorCalculo(ValoresCalculo valorCalculo)\r\n/* 93: */ {\r\n/* 94:111 */ this.valorCalculo = valorCalculo;\r\n/* 95: */ }", "@Test\n public void testSetTipoSangre() {\n System.out.println(\"setTipoSangre\");\n String tipoSangre = \"\";\n Paciente instance = new Paciente();\n instance.setTipoSangre(tipoSangre);\n \n }", "@Override\r\n\t\tpublic void set(E arg0) {\n\r\n\t\t}", "public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }", "void setValue(T value);", "void setValue(T value);", "public void setValue(Object o){\n \tthis.value = o;\n }", "@Test\n public void testSetLugarNac() {\n System.out.println(\"setLugarNac\");\n String lugarNac = \"\";\n Paciente instance = new Paciente();\n instance.setLugarNac(lugarNac);\n \n }", "@Override\n\tpublic void setData() {\n\n\t}", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "@Override\n\tpublic void morir() {\n\t\tthis.estadoVida = false;\n\t}", "public void setNombre(String nombre){\n this.nombre =nombre;\n }", "public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }", "@Test\n public void testSetTipoFinal() {\n System.out.println(\"setTipoFinal\");\n String tipoFinal = \"\";\n Reserva instance = new Reserva();\n instance.setTipoFinal(tipoFinal);\n \n }", "public abstract void setAcma_valor(java.lang.String newAcma_valor);", "@Override\n\tpublic void set(T e) {\n\t\t\n\t}", "@Test\n public void testSetEstado() {\n System.out.println(\"setEstado\");\n String estado = \"\";\n Reserva instance = new Reserva();\n instance.setEstado(estado);\n \n }", "public abstract void setValue(int value);", "@Test\n\tpublic void testSet() {\n\t}", "@Test\n public void testSetFechaFin() {\n System.out.println(\"setFechaFin\");\n Date fechaFin = null;\n Reserva instance = new Reserva();\n instance.setFechaFin(fechaFin);\n \n }", "@Test\n public void testSetFechaPago() {\n System.out.println(\"setFechaPago\");\n Date fechaPago = null;\n DetalleAhorro instance = new DetalleAhorro();\n instance.setFechaPago(fechaPago);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public void setLongitud(Integer longitud)\n/* 42: */ {\n/* 43:62 */ this.longitud = longitud;\n/* 44: */ }", "public void setMoney(double money) { //void method has no return type.\n\t\tthis.money=money;\n\t}", "@Override\n\tpublic void setValue(String arg0, String arg1) {\n\t\t\n\t}", "public void asetaTeksti(){\n }", "@Test\r\n public void testSetMicentro() {\r\n System.out.println(\"setMicentro\");\r\n CentroEcu_Observado micentro = new CentroEcu_Observado();\r\n micentro.setCiudad(\"Loja\");\r\n Servicio_CentroEcu instance = new Servicio_CentroEcu();\r\n instance.setMicentro(micentro);\r\n assertEquals(instance.getMicentro().ciudad, \"Loja\");\r\n }", "public void setCodigo(java.lang.String param){\n \n this.localCodigo=param;\n \n\n }", "public void set()\r\n {\r\n isSet = true;\r\n }", "public void setData(T val) {\r\n\t\tthis.val = val;\r\n\t}", "public void setValue(final Object value) { _value = value; }", "public void setEmpleado(Empleado empleado)\r\n/* 188: */ {\r\n/* 189:347 */ this.empleado = empleado;\r\n/* 190: */ }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void setActivo(boolean activo)\r\n/* 115: */ {\r\n/* 116:142 */ this.activo = activo;\r\n/* 117: */ }", "private void set(){\n resetBuffer();\n }", "public void setNombre(String nombre) {this.nombre = nombre;}", "@Test\r\n public void testSetPracownik() {\r\n System.out.println(\"setPracownik\");\r\n Pracownik pracownik = null;\r\n Faktura instance = new Faktura();\r\n instance.setPracownik(pracownik);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}", "private SetProperty(Builder builder) {\n super(builder);\n }", "private void setUserData(){\n }", "public void Nodo(){\r\n this.valor = \"\";\r\n this.siguiente = null;\r\n }", "public void setNombre(String nombre)\r\n/* 65: */ {\r\n/* 66: 76 */ this.nombre = nombre;\r\n/* 67: */ }", "@Test\n public void testSetIdPaciente() {\n System.out.println(\"setIdPaciente\");\n Integer idPaciente = null;\n Paciente instance = new Paciente();\n instance.setIdPaciente(idPaciente);\n \n }", "@Test\n public void testSetCodigo() {\n System.out.println(\"setCodigo\");\n int codigo = 0;\n DetalleAhorro instance = new DetalleAhorro();\n instance.setCodigo(codigo);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "void setValue(V value);", "public void setPuntoDeVenta(PuntoDeVenta puntoDeVenta)\r\n/* 145: */ {\r\n/* 146:166 */ this.puntoDeVenta = puntoDeVenta;\r\n/* 147: */ }", "@Test\r\n public void testSetCodigo() {\r\n int expResult = 4;\r\n articuloPrueba.setCodigo(expResult);\r\n assertEquals(expResult, articuloPrueba.getCodigo());\r\n }", "@Test\n public void testSetEtnia() {\n System.out.println(\"setEtnia\");\n String etnia = \"\";\n Paciente instance = new Paciente();\n instance.setEtnia(etnia);\n\n }", "public void setEstado(biz.belcorp.www.canonico.ffvv.vender.TEstadoPedido param){\n \n this.localEstado=param;\n \n\n }", "public void setData(Object o){}", "public abstract void setCod_tecnico(java.lang.String newCod_tecnico);", "public void setValue(T value) {\n this.value = value;\n }", "public void setBloqueado(java.lang.String param){\n \n this.localBloqueado=param;\n \n\n }", "public abstract void setValueAction(Object value);", "@Test\n public void testSetPersonaPaciente() {\n System.out.println(\"setPersonaPaciente\");\n Persona personaPaciente = null;\n Paciente instance = new Paciente();\n instance.setPersonaPaciente(personaPaciente);\n\n }", "protected abstract Set method_1559();", "public void setValue(A value) {this.value = value; }", "@Test\r\n public void testSetAnalizar() {\r\n System.out.println(\"setAnalizar\");\r\n String analizar = \"3+(\";\r\n RevisorParentesis instance = null;\r\n instance.setAnalizar(analizar);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testSetSamochod() {\r\n System.out.println(\"setSamochod\");\r\n Samochod samochod = null;\r\n Faktura instance = new Faktura();\r\n instance.setSamochod(samochod);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void setValor(java.lang.String valor);", "public V setValue(V value);", "public abstract void setFecha_inicio(java.lang.String newFecha_inicio);", "void setValue(int value);", "public void validerSaisie();", "@Override\n public void set(Voluntario a) {\n if (a==null) a=new Voluntario();\n \n txtNome.setText(a.getNome());\n DateFormat df = new SimpleDateFormat(\"dd/mm/yyyy\");\n txtDataN.setText(df.format(a.getDataNascimento().getTime()));\n txtNacionalidade.setText(a.getNacionalidadeIndiv());\n txtProfissao.setText(a.getProfissao());\n txtMorada.setText(a.getMorada());\n txtCodPostal.setText(a.getCodigoPostal());\n txtLocalidade.setText(a.getLocalidade());\n txtTelefone.setText(a.getTelefone());\n txtTelemovel.setText(a.getTelemovel());\n txtEmail.setText(a.getEmail());\n txtNif.setText(a.getNif()+\"\");\n txtHabilit.setText(a.getHabilitacoes());\n txtConhecimentosL.setText(a.getConhecimentosLing());\n txtFormComp.setText(a.getFormacaoComp());\n txtExpV.setText(a.getExperienciaVolunt());\n txtConhecimentosC.setText(a.getConhecimentosConstr());\n txtDispon.setText(a.getDisponibilidade());\n txtComoConheceu.setText(a.getComoConheceu());\n checkReceberInfo.setSelected(a.getReceberInfo());\n checkIsParceiro.setSelected(a.isParceiro()); \n \n voluntario = a;\n }", "void set(T t);", "@Override\n public void llenardeposito(){\n this.setCombustible(getTankfuel());\n }", "@Test\r\n public void testSetContrasenia() {\r\n System.out.println(\"setContrasenia\");\r\n String contrasenia = \"\";\r\n Usuario instance = new Usuario();\r\n instance.setContrasenia(contrasenia);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\r\n public void testSetDataSprzedazy() {\r\n System.out.println(\"setDataSprzedazy\");\r\n Date dataSprzedazy = null;\r\n Faktura instance = new Faktura();\r\n instance.setDataSprzedazy(dataSprzedazy);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void setValue(T value) \n\t{\n\t\tthis.value = value;\n\t}" ]
[ "0.7072895", "0.69805866", "0.6781016", "0.6780077", "0.67322654", "0.66929114", "0.66425663", "0.66194934", "0.66194934", "0.66002804", "0.6591011", "0.65888125", "0.6573267", "0.65531254", "0.654646", "0.6529701", "0.6499512", "0.64905846", "0.64805514", "0.64731455", "0.6472619", "0.6452815", "0.6434379", "0.64329076", "0.6431338", "0.64268386", "0.6421606", "0.64213914", "0.64185935", "0.6397881", "0.6397157", "0.6395511", "0.63843095", "0.6383156", "0.63696325", "0.63590837", "0.6354307", "0.6354307", "0.6335375", "0.6315229", "0.6303455", "0.629098", "0.6290968", "0.62766784", "0.6273131", "0.6250718", "0.62273043", "0.62235475", "0.62160856", "0.62023526", "0.61969215", "0.6188483", "0.6186416", "0.61849505", "0.6181173", "0.6179161", "0.6173496", "0.61645806", "0.6162135", "0.6161882", "0.6152614", "0.61386603", "0.6137447", "0.6136841", "0.61319876", "0.6130086", "0.61291003", "0.6127285", "0.6122105", "0.6118889", "0.6116571", "0.61107284", "0.6108421", "0.6106112", "0.61018604", "0.60972095", "0.60913444", "0.6090655", "0.6089466", "0.6089323", "0.60867393", "0.608551", "0.6079562", "0.60792845", "0.6077506", "0.6076568", "0.60734594", "0.6070509", "0.6069713", "0.6067739", "0.6063513", "0.6061966", "0.60603994", "0.6059509", "0.6054221", "0.6054219", "0.60531014", "0.6048228", "0.6045567", "0.6044556", "0.6043985" ]
0.0
-1
metodo getter que devuelve valor de propiedad
public String getColor() { return "Elcolor del vehiculo es: "+color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getValor();", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public String get();", "public String getProperty();", "public java.lang.String getValor();", "@Override\n String get();", "Property getProperty();", "Property getProperty();", "String getProperty();", "String getProperty();", "String getProperty();", "java.lang.String getProperty();", "public abstract String get();", "public Object getValue(){\n \treturn this.value;\n }", "public int getTipoAtaque(){return tipoAtaque;}", "public String getnombre(){\n return nombre;\n }", "public int getArmadura(){return armadura;}", "public int getEva(){\n return eva;\n }", "public int getPerfil(){\n return this.perfil;\n }", "public int getTamanio(){\r\n return tamanio;\r\n }", "public int getValor() {\r\n return valor;\r\n }", "String getVal();", "public synchronized int get() { \n return this.soma_pares; \n }", "public String getNombre(){\n return nombre;\n }", "public int getValor() {\n return valor;\n }", "public String getNombre(){\r\n return nombre;\r\n }", "public String getTelefono(){\n return telefono;\n }", "String get();", "String get();", "public String getTipo(){\r\n return Tipo;\r\n }", "public String getNombre(){\n return nombre;\n }", "protected abstract String getPropertyValue(Server instance);", "public String get()\n {\n return val;\n }", "public int getAnio(){\r\n \r\n \r\n return this.anio;\r\n \r\n }", "public String getNombre(){\n return nombre;\n }", "public String getNombre(){\n return nombre;\n }", "public String getValor() {\n return valor;\n }", "public abstract Object getValue(Context context) throws PropertyException;", "public final Object get() {\n return getValue();\n }", "public String getApellido(){\n return this.apellido;\n }", "public String getTipo(){\n return tipo;\n }", "public Punto getCentro() {\r\n\treturn centro;\r\n}", "String getNama(){\n return this.nama;\n }", "String getValue() {\n return mValue;\n }", "public final T getValor() {\r\n return valor;\r\n }", "public String getTipo(){\r\n return tipo;\r\n }", "V getValue() {\n return value;\n }", "public String getNome(){\r\n return nome;\r\n }", "public Object getValue()\n {\n\treturn value;\n }", "public int getValeur() {\r\n return valeur;\r\n }", "Nodo_B getPrimero(){\n return this.primero;\n }", "public Object getValue() { return this.value; }", "@Override\n public Object getValue()\n {\n return value;\n }", "private String getPropertyValue() {\n return EmfPropertyHelper.getValue(itemPropertyDescriptor, eObject);\n }", "public String getValue() {\n return getMethodValue(\"value\");\n }", "public V valor() {\n return value;\n }", "public String getValue(){\n return this.value;\n }", "public Object getValue() { return _value; }", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "public Value getValue(){\n return this.value;\n }", "@Override\n public int get()\n { \n return this.pr;\n }", "Object getProperty(String name);", "public T get() {\n return value;\n }", "public String getNome(){\r\n return this.nome;\r\n }", "Object getPropertytrue();", "@Override\n public Object getAsObject(FacesContext context, UIComponent component, String value) {\n \n return value;\n }", "public int getValor() {\n return Valor;\n }", "public int getBrillo(){\n return brillo;\n }", "public int getPrecio(){\n return precio;\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public int getFuerza(){\n\n return this.fuerza;\n\n }", "public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }", "public String getTelefono() {\r\n\treturn telefono;\r\n}", "public V get() {\n return value;\n }", "public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }", "public String prop(String name);", "@Override\n\t\t\tpublic Object getPropertyValue() {\n\t\t\t\treturn null;\n\t\t\t}", "public String get() {\n return value;\n\t}", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "public Object getValue()\n {\n return value;\n }", "public Double getPotencia(){\n return this.valor;\n }", "public String getNome(){\n return this.nome;\n }", "public java.lang.String getGet() {\n return instance.getGet();\n }", "public Value getValue()\r\n\t{\r\n\t\treturn paramValue;\r\n\t}", "public String getProperty(String name);", "public String getValue () { return value; }", "public String getNombre(){\n\treturn this.nombre;\n }", "@Override\n\tpublic String getObjetivo() {\n\t\treturn model.getObjetivo();\n\t}", "public int getValore() {\n return valore;\n }", "public Object getValue()\r\n {\r\n return this.value;\r\n }", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "String getProperty(String name);" ]
[ "0.7213525", "0.69438964", "0.6821853", "0.67908645", "0.6784822", "0.6782854", "0.67219657", "0.67219657", "0.6711908", "0.6711908", "0.6711908", "0.66527843", "0.6627222", "0.6608377", "0.65968776", "0.65967333", "0.6578258", "0.65699184", "0.65637416", "0.6523895", "0.65222377", "0.6520436", "0.6503581", "0.6503107", "0.6486994", "0.6476026", "0.64706856", "0.64681756", "0.64681756", "0.64636326", "0.64616704", "0.6451802", "0.644397", "0.6436522", "0.64343905", "0.64343905", "0.6432491", "0.6420743", "0.64185554", "0.63902396", "0.6385985", "0.6384747", "0.6377188", "0.6376652", "0.6371791", "0.63709396", "0.63703424", "0.636551", "0.63616973", "0.63604015", "0.63575006", "0.6353236", "0.63481194", "0.6347987", "0.6346251", "0.6343662", "0.633218", "0.6329343", "0.63256454", "0.63245606", "0.6309951", "0.63075995", "0.62923646", "0.6288916", "0.62861985", "0.62836456", "0.62791175", "0.6275888", "0.6272852", "0.627049", "0.627049", "0.62652946", "0.62593263", "0.62552035", "0.62486964", "0.62457126", "0.6244084", "0.6241637", "0.6240174", "0.62392294", "0.6233508", "0.6230223", "0.62289375", "0.62245846", "0.62232494", "0.62217516", "0.6220093", "0.62163126", "0.621629", "0.6215874", "0.62107915", "0.620269", "0.620269", "0.620269", "0.620269", "0.620269", "0.620269", "0.620269", "0.620269", "0.620269", "0.62021166" ]
0.0
-1
TODO update patient id
private void updateComposition(String uid, CompositionContent content) throws Exception { Map<String, Object> acont = content.getContent(); composition.set("/uid", acont); for (String path : acont.keySet()) { Object cont = acont.get(path); if (cont == null) { cont = new DvCodedText("unknown", new CodePhrase( TerminologyService.OPENEHR, "253")); } composition.set(path, cont); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPatientId(int patientId) {\n\t\t\t\n\t\tthis.patientId=patientId;\t\t\n\t}", "public void setPatientId(String patientId)\n {\n this.patientId = patientId;\n }", "public void setPatientId(String patientId){\n\t\tthis.patientId = patientId;\n\t}", "public void setPatientID(java.lang.String param){\n \n this.localPatientID=param;\n \n\n }", "public void setPatientID(java.lang.String param){\n \n this.localPatientID=param;\n \n\n }", "public Patient (String patientID) {\n this.patientID = patientID;\n this.associatedDoctor = new ArrayList<>();\n }", "public String getPatientId()\n {\n return patientId;\n }", "Patient update(Patient patient);", "PatientInfo getPatientInfo(int patientId);", "void updatePatientInfo(PatientInfo patientInfo);", "private Patient setPatientIdentifier(Patient patient){\n\t\tUUID u = new UUID(1,0);\n\t\ttry{\n\t\t\tUUID randomUUID = u.randomUUID();\n\t\t\tPatientIdentifier pi = new PatientIdentifier();\n\t\t\tpi.setIdentifier(randomUUID.toString());\n\t\t\tpatient.addIdentifier(pi);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn patient;\n\t}", "java.lang.String getPatientId();", "public void careForPatient(Patient patient);", "public void setPatientID(int patientID) {\n\t\tthis.patientID = patientID;\n\t}", "void dischargePatient(int id);", "public String getPatientId(){\n\t\treturn patientId;\n\t}", "protected void recordPatientVisit() {\r\n\r\n\t\t// obtain unique android id for the device\r\n\t\tString android_device_id = Secure.getString(getApplicationContext().getContentResolver(),\r\n Secure.ANDROID_ID); \r\n\t\t\r\n\t\t// add the patient record to the DB\r\n\t\tgetSupportingLifeService().createPatientAssessment(getPatientAssessment(), android_device_id);\r\n\t}", "@Override\n public Patient editPatient(Patient patient) {\n return patientRepository.save(patient);\n }", "@Update(\"UPDATE patients SET id_firstcontact_doctor=#{newDoctorId} WHERE id_patient=#{patient.id}\")\n void updatePatientFirstcontactDoctor(@Param(\"patient\") Patient patient,\n @Param(\"newDoctorId\") int newDoctorId);", "private static void changePatient(){\r\n // opretter ny instans af tempPatinet som overskriver den gamle\r\n Patient p = new Patient(); // det her kan udskiftes med en nulstil funktion for at forsikre at der altid kun er en patient.\r\n Patient.setCprNumber((Long) null);\r\n }", "void AddPatiant(Patient p) throws Exception;", "public java.lang.String getPatientID(){\n return localPatientID;\n }", "public java.lang.String getPatientID(){\n return localPatientID;\n }", "public void requirePatientId() {\n hasPatientIdParam = true;\n }", "public int getPatientID() {\r\n\t\treturn patientID;\r\n\t}", "@Override\n\tpublic Patient update( Patient model, int patientId) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void patientDisease() {\n\t\t\r\n\t\tSystem.out.println(\"Here I have attached the patients information\");\r\n\t\t\r\n\t}", "public Patient chercherPatientId(int id_patient) {\r\n Patient p = null;\r\n int i = 0;\r\n while (i != patients.size() && patients.get(i).getIdPatient() != id_patient) {\r\n i++;\r\n }\r\n if (i != patients.size()) {\r\n p = patients.get(i);\r\n }\r\n return p;\r\n }", "public Long addPatient(long pid, String name, Date dob, int age) throws PatientExn;", "public int getPatientId() {\n\t\t\n\t\treturn this.patientId;\n\t}", "@Override\n public Patient savePatient(Patient patient) {\n return patientRepository.save(patient);\n }", "public String getPatientId() {\n\t\treturn patientId;\n\t}", "@Override\n\tpublic Patient updatePatient(Patient patient) {\n\t\t// setting logger info\n\t\tlogger.info(\"update the patient details \");\n\n\t\tPatient p = patientRepo.findById(patient.getPatientId()).get();\n\t\tp.setPatientName(patient.getPatientName());\n\t\tp.setPatientAge(patient.getPatientAge());\n\t\tp.setRegistrationFee(patient.getRegistrationFee());\n\t\tp.setPatientContactNumber(patient.getPatientContactNumber());\n\t\tp.setSymptoms(patient.getSymptoms());\n\t\tp.setCreatedAt(patient.getCreatedAt());\n\t\tp.setUpdatedAt(patient.getUpdatedAt());\n\t\treturn patientRepo.save(p);\n\t}", "private void getPatient (String id) throws MqttException {\n MqttMessage message = new MqttMessage(new Gson().toJson(dao.getPatient(id)).getBytes());\n message.setQos(0);\n publishThread(\"patient\", message, UniMed.mqttClient);\n }", "private void getPatientInfo(String patientId){\n mFirestore.collection(\"users\")\n .document(patientId)\n .addSnapshotListener(new EventListener<DocumentSnapshot>() {\n @Override\n public void onEvent(@Nullable DocumentSnapshot snapshot,\n @Nullable FirebaseFirestoreException e) {\n if (e != null) {\n Log.w(TAG, \"Listen failed.\", e);\n return;\n }\n\n String source = snapshot != null && snapshot.getMetadata().hasPendingWrites()\n ? \"Local\" : \"Server\";\n\n if (snapshot != null && snapshot.exists()) {\n Log.d(TAG, source + \" data: \" + snapshot.getData());\n\n User existingPatient = localUser.getPatientById(snapshot.getId());\n if(existingPatient!=null){\n localUser.changeExistingPatient(existingPatient, setPatientData(snapshot));\n } else {\n localUser.addPatient(setPatientData(snapshot));\n }\n\n // TODO add PatientChangeListener\n //localUser.getIUserDataChangeListener().onUserDataChanged(null);\n\n } else {\n Log.d(TAG, source + \" data: null\");\n }\n }\n });\n }", "@Override\n\tpublic void addPatients(String name, int id, Long mobilenumber, int age) {\n\t\t\n\t}", "Patient save(Patient patient);", "public void setPatientName(String patientName)\n {\n this.patientName = patientName;\n }", "@Override\n public PatientCaseDto getByPatient(Long patientId) {\n return null;\n }", "public void setPatientId(String patientId) {\n\t\tif (patientId == null) {\n\t\t\tthis.patientId = \"\";\n\t\t} else {\n\t\t\tthis.patientId = patientId;\n\t\t}\n\t}", "Reference getPatient();", "private void savePatientToDatabase(Patient patient){\n DatabaseAdapter cateDB = new DatabaseAdapter(AddPatientActivity.this);\n try {\n cateDB.openDatabaseForRead();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n patient.printPatient();\n cateDB.insertPatient(patient);\n\n cateDB.closeDatabase();\n }", "@Override\n @Transactional\n public Patient getPatientById(int id) {\n return patientDAO.getById(id);\n }", "public void setPatientId(String patientId) {\n\t\tthis.patientId = patientId == null ? null : patientId.trim();\n\t}", "public void insertPatient(Patient p) {\n String query = \"INSERT INTO PATIENTS(patient_id, name, gender, birth, dpi, phone, weight, blood, email, password) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n try (PreparedStatement pst = this.transaction.prepareStatement(query)) {\n pst.setInt(1, p.getPatientId());\n pst.setString(2, p.getName());\n pst.setBoolean(3, p.isGender());\n pst.setDate(4, p.getBirth());\n pst.setString(5, p.getDpi());\n pst.setString(6, p.getPhone());\n pst.setDouble(7, p.getWeight());\n pst.setString(8, p.getBlood());\n pst.setString(9, p.getEmail());\n pst.setString(10, p.getPass());\n pst.executeUpdate();\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n }\n }", "private Patient removePatientIdentifer(Patient patient){\n\t\ttry{\n\t\t\tSet<PatientIdentifier> s=patient.getIdentifiers();\n\t\t\tfor(PatientIdentifier pi : s)\n\t\t\t\tpatient.removeIdentifier(pi);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn patient;\n\t}", "@Update(\"UPDATE patients SET first_name=#{firstName}, last_name=#{lastName}, PESEL=#{pesel}, \" +\n \"email=#{email}, phone_number=#{phoneNumber} WHERE id_patient=#{id}\")\n void updatePatient(Patient patient);", "@Override\n @Transactional\n public void updatePatient(Patient patient) {\n patientDAO.updatePatient(patient);\n }", "@Override\n\tpublic Patient save(Patient patient) {\n\t\t// setting logger info\n\t\tlogger.info(\"save the details of the patient\");\n\t\treturn patientRepo.save(patient);\n\t}", "public Patient getPatientByPatientId(long pid) throws PatientExn {\n\t\tTypedQuery<Patient> query = \n\t\t\t\tem.createNamedQuery(\"SearchPatientByPatientID\", Patient.class)\n\t\t\t\t.setParameter(\"pid\", pihhd);\n\t\tList<Patient> patients = query.getResultList();\n\t\tif(patients.size() > 1)\n\t\t\tthrow new PatientExn(\"Duplicate patient records: patient id = \" +pid);\n\t\telse if (patients.size() < 1)\n\t\t\tthrow new PatientExn(\"Patient not found: patient id = \" +pid);\n\t\telse {\n\t\t\tPatient p = patients.get(0);\n\t\t\tp.setTreatmentDAO(this.treatmentDAO);\n\t\t\treturn p;\n\t\t}\n\t}", "@Override\n\tpublic Patient findByPatientId(int id) {\n\t\t// setting logger info\n\t\tlogger.info(\"Find the patient details By Id\");\n\t\tOptional<Patient> patient = patientRepo.findById(id);\n\t\tif (!patient.isPresent()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn patient.get();\n\t}", "@PutMapping(value = \"/update\", produces = \"application/json\")\n void update(@RequestParam int id, @RequestBody Patient patient);", "public void setPatientName(String patientName){\n\t\tthis.patientName = patientName;\n\t}", "public void registerPatientMethod1(Patient p);", "@POST\n @Path(\"patients\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(\"application/json\")\n public Patient newPatient(Patient pat){\n serv.editPatient(pat);\n return pat;\n }", "@Override\n public PatientCaseDto getByDoctorPatient(Long patientId, Long doctorId) {\n return null;\n }", "@GET(PATIENT_BY_ID_PATH)\n\tPatient getPatient(\n\t\t\t@Path(PATIENT_ID_PARAM) long patientId);", "private void addPatient(Patient patient) {\n Location location = mLocationTree.findByUuid(patient.locationUuid);\n if (location != null) { // shouldn't be null, but better to be safe\n if (!mPatientsByLocation.containsKey(location)) {\n mPatientsByLocation.put(location, new ArrayList<Patient>());\n }\n mPatientsByLocation.get(location).add(patient);\n }\n }", "@Override\n public List<PatientCaseDto> getAllByPatient(Long patientId) {\n return null;\n }", "public Patient getPatientByID(int pid) {\r\n\t\tPatient patient=null;\r\n\t\ttry {\r\n\t\t\tString query= \"SELECT * FROM patients WHERE id = ? \";\r\n\t\t\tPreparedStatement pStatement= super.getConnection().prepareStatement(query);\r\n\t\t\tpStatement.setInt(1, pid);\r\n\t\t\tResultSet results= pStatement.executeQuery();\r\n\t\t\twhile(results.next()) {\r\n\t\t\t\t//Patient table\r\n\t\t\t\tint idPatient= results.getInt(1);\r\n\t\t\t\tString fname= results.getString(2);\r\n\t\t\t\tString lname= results.getString(3);\r\n\t\t\t\tString gender= results.getString(4);\r\n\t\t\t\tint age= results.getInt(5);\r\n\t\t\t\tString phone= results.getString(6);\r\n\t\t\t\tString villege= results.getString(7);\r\n\t\t\t\tString commune= results.getString(8);\r\n\t\t\t\tString city= results.getString(9);\r\n\t\t\t\tString province= results.getString(10);\r\n\t\t\t\tString country= results.getString(11);\r\n\t\t\t\tAddress address= new Address(villege, commune, city, province, country);\r\n\t\t\t\tString type= results.getString(12);\r\n\t\t\t\t\r\n\t\t\t\tpatient= new Patient(idPatient, fname, lname, gender, age, phone, address, type);\r\n\t\t\t\tSystem.out.println(\"Get Patients succeed From DatabasePatient\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\t\r\n\t\treturn patient;\r\n\t}", "public void insertPatientShortInfo(PatientShortInfo patient) throws DataAccessException {\n\t\tjdbcTemplate.update(\n\t\t \"INSERT INTO patient (id, name, second_name, surname, born_date, id_number, \"\n\t\t\t\t+ \"sex, phone_number, nationality, insurance_number, home_address, health_status, \"\n\t\t\t\t+ \"disease, medicines, allergies) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\",\n\t\t\t\tpatient.getId(), patient.getName(), patient.getSecondName(), patient.getSurname(),\n\t\t\t\tpatient.getBornDate(), patient.getIdNumber(), patient.getSex(), patient.getPhoneNumber(),\n\t\t\t\tpatient.getNationality(), patient.getInsuranceNumber(), patient.getHomeAddress(),\n\t\t\t\tpatient.getHealthStatus(), patient.getDisease(), patient.getMedicines(), patient.getAllergies());\n\t}", "public void cleanPatient(Patient patient);", "private void setThePatient() {\n String ppsn = mPPSN.getText().toString();\n thePatient.set_id(ppsn.substring(ppsn.indexOf(\":\")+1).trim());\n\n String name = mName.getText().toString();\n thePatient.setName(name.substring(name.indexOf(\":\")+1).trim());\n\n String illness = mCondition.getText().toString();\n thePatient.setIllness(illness.substring(illness.indexOf(\":\")+1).trim());\n\n Address a = new Address();\n String addressLine1 = mAddressLine1.getText().toString();\n a.setAddressLine1(addressLine1.substring(addressLine1.indexOf(\":\")+1).trim());\n\n String addressLine2 = mAddressLine2.getText().toString();\n a.setAddressLine2(addressLine2.substring(addressLine2.indexOf(\":\")+1).trim());\n\n String city = mCity.getText().toString();\n a.setCity(city.substring(city.indexOf(\":\")+1).trim());\n\n String county = mCounty.getText().toString();\n a.setCounty(county.substring(county.indexOf(\":\")+1).trim());\n\n String country = mCountry.getText().toString();\n a.setCountry(country.substring(country.indexOf(\":\")+1).trim());\n\n String postcode = mPostCode.getText().toString();\n a.setPostCode(postcode.substring(postcode.indexOf(\":\")+1).trim());\n\n thePatient.setAddress(a);\n }", "public int createNewPatient(Patient p) {\n int id = 0;\n String query = \"INSERT INTO PATIENTS(name, gender, birth, dpi, phone, weight, blood, email, password) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n try (PreparedStatement pst = this.transaction.prepareStatement(query, PreparedStatement.RETURN_GENERATED_KEYS)) {\n pst.setString(1, p.getName());\n pst.setBoolean(2, p.isGender());\n pst.setDate(3, p.getBirth());\n pst.setString(4, p.getDpi());\n pst.setString(5, p.getPhone());\n pst.setDouble(6, p.getWeight());\n pst.setString(7, p.getBlood());\n pst.setString(8, p.getEmail());\n pst.setString(9, p.getPass());\n pst.executeUpdate();\n \n ResultSet rs = pst.getGeneratedKeys();\n if(rs.next()) {\n id = rs.getInt(1);\n }\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n }\n return id;\n }", "@Insert(\"INSERT into patients(id_patient, first_name, last_name, PESEL, id_address, email, phone_number, \" +\n \"id_firstcontact_doctor, password) VALUES (#{id}, #{firstName}, #{lastName}, #{pesel}, #{address.addressId},\" +\n \"#{email}, #{phoneNumber}, #{firstContactDoctor.id}, #{password})\")\n @Options(useGeneratedKeys = true, keyProperty = \"id\", keyColumn = \"id_patient\")\n void addPatient(Patient patient);", "@Override\n\tpublic Patient delete(Patient patient) {\n\t\t// setting logger info\n\t\tlogger.info(\"delete the patient details \");\n\t\tpatientRepo.delete(patient);\n\t\treturn patient;\n\t}", "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 void setPatient(org.hl7.fhir.ResourceReference patient)\n {\n generatedSetterHelperImpl(patient, PATIENT$2, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "@RequestMapping(value = \"/patients\", method = RequestMethod.GET, headers = {\"patient_id\"})\n public Patient getAPatient(@RequestHeader(\"patient_id\") Long id) {\n return patientRepository.findById(id).orElseThrow(() -> new ResourceNotFoundException(\"Patient\", \"id\" , id));\n }", "public static Long updatePatientId(Connection conn, String uuid, Long patientId) throws SQLException {\r\n \tLong pregnancyId;\r\n \tArrayList pregnancyValues = new ArrayList();\r\n \tString sql = \"UPDATE pregnancy SET patient_id=? WHERE uuid=?\";\r\n \tpregnancyValues.add(patientId);\r\n \tpregnancyValues.add(uuid);\r\n \tpregnancyId = (Long) DatabaseUtils.create(conn, sql, pregnancyValues.toArray());\r\n \treturn pregnancyId;\r\n }", "public boolean addPaient(Patient patient) throws TooManyExceptions;", "@SystemAPI\n\tPatient getPatient();", "public abstract List<ClinicalDocumentDto> findClinicalDocumentDtoByPatientId(Long patientId);", "public void addPatient()\n {\n Scanner sc=new Scanner(System.in);\n System.out.println(\"Enter name of patient\");\n String name=sc.nextLine();\n int pos,id;\n\n do\n {\n System.out.println(\"Enter doctor id to assign to\");\n id=sc.nextInt();\n pos=checkDoctor(id);\n if(pos==-1)\n System.out.println(\"Invalid doctor id\");\n }\n while(pos==-1);\n String docname=doc.get(pos).getName();\n Patient p=new Patient(name,id,docname);\n pt.add(p);\n\n }", "private void storePatient(final Patient patient) {\n\n\t\ttry {\n\t\t\tpatients.put(patient.getIdentifierFirstRep().getValue(), patient);\n\t\t\t// if storing is successful the notify the listeners that listens on\n\t\t\t// any patient => patient/*\n\n\t\t\tfinal String bundleToString = currentPatientsAsJsonString();\n\n\t\t\tbroadcaster\n\t\t\t\t\t.broadcast(new OutboundEvent.Builder().name(\"patients\").data(String.class, bundleToString).build());\n\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n @Transactional\n public void addPatient(Patient patient) {\n patientDAO.addPatient(patient);\n }", "private Patient setRandomPatientNames(Patient patient){\n\t\tpatient = getName(patient);\n\t\treturn patient;\n\t}", "void deletePatient(Patient target);", "public void readPatient() {\n\t\tBufferedReader br;\n\t\tString s;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"patients.txt\"));\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\tString[] fields = s.split(\", \");\n\n\t\t\t\tString ssn = fields[0];\n\t\t\t\tString name = fields[1];\n\t\t\t\tString address = fields[2];\n\t\t\t\tString phoneNum = fields[3];\n\t\t\t\tString insurance = fields[4];\n\t\t\t\tString currentMeds = fields[5];\n\t\t\t\tPatient patient = new Patient(ssn, name, address, phoneNum, insurance, currentMeds);\n\t\t\t\tpat.add(patient);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public PatientCaseDto updateByDoctor(PatientCaseDto patientCaseDto) {\n return null;\n }", "@PostMapping(value = \"/insert\", produces = \"application/json\")\n void insert(@RequestBody Patient patient);", "@Override\n @Transactional\n public void updateChildEvents(Patient patient){\n if (patient.getStatus().equals(\"Issued\")) {\n Set<Prescribing> prescribings = getPatientById(patient.getId()).getPrescribings();\n if (prescribings != null) {\n cancelAllEventsWhenIssued(prescribings);\n }\n }\n messageService.sendMessage();\n updateEventsService.updateAllEvents();\n }", "public static Long updatePregnancy(Connection conn, Map queries, Pregnancy pregnancy, Long patientId, String uuid) throws ServletException, SQLException {\r\n \tLong pregnancyId;\r\n \tString sqlCreatePregnancy = (String) queries.get(\"SQL_UPDATE_PREGNANCY_IMPORT\");\r\n \tArrayList pregnancyValues = new ArrayList();\r\n \t// add patient_id to pregnancyValues\r\n \tpregnancyValues.add(patientId);\r\n \t// add date_visit to pregnancyValues\r\n \tpregnancyValues.add(pregnancy.getDatePregnancyBegin());\r\n \tpregnancyValues.add(pregnancy.getPregnancyBeginEncounterId());\r\n \tpregnancyValues.add(pregnancy.getDatePregnancyEnd());\r\n \tpregnancyValues.add(pregnancy.getPregnancyEndEncounterId());\r\n \tpregnancyValues.add(pregnancy.getDateLabourAdmission());\r\n \tpregnancyValues.add(pregnancy.getLabourAdmissionEncounterId());\r\n \t// last modified\r\n \tpregnancyValues.add(pregnancy.getLastModified());\r\n \t// created\r\n \tpregnancyValues.add(pregnancy.getCreated());\r\n \t// last_modified_by\r\n \tpregnancyValues.add(pregnancy.getLastModifiedBy());\r\n \t// created_by\r\n \tpregnancyValues.add(pregnancy.getCreatedBy());\r\n \t// site_id\r\n \tpregnancyValues.add(pregnancy.getSiteId());\r\n \t// import_pregnancy_id\r\n \tpregnancyValues.add(pregnancy.getImportPregnancyId());\r\n \t// adds uuid\r\n \tpregnancyValues.add(pregnancy.getUuid());\r\n \t// created_site_id\r\n \tpregnancyValues.add(pregnancy.getSiteId());\r\n \tpregnancyValues.add(pregnancy.getPregnancyBeginEncounterUuid());\r\n \tpregnancyValues.add(pregnancy.getPregnancyEndEncounterUuid());\r\n \tpregnancyValues.add(pregnancy.getLabourAdmissionEncounterUuid());\r\n \tpregnancyValues.add(pregnancy.getId());\r\n \tpregnancyId = (Long) DatabaseUtils.create(conn, sqlCreatePregnancy, pregnancyValues.toArray());\r\n \treturn pregnancyId;\r\n }", "public Patient(String id, String givenName, String familyName){\n this.id = id;\n this.givenName = givenName;\n this.familyName = familyName;\n }", "@GET(PATIENT_PATH)\n\tPatient getCurrentPatient();", "List<MedicalRecord> getAllPatientMedicalRecords(HttpSession session, int patientId);", "private void loadPatient() {\n patient = PatientsDatabaseAccessObject.getInstance().getPatients();\n table.getItems().clear();\n for (int i = 0; i < patient.size(); ++i) {\n table.getItems().add(patient.get(i));\n }\n table.refresh();\n }", "void showPatients() {\n\t\t\t\n\t}", "public void setPatientUserId(int userId) {\n\t\tthis.patientUserId=userId;\n\t}", "@Delete(\"DELETE from patients WHERE id_patient=#{patientId}\")\n void deletePatient(int patientId);", "public abstract List<ClinicalDocument> findByPatientId(long patientId);", "private void makeDiagnosis(Patient patient, String diagnosis) {\n patient.setDiagnosis(diagnosis);\n }", "public void consultDentist() {\n\t\tSystem.out.println(\"Patient \" + id + \" is consulting the dentist.\"); \n\t}", "@Override\n public Patient findByPatientName(String patient) {\n return null;\n }", "public void addPatientPersoanlRecords(String pat_id, String doctor_id, String doc_membership_id, String patient_info_type_form,\n String pat_first_name, String pat_middle_name, String pat_last_name, String pat_gender,\n String pat_date_of_birth, String pat_age, String pat_mobile_no, String pat_address,\n String pat_city_town, String pat_pincode, String pat_district, String pref_lang,\n String photo_name, String consent, String special_instruction, String added_by,\n String added_on, String addedTime, String modified_by, String modified_on,\n String is_disabled, String disabled_by, String disabled_on, String is_deleted,\n String deleted_by, String deleted_on, String flag, String status, String email, String phoneType, String isdCode, String alternateNumber, String alternatePhoneType, String uid, String uidType, String alternateNoIsd) {\n\n SQLiteDatabase db = this.getWritableDatabase();\n try {\n ContentValues contentValue = new ContentValues();\n\n contentValue.put(KEY_PATIENT_ID, pat_id);\n contentValue.put(DOCTOR_ID, doctor_id);\n contentValue.put(DOCTOR_MEMBERSHIP_ID, doc_membership_id);\n contentValue.put(PATIENT_INFO_TYPE_FORM, patient_info_type_form);\n contentValue.put(FIRST_NAME, pat_first_name);\n contentValue.put(MIDDLE_NAME, pat_middle_name);\n contentValue.put(LAST_NAME, pat_last_name);\n\n contentValue.put(GENDER, pat_gender);\n contentValue.put(DOB, pat_date_of_birth);\n contentValue.put(AGE, pat_age);\n contentValue.put(PHONE_NUMBER, pat_mobile_no);\n contentValue.put(PATIENT_ADDRESS, pat_address);\n contentValue.put(PATIENT_CIT_CITY_TOWN, pat_city_town);\n\n contentValue.put(PIN_CODE, pat_pincode);\n contentValue.put(DISTRICT, pat_district);\n contentValue.put(LANGUAGE, pref_lang);\n contentValue.put(PHOTO, photo_name);\n contentValue.put(CONSENT, consent);\n contentValue.put(SPECIAL_INSTRUCTION, special_instruction);\n\n contentValue.put(ADDED_BY, added_by);\n contentValue.put(ADDED_ON, added_on);\n contentValue.put(ADDED_TIME, addedTime);\n contentValue.put(MODIFIED_BY, modified_by);\n contentValue.put(MODIFIED_ON, modified_on);\n contentValue.put(IS_DISABLED, is_disabled);\n contentValue.put(DISABLED_BY, disabled_by);\n\n contentValue.put(DISABLED_ON, disabled_on);\n contentValue.put(IS_DELETED, is_deleted);\n contentValue.put(DELETED_BY, deleted_by);\n contentValue.put(DELETED_ON, deleted_on);\n contentValue.put(SYCHRONIZED, flag);\n\n contentValue.put(KEY_EMAIL, email);\n contentValue.put(PHONE_TYPE, phoneType);\n contentValue.put(ISD_CODE, isdCode);\n contentValue.put(ALTERNATE_PHONE_NO, alternateNumber);\n contentValue.put(ALTERNATE_PHONE_TYPE, alternatePhoneType);\n contentValue.put(ATERNATE_NO_ISD_CODE, alternateNoIsd);\n contentValue.put(UID, uid);\n contentValue.put(UIDTYPE, uidType);\n contentValue.put(STATUS, status);\n\n db.delete(TABLE_PATIENT, KEY_PATIENT_ID + \" = ?\" + \" AND \" + DOB + \" = ? \" + \" AND \" + PHONE_NUMBER + \" = ? \" + \" AND \" + ADDED_ON + \" = ? \", new String[]{pat_id, pat_date_of_birth, pat_mobile_no, added_on});\n // Inserting Row\n db.insert(TABLE_PATIENT, null, contentValue);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (db != null) {\n db.close(); // Closing database connection\n }\n }\n }", "@Override\n @Transactional\n public List<Patient> selectPatientsByAttendingDoctor(String doctorFullname) {\n return patientDAO.getByAttendingDoctor(doctorFullname);\n }", "public Patient getPatientById(int patientId) {\n Patient p = null;\n String query = \"SELECT * FROM PATIENTS WHERE patient_id = ? LIMIT 1\";\n try (PreparedStatement pst = this.transaction.prepareStatement(query)) {\n pst.setInt(1, patientId);\n try (ResultSet rs = pst.executeQuery()) {\n if (rs.next()) {\n p = new Patient(rs);\n }\n }\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n }\n return p;\n }", "public int getRecommentPatientID() {\r\n\t\tint nextPatientID=1000;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString query= \"SELECT * FROM patients \";\r\n\t\t\tStatement stm= super.getConnection().createStatement();\r\n\t\t\tResultSet results= stm.executeQuery(query);\r\n\t\t\twhile(results.next()) {\r\n\t\t\t\tresults.last();\r\n\t\t\t\tnextPatientID= results.getInt(1);\r\n\t\t\t}\r\n\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\tnextPatientID++;\r\n\t\treturn nextPatientID;\r\n\t}", "@GetMapping(value = \"/selectById\", produces = \"application/json\")\n Patient selectById(@RequestParam int id);", "public boolean createPatient(Patient patient,PatientRecord patientRecord) {\r\n\t\tboolean isCreated= false;\r\n\t\tString[] row= new String[9];\r\n\t\ttry {\r\n\t\t\tString query = \"INSERT INTO patients VALUES (?,?,?,?,?,?,?,?,?,?,?,?)\";\r\n\t\t\tPreparedStatement pStatement= super.getConnection().prepareStatement(query);\r\n\t\t\tpStatement.setInt(1, patient.getId());\r\n\t\t\tpStatement.setString(2, patient.getFirstName());\r\n\t\t\tpStatement.setString(3, patient.getLastName());\r\n\t\t\tpStatement.setString(4, patient.getGender());\r\n\t\t\tpStatement.setInt(5, patient.getAge());\r\n\t\t\tpStatement.setString(6, patient.getPhone());\r\n\t\t\tpStatement.setString(7, patient.getAddress().getVillege());\r\n\t\t\tpStatement.setString(8, patient.getAddress().getCommune());\r\n\t\t\tpStatement.setString(9, patient.getAddress().getCity());\r\n\t\t\tpStatement.setString(10, patient.getAddress().getProvince());\r\n\t\t\tpStatement.setString(11, patient.getAddress().getCountry());\r\n\t\t\tpStatement.setString(12, patient.getType());\r\n\t\t\t\r\n\t\t\tif(pStatement.executeUpdate() > 0) {\r\n\t\t\t\tpatientID.add(patient.getId());\r\n\t\t\t\trow[0]= patient.getId()+\"\";\r\n\t\t\t\trow[1]= patient.getFirstName();\r\n\t\t\t\trow[2]= patient.getLastName();\r\n\t\t\t\trow[3]= patient.getGender();\r\n\t\t\t\trow[4]= patient.getAge()+\"\";\r\n\t\t\t\trow[5]= patientRecord.getDate()+\"\";\r\n\t\t\t\trow[6]= patient.getPhone();\r\n\t\t\t\tmodelPatient.addRow(row);\r\n\t\t\t\tisCreated= true;\r\n\t\t\t\tSystem.out.println(\"You have insert a patient record\");\r\n\t\t\t\t\r\n\t\t\t};\r\n\t\t}catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\treturn isCreated;\r\n\t}", "public interface PatientService {\n\n /**\n * 新增病人获取ID\n *\n * @return\n */\n Long getNewPid(Patient patient);\n\n /**\n * 新增病人\n *\n * @param patient\n * @return\n */\n JSONObject newPatient(Patient patient);\n\n\n /**\n * 复诊输入病人条件查询\n *\n * @param patient\n * @return\n */\n JSONObject revisit(Patient patient);\n\n\n /**\n * 获取地址列表\n * @return\n */\n JSONObject getPlace();\n\n\n /**\n * 获取病人列表\n * @return\n */\n JSONObject getPatientList(String pName,Integer pageSize,Integer pageNum);\n\n\n /**\n * 获取病人基本信息\n * @param pId\n * @return\n */\n JSONObject getPatientInfo(Long pId);\n\n /**\n * 更新病人基本信息\n * @param patient\n * @return\n */\n JSONObject updatePatientInfo(Patient patient);\n\n\n /**\n * 复诊时,有重复条件者获取病人列表\n */\n JSONObject getRevisitList(Patient patient,Integer pageSize,Integer pageNum);\n\n\n /**\n * 删除病人\n * @param patientId\n * @return\n */\n JSONObject deletePatient(Long patientId);\n\n /**\n * 将选中的病人的病历保存到Word文档\n */\n void saveObjToWord(List<Long> inquiryIdList, boolean all,Long patientId, HttpServletResponse response);\n}" ]
[ "0.7268636", "0.7220609", "0.7044608", "0.6897892", "0.6897892", "0.68391734", "0.68346995", "0.6810576", "0.6791298", "0.6790791", "0.6777771", "0.67756015", "0.67529094", "0.67133874", "0.66838366", "0.6680464", "0.66625285", "0.6649986", "0.6643298", "0.6626605", "0.6601392", "0.6573545", "0.6573545", "0.6543455", "0.65350634", "0.64867926", "0.6453145", "0.64123493", "0.641234", "0.64117604", "0.6399984", "0.63802236", "0.636187", "0.63466024", "0.63346475", "0.63086534", "0.628079", "0.62542236", "0.6249462", "0.62385625", "0.6230466", "0.62172186", "0.6216918", "0.62043846", "0.6194976", "0.6182887", "0.61765325", "0.6153913", "0.6153786", "0.61485255", "0.6145637", "0.61361533", "0.61001855", "0.60855824", "0.6072712", "0.606701", "0.60624653", "0.60599166", "0.6054845", "0.6042541", "0.60398227", "0.6036762", "0.60318184", "0.60238105", "0.59964675", "0.59862083", "0.59723794", "0.59690887", "0.596481", "0.59645194", "0.5944306", "0.59350526", "0.5933477", "0.59251857", "0.592397", "0.5917727", "0.5912763", "0.5885614", "0.588488", "0.58814216", "0.58811206", "0.5875566", "0.5863831", "0.58633447", "0.5862584", "0.5835762", "0.5818589", "0.5796653", "0.5794939", "0.57911557", "0.5784864", "0.5784178", "0.5779517", "0.5772251", "0.5769071", "0.5767847", "0.57643145", "0.5759194", "0.5753335", "0.5747421", "0.5745437" ]
0.0
-1
Created by Abhishek on 30032017.
public interface ApplyInternshipCallback { void onSuccess(ApplyInternData applyInternData); void onFailure(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\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\tpublic void init() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void init() {\n\n\t}", "@Override\n public void init() {\n\n }", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\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 }", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "public void mo4359a() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void init() {\n }", "public void gored() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n void init() {\n }", "@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\r\n\tpublic void rozmnozovat() {\n\t}", "@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 }", "public void mo6081a() {\n }", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\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 public void init() {}", "@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}", "protected void mo6255a() {\n }", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void one() {\n\t\t\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 nghe() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void mo12930a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void init() {\n\n\n\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public void mo21877s() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "public void method_4270() {}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "private void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "public abstract void mo70713b();", "@Override\n public void memoria() {\n \n }" ]
[ "0.6035106", "0.5941473", "0.5938361", "0.58452576", "0.58423066", "0.5785802", "0.5729627", "0.5723349", "0.5705711", "0.5705711", "0.56891584", "0.5685691", "0.5680849", "0.5650604", "0.56486726", "0.5646901", "0.563643", "0.563643", "0.563643", "0.563643", "0.563643", "0.5630684", "0.5618344", "0.5607823", "0.5597566", "0.5585367", "0.5580154", "0.5580154", "0.5580154", "0.5580154", "0.5580154", "0.5580154", "0.5580154", "0.5579982", "0.5577557", "0.5567625", "0.5564307", "0.5564307", "0.55637187", "0.5559371", "0.55506974", "0.55474544", "0.5545933", "0.5527188", "0.5525956", "0.5519757", "0.5517775", "0.55092424", "0.55065125", "0.55065125", "0.55065125", "0.5506016", "0.55044574", "0.55044574", "0.55044574", "0.55044574", "0.55044574", "0.55044574", "0.5502371", "0.55001265", "0.54994595", "0.54983205", "0.54983205", "0.54983205", "0.5496287", "0.5482139", "0.5482139", "0.5482139", "0.5480508", "0.5477014", "0.54647255", "0.54629874", "0.54418373", "0.54418373", "0.5424526", "0.54230285", "0.5421064", "0.5410239", "0.54095876", "0.54094195", "0.54094195", "0.540699", "0.54030967", "0.5391914", "0.5391339", "0.5387743", "0.538656", "0.5384226", "0.53765696", "0.5372769", "0.5370625", "0.53676164", "0.5366329", "0.53645825", "0.53609085", "0.53507704", "0.53507704", "0.5350148", "0.53409666", "0.5338321", "0.53374255" ]
0.0
-1
A new socket connection has been opened on the server.
public void acceptedSocket(long socketId) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void openServer() {\n try {\n this.serverSocket = new ServerSocket(this.portNumber);\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }", "private void openConnection() throws IOException, CorruptedPacketException {\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n Future futureResult = executorService.submit(new InitPacketReceiver(this));\n int timesSent = 0;\n while (!socket.isClosed() && connectionId == null && timesSent < 20) {\n this.sendInitPacket(socket, address, port);\n ++timesSent;\n try {\n futureResult.get(100, TimeUnit.MILLISECONDS);\n } catch (CancellationException e) {\n } catch (InterruptedException e) {\n } catch (ExecutionException e) {\n } catch (TimeoutException e) {\n if (connectionId == null) {\n System.err.println(\"Opening packet has been lost, sending a new one.\");\n }\n }\n }\n\n if (timesSent >= 20) {\n socket.close();\n System.out.printf(\"Could not connect to Karel on %s:%d\\n\", address.getHostAddress(), port);\n }\n futureResult.cancel(true);\n executorService.shutdown();\n\n }", "@Override\r\n\tpublic boolean isOpen() {\r\n\t\t//\r\n\t\treturn this.socket.isOpen();\r\n\t}", "public synchronized void open(){\n if(connected){ //Already connected but needs to get streams\n try{\n streamIn = new DataInputStream(socket.getInputStream());\n streamOut = new DataOutputStream(socket.getOutputStream());\n System.out.println(clientID+\": open: socket\");\n }catch(IOException e){\n System.out.println(clientID+\": open: socket: failed: IOException: \"+e);\n }\n }else if(!isHost) { //ConnectingClient\n try{\n socket = new Socket(ip, port);\n streamIn = new DataInputStream(socket.getInputStream());\n streamOut = new DataOutputStream(socket.getOutputStream());\n connected = true;\n System.out.println(clientID+\": open: socket: IP:\"+ip+\" Port:\"+port);\n }catch(IOException ex){\n connected = false;\n System.out.println(clientID+\": open: socket: failed: IOException: \"+ex);\n }\n }else if(isHost){ //HostClient\n try{\n hostSocket = new ServerSocket(0);\n port = hostSocket.getLocalPort();\n ip = InetAddress.getLocalHost().getHostAddress();\n System.out.println(clientID+\": open: hostSocket: IP:\"+ip+\" Port:\"+port);\n }catch(IOException e){\n System.out.println(clientID+\": open: hostSocket: failed: IOException: \"+e);\n }\n }\n }", "@Override\n\tpublic void onOpen(org.java_websocket.WebSocket conn,\n\t\t\tClientHandshake handshake) {\n\t\t System.out.println(\"有人连接Socket conn:\" + conn);\n\t // l++;\n\t\t logger.info(\"有人连接Socket conn:\" + conn.getRemoteSocketAddress());\n\t\t l++;\n\t\t\n\t}", "public void openConnection() {\n System.out.println(\"Opening connection...\");\n\n try {\n String HOST = \"192.168.4.1\";\n int PORT = 2323;\n connectionSocket = new Socket(HOST, PORT);\n connectionSocket.setTcpNoDelay(true);\n\n writer = new BufferedWriter(new OutputStreamWriter(new BufferedOutputStream(connectionSocket.getOutputStream())));\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n\n System.out.println(\"openConnection(): Success\");\n return;\n } catch (UnknownHostException e) {\n System.out.println(\"UnknownHostException at openConnection()\");\n } catch (IOException e) {\n System.out.println(\"IOException at openConnection()\");\n } catch (Exception e) {\n System.out.println(\"Exception at openConnection()\");\n System.out.println(e.toString());\n }\n\n System.out.println(\"Failed to connect\");\n }", "public void establishSocketConnection() {\n\t\ttry {\n\t\t\tsocket = new Socket(serverIP, serverPort);\n\t\t\tlogger.info(\"Connection with JSON-RPC server opened at local endpoint \" + socket.getLocalAddress().getHostAddress() + \":\" + socket.getLocalPort());\n\t\t\t// create a writer to send JSON-RPC requests to the JSON-RPC server\n\t\t\twriter = new OutputStreamWriter(socket.getOutputStream(), \"utf-8\");\n\t\t\t// create a JsonReader object to receive JSON-RPC response\n\t\t\tjsonReader = new JsonReader(new InputStreamReader(socket.getInputStream(), \"utf-8\"));\n\t\t} catch (UnknownHostException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void establishConnection() throws UnknownHostException, \n \t\t\t\t\t\t\t\t\t\t IOException {\n \t socket = new Socket(serverIP, serverPort);\n }", "private void startConnection() throws IOException {\n bos = new BufferedOutputStream(socket.getOutputStream(), 65536);\n\n byte[] key = new byte[16];\n Random random = new Random();\n random.nextBytes(key);\n String base64Key = Base64.encodeBase64String(key);\n\n byte[] handshake = createHandshake(base64Key);\n bos.write(handshake);\n bos.flush();\n\n InputStream inputStream = socket.getInputStream();\n verifyServerHandshake(inputStream, base64Key);\n\n writerThread.start();\n\n notifyOnOpen();\n\n bis = new BufferedInputStream(socket.getInputStream(), 65536);\n read();\n }", "@Override\r\n public Object connect() {\n if(status()){\r\n //creates thread that checks messages in the network\r\n System.out.println(\"notifying network that connection is good\");\r\n notifyObservers(this);\r\n }\r\n return socket;\r\n }", "private void open() throws ConnectException, IOException {\n if (!opened) {\n if ((host == null) || \"\".equals(host.trim())) throw new ConnectException(\"You must specify the host name\");\n else if (port <= 0) throw new ConnectException(\"You must specify the port number\");\n socket = new Socket();\n InetSocketAddress addr = new InetSocketAddress(host, port);\n socket.setReceiveBufferSize(Utils.SOCKET_BUFFER_SIZE);\n socket.setSendBufferSize(Utils.SOCKET_BUFFER_SIZE);\n socket.setTcpNoDelay(Utils.SOCKET_TCP_NODELAY);\n socket.setKeepAlive(Utils.SOCKET_KEEPALIVE);\n socket.connect(addr);\n initStreams();\n opened = true;\n if (log.isDebugEnabled()) log.debug(\"getReceiveBufferSize() = \" + socket.getReceiveBufferSize());\n }\n }", "int openSocket(SocketRpcController socketController) {\r\n if (socket != null && in != null && out != null) {\r\n return 0;\r\n }\r\n // Open socket\r\n try {\r\n socket = socketFactory.createSocket(host, port);\r\n out = socket.getOutputStream(); //new BufferedOutputStream(socket.getOutputStream());\r\n in = socket.getInputStream(); //new BufferedInputStream(socket.getInputStream());\r\n } catch (UnknownHostException e) {\r\n handleError(socketController, ErrorReason.UnknownHost,\r\n \"Could not find host: \" + host, e);\r\n return -1;\r\n } catch (IOException e) {\r\n handleError(socketController, ErrorReason.IOError, String.format(\r\n \"Could not open I/O for %s:%s\", host, port), e);\r\n close();\r\n return -1;\r\n }\r\n return 1;\r\n }", "@Override\n public void run()\n {\n while (true)\n {\n try\n {\n final Socket socket = m_ServerSocket.accept(); // NOFORTIFY: unreleased resource:\n //resources are managed by the remote channel lookup\n m_Logging.info(\"Connection made from %s for remote interface\", \n socket.getRemoteSocketAddress());\n \n m_RemoteChannelLookup.newServerSocketChannel(socket);\n }\n catch (final IOException e)\n {\n if (m_ServerSocket.isClosed())\n {\n m_Logging.info(\"Server socket has been closed, will stop accepting connections\");\n return;\n }\n }\n }\n }", "private void handleConnection(Socket socket) throws IOException{\n \n if (isMonitoringEnabled()) {\n getGlobalRequestProcessor().increaseCountOpenConnections();\n getPipelineStat().incrementTotalAcceptCount();\n }\n\n getReadBlockingTask(socket).execute();\n }", "void handleConnectionOpened();", "private synchronized static void incrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets++;\r\n\t}", "public int createSocket()\n\t{\n\t\t\n\t}", "private void checkOpened() throws ConnectException {\n if (!opened) throw new ConnectException(\"Client connection not opened\");\n }", "protected boolean connectionOpened() {\n\t\treturn connectionOpened;\n\t}", "@Override\n\tpublic void onOpen( ServerHandshake handshakedata ) {\n\t\tlog.info(\"opened connection\");\n\t\t// if you plan to refuse connection based on ip or httpfields overload: onWebsocketHandshakeReceivedAsClient\n\t}", "@OnOpen\n public void onOpen(Session session) {\n System.out.println(\"Socket A: \"+session.getId() + \" has opened a connection\");\n sendMessageToAll(\"User \" + session.getId() + \" has connected\");\n try {\n //stuur naar de client van de sessie 'Connection Established' over TCP.\n session.getBasicRemote().sendText(\"Connection Established\");\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n sessions.add(session);\n }", "public abstract void handleCurrentConnection(Socket socket) throws IOException;", "private void listenForConnection() throws IOException {\n\twhile(true) {\n System.out.println(\"Waiting for connection...\");\n // Wait for client to connect\n Socket cli = server.accept();\n if(connlist.size() < MAX_CONN) {\n\t\t// if numCli is less then 100\n initConnection(cli);\n }\n\t}\n }", "public void makeConnection() {\n\t\ttry {\n\t\t\tif(sock != null) {\n\t\t\t\ttable.printMsg(\"Cannot join a server twice! You've already connected.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsock = new Socket(serverIP, serverPort);\n\t\t\toos = new ObjectOutputStream(sock.getOutputStream());\n\t\t\tois = new ObjectInputStream(sock.getInputStream());\n\t\t\tThread thread = new Thread(new ServerHandler());\n\t\t\tthread.start();\n\t\t} catch(Exception e) {\n\t\t\ttable.printMsg(\"Cannot Join Server.\");\n\t\t\tsock = null;\n\t\t\ttable.repaint();\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "void open(String nameNport) {\n\tString[] token=nameNport.split(\":\");\n\tString host=token[0];\n\tint port=Integer.parseInt(token[1]);\n\tint proceedFlag=1;\n\tIterator<Socket> iterator=Connection.connections.iterator();\n\tif(host.equalsIgnoreCase(\"localhost\") || host.equals(\"127.0.0.1\"))\n\t\thost=simpella.infoSocket.getLocalAddress().getHostAddress();\n\tif((host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getHostAddress())||host.equalsIgnoreCase(simpella.infoSocket.getLocalAddress().getCanonicalHostName()))&&(simpella.serverPortNo==port || simpella.downloadPortNo==port)){\n\t\tproceedFlag=0;\n\t\tSystem.out.println(\"Client: Self Connect not allowed\");\n\t\t}\n\twhile(iterator.hasNext() && proceedFlag==1)\n\t{\n\t\tSocket sock=(Socket)iterator.next();\n\t\t\n\t\tif((host.equalsIgnoreCase(sock.getInetAddress().getHostAddress()) || host.equalsIgnoreCase(sock.getInetAddress().getCanonicalHostName())) && port==sock.getPort()){\n\t\t\tproceedFlag=0; \n\t\t\tSystem.out.println(\"Client: Duplicate connection to same IP/port not allowed\");\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\tif(proceedFlag==1)\n\t\t{\n\t\n\t\n\tbyte type=04;\n\tMessage msg=new Message(type);\n\ttry {\n\t\tConnection.outgoingConnPackRecv[noOfConn]=0;\n\t\tConnection.outgoingConnPackSent[noOfConn]=0;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]=0;\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]=0;\n\t\t\n\t\tclientSideSocket[noOfConn]=new Socket(host,port);\n\t\tSystem.out.println(\"Client:TCP Connection established...Begin handshake\");\n\t\toutToServer[noOfConn]=new ObjectOutputStream(clientSideSocket[noOfConn].getOutputStream());\n\t\tinFromServer[noOfConn]=new ObjectInputStream(clientSideSocket[noOfConn].getInputStream());\n\t\tString strToServer=\"SIMPELLA CONNECT/0.6\\r\\n\";\n\t\tbyte[] byteArray= strToServer.getBytes(\"UTF-16LE\");\n\t\tmsg.setPayload(byteArray);\n \t\n\t\tSystem.out.println(\"Client:\"+new String(byteArray));\n\t\t//outToServer.writeUTF(\"SIMPELLA CONNECT/0.6\\r\\n\");\n\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray.length+23;\n\t\toutToServer[noOfConn].writeObject((Object)msg);\n\t\tConnection.outgoingConnPackRecv[noOfConn]++;\n\t\t\n\t\tMessage msg1=(Message) inFromServer[noOfConn].readObject();\n\t\tbyte[] fromServer=msg1.getPayload();\n\t\tConnection.outgoingConnPackRecvSize[noOfConn]+=fromServer.length+23;\n\t\tString strFromServer=new String(fromServer);\n\t\tSystem.out.println(\"Server:\"+strFromServer);\n\t\tif(msg1.getMessage_type()==05)\n\t\t\t{\n\t\t\tstrToServer=\"SIMPELLA/0.6 200 thank you for accepting me\\r\\n\";\n\t\t\tbyte[] byteArray1= strToServer.getBytes(\"UTF-16LE\");\n\t\t\tMessage m=new Message((byte)05);\n\t\t\tm.setPayload(byteArray1);\n\t\t\tConnection.outgoingConnPackSent[noOfConn]++;\n\t\t\tConnection.outgoingConnPackSentSize[noOfConn]+=byteArray1.length+23;\n\t\t\toutToServer[noOfConn].writeObject((Object)m);\n\t\t\t\n\t\t\tConnection.connections.add(clientSideSocket[client.noOfConn]);\n\t\t\tConnection.outgoingConnection[client.noOfConn]=clientSideSocket[client.noOfConn];\n\t\t\tConnection.clientOutStream[client.noOfConn]=outToServer[client.noOfConn];\n\t\t\tnew clientSocketListen(clientSideSocket[noOfConn],outToServer[noOfConn],inFromServer[noOfConn]);\n\t\t\tupdate();\n\t\t\tnoOfConn++;\n\t\t\t//System.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"<open>:Cannot open connection to \"+host+\" at this time\");\n\t\t\t\tclientSideSocket[noOfConn].close();\n\t\t\t\tinFromServer[noOfConn].close();\n\t\t\t\toutToServer[noOfConn].close();\n//\t\t\t\tSystem.out.println(\"Client:num of conn=\"+noOfConn);\n\t\t\t}\n\t\t\n\t\t\n\t} catch (UnknownHostException e) {\n\t\tSystem.out.println(\"Unknown Host: Destination host unreachable\");\n\t\t//e.printStackTrace();\n\t} catch (Exception e) {\n\t\tSystem.out.println(\"Connection Refused/Destination host unreachable\");\n\t}\n\t\t}\n\t}", "private void listen() {\n\t\ttry {\n\t\t\tServerSocket servSocket = new ServerSocket(PORT);\n\t\t\tSocket clientSocket;\n\t\t\twhile(true) {\n\t\t\t\tclientSocket = servSocket.accept();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error - Could not open connection\");\n\t\t}\n\t\t\n\t}", "public static int openSocket() throws IOException {\n serverSocket = new ServerSocket(0, 10, InetAddress.getLocalHost());\n return serverSocket.getLocalPort();\n }", "protected void connect() {\n for (int attempts = 3; attempts > 0; attempts--) {\n try {\n Socket socket = new Socket(\"localhost\", serverPort);\n attempts = 0;\n\n handleConnection(socket);\n }\n catch (ConnectException e) {\n // Ignore the 'connection refused' message and try again.\n // There may be other relevant exception messages that need adding here.\n if (e.getMessage().equals(\"Connection refused (Connection refused)\")) {\n if (attempts - 1 > 0) {\n // Print the number of attempts remaining after this one.\n logger.warning(\"Connection failed (\" + name + \"). \" + \n (attempts - 1) + \" attempts remaining.\");\n }\n else {\n logger.severe(\"Connection failed (\" + name + \"). \");\n }\n }\n else {\n logger.severe(e.toString());\n break;\n }\n }\n catch (Exception e) {\n logger.severe(\"Socket on module '\" + name + \"': \" + e.toString());\n }\n }\n }", "void connect() throws UnknownHostException, IOException {\n\t\tif (isConnected()) {\n\t\t\tdisconnect();\n\t\t}\n\t\t\n\t\tif (!ssl) {\n\t\t\tsock = new Socket();\n\t\t} else {\n\t\t\tsock = SSLSocketFactory.getDefault().createSocket();\n\t\t}\n\t\tsock.connect(new InetSocketAddress(host, port));\n\t\t\n\t\tif (sock != null) {\n\t\t\tsock.setKeepAlive(true);\n\t\t\tinStream = new UByteInputStream(new BufferedInputStream(sock.getInputStream(), sock.getReceiveBufferSize()));\n\t\t\tconnected();\n\t\t}\n\t}", "public void createConnection() throws ServerUnavailableException {\n clearConnection();\n while (serverSock == null) {\n try {\n // try to open a Socket to the server\n InetAddress addr = InetAddress.getByName(host);\n System.out.println(\"attempting to connect to \" + addr + \":\" + port + \"...\");\n serverSock = new Socket(addr, port);\n in = new BufferedReader(new InputStreamReader(serverSock.getInputStream()));\n out = new BufferedWriter(new OutputStreamWriter(serverSock.getOutputStream()));\n } catch (IOException e) {\n throw new ServerUnavailableException(\"Unable to connect to the server\");\n }\n }\n }", "private void openConnection(){}", "public void handleNewConnections() throws IOException {\n\t\tfinal Socket newConnection = serverSocket.accept();\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n \t\t\t\tclientOutputs.add(new PrintWriter(newConnection.getOutputStream(), true));\n \t\t\t\thandleCurrentConnection(newConnection);\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}", "public MonitoringSocket() throws IOException {\r\n\r\n\t\tincrementNumberOfOpenSockets();\r\n\t\tprintMonitoringSocketStatus();\r\n\t}", "public boolean setupSocket() throws ExitProgram {\n\t\tboolean success = false;\n\t\t\n\t\tthis.showNamedMessage(\"Trying to open a new socket...\");\n\t\twhile (this.socket == null) { \n\t\t\ttry {\n\t\t\t\tthis.socket = TransportLayer.openNewDatagramSocket(this.ownPort);\n\t\t\t\tthis.showNamedMessage(\"Client now bound to port \" + ownPort);\n\t\t\t\tsuccess = true;\n\t\t\t} catch (SocketException e) {\n\t\t\t\tthis.showNamedError(\"Something went wrong when opening the socket: \"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t\tif (!textUI.getBoolean(\"Do you want to try again?\")) {\n\t\t\t\t\tthrow new exceptions.ExitProgram(\"User indicated to exit the \"\n\t\t\t\t\t\t\t+ \"program after socket opening failure.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn success;\n\t}", "protected synchronized boolean isSockOpen(){\n\t\ttry{\n\t\t\tif(out.checkError()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "final public void openConnection() throws IOException {\n // Do not do anything if the connection is already open\n if (isConnected())\n return;\n\n // Create the sockets and the data streams\n try {\n clientSocket = new Socket(host, port);\n output = new DataOutputStream(clientSocket.getOutputStream());\n // input =\n // new BufferedReader(new InputStreamReader(clientSocket.getInputStream(), \"Big5_HKSCS\"));\n input = new DataInputStream(clientSocket.getInputStream());\n } catch (IOException ex)\n // All three of the above must be closed when there is a failure\n // to create any of them\n {\n try {\n closeAll();\n } catch (Exception exc) {\n }\n\n throw ex; // Rethrow the exception.\n }\n\n clientReader = new Thread(this); // Create the data reader thread\n readyToStop = false;\n clientReader.start(); // Start the thread\n }", "private TimerTask socketListener()\r\n\t{\r\n\t\tString theMessage;\r\n\t\tif (theSocket != null)\r\n\t\t{\r\n\t\t\tif (theSocket.isReady())\r\n\t\t\t{\r\n\t\t\t\t// blocks execution\r\n\t\t\t\t// get theMessage\r\n\t\t\t\ttheMessage = theSocket.getMessage();\r\n\t\t\t\tif (theMessage == null)\r\n\t\t\t\t{\r\n\t\t\t\t\twriteLine(\"Our connection has ended!\", 0);\r\n\t\t\t\t\trunning = false;\r\n\t\t\t\t\t// if the message = null\r\n\t\t\t\t\t// the we need to check the socket again\r\n\t\t\t\t\t// just in case\r\n\t\t\t\t\t// close it nicely if we can\r\n\t\t\t\t\tif (theSocket != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttheSocket.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// otherwise just set it to null\r\n\t\t\t\t\t// set it to null regardless\r\n\t\t\t\t\ttheSocket = null;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// if the socket is OK\r\n\t\t\t\t\t// and the socket isReady\r\n\t\t\t\t\t// then display the input\r\n\t\t\t\t\twriteLine(theMessage, 2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} // end if theSocket !=null\r\n\t\treturn null;\r\n\t}", "protected void connectionEstablished() {}", "protected abstract void processConnection(Socket socket);", "public void socketOpened(final String remoteInfo) {\n\n // This method does nothing.\n }", "void onConnectionAdded(SocketConnection connection);", "public void connect() throws IOException {\n socket = new java.net.Socket(IP_SERVER, PORT);\n Logger.getLogger(\"SocketClient\").log(Level.INFO, \"Socket establecido\");\n }", "public void creatSocket() {\n\n try {\n\n server = new ServerSocket(PORT);\n\n mExecutorService = Executors.newCachedThreadPool();\n\n while (true) {\n\n Socket client = server.accept();\n\n mExecutorService.execute(new SockectService(client));\n\n Log.d(TAG, \"Creating Socket\" );\n\n }\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }", "private void connectToServer() {\n\t\ttry {\n\t\t\tsocket = new Socket(InetAddress.getLocalHost(), Server.SERVER_PORT);\n\t\t\tin = new BufferedReader(new InputStreamReader(\n\t\t\tsocket.getInputStream()));\n\t\t\tout = new PrintWriter(socket.getOutputStream());\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot connect to server\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "private void openSocket(String host, int port) throws IOException {\n \t\t// Debug - attempting connection\n \n \t\tclientSocket = new Socket(InetAddress.getByName(host), port);\n \n \t\toutput = new BufferedWriter(new OutputStreamWriter(\n \t\t\t\tclientSocket.getOutputStream()));\n \t\toutput.flush();\n \n \t\tfileOutput = new BufferedOutputStream(clientSocket.getOutputStream());\n \n \t\tinput = new BufferedReader(new InputStreamReader(\n \t\t\t\tclientSocket.getInputStream()));\n \n \t\t// Debug - done\n \t}", "public boolean socketStillAlive() {\n if (bluetoothSocket != null)\n return bluetoothSocket.getSocket() != null;\n return false;\n }", "public void connect() {\n if (isShutdown)\n return;\n\n setNewConnection(reconnectInternal());\n }", "@Override\n\tprotected void onConnect() {\n\t\tLogUtil.debug(\"server connect\");\n\n\t}", "public boolean isConnected() {\n\t\treturn sock != null;\n\t}", "public void onOpen(WebSocket conn);", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "private boolean connectServer() {\n\t\tclNetwork networkInfo = new clNetwork();\n\t\ttry {\n\t\t\tSocket _socket = new Socket(dstAddress, networkInfo.NTP_PORT);\n\t\t\t_socket.setSoTimeout(1000);\n\t\t\t_socket.setTcpNoDelay(true);\n\t\t\topenedSocket = _socket;\n\t\t\tinStream = openedSocket.getInputStream();\n\t\t\toutStream = openedSocket.getOutputStream();\n\t\t\treturn true;\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "private void connectToServer() throws IOException {\n\t\tna.message(\"Connecting to \" + serverAddress.getHostAddress()\n\t\t\t\t+ \" at port#: \" + portNumber);\n\t\tclientSocket = new Socket(serverAddress, portNumber);\n\t}", "public void connect() {\n synchronized (globalLock) {\n if (isRunning) {\n throw new IllegalStateException(\"WebSocketClient is not reusable\");\n }\n\n this.isRunning = true;\n createAndStartConnectionThread();\n }\n }", "public void run() {\n\t\t\twhile (true) {// 保持连接直到异常发生或套接字返回\n\t\t\t\ttry {\n\t\t\t\t\tif (serverSocket != null) {\n\t\t\t\t\t\tmTempSocket = serverSocket.accept(); // 如果一个连接同意\n\t\t\t\t\t}\n\t\t\t\t\t// If a connection was accepted\n\t\t\t\t\tif (mTempSocket != null) {\n\t\t\t\t\t\t// Do work to manage the connection (in a separate\n\t\t\t\t\t\t// thread)\n\t\t\t\t\t\tmanageConnectedSocket(); // 管理一个已经连接的RFCOMM通道在单独的线程。\n\t\t\t\t\t\tserverSocket.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void run() {\r\n while (!serverSocket.isClosed()) {\r\n try {\r\n Socket socket = serverSocket.accept();\r\n if (socket.isConnected()) {\r\n clientConnections.add(new ConnectionHandler(socket));\r\n }\r\n } catch (SocketException e) {\r\n System.out.println(\"Socket ist nicht verfügbar\");\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@SuppressWarnings(\"resource\")\r\n public void run() {\r\n try {\r\n ServerSocket server = new ServerSocket(ConfigurationFile.getClientPort()[clientNumber-1]);\r\n while(true) {\r\n Socket socket =server.accept();\r\n Thread thread = new Thread(new Connection(socket,hashtable));\r\n thread.start();\r\n }\r\n }\r\n catch(IOException e) {\r\n System.out.println(\"Server socket could not be created. Check configuration file.\");\r\n }\r\n }", "public void connect() {\n try {\n socket = new Socket(serverAddress, serverPort);\n outputStream = new ObjectOutputStream(socket.getOutputStream());\n inputStream = new ObjectInputStream(socket.getInputStream());\n //A thread which will constantly listen for updates from the server and forward them to Client\n new Thread(() -> {\n while (socket.isConnected()) {\n try {\n Renderable message = (Renderable) inputStream.readObject();\n if(message != null) {\n //logger.info(\"Received \" + message.getClass().getSimpleName() + \" from server.\");\n renderablePublisher.submit(message);\n }\n } catch (IOException | ClassNotFoundException e) {\n renderablePublisher.submit(new ServerOfflineUpdate());\n break;\n }\n }\n }).start();\n } catch (IOException e) {\n renderablePublisher.submit(new ServerOfflineUpdate());\n }\n }", "private void acceptConnection() throws Exception {\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \"TcpConnectionListener.acceptConnection()\");\n\n Socket sock = proxyService.getServerSocket().accept();\n String inaddr = sock.getInetAddress().getHostAddress();\n\n connectionCount++;\n\n if (logger.isLoggable(BasicLevel.INFO))\n logger.log(BasicLevel.INFO, \" -> accept connection from \" + inaddr);\n\n try {\n sock.setTcpNoDelay(true);\n\n // Fix bug when the client doesn't use the right protocol (e.g. Telnet)\n // and blocks this listener.\n sock.setSoTimeout(timeout);\n\n InputStream is = sock.getInputStream();\n NetOutputStream nos = new NetOutputStream(sock);\n\n byte[] magic = StreamUtil.readByteArrayFrom(is, 8);\n for (int i = 0; i < 5; i++) {\n if (magic.length == i || magic[i] != MetaData.joramMagic[i] && magic[i] > 0) {\n String errorMsg = \"Bad magic number. Client is not compatible with JORAM.\";\n protocolErrorCount++;\n throw new IllegalAccessException(errorMsg);\n }\n }\n if (magic[7] != MetaData.joramMagic[7]) {\n if (magic[7] > 0 && MetaData.joramMagic[7] > 0) {\n String errorMsg = \"Bad protocol version number \" + magic[7] + \" != \" + MetaData.joramMagic[7];\n protocolErrorCount++;\n throw new IllegalAccessException(errorMsg);\n }\n \n logger.log(BasicLevel.WARN,\n \"Wildcard protocol version number: from stream = \" + magic[7] + \", from MetaData = \" + MetaData.joramMagic[7]);\n }\n\n //read the ack mode(noAckedQueue)\n boolean noAckedQueue = StreamUtil.readBooleanFrom(is);\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \" -> read noAckedQueue = \" + noAckedQueue);\n if (noAckedQueue)\n TcpProxyService.createExecutors();\n \n long dt = Math.abs(StreamUtil.readLongFrom(is) - System.currentTimeMillis());\n if (dt > clockSynchroThreshold)\n logger.log(BasicLevel.WARN, \" -> bad clock synchronization between client and server: \" + dt);\n StreamUtil.writeTo(dt, nos);\n\n Identity identity = Identity.read(is);\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \" -> read identity = \" + identity);\n\n int key = StreamUtil.readIntFrom(is);\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \" -> read key = \" + key);\n\n int heartBeat = 0;\n if (key == -1) {\n heartBeat = StreamUtil.readIntFrom(is);\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \" -> read heartBeat = \" + heartBeat);\n }\n \n if (logger.isLoggable(BasicLevel.INFO))\n logger.log(BasicLevel.INFO, \" -> open connection \" + identity + \"/\" + key + \" - \" + heartBeat);\n \n GetProxyIdNot gpin = new GetProxyIdNot(identity, inaddr);\n AgentId proxyId;\n try {\n gpin.invoke(AdminTopic.getDefault());\n proxyId = gpin.getProxyId();\n } catch (Exception exc) {\n if (logger.isLoggable(BasicLevel.WARN))\n logger.log(BasicLevel.WARN, \" -> login failed\", exc);\n failedLoginCount++;\n StreamUtil.writeTo(1, nos);\n StreamUtil.writeTo(exc.getMessage(), nos);\n nos.send();\n return;\n }\n\n if (logger.isLoggable(BasicLevel.DEBUG))\n logger.log(BasicLevel.DEBUG, \" -> open connection, proxyId=\" + proxyId);\n \n IOControl ioctrl;\n ReliableConnectionContext ctx;\n if (key == -1) {\n OpenConnectionNot ocn = new OpenConnectionNot(Type.RELIABLE, heartBeat, noAckedQueue);\n ocn.invoke(proxyId);\n StreamUtil.writeTo(0, nos);\n ctx = (ReliableConnectionContext) ocn.getConnectionContext();\n key = ctx.getKey();\n StreamUtil.writeTo(key, nos);\n nos.send();\n ioctrl = new IOControl(sock);\n } else {\n GetConnectionNot gcn = new GetConnectionNot(key);\n try {\n gcn.invoke(proxyId);\n } catch (Exception exc) {\n if (logger.isLoggable(BasicLevel.WARN))\n logger.log(BasicLevel.WARN, \"TcpConnectionListener: reconnection failed\", exc);\n StreamUtil.writeTo(1, nos);\n StreamUtil.writeTo(exc.getMessage(), nos);\n nos.send();\n return;\n }\n ctx = (ReliableConnectionContext) gcn.getConnectionContext();\n StreamUtil.writeTo(0, nos);\n nos.send();\n ioctrl = new IOControl(sock, ctx.getInputCounter());\n\n // Close the remaining connection if it exists\n TcpConnection tcpConnection = proxyService.getConnection(proxyId, key);\n if (tcpConnection != null) {\n tcpConnection.close();\n }\n }\n\n // Reset the timeout in order to enable the server to indefinitely\n // wait for requests.\n sock.setSoTimeout(0);\n\n TcpConnection tcpConnection = new TcpConnection(ioctrl, ctx, proxyId, proxyService, identity);\n tcpConnection.start();\n } catch (IllegalAccessException exc) {\n if (logger.isLoggable(BasicLevel.ERROR))\n logger.log(BasicLevel.ERROR, \"TcpConnectionListener: close connection\", exc);\n sock.close();\n throw exc;\n } catch (IOException exc) {\n if (logger.isLoggable(BasicLevel.WARN))\n logger.log(BasicLevel.WARN, \"TcpConnectionListener: close socket\", exc);\n sock.close();\n throw exc;\n }\n }", "@Override\n public void socket() {\n }", "private void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(Server.ADDRESS, Server.PORT_NUMBER);\n\t\t\tthis.oos = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tthis.ois = new ObjectInputStream(socket.getInputStream());\n\t\t\tServerListener serverlistener = new ServerListener();\n\t\t\tserverlistener.start();\n\t\t\tRequest request = new Request(RequestCode.START_DOCUMENT_STREAM);\n\t\t\trequest.setUsername(user.getUsername());\n\t\t\toos.writeObject(request);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void ClientSocketConnection(ServerSocket serverSocket){\n while(true){\n try{\n Socket socket = serverSocket.accept();\n ClientThread client = new ClientThread(this, socket);\n Thread thread = new Thread(client);\n thread.start();\n clients.add(client);\n } \n catch (IOException e){\n e.printStackTrace();\n }\n }\n }", "public void makeConnection() {\n\t\t// make a socket, output stream, and try connecting to the server\n\t\twhile (!connection) {\n\t\t\ttry {\n\t\t\t\tsocket = new Socket(address, port);\n\t\t\t\toutStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\t\tconnection = true;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public boolean reconnect()\r\n {\n return state.isConnected();\r\n }", "public boolean open() {\n boolean success = true;\n SocketAddress serverAddress = new InetSocketAddress(serverHostName, serverHostPort);\n\n try {\n commSocket = new Socket();\n commSocket.connect(serverAddress);\n } catch(UnknownHostException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - the target server is an unknown host: \" + serverHostName + \"!\");\n e.printStackTrace();\n System.exit(1);\n } catch(NoRouteToHostException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - the target server is unreachable: \" + serverHostName + \"!\");\n e.printStackTrace();\n System.exit(1);\n } catch(ConnectException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - the server did not respond at: \" + serverHostName + \".\" + serverHostPort + \"!\");\n if (e.getMessage().equals(\"Connection refused\"))\n success = false;\n else {\n GenericIO.writelnString(e.getMessage() + \"!\");\n e.printStackTrace();\n System.exit(1);\n }\n } catch(SocketTimeoutException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - connection timed out while attempting to reach: \"\n + serverHostName + \".\" + serverHostPort + \"!\");\n success = false;\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - unidentified error while connecting to: \" + serverHostName + \".\" + serverHostPort + \"!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n if(!success) return (success);\n\n try {\n outputStream = new ObjectOutputStream(commSocket.getOutputStream ());\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not open the socket's output stream!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n try {\n inputStream = new ObjectInputStream(commSocket.getInputStream ());\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread ().getName ()\n + \" - could not open the socket's input stream!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n return (success);\n }", "public void host() throws IOException {\n\t\tserverSocket = new ServerSocket(getPort());\n\t\twhile (true) {\n\t\t\thandleNewConnections();\n\t\t}\n\t}", "public void initiateConnection() {\n\t\tif (Settings.getRemoteHostname() != null) {\n\t\t\ttry {\n\t\t\t\toutgoingConnection(new Socket(Settings.getRemoteHostname(), Settings.getRemotePort()));\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"failed to make connection to \" + Settings.getRemoteHostname() + \":\"\n\t\t\t\t\t\t+ Settings.getRemotePort() + \" :\" + e);\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t}", "@Override\n \tpublic void connectionOpened(NetHandler netClientHandler, String server, int port, INetworkManager manager)\n \t{\n \t}", "public void connect() throws Exception\n {\n if(connected)\n return;\n connectionSocket = new Socket(address, CommonRegister.DEFAULT_PORT);\n localPeerID = ++localPeerIDCount;\n initListener();\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n writer = new PrintWriter(connectionSocket.getOutputStream(),true);\n connected = true;\n }", "@Override\r\n\tpublic void start(Socket socket){}", "public void newClientConnection (ServerSocket client) {\n this.connectedClients.add(client);\n }", "private void connectToServer() {\n\n try {\n this.socket = new Socket(InetAddress.getByName(serverIP), this.port);\n\n oos = new ObjectOutputStream(socket.getOutputStream());\n oos.flush();\n ois = new ObjectInputStream(socket.getInputStream());\n\n Message connectMessage = new Message(Message.CLIENT_CONNECT);\n connectMessage.setMessage(userName);\n sendToServer(connectMessage);\n\n Message message;\n while (true){// wait for welcome message\n message = (Message) ois.readObject();\n if(message != null && message.getType() == Message.WELCOME){\n handleMessage(message);\n break;\n }\n }\n\n } catch (UnknownHostException e) {\n e.printStackTrace();\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "private void start_Connexion()throws UnknownHostException, IOException{\n \tsocket = new Socket(IP,num_Socket);\n \tout = new ObjectOutputStream(socket.getOutputStream());\n \tin = new ObjectInputStream(socket.getInputStream());\n \t\n }", "private void connection() {\n boolean connect;\n try {\n connect = true;\n this.jTextArea1.setText(\"Server starts...\");\n server = new MultiAgentServer(this);\n String ip = \"\";\n int errorBit = 256;\n for (int i = 0; i < server.getIpAddr().length; i++) {\n int currentIP = server.getIpAddr()[i];\n if (currentIP < 0) {\n currentIP += errorBit;\n }\n ip += currentIP + \".\";\n }\n ip = ip.substring(0, ip.length() - 1);\n System.out.println(ip);\n Naming.rebind(\"//\" + ip + \"/server\", server);\n this.jTextArea1.setText(\"Servername: \" + ip);\n this.jTextArea1.append(\"\\nServer is online\");\n } catch (MalformedURLException | RemoteException e) {\n this.jTextArea1.append(\"\\nServer is offline, something goes wrong!!!\");\n connect = false;\n }\n if (dialog.getMusicBox().isSelected()) {\n sl = new SoundLoopExample();\n }\n reconnectBtn.setEnabled(!connect);\n }", "boolean isSocketInitialized() {\n return clientSocket != null;\n }", "@Override\n public void connectionLost() {\n }", "public boolean connectionActive() {\n\t\tif (socketConnection == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn socketConnection.isConnected();\n\t\t}\n\t}", "public void connect() throws IOException {\n\t\tsocket = new Socket(host, port);\n\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\tout = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));\n\t\tconnected = true;\n\t\texecutor = Executors.newScheduledThreadPool(5);\n\t}", "private void openInputStream() throws IOException {\n InputStreamReader isReader = new InputStreamReader(this.sock.getInputStream());\n reader = new BufferedReader(isReader);\n }", "protected abstract ConnectionBase createNewConnection(Socket socket);", "@SuppressWarnings(\"resource\")\r\n\tprivate void tryToSetupServer() {\r\n\t\ttry {\r\n\t\t\tsetupStream.write(\"Trying to start on \" + Inet4Address.getLocalHost().toString() + \":\" + port);\r\n\t\t\tcientConn = new ServerSocket(port).accept();\r\n\t\t\tsetupStream.write(\"Client connectd, ready for data\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tif(e.getMessage().contains(\"Bind failed\")) {\r\n\t\t\t\tsetupStream.write(\"You can't use that port\");\r\n\t\t\t} else if(e.getMessage().contains(\"Address already in use\")) {\r\n\t\t\t\tsetupStream.write(\"That port is already in use\");\r\n\t\t\t}\r\n\t\t\tport = -1;\r\n\t\t}\r\n\t}", "private static Socket getSocket() \n{\n return socket; \n }", "public boolean isConnected() {\n return mConnectionSocket.isConnected() && !mConnectionSocket.isClosed();\n }", "@Override\n public void onConnectionRequest(Socket socket) {\n ConnectionHandler connectionHandler = makeConnection(socket);\n if(connectionHandler != null){\n readOnlyConnections.add(connectionHandler);\n onConnectionEstablished(connectionHandler);\n }\n }", "protected void mainTask() {\n\ttry {\n\t socket = serverSocket.accept();\t\n\t spawnConnectionThread(socket);\n\t} catch (IOException e) {\n\t return;\n\t}\n }", "public boolean needsConnectionLeftOpen() {\n return false;\n }", "public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t// future.addListener(channelFutureListener);\r\n\t\t\tlogger.warn(\"Closed connection.\");\r\n\t\t}\r\n\r\n\t}", "@Override\n public boolean connect() {\n\n if (!isConnected) {\n try {\n\n Socket socket = new Socket(hostName, portNumber);\n out = new PrintWriter(socket.getOutputStream(), true);\n in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n isConnected = true;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n return isConnected;\n }", "@Override\n\tpublic void run() {\n try {\n serverSocket = new ServerSocket(port);\n \n while (true) {\n System.out.println(\"[GenericServer.run] Waiting for connections on Port #\" + port);\n socket = serverSocket.accept();\n System.out.println(\"[GenericServer.run] A connection to a client is established!\");\n processConnection(socket);\n }\n\n } catch (IOException ioe) {\n System.err.println(\"IOException\" + ioe.getMessage());\n ioe.printStackTrace();\n }\n }", "private static void openServerSocket(int port) {\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Server Error\");\n\t\t}\n\t}", "public synchronized Connection incomingConnection(Socket s) throws IOException {\n\n Connection c;\n c = new Connection(s, count++);\n connections.add(c);\n System.out.println(\"Add a new connection!\");\n return c;\n }", "void serverLostConnection();", "@Override\n\t\t\tpublic void onOpen(WebSocket conn, ClientHandshake handshake) {\n\t\t\t\tSystem.out.print(\"onOpen\");\n\t\t\t\tif(listener!=null) listener.onMessage(\"onOpen\");\n\t\t\t}", "@Override\r\n\tpublic void close() {\r\n\t\tthis.socket.close();\r\n\t}", "private static boolean AttemptConnect() {\n try {\n if (Connect()) {\n Log.Confirmation(\"Connected to server on: \" + socket);\n // send connection type\n dos.writeUTF(\"viewer\");\n return true;\n } else {\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }", "public ClientWorker(Socket connectionSocket){\r\n\t\tthis.connectionSocketConected = connectionSocket;\r\n\t}", "public boolean isConnected() {\n return connectionSocket.isConnected();\n }", "@Override\n \tpublic void connectionOpened(NetHandler netClientHandler, MinecraftServer server, INetworkManager manager)\n \t{\n \t}", "@Override\n\tpublic void run(){\n\t\tInetAddress IPAddress = serverTcpSocket.getInetAddress();\n\t\tfor (ClientObj c: clients)\n\t\t\tif (c.getId() == client.getId()){\n\t\t\t\tSystem.out.print(IPAddress + \" Client already connected!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\ttry{\n\t\t\t// Check handshake received for correctness\n\t\t\t//(connect c->s) [herader | \"JUSTIN\\0\" | connection port] (udp)\n\t\t\t//(connect response s->c) [header | client id | port] (udp)\n\t \n\t // open the connection\n\t\t clientSocket = null;\n\t\t Socket clientListener = null;\n\t\t // wait for client connection on tcp port\n\t\t //serverTcpSocket.setSoTimeout(5000);\n\t \tSystem.out.println (\" Waiting for tcp connection.....\");\n\t \tclientSocket = serverTcpSocket.accept();\n\t \tclientListener = serverTcpSocket.accept();\n\t \tclient.setListenerSocket(clientListener);\n\t\t\tIPAddress = clientSocket.getInetAddress();\n\t\t\tint recv_port = clientSocket.getPort();\n\t\t\tSystem.out.println(IPAddress + \": Client connected @ port \" + recv_port);\n\n\t\t // handle tcp connection\n\t\t\tclientSocket.setSoTimeout(Constants.ACK_TIMEOUT);\n\t\t out = new BufferedOutputStream(clientSocket.getOutputStream());\n\t\t\tin = new BufferedInputStream(clientSocket.getInputStream());\n\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\tclient.setPort(clientSocket.getPort());\n\t\t clients.add(client);\n\t\t\t\n\t\t // handle requests\n\t\t\twhile (!shutdown_normally) {\n\t\t\t\t// read just the header, then handle the req based on the info in the header\n\t\t\t\tif ((buf = Utility.readIn(in, Constants.HEADER_LEN)) == null)\n\t\t\t\t\tbreak;\n\t\t\t\tint flag = buf.getInt(0);\n\t\t\t\tint len2 = buf.getInt(4);\n\t\t\t\tint id = buf.getInt(8);\n\t\t\t\t\n\t\t\t\t// check for correctness of header\n\t\t\t\t\n\t\t\t\tif (flag < Constants.OPEN_CONNECTION || \n\t\t\t\t\t\tflag > Constants.NUM_FLAGS || \n\t\t\t\t\t\tid != client.getId() || \n\t\t\t\t\t\tlen2 < 0){\n\t\t\t\t\tout.close(); \n\t\t\t\t\tin.close(); \n\t\t\t\t\tclientSocket.close(); \n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t\t\tclients.remove(client);\n\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\"Connection - FAILURE! (malformed header)\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// read payload\n\t\t\t\tif ((buf = Utility.readIn(in, Utility.getPaddedLength(len2))) == null)\n\t\t\t\t\tthrow new IOException(\"read failed.\");\n\t\t\t\t// update address (necessary?)\n\t\t\t\tclients.get(clients.indexOf(client)).setAddress(clientSocket.getInetAddress());\n\t\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\t\tswitch (flag){\n\t\t\t\t\tcase Constants.ACK:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.VIEW_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing view request...\");\n\t\t\t\t\t\tViewFiles(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download request...\");\n\t\t\t\t\t\tDownload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.UPLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing upload request...\");\n\t\t\t\t\t\tUpload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_ACK:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download acknowledgment...\");\n\t\t\t\t\t\tDownloadCompleted(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.CLOSE_CONNECTION:\n\t\t\t\t\t\tshutdown_normally = true;\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\t// close all open sockets\n\t\t out.close(); \n\t\t in.close(); \n\t\t clientSocket.close(); \n\t\t serverTcpSocket.close();\n\t\t} catch (SocketTimeoutException e) {\n\t\t\tSystem.err.println(IPAddress + \": Timeout waiting for response.\");\n\t\t} catch (UnknownHostException e) {\n\t\t\t// IPAdress unknown\n\t\t\tSystem.err.println(\"Don't know about host \" + IPAddress);\n\t\t} catch (IOException e) {\n\t\t\t// Error in communication\n\t\t\tSystem.err.println(\"Couldn't get I/O for the connection to \" +\n\t\t\t\t\tIPAddress);\n\t\t} catch (RuntimeException e){\n\t\t\t// Malformed Header or payload most likely\n\t\t\tSystem.err.println(IPAddress + \": Connection - FAILURE! (\" + e.getMessage() + \")\");\n\t\t} finally {\n\t\t\t// remove this client from active lists, close all (possibly) open sockets\n\t\t\tSystem.out.println(IPAddress + \": Connection - Closing!\");\n\t\t\tclients.remove(client);\n\t\t\ttry {\n\t\t\t\tSocket clientConnection = client.getListenerSocket();\n\t\t\t\tOutputStream out_c = new BufferedOutputStream(clientConnection.getOutputStream());\n\t\t\t\tbuf = Utility.addHeader(Constants.CLOSE_CONNECTION, 0, client.getId());\n\t\t\t\tout_c.write(buf.array());\n\t\t\t\tout_c.flush();\n\t\t\t\tout_c.close();\n\t\t\t\tclientConnection.close();\n\n\t\t\t\tif (out != null)\n\t\t\t\t\tout.close();\n\t\t\t\tif (in != null)\n\t\t\t\t\tin.close();\n\t\t\t\tif (!clientSocket.isClosed())\n\t\t\t\t\tclientSocket.close();\n\t\t\t\tif (!serverTcpSocket.isClosed())\n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t} catch (IOException e){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n }", "public void run() {\n try { \n s = new ServerSocket(PORT); \n\t System.out.println(\"ready to accept connectinos\");\n }\n catch (IOException e)\n {\n System.out.println(\"Could not listen on port: \" + PORT);\n Shutdown = true;\n }\n try {\n Socket currentSocket;\n while (!Shutdown)\n { \n currentSocket = s.accept();\n System.out.println(\"Got new connection\");\n try\n {\n input = currentSocket.getInputStream();\n output = new DataOutputStream(currentSocket.getOutputStream());\n }\n catch ( Exception e )\n { \n e.printStackTrace();\n Shutdown = true;\n }\n WritePacket();\n }\n try { \n input.close();\n output.close();\n s.close(); \n } catch ( IOException e ) { e.printStackTrace(); }\n }\n catch ( IOException e) {\n System.out.println(\"Server Socket closed\");\n }\n }", "@Override\n\tpublic void run()\n\t{\n\t\tif(socket != null && !socket.isClosed() && socket.isConnected())\n\t\t{\n\t\t\tSendMessage(ApplicationManager.Instance().GetName(), MessageType.clientData);\n\t\t\tApplicationManager.textChat.writeGreen(\"Connected to \" + connectionInfo.ServerAdress);\n\t\t\t\n\t\t\ttry \n\t\t\t{\n\t\t\t\twhile (IsConnected) \n\t\t {\n\t\t Message message = (Message) in.readObject();\n\t\t\t\t\t\n\t\t if(!IsConnected)\n\t\t \tbreak;\n\t\t \t\n\t\t if(message == null)\n\t\t {\n\t\t \tIsConnected = false;\n\t\t \tbreak;\n\t\t }\n\t\t \n\t\t HandleMessage(message); \n\t\t }\n\t\t\t \n\t\t\t} \n\t\t\tcatch (SocketException | EOFException e) {\n\t\t\t\tif(IsConnected)\n\t\t\t\tApplicationManager.textChat.writeGreen(\"Server go down!\");\n\t\t\t}\n\t\t\tcatch (IOException | ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tApplicationManager.Instance().Disconnect();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tApplicationManager.textChat.writeGreen(\"Cannot connect!\");\n\t\t\tApplicationManager.Instance().Disconnect();\n\n\t\t}\n\t}" ]
[ "0.69632393", "0.6886508", "0.67753005", "0.6764306", "0.6756639", "0.6723944", "0.67069745", "0.6671824", "0.6616077", "0.66123635", "0.65710586", "0.6570942", "0.6559668", "0.65388906", "0.64947116", "0.64827603", "0.6476927", "0.6446936", "0.64439046", "0.6405289", "0.63718486", "0.63463944", "0.63447845", "0.6327286", "0.6325185", "0.6308668", "0.6300853", "0.6299881", "0.6298077", "0.62979966", "0.6263101", "0.62629", "0.6252615", "0.62460726", "0.62281936", "0.6218157", "0.6210792", "0.6207404", "0.62045187", "0.6198909", "0.61940885", "0.6184746", "0.618067", "0.6179907", "0.61696666", "0.61692595", "0.61633146", "0.61457765", "0.61333287", "0.6127929", "0.6116959", "0.61133397", "0.60989296", "0.60939854", "0.60935616", "0.60914886", "0.6081079", "0.60744166", "0.6065107", "0.60491914", "0.6038723", "0.6018236", "0.6017098", "0.60123175", "0.6004982", "0.6002649", "0.59959006", "0.59955525", "0.59838575", "0.59826976", "0.5972144", "0.59502476", "0.5938834", "0.5938396", "0.5938206", "0.59346336", "0.59298027", "0.59259635", "0.5921917", "0.5916323", "0.59153867", "0.5907813", "0.5907551", "0.5906034", "0.5901267", "0.58948475", "0.58946663", "0.5894348", "0.5891789", "0.58891535", "0.58814913", "0.58806646", "0.5874955", "0.5873366", "0.58638865", "0.5860825", "0.58570683", "0.5842977", "0.58421284", "0.5839884", "0.58384186" ]
0.0
-1